/* ==========================================================================
   TEST FORGE — PREMIUM MULTI-EXAM & TEST GENERATION PLATFORM
   Brand Identity:
   • Midnight Indigo: #11132B (Dark base background)
   • Deep Space: #171A38 (Secondary surfaces & panels)
   • Electric Violet: #7965F2 (Primary brand accent, main CTAs)
   • Bright Lavender: #A99AFF (Supporting highlight, subtle tints)
   • Icy Cyan: #56D8E8 (Secondary highlights, active states, status)
   • Warm Amber: #F5B85C (Selected highlights, achievements, metrics)
   • Soft White: #F7F8FC (Primary text on dark)
   • Muted Gray: #A3A9C2 (Secondary & helper text)
   • Subtle Border: #303451 (Refined surface borders)
/* Local & Offline Material Symbols Font Support */
@font-face {
  font-family: 'Material Symbols Outlined';
  font-style: normal;
  font-weight: 100 700;
  font-display: block;
  src: url('assets/vendor/material-symbols-outlined.woff2') format('woff2');
}

.material-symbols-outlined {
  font-family: 'Material Symbols Outlined', sans-serif !important;
  font-weight: normal;
  font-style: normal;
  font-size: 24px;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  display: inline-block;
  white-space: nowrap;
  word-wrap: normal;
  direction: ltr;
  -webkit-font-feature-settings: 'liga';
  font-feature-settings: 'liga';
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  vertical-align: middle;
}

:root {
  /* Core Dark Mode Colors (Default) */
  --bg-base: #11132B;
  --bg-surface: #171A38;
  --bg-surface-elevated: #1F234A;
  --bg-surface-hover: #262B5C;
  --bg-card: #171A38;
  --bg-card-hover: #1E224A;
  --bg-input: #12142E;
  --bg-overlay: rgba(17, 19, 43, 0.94);
  --bg-glass: rgba(23, 26, 56, 0.75);

  /* Precise Borders */
  --border-subtle: #303451;
  --border-medium: #3E4368;
  --border-focus: #7965F2;
  --border-cyan: #56D8E8;
  --border-amber: #F5B85C;

  /* Primary Accent: Electric Violet */
  --accent-violet: #7965F2;
  --accent-violet-hover: #6752EA;
  --accent-violet-light: #A99AFF;
  --accent-violet-glow: rgba(121, 101, 242, 0.28);
  --accent-violet-subtle: rgba(121, 101, 242, 0.12);

  /* Secondary Accent: Icy Cyan */
  --accent-cyan: #56D8E8;
  --accent-cyan-hover: #3DCFDF;
  --accent-cyan-glow: rgba(86, 216, 232, 0.22);
  --accent-cyan-subtle: rgba(86, 216, 232, 0.12);

  /* Highlight Accent: Warm Amber */
  --accent-amber: #F5B85C;
  --accent-amber-hover: #EAA340;
  --accent-amber-glow: rgba(245, 184, 92, 0.22);
  --accent-amber-subtle: rgba(245, 184, 92, 0.12);

  /* CBT Status Palette */
  --status-answered: #56D8E8;
  --status-answered-bg: rgba(86, 216, 232, 0.18);
  --status-notanswered: #FF5A76;
  --status-notanswered-bg: rgba(255, 90, 118, 0.18);
  --status-marked: #A99AFF;
  --status-marked-bg: rgba(169, 154, 255, 0.2);
  --status-notvisited: #6A7295;
  --status-notvisited-bg: rgba(106, 114, 149, 0.2);

  /* Typography Colors */
  --text-primary: #F7F8FC;
  --text-secondary: #A3A9C2;
  --text-muted: #737B9C;
  --text-inverse: #11132B;

  /* Gradients */
  --grad-violet: linear-gradient(135deg, #7965F2 0%, #5B44E6 100%);
  --grad-cyan: linear-gradient(135deg, #56D8E8 0%, #30B9CA 100%);
  --grad-amber: linear-gradient(135deg, #F5B85C 0%, #E89B35 100%);
  --grad-hero-text: linear-gradient(135deg, #F7F8FC 20%, #A99AFF 60%, #56D8E8 100%);
  --grad-hero-card: linear-gradient(135deg, rgba(121, 101, 242, 0.08) 0%, rgba(86, 216, 232, 0.04) 100%);

  /* Typography Scale */
  --font-main: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Radius Scale */
  --radius-xs: 6px;
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-pill: 9999px;

  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.28);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.38);
  --shadow-glow: 0 0 28px rgba(121, 101, 242, 0.24);

  /* Transitions */
  --tr-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --tr-smooth: 250ms cubic-bezier(0.16, 1, 0.3, 1);
}

/* ==========================================================================
   Light Mode Theme
   ========================================================================== */
[data-theme="light"] {
  --bg-base: #F4F3FF;
  --bg-surface: #FFFFFF;
  --bg-surface-elevated: #EDEBFD;
  --bg-surface-hover: #E5E1FB;
  --bg-card: #FFFFFF;
  --bg-card-hover: #F8F7FF;
  --bg-input: #F8F9FE;
  --bg-overlay: rgba(244, 243, 255, 0.94);
  --bg-glass: rgba(255, 255, 255, 0.85);

  --border-subtle: #E2E4F0;
  --border-medium: #CBD0E8;
  --border-focus: #6752EA;
  --border-cyan: #0EA5E9;
  --border-amber: #D97706;

  --accent-violet: #6752EA;
  --accent-violet-hover: #553FE0;
  --accent-violet-light: #7965F2;
  --accent-violet-glow: rgba(103, 82, 234, 0.2);
  --accent-violet-subtle: rgba(103, 82, 234, 0.08);

  --accent-cyan: #0284C7;
  --accent-cyan-hover: #0369A1;
  --accent-cyan-glow: rgba(2, 132, 199, 0.18);
  --accent-cyan-subtle: rgba(2, 132, 199, 0.08);

  --accent-amber: #D97706;
  --accent-amber-hover: #B45309;
  --accent-amber-glow: rgba(217, 119, 6, 0.18);
  --accent-amber-subtle: rgba(217, 119, 6, 0.08);

  --status-answered: #0284C7;
  --status-answered-bg: rgba(2, 132, 199, 0.14);
  --status-notanswered: #E11D48;
  --status-notanswered-bg: rgba(225, 29, 72, 0.14);
  --status-marked: #6752EA;
  --status-marked-bg: rgba(103, 82, 234, 0.14);
  --status-notvisited: #94A3B8;
  --status-notvisited-bg: #F1F5F9;

  --text-primary: #0F1123;
  --text-secondary: #555B7A;
  --text-muted: #848AA6;
  --text-inverse: #FFFFFF;

  --grad-hero-text: linear-gradient(135deg, #0F1123 20%, #6752EA 70%, #0284C7 100%);
  --grad-hero-card: linear-gradient(135deg, rgba(103, 82, 234, 0.06) 0%, rgba(2, 132, 199, 0.04) 100%);

  --shadow-sm: 0 2px 8px rgba(15, 17, 35, 0.06);
  --shadow-md: 0 8px 24px rgba(15, 17, 35, 0.09);
  --shadow-lg: 0 16px 40px rgba(15, 17, 35, 0.12);
  --shadow-glow: 0 0 28px rgba(103, 82, 234, 0.15);
}

/* ==========================================================================
   Base Resets
   ========================================================================== */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

*, *::before, *::after {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

button,
.btn-primary,
.btn-secondary,
.btn-ghost,
.theme-toggle-btn,
.avatar-dropdown-btn,
.mobile-tab-item,
.mobile-drawer-link,
.branch-card,
.exam-hero-select-card {
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  -webkit-user-select: none;
}

button:active:not(:disabled),
.btn-primary:active:not(:disabled),
.btn-secondary:active:not(:disabled),
.btn-ghost:active:not(:disabled),
.mobile-tab-item:active,
.mobile-drawer-link:active,
.branch-card:active,
.exam-hero-select-card:active {
  transform: scale(0.97);
  transition: transform 0.08s ease;
}

html {
  scroll-behavior: smooth;
  font-size: 15px;
  overflow-x: hidden;
  max-width: 100vw;
  width: 100%;
  overscroll-behavior-y: contain;
}

body {
  font-family: var(--font-main);
  background-color: var(--bg-base);
  color: var(--text-primary);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  max-width: 100vw;
  width: 100%;
  position: relative;
  transition: background-color var(--tr-smooth), color var(--tr-smooth);
}

.desktop-only {
  display: inline-flex;
}
@media (max-width: 900px) {
  .desktop-only {
    display: none !important;
  }
}

/* Scrollbar Customization */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-base);
}
::-webkit-scrollbar-thumb {
  background: var(--border-medium);
  border-radius: var(--radius-pill);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--accent-violet);
}

/* Container */
.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Typography Helpers */
.mono {
  font-family: var(--font-mono);
}

/* ==========================================================================
   Header & Sticky Navigation
   ========================================================================== */
.app-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background-color: var(--bg-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-subtle);
  transition: background-color var(--tr-smooth), border-color var(--tr-smooth);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
  gap: 1rem;
}

/* Brand & Original Logo */
.brand-wrapper {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
  min-width: 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  text-decoration: none;
  cursor: pointer;
  user-select: none;
  flex-shrink: 0;
}

.brand-fire-logo,
.brand-emblem-img {
  height: 40px !important;
  width: 40px !important;
  max-height: 40px !important;
  max-width: 40px !important;
  display: block;
  object-fit: contain;
  filter: drop-shadow(0 3px 12px rgba(121, 101, 242, 0.55)) drop-shadow(0 1px 4px rgba(169, 154, 255, 0.35));
  transition: transform var(--tr-fast), filter var(--tr-fast);
}

.brand:hover .brand-fire-logo,
.brand:hover .brand-emblem-img {
  transform: scale(1.06);
  filter: drop-shadow(0 5px 20px rgba(121, 101, 242, 0.75)) drop-shadow(0 2px 8px rgba(169, 154, 255, 0.45));
}

.brand-wordmark-img {
  height: 24px !important;
  width: auto !important;
  max-width: 175px !important;
  max-height: 24px !important;
  display: block;
  object-fit: contain;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.5));
}

.auth-modal-emblem {
  height: 76px !important;
  width: 76px !important;
  max-height: 76px !important;
  max-width: 76px !important;
  display: block;
  margin: 0 auto 0.85rem auto;
  object-fit: contain;
  filter: drop-shadow(0 8px 24px rgba(121, 101, 242, 0.6)) drop-shadow(0 2px 8px rgba(169, 154, 255, 0.4));
  transition: transform var(--tr-fast);
}
.auth-modal-emblem:hover {
  transform: scale(1.05);
}

.companion-ecosystem-badge {
  white-space: nowrap !important;
  flex-shrink: 0;
}

@media (max-width: 1400px) {
  .companion-ecosystem-badge {
    display: none !important;
  }
}

.state-option-box {
  transition: all var(--tr-fast);
}
.state-option-box:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
}

.brand-text-wrap {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: var(--text-primary);
  line-height: 1.1;
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.brand-title .brand-highlight {
  color: var(--accent-violet-light);
  font-weight: 800;
}

.brand-tagline {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--accent-cyan);
  text-transform: uppercase;
}

/* Navigation Tabs */
.nav-tabs {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  padding: 0.3rem;
  border-radius: var(--radius-pill);
}

.nav-tab-btn {
  background: none;
  border: none;
  padding: 0.45rem 1rem;
  border-radius: var(--radius-pill);
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  transition: all var(--tr-fast);
}

.nav-tab-btn:hover {
  color: var(--text-primary);
  background: var(--bg-surface-elevated);
}

.nav-tab-btn.active {
  background: var(--accent-violet);
  color: #FFFFFF;
  box-shadow: 0 2px 12px var(--accent-violet-glow);
}

/* Header Search Input */
.header-search-wrap {
  position: relative;
  display: flex;
  align-items: center;
  min-width: 170px;
  max-width: 220px;
}

.header-search-input {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-pill);
  padding: 0.45rem 2rem 0.45rem 2.2rem;
  color: var(--text-primary);
  font-size: 0.8rem;
  font-family: inherit;
  outline: none;
  transition: all var(--tr-fast);
}

.header-search-input:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px var(--accent-violet-subtle);
  max-width: 260px;
}

.header-search-icon {
  position: absolute;
  left: 0.75rem;
  color: var(--text-muted);
  pointer-events: none;
  font-size: 16px;
}

.header-search-kbd {
  position: absolute;
  right: 0.65rem;
  font-size: 0.65rem;
  color: var(--text-muted);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 4px;
  padding: 0.1rem 0.35rem;
  pointer-events: none;
}

/* Header Right Actions */
.header-actions {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-shrink: 0;
}

/* Theme Toggle Button */
.theme-toggle-btn {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  width: 38px;
  height: 38px;
  border-radius: var(--radius-pill);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--tr-fast);
}

.theme-toggle-btn:hover {
  background: var(--bg-surface-elevated);
  border-color: var(--border-medium);
  transform: rotate(15deg);
}

/* User Session Profile Button */
.user-profile-btn {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-pill);
  padding: 0.3rem 0.85rem 0.3rem 0.4rem;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--text-primary);
  font-family: inherit;
  cursor: pointer;
  transition: all var(--tr-fast);
}

.user-profile-btn:hover {
  border-color: var(--border-medium);
  background: var(--bg-surface-elevated);
}

.user-avatar-circle {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--grad-violet);
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 700;
  box-shadow: 0 2px 6px var(--accent-violet-glow);
}

/* Responsive Mobile Nav Toggle */
.mobile-nav-toggle {
  display: none;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

/* ==========================================================================
   Buttons & Micro-Interactions
   ========================================================================== */
.btn-primary {
  background: var(--grad-violet);
  color: #FFFFFF;
  border: none;
  padding: 0.65rem 1.35rem;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  box-shadow: 0 4px 16px var(--accent-violet-glow);
  transition: all var(--tr-fast);
  text-decoration: none;
  user-select: none;
}

.btn-primary:hover {
  background: var(--accent-violet-hover);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(121, 101, 242, 0.4);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-secondary {
  background: var(--bg-surface);
  color: var(--text-primary);
  border: 1px solid var(--border-subtle);
  padding: 0.65rem 1.35rem;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: all var(--tr-fast);
  text-decoration: none;
  user-select: none;
}

.btn-secondary:hover {
  background: var(--bg-surface-elevated);
  border-color: var(--border-medium);
  color: #FFFFFF;
}

/* Dedicated Modern PDF Action Button */
.btn-pdf {
  background: var(--bg-surface);
  color: var(--text-secondary);
  border: 1px solid var(--border-subtle);
  padding: 0.5rem 0.8rem;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 600;
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  text-decoration: none;
  white-space: nowrap;
  user-select: none;
  cursor: pointer;
  transition: all var(--tr-fast);
}

.btn-pdf:hover {
  background: rgba(239, 68, 68, 0.12);
  border-color: rgba(239, 68, 68, 0.4);
  color: #FFFFFF;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(239, 68, 68, 0.18);
}

.btn-pdf .pdf-icon-svg {
  flex-shrink: 0;
  transition: transform var(--tr-fast);
}

.btn-pdf:hover .pdf-icon-svg {
  transform: scale(1.08);
}

[data-theme="light"] .btn-pdf {
  background: var(--bg-surface);
  border-color: var(--border-subtle);
  color: var(--text-secondary);
}

[data-theme="light"] .btn-pdf:hover {
  background: rgba(220, 38, 38, 0.08);
  border-color: rgba(220, 38, 38, 0.35);
  color: #dc2626;
  box-shadow: 0 3px 10px rgba(220, 38, 38, 0.12);
}

.btn-cyan {
  background: var(--grad-cyan);
  color: #11132B;
  border: none;
  padding: 0.65rem 1.35rem;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  box-shadow: 0 4px 16px var(--accent-cyan-glow);
  transition: all var(--tr-fast);
  text-decoration: none;
}

.btn-cyan:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(86, 216, 232, 0.35);
}

.btn-amber {
  background: var(--grad-amber);
  color: #11132B;
  border: none;
  padding: 0.65rem 1.35rem;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  box-shadow: 0 4px 16px var(--accent-amber-glow);
  transition: all var(--tr-fast);
  text-decoration: none;
}

/* Badges & Chips */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-pill);
  letter-spacing: 0.02em;
}

.badge-violet {
  background: var(--accent-violet-subtle);
  color: var(--accent-violet-light);
  border: 1px solid rgba(121, 101, 242, 0.3);
}

.badge-cyan {
  background: var(--accent-cyan-subtle);
  color: var(--accent-cyan);
  border: 1px solid rgba(86, 216, 232, 0.3);
}

.badge-amber {
  background: var(--accent-amber-subtle);
  color: var(--accent-amber);
  border: 1px solid rgba(245, 184, 92, 0.3);
}

.badge-emerald {
  background: rgba(86, 216, 232, 0.15);
  color: var(--accent-cyan);
  border: 1px solid rgba(86, 216, 232, 0.3);
}

.badge-gold {
  background: var(--accent-amber-subtle);
  color: var(--accent-amber);
  border: 1px solid rgba(245, 184, 92, 0.3);
}

/* ==========================================================================
   View Container & Tab Switcher
   ========================================================================== */
.view-content-pane {
  display: none;
  animation: fadeIn 250ms cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.view-content-pane.active {
  display: block;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ==========================================================================
   SECTION 3: Homepage Marketing Experience
   ========================================================================== */
/* Hero Section */
.hero-section {
  padding: 4.5rem 0 3.5rem;
  position: relative;
}

.hero-grid-2col {
  display: grid;
  grid-template-columns: 1.15fr 0.95fr;
  gap: 3.5rem;
  align-items: center;
}

.hero-left {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.hero-eyebrow-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--accent-violet-subtle);
  border: 1px solid rgba(121, 101, 242, 0.35);
  padding: 0.4rem 1rem;
  border-radius: var(--radius-pill);
  color: var(--accent-violet-light);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  width: fit-content;
}

.hero-title {
  font-size: 3.35rem;
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.03em;
  color: var(--text-primary);
}

.hero-title .gradient-text {
  background: var(--grad-hero-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-desc {
  font-size: 1.12rem;
  color: var(--text-secondary);
  line-height: 1.65;
  max-width: 540px;
}

.hero-cta-group {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 0.5rem;
}

.hero-trust-line {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 500;
  margin-top: 0.25rem;
}

.hero-trust-line span {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

/* Hero Right: Examination Workspace Realistic Preview */
.hero-visual-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg), 0 0 35px rgba(121, 101, 242, 0.15);
  overflow: hidden;
  position: relative;
  transition: transform var(--tr-smooth), border-color var(--tr-smooth);
}

.hero-visual-card:hover {
  border-color: var(--border-medium);
  transform: translateY(-2px);
}

.hero-preview-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1.25rem;
  background: var(--bg-surface-elevated);
  border-bottom: 1px solid var(--border-subtle);
}

.hero-preview-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-primary);
}

.hero-preview-timer {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--accent-violet-subtle);
  border: 1px solid rgba(121, 101, 242, 0.3);
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--accent-cyan);
}

.hero-preview-body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.hero-preview-question-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.hero-preview-q-text {
  font-size: 0.96rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.5;
}

.hero-preview-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
}

.hero-preview-opt {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.65rem 0.85rem;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  color: var(--text-secondary);
  transition: all var(--tr-fast);
}

.hero-preview-opt.selected {
  background: var(--accent-cyan-subtle);
  border-color: var(--accent-cyan);
  color: var(--text-primary);
  font-weight: 600;
}

.hero-preview-opt-circle {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
}

.hero-preview-opt.selected .hero-preview-opt-circle {
  background: var(--accent-cyan);
  color: #11132B;
  border-color: var(--accent-cyan);
}

.hero-preview-palette-wrap {
  padding-top: 0.85rem;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.hero-preview-palette-dots {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.hero-palette-dot {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 700;
  font-family: var(--font-mono);
}

.dot-answered {
  background: var(--status-answered);
  color: #11132B;
}

.dot-marked {
  background: var(--status-marked);
  color: #11132B;
}

.dot-notanswered {
  background: var(--status-notanswered);
  color: #FFFFFF;
}

.dot-notvisited {
  background: var(--bg-surface-elevated);
  color: var(--text-muted);
  border: 1px solid var(--border-subtle);
}

/* Quick-Action Panel (Section 3.C) */
.quick-actions-section {
  padding: 1.5rem 0 3.5rem;
}

.quick-actions-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.quick-action-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  cursor: pointer;
  transition: all var(--tr-fast);
  position: relative;
  overflow: hidden;
}

.quick-action-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--card-accent, var(--accent-violet));
  opacity: 0;
  transition: opacity var(--tr-fast);
}

.quick-action-card:hover {
  transform: translateY(-3px);
  border-color: var(--border-medium);
  box-shadow: var(--shadow-md);
}

.quick-action-card:hover::before {
  opacity: 1;
}

.quick-action-icon {
  width: 50px;
  height: 50px;
  border-radius: var(--radius-sm);
  background: var(--icon-bg, var(--accent-violet-subtle));
  color: var(--icon-color, var(--accent-violet-light));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
}

.quick-action-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
}

.quick-action-desc {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.quick-action-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--link-color, var(--accent-violet-light));
  margin-top: auto;
}

/* Section Header Shared */
.section-header-block {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 3rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

.section-eyebrow {
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent-cyan);
}

.section-heading {
  font-size: 2.25rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  line-height: 1.2;
}

.section-subtext {
  font-size: 1rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* Examination Directory (Section 3.D) */
.exam-directory-section {
  padding: 3.5rem 0;
}

.exam-cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.75rem;
}

.exam-dir-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 2rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1.5rem;
  transition: all var(--tr-smooth);
  position: relative;
}

.exam-dir-card:hover {
  border-color: var(--border-medium);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.exam-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.exam-icon-box {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
}

.exam-card-name {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-top: 0.75rem;
}

.exam-card-fullname {
  font-size: 0.82rem;
  color: var(--accent-violet-light);
  font-weight: 600;
}

.exam-card-desc {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.55;
  margin-top: 0.5rem;
}

.exam-branches-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.75rem;
}

.branch-chip-pill {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.2rem 0.55rem;
  border-radius: 4px;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
}

.exam-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border-subtle);
}

.exam-paper-count-stat {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--accent-cyan);
}

/* How Test Forge Works (Section 3.E) */
.how-it-works-section {
  padding: 4.5rem 0;
  background: var(--bg-surface);
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
}

.steps-3col-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2.5rem;
  position: relative;
}

.step-card {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  position: relative;
}

.step-number-bubble {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--accent-violet-subtle);
  border: 1px solid rgba(121, 101, 242, 0.4);
  color: var(--accent-violet-light);
  font-size: 1.15rem;
  font-weight: 800;
  font-family: var(--font-mono);
  display: flex;
  align-items: center;
  justify-content: center;
}

.step-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-primary);
}

.step-desc {
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* Feature Showcase (Section 3.F) */
.features-section {
  padding: 5rem 0;
}

.features-grid-6col {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.75rem;
}

.feature-box {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  transition: all var(--tr-smooth);
}

.feature-box:hover {
  border-color: var(--border-medium);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.feature-icon-box {
  width: 46px;
  height: 46px;
  border-radius: var(--radius-sm);
  background: var(--accent-violet-subtle);
  color: var(--accent-violet-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
}

.feature-box-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
}

.feature-box-desc {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.55;
}

/* Final Call To Action (Section 3.G) */
.final-cta-section {
  padding: 4rem 0 5rem;
}

.final-cta-banner {
  background: var(--bg-surface);
  border: 1px solid rgba(121, 101, 242, 0.35);
  border-radius: var(--radius-xl);
  padding: 4rem 3rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  position: relative;
  overflow: hidden;
  box-shadow: 0 10px 40px rgba(121, 101, 242, 0.12);
}

.final-cta-banner::before {
  content: '';
  position: absolute;
  top: -50%;
  left: 20%;
  width: 60%;
  height: 100%;
  background: radial-gradient(circle, rgba(121, 101, 242, 0.18) 0%, transparent 70%);
  pointer-events: none;
}

.final-cta-title {
  font-size: 2.6rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

.final-cta-desc {
  font-size: 1.1rem;
  color: var(--text-secondary);
  max-width: 580px;
  line-height: 1.6;
}

.final-cta-btns {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
  justify-content: center;
}

/* Footer (Section 3.H) */
.app-footer {
  background: var(--bg-surface);
  border-top: 1px solid var(--border-subtle);
  padding: 4.5rem 0 2rem;
  margin-top: auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer-brand-col {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.footer-desc {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.6;
  max-width: 340px;
}

.footer-heading {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 1.25rem;
}

.footer-links-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.footer-links-list a {
  color: var(--text-secondary);
  font-size: 0.88rem;
  text-decoration: none;
  transition: color var(--tr-fast);
}

.footer-links-list a:hover {
  color: var(--accent-violet-light);
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 2rem;
  border-top: 1px solid var(--border-subtle);
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* ==========================================================================
   SECTION 4: Question Banks & Dedicated ECET Hierarchy
   ========================================================================== */
.exam-hero-banner {
  padding: 2.5rem 0 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.exam-hero-title {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.exam-controls-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 1rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  margin-bottom: 1.5rem;
}

.filter-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.filter-btn {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  padding: 0.45rem 0.9rem;
  border-radius: var(--radius-pill);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--tr-fast);
}

.filter-btn:hover {
  color: var(--text-primary);
  border-color: var(--border-medium);
}

.filter-btn.active {
  background: var(--accent-violet);
  color: #FFFFFF;
  border-color: var(--accent-violet);
}

/* Branch Grid Selector */
.branch-grid-selector {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.75rem;
  margin-bottom: 2rem;
}

.ecet-branch-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 0.85rem 0.65rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.35rem;
  cursor: pointer;
  transition: all var(--tr-fast);
}

.ecet-branch-card:hover {
  border-color: var(--border-medium);
  transform: translateY(-2px);
}

.ecet-branch-card.active {
  background: var(--bg-surface-elevated);
  border-color: var(--accent-violet);
  box-shadow: 0 0 16px var(--accent-violet-glow);
}

.ecet-branch-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--accent-violet-subtle);
  color: var(--accent-violet-light);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Year Pills */
.year-pills-bar {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
  margin-bottom: 1.5rem;
}

.filter-pill {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-pill);
  font-size: 0.8rem;
  font-weight: 600;
  font-family: var(--font-mono);
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--tr-fast);
}

.filter-pill:hover {
  color: var(--text-primary);
  border-color: var(--border-medium);
}

.filter-pill.active {
  background: var(--accent-violet);
  color: #FFFFFF;
  border-color: var(--accent-violet);
}

/* Papers Grid */
.papers-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-bottom: 3.5rem;
}

.exam-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1.25rem;
  transition: all var(--tr-smooth);
  position: relative;
}

.exam-card:hover {
  border-color: var(--border-medium);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.card-header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.branch-tag {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  font-weight: 800;
}

.branch-icon {
  width: 26px;
  height: 26px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.card-title {
  font-size: 1.12rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}

.card-meta-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.75rem;
}

.meta-chip {
  font-size: 0.75rem;
  font-family: var(--font-mono);
  color: var(--text-secondary);
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  padding: 0.25rem 0.55rem;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.card-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* ==========================================================================
   SECTION 6: PDF-to-Test Generator Workspace
   ========================================================================== */
.pdf-workspace-container {
  padding: 2.5rem 0 4rem;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.dropzone-box {
  border: 2px dashed var(--border-medium);
  border-radius: var(--radius-lg);
  padding: 3.5rem 2rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  background: var(--bg-surface);
  cursor: pointer;
  transition: all var(--tr-fast);
}

.dropzone-box:hover,
.dropzone-box.dragover {
  border-color: var(--accent-violet);
  background: var(--accent-violet-subtle);
}

.dropzone-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--accent-violet-subtle);
  color: var(--accent-violet-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
}

.file-preview-card {
  display: none;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  padding: 1.25rem 1.5rem;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  max-width: 100%;
  box-sizing: border-box;
}

.file-preview-card.active {
  display: flex;
}

.file-preview-info {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  min-width: 0;
  flex: 1 1 auto;
}

.file-preview-icon {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-sm);
  background: rgba(239, 68, 68, 0.12);
  color: #EF4444;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.file-preview-meta {
  min-width: 0;
}

.file-preview-meta strong {
  display: block;
  color: var(--text-primary);
  font-size: 0.95rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.file-preview-meta div {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.file-preview-controls {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  flex-shrink: 0;
}

.file-preview-field {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.file-preview-field label {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-muted);
  white-space: nowrap;
}

.file-preview-field select {
  background: var(--bg-input);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-sm);
  padding: 0.45rem 0.7rem;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  max-width: 100%;
}

.file-preview-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.parsing-progress-bar {
  display: none;
  width: 100%;
  height: 8px;
  background: var(--bg-surface);
  border-radius: var(--radius-pill);
  overflow: hidden;
  margin-top: 1rem;
}

.parsing-progress-fill {
  height: 100%;
  width: 0%;
  background: var(--grad-violet);
  transition: width 300ms ease;
}

.extracted-review-box {
  display: none;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  flex-direction: column;
  gap: 1.5rem;
  max-width: 100%;
  box-sizing: border-box;
}

.extracted-review-box.active {
  display: flex;
}

.review-header-wrap {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 1rem;
}

.review-title-col {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  flex: 1 1 300px;
  min-width: 0;
}

.review-title-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.review-title-row h2 {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text-primary);
  margin: 0;
  line-height: 1.25;
}

.review-title-row .badge {
  max-width: 100%;
  white-space: normal;
  word-break: break-word;
  line-height: 1.35;
  padding: 0.35rem 0.65rem;
}

.review-title-col p {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.4;
}

.review-header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

/* Exam Configuration Grid */
.gen-test-config-grid {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 1rem;
  box-sizing: border-box;
}

.gen-test-config-field {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.gen-test-config-field label {
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
  white-space: nowrap;
}

.gen-test-config-field input,
.gen-test-config-field select {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 0.5rem 0.75rem;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.85rem;
}

.review-filter-pagination-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  padding: 0.5rem 0;
}

.review-filter-group {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.review-filter-group span {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.review-filter-group #extracted-section-chips {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}

/* Options Grid for Extracted Questions */
.extracted-options-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
}

.extracted-option-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 0.45rem 0.75rem;
  min-width: 0;
}

.extracted-q-item {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  transition: border-color var(--tr-fast);
}

.extracted-q-item:hover {
  border-color: var(--border-medium);
}

/* Mobile Responsiveness for Generator Workspace */
@media (max-width: 768px) {
  .pdf-workspace-container {
    padding: 1.5rem 0 3rem;
    gap: 1.25rem;
  }

  .file-preview-card {
    flex-direction: column;
    align-items: stretch;
    padding: 1rem;
    gap: 1rem;
  }

  .file-preview-controls {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    gap: 0.75rem;
  }

  .file-preview-field {
    flex-direction: column;
    align-items: stretch;
    gap: 0.25rem;
    width: 100%;
  }

  .file-preview-field label {
    font-size: 0.75rem;
  }

  .file-preview-field select {
    width: 100%;
  }

  .file-preview-actions {
    width: 100%;
    margin-top: 0.25rem;
  }

  .file-preview-actions .btn-primary {
    flex: 1;
    justify-content: center;
  }

  .extracted-review-box {
    padding: 1rem;
    gap: 1rem;
    border-radius: var(--radius-md);
  }

  .review-header-wrap {
    flex-direction: column;
    align-items: stretch;
    gap: 0.85rem;
  }

  .review-title-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.4rem;
  }

  .review-title-row h2 {
    font-size: 1.15rem;
  }

  .review-header-actions {
    width: 100%;
    flex-direction: column;
    gap: 0.5rem;
  }

  .review-header-actions button {
    width: 100%;
    justify-content: center;
    padding: 0.75rem 1rem;
  }

  .gen-test-config-grid {
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    padding: 0.9rem;
  }

  .gen-test-config-field.title-field {
    grid-column: 1 / -1;
  }

  .gen-test-config-field.duration-field {
    grid-column: 1 / 2;
  }

  .gen-test-config-field.negative-field {
    grid-column: 2 / 3;
  }

  .review-filter-pagination-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
  }

  #extracted-pagination-controls {
    justify-content: center;
    width: 100%;
  }

  .extracted-q-item {
    padding: 1rem;
    gap: 0.75rem;
  }

  .extracted-options-grid {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   SECTION 8: Focused Examination Screen (CBT Simulator)
   ========================================================================== */
.cbt-container {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background-color: var(--bg-base);
  display: none;
  flex-direction: column;
  color: var(--text-primary);
  overflow: hidden;
}

.cbt-container.active {
  display: flex;
}

.cbt-header {
  height: 64px;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-subtle);
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

.cbt-header-left {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.cbt-header-brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.cbt-header-brand img {
  height: 32px;
  width: auto;
}

.cbt-timer-box {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  padding: 0.4rem 1rem;
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--accent-cyan);
}

.cbt-timer-box.urgent {
  border-color: var(--status-notanswered);
  color: var(--status-notanswered);
  animation: pulse 1s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

/* CBT Sections Bar */
.cbt-sections-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1.5rem;
  background: var(--bg-surface-elevated);
  border-bottom: 1px solid var(--border-subtle);
  overflow-x: auto;
  flex-shrink: 0;
}

.section-chip {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-pill);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--tr-fast);
}

.section-chip:hover {
  color: var(--text-primary);
  border-color: var(--border-medium);
}

.section-chip.active {
  background: var(--accent-violet);
  color: #FFFFFF;
  border-color: var(--accent-violet);
}

/* CBT Main Layout */
.cbt-workspace {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 340px;
  overflow: hidden;
}

.cbt-question-area {
  padding: 2rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1.5rem;
}

.question-card-box {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.q-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-subtle);
}

.q-img-wrap {
  position: relative;
  max-width: 100%;
  display: inline-block;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: #FFFFFF;
  padding: 0.85rem 1.25rem;
  cursor: zoom-in;
  border: 1px solid var(--border-subtle);
  transition: all var(--tr-fast);
}

.q-img-wrap:hover {
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
  border-color: var(--accent-violet-light);
}

.q-img-wrap img {
  max-width: 100%;
  height: auto;
  display: block;
}

.q-zoom-btn {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-pill);
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  transition: all var(--tr-fast);
}

.q-zoom-btn:hover {
  color: var(--accent-cyan);
  border-color: var(--accent-cyan);
  background: var(--accent-cyan-subtle);
}

/* CBT Options List */
.cbt-options-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.option-item {
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 0.95rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  cursor: pointer;
  transition: all var(--tr-fast);
}

.option-item:hover {
  background: var(--bg-surface-elevated);
  border-color: var(--border-medium);
}

.option-item.selected {
  background: var(--accent-cyan-subtle);
  border-color: var(--accent-cyan);
  box-shadow: 0 0 16px var(--accent-cyan-glow);
}

.option-indicator {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  font-weight: 700;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.option-item.selected .option-indicator {
  background: var(--accent-cyan);
  color: #11132B;
  border-color: var(--accent-cyan);
}

.option-content {
  flex: 1;
}

.option-img-wrap {
  display: inline-block;
  background: #FFFFFF;
  padding: 0.4rem;
  border-radius: 4px;
}

.option-img-wrap img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* CBT Bottom Navigation Bar */
.cbt-actions-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-subtle);
}

/* CBT Right Sidebar: Question Palette */
.cbt-palette-sidebar {
  background: var(--bg-surface);
  border-left: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
}

.palette-status-summary {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
  padding: 1.25rem;
  background: var(--bg-surface-elevated);
  border-bottom: 1px solid var(--border-subtle);
}

.status-stat-pill {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.78rem;
  color: var(--text-secondary);
}

.status-stat-pill strong {
  font-family: var(--font-mono);
  color: var(--text-primary);
}

.cbt-palette-grid-wrap {
  flex: 1;
  padding: 1.25rem;
  overflow-y: auto;
}

.cbt-palette-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.6rem;
}

.palette-btn {
  height: 38px;
  border-radius: var(--radius-xs);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all var(--tr-fast);
}

.palette-btn.not-visited {
  background: var(--bg-surface-elevated);
  color: var(--text-muted);
  border-color: var(--border-subtle);
}

.palette-btn.not-answered {
  background: var(--status-notanswered-bg);
  color: var(--status-notanswered);
  border-color: rgba(255, 90, 118, 0.4);
}

.palette-btn.answered {
  background: var(--status-answered);
  color: #11132B;
}

.palette-btn.marked {
  background: var(--status-marked);
  color: #11132B;
}

.palette-btn.current {
  box-shadow: 0 0 0 2px #FFFFFF, 0 0 10px rgba(255, 255, 255, 0.5);
  transform: scale(1.05);
}

/* ==========================================================================
   Modals Shared Style
   ========================================================================== */
.customizer-modal,
.auth-modal,
.results-modal-overlay,
.zoom-modal {
  position: fixed;
  inset: 0;
  z-index: 2500;
  background: var(--bg-overlay);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.customizer-modal.active,
.auth-modal.active,
.results-modal-overlay.active,
.zoom-modal.active {
  display: flex;
}

.modal-dialog {
  background: var(--bg-surface);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 580px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 2.25rem;
  position: relative;
  animation: modalIn 250ms cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalIn {
  from {
    opacity: 0;
    transform: scale(0.96) translateY(10px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.modal-close-btn {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--tr-fast);
}

.modal-close-btn:hover {
  color: var(--text-primary);
  border-color: var(--border-medium);
}

/* Results Fullscreen Modal */
.results-modal-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 900px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 3rem;
  position: relative;
}

.results-score-badge {
  text-align: center;
  padding: 2.5rem;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  margin-bottom: 2rem;
}

.results-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 2.5rem;
}

.res-stat-box {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  text-align: center;
}

.res-stat-val {
  font-family: var(--font-mono);
  font-size: 1.6rem;
  font-weight: 800;
  margin-bottom: 0.25rem;
}

.review-q-item {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  margin-bottom: 1rem;
}

.review-q-item.correct-ans {
  border-left: 4px solid var(--status-answered);
}

.review-q-item.wrong-ans {
  border-left: 4px solid var(--status-notanswered);
}

.review-q-item.skipped-ans {
  border-left: 4px solid var(--text-muted);
}

/* Zoom Modal */
.zoom-modal img {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
  background: #FFFFFF;
  padding: 1rem;
  border-radius: var(--radius-md);
}

/* ==========================================================================
   Responsive Layout & Media Queries
   ========================================================================== */
@media (max-width: 1024px) {
  .hero-grid-2col {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }
  .quick-actions-grid {
    grid-template-columns: 1fr;
  }
  .exam-cards-grid {
    grid-template-columns: 1fr 1fr;
  }
  .papers-grid {
    grid-template-columns: 1fr 1fr;
  }
  .branch-grid-selector {
    grid-template-columns: repeat(4, 1fr);
  }
  .steps-3col-grid {
    grid-template-columns: 1fr;
  }
  .features-grid-6col {
    grid-template-columns: 1fr 1fr;
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
  .cbt-workspace {
    grid-template-columns: 1fr 280px;
  }
}

@media (max-width: 768px) {
  /* Container & Layout */
  .container {
    padding: 0 1rem !important;
    max-width: 100vw !important;
  }
  main.container {
    overflow-x: hidden;
  }

  /* Header & Navigation: allow dropdowns to overflow without clipping */
  .app-header .container,
  .header-inner {
    overflow: visible !important;
    height: 58px !important;
    gap: 0.5rem !important;
    position: relative;
  }
  .brand-wrapper {
    flex-shrink: 0 !important;
    min-width: 0 !important;
    gap: 0.45rem !important;
  }
  .brand {
    gap: 0.45rem !important;
    min-width: 0 !important;
    flex-shrink: 0 !important;
  }
  .brand-emblem-img {
    width: 32px !important;
    height: 32px !important;
    min-width: 32px !important;
  }
  .brand-text-wrap {
    min-width: 0 !important;
    max-width: 110px !important;
    overflow: hidden !important;
  }
  .brand-wordmark-img {
    height: 18px !important;
    max-width: 100px !important;
    object-fit: contain !important;
  }
  .brand-tagline {
    display: none !important;
  }
  .companion-ecosystem-badge,
  .desktop-only {
    display: none !important;
  }
  .nav-tabs {
    display: none !important;
  }
  .header-search-wrap {
    display: none !important;
  }
  .header-actions {
    display: flex !important;
    align-items: center !important;
    gap: 0.5rem !important;
    flex-shrink: 0 !important;
    overflow: visible !important;
  }
  #header-auth-actions {
    display: flex !important;
    align-items: center !important;
    gap: 0.4rem !important;
    flex-shrink: 0 !important;
    overflow: visible !important;
  }
  #header-auth-actions .btn-primary {
    display: none !important;
  }
  #header-auth-actions .btn-ghost {
    padding: 0.35rem 0.55rem !important;
    font-size: 0.78rem !important;
  }

  /* High Visibility Theme Toggle */
  .theme-toggle-btn {
    width: 36px !important;
    height: 36px !important;
    min-width: 36px !important;
    border-radius: var(--radius-sm) !important;
    background: var(--bg-surface) !important;
    border: 1px solid var(--border-medium) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: var(--text-primary) !important;
    flex-shrink: 0 !important;
    cursor: pointer !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25) !important;
  }

  /* Mobile User Avatar Touch Circle */
  .avatar-dropdown-wrap {
    position: relative !important;
    overflow: visible !important;
  }
  .avatar-dropdown-btn {
    width: 36px !important;
    height: 36px !important;
    min-width: 36px !important;
    padding: 0 !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: var(--bg-surface) !important;
    border: 1.5px solid var(--accent-violet-light) !important;
    box-shadow: 0 0 10px rgba(121, 101, 242, 0.25) !important;
    flex-shrink: 0 !important;
    cursor: pointer !important;
  }
  .avatar-user-name,
  .avatar-expand-icon {
    display: none !important;
  }
  .user-avatar-circle {
    width: 32px !important;
    height: 32px !important;
    font-size: 0.85rem !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: linear-gradient(135deg, #7965F2, #5a45db) !important;
    color: #FFFFFF !important;
    font-weight: 800 !important;
    border-radius: 50% !important;
  }

  /* Mobile Avatar Dropdown Menu: Fixed Floating Card */
  .avatar-dropdown-menu {
    position: fixed !important;
    top: 64px !important;
    right: 12px !important;
    left: auto !important;
    width: 260px !important;
    max-width: calc(100vw - 24px) !important;
    background: var(--bg-surface-elevated) !important;
    border: 1px solid var(--border-medium) !important;
    border-radius: var(--radius-md) !important;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.75), 0 0 0 1px rgba(255, 255, 255, 0.08) !important;
    z-index: 10005 !important;
    padding: 0.65rem !important;
    backdrop-filter: blur(16px) !important;
    -webkit-backdrop-filter: blur(16px) !important;
  }
  .avatar-dropdown-menu.active {
    display: flex !important;
  }

  .mobile-nav-toggle {
    display: flex !important;
    width: 36px !important;
    height: 36px !important;
    min-width: 36px !important;
    border-radius: var(--radius-sm) !important;
    background: var(--bg-surface) !important;
    border: 1px solid var(--border-subtle) !important;
    align-items: center !important;
    justify-content: center !important;
    flex-shrink: 0 !important;
  }

  /* Dashboard Welcome Card & Responsive Buttons */
  .dashboard-hero-card {
    padding: 1.35rem 1.15rem !important;
  }
  .dashboard-hero-card h2 {
    font-size: 1.25rem !important;
    line-height: 1.25 !important;
  }
  .dashboard-hero-btn-group {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    gap: 0.65rem !important;
    margin-top: 1rem !important;
  }
  .dashboard-hero-btn-group .btn-primary,
  .dashboard-hero-btn-group .btn-secondary {
    width: 100% !important;
    justify-content: center !important;
    padding: 0.85rem 1.25rem !important;
    font-size: 0.92rem !important;
    white-space: nowrap !important;
  }

  /* Hero Section */
  .hero-section {
    padding: 2rem 0 2rem !important;
  }
  .hero-grid-2col {
    grid-template-columns: 1fr !important;
    gap: 2rem !important;
  }
  .hero-left {
    gap: 1.15rem !important;
  }
  .hero-title {
    font-size: 2.15rem !important;
    line-height: 1.15 !important;
    word-break: break-word !important;
  }
  .hero-desc {
    font-size: 0.92rem !important;
    max-width: 100% !important;
    line-height: 1.55 !important;
  }
  .hero-cta-group {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 0.65rem !important;
    width: 100% !important;
  }
  .hero-cta-group .btn-primary,
  .hero-cta-group .btn-secondary {
    width: 100% !important;
    justify-content: center !important;
    padding: 0.85rem 1.25rem !important;
  }
  .hero-trust-line {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 0.45rem !important;
    font-size: 0.8rem !important;
  }

  /* Hero Interactive CBT Preview Card */
  .hero-interactive-demo {
    padding: 1.15rem !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    margin: 0 !important;
  }
  .hero-preview-options-grid {
    grid-template-columns: 1fr !important;
    gap: 0.5rem !important;
  }
  .hero-preview-opt {
    padding: 0.65rem 0.75rem !important;
    font-size: 0.82rem !important;
  }

  /* Exam Directory Cards (Landing Page) */
  .exam-cards-grid {
    grid-template-columns: 1fr !important;
    gap: 1.25rem !important;
  }
  .exam-dir-card {
    padding: 1.25rem !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  /* Question Banks Page (ECET & POLYCET) */
  .exam-hero-selector-grid {
    grid-template-columns: 1fr !important;
    gap: 0.75rem !important;
  }
  .state-stream-switcher {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 0.85rem !important;
    padding: 1rem !important;
  }
  .state-stream-switcher .filter-group {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    gap: 0.45rem !important;
  }
  .state-stream-switcher .state-filter-btn {
    width: 100% !important;
    justify-content: center !important;
    text-align: center !important;
    padding: 0.65rem 1rem !important;
  }
  .branch-grid-selector {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 0.65rem !important;
  }
  .exam-controls-bar {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 0.85rem !important;
  }
  .exam-controls-bar .filter-group {
    flex-wrap: wrap !important;
    gap: 0.4rem !important;
  }
  .year-pills-bar {
    display: flex !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    gap: 0.4rem !important;
    padding: 0.25rem 0 0.5rem 0 !important;
    scrollbar-width: none !important;
    -ms-overflow-style: none !important;
    max-width: 100% !important;
  }
  .year-pills-bar::-webkit-scrollbar {
    display: none !important;
  }
  .year-pills-bar .filter-pill {
    flex-shrink: 0 !important;
  }
  .papers-grid {
    grid-template-columns: 1fr !important;
    gap: 1rem !important;
  }
  .exam-card {
    padding: 1.15rem !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }
  .card-meta-chips {
    flex-wrap: wrap !important;
    gap: 0.35rem !important;
  }
  .card-actions {
    flex-direction: column !important;
    gap: 0.5rem !important;
  }
  .card-actions button,
  .card-actions a {
    width: 100% !important;
    justify-content: center !important;
  }

  /* Grids: Features, Steps, Stats, Footer */
  .features-grid-6col {
    grid-template-columns: 1fr !important;
    gap: 1rem !important;
  }
  .steps-4col-grid {
    grid-template-columns: 1fr !important;
    gap: 1rem !important;
  }
  .stats-strip-section {
    padding: 1.75rem 0 !important;
    margin: 1.5rem 0 2rem !important;
  }
  .stats-strip-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 1.25rem !important;
  }
  .stat-strip-num {
    font-size: 1.85rem !important;
  }
  .footer-grid {
    grid-template-columns: 1fr !important;
    gap: 2rem !important;
  }

  /* CBT Workspace & Mobile Palette Drawer */
  .cbt-workspace {
    grid-template-columns: 1fr !important;
  }
  .cbt-palette-toggle-btn {
    display: inline-flex !important;
  }
  .cbt-palette-header.mobile-only {
    display: flex !important;
  }
  .cbt-palette-sidebar {
    position: fixed !important;
    top: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 320px !important;
    max-width: 88vw !important;
    z-index: 2200 !important;
    background: var(--bg-surface) !important;
    border-left: 1px solid var(--border-medium) !important;
    box-shadow: -8px 0 32px rgba(0, 0, 0, 0.75) !important;
    transform: translateX(100%);
    transition: transform 250ms cubic-bezier(0.16, 1, 0.3, 1);
    display: flex !important;
  }
  .cbt-palette-sidebar.mobile-open {
    transform: translateX(0) !important;
  }
  .cbt-palette-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 2150;
    display: none;
  }
  .cbt-palette-backdrop.active {
    display: block !important;
  }
  .results-modal-card {
    padding: 1.5rem 1rem !important;
    border-radius: var(--radius-md) !important;
  }
  .results-stats-grid {
    grid-template-columns: 1fr 1fr !important;
  }

  /* Final CTA */
  .final-cta-banner {
    padding: 2rem 1.25rem !important;
  }
  .final-cta-btns {
    flex-direction: column !important;
    width: 100% !important;
    gap: 0.75rem !important;
  }
  .final-cta-btns button {
    width: 100% !important;
  }

  /* Modals */
  .modal-dialog {
    padding: 1.5rem 1.15rem !important;
    margin: 0.5rem !important;
    max-width: calc(100vw - 1rem) !important;
    border-radius: var(--radius-md) !important;
  }
  .customizer-modal,
  .auth-modal,
  .results-modal-overlay {
    padding: 0.5rem !important;
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: 1.85rem !important;
  }
  .branch-grid-selector {
    grid-template-columns: 1fr !important;
  }
  .stats-strip-grid {
    grid-template-columns: 1fr !important;
    gap: 1rem !important;
  }
  .results-stats-grid {
    grid-template-columns: 1fr !important;
  }

  /* Mobile CBT Examination Controls */
  .cbt-header {
    height: auto !important;
    padding: 0.5rem 0.75rem !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 0.5rem !important;
  }
  .cbt-header-left {
    width: 100% !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    gap: 0.5rem !important;
  }
  .cbt-header-brand img.cbt-wordmark {
    display: none !important;
  }
  #cbt-exam-title {
    font-size: 0.88rem !important;
    max-width: 180px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }
  .cbt-header-right {
    width: 100% !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    gap: 0.4rem !important;
    flex-wrap: nowrap !important;
  }
  .cbt-timer-box {
    padding: 0.25rem 0.5rem !important;
    font-size: 0.88rem !important;
    gap: 0.35rem !important;
  }
  .cbt-header-right button,
  .cbt-header-right a {
    padding: 0.35rem 0.6rem !important;
    font-size: 0.78rem !important;
    white-space: nowrap !important;
  }
  .cbt-palette-toggle-btn {
    display: inline-flex !important;
  }
  .cbt-question-area {
    padding: 0.75rem 0.65rem !important;
    gap: 0.75rem !important;
  }
  .question-card-box {
    padding: 1rem 0.85rem !important;
    gap: 0.85rem !important;
  }
  .q-img-wrap {
    padding: 0.5rem 0.65rem !important;
    max-width: 100% !important;
    display: block !important;
  }
  .q-img-wrap img {
    max-width: 100% !important;
    max-height: 220px !important;
    object-fit: contain !important;
    margin: 0 auto;
  }
  .cbt-actions-bar {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 0.5rem !important;
    padding: 0.85rem 0 0.5rem !important;
  }
  .cbt-actions-bar > div {
    display: contents !important;
  }
  .cbt-actions-bar button {
    width: 100% !important;
    justify-content: center !important;
    padding: 0.65rem 0.4rem !important;
    font-size: 0.8rem !important;
    min-height: 46px !important;
  }
  .option-item {
    padding: 0.65rem 0.75rem !important;
    min-height: 48px !important;
    touch-action: manipulation;
  }
  .option-indicator {
    width: 28px !important;
    height: 28px !important;
    font-size: 0.82rem !important;
    flex-shrink: 0 !important;
  }
  .option-img-wrap {
    padding: 0.3rem 0.45rem !important;
    background: #FFFFFF !important;
    border-radius: 4px !important;
    display: inline-block !important;
  }
  .option-img-wrap img {
    max-height: 60px !important;
    object-fit: contain !important;
  }
  .cbt-sections-bar {
    padding: 0.45rem 0.65rem !important;
    gap: 0.4rem !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .cbt-sections-bar::-webkit-scrollbar {
    display: none;
  }
  .section-chip {
    flex-shrink: 0 !important;
    padding: 0.3rem 0.7rem !important;
    font-size: 0.75rem !important;
  }
}

/* =========================================================================
   Toast Notification System
   ========================================================================= */
.toast-container {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 99999;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  pointer-events: none;
  max-width: 420px;
  width: calc(100% - 3rem);
}

.toast-message {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 1.15rem;
  border-radius: var(--radius-md);
  background: var(--bg-surface);
  border: 1px solid var(--border-medium);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  color: var(--text-primary);
  font-size: 0.88rem;
  font-weight: 500;
  line-height: 1.4;
  backdrop-filter: blur(16px);
  animation: toastSlideIn 0.28s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  transition: opacity 0.2s, transform 0.2s;
}

.toast-message.toast-exit {
  animation: toastSlideOut 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes toastSlideIn {
  from { opacity: 0; transform: translateY(16px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes toastSlideOut {
  from { opacity: 1; transform: translateY(0) scale(1); }
  to { opacity: 0; transform: translateY(12px) scale(0.95); }
}

.toast-message.toast-success {
  border-left: 4px solid var(--status-answered, #4ade80);
}
.toast-message.toast-success .toast-icon {
  color: var(--status-answered, #4ade80);
}

.toast-message.toast-error {
  border-left: 4px solid #FF5A76;
}
.toast-message.toast-error .toast-icon {
  color: #FF5A76;
}

.toast-message.toast-warning {
  border-left: 4px solid var(--accent-amber);
}
.toast-message.toast-warning .toast-icon {
  color: var(--accent-amber);
}

.toast-message.toast-info {
  border-left: 4px solid var(--accent-cyan);
}
.toast-message.toast-info .toast-icon {
  color: var(--accent-cyan);
}

.toast-icon {
  font-size: 20px;
  flex-shrink: 0;
}

.toast-text {
  flex: 1;
}

.toast-close-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.2rem;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s;
}
.toast-close-btn:hover {
  color: var(--text-primary);
}

/* =========================================================================
   PHASE 3: Skeleton Loaders & Micro-Interactions
   ========================================================================= */
@keyframes tf-shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

.tf-skeleton {
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.05) 25%, rgba(255, 255, 255, 0.12) 50%, rgba(255, 255, 255, 0.05) 75%);
  background-size: 200% 100%;
  animation: tf-shimmer 1.5s infinite ease-in-out;
  border-radius: var(--radius-sm);
}

.nav-skeleton-pill {
  width: 80px;
  height: 28px;
  border-radius: var(--radius-sm);
}

/* Ghost Button for Logged-out Navbar */
.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid transparent;
  padding: 0.5rem 0.95rem;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: all var(--tr-fast);
}

.btn-ghost:hover {
  color: var(--text-primary);
  border-color: var(--border-subtle);
  background: rgba(255, 255, 255, 0.04);
}

/* Avatar Dropdown System */
.avatar-dropdown-wrap {
  position: relative;
}

.avatar-dropdown-btn {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  padding: 0.3rem 0.75rem 0.3rem 0.4rem;
  border-radius: 9999px;
  cursor: pointer;
  transition: all var(--tr-fast);
  color: var(--text-primary);
}

.avatar-dropdown-btn:hover {
  border-color: var(--accent-violet-light);
  background: var(--bg-surface-elevated);
}

.avatar-dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 240px;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.55);
  padding: 0.5rem;
  display: none;
  flex-direction: column;
  gap: 0.25rem;
  z-index: 1000;
  animation: dropdownFadeIn 0.18s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.avatar-dropdown-menu.active {
  display: flex;
}

@keyframes dropdownFadeIn {
  from { opacity: 0; transform: translateY(-8px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.dropdown-user-header {
  padding: 0.75rem 0.85rem;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 0.35rem;
}

.dropdown-user-name {
  font-size: 0.9rem;
  font-weight: 800;
  color: var(--text-primary);
}

.dropdown-user-email {
  font-size: 0.76rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  padding: 0.6rem 0.85rem;
  border: none;
  background: none;
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 600;
  text-align: left;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--tr-fast);
  text-decoration: none;
}

.dropdown-item:hover {
  background: rgba(121, 101, 242, 0.12);
  color: var(--accent-violet-light);
}

.dropdown-item .material-symbols-outlined {
  font-size: 19px;
  color: var(--text-muted);
  transition: color var(--tr-fast);
}

.dropdown-item:hover .material-symbols-outlined {
  color: var(--accent-violet-light);
}

.dropdown-divider {
  height: 1px;
  background: var(--border-subtle);
  margin: 0.35rem 0;
}

.dropdown-item.text-danger {
  color: #FF5A76;
}

.dropdown-item.text-danger .material-symbols-outlined {
  color: #FF5A76;
}

.dropdown-item.text-danger:hover {
  background: rgba(255, 90, 118, 0.12);
  color: #FF7088;
}

/* Auth Modal Inline Errors & Prompt Banner */
.auth-inline-error {
  background: rgba(255, 90, 118, 0.12);
  border: 1px solid rgba(255, 90, 118, 0.35);
  color: #FF7088;
  padding: 0.65rem 0.9rem;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 600;
  margin-bottom: 1.15rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  line-height: 1.4;
  animation: inlineErrorShake 0.3s ease;
}

@keyframes inlineErrorShake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-4px); }
  75% { transform: translateX(4px); }
}

.auth-prompt-banner {
  background: linear-gradient(135deg, rgba(121, 101, 242, 0.18), rgba(86, 216, 232, 0.14));
  border: 1px solid rgba(121, 101, 242, 0.4);
  color: var(--text-primary);
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  line-height: 1.4;
}

/* =========================================================================
   PHASE 3: Dashboard View Styles
   ========================================================================= */
.dashboard-wrap {
  padding: 2rem 0 4rem;
}

.dashboard-hero-card {
  background: linear-gradient(135deg, rgba(121, 101, 242, 0.15), rgba(15, 23, 42, 0.85));
  border: 1px solid rgba(121, 101, 242, 0.35);
  border-radius: var(--radius-lg);
  padding: 1.85rem 2rem;
  margin-bottom: 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
  position: relative;
  overflow: hidden;
}

.dashboard-hero-card::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 260px;
  height: 100%;
  background: radial-gradient(circle at top right, rgba(86, 216, 232, 0.12), transparent 70%);
  pointer-events: none;
}

.dashboard-hero-btn-group {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.unfinished-test-banner {
  background: linear-gradient(135deg, rgba(245, 184, 92, 0.15), rgba(15, 23, 42, 0.9));
  border: 1px solid rgba(245, 184, 92, 0.45);
  border-radius: var(--radius-lg);
  padding: 1.5rem 1.85rem;
  margin-bottom: 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.dashboard-quick-actions-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  margin-bottom: 2.25rem;
}

.dash-action-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  cursor: pointer;
  transition: all var(--tr-normal);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  position: relative;
  overflow: hidden;
}

.dash-action-card:hover {
  border-color: var(--accent-violet-light);
  transform: translateY(-3px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35);
}

.dash-action-card .action-icon-wrap {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(121, 101, 242, 0.14);
  color: var(--accent-violet-light);
}

.dash-action-card:nth-child(2) .action-icon-wrap {
  background: rgba(86, 216, 232, 0.14);
  color: var(--accent-cyan);
}

.dash-action-card:nth-child(3) .action-icon-wrap {
  background: rgba(245, 184, 92, 0.14);
  color: var(--accent-amber);
}

.dash-action-card h3 {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text-primary);
  margin: 0;
}

.dash-action-card p {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.45;
  margin: 0;
}

/* Student Preparation Live Metrics Strip */
.dash-prep-strip-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin: 1.25rem 0 1.5rem;
}

@media (max-width: 900px) {
  .dash-prep-strip-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
  }
}

.dash-prep-tile {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1rem 1.15rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.dash-prep-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.dash-prep-value {
  font-size: 1.25rem;
  font-weight: 800;
  font-family: var(--font-mono);
  line-height: 1.2;
}

.dash-prep-hint {
  font-size: 0.74rem;
  color: var(--text-secondary);
}

.dash-sprint-tile {
  transition: all var(--tr-fast);
}

.dash-sprint-tile:hover {
  border-color: var(--accent-violet-light) !important;
  background: var(--bg-surface-hover) !important;
}

.dash-starter-card {
  transition: all var(--tr-fast);
}

.dash-starter-card:hover {
  background: rgba(121, 101, 242, 0.12) !important;
  border-color: var(--accent-violet-light) !important;
}

.dashboard-split-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.dash-panel {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.5rem;
}

.dash-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-subtle);
}

.dash-panel-title {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Weak Subject Item */
.weak-subject-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1rem;
  border-radius: var(--radius-sm);
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  margin-bottom: 0.75rem;
  gap: 1rem;
}

/* Recent Paper Quick Card */
.recent-paper-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1rem;
  border-radius: var(--radius-sm);
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  margin-bottom: 0.75rem;
  gap: 1rem;
  transition: all var(--tr-fast);
}

.recent-paper-card:hover {
  border-color: var(--accent-violet-light);
}

/* Saved Tests Grid */
.saved-tests-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.25rem;
  margin-top: 1.5rem;
}

.saved-test-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1rem;
  transition: all var(--tr-fast);
}

.saved-test-card:hover {
  border-color: var(--border-medium);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

/* Bookmarks List */
.bookmarks-list {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin-top: 1.5rem;
}

.bookmark-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  position: relative;
}

/* Mobile Sticky Sign Up Bar & Bottom Tabs */
.mobile-sticky-signup {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 990;
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--border-medium);
  padding: 0.75rem 1.25rem;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.4);
}

.mobile-bottom-tabs {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 990;
  background: rgba(15, 23, 42, 0.96);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--border-subtle);
  height: calc(60px + env(safe-area-inset-bottom, 0px));
  padding-bottom: env(safe-area-inset-bottom, 0px);
  grid-template-columns: repeat(5, 1fr);
  align-items: center;
  box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.45);
}

.mobile-tab-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.2rem;
  height: 100%;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.68rem;
  font-weight: 700;
  background: none;
  border: none;
  cursor: pointer;
  transition: all var(--tr-fast);
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

.mobile-tab-item .material-symbols-outlined {
  font-size: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  padding: 2px 10px;
  transition: all var(--tr-fast);
}

.mobile-tab-item.active {
  color: var(--accent-violet-light);
}

.mobile-tab-item.active .material-symbols-outlined {
  background: rgba(121, 101, 242, 0.18);
  color: var(--accent-violet-light);
}

.mobile-tab-item.tab-highlight .material-symbols-outlined {
  color: var(--accent-cyan);
  font-size: 24px;
}

/* Mobile Navigation Backdrop & Sliding Drawer */
.mobile-nav-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(4, 19, 45, 0.72);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 9998;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.mobile-nav-backdrop.active {
  opacity: 1;
  visibility: visible;
}

.mobile-nav-drawer {
  position: fixed;
  top: 0;
  bottom: 0;
  right: 0;
  width: 86vw;
  max-width: 340px;
  background: var(--bg-surface-elevated);
  border-left: 1px solid var(--border-medium);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  box-shadow: -10px 0 40px rgba(0, 0, 0, 0.65);
  transform: translateX(100%);
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  overflow-y: auto;
}

.mobile-nav-drawer.active {
  transform: translateX(0);
}

.mobile-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.15rem 1.25rem;
  border-bottom: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  position: sticky;
  top: 0;
  z-index: 2;
}

.drawer-close-btn {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--tr-fast);
}

.drawer-close-btn:hover {
  color: var(--text-primary);
  border-color: var(--border-medium);
}

.mobile-drawer-body {
  padding: 1rem 1.15rem 3rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  flex: 1;
}

.mobile-drawer-link {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.85rem 1rem;
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  cursor: pointer;
  transition: all var(--tr-fast);
}

.mobile-drawer-link:hover,
.mobile-drawer-link.active {
  background: rgba(121, 101, 242, 0.12);
  border-color: var(--accent-violet-light);
  color: var(--accent-violet-light);
}

.mobile-drawer-link .drawer-badge {
  margin-left: auto;
  font-size: 0.68rem;
  padding: 0.15rem 0.5rem;
  border-radius: 9999px;
  font-weight: 700;
}

/* 3-Step Guided Navigation Stepper */
.directory-flow-stepper {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 9999px;
  padding: 0.35rem 0.85rem;
  margin: 0.5rem auto 1.25rem;
  max-width: 500px;
  width: 100%;
}

.flow-step {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-sm);
  transition: all var(--tr-fast);
  white-space: nowrap;
}

.flow-step-num {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-medium);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--text-muted);
  transition: all var(--tr-fast);
}

.flow-step.active {
  color: var(--accent-violet-light);
}

.flow-step.active .flow-step-num {
  background: var(--accent-violet);
  color: #FFFFFF;
  border-color: var(--accent-violet-light);
  box-shadow: 0 0 10px rgba(121, 101, 242, 0.4);
}

.flow-step.completed {
  color: var(--accent-cyan);
}

.flow-step.completed .flow-step-num {
  background: rgba(0, 242, 254, 0.15);
  color: var(--accent-cyan);
  border-color: var(--accent-cyan);
}

.flow-step-divider {
  color: var(--border-medium);
  font-size: 0.8rem;
  user-select: none;
}

/* Branch Card Action Hints & Floating Jump Bar */
.branch-card-action-hint {
  font-size: 0.68rem;
  color: var(--accent-cyan);
  font-weight: 700;
  margin-top: 0.35rem;
  display: flex;
  align-items: center;
  gap: 0.2rem;
}

.ecet-branch-card.active .branch-card-action-hint {
  color: var(--accent-violet-light);
}

.mobile-quick-jump-bar {
  display: none;
}

@media (max-width: 768px) {
  .mobile-quick-jump-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(135deg, rgba(121, 101, 242, 0.15), rgba(0, 242, 254, 0.12));
    border: 1px solid rgba(121, 101, 242, 0.4);
    border-radius: var(--radius-md);
    padding: 0.65rem 0.95rem;
    margin: 0.85rem 0 0.5rem;
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--text-primary);
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
  }
}

@media (max-width: 768px) {
  body.has-bottom-bar main.container {
    padding-bottom: calc(84px + env(safe-area-inset-bottom, 0px)) !important;
  }
  .dashboard-quick-actions-grid {
    grid-template-columns: 1fr !important;
    gap: 0.75rem !important;
  }
  .dash-action-card {
    display: grid !important;
    grid-template-columns: 44px 1fr 24px !important;
    grid-template-rows: auto auto !important;
    column-gap: 1rem !important;
    row-gap: 0.2rem !important;
    align-items: center !important;
    padding: 0.95rem 1.15rem !important;
  }
  .dash-action-card .action-icon-wrap {
    grid-column: 1 !important;
    grid-row: 1 / span 2 !important;
    width: 44px !important;
    height: 44px !important;
    min-width: 44px !important;
    flex-shrink: 0 !important;
  }
  .dash-action-card h3 {
    grid-column: 2 !important;
    grid-row: 1 !important;
    font-size: 0.98rem !important;
    margin: 0 !important;
    color: var(--text-primary) !important;
  }
  .dash-action-card p {
    grid-column: 2 !important;
    grid-row: 2 !important;
    font-size: 0.78rem !important;
    line-height: 1.35 !important;
    margin: 0 !important;
    color: var(--text-secondary) !important;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  .dash-action-card::after {
    grid-column: 3 !important;
    grid-row: 1 / span 2 !important;
    content: "chevron_right";
    font-family: 'Material Symbols Outlined';
    font-size: 22px;
    color: var(--text-muted);
    justify-self: end;
  }
  .dashboard-split-grid {
    grid-template-columns: 1fr !important;
  }
  body.is-logged-in .mobile-bottom-tabs {
    display: grid !important;
  }
  body.is-logged-in .mobile-nav-toggle {
    display: none !important;
  }
  body.is-logged-out .mobile-sticky-signup {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding-bottom: calc(0.75rem + env(safe-area-inset-bottom, 0px)) !important;
  }
  input, select, textarea {
    font-size: 16px !important;
  }
}

/* ==========================================================================
   PHASE 4: Landing Page & Legal Views (Privacy, Terms, Stats, Interactive Demo)
   ========================================================================== */
.hero-exam-chips {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin-top: 0.25rem;
}

.hero-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.95rem;
  border-radius: var(--radius-pill);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--accent-violet-light);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  cursor: pointer;
  transition: all var(--tr-fast);
  text-decoration: none;
}

.hero-chip:hover {
  border-color: var(--accent-violet-light);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(121, 101, 242, 0.25);
}

.hero-chip:nth-child(2) {
  color: var(--accent-cyan);
}

.hero-chip:nth-child(2):hover {
  border-color: var(--accent-cyan);
  box-shadow: 0 4px 12px rgba(86, 216, 232, 0.25);
}

.hero-chip:nth-child(3) {
  color: var(--accent-amber);
}

.hero-chip:nth-child(3):hover {
  border-color: var(--accent-amber);
  box-shadow: 0 4px 12px rgba(245, 184, 92, 0.25);
}

.hero-nobrowse-note {
  font-size: 0.82rem;
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin-top: 0.35rem;
}

/* Interactive Demo Card */
.hero-preview-opt.interactive {
  cursor: pointer;
  user-select: none;
  transition: all var(--tr-fast);
}

.hero-preview-opt.interactive:hover {
  border-color: var(--accent-violet-light);
  background: var(--bg-surface-elevated);
  transform: translateY(-1px);
}

.hero-preview-opt.correct {
  background: rgba(74, 222, 128, 0.15) !important;
  border-color: #4ade80 !important;
  color: #4ade80 !important;
}

.hero-preview-opt.correct .hero-preview-opt-circle {
  background: #4ade80 !important;
  color: #04132d !important;
  border-color: #4ade80 !important;
}

.hero-preview-opt.incorrect {
  background: rgba(255, 90, 118, 0.15) !important;
  border-color: #FF5A76 !important;
  color: #FF5A76 !important;
}

.hero-preview-opt.incorrect .hero-preview-opt-circle {
  background: #FF5A76 !important;
  color: #FFFFFF !important;
  border-color: #FF5A76 !important;
}

.demo-explanation-box {
  display: none;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 0.85rem 1rem;
  margin-top: 0.25rem;
  animation: fadeIn 200ms ease forwards;
}

.demo-explanation-box.active {
  display: block;
}

/* Stats Strip */
.stats-strip-section {
  padding: 2.75rem 0;
  margin: 1.5rem 0 3.5rem;
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  border-radius: var(--radius-md);
}

.stats-strip-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  text-align: center;
}

.stat-strip-num {
  font-size: 2.35rem;
  font-weight: 800;
  line-height: 1.1;
  color: var(--text-primary);
  font-family: var(--font-mono);
  background: var(--grad-hero-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.stat-strip-label {
  font-size: 0.82rem;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 0.35rem;
}

/* 4-Step How It Works Grid */
.steps-4col-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  margin-top: 2rem;
}

/* Legal & Compliance Views (Privacy & Terms) */
.legal-page-wrap {
  max-width: 860px;
  margin: 0 auto;
  padding: 2.5rem 0 5rem;
}

.legal-header {
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 1.5rem;
  margin-bottom: 2rem;
}

.legal-header h1 {
  font-size: 2.4rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  margin-top: 0.5rem;
}

.legal-header p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-top: 0.35rem;
}

.legal-card-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  margin-bottom: 2rem;
}

.legal-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.legal-table-box {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  margin-bottom: 2rem;
  overflow-x: auto;
}

.legal-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
  text-align: left;
}

.legal-table th {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border-medium);
  color: var(--text-muted);
  text-transform: uppercase;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.05em;
}

.legal-table td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-secondary);
}

.legal-table tr:last-child td {
  border-bottom: none;
}

@media (max-width: 900px) {
  .steps-4col-grid {
    grid-template-columns: 1fr 1fr;
  }
  .stats-strip-grid {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }
  .legal-card-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .steps-4col-grid {
    grid-template-columns: 1fr;
  }
  .stats-strip-grid {
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
  }
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.tf-spinner {
  display: inline-block;
  animation: spin 0.9s linear infinite;
}

/* =========================================================================
   3-Exam Hero Selector Cards (Question Banks Directory)
   ========================================================================= */
.exam-hero-selector-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.15rem;
  margin: 1.25rem 0 2rem 0;
}

@media (max-width: 900px) {
  .exam-hero-selector-grid {
    grid-template-columns: 1fr;
    gap: 0.85rem;
  }
}

.exam-hero-select-card {
  position: relative;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.35rem;
  cursor: pointer;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  user-select: none;
}

.exam-hero-select-card:hover {
  transform: translateY(-2px);
  background: var(--bg-surface-elevated);
  box-shadow: 0 10px 24px -6px rgba(0, 0, 0, 0.35);
}

.exam-hero-select-card.active {
  border-color: var(--accent-violet-light);
  background: linear-gradient(145deg, rgba(121, 101, 242, 0.12) 0%, rgba(20, 24, 38, 0.95) 100%);
  box-shadow: 0 0 0 2px rgba(121, 101, 242, 0.35), 0 12px 30px -8px rgba(121, 101, 242, 0.25);
}

.exam-hero-select-card.active.polycet-card {
  border-color: var(--accent-cyan);
  background: linear-gradient(145deg, rgba(0, 242, 254, 0.12) 0%, rgba(20, 24, 38, 0.95) 100%);
  box-shadow: 0 0 0 2px rgba(0, 242, 254, 0.35), 0 12px 30px -8px rgba(0, 242, 254, 0.25);
}

.exam-hero-select-card.active.eapcet-card {
  border-color: var(--accent-amber);
  background: linear-gradient(145deg, rgba(245, 158, 11, 0.12) 0%, rgba(20, 24, 38, 0.95) 100%);
  box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.35), 0 12px 30px -8px rgba(245, 158, 11, 0.25);
}

/* =========================================================================
   PHASE 7: STUDENT PERSONALIZATION, STREAK & ANALYTICS STYLES
   ========================================================================= */

/* Top Navbar Streak Indicator */
.streak-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  user-select: none;
  transition: all 0.2s ease;
  line-height: 1;
}

.streak-pill-guest {
  background: rgba(245, 184, 92, 0.1);
  border: 1px solid rgba(245, 184, 92, 0.25);
  color: var(--text-muted);
}

.streak-pill-guest:hover {
  background: rgba(245, 184, 92, 0.18);
  border-color: var(--accent-amber);
  color: var(--accent-amber);
}

.streak-pill-active {
  background: linear-gradient(135deg, rgba(245, 184, 92, 0.2) 0%, rgba(255, 90, 118, 0.15) 100%);
  border: 1px solid rgba(245, 184, 92, 0.4);
  color: var(--accent-amber);
  box-shadow: 0 0 12px rgba(245, 184, 92, 0.15);
}

.streak-pill-active:hover {
  transform: translateY(-1px);
  border-color: var(--accent-amber);
  box-shadow: 0 0 16px rgba(245, 184, 92, 0.3);
}

.streak-flame {
  font-size: 1rem;
  display: inline-block;
  animation: streakFlameFlicker 2s infinite ease-in-out;
}

@keyframes streakFlameFlicker {
  0%, 100% { transform: scale(1) rotate(0deg); }
  25% { transform: scale(1.1) rotate(-3deg); }
  50% { transform: scale(0.95) rotate(2deg); }
  75% { transform: scale(1.08) rotate(-1deg); }
}

.streak-label {
  font-size: 0.72rem;
  font-weight: 600;
  opacity: 0.85;
}

/* Profile Streak & Habit Card */
.profile-streak-card {
  background: linear-gradient(145deg, rgba(20, 24, 38, 0.95) 0%, rgba(30, 20, 45, 0.9) 100%);
  border: 1px solid rgba(245, 184, 92, 0.3);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  box-shadow: 0 8px 30px -10px rgba(245, 184, 92, 0.15);
}

.streak-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.streak-flame-circle {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(245, 184, 92, 0.25) 0%, rgba(255, 90, 118, 0.25) 100%);
  border: 1px solid rgba(245, 184, 92, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 20px rgba(245, 184, 92, 0.25);
}

.streak-flame-icon {
  font-size: 1.85rem;
  animation: streakFlameFlicker 2s infinite ease-in-out;
}

/* 7-Day Activity Matrix Row */
.streak-week-row {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.75rem;
}

.streak-day-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0.75rem 0.4rem;
  border-radius: var(--radius-sm);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  transition: all 0.2s ease;
  user-select: none;
}

.streak-day-name {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: 0.25rem;
}

.streak-day-num {
  font-family: var(--font-mono);
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.4rem;
}

.streak-day-dot {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 800;
}

.streak-day-completed {
  background: rgba(74, 222, 128, 0.12);
  border-color: rgba(74, 222, 128, 0.4);
}

.streak-day-completed .streak-day-dot {
  background: #4ade80;
  color: #0b1e13;
  box-shadow: 0 0 10px rgba(74, 222, 128, 0.4);
}

.streak-day-today {
  border-color: var(--accent-amber);
  background: rgba(245, 184, 92, 0.1);
}

.streak-day-today .streak-day-dot {
  background: var(--accent-amber);
  color: #1a1202;
  box-shadow: 0 0 10px rgba(245, 184, 92, 0.4);
}

.streak-day-missed .streak-day-dot {
  background: var(--bg-input);
  color: var(--text-muted);
}

.streak-day-upcoming {
  opacity: 0.45;
}

.streak-day-upcoming .streak-day-dot {
  background: transparent;
  border: 1px dashed var(--border-subtle);
  color: transparent;
}

/* Subject Mastery Progress Card */
.subject-mastery-card {
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.subject-mastery-card:hover {
  transform: translateY(-2px);
  border-color: var(--accent-violet-light);
}

/* Guest Conversion Card */
.guest-conversion-card {
  background: linear-gradient(135deg, rgba(121, 101, 242, 0.2) 0%, rgba(20, 24, 38, 0.95) 100%);
  border: 1px solid var(--accent-violet-light);
  border-radius: var(--radius-md);
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}




