@import "./components/background.css?v=20261111f";
    /* ==========================================================================
       DESIGN SYSTEM & THEME TOKENS
       ========================================================================== */
    :root {
      --bg-dark: #070b14;
      --bg-surface: #0e1626;
      --bg-card: rgba(17, 27, 46, 0.78);
      --bg-card-hover: rgba(26, 40, 68, 0.9);
      --bg-glass: rgba(14, 22, 38, 0.7);
      --border-color: rgba(255, 255, 255, 0.08);
      --border-focus: rgba(14, 165, 233, 0.6);

      --text-main: #f8fafc;
      --text-muted: #94a3b8;
      --text-dim: #64748b;
      --info-link: #7dd3fc;

      /* Vibrant Accents */
      --cyan: #0ea5e9;
      --cyan-glow: rgba(14, 165, 233, 0.3);
      --purple: #8b5cf6;
      --purple-glow: rgba(139, 92, 246, 0.3);
      --emerald: #10b981;
      --emerald-glow: rgba(16, 185, 129, 0.3);
      --amber: #f59e0b;
      --rose: #f43f5e;
      --rose-glow: rgba(244, 63, 94, 0.3);

      /* NTA NEET Status Palette */
      --status-unvisited: #475569;
      --status-notanswered: #ea580c;
      --status-answered: #10b981;
      --status-marked: #8b5cf6;
      --status-marked-answered: #0284c7;

      --font-display: 'Outfit', sans-serif;
      --font-body: 'Inter', sans-serif;
      --radius-sm: 8px;
      --radius-md: 14px;
      --radius-lg: 20px;
      --shadow-subtle: 0 4px 20px -2px rgba(0, 0, 0, 0.4);
      --shadow-glow: 0 0 25px rgba(14, 165, 233, 0.2);
      --transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
    }

    /* Complete High-Contrast Light Theme Overrides */
    [data-theme="light"] {
      --bg-dark: #f1f5f9;
      --bg-surface: #ffffff;
      --bg-card: #ffffff;
      --bg-card-hover: #e2e8f0;
      --bg-glass: rgba(255, 255, 255, 0.98);
      --border-color: rgba(15, 23, 42, 0.18);
      --border-focus: rgba(14, 165, 233, 0.8);

      --text-main: #090d16;
      --text-muted: #1e293b;
      --text-dim: #334155;
      --info-link: #075985;

      --shadow-subtle: 0 4px 20px -2px rgba(0, 0, 0, 0.08);
      --shadow-glow: 0 0 25px rgba(14, 165, 233, 0.18);
    }

    [data-theme="light"] body {
      background-color: #f7faff;
      color: #090d16;
    }

    [data-theme="light"] body::before {
      background: radial-gradient(circle, rgba(14, 165, 233, 0.08) 0%, transparent 70%);
    }

    /* Top App Header & Navbar in Light Mode */
    [data-theme="light"] header {
      background: rgba(255, 255, 255, 0.98) !important;
      border-bottom: 1px solid rgba(15, 23, 42, 0.18) !important;
      box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    }

    [data-theme="light"] .brand-text h1 {
      color: #090d16 !important;
    }

    [data-theme="light"] .brand-sub {
      color: #1e293b !important;
      font-weight: 700;
    }

    [data-theme="light"] .portal-nav-tabs {
      background: #e2e8f0;
      border-color: rgba(15, 23, 42, 0.2);
    }

    [data-theme="light"] .nav-tab-btn {
      color: #1e293b;
      font-weight: 800;
    }

    [data-theme="light"] .nav-tab-btn:hover {
      color: #0284c7;
      background: rgba(255, 255, 255, 0.7);
    }

    [data-theme="light"] .nav-tab-btn.active {
      background: linear-gradient(135deg, #0ea5e9, #0284c7);
      color: #ffffff !important;
      box-shadow: 0 2px 10px rgba(14, 165, 233, 0.4);
    }

    [data-theme="light"] .hub-header h2 {
      color: #090d16;
      font-weight: 800;
    }

    [data-theme="light"] .hub-header p {
      color: #1e293b;
      font-weight: 500;
    }

    [data-theme="light"] h1,
    [data-theme="light"] h2,
    [data-theme="light"] h3,
    [data-theme="light"] h4,
    [data-theme="light"] h5 {
      color: #090d16 !important;
    }

    /* Right-Side Exam Sidebar & Question Palette (Light Mode) */
    [data-theme="light"] .exam-sidebar {
      background: #ffffff !important;
      border-left: 1px solid rgba(15, 23, 42, 0.14) !important;
      box-shadow: -6px 0 25px rgba(0, 0, 0, 0.05) !important;
    }

    [data-theme="light"] .sidebar-heading {
      color: #0f172a !important;
      font-weight: 800;
      letter-spacing: 0.3px;
    }

    /* Subject Filter Pills on Right-Side Sidebar in Light Mode */
    [data-theme="light"] .subj-pill-btn {
      background: #f1f5f9 !important;
      border: 1.5px solid rgba(15, 23, 42, 0.14) !important;
      color: #334155 !important;
      font-weight: 800 !important;
      border-radius: 9px !important;
    }
    [data-theme="light"] .subj-pill-btn i {
      color: #0284c7 !important;
    }
    [data-theme="light"] .subj-pill-btn:hover {
      background: #e2e8f0 !important;
      border-color: #0ea5e9 !important;
      color: #090d16 !important;
    }
    [data-theme="light"] .subj-pill-btn.active {
      background: linear-gradient(135deg, #0ea5e9, #0284c7) !important;
      border-color: #0284c7 !important;
      color: #ffffff !important;
      box-shadow: 0 4px 14px rgba(14, 165, 233, 0.35) !important;
    }
    [data-theme="light"] .subj-pill-btn.active i {
      color: #ffffff !important;
    }

    /* Palette Count Indicator in Light Mode */
    [data-theme="light"] .palette-count {
      background: rgba(14, 165, 233, 0.12) !important;
      color: #0284c7 !important;
      border: 1px solid rgba(14, 165, 233, 0.3) !important;
      font-weight: 800 !important;
    }

    /* Tactile Question Tiles in Light Mode */
    [data-theme="light"] .q-tile {
      background: #f8fafc !important;
      border: 1.5px solid #cbd5e1 !important;
      color: #334155 !important;
      font-weight: 800 !important;
      border-radius: 8px !important;
      box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04) !important;
    }
    [data-theme="light"] .q-tile:hover {
      background: #e2e8f0 !important;
      border-color: #0ea5e9 !important;
      color: #090d16 !important;
    }
    [data-theme="light"] .q-tile.current {
      outline: 3px solid #0284c7 !important;
      outline-offset: 2px !important;
      border-color: #0284c7 !important;
      background: rgba(14, 165, 233, 0.15) !important;
      color: #0284c7 !important;
    }
    [data-theme="light"] .q-tile.answered {
      background: #10b981 !important;
      border-color: #059669 !important;
      color: #ffffff !important;
      box-shadow: 0 2px 8px rgba(16, 185, 129, 0.35) !important;
    }
    [data-theme="light"] .q-tile.not-answered {
      background: #ea580c !important;
      border-color: #c2410c !important;
      color: #ffffff !important;
      box-shadow: 0 2px 8px rgba(234, 88, 12, 0.35) !important;
    }
    [data-theme="light"] .q-tile.marked {
      background: #8b5cf6 !important;
      border-color: #7c3aed !important;
      color: #ffffff !important;
      box-shadow: 0 2px 8px rgba(139, 92, 246, 0.35) !important;
    }

    /* Palette Legend Box in Light Mode */
    [data-theme="light"] .legend-box {
      background: #f8fafc !important;
      border: 1px solid rgba(15, 23, 42, 0.12) !important;
      border-radius: 10px !important;
      padding: 0.65rem !important;
    }
    [data-theme="light"] .legend-item {
      color: #1e293b !important;
      font-weight: 700 !important;
    }
    [data-theme="light"] .legend-item:first-child .legend-indicator {
      background: #e2e8f0 !important;
      border: 1.5px solid #94a3b8 !important;
    }

    [data-theme="light"] .mode-title {
      color: #090d16 !important;
      font-weight: 800;
    }

    [data-theme="light"] .mode-desc {
      color: #334155 !important;
    }

    [data-theme="light"] .mode-meta {
      color: #1e293b !important;
      font-weight: 700;
    }

    /* Mock Test Question Card & HUD Bar */
    [data-theme="light"] .q-hud-bar {
      background: rgba(255, 255, 255, 0.98);
      border-bottom: 1px solid rgba(15, 23, 42, 0.16);
    }

    [data-theme="light"] .q-num-label {
      color: #090d16;
      font-weight: 800;
    }

    [data-theme="light"] .badge-marks {
      background: #e2e8f0;
      border-color: rgba(15, 23, 42, 0.2);
      color: #0f172a;
    }

    [data-theme="light"] .q-statement-card {
      background: #ffffff;
      border: 1px solid rgba(15, 23, 42, 0.18);
      border-left: 4px solid #0ea5e9;
      box-shadow: 0 4px 18px rgba(0, 0, 0, 0.05);
    }

    [data-theme="light"] .q-text-body {
      color: #090d16;
      font-weight: 600;
    }

    [data-theme="light"] .q-text-body th,
    [data-theme="light"] .q-text-body td {
      border-color: rgba(15, 23, 42, 0.18);
      background: #f8fafc;
      color: #090d16;
    }

    [data-theme="light"] .q-text-body th {
      background: rgba(14, 165, 233, 0.14);
      color: #0369a1;
      font-weight: 800;
    }

    /* Option Cards */
    [data-theme="light"] .opt-card {
      background: #ffffff;
      border: 1px solid rgba(15, 23, 42, 0.18);
      color: #090d16;
      font-weight: 600;
      box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
    }

    [data-theme="light"] .opt-card:hover {
      background: #f1f5f9;
      border-color: #0ea5e9;
    }

    [data-theme="light"] .opt-card.selected {
      background: rgba(14, 165, 233, 0.14);
      border-color: #0ea5e9;
      color: #0369a1;
      font-weight: 800;
    }

    [data-theme="light"] .opt-card.correct {
      background: rgba(16, 185, 129, 0.15);
      border-color: #10b981;
      color: #065f46;
      font-weight: 800;
    }

    [data-theme="light"] .opt-card.wrong {
      background: rgba(244, 63, 94, 0.15);
      border-color: #f43f5e;
      color: #9f1239;
      font-weight: 800;
    }

    [data-theme="light"] .opt-index-badge {
      background: #e2e8f0;
      color: #0f172a;
      font-weight: 800;
    }

    /* Solution Box in Light Mode */
    [data-theme="light"] .enhanced-solution-box {
      background: #ffffff;
      border: 1px solid rgba(15, 23, 42, 0.18);
      box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
    }

    [data-theme="light"] .sol-answer-banner {
      background: rgba(16, 185, 129, 0.14);
      border-bottom: 1px solid rgba(16, 185, 129, 0.25);
    }

    [data-theme="light"] .sol-ans-title {
      color: #065f46;
      font-weight: 800;
    }

    [data-theme="light"] .sol-steps-body {
      color: #090d16;
    }

    [data-theme="light"] .form-label {
      color: #090d16 !important;
      font-weight: 700;
    }

    [data-theme="light"] .form-input,
    [data-theme="light"] .form-select {
      background: #ffffff;
      border-color: rgba(15, 23, 42, 0.25);
      color: #090d16;
    }

    [data-theme="light"] .sol-section-title {
      color: #0284c7;
      font-weight: 800;
    }

    [data-theme="light"] .sol-content-text {
      color: #0f172a;
      font-weight: 500;
    }

    [data-theme="light"] .sol-takeaway-box {
      background: #f1f5f9;
      border: 1px solid rgba(15, 23, 42, 0.1);
      color: #0f172a;
    }

    [data-theme="light"] .sol-takeaway-header {
      color: #0284c7;
    }

    /* Duplicate light-mode q-tile block cleaned & unified in master palette styles */

    /* Formula Cards & View Modes */
    [data-theme="light"] .formula-card {
      background: #ffffff;
      border: 1px solid rgba(15, 23, 42, 0.15);
      box-shadow: 0 6px 20px rgba(0, 0, 0, 0.06);
    }

    [data-theme="light"] .formula-title {
      color: #0f172a;
    }

    [data-theme="light"] .formula-eq-box {
      background: #f1f5f9;
      border: 1px solid rgba(15, 23, 42, 0.12);
      color: #0f172a;
    }

    [data-theme="light"] .formula-note {
      background: #f8fafc;
      color: #0f172a;
      border-left-color: #0284c7;
      border: 1px solid rgba(15, 23, 42, 0.1);
      border-left-width: 4px;
    }

    [data-theme="light"] .formula-note strong {
      color: #000000;
      font-weight: 800;
    }

    /* High-Contrast Light Mode Buttons Overrides */
    [data-theme="light"] .btn-glass {
      background: #ffffff !important;
      border: 1px solid rgba(15, 23, 42, 0.2) !important;
      color: #0f172a !important;
      box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04) !important;
      font-weight: 700 !important;
    }

    [data-theme="light"] .btn-glass:hover {
      background: #f1f5f9 !important;
      border-color: #0ea5e9 !important;
      color: #0284c7 !important;
    }

    [data-theme="light"] #themeToggleBtn {
      background: #ffffff !important;
      border: 1px solid rgba(15, 23, 42, 0.2) !important;
      color: #0f172a !important;
      box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04) !important;
    }

    [data-theme="light"] #themeToggleBtn:hover {
      background: #f1f5f9 !important;
      border-color: #0ea5e9 !important;
      color: #0284c7 !important;
    }

    [data-theme="light"] .view-toggle-btn {
      background: #ffffff;
      border: 1px solid rgba(15, 23, 42, 0.16);
      color: #334155;
    }

    [data-theme="light"] .view-toggle-btn:hover {
      background: #f1f5f9;
      color: #0f172a;
    }

    [data-theme="light"] .view-toggle-btn.active {
      background: #0ea5e9 !important;
      color: #ffffff !important;
      border-color: #0ea5e9 !important;
      box-shadow: 0 2px 10px rgba(14, 165, 233, 0.35) !important;
    }

    [data-theme="light"] #btnPrevFlashcard,
    [data-theme="light"] #btnNextFlashcard {
      background: #ffffff !important;
      border: 1px solid rgba(15, 23, 42, 0.2) !important;
      color: #0f172a !important;
      font-weight: 800 !important;
    }

    [data-theme="light"] #btnPrevFlashcard:hover,
    [data-theme="light"] #btnNextFlashcard:hover {
      background: #f1f5f9 !important;
      border-color: #0ea5e9 !important;
      color: #0284c7 !important;
    }

    [data-theme="light"] #btnToggleFlashcardNote {
      background: rgba(14, 165, 233, 0.12) !important;
      border: 1px solid rgba(14, 165, 233, 0.3) !important;
      color: #0284c7 !important;
      font-weight: 800 !important;
    }

    [data-theme="light"] .chip-btn.formula-chip,
    [data-theme="light"] .chip-btn.syllabus-chip {
      background: #ffffff;
      border-color: rgba(15, 23, 42, 0.18);
      color: #334155;
    }

    [data-theme="light"] .chip-btn.formula-chip:hover,
    [data-theme="light"] .chip-btn.syllabus-chip:hover {
      background: #f1f5f9;
      color: #0f172a;
    }

    [data-theme="light"] .chip-btn.formula-chip.active,
    [data-theme="light"] .chip-btn.syllabus-chip.active {
      background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);
      color: #ffffff;
    }

    [data-theme="light"] .flashcard-card {
      background: #ffffff !important;
      border-color: rgba(15, 23, 42, 0.18) !important;
      box-shadow: 0 12px 35px rgba(0, 0, 0, 0.08) !important;
    }

    [data-theme="light"] #flashcardTitle {
      color: #0f172a !important;
    }

    [data-theme="light"] #flashcardCounter {
      color: #0284c7 !important;
    }

    [data-theme="light"] #flashcardEqBox {
      background: #f8fafc !important;
      color: #0f172a !important;
      border-color: rgba(15, 23, 42, 0.12) !important;
    }

    [data-theme="light"] #flashcardNoteBox {
      background: #f1f5f9 !important;
      color: #0f172a !important;
      border-left-color: #0284c7 !important;
    }

    /* College Predictor & Inputs */
    [data-theme="light"] .predictor-card {
      background: #ffffff;
      border: 1px solid rgba(15, 23, 42, 0.14);
      box-shadow: 0 6px 22px rgba(0, 0, 0, 0.05);
    }

    [data-theme="light"] .predictor-card h3,
    [data-theme="light"] .predictor-card h4 {
      color: #0f172a !important;
    }

    [data-theme="light"] .predicted-rank-box {
      background: rgba(14, 165, 233, 0.08);
      border: 1px solid rgba(14, 165, 233, 0.25);
    }

    [data-theme="light"] .predicted-air-val {
      color: #0284c7;
    }

    [data-theme="light"] .form-input,
    [data-theme="light"] .form-select {
      background: #ffffff;
      color: #0f172a;
      border-color: rgba(15, 23, 42, 0.2);
    }

    [data-theme="light"] .college-card-item {
      background: #f8fafc;
      border-color: rgba(15, 23, 42, 0.12);
    }

    [data-theme="light"] .college-name {
      color: #0f172a;
    }

    [data-theme="light"] .college-quota {
      color: #475569;
    }

    /* Weightage & Syllabus Tracker */
    [data-theme="light"] .chapters-table-card {
      background: #ffffff;
      border-color: rgba(15, 23, 42, 0.14);
    }

    [data-theme="light"] .weightage-table th,
    [data-theme="light"] .weightage-table td {
      color: #0f172a;
      border-bottom-color: rgba(15, 23, 42, 0.08);
    }

    [data-theme="light"] .weightage-table th {
      color: #334155;
      background: #f1f5f9;
    }

    /* FAQ Accordions */
    [data-theme="light"] .faq-item {
      background: #ffffff;
      border-color: rgba(15, 23, 42, 0.14);
    }

    [data-theme="light"] .faq-question {
      color: #0f172a;
    }

    [data-theme="light"] .faq-answer {
      color: #334155;
      border-top-color: rgba(15, 23, 42, 0.08);
    }

    /* Modals & Scorecard Reports */
    [data-theme="light"] .modal-window {
      background: #ffffff;
      border-color: rgba(15, 23, 42, 0.16);
      color: #0f172a;
      box-shadow: 0 25px 70px rgba(0, 0, 0, 0.2);
    }

    [data-theme="light"] .modal-backdrop-wrap {
      background: var(--bg-card); !important;
      backdrop-filter: blur(12px) !important;
    }

    [data-theme="light"] .modal-surface-card {
      background: #ffffff !important;
      border: 1px solid rgba(15, 23, 42, 0.16) !important;
      box-shadow: 0 25px 70px rgba(0, 0, 0, 0.25) !important;
    }

    [data-theme="light"] .modal-surface-card h3 {
      color: #090d16 !important;
    }

    [data-theme="light"] .modal-surface-card p {
      color: #475569 !important;
    }

    /* Paywall light mode overrides */
    [data-theme="light"] .paywall-slide-column {
      background: #f8fafc !important;
      border-color: rgba(15, 23, 42, 0.08) !important;
    }

    [data-theme="light"] .paywall-social-proof-bar {
      background: rgba(16, 185, 129, 0.05) !important;
      border-color: rgba(16, 185, 129, 0.15) !important;
    }

    [data-theme="light"] .proof-guided {
      color: #065f46 !important;
    }

    [data-theme="light"] .proof-covered {
      color: #1e40af !important;
    }

    [data-theme="light"] .proof-covered i {
      color: #d97706 !important;
    }

    [data-theme="light"] .proof-satisfaction {
      color: #b45309 !important;
    }

    [data-theme="light"] .proof-commitment {
      color: #991b1b !important;
    }

    [data-theme="light"] .paywall-services-header {
      background: rgba(14, 165, 233, 0.04) !important;
      border-color: rgba(14, 165, 233, 0.15) !important;
    }

    [data-theme="light"] .paywall-services-header .services-title {
      color: #0284c7 !important;
    }

    [data-theme="light"] .paywall-services-header .services-desc {
      color: #334155 !important;
    }

    [data-theme="light"] .ppt-slide-title {
      color: #0f172a !important;
    }

    [data-theme="light"] .ppt-slide-desc {
      color: #475569 !important;
    }

    [data-theme="light"] .ppt-slide-desc i.fa-circle-check {
      color: #0284c7 !important;
    }

    [data-theme="light"] .ppt-controls {
      border-color: rgba(15, 23, 42, 0.06) !important;
    }

    [data-theme="light"] .ppt-nav-btn {
      background: var(--bg-card); !important;
      border-color: rgba(15, 23, 42, 0.08) !important;
      color: #475569 !important;
    }

    [data-theme="light"] .ppt-nav-btn:hover {
      background: var(--bg-card); !important;
      color: #0f172a !important;
    }

    [data-theme="light"] .ppt-dot {
      background: var(--bg-card); !important;
    }

    [data-theme="light"] .ppt-dot.active {
      background: var(--cyan) !important;
      box-shadow: 0 0 10px rgba(14, 165, 233, 0.3) !important;
    }

    [data-theme="light"] .paywall-tip-box {
      background: rgba(217, 119, 6, 0.05) !important;
      border-color: rgba(217, 119, 6, 0.2) !important;
    }

    [data-theme="light"] .paywall-tip-box p {
      color: #78350f !important;
    }

    /* Mobile-specific Paywall Modal optimizations */
    @media (max-width: 767px) {
      .paywall-layout-wrap {
        gap: 1.25rem !important;
      }

      .paywall-plans-column {
        order: 1 !important;
        /* Pricing card at the top */
        margin-bottom: 0.5rem;
      }

      .paywall-slide-column {
        order: 2 !important;
        /* Slides/pitch below pricing */
        min-height: 310px !important;
        /* Compact */
        padding: 1.1rem !important;
      }

      .paywall-social-proof-bar {
        gap: 0.75rem !important;
        padding: 0.5rem 0.75rem !important;
      }

      .paywall-social-proof-bar span {
        font-size: 0.74rem !important;
      }

      .modal-surface-card {
        padding: 1.5rem 1rem 1rem !important;
        margin: 0.5rem;
      }

      #paywallModalBackdrop h3 {
        font-size: 1.3rem !important;
      }

      #paywallModalBackdrop p#paywallReasonText {
        font-size: 0.8rem !important;
        margin-bottom: 0.75rem !important;
      }
    }

    [data-theme="light"] #paywallPlansContainer h4 {
      color: #ffffff !important;
    }

    [data-theme="light"] .modal-surface-card label {
      color: #334155 !important;
    }

    [data-theme="light"] .modal-surface-card .form-input {
      background: #f8fafc !important;
      border-color: rgba(15, 23, 42, 0.2) !important;
      color: #090d16 !important;
    }

    [data-theme="light"] .modal-surface-card .form-input:focus {
      background: #ffffff !important;
      border-color: #0ea5e9 !important;
      box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.25) !important;
    }

    [data-theme="light"] .modal-surface-card .form-input::placeholder {
      color: #94a3b8 !important;
    }

    [data-theme="light"] #btnGoogleAuthRegister {
      background: #f8fafc !important;
      border: 1px solid rgba(15, 23, 42, 0.18) !important;
      color: #090d16 !important;
      box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05) !important;
    }

    [data-theme="light"] #btnGoogleAuthRegister:hover {
      background: #f1f5f9 !important;
      border-color: #0ea5e9 !important;
    }

    [data-theme="light"] #studentProfileBadge {
      background: #f1f5f9 !important;
      border-color: rgba(15, 23, 42, 0.16) !important;
    }

    [data-theme="light"] #studentUsernameDisplay {
      color: #090d16 !important;
    }

    [data-theme="light"] .modal-header-title {
      color: #0f172a;
    }

    [data-theme="light"] .score-banner {
      background: rgba(14, 165, 233, 0.08);
      border-color: rgba(14, 165, 233, 0.25);
    }

    [data-theme="light"] #subjectReportTableBody td {
      color: #0f172a;
      border-bottom-color: rgba(15, 23, 42, 0.08);
    }

    [data-theme="light"] .mjx-chtml {
      color: #0f172a !important;
    }

    [data-theme="light"] .sidebar-student-card {
      background: #f8fafc !important;
      border-color: rgba(15, 23, 42, 0.14) !important;
    }

    /* ─── STUDENT PROFILE BANNER (PERFORMANCE TAB) ─── */
    .student-profile-banner {
      background: linear-gradient(135deg, rgba(14, 22, 38, 0.95), rgba(17, 27, 49, 0.98));
      border: 1px solid var(--border-color);
      border-radius: 20px;
      padding: 1.5rem 1.75rem;
      display: flex;
      justify-content: space-between;
      align-items: center;
      flex-wrap: wrap;
      gap: 1rem;
      box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
      transition: background 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
    }

    .student-profile-avatar {
      width: 52px;
      height: 52px;
      border-radius: 50%;
      background: linear-gradient(135deg, var(--cyan), var(--purple));
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 1.5rem;
      color: #fff;
      box-shadow: 0 0 20px rgba(14, 165, 233, 0.4);
      flex-shrink: 0;
    }

    .student-profile-name {
      font-family: var(--font-display);
      font-size: 1.35rem;
      font-weight: 800;
      color: var(--text-main);
      margin: 0;
    }

    .student-target-badge {
      font-size: 0.72rem;
      font-weight: 800;
      background: rgba(14, 165, 233, 0.2);
      color: var(--cyan);
      border: 1px solid rgba(14, 165, 233, 0.3);
      border-radius: 6px;
      padding: 0.15rem 0.5rem;
      letter-spacing: 0.3px;
    }

    .student-profile-email {
      font-size: 0.82rem;
      color: var(--text-muted);
      margin: 0.2rem 0 0;
    }

    .student-profile-actions {
      display: flex;
      gap: 0.65rem;
      align-items: center;
    }

    /* Light Mode Overrides for Performance Tab Profile Banner */
    [data-theme="light"] .student-profile-banner {
      background: #ffffff !important;
      border: 1px solid rgba(15, 23, 42, 0.14) !important;
      box-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.06), 0 2px 6px rgba(0, 0, 0, 0.04) !important;
    }

    [data-theme="light"] .student-profile-name {
      color: #090d16 !important;
    }

    [data-theme="light"] .student-profile-email {
      color: #475569 !important;
    }

    [data-theme="light"] .student-target-badge {
      background: rgba(14, 165, 233, 0.12) !important;
      color: #0284c7 !important;
      border: 1px solid rgba(14, 165, 233, 0.35) !important;
    }

    [data-theme="light"] .student-name-text {
      color: #090d16 !important;
    }

    [data-theme="light"] .perf-stat-box {
      background: #f1f5f9 !important;
      border-color: rgba(15, 23, 42, 0.12) !important;
    }

    [data-theme="light"] .perf-stat-val {
      color: #090d16 !important;
    }

    [data-theme="light"] .quick-sprint-btn {
      background: #f8fafc !important;
      border-color: rgba(15, 23, 42, 0.12) !important;
      color: #334155 !important;
    }

    [data-theme="light"] .quick-sprint-btn:hover {
      background: #f1f5f9 !important;
      color: #090d16 !important;
    }

    [data-theme="light"] .history-item-card {
      background: #f8fafc !important;
      border-color: rgba(15, 23, 42, 0.14) !important;
    }

    [data-theme="light"] .history-item-card:hover {
      background: #ffffff !important;
      box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08) !important;
    }

    [data-theme="light"] .history-mode-title {
      color: #090d16 !important;
    }

    /* Freemium Locked Banner & Intelligence Cards in Light Mode */
    [data-theme="light"] .freemium-locked-banner {
      background: #ffffff !important;
      border: 2px solid rgba(245, 158, 11, 0.45) !important;
      box-shadow: 0 12px 35px rgba(245, 158, 11, 0.14), 0 4px 20px rgba(0, 0, 0, 0.06) !important;
    }

    [data-theme="light"] .freemium-locked-banner h4,
    [data-theme="light"] .freemium-locked-title {
      color: #090d16 !important;
    }

    [data-theme="light"] .freemium-locked-banner p,
    [data-theme="light"] .freemium-locked-desc {
      color: #334155 !important;
      font-weight: 500 !important;
    }

    [data-theme="light"] .freemium-locked-pill {
      background: rgba(245, 158, 11, 0.15) !important;
      color: #b45309 !important;
      border-color: rgba(245, 158, 11, 0.45) !important;
      font-weight: 800 !important;
    }

    [data-theme="light"] .freemium-blur-row {
      filter: blur(5px);
      opacity: 0.45;
    }

    [data-theme="light"] .freemium-active-pro-badge {
      background: rgba(16, 185, 129, 0.12) !important;
      border-color: rgba(16, 185, 129, 0.4) !important;
      color: #065f46 !important;
      font-weight: 800 !important;
    }

    [data-theme="light"] .college-intel-card,
    [data-theme="light"] .aiq-cutoff-card,
    [data-theme="light"] .fee-matrix-card,
    [data-theme="light"] .state-cutoff-card {
      background: #ffffff !important;
      border: 1px solid rgba(15, 23, 42, 0.14) !important;
      box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06) !important;
    }

    [data-theme="light"] .college-intel-name {
      color: #090d16 !important;
      font-weight: 800 !important;
    }

    [data-theme="light"] .college-intel-sub {
      color: #475569 !important;
      font-weight: 600 !important;
    }

    [data-theme="light"] .college-clinical-metrics {
      background: rgba(14, 165, 233, 0.04) !important;
      border: 1px solid rgba(15, 23, 42, 0.1) !important;
    }

    [data-theme="light"] .clinical-metric-item {
      color: #334155 !important;
      font-weight: 600 !important;
    }

    [data-theme="light"] .clinical-metric-item strong {
      color: #090d16 !important;
      font-weight: 800 !important;
    }

    [data-theme="light"] .college-intel-footer {
      border-top: 1px solid rgba(15, 23, 42, 0.1) !important;
      color: #475569 !important;
      font-weight: 600 !important;
    }

    [data-theme="light"] [id^='intelSubTab_'] {
      background: #ffffff !important;
      border: 1px solid rgba(15, 23, 42, 0.18) !important;
      color: #334155 !important;
    }

    [data-theme="light"] [id^='intelSubTab_']:hover {
      background: #f1f5f9 !important;
      color: #0284c7 !important;
    }

    [data-theme="light"] [id^='intelSubTab_'].active {
      background: linear-gradient(135deg, #0ea5e9, #0284c7) !important;
      color: #ffffff !important;
      box-shadow: 0 4px 15px rgba(14, 165, 233, 0.35) !important;
    }

    [data-theme="light"] .predicted-rank-box {
      background: #f8fafc !important;
      border: 1.5px solid rgba(14, 165, 233, 0.28) !important;
      box-shadow: 0 4px 15px rgba(0, 0, 0, 0.04) !important;
    }

    [data-theme="light"] .predicted-air-val {
      color: #090d16 !important;
      font-weight: 900 !important;
    }

    /* Quota Pill Buttons & Filter Tabs in Light Mode */
    [data-theme="light"] .quota-pill-btn {
      background: #f1f5f9 !important;
      border: 1.5px solid rgba(15, 23, 42, 0.14) !important;
      color: #334155 !important;
      font-weight: 800 !important;
    }
    [data-theme="light"] .quota-pill-btn:hover {
      background: #e2e8f0 !important;
      color: #090d16 !important;
      border-color: #0ea5e9 !important;
    }
    [data-theme="light"] .quota-pill-btn.active {
      background: linear-gradient(135deg, #0ea5e9, #0284c7) !important;
      border: 1.5px solid #0284c7 !important;
      color: #ffffff !important;
      box-shadow: 0 4px 14px rgba(14, 165, 233, 0.35) !important;
    }
    [data-theme="light"] .quota-pill-btn.active i {
      color: #ffffff !important;
    }

    [data-theme="light"] .state-quota-sub-pill {
      background: #f1f5f9 !important;
      border: 1.5px solid rgba(15, 23, 42, 0.12) !important;
      color: #334155 !important;
      font-weight: 800 !important;
    }
    [data-theme="light"] .state-quota-sub-pill:hover {
      background: #e2e8f0 !important;
      color: #090d16 !important;
    }
    [data-theme="light"] .state-quota-sub-pill.active {
      background: linear-gradient(135deg, #8b5cf6, #7c3aed) !important;
      border-color: #7c3aed !important;
      color: #ffffff !important;
      box-shadow: 0 4px 14px rgba(139, 92, 246, 0.35) !important;
    }

    [data-theme="light"] .form-label {
      color: #0f172a !important;
      font-weight: 700 !important;
    }

    [data-theme="light"] select.form-select,
    [data-theme="light"] input.form-input {
      background-color: #ffffff !important;
      color: #090d16 !important;
      border: 1.5px solid rgba(15, 23, 42, 0.22) !important;
      font-weight: 600 !important;
    }
    [data-theme="light"] select.form-select:focus,
    [data-theme="light"] input.form-input:focus {
      border-color: #0ea5e9 !important;
      box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.2) !important;
    }
    [data-theme="light"] input.form-input::placeholder {
      color: #64748b !important;
      opacity: 1 !important;
    }

    /* ==========================================================================
       PHYSICAL ERGONOMICS & ACCESSIBILITY SYSTEM (AGE, VISION, HAND, MOTOR, AUDIO)
       ========================================================================== */
    /* 1. Vision & Age: Dynamic Font Size Scaling */
    html[data-font-size="large"] body {
      font-size: 1.05rem !important;
    }
    html[data-font-size="large"] .q-stem-text {
      font-size: 1.18rem !important;
      line-height: 1.7 !important;
    }
    html[data-font-size="large"] .opt-text {
      font-size: 1.12rem !important;
    }
    html[data-font-size="xlarge"] body {
      font-size: 1.15rem !important;
    }
    html[data-font-size="xlarge"] .q-stem-text {
      font-size: 1.32rem !important;
      line-height: 1.8 !important;
    }
    html[data-font-size="xlarge"] .opt-text {
      font-size: 1.25rem !important;
    }

    /* 2. Handedness & Thumb-Zone Ergonomics (Left vs Right Handed on Mobile) */
    html[data-handedness="left"] .bottom-actions-bar {
      flex-direction: row-reverse !important;
    }
    html[data-handedness="left"] .bottom-actions-bar .action-group:first-child {
      justify-content: flex-end !important;
    }
    html[data-handedness="left"] .bottom-actions-bar .action-group:last-child {
      justify-content: flex-start !important;
    }
    html[data-handedness="left"] #btnNextQuestion {
      flex-direction: row-reverse !important;
    }

    /* 3. Colorblind-Safe Geometric Palette (Deuteranopia / Protanopia Accommodations) */
    html[data-colorblind="true"] .q-tile.answered::after {
      content: " ✓";
      font-size: 0.72rem;
      font-weight: 900;
      color: #ffffff;
    }
    html[data-colorblind="true"] .q-tile.not-answered::after {
      content: " ✕";
      font-size: 0.72rem;
      font-weight: 900;
      color: #ffffff;
    }
    html[data-colorblind="true"] .q-tile.marked::after {
      content: " ★";
      font-size: 0.72rem;
      font-weight: 900;
      color: #ffffff;
    }
    html[data-colorblind="true"] .q-tile {
      border: 2px solid rgba(255, 255, 255, 0.45) !important;
      font-weight: 800 !important;
    }
    html[data-colorblind="true"] .q-opt-card.selected {
      outline: 3px solid var(--cyan) !important;
    }

    /* 4. Motor Disabilities & Tremor Touch Targets (Min 48-52px Target Height) */
    html[data-motor-friendly="true"] .btn,
    html[data-motor-friendly="true"] .btn-glass,
    html[data-motor-friendly="true"] .btn-cyan,
    html[data-motor-friendly="true"] .btn-purple,
    html[data-motor-friendly="true"] .btn-rose {
      min-height: 48px !important;
      padding-top: 0.65rem !important;
      padding-bottom: 0.65rem !important;
      font-size: 0.92rem !important;
    }
    html[data-motor-friendly="true"] .q-tile {
      min-width: 44px !important;
      min-height: 44px !important;
      font-size: 0.95rem !important;
    }
    html[data-motor-friendly="true"] .opt-label {
      min-height: 52px !important;
      padding: 1.05rem 1.35rem !important;
      margin-bottom: 0.85rem !important;
    }

    /* 5. Hearing Accommodations: Visual Screen Perimeter Flash */
    @keyframes visualAlertPulse {
      0% { box-shadow: inset 0 0 0 0 rgba(244, 63, 94, 0); }
      50% { box-shadow: inset 0 0 60px 15px rgba(244, 63, 94, 0.55); }
      100% { box-shadow: inset 0 0 0 0 rgba(244, 63, 94, 0); }
    }
    .visual-timer-flash {
      animation: visualAlertPulse 1.2s ease-in-out 3;
    }

    /* Accessibility Modal Styling */
    .access-modal-card {
      background: rgba(14, 22, 38, 0.97);
      border: 1px solid var(--border-color);
      border-radius: 20px;
      box-shadow: 0 20px 60px rgba(0, 0, 0, 0.7);
      backdrop-filter: blur(28px);
      width: 92%;
      max-width: 580px;
      padding: 1.85rem;
      position: relative;
      color: #ffffff;
      max-height: 90vh;
      overflow-y: auto;
    }
    [data-theme="light"] .access-modal-card {
      background: #ffffff;
      color: #090d16;
      border-color: rgba(15, 23, 42, 0.16);
      box-shadow: 0 20px 60px rgba(0, 0, 0, 0.18);
    }
    .access-section {
      background: rgba(255, 255, 255, 0.03);
      border: 1px solid var(--border-color);
      border-radius: 14px;
      padding: 1rem 1.15rem;
      margin-bottom: 1rem;
    }
    [data-theme="light"] .access-section {
      background: #f8fafc;
      border-color: rgba(15, 23, 42, 0.1);
    }
    .access-btn-group {
      display: flex;
      gap: 0.5rem;
      margin-top: 0.65rem;
      flex-wrap: wrap;
    }
    .access-toggle-pill {
      flex: 1;
      min-width: 110px;
      padding: 0.5rem 0.75rem;
      border-radius: 9999px;
      border: 1px solid var(--border-color);
      background: rgba(255, 255, 255, 0.05);
      color: var(--text-muted);
      font-size: 0.82rem;
      font-weight: 700;
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 0.4rem;
      transition: all 0.2s;
    }
    [data-theme="light"] .access-toggle-pill {
      background: #ffffff;
      color: #475569;
    }
    .access-toggle-pill.active {
      background: var(--cyan) !important;
      color: #ffffff !important;
      border-color: var(--cyan) !important;
      box-shadow: 0 2px 10px rgba(14, 165, 233, 0.35);
    }

    /* Complete Footer & Hub Action Light Mode Overrides */
    [data-theme="light"] footer,
    [data-theme="light"] .app-footer {
      background: #ffffff !important;
      border-top: 1px solid rgba(15, 23, 42, 0.16) !important;
      color: #090d16 !important;
    }

    [data-theme="light"] .footer-brand h4 {
      color: #090d16 !important;
    }

    [data-theme="light"] .footer-brand p {
      color: #334155 !important;
    }

    [data-theme="light"] .footer-col h5 {
      color: #090d16 !important;
    }

    [data-theme="light"] .footer-links a {
      color: #334155 !important;
    }

    [data-theme="light"] .footer-links a:hover {
      color: #0284c7 !important;
    }

    [data-theme="light"] .footer-bottom {
      border-top: 1px solid rgba(15, 23, 42, 0.1) !important;
      color: #475569 !important;
    }

    [data-theme="light"] #predictorActionFooter,
    [data-theme="light"] [id$="ActionFooter"] {
      background: #ffffff !important;
      border: 1px solid rgba(15, 23, 42, 0.16) !important;
      box-shadow: 0 4px 18px rgba(0, 0, 0, 0.05) !important;
    }

    /* All Cards & Dynamic Intelligence Elements in Light Mode */
    [data-theme="light"] .fee-matrix-card,
    [data-theme="light"] .aiq-cutoff-card,
    [data-theme="light"] .deemed-pg-card,
    [data-theme="light"] .clinical-intelligence-card,
    [data-theme="light"] .college-intel-card,
    [data-theme="light"] .predictor-card,
    [data-theme="light"] .mode-item-card,
    [data-theme="light"] .notif-feed-card {
      background: #ffffff !important;
      border: 1px solid rgba(15, 23, 42, 0.14) !important;
      box-shadow: 0 4px 18px rgba(0, 0, 0, 0.05) !important;
      color: #090d16 !important;
    }

    [data-theme="light"] .mode-item-card.active {
      background: linear-gradient(145deg, #eaf7ff, #f7fbff) !important;
      border-color: #0284c7 !important;
      box-shadow: 0 0 0 1px #0284c7, 0 8px 24px rgba(2, 132, 199, 0.12) !important;
    }

    [data-theme="light"] .fee-matrix-card div,
    [data-theme="light"] .fee-matrix-card strong,
    [data-theme="light"] .aiq-cutoff-card div,
    [data-theme="light"] .aiq-cutoff-card strong,
    [data-theme="light"] .college-intel-card strong,
    [data-theme="light"] .college-intel-name {
      color: #090d16 !important;
    }

    /* Dropdowns, Selects and Input fields in Light Mode */
    [data-theme="light"] select.form-select,
    [data-theme="light"] input.form-input {
      background-color: #ffffff !important;
      color: #090d16 !important;
      border-color: rgba(15, 23, 42, 0.22) !important;
    }

    /* High Contrast Chance Badges in Light Mode */
    [data-theme="light"] .chance-high {
      background: rgba(16, 185, 129, 0.14) !important;
      color: #047857 !important;
      border: 1px solid rgba(16, 185, 129, 0.4) !important;
      font-weight: 800 !important;
    }

    [data-theme="light"] .chance-moderate {
      background: rgba(245, 158, 11, 0.14) !important;
      color: #b45309 !important;
      border: 1px solid rgba(245, 158, 11, 0.4) !important;
      font-weight: 800 !important;
    }

    [data-theme="light"] .chance-dream {
      background: rgba(139, 92, 246, 0.14) !important;
      color: #6b21a8 !important;
      border: 1px solid rgba(139, 92, 246, 0.4) !important;
      font-weight: 800 !important;
    }

    /* Sub-badge text colors in Light Mode */
    [data-theme="light"] span[style*="color:var(--emerald)"],
    [data-theme="light"] span[style*="color: var(--emerald)"] {
      color: #047857 !important;
    }

    [data-theme="light"] span[style*="color:var(--amber)"],
    [data-theme="light"] span[style*="color: var(--amber)"] {
      color: #b45309 !important;
    }

    [data-theme="light"] span[style*="color:var(--rose)"],
    [data-theme="light"] span[style*="color: var(--rose)"] {
      color: #be123c !important;
    }

    /* Predictor Banner & Headers in Light Mode */
    [data-theme="light"] #predictedAirDisplay {
      color: #0284c7 !important;
      font-weight: 900 !important;
    }

    [data-theme="light"] #predictedPercentileDisplay {
      color: #1e293b !important;
      font-weight: 700 !important;
    }

    /* Inputs, Labels & Placeholders in Light Mode */
    [data-theme="light"] .form-label,
    [data-theme="light"] label {
      color: #0f172a !important;
      font-weight: 800 !important;
    }

    [data-theme="light"] input.form-input::placeholder {
      color: #64748b !important;
    }

    [data-theme="light"] input.form-input,
    [data-theme="light"] select.form-select {
      background: #ffffff !important;
      color: #0f172a !important;
      border: 1px solid rgba(15, 23, 42, 0.25) !important;
      font-weight: 600 !important;
    }

    [data-theme="light"] input.form-input:focus,
    [data-theme="light"] select.form-select:focus {
      border-color: #0ea5e9 !important;
      box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.18) !important;
    }

    /* Clinical Metric Box in Light Mode */
    [data-theme="light"] .clinical-metric-item {
      background: #f8fafc !important;
      border: 1px solid rgba(15, 23, 42, 0.12) !important;
      color: #1e293b !important;
    }

    [data-theme="light"] .clinical-metric-item span {
      color: #1e293b !important;
    }

    [data-theme="light"] .clinical-metric-item strong {
      color: #0f172a !important;
      font-weight: 800 !important;
    }

    * {
      box-sizing: border-box;
      margin: 0;
      padding: 0;
      -webkit-tap-highlight-color: transparent;
    }

    body {
      background-color: var(--bg-dark);
      color: var(--text-main);
      font-family: var(--font-body);
      overflow-x: hidden;
      min-height: 100vh;
      display: flex;
      flex-direction: column;
      position: relative;
    }

    /* Ambient Background Mesh Glow */
    body::before {
      content: '';
      position: fixed;
      top: -20%;
      left: -10%;
      width: 50vw;
      height: 50vw;
      background: radial-gradient(circle, rgba(14, 165, 233, 0.1) 0%, transparent 70%);
      filter: blur(80px);
      pointer-events: none;
      z-index: 0;
    }

    body::after {
      content: '';
      position: fixed;
      bottom: -20%;
      right: -10%;
      width: 50vw;
      height: 50vw;
      background: radial-gradient(circle, rgba(139, 92, 246, 0.08) 0%, transparent 70%);
      filter: blur(90px);
      pointer-events: none;
      z-index: 0;
    }

    /* Custom Scrollbars */
    ::-webkit-scrollbar {
      width: 6px;
      height: 6px;
    }

    ::-webkit-scrollbar-track {
      background: var(--bg-dark);
    }

    ::-webkit-scrollbar-thumb {
      background: rgba(255, 255, 255, 0.15);
      border-radius: 4px;
    }

    ::-webkit-scrollbar-thumb:hover {
      background: rgba(255, 255, 255, 0.25);
    }

    /* ==========================================================================
       TOP NAVIGATION BAR & MULTI-SECTION TABS
       ========================================================================== */
    header {
      background: rgba(11, 18, 32, 0.92);
      backdrop-filter: blur(20px);
      -webkit-backdrop-filter: blur(20px);
      border-bottom: 1px solid var(--border-color);
      padding: 0.6rem 1.25rem;
      display: flex;
      justify-content: space-between;
      align-items: center;
      position: sticky;
      top: 0;
      z-index: 50;
      box-shadow: var(--shadow-subtle);
    }

    .brand-wrap {
      display: flex;
      align-items: center;
      gap: 0.75rem;
      text-decoration: none;
    }

    .brand-logo-icon {
      width: 40px;
      height: 40px;
      border-radius: 10px;
      display: flex;
      align-items: center;
      justify-content: center;
      box-shadow: 0 4px 15px rgba(14, 165, 233, 0.2);
      flex-shrink: 0;
      overflow: hidden;
      background: #030712;
      border: 1px solid rgba(255, 255, 255, 0.1);
    }

    .brand-text h1 {
      font-family: var(--font-display);
      font-size: 1.15rem;
      font-weight: 800;
      letter-spacing: -0.4px;
      line-height: 1.15;
    }

    .brand-text h1 span {
      background: linear-gradient(135deg, #38bdf8, #818cf8);
      -webkit-background-clip: text;
      -webkit-text-fill-color: transparent;
    }

    .brand-sub {
      font-size: 0.7rem;
      color: var(--text-muted);
      font-weight: 500;
      display: flex;
      align-items: center;
      gap: 0.35rem;
    }

    .badge-live {
      display: inline-block;
      width: 6px;
      height: 6px;
      background-color: var(--emerald);
      border-radius: 50%;
      box-shadow: 0 0 8px var(--emerald);
      animation: pulseLive 1.5s infinite;
    }

    @keyframes pulseLive {

      0%,
      100% {
        transform: scale(1);
        opacity: 1;
      }

      50% {
        transform: scale(1.4);
        opacity: 0.6;
      }
    }

    /* Top Hub Nav Menu */
    .portal-nav-tabs {
      display: flex;
      align-items: center;
      gap: 0.35rem;
      background: rgba(255, 255, 255, 0.04);
      padding: 0.25rem;
      border-radius: 30px;
      border: 1px solid var(--border-color);
    }

    .nav-tab-btn {
      background: transparent;
      border: none;
      color: var(--text-muted);
      font-family: var(--font-display);
      font-size: 0.8rem;
      font-weight: 700;
      padding: 0.4rem 0.85rem;
      border-radius: 20px;
      cursor: pointer;
      display: flex;
      align-items: center;
      gap: 0.4rem;
      transition: var(--transition);
      text-decoration: none;
    }

    .nav-tab-btn:hover {
      color: #fff;
      background: rgba(255, 255, 255, 0.06);
    }

    .nav-tab-btn.active {
      background: linear-gradient(135deg, #0ea5e9, #0284c7);
      color: #fff;
      box-shadow: 0 2px 10px rgba(14, 165, 233, 0.3);
    }

    .header-actions {
      display: flex;
      align-items: center;
      gap: 0.65rem;
    }

    /* Real-Time Countdown Timer Widget */
    .timer-pill {
      display: flex;
      align-items: center;
      gap: 0.5rem;
      background: rgba(14, 165, 233, 0.1);
      border: 1px solid rgba(14, 165, 233, 0.25);
      border-radius: 30px;
      padding: 0.35rem 0.85rem;
      color: var(--cyan);
      font-family: var(--font-display);
      font-size: 1.05rem;
      font-weight: 800;
      letter-spacing: 0.5px;
      transition: var(--transition);
    }

    .timer-pill i {
      font-size: 0.85rem;
    }

    .timer-pill.warning {
      background: rgba(244, 63, 94, 0.15);
      border-color: rgba(244, 63, 94, 0.4);
      color: #fb7185;
      animation: timerAlert 1s infinite alternate;
    }

    @keyframes timerAlert {
      from {
        transform: scale(1);
      }

      to {
        transform: scale(1.03);
        box-shadow: 0 0 16px rgba(244, 63, 94, 0.4);
      }
    }

    /* Universal Buttons */
    .btn {
      border: none;
      outline: none;
      font-family: var(--font-display);
      font-weight: 700;
      font-size: 0.85rem;
      padding: 0.5rem 1.15rem;
      border-radius: var(--radius-sm);
      cursor: pointer;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 0.45rem;
      transition: var(--transition);
      user-select: none;
    }

    .btn:hover {
      transform: translateY(-1px);
    }

    .btn:active {
      transform: translateY(1px);
    }

    .btn:disabled {
      opacity: 0.4;
      cursor: not-allowed;
      transform: none;
      box-shadow: none;
    }

    .btn-cyan {
      background: linear-gradient(135deg, #0ea5e9, #0284c7);
      color: #fff;
      box-shadow: 0 4px 15px rgba(14, 165, 233, 0.3);
    }

    .btn-cyan:hover {
      box-shadow: 0 6px 20px rgba(14, 165, 233, 0.45);
      filter: brightness(1.08);
    }

    .btn-emerald {
      background: linear-gradient(135deg, #10b981, #059669);
      color: #fff;
      box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
    }

    .btn-rose {
      background: linear-gradient(135deg, #f43f5e, #e11d48);
      color: #fff;
      box-shadow: 0 4px 15px rgba(244, 63, 94, 0.3);
    }

    .btn-purple {
      background: linear-gradient(135deg, #8b5cf6, #7c3aed);
      color: #fff;
      box-shadow: 0 4px 15px rgba(139, 92, 246, 0.3);
    }

    .btn-glass {
      background: rgba(255, 255, 255, 0.06);
      border: 1px solid var(--border-color);
      color: var(--text-main);
    }

    .btn-glass:hover {
      background: rgba(255, 255, 255, 0.12);
      border-color: rgba(255, 255, 255, 0.18);
    }

    /* ==========================================================================
       VIEW CONTAINER SECTIONS (TABS)
       ========================================================================== */
    .portal-view-section {
      display: none;
      flex: 1;
      width: 100%;
    }

    .portal-view-section.active-view {
      display: flex;
      flex-direction: column;
    }

    /* ==========================================================================
       TAB 1: MOCK TEST SIMULATOR ARENA
       ========================================================================== */
    .app-layout {
      display: flex;
      flex-direction: column;
      flex: 1;
      width: 100%;
      min-height: calc(100vh - 61px);
      position: relative;
      z-index: 1;
    }

    /* Desktop-only: 2-column layout (Main Arena 1fr, Exam Palette 315px) */
    @media (min-width: 901px) {
      body.exam-session-active .app-layout,
      body.fullscreen-exam-active .app-layout {
        display: grid !important;
        grid-template-columns: 1fr 315px !important;
        width: 100% !important;
        height: 100% !important;
        max-height: 100% !important;
        min-height: 0 !important;
        overflow: hidden !important;
        transition: grid-template-columns 0.3s cubic-bezier(0.16, 1, 0.3, 1);
      }

      body.exam-session-active .app-layout .exam-main,
      body.fullscreen-exam-active .app-layout .exam-main {
        order: 1 !important;
        display: flex !important;
        flex-direction: column !important;
        height: 100% !important;
        max-height: 100% !important;
        min-height: 0 !important;
        overflow: hidden !important;
        position: relative !important;
      }

      body.exam-session-active .app-layout .exam-sidebar,
      body.fullscreen-exam-active .app-layout .exam-sidebar {
        order: 2 !important;
        display: flex !important;
        border-right: none !important;
        border-left: 1px solid var(--border-color) !important;
        box-shadow: -6px 0 25px rgba(0, 0, 0, 0.18);
        height: 100% !important;
        max-height: 100% !important;
        min-height: 0 !important;
        overflow-y: auto !important;
      }

      body.exam-session-active .app-layout.sidebar-collapsed {
        grid-template-columns: 1fr 0px !important;
      }

      body.exam-session-active .app-layout.sidebar-collapsed .exam-sidebar {
        width: 0;
        min-width: 0;
        padding: 0;
        overflow: hidden;
        opacity: 0;
        pointer-events: none;
        border-left: none;
        border-right: none;
      }

      /* Desktop never displays the mobile backdrop overlay */
      .drawer-backdrop-overlay,
      .drawer-backdrop-overlay.active {
        display: none !important;
        opacity: 0 !important;
        pointer-events: none !important;
        visibility: hidden !important;
      }
    }

    .exam-sidebar {
      display: none !important;
      background: rgba(11, 18, 32, 0.95);
      backdrop-filter: blur(20px);
      -webkit-backdrop-filter: blur(20px);
      border-left: 1px solid var(--border-color);
      flex-direction: column;
      padding: 0.85rem;
      gap: 0.65rem;
      height: 100%;
      max-height: 100%;
      overflow: hidden;
      transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
      z-index: 50;
    }

    body.exam-session-active .exam-sidebar {
      display: flex !important;
    }

    /* ─── HOME SIDEBAR: STUDENT HISTORY & PERFORMANCE MENU ─── */
    .sidebar-view-home {
      display: flex;
      flex-direction: column;
      height: 100%;
      gap: 0.75rem;
      overflow-y: auto;
      min-height: 0;
    }

    .sidebar-student-card {
      background: rgba(14, 22, 38, 0.8);
      border: 1px solid var(--border-color);
      border-radius: var(--radius-sm);
      padding: 0.75rem 0.85rem;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 0.65rem;
    }

    .student-avatar-wrap {
      display: flex;
      align-items: center;
      gap: 0.65rem;
      min-width: 0;
    }

    .student-avatar-icon {
      width: 36px;
      height: 36px;
      border-radius: 50%;
      background: linear-gradient(135deg, var(--cyan), var(--purple));
      display: flex;
      align-items: center;
      justify-content: center;
      color: #fff;
      font-size: 1rem;
      flex-shrink: 0;
      box-shadow: 0 0 12px rgba(14, 165, 233, 0.35);
    }

    .student-name-text {
      font-family: var(--font-display);
      font-size: 0.86rem;
      font-weight: 800;
      color: #fff;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
      max-width: 140px;
    }

    .student-target-tag {
      font-size: 0.7rem;
      font-weight: 700;
      color: var(--cyan);
      display: flex;
      align-items: center;
      gap: 0.3rem;
      margin-top: 0.1rem;
    }

    .sidebar-perf-grid {
      display: grid;
      grid-template-columns: repeat(3, 1fr);
      gap: 0.45rem;
    }

    .perf-stat-box {
      background: rgba(255, 255, 255, 0.03);
      border: 1px solid var(--border-color);
      border-radius: var(--radius-sm);
      padding: 0.55rem 0.35rem;
      text-align: center;
    }

    .perf-stat-val {
      font-family: var(--font-display);
      font-size: 0.95rem;
      font-weight: 800;
      color: #fff;
    }

    .perf-stat-val.score {
      color: var(--emerald);
    }

    .perf-stat-val.acc {
      color: var(--cyan);
    }

    .perf-stat-lbl {
      font-size: 0.62rem;
      font-weight: 700;
      color: var(--text-dim);
      text-transform: uppercase;
      letter-spacing: 0.4px;
      margin-top: 0.15rem;
    }

    .quick-sprint-list {
      display: flex;
      flex-direction: column;
      gap: 0.35rem;
      margin-top: 0.35rem;
    }

    .quick-sprint-btn {
      width: 100%;
      background: rgba(255, 255, 255, 0.03);
      border: 1px solid var(--border-color);
      border-radius: var(--radius-sm);
      padding: 0.5rem 0.65rem;
      color: var(--text-muted);
      font-family: var(--font-display);
      font-size: 0.78rem;
      font-weight: 700;
      display: flex;
      align-items: center;
      justify-content: space-between;
      cursor: pointer;
      transition: all 0.2s ease;
      text-align: left;
    }

    .quick-sprint-btn:hover {
      background: rgba(14, 165, 233, 0.1);
      border-color: rgba(14, 165, 233, 0.3);
      color: #fff;
      transform: translateX(2px);
    }

    .badge-mini {
      font-size: 0.66rem;
      font-weight: 800;
      padding: 0.15rem 0.4rem;
      border-radius: 4px;
      background: rgba(255, 255, 255, 0.08);
      color: var(--text-muted);
    }

    .history-feed-scroll {
      flex: 1;
      overflow-y: auto;
      display: flex;
      flex-direction: column;
      gap: 0.45rem;
      padding-right: 0.2rem;
      min-height: 120px;
    }

    .history-item-card {
      background: rgba(14, 22, 38, 0.7);
      border: 1px solid var(--border-color);
      border-radius: var(--radius-sm);
      padding: 0.6rem 0.65rem;
      display: flex;
      flex-direction: column;
      gap: 0.35rem;
      transition: all 0.2s ease;
      cursor: pointer;
    }

    .history-item-card:hover {
      border-color: rgba(14, 165, 233, 0.4);
      background: rgba(14, 22, 38, 0.95);
      transform: translateY(-1px);
      box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    }

    .history-top-row {
      display: flex;
      justify-content: space-between;
      align-items: center;
    }

    .history-mode-title {
      font-family: var(--font-display);
      font-size: 0.78rem;
      font-weight: 800;
      color: #fff;
    }

    .history-date-text {
      font-size: 0.65rem;
      color: var(--text-dim);
    }

    .history-scores-row {
      display: flex;
      justify-content: space-between;
      align-items: center;
      font-size: 0.74rem;
    }

    .history-score-badge {
      font-weight: 800;
      color: var(--emerald);
    }

    .history-acc-badge {
      color: var(--cyan);
      font-weight: 700;
    }

    .empty-history-note {
      text-align: center;
      padding: 1.5rem 0.75rem;
      color: var(--text-dim);
      font-size: 0.76rem;
      line-height: 1.45;
      background: rgba(0, 0, 0, 0.2);
      border-radius: var(--radius-sm);
      border: 1px dashed rgba(255, 255, 255, 0.08);
      margin-top: 0.25rem;
    }

    /* ─── EXAM ARENA SIDEBAR VIEW (PALETTE & SUBJECTS) ─── */
    .sidebar-view-exam {
      display: flex;
      flex-direction: column;
      height: 100%;
      gap: 0.65rem;
      overflow: hidden;
    }

    .drawer-backdrop-overlay {
      display: none !important;
      position: fixed !important;
      inset: 0 !important;
      background: rgba(0, 0, 0, 0.65) !important;
      backdrop-filter: blur(4px) !important;
      -webkit-backdrop-filter: blur(4px) !important;
      z-index: 999 !important;
      opacity: 0 !important;
      pointer-events: none !important;
      transition: opacity 0.25s ease !important;
    }

    @media (max-width: 900px) {
      .drawer-backdrop-overlay.active {
        display: block !important;
        opacity: 1 !important;
        pointer-events: auto !important;
      }
    }

    @media (min-width: 901px) {
      .drawer-backdrop-overlay,
      .drawer-backdrop-overlay.active {
        display: none !important;
        opacity: 0 !important;
        visibility: hidden !important;
        pointer-events: none !important;
      }
    }

    .sidebar-block {
      display: flex;
      flex-direction: column;
      gap: 0.35rem;
      flex-shrink: 0;
    }

    .sidebar-heading {
      font-family: var(--font-display);
      font-size: 0.72rem;
      font-weight: 700;
      color: var(--text-dim);
      text-transform: uppercase;
      letter-spacing: 0.8px;
    }

    .subject-pills {
      display: flex;
      gap: 0.35rem;
    }

    .subj-pill-btn {
      flex: 1;
      background: rgba(255, 255, 255, 0.04);
      border: 1px solid var(--border-color);
      border-radius: var(--radius-sm);
      padding: 0.4rem 0.25rem;
      color: var(--text-muted);
      font-family: var(--font-display);
      font-size: 0.76rem;
      font-weight: 700;
      cursor: pointer;
      transition: var(--transition);
      text-align: center;
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 0.15rem;
    }

    .subj-pill-btn i {
      font-size: 0.88rem;
    }

    .subj-pill-btn:hover {
      background: rgba(14, 165, 233, 0.08);
      color: var(--text-main);
    }

    .subj-pill-btn.active {
      background: linear-gradient(135deg, rgba(14, 165, 233, 0.2), rgba(99, 102, 241, 0.15));
      border-color: var(--cyan);
      color: #38bdf8;
      box-shadow: 0 0 16px rgba(14, 165, 233, 0.2);
    }

    .palette-box {
      flex: 1;
      display: flex;
      flex-direction: column;
      min-height: 0;
      overflow: hidden;
    }

    .palette-header {
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin-bottom: 0.4rem;
      flex-shrink: 0;
    }

    .palette-count {
      font-family: var(--font-display);
      font-size: 0.78rem;
      font-weight: 700;
      color: var(--emerald);
      background: rgba(16, 185, 129, 0.1);
      border: 1px solid rgba(16, 185, 129, 0.25);
      padding: 0.15rem 0.5rem;
      border-radius: 12px;
    }

    .palette-grid {
      display: grid;
      grid-template-columns: repeat(5, minmax(0, 1fr));
      gap: 6px;
      overflow-y: auto;
      overflow-x: hidden;
      padding: 4px 4px 1.5rem 2px;
      flex: 1;
      min-height: 0;
      max-height: 100%;
      width: 100%;
      box-sizing: border-box;
      scrollbar-width: thin;
    }

    .palette-grid::-webkit-scrollbar {
      width: 5px;
    }

    .palette-grid::-webkit-scrollbar-thumb {
      background: rgba(255, 255, 255, 0.2);
      border-radius: 4px;
    }

    .q-tile {
      aspect-ratio: 1;
      width: 100%;
      min-width: 0;
      max-width: 100%;
      height: auto;
      box-sizing: border-box;
      border: 1px solid var(--border-color);
      border-radius: 7px;
      background: rgba(255, 255, 255, 0.03);
      color: var(--text-dim);
      font-family: var(--font-display);
      font-size: 0.8rem;
      font-weight: 800;
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      transition: var(--transition);
      flex-shrink: 0;
    }

    .q-tile:hover {
      background: rgba(14, 165, 233, 0.15);
      border-color: var(--cyan);
      color: #fff;
      transform: scale(1.05);
    }

    .q-tile.current {
      outline: 2px solid #38bdf8;
      outline-offset: 2px;
      color: #fff;
      background: rgba(14, 165, 233, 0.25);
    }

    .q-tile.answered {
      background: var(--status-answered);
      border-color: var(--status-answered);
      color: #fff;
      box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
    }

    .q-tile.marked {
      background: var(--status-marked);
      border-color: var(--status-marked);
      color: #fff;
      box-shadow: 0 2px 8px rgba(139, 92, 246, 0.3);
    }

    .q-tile.not-answered {
      background: var(--status-notanswered);
      border-color: var(--status-notanswered);
      color: #fff;
    }

    .legend-box {
      border-top: 1px solid var(--border-color);
      padding-top: 0.5rem;
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 5px;
      flex-shrink: 0;
    }

    .legend-item {
      display: flex;
      align-items: center;
      gap: 0.4rem;
      font-size: 0.68rem;
      color: var(--text-muted);
      font-weight: 500;
    }

    .legend-indicator {
      width: 11px;
      height: 11px;
      border-radius: 3px;
      flex-shrink: 0;
    }

    .exam-main {
      display: flex;
      flex-direction: column;
      overflow: hidden;
      background: radial-gradient(circle at 80% 20%, rgba(14, 165, 233, 0.04) 0%, transparent 60%);
    }

    .q-hud-bar {
      background: rgba(14, 22, 38, 0.7);
      backdrop-filter: blur(12px);
      border-bottom: 1px solid var(--border-color);
      padding: 0.75rem 1.5rem;
      display: flex;
      justify-content: space-between;
      align-items: center;
      flex-shrink: 0;
    }

    .q-hud-left {
      display: flex;
      align-items: center;
      gap: 0.65rem;
    }

    .q-num-label {
      font-family: var(--font-display);
      font-size: 1.05rem;
      font-weight: 800;
      color: #fff;
    }

    .badge-subject {
      padding: 0.25rem 0.65rem;
      border-radius: 20px;
      font-family: var(--font-display);
      font-size: 0.72rem;
      font-weight: 800;
      text-transform: uppercase;
      letter-spacing: 0.5px;
    }

    .badge-subject.physics {
      background: rgba(14, 165, 233, 0.15);
      color: #38bdf8;
      border: 1px solid rgba(14, 165, 233, 0.3);
    }

    .badge-subject.chemistry {
      background: rgba(168, 85, 247, 0.15);
      color: #c084fc;
      border: 1px solid rgba(168, 85, 247, 0.3);
    }

    .badge-subject.biology {
      background: rgba(16, 185, 129, 0.15);
      color: #34d399;
      border: 1px solid rgba(16, 185, 129, 0.3);
    }

    .badge-marks {
      font-size: 0.75rem;
      font-weight: 700;
      font-family: var(--font-display);
      color: var(--text-muted);
      background: rgba(255, 255, 255, 0.05);
      border: 1px solid var(--border-color);
      padding: 0.25rem 0.65rem;
      border-radius: 20px;
    }

    .badge-marks b.pos {
      color: var(--emerald);
    }

    .badge-marks b.neg {
      color: var(--rose);
    }

    /* Enhanced Animated HUD Subject Switcher Pill Bar */
    .hud-subject-switcher {
      display: inline-flex;
      align-items: center;
      background: var(--bg-card);
      border: 1px solid rgba(255, 255, 255, 0.12);
      border-radius: 9999px;
      padding: 3px;
      gap: 3px;
      box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.4), 0 4px 15px rgba(0, 0, 0, 0.25);
      backdrop-filter: blur(12px);
      -webkit-backdrop-filter: blur(12px);
      position: relative;
    }

    .hud-sub-btn {
      background: transparent;
      border: none;
      outline: none;
      border-radius: 9999px;
      padding: 0.32rem 0.75rem;
      font-family: var(--font-display);
      font-size: 0.76rem;
      font-weight: 800;
      letter-spacing: 0.3px;
      color: var(--text-dim);
      cursor: pointer;
      display: inline-flex;
      align-items: center;
      gap: 0.4rem;
      transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
      position: relative;
      user-select: none;
      white-space: nowrap;
    }

    .hud-sub-btn i {
      font-size: 0.82rem;
      transition: transform 0.25s ease;
    }

    .hud-sub-btn:hover:not(:disabled) {
      color: #ffffff;
      background: rgba(255, 255, 255, 0.08);
      transform: translateY(-1px);
    }

    .hud-sub-btn:hover:not(:disabled) i {
      transform: scale(1.15) rotate(8deg);
    }

    .hud-sub-btn:disabled {
      opacity: 0.3;
      cursor: not-allowed;
      pointer-events: none;
    }

    /* Active Subject Variants */
    .hud-sub-btn[data-subject="Physics"].active {
      background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);
      color: #ffffff;
      box-shadow: 0 0 16px rgba(14, 165, 233, 0.5), inset 0 1px 1px rgba(255, 255, 255, 0.4);
      text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
      transform: scale(1.02);
    }

    .hud-sub-btn[data-subject="Physics"].active i {
      animation: physicsIconSpin 6s linear infinite;
    }

    @keyframes physicsIconSpin {
      from {
        transform: rotate(0deg);
      }

      to {
        transform: rotate(360deg);
      }
    }

    .hud-sub-btn[data-subject="Chemistry"].active {
      background: linear-gradient(135deg, #a855f7 0%, #7e22ce 100%);
      color: #ffffff;
      box-shadow: 0 0 16px rgba(168, 85, 247, 0.5), inset 0 1px 1px rgba(255, 255, 255, 0.4);
      text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
      transform: scale(1.02);
    }

    .hud-sub-btn[data-subject="Chemistry"].active i {
      animation: chemistryIconBob 2s ease-in-out infinite;
    }

    @keyframes chemistryIconBob {

      0%,
      100% {
        transform: translateY(0) rotate(0deg);
      }

      50% {
        transform: translateY(-2px) rotate(8deg);
      }
    }

    .hud-sub-btn[data-subject="Biology"].active {
      background: linear-gradient(135deg, #10b981 0%, #059669 100%);
      color: #ffffff;
      box-shadow: 0 0 16px rgba(16, 185, 129, 0.5), inset 0 1px 1px rgba(255, 255, 255, 0.4);
      text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
      transform: scale(1.02);
    }

    .hud-sub-btn[data-subject="Biology"].active i {
      animation: biologyPulse 2.5s ease-in-out infinite;
    }

    @keyframes biologyPulse {

      0%,
      100% {
        transform: scale(1);
      }

      50% {
        transform: scale(1.2) rotate(10deg);
      }
    }

    /* Light Theme HUD Switcher */
    [data-theme="light"] .hud-subject-switcher {
      background: #e2e8f0;
      border: 1px solid rgba(15, 23, 42, 0.15);
      box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.08), 0 2px 8px rgba(0, 0, 0, 0.05);
    }

    [data-theme="light"] .hud-sub-btn {
      color: #64748b;
    }

    [data-theme="light"] .hud-sub-btn:hover:not(:disabled) {
      color: #0f172a;
      background: #f8fafc;
    }

    .q-scroll-area {
      flex: 1;
      overflow-y: auto;
      padding: 1.5rem;
    }

    .q-card-container {
      max-width: 900px;
      margin: 0 auto;
      display: flex;
      flex-direction: column;
      gap: 1.25rem;
    }

    .q-statement-card {
      background: var(--bg-card);
      backdrop-filter: blur(16px);
      border: 1px solid var(--border-color);
      border-radius: var(--radius-md);
      padding: 1.5rem 1.65rem;
      box-shadow: var(--shadow-subtle);
      border-left: 4px solid var(--cyan);
      animation: fadeInCard 0.25s ease-out;
    }

    @keyframes fadeInCard {
      from {
        opacity: 0;
        transform: translateY(6px);
      }

      to {
        opacity: 1;
        transform: translateY(0);
      }
    }

    @keyframes loadingPulse {
      from {
        width: 35%;
        transform: translateX(-10%);
      }

      to {
        width: 95%;
        transform: translateX(10%);
      }
    }

    .q-text-body {
      font-size: 1.05rem;
      line-height: 1.75;
      color: var(--text-main);
    }

    .q-text-body p {
      margin-bottom: 0.65rem;
    }

    .q-text-body table {
      border-collapse: collapse;
      margin: 0.75rem 0;
      max-width: 100%;
      overflow-x: auto;
      display: block;
    }

    .q-text-body th,
    .q-text-body td {
      border: 1px solid var(--border-color);
      padding: 0.5rem 0.85rem;
      background: rgba(0, 0, 0, 0.2);
    }

    .q-text-body th {
      background: rgba(14, 165, 233, 0.1);
      font-weight: 700;
    }

    .q-img-wrap {
      margin-bottom: 1.25rem;
      text-align: center;
      position: relative;
      display: inline-block;
      max-width: 100%;
      border-radius: var(--radius-sm);
      overflow: hidden;
      box-shadow: 0 4px 18px rgba(0, 0, 0, 0.2);
      background: #ffffff;
    }

    .q-img-mask-header {
      position: relative;
      height: 28px;
      background: var(--bg-card);
      border-bottom: 1px solid var(--border-color);
      z-index: 7;
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 0 0.85rem;
      pointer-events: none;
      backdrop-filter: blur(10px);
    }

    .q-img-mask-tag {
      font-family: var(--font-display);
      font-size: 0.7rem;
      font-weight: 800;
      color: var(--cyan);
      letter-spacing: 0.5px;
      text-transform: uppercase;
    }

    .q-img-elem {
      max-width: 100%;
      max-height: 52vh;
      border-radius: var(--radius-sm);
      border: 1px solid rgba(255, 255, 255, 0.12);
      background: #fff;
      cursor: zoom-in;
      transition: var(--transition);
      display: block;
      margin: 0 auto;
      padding-top: 10px;
    }

    .zoom-hint {
      position: absolute;
      bottom: 8px;
      right: 12px;
      background: rgba(0, 0, 0, 0.65);
      backdrop-filter: blur(8px);
      color: #fff;
      font-size: 0.7rem;
      padding: 0.25rem 0.6rem;
      border-radius: 20px;
      pointer-events: none;
    }

    .options-grid {
      display: flex;
      flex-direction: column;
      gap: 0.75rem;
    }

    .opt-card {
      background: var(--bg-card);
      backdrop-filter: blur(16px);
      border: 1px solid var(--border-color);
      border-radius: var(--radius-md);
      padding: 1rem 1.25rem;
      display: flex;
      align-items: flex-start;
      gap: 0.9rem;
      cursor: pointer;
      transition: var(--transition);
      user-select: none;
      position: relative;
      overflow: hidden;
    }

    .opt-card:hover {
      background: var(--bg-card-hover);
      border-color: rgba(14, 165, 233, 0.35);
      transform: translateX(3px);
    }

    .opt-card.selected {
      background: linear-gradient(135deg, rgba(14, 165, 233, 0.14), rgba(99, 102, 241, 0.08));
      border-color: var(--cyan);
      box-shadow: 0 0 0 1px var(--cyan), 0 4px 20px rgba(14, 165, 233, 0.18);
    }

    .opt-card.correct {
      background: rgba(16, 185, 129, 0.15) !important;
      border-color: var(--emerald) !important;
      box-shadow: 0 0 0 1px var(--emerald) !important;
    }

    .opt-card.wrong {
      background: rgba(244, 63, 94, 0.15) !important;
      border-color: var(--rose) !important;
      box-shadow: 0 0 0 1px var(--rose) !important;
    }

    .opt-radio {
      width: 22px;
      height: 22px;
      border: 2px solid rgba(255, 255, 255, 0.25);
      border-radius: 50%;
      display: flex;
      align-items: center;
      justify-content: center;
      flex-shrink: 0;
      margin-top: 2px;
      transition: var(--transition);
    }

    .opt-radio-dot {
      width: 10px;
      height: 10px;
      border-radius: 50%;
      background: transparent;
      transform: scale(0);
      transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
    }

    .opt-card.selected .opt-radio {
      border-color: var(--cyan);
      box-shadow: 0 0 10px var(--cyan-glow);
    }

    .opt-card.selected .opt-radio-dot {
      background: var(--cyan);
      transform: scale(1);
    }

    .opt-card.correct .opt-radio {
      border-color: var(--emerald);
    }

    .opt-card.correct .opt-radio-dot {
      background: var(--emerald);
      transform: scale(1);
    }

    .opt-card.wrong .opt-radio {
      border-color: var(--rose);
    }

    .opt-card.wrong .opt-radio-dot {
      background: var(--rose);
      transform: scale(1);
    }

    .opt-label {
      flex: 1;
      font-size: 0.98rem;
      line-height: 1.6;
      color: var(--text-main);
    }

    .opt-index-badge {
      font-family: var(--font-display);
      font-weight: 800;
      color: var(--text-muted);
      margin-right: 0.35rem;
    }

    .enhanced-solution-box {
      background: rgba(11, 18, 32, 0.95);
      border: 1px solid rgba(14, 165, 233, 0.3);
      border-radius: var(--radius-md);
      padding: 1.35rem;
      margin-top: 1.25rem;
      box-shadow: var(--shadow-subtle);
      display: flex;
      flex-direction: column;
      gap: 1rem;
      animation: fadeInCard 0.3s ease-out;
    }

    .sol-answer-banner {
      background: linear-gradient(135deg, rgba(16, 185, 129, 0.15), rgba(14, 165, 233, 0.08));
      border: 1px solid rgba(16, 185, 129, 0.35);
      border-radius: var(--radius-sm);
      padding: 0.85rem 1.15rem;
      display: flex;
      justify-content: space-between;
      align-items: center;
      gap: 1rem;
    }

    .sol-ans-left {
      display: flex;
      align-items: center;
      gap: 0.85rem;
    }

    .sol-check-icon {
      font-size: 1.6rem;
      color: var(--emerald);
    }

    .sol-ans-tag {
      font-family: var(--font-display);
      font-size: 0.68rem;
      font-weight: 800;
      letter-spacing: 0.8px;
      color: var(--emerald);
      text-transform: uppercase;
      display: block;
    }

    .sol-ans-title {
      font-family: var(--font-display);
      font-size: 1.05rem;
      font-weight: 800;
      color: #fff;
    }

    .sol-section-title {
      font-family: var(--font-display);
      font-size: 0.88rem;
      font-weight: 800;
      color: #38bdf8;
      margin-bottom: 0.5rem;
      display: flex;
      align-items: center;
      gap: 0.45rem;
    }

    .sol-content-text {
      font-size: 0.96rem;
      line-height: 1.75;
      color: #f1f5f9;
    }

    .sol-content-text p {
      margin-bottom: 0.75rem;
    }

    .sol-content-text p:last-child {
      margin-bottom: 0;
    }

    .sol-step-badge {
      display: inline-flex;
      align-items: center;
      gap: 0.35rem;
      background: linear-gradient(135deg, rgba(14, 165, 233, 0.2), rgba(99, 102, 241, 0.15));
      border: 1px solid rgba(14, 165, 233, 0.35);
      border-radius: 6px;
      padding: 0.2rem 0.55rem;
      font-size: 0.78rem;
      font-weight: 800;
      color: #38bdf8;
      margin-top: 0.5rem;
      margin-bottom: 0.35rem;
    }

    .sol-statement-card {
      background: rgba(255, 255, 255, 0.04);
      border-left: 3px solid #0ea5e9;
      border-radius: 0 8px 8px 0;
      padding: 0.6rem 0.9rem;
      margin: 0.5rem 0;
      font-size: 0.92rem;
    }

    [data-theme="light"] .sol-statement-card {
      background: #f8fafc;
      border-left: 3px solid #0284c7;
      color: #090d16;
    }

    .sol-conclusion-card {
      background: rgba(16, 185, 129, 0.1);
      border: 1px solid rgba(16, 185, 129, 0.3);
      border-radius: 8px;
      padding: 0.75rem 1rem;
      margin-top: 0.75rem;
      font-weight: 600;
      color: #34d399;
    }

    [data-theme="light"] .sol-conclusion-card {
      background: rgba(16, 185, 129, 0.12);
      border-color: rgba(16, 185, 129, 0.35);
      color: #065f46;
    }

    .sol-takeaway-box {
      background: rgba(14, 165, 233, 0.08);
      border-left: 4px solid var(--cyan);
      border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
      padding: 0.75rem 1rem;
      font-size: 0.86rem;
      color: var(--text-main);
      line-height: 1.6;
    }

    .sol-takeaway-header {
      font-family: var(--font-display);
      font-size: 0.8rem;
      font-weight: 800;
      color: var(--cyan);
      margin-bottom: 0.25rem;
      display: flex;
      align-items: center;
      gap: 0.4rem;
    }

    .bottom-actions-bar {
      background: rgba(11, 18, 32, 0.9);
      backdrop-filter: blur(16px);
      border-top: 1px solid var(--border-color);
      padding: 0.75rem 1.5rem;
      display: flex;
      justify-content: space-between;
      align-items: center;
      flex-shrink: 0;
      z-index: 20;
    }

    .action-group {
      display: flex;
      align-items: center;
      gap: 0.65rem;
    }

    /* Mode Selection Screen */
    .landing-screen {
      max-width: 880px;
      margin: 1.5rem auto;
      padding: 0 1rem;
      display: flex;
      flex-direction: column;
      gap: 1.5rem;
      animation: fadeInCard 0.4s ease-out;
    }

    .landing-hero {
      text-align: center;
      padding: 0.5rem 0;
    }

    .landing-hero-icon {
      font-size: 3rem;
      background: linear-gradient(135deg, #0ea5e9, #8b5cf6);
      -webkit-background-clip: text;
      -webkit-text-fill-color: transparent;
      margin-bottom: 0.6rem;
      filter: drop-shadow(0 0 20px rgba(14, 165, 233, 0.4));
    }

    .landing-hero h2 {
      font-family: var(--font-display);
      font-size: 1.75rem;
      font-weight: 800;
      letter-spacing: -0.5px;
      margin-bottom: 0.4rem;
    }

    .landing-hero p {
      color: var(--text-muted);
      font-size: 0.95rem;
    }

    .mode-cards-grid {
      display: grid;
      grid-template-columns: repeat(2, 1fr);
      gap: 1rem;
    }

    .mode-item-card {
      background: var(--bg-card);
      backdrop-filter: blur(16px);
      border: 1px solid var(--border-color);
      border-radius: var(--radius-md);
      padding: 1.35rem;
      cursor: pointer;
      transition: var(--transition);
      display: flex;
      flex-direction: column;
      gap: 0.65rem;
    }

    .mode-item-card:hover {
      background: var(--bg-card-hover);
      border-color: rgba(14, 165, 233, 0.4);
      transform: translateY(-3px);
      box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    }

    .mode-item-card.active {
      background: linear-gradient(135deg, rgba(14, 165, 233, 0.15), rgba(99, 102, 241, 0.1));
      border-color: var(--cyan);
      box-shadow: 0 0 0 1px var(--cyan), 0 10px 30px rgba(14, 165, 233, 0.2);
    }

    .mode-card-header {
      display: flex;
      justify-content: space-between;
      align-items: center;
    }

    .mode-icon {
      width: 42px;
      height: 42px;
      border-radius: 10px;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 1.25rem;
    }

    .mode-icon.full {
      background: rgba(14, 165, 233, 0.15);
      color: #38bdf8;
    }

    .mode-icon.physics {
      background: rgba(14, 165, 233, 0.15);
      color: #38bdf8;
    }

    .mode-icon.chemistry {
      background: rgba(168, 85, 247, 0.15);
      color: #c084fc;
    }

    .mode-icon.biology {
      background: rgba(16, 185, 129, 0.15);
      color: #34d399;
    }

    .mode-badge {
      font-family: var(--font-display);
      font-size: 0.72rem;
      font-weight: 700;
      padding: 0.2rem 0.55rem;
      border-radius: 20px;
      background: rgba(255, 255, 255, 0.06);
      color: var(--text-muted);
    }

    .mode-title {
      font-family: var(--font-display);
      font-size: 1.15rem;
      font-weight: 800;
      color: #fff;
    }

    .mode-desc {
      font-size: 0.82rem;
      color: var(--text-dim);
      line-height: 1.5;
    }

    .mode-meta {
      display: flex;
      align-items: center;
      gap: 0.85rem;
      font-size: 0.76rem;
      color: var(--text-muted);
      font-weight: 600;
      margin-top: auto;
    }

    .mode-meta span {
      display: flex;
      align-items: center;
      gap: 0.3rem;
    }

    /* ==========================================================================
       TAB 2: RANK & COLLEGE PREDICTOR TOOL
       ========================================================================== */
    .content-hub-container {
      max-width: 1040px;
      margin: 2rem auto;
      padding: 0 1.25rem 4rem;
      display: flex;
      flex-direction: column;
      gap: 2rem;
      animation: fadeInCard 0.35s ease-out;
    }

    /* Intelligence Hub, Clinical Hub & Fee Structure Hub: full-width layout — remove max-width constraint */
    #tab-rank-predictor .content-hub-container,
    #tab-clinical-hub .content-hub-container,
    #tab-fee-structure .content-hub-container {
      max-width: 100%;
      margin: 1.5rem 0;
      padding: 0 1.5rem 4rem;
    }

    .hub-header {
      text-align: center;
    }

    .hub-header h2 {
      font-family: var(--font-display);
      font-size: 2rem;
      font-weight: 900;
      letter-spacing: -0.5px;
      margin-bottom: 0.4rem;
    }

    .hub-header p {
      color: var(--text-muted);
      font-size: 0.95rem;
      max-width: 650px;
      margin: 0 auto;
    }

    .predictor-grid {
      display: grid;
      grid-template-columns: 25% 1fr;
      gap: 1.25rem;
      align-items: start;
    }

    .predictor-card {
      background: var(--bg-card);
      backdrop-filter: blur(16px);
      border: 1px solid var(--border-color);
      border-radius: var(--radius-md);
      padding: 1.25rem;
      box-shadow: var(--shadow-subtle);
    }

    .quota-pill-btn {
      background: rgba(255, 255, 255, 0.04);
      border: 1px solid var(--border-color);
      border-radius: 10px;
      padding: 0.55rem 0.35rem;
      text-align: center;
      cursor: pointer;
      font-size: 0.78rem;
      font-weight: 800;
      color: #94a3b8;
      transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 0.2rem;
      user-select: none;
    }

    .quota-pill-btn:hover {
      background: rgba(14, 165, 233, 0.1);
      border-color: var(--cyan);
      color: #fff;
    }

    .quota-pill-btn.active {
      background: linear-gradient(135deg, rgba(14, 165, 233, 0.25), rgba(168, 85, 247, 0.25));
      border: 1.5px solid var(--cyan);
      color: #fff;
      box-shadow: 0 0 15px rgba(14, 165, 233, 0.35);
    }

    .state-quota-sub-pill {
      background: rgba(255, 255, 255, 0.04);
      border: 1px solid var(--border-color);
      border-radius: 8px;
      padding: 0.4rem 0.25rem;
      text-align: center;
      cursor: pointer;
      font-size: 0.72rem;
      font-weight: 800;
      color: #94a3b8;
      transition: all 0.2s ease;
      user-select: none;
    }

    .state-quota-sub-pill:hover,
    .state-quota-sub-pill.active {
      background: rgba(168, 85, 247, 0.2);
      border-color: var(--purple);
      color: #fff;
    }

    .predictor-grid.full-page-expanded {
      grid-template-columns: 1fr !important;
    }

    .predictor-grid.full-page-expanded #predictorSidebarCard {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
      gap: 0.75rem;
      padding: 1rem;
    }

    /* Scoped dark theme for predictor & clinical filter selects only */
    .form-select,
    #predictorSidebarCard .form-select,
    #clinicalGridWrap .form-select {
      background-color: #0b1329;
      background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="%230ea5e9" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"><path d="m6 9 6 6 6-6"/></svg>');
      background-repeat: no-repeat;
      background-position: right 0.75rem center;
      background-size: 16px;
      -webkit-appearance: none;
      -moz-appearance: none;
      appearance: none;
      border: 1px solid var(--border-color);
      border-radius: var(--radius-sm);
      padding: 0.65rem 2.2rem 0.65rem 0.85rem;
      color: #ffffff;
      font-family: var(--font-display);
      font-size: 0.88rem;
      font-weight: 700;
      outline: none;
      max-width: 100%;
      width: 100%;
      box-sizing: border-box;
      text-overflow: ellipsis;
      white-space: nowrap;
      overflow: hidden;
      transition: var(--transition);
      cursor: pointer;
    }

    .form-select option,
    #predictorSidebarCard .form-select option,
    #clinicalGridWrap .form-select option {
      background-color: #0f172a;
      color: #ffffff;
      padding: 0.75rem 0.5rem;
      font-size: 0.88rem;
      font-weight: 600;
    }

    #predictorSidebarCard .form-select:focus,
    #clinicalGridWrap .form-select:focus,
    #predictorSidebarCard .form-input:focus,
    #clinicalGridWrap .form-input:focus {
      border-color: var(--cyan);
      box-shadow: 0 0 15px var(--cyan-glow);
    }

    .score-slider {
      width: 100%;
      height: 8px;
      border-radius: 4px;
      background: rgba(255, 255, 255, 0.1);
      outline: none;
      accent-color: var(--cyan);
      cursor: pointer;
    }

    .predicted-rank-box {
      background: linear-gradient(135deg, rgba(14, 165, 233, 0.15), rgba(99, 102, 241, 0.1));
      border: 1px solid rgba(14, 165, 233, 0.3);
      border-radius: var(--radius-md);
      padding: 1.5rem;
      text-align: center;
      margin-bottom: 1.25rem;
    }

    .predicted-air-val {
      font-family: var(--font-display);
      font-size: 2.75rem;
      font-weight: 900;
      color: var(--cyan);
      line-height: 1.1;
      text-shadow: 0 0 20px var(--cyan-glow);
    }

    .college-list-box {
      display: flex;
      flex-direction: column;
      gap: 1rem;
      max-height: 720px;
      overflow-y: auto;
      padding-right: 0.35rem;
    }

    .college-intel-card,
    .aiq-cutoff-card,
    .fee-matrix-card,
    .state-cutoff-card {
      background: var(--bg-card);
      border: 1px solid var(--border-color);
      border-radius: 16px;
      padding: 1.25rem;
      display: flex;
      flex-direction: column;
      gap: 0.75rem;
      flex-shrink: 0;
      min-height: auto;
      width: 100%;
      box-sizing: border-box;
      transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
      position: relative;
      overflow: hidden;
      box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    }

    .college-intel-card:hover,
    .aiq-cutoff-card:hover,
    .fee-matrix-card:hover,
    .state-cutoff-card:hover {
      border-color: rgba(14, 165, 233, 0.4);
      transform: translateY(-2px);
      box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18);
    }

    .college-name {
      font-family: var(--font-display);
      font-size: 0.92rem;
      font-weight: 700;
      color: #fff;
    }

    .college-quota {
      font-size: 0.72rem;
      color: var(--text-muted);
      margin-top: 0.15rem;
    }

    .college-badge-chance {
      font-family: var(--font-display);
      font-size: 0.75rem;
      font-weight: 800;
      padding: 0.25rem 0.65rem;
      border-radius: 20px;
    }

    .chance-high {
      background: rgba(16, 185, 129, 0.15);
      color: #34d399;
      border: 1px solid rgba(16, 185, 129, 0.3);
    }

    .chance-moderate {
      background: rgba(245, 158, 11, 0.15);
      color: #fbbf24;
      border: 1px solid rgba(245, 158, 11, 0.3);
    }

    .chance-dream {
      background: rgba(139, 92, 246, 0.15);
      color: #c084fc;
      border: 1px solid rgba(139, 92, 246, 0.3);
    }

    /* ==========================================================================
       TAB 3: CHAPTER WEIGHTAGE & SYLLABUS TRACKER
       ========================================================================== */
    .weightage-search-bar {
      display: flex;
      gap: 0.75rem;
      margin-bottom: 1.25rem;
    }

    .subject-filter-chips {
      display: flex;
      gap: 0.5rem;
      margin-bottom: 1.25rem;
    }

    .chip-btn {
      background: rgba(255, 255, 255, 0.04);
      border: 1px solid var(--border-color);
      border-radius: 20px;
      padding: 0.4rem 1rem;
      font-family: var(--font-display);
      font-size: 0.8rem;
      font-weight: 700;
      color: var(--text-muted);
      cursor: pointer;
      transition: var(--transition);
    }

    .chip-btn.active {
      background: var(--cyan);
      color: #fff;
      border-color: var(--cyan);
      box-shadow: 0 0 15px var(--cyan-glow);
    }

    .chapters-table-card {
      background: var(--bg-card);
      backdrop-filter: blur(16px);
      border: 1px solid var(--border-color);
      border-radius: var(--radius-md);
      overflow-x: auto;
      -webkit-overflow-scrolling: touch;
      scrollbar-width: thin;
      box-shadow: var(--shadow-subtle);
    }

    .weightage-table {
      width: 100%;
      border-collapse: collapse;
    }

    #formulaCompactTable {
      min-width: 680px;
    }

    .weightage-table th,
    .weightage-table td {
      padding: 0.85rem 1.15rem;
      border-bottom: 1px solid var(--border-color);
      text-align: left;
    }

    .weightage-table th {
      font-family: var(--font-display);
      font-weight: 800;
      color: var(--text-muted);
      font-size: 0.78rem;
      text-transform: uppercase;
      background: rgba(11, 18, 32, 0.6);
    }

    .weight-bar-wrap {
      width: 120px;
      height: 6px;
      background: rgba(255, 255, 255, 0.1);
      border-radius: 3px;
      overflow: hidden;
      display: inline-block;
      vertical-align: middle;
      margin-left: 0.5rem;
    }

    .weight-bar-fill {
      height: 100%;
      background: linear-gradient(90deg, #0ea5e9, #10b981);
      border-radius: 3px;
    }

    /* ==========================================================================
       TAB 4: HIGH-YIELD FORMULA CHEATSHEET (PREMIUM RESPONSIVE DESIGN)
       ========================================================================== */
    .view-toggle-btn {
      background: transparent;
      border: none;
      color: #94a3b8;
      font-family: var(--font-display);
      font-size: 0.78rem;
      font-weight: 700;
      padding: 0.45rem 0.9rem;
      border-radius: 9999px;
      cursor: pointer;
      display: inline-flex;
      align-items: center;
      gap: 0.35rem;
      transition: all 0.2s ease;
    }

    .view-toggle-btn:hover {
      color: #f8fafc;
      background: rgba(255, 255, 255, 0.08);
    }

    .view-toggle-btn.active {
      background: #0ea5e9;
      color: #ffffff;
      box-shadow: 0 2px 12px rgba(14, 165, 233, 0.35);
    }

    [data-theme="light"] .view-toggle-btn {
      color: #64748b;
    }

    [data-theme="light"] .view-toggle-btn.active {
      background: #0ea5e9;
      color: #ffffff;
    }

    .subject-filter-chips {
      display: flex;
      gap: 0.6rem;
      margin-bottom: 1.25rem;
      overflow-x: auto;
      white-space: nowrap;
      padding-bottom: 0.4rem;
      scrollbar-width: none;
      -webkit-overflow-scrolling: touch;
    }

    .subject-filter-chips::-webkit-scrollbar {
      display: none;
    }

    .chip-btn.formula-chip {
      background: var(--bg-card);
      border: 1px solid rgba(255, 255, 255, 0.1);
      border-radius: 9999px;
      padding: 0.5rem 1.15rem;
      font-family: var(--font-display);
      font-size: 0.84rem;
      font-weight: 700;
      color: #94a3b8;
      cursor: pointer;
      backdrop-filter: blur(12px);
      -webkit-backdrop-filter: blur(12px);
      transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
      display: inline-flex;
      align-items: center;
      gap: 0.4rem;
      flex-shrink: 0;
    }

    .chip-btn.formula-chip:hover {
      color: #f8fafc;
      border-color: rgba(59, 130, 246, 0.4);
      background: rgba(30, 41, 59, 0.8);
      transform: translateY(-1px);
    }

    .chip-btn.formula-chip.active {
      background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
      color: #ffffff;
      border-color: #3b82f6;
      box-shadow: 0 4px 16px rgba(37, 99, 235, 0.4);
      text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    }

    .formula-cards-grid {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
      gap: 1.35rem;
      margin-top: 1rem;
    }

    .formula-card {
      background: linear-gradient(145deg, rgba(20, 30, 52, 0.75) 0%, rgba(11, 18, 32, 0.88) 100%);
      backdrop-filter: blur(20px);
      -webkit-backdrop-filter: blur(20px);
      border: 1px solid rgba(255, 255, 255, 0.08);
      border-radius: 18px;
      padding: 1.35rem;
      display: flex;
      flex-direction: column;
      gap: 0.75rem;
      box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
      transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
      position: relative;
      overflow: hidden;
    }

    .formula-card::before {
      content: "";
      position: absolute;
      top: 0;
      left: 0;
      right: 0;
      height: 3px;
      background: linear-gradient(90deg, transparent, rgba(59, 130, 246, 0.5), transparent);
      opacity: 0;
      transition: opacity 0.25s ease;
    }

    .formula-card:hover {
      border-color: rgba(59, 130, 246, 0.35);
      transform: translateY(-4px);
      box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4);
    }

    .formula-card:hover::before {
      opacity: 1;
    }

    .formula-title {
      font-family: var(--font-display);
      font-size: 1.02rem;
      font-weight: 800;
      color: #f8fafc;
      display: flex;
      justify-content: space-between;
      align-items: center;
      gap: 0.5rem;
      line-height: 1.3;
    }

    .badge-subject {
      font-family: var(--font-display);
      font-size: 0.7rem;
      font-weight: 800;
      text-transform: uppercase;
      letter-spacing: 0.06em;
      padding: 0.2rem 0.6rem;
      border-radius: 9999px;
      flex-shrink: 0;
    }

    .badge-subject.physics {
      background: rgba(59, 130, 246, 0.15);
      color: #60a5fa;
      border: 1px solid rgba(59, 130, 246, 0.3);
      box-shadow: 0 0 10px rgba(59, 130, 246, 0.15);
    }

    .badge-subject.chemistry {
      background: rgba(168, 85, 247, 0.15);
      color: #c084fc;
      border: 1px solid rgba(168, 85, 247, 0.3);
      box-shadow: 0 0 10px rgba(168, 85, 247, 0.15);
    }

    .badge-subject.biology {
      background: rgba(34, 197, 94, 0.15);
      color: #4ade80;
      border: 1px solid rgba(34, 197, 94, 0.3);
      box-shadow: 0 0 10px rgba(34, 197, 94, 0.15);
    }

    .formula-eq-box {
      background: rgba(7, 12, 22, 0.85);
      border: 1px solid rgba(255, 255, 255, 0.07);
      border-radius: 12px;
      padding: 0.9rem 1rem;
      text-align: center;
      font-size: 1.12rem;
      color: #f1f5f9;
      margin: 0.2rem 0;
      overflow-x: auto;
      scrollbar-width: thin;
      box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.4);
    }

    .formula-note {
      font-size: 0.84rem;
      color: #cbd5e1;
      line-height: 1.55;
      background: var(--bg-card);
      border-left: 3px solid #3b82f6;
      border-radius: 0 10px 10px 0;
      padding: 0.7rem 0.85rem;
      margin-top: 0.25rem;
    }

    .formula-note strong {
      color: #f8fafc;
      font-weight: 700;
    }

    /* Mobile Responsive Optimizations */
    @media (max-width: 640px) {
      .content-hub-container {
        padding: 0 0.75rem 3rem;
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
      }

      .chapters-table-card {
        width: 100%;
        max-width: 100%;
        border-radius: 12px;
      }

      .formula-cards-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
      }

      .formula-card {
        padding: 1.1rem;
        border-radius: 14px;
      }

      .formula-title {
        font-size: 0.95rem;
      }

      .formula-eq-box {
        font-size: 1rem;
        padding: 0.75rem;
      }

      .formula-note {
        font-size: 0.8rem;
        padding: 0.6rem 0.75rem;
      }

      #flashcardTitle {
        font-size: 1.1rem !important;
      }

      #flashcardEqBox {
        font-size: 1rem !important;
        padding: 1rem !important;
      }

      /* Mobile Viewport Fixes */
      #notifDropdown {
        width: calc(100vw - 1.25rem) !important;
        max-width: 350px !important;
        right: -10px !important;
      }

      .college-intel-card,
      .aiq-cutoff-card,
      .fee-matrix-card,
      .state-cutoff-card {
        padding: 0.95rem !important;
        border-radius: 14px !important;
      }

      .college-intel-header {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 0.5rem !important;
      }

      .college-clinical-metrics {
        grid-template-columns: 1fr !important;
        gap: 0.35rem !important;
      }

      .form-select,
      #predictorSidebarCard .form-select,
      #clinicalGridWrap .form-select {
        font-size: 16px !important;
        /* Prevents auto-zoom on iOS Safari */
        padding: 0.7rem 2.2rem 0.7rem 0.85rem !important;
        border-radius: 12px !important;
      }

      .modal-surface-card {
        padding: 1.25rem 0.9rem !important;
        max-width: 96vw !important;
        max-height: 92vh !important;
        overflow-y: auto !important;
      }
    }

    /* ─── STRUCTURED SOLUTION STEP CARDS ─── */
    .sol-step-card {
      background: rgba(10, 16, 28, 0.7);
      border: 1px solid rgba(255, 255, 255, 0.08);
      border-left: 4px solid var(--cyan);
      border-radius: 10px;
      padding: 0.9rem 1.15rem;
      margin: 0.85rem 0;
      box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
      transition: all 0.2s ease;
    }

    .sol-step-card:hover {
      background: rgba(14, 22, 38, 0.9);
      border-color: rgba(14, 165, 233, 0.35);
      border-left-color: #38bdf8;
      box-shadow: 0 6px 20px rgba(14, 165, 233, 0.15);
    }

    .sol-step-header {
      font-family: var(--font-display);
      font-weight: 800;
      font-size: 0.92rem;
      color: #38bdf8;
      display: flex;
      align-items: center;
      gap: 0.5rem;
      margin-bottom: 0.45rem;
      letter-spacing: 0.2px;
    }

    .sol-step-body {
      color: #f1f5f9;
      font-size: 0.89rem;
      line-height: 1.7;
    }

    .sol-conclusion-card {
      background: rgba(16, 185, 129, 0.12);
      border: 1px solid rgba(16, 185, 129, 0.35);
      border-radius: 10px;
      padding: 0.9rem 1.15rem;
      margin: 0.85rem 0;
      color: #f0fdf4;
      font-size: 0.91rem;
      line-height: 1.65;
      box-shadow: 0 4px 15px rgba(16, 185, 129, 0.12);
    }

    .sol-statement-card {
      background: rgba(139, 92, 246, 0.1);
      border: 1px solid rgba(139, 92, 246, 0.25);
      border-left: 4px solid var(--purple);
      border-radius: 8px;
      padding: 0.75rem 1rem;
      margin: 0.65rem 0;
      font-size: 0.88rem;
      color: #f8fafc;
      line-height: 1.6;
    }

    .sol-intro-text {
      color: #e2e8f0;
      font-size: 0.9rem;
      line-height: 1.7;
      margin-bottom: 0.65rem;
    }

    /* ==========================================================================
       FREEMIUM TEASER & CONTENT GATING (PREDICTOR & FORMULA HUB)
       ========================================================================== */
    .freemium-locked-banner {
      background: var(--bg-card);
      border: 2px solid rgba(245, 158, 11, 0.45);
      border-radius: 20px;
      padding: 2.25rem 1.75rem;
      text-align: center;
      position: relative;
      overflow: hidden;
      margin-top: 1.5rem;
      box-shadow: 0 12px 35px rgba(245, 158, 11, 0.12), 0 4px 20px rgba(0, 0, 0, 0.08);
      transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    }

    .freemium-locked-banner::before {
      content: '';
      position: absolute;
      top: -50%;
      left: -50%;
      width: 200%;
      height: 200%;
      background: radial-gradient(circle at center, rgba(245, 158, 11, 0.08), transparent 70%);
      pointer-events: none;
    }

    .freemium-locked-banner:hover {
      border-color: #fbbf24;
      transform: translateY(-2px);
      box-shadow: 0 18px 45px rgba(245, 158, 11, 0.22);
    }

    .freemium-locked-title {
      color: var(--text-main);
      font-family: var(--font-display);
      font-size: 1.25rem;
      font-weight: 800;
      margin-bottom: 0.5rem;
      letter-spacing: -0.2px;
    }

    .freemium-locked-desc {
      color: var(--text-muted);
      font-size: 0.88rem;
      max-width: 540px;
      margin: 0 auto 1.35rem;
      line-height: 1.6;
      font-weight: 500;
    }

    .freemium-locked-pill {
      display: inline-flex;
      align-items: center;
      gap: 0.45rem;
      background: rgba(245, 158, 11, 0.15);
      color: #fbbf24;
      border: 1px solid rgba(245, 158, 11, 0.4);
      padding: 0.35rem 0.85rem;
      border-radius: 999px;
      font-size: 0.75rem;
      font-weight: 800;
      letter-spacing: 0.06em;
      text-transform: uppercase;
      margin-bottom: 0.9rem;
      box-shadow: 0 2px 10px rgba(245, 158, 11, 0.15);
    }

    .freemium-blur-row {
      filter: blur(5px);
      opacity: 0.4;
      user-select: none;
      pointer-events: none;
      transition: filter 0.3s ease;
    }

    .freemium-active-pro-badge {
      display: inline-flex;
      align-items: center;
      gap: 0.5rem;
      background: linear-gradient(135deg, rgba(16, 185, 129, 0.15), rgba(14, 165, 233, 0.15));
      border: 1px solid rgba(16, 185, 129, 0.35);
      padding: 0.45rem 0.95rem;
      border-radius: 12px;
      font-size: 0.82rem;
      font-weight: 800;
      color: #34d399;
      margin-bottom: 1rem;
      box-shadow: 0 4px 15px rgba(16, 185, 129, 0.1);
    }

    .college-intel-card {
      background: var(--bg-card);
      border: 1px solid var(--border-color);
      border-radius: 16px;
      padding: 1.25rem;
      display: flex;
      flex-direction: column;
      gap: 0.75rem;
      flex-shrink: 0;
      transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
      position: relative;
      overflow: hidden;
      box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    }

    .college-intel-card:hover {
      border-color: rgba(14, 165, 233, 0.4);
      transform: translateY(-2px);
      box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    }

    .college-intel-header {
      display: flex;
      justify-content: space-between;
      align-items: flex-start;
      gap: 0.75rem;
      flex-wrap: wrap;
    }

    .college-intel-name {
      font-family: var(--font-display);
      font-size: 1.05rem;
      font-weight: 800;
      color: var(--text-main);
      line-height: 1.35;
    }

    .college-intel-sub {
      font-size: 0.82rem;
      color: var(--text-muted);
      margin-top: 0.25rem;
      line-height: 1.45;
      font-weight: 600;
    }

    .college-clinical-metrics {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
      gap: 0.5rem;
      background: rgba(14, 165, 233, 0.05);
      border: 1px solid var(--border-color);
      border-radius: 12px;
      padding: 0.75rem 0.95rem;
      font-size: 0.8rem;
    }

    .clinical-metric-item {
      display: flex;
      align-items: center;
      gap: 0.45rem;
      color: var(--text-muted);
      font-weight: 600;
    }

    .clinical-metric-item strong {
      color: var(--text-main);
      font-weight: 800;
    }

    .college-intel-footer {
      display: flex;
      justify-content: space-between;
      align-items: center;
      gap: 0.5rem;
      border-top: 1px solid var(--border-color);
      padding-top: 0.75rem;
      flex-wrap: wrap;
      font-size: 0.8rem;
      font-weight: 600;
    }

    /* ==========================================================================
       MOBILE RESPONSIVE HAMBURGER & OFF-CANVAS NAVIGATION DRAWER
       ========================================================================== */
    .btn-mobile-nav-toggle {
      display: none;
      background: rgba(255, 255, 255, 0.06);
      border: 1px solid var(--border-color);
      color: #fff;
      font-size: 1.15rem;
      padding: 0.45rem 0.75rem;
      border-radius: 10px;
      cursor: pointer;
      align-items: center;
      justify-content: center;
      transition: all 0.2s ease;
    }

    .btn-mobile-nav-toggle:hover {
      background: rgba(14, 165, 233, 0.2);
      border-color: var(--cyan);
      color: var(--cyan);
    }

    .mobile-nav-backdrop {
      display: none;
      position: fixed;
      inset: 0;
      background: rgba(3, 7, 18, 0.8);
      backdrop-filter: blur(8px);
      -webkit-backdrop-filter: blur(8px);
      z-index: 999998;
      opacity: 0;
      transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    }

    .mobile-nav-backdrop.active {
      display: block;
      opacity: 1;
    }

    .mobile-nav-drawer {
      position: fixed;
      top: 0;
      bottom: 0;
      left: -320px;
      width: 300px;
      max-width: 85vw;
      background: linear-gradient(180deg, #090e1a 0%, #060a12 100%);
      border-right: 1px solid rgba(255, 255, 255, 0.08);
      box-shadow: 10px 0 40px rgba(0, 0, 0, 0.85);
      z-index: 999999;
      display: flex;
      flex-direction: column;
      padding: 1.5rem 1.25rem;
      transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
      overflow-y: auto;
    }

    .mobile-nav-drawer.active {
      transform: translateX(320px);
    }

    .mobile-drawer-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      margin-bottom: 1.25rem;
      padding-bottom: 1rem;
      border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    }

    .mobile-drawer-links {
      display: flex;
      flex-direction: column;
      gap: 0.5rem;
      flex: 1;
    }

    .mobile-drawer-link {
      display: flex;
      align-items: center;
      gap: 0.85rem;
      padding: 0.85rem 1rem;
      border-radius: 12px;
      background: transparent;
      border: 1px solid transparent;
      color: #94a3b8;
      font-weight: 600;
      font-size: 0.92rem;
      text-decoration: none;
      cursor: pointer;
      transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    }

    .mobile-drawer-link i {
      font-size: 1.1rem;
      width: 22px;
      text-align: center;
      color: var(--cyan);
    }

    .mobile-drawer-link:hover,
    .mobile-drawer-link.active {
      background: rgba(14, 165, 233, 0.12);
      border-color: rgba(14, 165, 233, 0.3);
      color: #fff;
    }

    .mobile-drawer-link.active {
      font-weight: 800;
      color: var(--cyan);
    }

    /* Mobile Bottom Floating Nav Bar (When Not In Exam Mode) */
    .mobile-bottom-nav {
      display: none;
      position: fixed;
      bottom: 0;
      left: 0;
      right: 0;
      height: 62px;
      background: rgba(9, 14, 26, 0.95);
      backdrop-filter: blur(16px);
      -webkit-backdrop-filter: blur(16px);
      border-top: 1px solid rgba(255, 255, 255, 0.08);
      z-index: 9999;
      justify-content: space-around;
      align-items: center;
      padding: 0.25rem 0.5rem;
      box-shadow: 0 -5px 25px rgba(0, 0, 0, 0.5);
    }

    .mobile-bottom-item {
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 0.2rem;
      color: #64748b;
      font-size: 0.65rem;
      font-weight: 700;
      background: none;
      border: none;
      cursor: pointer;
      padding: 0.35rem 0.6rem;
      border-radius: 8px;
      transition: all 0.2s ease;
    }

    .mobile-bottom-item i {
      font-size: 1.1rem;
    }

    .mobile-bottom-item.active {
      color: var(--cyan);
    }

    [data-theme="light"] .mobile-bottom-nav {
      background: rgba(255, 255, 255, 0.96);
      border-top-color: rgba(15, 23, 42, 0.14);
      box-shadow: 0 -6px 24px rgba(15, 23, 42, 0.09);
    }

    [data-theme="light"] .mobile-bottom-item {
      color: #475569;
    }

    [data-theme="light"] .mobile-bottom-item.active {
      color: #0369a1;
      background: rgba(14, 165, 233, 0.1);
    }

    /* ==========================================================================
       TAB 5: NEET EXAM GUIDE & FAQS
       ========================================================================== */
    .faq-accordion-box {
      display: flex;
      flex-direction: column;
      gap: 0.75rem;
    }

    .faq-item {
      background: var(--bg-card);
      border: 1px solid var(--border-color);
      border-radius: var(--radius-md);
      overflow: hidden;
      transition: var(--transition);
    }

    .faq-question {
      padding: 1.15rem 1.35rem;
      font-family: var(--font-display);
      font-size: 1rem;
      font-weight: 700;
      color: #fff;
      cursor: pointer;
      display: flex;
      justify-content: space-between;
      align-items: center;
    }

    .faq-question i {
      transition: transform 0.25s ease;
      color: var(--cyan);
    }

    .faq-item.open .faq-question i {
      transform: rotate(180deg);
    }

    .faq-answer {
      display: none;
      padding: 0 1.35rem 1.25rem;
      color: var(--text-muted);
      font-size: 0.92rem;
      line-height: 1.7;
      border-top: 1px solid rgba(255, 255, 255, 0.04);
      padding-top: 0.85rem;
    }

    .faq-item.open .faq-answer {
      display: block;
    }

    /* ==========================================================================
       MODAL WINDOWS & SUBMISSION MODAL
       ========================================================================== */
    .modal-backdrop-wrap {
      display: none;
      position: fixed;
      inset: 0;
      background: radial-gradient(circle at center, rgba(14, 22, 38, 0.88), rgba(3, 7, 18, 0.96));
      backdrop-filter: blur(16px);
      -webkit-backdrop-filter: blur(16px);
      z-index: 999999;
      align-items: center;
      justify-content: center;
      padding: 1.25rem;
      animation: fadeInBackdrop 0.25s ease-out;
    }

    @keyframes fadeInBackdrop {
      from {
        opacity: 0;
      }

      to {
        opacity: 1;
      }
    }

    .modal-surface-card {
      background: linear-gradient(145deg, rgba(17, 27, 49, 0.95), rgba(11, 18, 33, 0.98));
      border: 1px solid rgba(14, 165, 233, 0.25);
      border-radius: 24px;
      padding: 2.25rem 2rem;
      width: 100%;
      max-height: 90vh;
      overflow-y: auto;
      box-shadow: 0 25px 80px rgba(0, 0, 0, 0.9), 0 0 40px rgba(14, 165, 233, 0.12);
      animation: zoomModal 0.28s cubic-bezier(0.16, 1, 0.3, 1);
    }

    /* Paywall Interactive Presentation Pitch Deck */
    .paywall-layout-wrap {
      display: flex;
      gap: 2rem;
      align-items: stretch;
      text-align: left;
      flex-direction: column;
    }

    @media (min-width: 768px) {
      .paywall-layout-wrap {
        flex-direction: row;
      }
    }

    .paywall-slide-column {
      flex: 1.1;
      display: flex;
      flex-direction: column;
      background: rgba(8, 14, 26, 0.4);
      border: 1px solid rgba(255, 255, 255, 0.05);
      border-radius: 20px;
      padding: 1.5rem;
      position: relative;
      overflow: hidden;
      justify-content: space-between;
      min-height: 380px;
    }

    .paywall-plans-column {
      flex: 1;
      display: flex;
      flex-direction: column;
      justify-content: center;
    }

    .ppt-deck {
      position: relative;
      flex: 1;
      min-height: 260px;
      margin-bottom: 1rem;
    }

    .ppt-slide {
      position: absolute;
      inset: 0;
      opacity: 0;
      transform: translateY(15px) scale(0.97);
      transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
      pointer-events: none;
      display: flex;
      flex-direction: column;
      justify-content: center;
    }

    .ppt-slide.active {
      opacity: 1;
      transform: translateY(0) scale(1);
      pointer-events: auto;
      z-index: 2;
    }

    .ppt-slide-icon {
      font-size: 2.25rem;
      background: linear-gradient(135deg, var(--cyan), var(--purple));
      -webkit-background-clip: text;
      -webkit-text-fill-color: transparent;
      margin-bottom: 0.85rem;
    }

    .ppt-slide-title {
      font-family: var(--font-display);
      font-size: 1.25rem;
      font-weight: 800;
      color: #ffffff;
      margin-bottom: 0.5rem;
    }

    .ppt-slide-desc {
      color: #94a3b8;
      font-size: 0.88rem;
      line-height: 1.5;
    }

    .ppt-controls {
      display: flex;
      align-items: center;
      justify-content: space-between;
      margin-top: auto;
      border-top: 1px solid rgba(255, 255, 255, 0.06);
      padding-top: 0.85rem;
    }

    .ppt-indicators {
      display: flex;
      gap: 0.45rem;
    }

    .ppt-dot {
      width: 8px;
      height: 8px;
      border-radius: 50%;
      background: rgba(255, 255, 255, 0.2);
      cursor: pointer;
      transition: all 0.25s ease;
    }

    .ppt-dot.active {
      background: var(--cyan);
      transform: scale(1.2);
      box-shadow: 0 0 10px rgba(14, 165, 233, 0.5);
    }

    .ppt-nav-btn {
      background: rgba(255, 255, 255, 0.05);
      border: 1px solid rgba(255, 255, 255, 0.08);
      color: #cbd5e1;
      width: 28px;
      height: 28px;
      border-radius: 8px;
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      transition: all 0.2s ease;
    }

    .ppt-nav-btn:hover {
      background: rgba(255, 255, 255, 0.12);
      color: #ffffff;
    }

    .form-input {
      background: rgba(8, 14, 26, 0.85);
      border: 1px solid rgba(255, 255, 255, 0.14);
      border-radius: 12px;
      padding: 0.75rem 1rem;
      font-size: 0.92rem;
      color: #f8fafc;
      font-family: inherit;
      transition: all 0.2s ease;
      outline: none;
    }

    .form-input:focus {
      background: rgba(14, 22, 38, 0.95);
      border-color: var(--cyan);
      box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.25);
      color: #fff;
    }

    .form-input::placeholder {
      color: #64748b;
      font-weight: 500;
    }

    .modal-overlay {
      display: none;
      position: fixed;
      inset: 0;
      background: rgba(0, 0, 0, 0.75);
      backdrop-filter: blur(10px);
      -webkit-backdrop-filter: blur(10px);
      z-index: 999999;
      align-items: center;
      justify-content: center;
      padding: 1rem;
    }

    .modal-overlay.active {
      display: flex;
    }

    .modal-window {
      background: #0d1527;
      border: 1px solid rgba(255, 255, 255, 0.12);
      border-radius: var(--radius-lg);
      padding: 2rem;
      max-width: 620px;
      width: 100%;
      max-height: 90vh;
      overflow-y: auto;
      box-shadow: 0 25px 70px rgba(0, 0, 0, 0.7);
      animation: zoomModal 0.25s ease-out;
    }

    @keyframes zoomModal {
      from {
        opacity: 0;
        transform: scale(0.95);
      }

      to {
        opacity: 1;
        transform: scale(1);
      }
    }

    .modal-header-title {
      font-family: var(--font-display);
      font-size: 1.45rem;
      font-weight: 800;
      text-align: center;
      margin-bottom: 1.25rem;
    }

    .score-banner {
      background: linear-gradient(135deg, rgba(14, 165, 233, 0.15), rgba(99, 102, 241, 0.1));
      border: 1px solid rgba(14, 165, 233, 0.3);
      border-radius: var(--radius-md);
      padding: 1.5rem;
      text-align: center;
      margin-bottom: 1.25rem;
    }

    .score-val {
      font-family: var(--font-display);
      font-size: 3.5rem;
      font-weight: 900;
      color: var(--cyan);
      line-height: 1;
      text-shadow: 0 0 25px var(--cyan-glow);
    }

    .score-sub {
      color: var(--text-muted);
      font-size: 0.9rem;
      font-weight: 600;
      margin-top: 0.4rem;
    }

    .stats-trio {
      display: grid;
      grid-template-columns: repeat(3, 1fr);
      gap: 0.75rem;
      margin-bottom: 1.25rem;
    }

    .stat-card {
      background: rgba(255, 255, 255, 0.03);
      border: 1px solid var(--border-color);
      border-radius: var(--radius-sm);
      padding: 0.85rem;
      text-align: center;
    }

    .stat-num {
      font-family: var(--font-display);
      font-size: 1.5rem;
      font-weight: 800;
    }

    .stat-num.correct {
      color: var(--emerald);
    }

    .stat-num.wrong {
      color: var(--rose);
    }

    .stat-num.skipped {
      color: var(--text-dim);
    }

    .stat-label {
      font-size: 0.72rem;
      color: var(--text-muted);
      text-transform: uppercase;
      font-weight: 600;
      margin-top: 0.2rem;
    }

    .report-table-styled {
      width: 100%;
      border-collapse: collapse;
      margin: 1rem 0;
      font-size: 0.88rem;
    }

    .report-table-styled th,
    .report-table-styled td {
      padding: 0.65rem 0.85rem;
      border-bottom: 1px solid var(--border-color);
      text-align: left;
    }

    .report-table-styled th {
      font-family: var(--font-display);
      font-weight: 700;
      color: var(--text-muted);
      font-size: 0.76rem;
      text-transform: uppercase;
    }

    .lightbox-modal {
      display: none;
      position: fixed;
      inset: 0;
      background: rgba(0, 0, 0, 0.9);
      backdrop-filter: blur(12px);
      z-index: 999999;
      align-items: center;
      justify-content: center;
      cursor: zoom-out;
      padding: 1.5rem;
    }

    .lightbox-modal.active {
      display: flex;
    }

    .lightbox-img {
      max-width: 95vw;
      max-height: 90vh;
      border-radius: var(--radius-md);
      box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8);
      background: #fff;
    }

    .info-modal {
      position: fixed;
      inset: 0;
      margin: auto;
      width: min(720px, calc(100% - 2rem));
      max-width: none;
      max-height: 85vh;
      max-height: min(85dvh, calc(100dvh - 2rem));
      padding: 0;
      border: 1px solid var(--border-color);
      border-radius: var(--radius-lg);
      background: var(--bg-surface);
      color: var(--text-main);
      color-scheme: dark;
      box-shadow: 0 20px 60px rgba(2, 6, 23, 0.45);
      overflow: hidden;
    }

    .info-modal[open] {
      display: flex;
      flex-direction: column;
    }

    .info-modal::backdrop {
      background: rgba(2, 6, 23, 0.74);
      backdrop-filter: blur(6px);
    }

    [data-theme="light"] .info-modal {
      color-scheme: light;
    }

    [data-theme="light"] .info-modal::backdrop {
      background: rgba(15, 23, 42, 0.52);
    }

    .info-modal-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 0.75rem;
      flex-shrink: 0;
      padding: 0.85rem clamp(1.15rem, 4vw, 2.25rem);
      border-bottom: 1px solid var(--border-color);
    }

    .info-modal-card {
      padding: clamp(1.15rem, 4vw, 2.25rem);
      min-height: 0;
      overflow-y: auto;
      overscroll-behavior: contain;
      overflow-wrap: anywhere;
    }

    .info-modal-header h3 {
      font-family: var(--font-display);
      font-size: 1.4rem;
      font-weight: 800;
      overflow-wrap: anywhere;
      color: var(--text-main);
    }

    .info-modal-card h4 {
      margin: 1rem 0 0.4rem;
      color: var(--text-main);
    }

    .info-modal-card p,
    .info-modal-card li {
      font-size: 0.95rem;
      color: var(--text-muted);
      line-height: 1.65;
    }

    .info-modal-card p,
    .info-modal-card ul {
      margin-bottom: 0.85rem;
    }

    .info-modal-card ul {
      padding-inline-start: 1.25rem;
    }

    .info-modal-card li + li {
      margin-top: 0.35rem;
    }

    .info-modal-card a {
      color: var(--info-link);
    }

    .modal-close-btn {
      position: absolute;
      top: 1.25rem;
      right: 1.25rem;
      background: rgba(255, 255, 255, 0.08);
      border: none;
      color: #fff;
      width: 32px;
      height: 32px;
      border-radius: 50%;
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
    }

    .info-modal-header .modal-close-btn {
      position: static;
      flex-shrink: 0;
      width: 44px;
      height: 44px;
      background: var(--bg-surface);
      border: 1px solid var(--border-color);
      color: var(--text-main);
    }

    .info-modal-header .modal-close-btn:hover {
      background: var(--bg-card-hover);
    }

    .info-dialog-trigger {
      padding: 0;
      border: 0;
      background: none;
      color: var(--info-link);
      font: inherit;
      text-align: inherit;
      text-decoration: underline;
      cursor: pointer;
    }

    /* ==========================================================================
       FOOTER
       ========================================================================== */
    footer {
      background: #05080f;
      border-top: 1px solid var(--border-color);
      padding: 2.5rem 1.5rem 1.5rem;
      margin-top: auto;
    }

    .footer-inner {
      max-width: 1040px;
      margin: 0 auto;
      display: grid;
      grid-template-columns: 2fr 1fr 1fr 1fr;
      gap: 2rem;
      margin-bottom: 2rem;
    }

    .footer-brand h4 {
      font-family: var(--font-display);
      font-size: 1.15rem;
      font-weight: 800;
      margin-bottom: 0.5rem;
    }

    .footer-brand p {
      color: var(--text-dim);
      font-size: 0.82rem;
      line-height: 1.6;
    }

    .footer-col h5 {
      font-family: var(--font-display);
      font-size: 0.85rem;
      font-weight: 800;
      color: #fff;
      text-transform: uppercase;
      letter-spacing: 0.6px;
      margin-bottom: 0.85rem;
    }

    .footer-links {
      list-style: none;
      display: flex;
      flex-direction: column;
      gap: 0.45rem;
    }

    .footer-links a,
    .footer-links .info-dialog-trigger {
      color: var(--text-dim);
      text-decoration: none;
      font-size: 0.82rem;
      transition: var(--transition);
      cursor: pointer;
    }

    .footer-links a:hover,
    .footer-links .info-dialog-trigger:hover {
      color: var(--cyan);
    }

    .footer-bottom {
      max-width: 1040px;
      margin: 0 auto;
      padding-top: 1.5rem;
      border-top: 1px solid rgba(255, 255, 255, 0.05);
      display: flex;
      justify-content: space-between;
      align-items: center;
      font-size: 0.76rem;
      color: var(--text-dim);
      flex-wrap: wrap;
      gap: 0.5rem;
    }

    /* Dedicated Active Exam Mode (Self-Contained Canvas) */
    body.exam-session-active header,
    body.exam-session-active footer.app-footer,
    body.exam-session-active .portal-nav-tabs,
    body.exam-session-active #startExamBtn,
    body.exam-session-active .landing-screen,
    body.exam-session-active .ad-container-box,
    body.fullscreen-exam-active header,
    body.fullscreen-exam-active footer.app-footer,
    body.fullscreen-exam-active .ad-container-box {
      display: none !important;
    }

    body.exam-session-active footer.bottom-actions-bar,
    body.fullscreen-exam-active footer.bottom-actions-bar {
      display: flex !important;
    }

    body.exam-session-active #questionHudBar,
    body.fullscreen-exam-active #questionHudBar {
      display: flex !important;
    }

    body.exam-session-active,
    body.fullscreen-exam-active {
      overflow: hidden !important;
      height: 100vh !important;
      height: 100dvh !important;
    }

    body.exam-session-active #tab-mock-arena,
    body.fullscreen-exam-active #tab-mock-arena {
      position: fixed !important;
      inset: 0 !important;
      z-index: 99999 !important;
      width: 100vw !important;
      height: 100vh !important;
      height: 100dvh !important;
      background: var(--bg-dark) !important;
      overflow: hidden !important;
      display: flex !important;
      flex-direction: column !important;
    }

    body.exam-session-active .app-layout,
    body.fullscreen-exam-active .app-layout {
      width: 100vw !important;
      height: 100% !important;
      max-height: 100% !important;
      min-height: 0 !important;
      overflow: hidden !important;
    }

    body.exam-session-active .app-layout .exam-main,
    body.fullscreen-exam-active .app-layout .exam-main {
      display: flex !important;
      flex-direction: column !important;
      height: 100% !important;
      max-height: 100% !important;
      min-height: 0 !important;
      overflow: hidden !important;
      position: relative !important;
    }

    body.exam-session-active #questionHudBar,
    body.fullscreen-exam-active #questionHudBar {
      flex: 0 0 auto !important;
      z-index: 10 !important;
    }

    body.exam-session-active #mainScrollArea,
    body.fullscreen-exam-active #mainScrollArea {
      flex: 1 1 0% !important;
      min-height: 0 !important;
      overflow-y: auto !important;
      -webkit-overflow-scrolling: touch !important;
    }

    body.exam-session-active footer.bottom-actions-bar,
    body.fullscreen-exam-active footer.bottom-actions-bar {
      flex: 0 0 auto !important;
      margin-top: auto !important;
      z-index: 20 !important;
      padding: 0.65rem 1.25rem !important;
      box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.45) !important;
    }

    /* ==========================================================================
       MOBILE RESPONSIVENESS & ERGONOMICS
       ========================================================================== */
    @media (max-width: 900px) {
      .btn-mobile-nav-toggle {
        display: inline-flex !important;
        min-width: 44px;
        min-height: 44px;
      }

      .portal-nav-tabs {
        display: none !important;
      }

      .portal-role-switch {
        display: none !important;
      }

      body:not(.exam-session-active):not(.fullscreen-exam-active) .mobile-bottom-nav {
        display: flex !important;
      }

      body:not(.exam-session-active):not(.fullscreen-exam-active) {
        padding-bottom: 68px;
      }

      header {
        flex-direction: row !important;
        justify-content: space-between !important;
        align-items: center !important;
        padding: 0.65rem 0.85rem !important;
      }

      .header-actions {
        width: auto !important;
        gap: 0.35rem !important;
      }

      #btnStudentAuthOpen {
        display: none !important;
        /* Hide header login button on mobile; login is available in navigation drawer */
      }

      #startExamBtn {
        display: none !important;
        /* Hide start mock button in header on mobile; redundant with main page CTA */
      }

      #themeToggleBtn {
        padding: 0.42rem 0.6rem !important;
      }

      #themeToggleText {
        display: none !important;
      }

      #studentProfileBadge {
        padding: 0.2rem 0.45rem !important;
      }

      #studentUsernameDisplay {
        max-width: 65px !important;
      }

      #studentExamTargetDisplay {
        display: none !important;
      }

      /* Paywall Responsive overrides for mobile */
      .paywall-slide-column {
        display: none !important;
      }

      .paywall-layout-wrap {
        flex-direction: column !important;
        gap: 1rem !important;
      }

      .modal-surface-card {
        padding: 1.5rem 1rem !important;
        border-radius: 18px !important;
      }

      /* Mobile full-width exam arena */
      body.exam-session-active,
      body.fullscreen-exam-active {
        overflow-x: hidden !important;
        width: 100% !important;
        max-width: 100vw !important;
      }

      body.exam-session-active .app-layout,
      body.fullscreen-exam-active .app-layout {
        display: flex !important;
        flex-direction: column !important;
        grid-template-columns: 1fr !important;
        width: 100% !important;
        max-width: 100vw !important;
        height: 100vh !important;
        height: 100dvh !important;
        max-height: 100vh !important;
        max-height: 100dvh !important;
        overflow-x: hidden !important;
        overflow-y: hidden !important;
        position: relative !important;
      }

      body.exam-session-active .app-layout .exam-main,
      body.fullscreen-exam-active .app-layout .exam-main {
        width: 100% !important;
        max-width: 100vw !important;
        flex: 1 1 auto !important;
        min-height: 0 !important;
        overflow-x: hidden !important;
        position: relative !important;
      }

      /* Mobile Exam Sidebar: strictly an off-canvas slide-over drawer (never a side-by-side grid column) */
      .exam-sidebar,
      body.exam-session-active .app-layout .exam-sidebar,
      body.fullscreen-exam-active .app-layout .exam-sidebar {
        position: fixed !important;
        top: 0 !important;
        bottom: 0 !important;
        right: 0 !important;
        left: auto !important;
        width: 320px !important;
        max-width: 88vw !important;
        height: 100vh !important;
        height: 100dvh !important;
        z-index: 1000 !important;
        background: #090e1a !important;
        padding: 1.25rem !important;
        box-shadow: -10px 0 35px rgba(0, 0, 0, 0.8) !important;
        border-left: 1px solid var(--border-color) !important;
        border-right: none !important;
        transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.3s ease !important;
        transform: translateX(105%) !important;
        visibility: hidden !important;
        pointer-events: none !important;
        opacity: 1 !important;
        display: flex !important;
        flex-direction: column !important;
      }

      /* When opened on mobile, slide drawer into view */
      .exam-sidebar.mobile-open,
      body.exam-session-active .app-layout .exam-sidebar.mobile-open,
      body.fullscreen-exam-active .app-layout .exam-sidebar.mobile-open {
        transform: translateX(0) !important;
        visibility: visible !important;
        pointer-events: auto !important;
      }

      /* Mobile Drawer Backdrop Overlay */
      .drawer-backdrop-overlay {
        position: fixed !important;
        inset: 0 !important;
        background: rgba(0, 0, 0, 0.65) !important;
        backdrop-filter: blur(4px) !important;
        -webkit-backdrop-filter: blur(4px) !important;
        z-index: 999 !important;
        display: none !important;
        opacity: 0 !important;
        pointer-events: none !important;
        transition: opacity 0.25s ease !important;
      }

      .drawer-backdrop-overlay.active {
        display: block !important;
        opacity: 1 !important;
        pointer-events: auto !important;
      }

      /* Compact Mobile HUD Bar (prevents horizontal blowout & overflow) */
      .q-hud-bar {
        padding: 0.4rem 0.65rem !important;
        gap: 0.35rem !important;
      }

      .q-hud-left {
        gap: 0.3rem !important;
      }

      #btnFullscreenToggle {
        padding: 0.25rem 0.45rem !important;
      }

      #fullscreenText {
        display: none !important;
      }

      #btnTogglePaletteDrawer {
        padding: 0.25rem 0.5rem !important;
        font-size: 0.72rem !important;
      }

      .q-hud-right {
        gap: 0.35rem !important;
      }

      .timer-badge {
        padding: 0.25rem 0.55rem !important;
        font-size: 0.8rem !important;
      }

      .hud-subject-switcher {
        display: flex;
      }

      .hud-sub-btn {
        padding: 0.2rem 0.45rem;
        font-size: 0.7rem;
      }

      .mode-cards-grid,
      .predictor-grid,
      .footer-inner {
        grid-template-columns: 1fr;
      }

      .q-scroll-area {
        padding: 1rem;
      }

      .q-statement-card {
        padding: 1.15rem;
      }

      .opt-card {
        padding: 0.85rem 1rem;
      }

      .bottom-actions-bar {
        padding: 0.65rem 0.85rem;
        flex-wrap: wrap;
        gap: 0.5rem;
      }

      .btn {
        font-size: 0.8rem;
        padding: 0.45rem 0.85rem;
      }
    }
  
    /* ==========================================================================
       EXAM RIGHT-SIDE SIDEBAR & PALETTE (PREMIUM CBT REDESIGN - DARK & LIGHT)
       ========================================================================== */
    .exam-sidebar {
      background: rgba(10, 15, 29, 0.94) !important;
      backdrop-filter: blur(20px) !important;
      -webkit-backdrop-filter: blur(20px) !important;
      border-left: 1px solid rgba(255, 255, 255, 0.08) !important;
      box-shadow: -8px 0 32px rgba(0, 0, 0, 0.35) !important;
      display: flex;
      flex-direction: column;
      padding: 0.9rem !important;
      gap: 0.75rem !important;
      height: 100% !important;
      max-height: 100% !important;
      overflow: hidden;
      transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
      z-index: 50;
    }

    [data-theme="light"] .exam-sidebar {
      background: rgba(255, 255, 255, 0.97) !important;
      border-left: 1px solid rgba(203, 213, 225, 0.85) !important;
      box-shadow: -6px 0 25px rgba(15, 23, 42, 0.06) !important;
    }

    /* Top Row in Exam Sidebar */
    .sidebar-exam-top-row {
      display: flex;
      justify-content: space-between;
      align-items: center;
      padding-bottom: 0.65rem;
      border-bottom: 1px solid rgba(255, 255, 255, 0.08);
      flex-shrink: 0;
    }

    [data-theme="light"] .sidebar-exam-top-row {
      border-bottom: 1px solid rgba(226, 232, 240, 0.9) !important;
    }

    .sidebar-exam-brand {
      display: flex;
      align-items: center;
      gap: 0.55rem;
    }

    .sidebar-exam-icon-badge {
      width: 32px;
      height: 32px;
      border-radius: 9px;
      background: linear-gradient(135deg, rgba(14, 165, 233, 0.2), rgba(99, 102, 241, 0.15));
      border: 1px solid rgba(14, 165, 233, 0.3);
      color: #38bdf8;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 0.88rem;
    }

    [data-theme="light"] .sidebar-exam-icon-badge {
      background: #e0f2fe !important;
      border: 1px solid #bae6fd !important;
      color: #0284c7 !important;
    }

    .sidebar-exam-title-group {
      display: flex;
      flex-direction: column;
    }

    .sidebar-exam-title {
      font-family: var(--font-display);
      font-size: 0.94rem;
      font-weight: 800;
      color: #ffffff !important;
      line-height: 1.2;
      letter-spacing: 0.2px;
    }

    [data-theme="light"] .sidebar-exam-title {
      color: #0f172a !important;
    }

    .sidebar-exam-subtitle {
      font-size: 0.68rem;
      font-weight: 600;
      color: #94a3b8;
    }

    [data-theme="light"] .sidebar-exam-subtitle {
      color: #64748b !important;
    }

    .sidebar-close-btn {
      background: rgba(255, 255, 255, 0.05);
      border: 1px solid rgba(255, 255, 255, 0.1);
      border-radius: 8px;
      color: #94a3b8;
      width: 28px;
      height: 28px;
      display: flex;
      align-items: center;
      justify-content: center;
      cursor: pointer;
      font-size: 0.82rem;
      transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
    }

    .sidebar-close-btn:hover {
      background: rgba(239, 68, 68, 0.15);
      border-color: rgba(239, 68, 68, 0.3);
      color: #f87171;
      transform: scale(1.05);
    }

    [data-theme="light"] .sidebar-close-btn {
      background: #f1f5f9 !important;
      border: 1px solid #cbd5e1 !important;
      color: #64748b !important;
    }

    [data-theme="light"] .sidebar-close-btn:hover {
      background: #fee2e2 !important;
      border-color: #fca5a5 !important;
      color: #ef4444 !important;
    }

    /* Subject Filter Block & Segmented Tabs */
    .sidebar-subject-block {
      flex-shrink: 0;
      display: flex;
      flex-direction: column;
      gap: 0.45rem;
    }

    .sidebar-block-header {
      display: flex;
      justify-content: space-between;
      align-items: center;
    }

    .sidebar-heading {
      font-size: 0.74rem;
      font-weight: 800;
      color: #94a3b8;
      text-transform: uppercase;
      letter-spacing: 0.6px;
      display: flex;
      align-items: center;
      gap: 0.35rem;
    }

    [data-theme="light"] .sidebar-heading {
      color: #334155 !important;
    }

    .segmented-pill-track {
      display: flex;
      background: rgba(0, 0, 0, 0.32);
      border: 1px solid rgba(255, 255, 255, 0.08);
      border-radius: 12px;
      padding: 3px;
      gap: 3px;
    }

    [data-theme="light"] .segmented-pill-track {
      background: #f1f5f9 !important;
      border: 1.5px solid #cbd5e1 !important;
    }

    .subj-pill-btn {
      flex: 1;
      background: transparent;
      border: 1px solid transparent;
      border-radius: 9px;
      padding: 0.5rem 0.25rem;
      color: #94a3b8;
      font-family: var(--font-display);
      font-size: 0.76rem;
      font-weight: 700;
      cursor: pointer;
      transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
      text-align: center;
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 0.2rem;
    }

    .subj-pill-btn i {
      font-size: 0.88rem;
      transition: transform 0.18s ease;
    }

    .subj-pill-btn:hover:not(:disabled) {
      background: rgba(255, 255, 255, 0.06);
      color: #ffffff;
      transform: translateY(-1px);
    }

    .subj-pill-btn:hover:not(:disabled) i {
      transform: scale(1.1);
    }

    .subj-pill-btn.active {
      background: linear-gradient(135deg, rgba(14, 165, 233, 0.28), rgba(99, 102, 241, 0.22)) !important;
      border: 1px solid rgba(56, 189, 248, 0.65) !important;
      color: #38bdf8 !important;
      box-shadow: 0 2px 10px rgba(14, 165, 233, 0.22) !important;
      font-weight: 800 !important;
    }

    .subj-pill-btn.active i {
      color: #38bdf8 !important;
    }

    [data-theme="light"] .subj-pill-btn {
      color: #64748b !important;
    }

    [data-theme="light"] .subj-pill-btn:hover:not(:disabled) {
      background: #ffffff !important;
      color: #0f172a !important;
      box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
    }

    [data-theme="light"] .subj-pill-btn.active {
      background: #ffffff !important;
      border: 1.5px solid #0284c7 !important;
      color: #0284c7 !important;
      box-shadow: 0 3px 10px rgba(2, 132, 199, 0.18), 0 1px 3px rgba(0, 0, 0, 0.06) !important;
      font-weight: 800 !important;
    }

    [data-theme="light"] .subj-pill-btn.active i {
      color: #0284c7 !important;
    }

    /* Palette Box & Question Count */
    .palette-box {
      flex: 1;
      display: flex;
      flex-direction: column;
      min-height: 0;
      overflow: hidden;
      gap: 0.45rem;
    }

    .palette-header {
      display: flex;
      justify-content: space-between;
      align-items: center;
      flex-shrink: 0;
    }

    .palette-count {
      font-family: var(--font-display);
      font-size: 0.74rem;
      font-weight: 800;
      color: #34d399 !important;
      background: rgba(16, 185, 129, 0.14) !important;
      border: 1px solid rgba(16, 185, 129, 0.3) !important;
      padding: 0.18rem 0.55rem;
      border-radius: 9999px;
      letter-spacing: 0.3px;
    }

    [data-theme="light"] .palette-count {
      color: #059669 !important;
      background: #ecfdf5 !important;
      border: 1.5px solid #a7f3d0 !important;
    }

    /* Palette Grid */
    .palette-grid {
      display: grid;
      grid-template-columns: repeat(5, minmax(0, 1fr));
      gap: 7px;
      overflow-y: auto;
      overflow-x: hidden;
      padding: 4px 5px 1rem 3px;
      flex: 1;
      min-height: 0;
      max-height: 100%;
      width: 100%;
      box-sizing: border-box;
      scrollbar-width: thin;
      scrollbar-color: rgba(255, 255, 255, 0.15) transparent;
    }

    [data-theme="light"] .palette-grid {
      scrollbar-color: rgba(15, 23, 42, 0.2) transparent;
    }

    .palette-grid::-webkit-scrollbar {
      width: 5px;
    }

    .palette-grid::-webkit-scrollbar-thumb {
      background: rgba(255, 255, 255, 0.2);
      border-radius: 4px;
    }

    [data-theme="light"] .palette-grid::-webkit-scrollbar-thumb {
      background: #cbd5e1;
    }

    /* Question Tile — Definitive Tactile Design */
    .q-tile {
      aspect-ratio: 1;
      width: 100%;
      min-width: 0;
      max-width: 100%;
      min-height: 38px;
      box-sizing: border-box;
      border: 1.5px solid rgba(255, 255, 255, 0.1) !important;
      border-radius: 10px !important;
      background: rgba(255, 255, 255, 0.04) !important;
      color: #94a3b8 !important;
      font-family: var(--font-display);
      font-size: 0.82rem !important;
      font-weight: 800 !important;
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      transition: all 0.15s cubic-bezier(0.16, 1, 0.3, 1) !important;
      flex-shrink: 0;
      box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
      position: relative;
    }

    .q-tile:hover {
      background: rgba(14, 165, 233, 0.18) !important;
      border-color: #38bdf8 !important;
      color: #ffffff !important;
      transform: translateY(-2px) scale(1.04);
      box-shadow: 0 4px 12px rgba(14, 165, 233, 0.25) !important;
    }

    .q-tile:active {
      transform: translateY(1px) scale(0.97);
    }

    .q-tile.current {
      background: rgba(14, 165, 233, 0.25) !important;
      border: 2px solid #38bdf8 !important;
      color: #ffffff !important;
      outline: 3px solid rgba(56, 189, 248, 0.35) !important;
      outline-offset: 1px !important;
      box-shadow: 0 0 14px rgba(56, 189, 248, 0.35) !important;
    }

    .q-tile.answered {
      background: #10b981 !important;
      border-color: #059669 !important;
      color: #ffffff !important;
      box-shadow: 0 2px 10px rgba(16, 185, 129, 0.35) !important;
    }

    .q-tile.not-answered {
      background: #ea580c !important;
      border-color: #c2410c !important;
      color: #ffffff !important;
      box-shadow: 0 2px 10px rgba(234, 88, 12, 0.35) !important;
    }

    .q-tile.marked {
      background: #8b5cf6 !important;
      border-color: #7c3aed !important;
      color: #ffffff !important;
      box-shadow: 0 2px 10px rgba(139, 92, 246, 0.35) !important;
    }

    /* Light Mode Question Tiles */
    [data-theme="light"] .q-tile {
      background: #f8fafc !important;
      border: 1.5px solid #cbd5e1 !important;
      color: #334155 !important;
      box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05), inset 0 1px 0 rgba(255, 255, 255, 0.8) !important;
    }

    [data-theme="light"] .q-tile:hover {
      background: #ffffff !important;
      border-color: #0284c7 !important;
      color: #0284c7 !important;
      transform: translateY(-2px) scale(1.04);
      box-shadow: 0 4px 12px rgba(2, 132, 199, 0.18) !important;
    }

    [data-theme="light"] .q-tile.current {
      background: #e0f2fe !important;
      border: 2px solid #0284c7 !important;
      color: #0369a1 !important;
      outline: 3px solid rgba(14, 165, 233, 0.3) !important;
      outline-offset: 1px !important;
      box-shadow: 0 2px 10px rgba(14, 165, 233, 0.25) !important;
    }

    [data-theme="light"] .q-tile.answered {
      background: #10b981 !important;
      border-color: #059669 !important;
      color: #ffffff !important;
      box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3) !important;
    }

    [data-theme="light"] .q-tile.not-answered {
      background: #ea580c !important;
      border-color: #c2410c !important;
      color: #ffffff !important;
      box-shadow: 0 2px 8px rgba(234, 88, 12, 0.3) !important;
    }

    [data-theme="light"] .q-tile.marked {
      background: #8b5cf6 !important;
      border-color: #7c3aed !important;
      color: #ffffff !important;
      box-shadow: 0 2px 8px rgba(139, 92, 246, 0.3) !important;
    }

    /* Legend Box */
    .legend-box {
      border-top: 1px solid rgba(255, 255, 255, 0.08) !important;
      display: grid !important;
      grid-template-columns: 1fr 1fr !important;
      gap: 6px !important;
      flex-shrink: 0 !important;
      background: rgba(0, 0, 0, 0.2) !important;
      border-radius: 10px !important;
      padding: 0.55rem 0.65rem !important;
    }

    [data-theme="light"] .legend-box {
      border-top-color: rgba(226, 232, 240, 0.9) !important;
      background: #f1f5f9 !important;
      border: 1px solid #cbd5e1 !important;
    }

    .legend-item {
      display: flex !important;
      align-items: center !important;
      gap: 0.45rem !important;
      font-size: 0.7rem !important;
      color: #cbd5e1 !important;
      font-weight: 600 !important;
    }

    [data-theme="light"] .legend-item {
      color: #1e293b !important;
      font-weight: 700 !important;
    }

    .legend-indicator {
      width: 12px !important;
      height: 12px !important;
      border-radius: 4px !important;
      flex-shrink: 0 !important;
    }

    .legend-indicator.legend-not-visited {
      background: rgba(255, 255, 255, 0.06) !important;
      border: 1.5px solid rgba(255, 255, 255, 0.2) !important;
    }

    [data-theme="light"] .legend-indicator.legend-not-visited {
      background: #f8fafc !important;
      border: 1.5px solid #94a3b8 !important;
    }

    .legend-indicator.legend-answered {
      background: #10b981 !important;
    }

    .legend-indicator.legend-not-answered {
      background: #ea580c !important;
    }

    .legend-indicator.legend-marked {
      background: #8b5cf6 !important;
    }


    
    /* ==========================================================================
       AUTHENTIC HIGH-CONTRAST MEDICAL-SCIENCE BACKGROUND SYSTEM
       ========================================================================== */
    .med-science-bg-layer {
      position: fixed;
      top: 0;
      left: 0;
      width: 100vw;
      height: 100vh;
      pointer-events: none;
      z-index: 0;
      overflow: hidden;
      transition: opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    }

    /* Option 3: Technical Precision Millimeter & Dot Grid (Clearly Visible) */
    .med-bg-grid-svg {
      position: absolute;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      color: rgba(14, 165, 233, 0.16);
      transition: color 0.3s ease;
    }

    .med-bg-grid-svg .grid-major-line {
      stroke: rgba(14, 165, 233, 0.22);
    }

    .med-bg-grid-svg .grid-subtle-line {
      stroke: rgba(14, 165, 233, 0.08);
    }

    .med-bg-grid-svg .grid-dot {
      fill: rgba(56, 189, 248, 0.4);
    }

    .med-bg-grid-svg .grid-cross {
      stroke: rgba(56, 189, 248, 0.45);
    }

    [data-theme="light"] .med-bg-grid-svg {
      color: rgba(15, 23, 42, 0.12);
    }

    [data-theme="light"] .med-bg-grid-svg .grid-major-line {
      stroke: rgba(15, 23, 42, 0.16);
    }

    [data-theme="light"] .med-bg-grid-svg .grid-subtle-line {
      stroke: rgba(15, 23, 42, 0.06);
    }

    [data-theme="light"] .med-bg-grid-svg .grid-dot {
      fill: rgba(2, 132, 199, 0.35);
    }

    [data-theme="light"] .med-bg-grid-svg .grid-cross {
      stroke: rgba(2, 132, 199, 0.4);
    }

    /* Option 1: Biology DNA Double Helix (Right Margin - Vivid & Floating) */
    .dna-container-wrap {
      position: absolute;
      right: 20px;
      top: 5%;
      width: 220px;
      height: 750px;
      pointer-events: none;
      animation: floatDnaDynamic 7.5s cubic-bezier(0.45, 0.05, 0.55, 0.95) infinite alternate;
      will-change: transform;
    }

    .med-watermark-dna {
      width: 100%;
      height: 100%;
      color: rgba(56, 189, 248, 0.38);
      filter: drop-shadow(0 0 16px rgba(14, 165, 233, 0.6)) drop-shadow(0 0 4px rgba(56, 189, 248, 0.8));
    }

    .dna-node {
      filter: drop-shadow(0 0 6px currentColor);
      animation: pulseDnaNode 3s ease-in-out infinite alternate;
    }

    [data-theme="light"] .med-watermark-dna {
      color: rgba(2, 132, 199, 0.35);
      filter: drop-shadow(0 0 10px rgba(2, 132, 199, 0.3));
    }

    @keyframes floatDnaDynamic {
      0% { transform: translateY(-25px) rotate(-2deg); }
      100% { transform: translateY(25px) rotate(2.5deg); }
    }

    @keyframes pulseDnaNode {
      0% { transform: scale(0.9); opacity: 0.8; }
      100% { transform: scale(1.3); opacity: 1; }
    }

    /* Option 1: Chemistry Benzene & Molecular Lattice (Top-Left Margin) */
    .chem-container-wrap {
      position: absolute;
      left: 25px;
      top: 85px;
      width: 320px;
      height: 280px;
      pointer-events: none;
      animation: floatChemDynamic 8.5s ease-in-out infinite alternate;
      will-change: transform;
    }

    .med-watermark-chemistry {
      width: 100%;
      height: 100%;
      color: rgba(168, 85, 247, 0.36);
      filter: drop-shadow(0 0 14px rgba(168, 85, 247, 0.55));
    }

    .chem-node {
      filter: drop-shadow(0 0 5px currentColor);
    }

    [data-theme="light"] .med-watermark-chemistry {
      color: rgba(124, 58, 237, 0.32);
      filter: drop-shadow(0 0 8px rgba(124, 58, 237, 0.25));
    }

    @keyframes floatChemDynamic {
      0% { transform: translateY(0px) rotate(0deg) scale(0.98); }
      100% { transform: translateY(-26px) rotate(-3deg) scale(1.03); }
    }

    /* Option 1: Physics Atomic Orbitals & Nucleus (Bottom-Left Margin) */
    .physics-container-wrap {
      position: absolute;
      left: 40px;
      bottom: 60px;
      width: 260px;
      height: 260px;
      pointer-events: none;
      animation: spinOrbitalsDynamic 16s linear infinite;
      will-change: transform;
    }

    .med-watermark-physics {
      width: 100%;
      height: 100%;
      color: rgba(14, 165, 233, 0.36);
      filter: drop-shadow(0 0 12px rgba(14, 165, 233, 0.5));
    }

    .physics-electron {
      filter: drop-shadow(0 0 8px currentColor);
    }

    [data-theme="light"] .med-watermark-physics {
      color: rgba(2, 132, 199, 0.32);
      filter: drop-shadow(0 0 8px rgba(2, 132, 199, 0.25));
    }

    @keyframes spinOrbitalsDynamic {
      0% { transform: rotate(0deg); }
      100% { transform: rotate(360deg); }
    }

    /* Option 1: Medicine Cardiac ECG Rhythm Monitor (Bottom Perimeter) */
    .ecg-container-wrap {
      position: absolute;
      left: 0;
      bottom: 12px;
      width: 100%;
      height: 65px;
      pointer-events: none;
      overflow: hidden;
    }

    .med-watermark-ecg {
      width: 100%;
      height: 100%;
      color: rgba(16, 185, 129, 0.42);
      filter: drop-shadow(0 0 10px rgba(16, 185, 129, 0.65));
    }

    [data-theme="light"] .med-watermark-ecg {
      color: rgba(5, 150, 105, 0.38);
      filter: drop-shadow(0 0 8px rgba(5, 150, 105, 0.3));
    }

    .ecg-sweep-blip {
      position: absolute;
      top: 32px;
      left: 0;
      width: 8px;
      height: 8px;
      border-radius: 50%;
      background: #34d399;
      box-shadow: 0 0 14px 4px #10b981;
      animation: ecgSweepBlip 3.8s linear infinite;
    }

    @keyframes ecgSweepBlip {
      0% { transform: translateX(-10px); opacity: 0; }
      5% { opacity: 1; }
      95% { opacity: 1; }
      100% { transform: translateX(100vw); opacity: 0; }
    }

    /* CBT Exam Mode: Distraction-free clinical canvas */
    body.exam-session-active .dna-container-wrap,
    body.exam-session-active .chem-container-wrap,
    body.exam-session-active .physics-container-wrap,
    body.exam-session-active .ecg-container-wrap {
      display: none !important;
      opacity: 0 !important;
    }

    body.exam-session-active .med-bg-grid-svg {
      opacity: 0.25 !important;
    }


    
    /* ==========================================================================
       STICKY DESKTOP FILTER PANELS — VERTICALLY CENTERED AT EYE LEVEL ON SCROLL
       ========================================================================== */
    .predictor-grid {
      align-items: start;
    }

    .predictor-grid > .predictor-card:first-child {
      position: -webkit-sticky !important;
      position: sticky !important;
      /* Perfectly centered in the vertical viewport height as the user scrolls */
      top: max(84px, calc(50vh - 225px)) !important;
      align-self: start !important;
      max-height: calc(100vh - 110px) !important;
      overflow-y: auto !important;
      z-index: 20 !important;
      scrollbar-width: thin;
      transition: top 0.25s cubic-bezier(0.16, 1, 0.3, 1), 
                  box-shadow 0.3s cubic-bezier(0.16, 1, 0.3, 1), 
                  border-color 0.3s cubic-bezier(0.16, 1, 0.3, 1), 
                  transform 0.15s ease-out !important;
      box-shadow: 0 12px 36px -8px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(255, 255, 255, 0.08) !important;
      transform-style: preserve-3d;
      perspective: 1000px;
    }

    /* Interactive Hover Glow on the Filter Card */
    .predictor-grid > .predictor-card:first-child:hover {
      box-shadow: 0 20px 48px -10px rgba(14, 165, 233, 0.2), 
                  0 0 0 1.5px rgba(14, 165, 233, 0.4) !important;
      border-color: rgba(14, 165, 233, 0.4) !important;
    }

    [data-theme="light"] .predictor-grid > .predictor-card:first-child {
      box-shadow: 0 10px 30px -6px rgba(15, 23, 42, 0.1), 0 0 0 1px rgba(203, 213, 225, 0.8) !important;
      border-color: rgba(203, 213, 225, 0.9) !important;
      background: rgba(255, 255, 255, 0.96) !important;
    }

    [data-theme="light"] .predictor-grid > .predictor-card:first-child:hover {
      box-shadow: 0 20px 44px -8px rgba(2, 132, 199, 0.16), 
                  0 0 0 1.5px rgba(2, 132, 199, 0.4) !important;
      border-color: rgba(2, 132, 199, 0.5) !important;
    }

    /* Micro-Interactions on Filter Inputs and Selects */
    .predictor-grid > .predictor-card:first-child .form-input,
    .predictor-grid > .predictor-card:first-child .form-select {
      transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1) !important;
      border: 1.5px solid var(--border-color) !important;
    }

    .predictor-grid > .predictor-card:first-child .form-input:hover,
    .predictor-grid > .predictor-card:first-child .form-select:hover {
      border-color: rgba(14, 165, 233, 0.5) !important;
      background: rgba(255, 255, 255, 0.04) !important;
      transform: translateY(-1px);
    }

    [data-theme="light"] .predictor-grid > .predictor-card:first-child .form-input:hover,
    [data-theme="light"] .predictor-grid > .predictor-card:first-child .form-select:hover {
      border-color: #0284c7 !important;
      background: #ffffff !important;
    }

    .predictor-grid > .predictor-card:first-child .form-input:focus,
    .predictor-grid > .predictor-card:first-child .form-select:focus {
      border-color: var(--cyan) !important;
      box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.22), 0 4px 14px rgba(14, 165, 233, 0.12) !important;
      transform: translateY(-1px) scale(1.006);
    }

    /* Micro-Interaction: Reset Button Rotation & Tactile Physics */
    .reset-btn-interactive {
      transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
      cursor: pointer;
    }

    .reset-btn-interactive:hover i {
      transform: rotate(-35deg);
      transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
    }

    .reset-btn-interactive:active {
      transform: scale(0.95) !important;
    }

    .reset-btn-interactive.reset-animating i {
      transform: rotate(360deg) !important;
      transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
    }

    /* 3D Motion Hover Effects on Result Cards */
    .fee-matrix-card {
      transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), 
                  box-shadow 0.25s cubic-bezier(0.16, 1, 0.3, 1),
                  border-color 0.25s ease !important;
      transform-origin: center center;
    }

    .fee-matrix-card:hover {
      transform: translateY(-4px) scale(1.008) translateZ(10px) !important;
      box-shadow: 0 16px 36px -6px rgba(0, 0, 0, 0.4), 
                  0 0 20px rgba(14, 165, 233, 0.15) !important;
      border-color: rgba(14, 165, 233, 0.45) !important;
    }

    [data-theme="light"] .fee-matrix-card:hover {
      transform: translateY(-4px) scale(1.008) translateZ(10px) !important;
      box-shadow: 0 14px 32px -6px rgba(15, 23, 42, 0.12), 
                  0 0 18px rgba(2, 132, 199, 0.12) !important;
      border-color: #0284c7 !important;
    }

    /* ==========================================================================
       SMOOTH FLUID MEDICAL PULSE LOADER
       ========================================================================== */
    .med-smooth-loader {
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      padding: 3.5rem 1.5rem;
      gap: 1.25rem;
      transition: opacity 0.25s ease-out;
    }

    .med-loader-orbital {
      position: relative;
      width: 60px;
      height: 60px;
      display: flex;
      align-items: center;
      justify-content: center;
    }

    .med-loader-ring {
      position: absolute;
      width: 100%;
      height: 100%;
      border-radius: 50%;
      border: 2.5px solid transparent;
      border-top-color: #0ea5e9;
      border-right-color: #10b981;
      animation: spinLoaderRing 1.1s cubic-bezier(0.5, 0, 0.5, 1) infinite;
    }

    .med-loader-ring-inner {
      position: absolute;
      width: 72%;
      height: 72%;
      border-radius: 50%;
      border: 2px solid transparent;
      border-bottom-color: #a855f7;
      border-left-color: #38bdf8;
      animation: spinLoaderRingReverse 0.85s linear infinite;
    }

    .med-loader-pulse-core {
      width: 16px;
      height: 16px;
      border-radius: 50%;
      background: radial-gradient(circle, #38bdf8, #0ea5e9);
      box-shadow: 0 0 14px #0ea5e9;
      animation: pulseCore 1.2s ease-in-out infinite alternate;
    }

    .med-loader-text {
      font-size: 0.88rem;
      font-weight: 700;
      color: var(--text-muted);
      letter-spacing: 0.3px;
      display: flex;
      align-items: center;
      gap: 0.5rem;
    }

    @keyframes spinLoaderRing {
      0% { transform: rotate(0deg); }
      100% { transform: rotate(360deg); }
    }

    @keyframes spinLoaderRingReverse {
      0% { transform: rotate(360deg); }
      100% { transform: rotate(0deg); }
    }

    @keyframes pulseCore {
      0% { transform: scale(0.85); opacity: 0.7; }
      100% { transform: scale(1.25); opacity: 1; }
    }

    /* 3D Motion Stagger Entrance Class */
    .reveal-card-3d {
      opacity: 0;
      transform: translateY(22px) rotateX(7deg) scale(0.98);
      transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1),
                  transform 0.45s cubic-bezier(0.16, 1, 0.3, 1);
      will-change: opacity, transform;
    }

    .reveal-card-3d.reveal-visible {
      opacity: 1;
      transform: translateY(0) rotateX(0deg) scale(1);
    }


    [data-theme="light"] .predictor-grid > .predictor-card:first-child {
      box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08) !important;
      border-color: rgba(203, 213, 225, 0.9) !important;
    }

    /* Sticky Subject Filter Tabs in Syllabus / Weightage Hub */
    .subject-filter-chips {
      position: sticky !important;
      top: 72px !important;
      z-index: 25 !important;
      background: rgba(11, 18, 32, 0.88) !important;
      backdrop-filter: blur(14px) !important;
      -webkit-backdrop-filter: blur(14px) !important;
      padding: 0.65rem 0.85rem !important;
      border-radius: 14px !important;
      border: 1px solid var(--border-color) !important;
      box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25) !important;
    }

    [data-theme="light"] .subject-filter-chips {
      background: rgba(255, 255, 255, 0.94) !important;
      border-color: rgba(203, 213, 225, 0.9) !important;
      box-shadow: 0 6px 20px rgba(15, 23, 42, 0.08) !important;
    }

    

    [data-theme="light"] .dock-reset-btn {
      background: #f1f5f9;
      border-color: #cbd5e1;
      color: #64748b;
    }

    [data-theme="light"] .dock-reset-btn:hover {
      background: #fee2e2;
      border-color: #fca5a5;
      color: #ef4444;
    }


    /* ==========================================================================
       NON-EXAM HUBS: SEMI-TRANSPARENT FROSTED GLASS CONTAINERS
       Allows the vibrant medical-science background (DNA, benzene, orbits, grid)
       to remain visible and drift behind the cards with Apple-grade depth.
       ========================================================================== */
    .portal-view-section:not(#tab-mock-arena) .predictor-card,
    .portal-view-section:not(#tab-mock-arena) .fee-matrix-card,
    .portal-view-section:not(#tab-mock-arena) .college-card,
    .portal-view-section:not(#tab-mock-arena) .clinical-card,
    .portal-view-section:not(#tab-mock-arena) .content-hub-container,
    .portal-view-section:not(#tab-mock-arena) .card-glass,
    .portal-view-section:not(#tab-mock-arena) .hub-header-card {
      background: rgba(15, 23, 42, 0.45) !important;
      backdrop-filter: blur(14px) saturate(160%) !important;
      -webkit-backdrop-filter: blur(14px) saturate(160%) !important;
      border: 1px solid rgba(56, 189, 248, 0.18) !important;
      box-shadow: 0 12px 36px -8px rgba(0, 0, 0, 0.45), 
                  inset 0 1px 0 rgba(255, 255, 255, 0.08) !important;
      transition: background 0.25s ease, 
                  border-color 0.25s ease, 
                  box-shadow 0.25s ease, 
                  transform 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
    }

    .portal-view-section:not(#tab-mock-arena) .predictor-card:hover,
    .portal-view-section:not(#tab-mock-arena) .fee-matrix-card:hover,
    .portal-view-section:not(#tab-mock-arena) .college-card:hover,
    .portal-view-section:not(#tab-mock-arena) .clinical-card:hover {
      background: rgba(15, 23, 42, 0.58) !important;
      border-color: rgba(56, 189, 248, 0.38) !important;
      box-shadow: 0 18px 44px -8px rgba(14, 165, 233, 0.22), 
                  inset 0 1px 0 rgba(255, 255, 255, 0.12) !important;
    }

    /* Light Mode Semi-Transparent Frosted Glass */
    [data-theme="light"] .portal-view-section:not(#tab-mock-arena) .predictor-card,
    [data-theme="light"] .portal-view-section:not(#tab-mock-arena) .fee-matrix-card,
    [data-theme="light"] .portal-view-section:not(#tab-mock-arena) .college-card,
    [data-theme="light"] .portal-view-section:not(#tab-mock-arena) .clinical-card,
    [data-theme="light"] .portal-view-section:not(#tab-mock-arena) .content-hub-container,
    [data-theme="light"] .portal-view-section:not(#tab-mock-arena) .card-glass,
    [data-theme="light"] .portal-view-section:not(#tab-mock-arena) .hub-header-card {
      background: rgba(255, 255, 255, 0.52) !important;
      backdrop-filter: blur(14px) saturate(140%) !important;
      -webkit-backdrop-filter: blur(14px) saturate(140%) !important;
      border: 1px solid rgba(203, 213, 225, 0.75) !important;
      box-shadow: 0 8px 28px -6px rgba(15, 23, 42, 0.08), 
                  inset 0 1px 0 rgba(255, 255, 255, 0.65) !important;
    }

    [data-theme="light"] .portal-view-section:not(#tab-mock-arena) .predictor-card:hover,
    [data-theme="light"] .portal-view-section:not(#tab-mock-arena) .fee-matrix-card:hover,
    [data-theme="light"] .portal-view-section:not(#tab-mock-arena) .college-card:hover,
    [data-theme="light"] .portal-view-section:not(#tab-mock-arena) .clinical-card:hover {
      background: rgba(255, 255, 255, 0.68) !important;
      border-color: rgba(2, 132, 199, 0.45) !important;
      box-shadow: 0 16px 36px -8px rgba(2, 132, 199, 0.14) !important;
    }

    /* Form Inputs & Selects inside Transparent Containers */
    .portal-view-section:not(#tab-mock-arena) .form-input,
    .portal-view-section:not(#tab-mock-arena) .form-select {
      background: rgba(11, 18, 32, 0.5) !important;
      backdrop-filter: blur(8px) !important;
      -webkit-backdrop-filter: blur(8px) !important;
      border: 1.5px solid rgba(255, 255, 255, 0.16) !important;
      color: #f8fafc !important;
    }

    [data-theme="light"] .portal-view-section:not(#tab-mock-arena) .form-input,
    [data-theme="light"] .portal-view-section:not(#tab-mock-arena) .form-select {
      background: rgba(255, 255, 255, 0.68) !important;
      border: 1.5px solid rgba(203, 213, 225, 0.85) !important;
      color: #0f172a !important;
    }

    /* Predicted Summary / Directory Banner */
    .portal-view-section:not(#tab-mock-arena) .predicted-rank-box {
      background: rgba(16, 185, 129, 0.08) !important;
      backdrop-filter: blur(10px) !important;
      -webkit-backdrop-filter: blur(10px) !important;
      border: 1px solid rgba(16, 185, 129, 0.3) !important;
    }

    [data-theme="light"] .portal-view-section:not(#tab-mock-arena) .predicted-rank-box {
      background: rgba(16, 185, 129, 0.06) !important;
      border: 1px solid rgba(16, 185, 129, 0.25) !important;
    }


    /* Ensure mobile nav drawer is ALWAYS hidden on desktop */
    @media (min-width: 1025px) {
      #mobileNavDrawer,
      .mobile-nav-drawer,
      #mobileNavBackdrop,
      .mobile-nav-backdrop {
        display: none !important;
        visibility: hidden !important;
        pointer-events: none !important;
      }
      #mobileNavDrawer.active,
      .mobile-nav-drawer.active {
        display: none !important;
      }
    }


    /* Remove doodle containers entirely — no messy SVG illustrations */
    .dna-container-wrap,
    .chem-container-wrap,
    .physics-container-wrap,
    .ecg-container-wrap,
    .med-watermark-dna,
    .med-watermark-chemistry,
    .med-watermark-physics,
    .med-watermark-ecg,
    .ecg-sweep-blip {
      display: none !important;
    }


    /* 3D Motion Background Canvas */
    #bg-canvas {
      position: fixed;
      top: 0;
      left: 0;
      width: 100vw;
      height: 100vh;
      display: block;
      z-index: 0;
      pointer-events: none;
    }


/* ==========================================================================
   PRODUCTION READINESS: ACCESSIBILITY, CONTRAST & COOKIE BANNER
   ========================================================================== */
:focus-visible {
  outline: 2px solid var(--cyan) !important;
  outline-offset: 2px !important;
}

/* Skip to main content link for keyboard users */
.skip-to-content {
  position: absolute;
  top: -120px;
  left: 1.5rem;
  background: var(--cyan);
  color: #020617;
  font-weight: 800;
  font-size: 0.88rem;
  padding: 0.65rem 1.25rem;
  border-radius: 8px;
  z-index: 999999;
  text-decoration: none;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
  transition: top 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
.skip-to-content:focus {
  top: 1.5rem;
}

/* Cookie & Storage Consent Banner */
.cookie-consent-banner {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  width: min(920px, 94vw);
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 1rem 1.5rem;
  z-index: 99990;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(16px);
  animation: slideUpBanner 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideUpBanner {
  from { transform: translate(-50%, 100%); opacity: 0; }
  to { transform: translate(-50%, 0); opacity: 1; }
}

.cookie-consent-banner.hide {
  transform: translate(-50%, 100%);
  opacity: 0;
  transition: all 0.35s ease;
}

.cookie-banner-content {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  font-size: 0.84rem;
  color: var(--text-main);
  line-height: 1.5;
}

.cookie-banner-icon {
  font-size: 1.4rem;
  color: var(--amber);
  flex-shrink: 0;
}

.cookie-banner-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}

@media (max-width: 768px) {
  .cookie-consent-banner {
    flex-direction: column;
    align-items: flex-start;
    bottom: 4.5rem; /* above mobile nav */
    padding: 1rem;
  }
  .cookie-banner-actions {
    width: 100%;
    justify-content: flex-end;
  }
}

/* ── Laptop squeeze (901-1380px): the header CTA + utility buttons overflow
   the viewport at laptop widths, forcing a horizontal scrollbar over the
   whole page. The page's own "Start Selected Mock Exam" CTA makes the
   header copy redundant, and the utility buttons compress to icons. ── */
@media (min-width: 901px) and (max-width: 1380px) {
  #startExamBtn {
    display: none !important;
    /* redundant with the main page CTA */
  }

  #accessibilityToggleBtn {
    display: none !important;
    /* secondary utility; still available on wider screens */
  }

  #themeToggleText {
    display: none !important;
  }

  #themeToggleBtn {
    padding: 0.42rem 0.6rem !important;
  }

  .header-actions {
    gap: 0.4rem !important;
  }

  header {
    padding: 0.65rem 0.9rem !important;
    gap: 0.75rem !important;
  }

  .nav-tab-btn {
    padding: 0.5rem 0.7rem !important;
    font-size: 0.78rem !important;
    gap: 0.3rem !important;
  }
}

/* ── Small-laptop / large-tablet tier (901-1060px): tighten every header
   component further; at these widths even the squeezed set overflows. ── */
@media (min-width: 901px) and (max-width: 1060px) {
  header {
    padding: 0.5rem 0.7rem !important;
    gap: 0.5rem !important;
  }

  .nav-tab-btn {
    padding: 0.42rem 0.5rem !important;
    font-size: 0.72rem !important;
  }

  .portal-role-switch {
    gap: 0.25rem !important;
  }

  .role-switch-btn {
    padding: 0.35rem 0.55rem !important;
    font-size: 0.72rem !important;
  }

  #btnStudentAuthOpen {
    font-size: 0.72rem !important;
    padding: 0.35rem 0.6rem !important;
  }

  #notifBellBtn,
  #themeToggleBtn {
    padding: 0.35rem 0.5rem !important;
  }

  .header-actions {
    gap: 0.3rem !important;
  }
}

/* ── 901-980px: final shave — brand and tabs a notch smaller ── */
@media (min-width: 901px) and (max-width: 980px) {
  .brand-text h1 {
    font-size: 1.05rem !important;
  }

  .brand-logo-icon {
    width: 34px !important;
    height: 34px !important;
  }

  .nav-tab-btn {
    padding: 0.38rem 0.38rem !important;
    font-size: 0.66rem !important;
  }
}

/* ── Footer stacking fix: the fixed 3D background canvas (#bg-canvas,
   z-index 0) paints above static content, which hid the footer behind the
   DNA helix. Lift the footer (and its contents) above the canvas. ── */
.app-footer {
  position: relative;
  z-index: 1;
}

/* Portal browsing uses document scrolling; only an active exam fills the viewport. */
@media (max-width: 900px) {
  body:not(.exam-session-active):not(.fullscreen-exam-active) .app-layout {
    display: block;
    height: auto;
    max-height: none;
    overflow: visible;
    width: 100%;
  }
  body:not(.exam-session-active):not(.fullscreen-exam-active) { padding-bottom: 0; }
  #accessibilityToggleBtn span { display: none; }
  #accessibilityToggleBtn, #themeToggleBtn, #notifBellBtn { min-width: 44px; min-height: 44px; padding: .5rem !important; }
  .cookie-consent-banner { bottom: max(1rem, env(safe-area-inset-bottom)); }
  .cookie-banner-actions button { min-height: 44px; }
}
.mode-item-card p, .footer-brand p, .footer-links a, .footer-links .info-dialog-trigger, .footer-bottom { color: var(--text-muted); }
.q-tile.marked-answered, [data-theme="light"] .q-tile.marked-answered {
  background: #0369a1 !important;
  color: #fff !important;
  border-color: #7dd3fc !important;
}
.q-tile.marked-answered::after { content: "✓"; position: absolute; right: 2px; bottom: 0; font-size: 11px; }
[data-theme="light"] .app-footer { background: var(--bg-surface); }
[data-theme="light"] .footer-col h5 { color: var(--text-main); }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* Keep the account badge and exam actions within narrow viewports. */
.mode-desc { color: var(--text-muted); }
@media (max-width: 900px) {
  header { flex-wrap: wrap !important; gap: .5rem; }
  .header-actions { flex-wrap: wrap; min-width: 0; }
  .q-hud-bar { flex-wrap: wrap !important; }
  .q-hud-left, .q-hud-right { width: 100%; min-width: 0; flex-wrap: wrap; }
  .q-hud-right { justify-content: space-between; }
  .q-hud-right .btn { padding: .45rem .6rem !important; font-size: .75rem; min-height: 44px; }
  .timer-pill { padding: .4rem .55rem; font-size: .9rem; }
  .btn-mobile-nav-toggle { color: var(--text-main); }
}

/* Scientific content retains readable tables and diagrams on narrow screens. */
.q-text-body, .sol-content-text, .opt-label { min-width: 0; overflow-wrap: anywhere; }
.q-text-body table, .sol-content-text table { max-width: 100%; border-collapse: collapse; }
.q-text-body td, .q-text-body th, .sol-content-text td, .sol-content-text th { border: 1px solid var(--border-color); padding: .4rem; }
.q-text-body img, .sol-content-text img, .opt-label img { max-width: 100%; height: auto; }
.q-text-body mjx-container[display="true"], .sol-content-text mjx-container[display="true"] { overflow-x: auto; overflow-y: hidden; max-width: 100%; }

/* Scientific diagrams stay inside the question card on phones and tablets. */
.q-scroll-area, .q-card-container, .q-statement-card, .enhanced-solution-box,
.sol-steps-body, .q-text-body, .sol-content-text, .opt-card, .opt-label { min-width: 0; max-width: 100%; }
.q-text-body img, .sol-content-text img, .opt-label img {
  box-sizing: border-box;
  display: block;
  width: auto !important;
  max-width: 100% !important;
  height: auto !important;
  margin-inline: auto;
}

/* Keep all exam actions reachable before the layout reaches phone width. */
@media (max-width: 1200px) {
  .q-hud-bar { flex-wrap: wrap !important; gap: .65rem; }
  .q-hud-left, .q-hud-right { width: 100%; min-width: 0; flex-wrap: wrap; }
  .q-hud-right { justify-content: flex-start; }
  #submitExamBtn { margin-left: auto; }
}

@media (max-width: 600px) {
  .q-hud-right { display: grid !important; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: .5rem !important; }
  .q-hud-right .timer-pill, .q-hud-right #hudMarkReviewBtn { min-width: 0; width: 100%; }
  .q-hud-right #submitExamBtn { grid-column: 1 / -1; margin-left: 0; width: 100%; min-height: 48px; justify-content: center; }
  .bottom-actions-bar { align-items: stretch; }
  .bottom-actions-bar .action-group { width: 100%; }
  .bottom-actions-bar .action-group:last-child { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .bottom-actions-bar .action-group:last-child .btn { width: 100%; min-height: 48px; justify-content: center; }
}
