        /* ─── CSS Theme variables ─── */
        :root {
            /* TutorApp Classic Theme (Original) */
            --ta-bg: #f8f9fa;
            --ta-surface: #ffffff;
            --ta-surface-solid: #ffffff;
            --ta-border: rgba(0, 0, 0, 0.08);
            --ta-text: #1f2937;
            --ta-text-muted: #6b7280;
            --ta-accent: #4f46e5;
            --ta-accent-hover: #3730a3;
            --ta-accent-glow: rgba(79, 70, 229, 0.08);
            --ta-sidebar-bg: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%); /* Original purple-indigo gradient */
            --ta-sidebar-text: #cdc9f0;
            --ta-sidebar-active: #ffffff;
            --ta-shadow: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
            --ta-card-blur: 0px;
            --ta-glow-opacity: 0;
            --ta-radius: 6px; /* Squarer card edges */
            --ta-mesh-opacity: 0;
            --ta-glow-border: rgba(0, 0, 0, 0.08);
            
            /* Typography Scale Adjustables */
            --ta-font: 'Inter', system-ui, sans-serif;
            --ta-font-size-base: 16px;
            --ta-font-size-sm: 0.875rem;
            --ta-font-size-lg: 1.15rem;
            
            /* Breathing Background values */
            --breath-duration: 10s;
        }

        [data-theme="accessible"] {
            /* Clean & Accessible Theme */
            --ta-bg: #f8f9fa;
            --ta-surface: #ffffff;
            --ta-surface-solid: #ffffff;
            --ta-border: #d1d5db;
            --ta-text: #111827;
            --ta-text-muted: #4b5563;
            --ta-accent: #2563eb;
            --ta-accent-hover: #1d4ed8;
            --ta-accent-glow: rgba(37, 99, 235, 0.08);
            --ta-sidebar-bg: #111827; /* Dark accessible sidebar */
            --ta-sidebar-text: #9ca3af;
            --ta-sidebar-active: #ffffff;
            --ta-shadow: none; /* Flat cards for high contrast */
            --ta-card-blur: 0px;
            --ta-glow-opacity: 0;
            --ta-radius: 4px; /* Completely square */
            --ta-mesh-opacity: 0;
            --ta-glow-border: #d1d5db;
        }

        [data-theme="premium"] {
            /* Modern & Premium (Vibrant) */
            --ta-bg: #eef2ff;
            --ta-surface: rgba(255, 255, 255, 0.45); /* More transparent, as requested */
            --ta-surface-solid: #ffffff;
            --ta-border: rgba(255, 255, 255, 0.5);
            --ta-text: #0f172a;
            --ta-text-muted: #475569;
            --ta-accent: #6366f1;
            --ta-accent-hover: #8b5cf6;
            --ta-accent-glow: rgba(99, 102, 241, 0.2);
            --ta-sidebar-bg: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            --ta-sidebar-text: rgba(255, 255, 255, 0.8);
            --ta-sidebar-active: #ffffff;
            --ta-shadow: 0 8px 32px 0 rgba(99, 102, 241, 0.06), 0 0 15px 0 rgba(99, 102, 241, 0.15); /* Glowing edge effect */
            --ta-card-blur: 16px; /* High glassmorphic blur */
            --ta-glow-opacity: 1;
            --ta-radius: 6px;
            --ta-mesh-opacity: 1;
            --ta-glow-border: rgba(99, 102, 241, 0.3); /* Translucent glowing border */
        }

        [data-theme="dark"] {
            /* Deep Dark (Midnight) */
            --ta-bg: #09090b;
            --ta-surface: #18181b;
            --ta-surface-solid: #18181b;
            --ta-border: rgba(255, 255, 255, 0.08);
            --ta-text: #f4f4f5;
            --ta-text-muted: #a1a1aa;
            --ta-accent: #3b82f6;
            --ta-accent-hover: #60a5fa;
            --ta-accent-glow: rgba(59, 130, 246, 0.15);
            --ta-sidebar-bg: #18181b;
            --ta-sidebar-text: #71717a;
            --ta-sidebar-active: #3b82f6;
            --ta-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
            --ta-card-blur: 0px;
            --ta-glow-opacity: 0;
            --ta-radius: 6px;
            --ta-mesh-opacity: 0;
            --ta-glow-border: rgba(255, 255, 255, 0.08);
        }

        [data-theme="navy"] {
            /* Navy & Gold (Institutional) — mirrors the marketing site.
               Draft palette from docs/design/BRAND_DRAFT_V1.md; the reasoning is that
               credibility is the brand promise and institutions use deep blues, not
               indigo-on-white. Kept in sync with `body.lp` in
               templates/marketing/landing.html so a tutor who signs up from the
               landing page can carry the same look into the product. */
            --ta-bg: #0A1628;
            --ta-surface: #122139;
            --ta-surface-solid: #122139;
            --ta-border: rgba(255, 255, 255, 0.10);
            --ta-text: #F4F7FC;
            --ta-text-muted: #A3B1C6;
            --ta-accent: #F2C94C;
            --ta-accent-hover: #E3B93C;
            --ta-accent-glow: rgba(242, 201, 76, 0.15);
            --ta-sidebar-bg: #060F1C; /* Deeper than the page, as on the landing bands */
            --ta-sidebar-text: #A3B1C6;
            --ta-sidebar-active: #F2C94C;
            --ta-shadow: 0 4px 12px rgba(0, 0, 0, 0.45);
            --ta-card-blur: 0px;
            --ta-glow-opacity: 0;
            --ta-radius: 6px;
            --ta-mesh-opacity: 0;
            --ta-glow-border: rgba(255, 255, 255, 0.10);
        }

        /* ─── Status pill tokens ───────────────────────────────────────────────
           Roster pills carry meaning (good / watch / at-risk / not-recorded), so
           they need a status colour that survives a theme switch. The legacy pills
           in students.css use hardcoded light-theme hex and are a known dark-theme
           gap; these tokens are the replacement, defined once per theme.

           Light themes use a tinted chip; dark themes use a translucent wash over
           the card so the chip never becomes a bright block on a dark surface. */
        :root,
        [data-theme="accessible"],
        [data-theme="premium"] {
            --ta-pill-good-bg: #d1fae5;   --ta-pill-good-fg: #065f46;
            --ta-pill-warn-bg: #fef3c7;   --ta-pill-warn-fg: #92400e;
            --ta-pill-bad-bg:  #fee2e2;   --ta-pill-bad-fg:  #991b1b;
            --ta-pill-muted-bg: rgba(0, 0, 0, 0.05); --ta-pill-muted-fg: #6b7280;
        }
        [data-theme="dark"],
        [data-theme="navy"] {
            --ta-pill-good-bg: rgba(52, 211, 153, 0.16);  --ta-pill-good-fg: #6ee7b7;
            --ta-pill-warn-bg: rgba(251, 191, 36, 0.16);  --ta-pill-warn-fg: #fcd34d;
            --ta-pill-bad-bg:  rgba(248, 113, 113, 0.16); --ta-pill-bad-fg:  #fca5a5;
            --ta-pill-muted-bg: rgba(255, 255, 255, 0.06); --ta-pill-muted-fg: var(--ta-text-muted);
        }

        /* Font Size Class Overrides */
        .font-sz-sm { --ta-font-size-base: 14px; }
        .font-sz-md { --ta-font-size-base: 16px; }
        .font-sz-lg { --ta-font-size-base: 18px; }

        /* Font Family Classes */
        .font-fam-system { --ta-font: system-ui, -apple-system, sans-serif; }
        .font-fam-inter { --ta-font: 'Inter', sans-serif; }
        .font-fam-dyslexic { --ta-font: 'OpenDyslexic', sans-serif; }
        .font-fam-serif { --ta-font: 'Lora', Georgia, serif; }

        /* ─── Base Styles ─── */
        body {
            font-family: var(--ta-font);
            font-size: var(--ta-font-size-base);
            background-color: var(--ta-bg);
            color: var(--ta-text);
            margin: 0;
            padding: 0;
            min-height: 100vh;
            overflow-x: hidden;
            transition: background-color 0.3s ease, color 0.3s ease, font-size 0.2s ease;
        }

        /* Breathing Background Layer */
        .breathing-bg-layer {
            position: fixed;
            inset: 0;
            z-index: 0;
            background-color: var(--ta-bg);
            pointer-events: none;
            transition: background-color 0.3s ease;
        }
        .breathing-active .breathing-bg-layer {
            animation: appBackgroundBreath var(--breath-duration) ease-in-out infinite;
        }

        @keyframes appBackgroundBreath {
            0% { filter: saturate(100%) brightness(100%); }
            50% { filter: saturate(106%) brightness(97%); }
            100% { filter: saturate(100%) brightness(100%); }
        }

        /* Mesh background for premium mode */
        #mesh-bg {
            position: fixed;
            inset: 0;
            z-index: 0;
            pointer-events: none;
            opacity: var(--ta-mesh-opacity);
            background: 
                radial-gradient(ellipse at 10% 20%, rgba(99, 102, 241, 0.12) 0%, transparent 50%),
                radial-gradient(ellipse at 80% 70%, rgba(139, 92, 246, 0.1) 0%, transparent 45%);
            transition: opacity 0.5s ease;
            animation: meshFloat 12s ease-in-out infinite alternate;
        }
        .breathing-active #mesh-bg {
            animation: meshFloat 12s ease-in-out infinite alternate, meshBreath var(--breath-duration) ease-in-out infinite;
        }
        @keyframes meshFloat {
            0% { transform: scale(1) translate(0%, 0%); }
            100% { transform: scale(1.05) translate(2%, -1%); }
        }
        @keyframes meshBreath {
            0% { opacity: var(--ta-mesh-opacity); }
            50% { opacity: calc(var(--ta-mesh-opacity) * 1.3); }
            100% { opacity: var(--ta-mesh-opacity); }
        }

        .app-layout {
            display: flex;
            min-height: 100vh;
            position: relative;
            z-index: 1;
        }

        /* ─── Sidebar Navigation ─── */
        .sidebar {
            width: 260px;
            background: var(--ta-sidebar-bg);
            color: var(--ta-sidebar-text);
            display: flex;
            flex-direction: column;
            flex-shrink: 0;
            transition: width 0.28s cubic-bezier(0.2, 0.8, 0.2, 1), background 0.3s ease;
            border-right: 1px solid var(--ta-border);
            position: sticky;
            top: 0;
            height: 100vh;
            overflow-y: auto;
            overflow-x: hidden;
            z-index: 200;
        }