
        /* ==========================================================================
           CSS Variables & Tokens
        ========================================================================== */
        :root {
            --app-viewport-height: 100vh;
            --hue-primary: 215;
            --color-primary: hsl(var(--hue-primary), 100%, 50%);
            --color-primary-glow: hsla(var(--hue-primary), 100%, 50%, 0.4);

            --color-accent: #fcd34d;
            --color-accent-glow: rgba(252, 211, 77, 0.4);

            --color-success: #10b981;
            --color-error: #ef4444;

            /* Light Theme */
            --bg-body: #f1f5f9;
            --bg-card: #ffffff;
            --bg-glass: rgba(255, 255, 255, 0.7);
            --border-glass: rgba(255, 255, 255, 0.5);

            --text-main: #0f172a;
            --text-muted: #64748b;

            --input-bg: #f8fafc;
            --input-border: #e2e8f0;

            --header-bg: rgba(255, 255, 255, 0.8);
            --shadow-soft: 0 10px 40px -10px rgba(0, 0, 0, 0.08);
            --shadow-hover: 0 20px 40px -10px rgba(0, 0, 0, 0.12);

            --font-primary: 'Outfit', sans-serif;

            --radius-sm: 12px;
            --radius-md: 20px;
            --radius-lg: 32px;
            --radius-pill: 999px;

            --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
            --transition-smooth: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
            --transition-bounce: 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
        }

        @supports (height: 100dvh) {
            :root { --app-viewport-height: 100dvh; }
        }

        html[data-theme=dark], body.dark-mode {
            /* Dark Theme */
            --bg-body: #020617;
            --bg-card: #0f172a;
            --bg-glass: rgba(15, 23, 42, 0.7);
            --border-glass: rgba(255, 255, 255, 0.05);

            --text-main: #f8fafc;
            --text-muted: #94a3b8;

            --input-bg: #1e293b;
            --input-border: #334155;

            --header-bg: rgba(2, 6, 23, 0.8);
            --shadow-soft: 0 10px 40px -10px rgba(0, 0, 0, 0.5);
            --shadow-hover: 0 20px 40px -10px rgba(0, 0, 0, 0.7);

            --color-accent: #fbbf24;
        }

        /* ==========================================================================
           Reset & Base Styles
        ========================================================================== */
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        html {
            overflow-x: clip;
            -webkit-text-size-adjust: 100%;
            text-size-adjust: 100%;
        }

        body {
            font-family: var(--font-primary);
            background-color: var(--bg-body);
            color: var(--text-main);
            line-height: 1.6;
            min-height: var(--app-viewport-height);
            overflow-x: hidden;
            position: relative;
            transition: background-color var(--transition-smooth), color var(--transition-smooth);
        }

        .bg-shape {
            position: fixed;
            border-radius: 50%;
            filter: blur(100px);
            z-index: -1;
            opacity: 0.4;
            animation: float 20s infinite alternate ease-in-out;
            pointer-events: none;
        }

        .shape1 {
            width: 50vw;
            height: 50vw;
            background: var(--color-primary);
            top: -20vh;
            left: -20vw;
        }

        .shape2 {
            width: 60vw;
            height: 60vw;
            background: var(--color-accent);
            bottom: -30vh;
            right: -20vw;
            animation-duration: 25s;
            animation-delay: -5s;
            opacity: 0.2;
        }

        @keyframes float {
            0% {
                transform: translate(0, 0) scale(1);
            }

            100% {
                transform: translate(10vw, 5vh) scale(1.1);
            }
        }

        h1,
        h2,
        h3,
        h4,
        h5,
        h6 {
            font-weight: 700;
            line-height: 1.2;
            margin-bottom: 0.5em;
            letter-spacing: -0.02em;
        }

        p {
            margin-bottom: 1rem;
        }

        button {
            font-family: var(--font-primary);
            cursor: pointer;
            border: none;
            outline: none;
        }

        input,
        select {
            font-family: var(--font-primary);
        }

        .hidden {
            display: none !important;
        }

        .mt-10 {
            margin-top: 10px;
        }

        .mt-20 {
            margin-top: 20px;
        }

        .mt-30 {
            margin-top: 30px;
        }

        .full-width {
            width: 100%;
        }

        .logo {
            font-size: 2rem;
            font-weight: 700;
            letter-spacing: -1px;
            display: flex;
            align-items: center;
            gap: 0.2rem;
        }

        .logo-text-lms {
            color: #073763;
            font-weight: 700;
        }

        body.dark-mode .logo-text-lms {
            color: #ffffff;
        }

        .logo-large {
            font-size: 4rem;
            font-weight: 800;
            color: var(--text-main);
            margin-bottom: 1rem;
            letter-spacing: -2px;
        }

        .logo-large span {
            color: var(--color-accent);
        }

        #app {
            display: flex;
            flex-direction: column;
            min-height: var(--app-viewport-height);
        }

        #main-header {
            background: var(--header-bg);
            backdrop-filter: blur(20px);
            -webkit-backdrop-filter: blur(20px);
            border-bottom: 1px solid var(--border-glass);
            position: sticky;
            top: 0;
            z-index: 100;
            transition: all var(--transition-smooth);
        }

        /* Keep the course completion indicator visible after the header leaves
           the natural scroll position.  It is toggled by academy.js once the
           learner starts scrolling the lesson. */
        #course-header-progress.is-floating {
            position: fixed !important;
            top: 0 !important;
            bottom: auto !important;
            left: 0 !important;
            z-index: 110;
            box-shadow: 0 1px 8px rgba(15, 23, 42, 0.18);
        }

        #course-header-progress.is-test-progress #course-header-progress-bar {
            background: var(--color-accent) !important;
        }

        .header-content {
            max-width: 1400px;
            margin: 0 auto;
            padding: 1rem 2rem;
            display: flex;
            justify-content: space-between;
            align-items: center;
            position: relative;
        }

        .nav-controls {
            display: flex;
            align-items: center;
            gap: 1.5rem;
        }

        .profile-identity {
            display: flex;
            flex-direction: column;
            min-width: 0;
            line-height: 1.15;
            text-align: left;
        }

        .profile-client-id {
            margin-top: 0.12rem;
            font-size: 0.68em;
            font-weight: 600;
            letter-spacing: 0.02em;
            opacity: 0.72;
        }

        .badge {
            background: var(--color-accent);
            color: #000;
            padding: 0.3rem 0.8rem;
            border-radius: var(--radius-pill);
            font-size: 0.8rem;
            font-weight: 700;
            text-transform: uppercase;
            letter-spacing: 1px;
        }

        .badge-outline {
            background: transparent;
            border: 1px solid var(--text-muted);
            color: var(--text-muted);
        }

        #main-content {
            flex: 1;
            display: flex;
            flex-direction: column;
            padding: 2rem;
            max-width: 1400px;
            margin: 0 auto;
            width: 100%;
            position: relative;
        }

        .view {
            display: none;
            flex: 1;
            animation: fadeIn var(--transition-smooth) forwards;
        }

        .view.active {
            display: flex;
            flex-direction: column;
        }

        /* Components */
        .glass-panel {
            background: var(--bg-glass);
            backdrop-filter: blur(20px);
            -webkit-backdrop-filter: blur(20px);
            border: 1px solid var(--border-glass);
            border-radius: var(--radius-lg);
            box-shadow: var(--shadow-soft);
            transition: var(--transition-smooth);
        }

        .card {
            background: var(--bg-card);
            border: 1px solid var(--border-glass);
            border-radius: var(--radius-lg);
            padding: 2.5rem;
            box-shadow: var(--shadow-soft);
            transition: var(--transition-smooth);
        }

        /* Buttons */
        .btn-primary {
            background: var(--color-accent);
            color: #000;
            padding: 0.8rem 2rem;
            border-radius: var(--radius-pill);
            font-weight: 700;
            font-size: 1rem;
            transition: var(--transition-bounce);
            box-shadow: 0 4px 15px var(--color-accent-glow);
            position: relative;
            overflow: hidden;
            z-index: 1;
        }

        .btn-primary::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(255, 255, 255, 0.2);
            transform: scaleX(0);
            transform-origin: left;
            transition: transform 0.4s ease;
            z-index: -1;
        }

        .btn-primary:hover:not(:disabled) {
            transform: translateY(-3px);
            box-shadow: 0 8px 25px var(--color-accent-glow);
        }

        .btn-primary:hover:not(:disabled)::before {
            transform: scaleX(1);
        }

        .btn-primary:disabled {
            background: var(--input-border);
            color: var(--text-muted);
            box-shadow: none;
            cursor: not-allowed;
        }

        .btn-section-locked {
            background: var(--input-border) !important;
            color: var(--text-muted) !important;
            box-shadow: none !important;
            cursor: not-allowed !important;
        }

        .btn-section-locked::before {
            display: none;
        }

        .section-stopwatch {
            display: block;
            margin: 6px auto 0;
            width: 20px;
            height: 20px;
            transform: rotate(-90deg);
        }

        .section-stopwatch-track {
            stroke: #00a79d;
            opacity: 0.22;
        }

        .section-stopwatch-arc {
            stroke: #00a79d;
            opacity: 0.85;
            stroke-dasharray: 37.70;
            stroke-dashoffset: 37.70;
        }

        .section-stopwatch-arc.running {
            animation: sweepArc var(--section-unlock-delay, 30s) linear forwards;
        }

        .section-countdown {
            display: block;
            min-height: 1em;
            margin-top: 3px;
            font-size: 0.72rem;
            font-variant-numeric: tabular-nums;
            opacity: 0.82;
        }

        @keyframes sweepArc {
            to {
                stroke-dashoffset: 0;
            }
        }

        @keyframes continueUnlock {
            0% {
                transform: scale(0.93);
            }

            55% {
                transform: scale(1.04);
            }

            100% {
                transform: scale(1);
            }
        }

        .btn-outline {
            background: transparent;
            color: var(--text-main);
            border: 2px solid var(--border-glass);
            padding: 0.6rem 1.5rem;
            border-radius: var(--radius-pill);
            font-weight: 700;
            transition: var(--transition-fast);
            backdrop-filter: blur(5px);
        }

        .btn-outline:hover {
            border-color: var(--text-main);
            background: var(--text-main);
            color: var(--bg-body);
            transform: translateY(-2px);
        }

        .btn-text {
            background: transparent;
            color: var(--text-muted);
            font-weight: 700;
            transition: var(--transition-fast);
            font-size: 1rem;
        }

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

        .btn-back {
            background: rgba(255, 255, 255, 0.78);
            border: 1px solid rgba(15, 23, 42, 0.14);
            box-shadow: 0 4px 14px rgba(15, 23, 42, 0.1);
            color: #1e3a8a;
            font-weight: 700;
            padding: 0.5rem 0.85rem;
            margin-bottom: 2rem;
            transition: var(--transition-bounce);
            display: inline-flex;
            align-self: flex-start;
            align-items: center;
            border-radius: var(--radius-pill);
            font-size: 1.1rem;
            line-height: 1.2;
        }

        .btn-back:hover {
            background: #ffffff;
            border-color: rgba(30, 58, 138, 0.42);
            box-shadow: 0 8px 18px rgba(30, 58, 138, 0.16);
            color: #172554;
            transform: translateX(-4px);
        }

        .btn-back:focus-visible {
            outline: 3px solid var(--color-accent);
            outline-offset: 3px;
        }

        body.dark-mode .btn-back {
            background: rgba(15, 23, 42, 0.8);
            border-color: rgba(191, 219, 254, 0.35);
            box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
            color: #dbeafe;
        }

        body.dark-mode .btn-back:hover {
            background: #1e3a8a;
            border-color: #bfdbfe;
            color: #ffffff;
        }

        label {
            font-weight: 600;
            font-size: 0.9rem;
            color: var(--text-muted);
            text-transform: uppercase;
            letter-spacing: 1px;
        }

        input[type="text"],
        input[type="password"],
        input[type="url"],
        select {
            width: 100%;
            padding: 1.2rem 1.5rem;
            border-radius: var(--radius-md);
            border: 2px solid var(--input-border);
            background: var(--input-bg);
            color: var(--text-main);
            font-size: 1rem;
            transition: var(--transition-fast);
        }

        input:focus,
        select:focus {
            border-color: var(--color-primary);
            background: var(--bg-card);
            outline: none;
            box-shadow: 0 0 0 4px var(--color-primary-glow);
        }

        .toggle-label {
            display: flex;
            align-items: center;
            gap: 1rem;
            cursor: pointer;
            background: var(--input-bg);
            padding: 1.2rem;
            border-radius: var(--radius-md);
            border: 1px solid var(--input-border);
            transition: var(--transition-fast);
        }

        .toggle-label:hover {
            border-color: var(--color-primary);
        }

        .toggle-label input[type="checkbox"] {
            width: 24px;
            height: 24px;
            accent-color: var(--color-primary);
            cursor: pointer;
        }

        .toggle-label input[type="radio"] {
            width: 24px;
            height: 24px;
            accent-color: var(--color-primary);
            cursor: pointer;
        }

        .divider {
            display: flex;
            align-items: center;
            text-align: center;
            color: var(--text-muted);
            font-weight: 700;
            margin: 2rem 0;
            text-transform: uppercase;
            letter-spacing: 2px;
            font-size: 0.8rem;
        }

        .divider::before,
        .divider::after {
            content: '';
            flex: 1;
            border-bottom: 1px solid var(--border-glass);
        }

        .divider::before {
            margin-right: 1em;
        }

        .divider::after {
            margin-left: 1em;
        }

        /* Switch Toggle for Dark Mode & Filters */
        .switch {
            position: relative;
            display: inline-block;
            width: 60px;
            height: 34px;
        }

        .switch input {
            position: absolute;
            inset: 0;
            opacity: 0;
            width: 100%;
            height: 100%;
            margin: 0;
            z-index: 2;
            cursor: pointer;
        }
        .switch input:focus-visible + .slider { outline: 3px solid var(--color-accent); outline-offset: 3px; }

        .slider {
            position: absolute;
            cursor: pointer;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background-color: var(--input-border);
            transition: .4s;
            border-radius: 34px;
        }

        .slider:before {
            position: absolute;
            content: "";
            height: 26px;
            width: 26px;
            left: 4px;
            bottom: 4px;
            background-color: white;
            transition: .4s;
            border-radius: 50%;
        }

        input:checked+.slider {
            background-color: var(--color-primary);
        }

        input:focus+.slider {
            box-shadow: 0 0 1px var(--color-primary);
        }

        input:checked+.slider:before {
            transform: translateX(26px);
        }

        /* Dashboard Grids */
        .dashboard-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 2rem;
            flex-wrap: wrap;
            gap: 1rem;
            width: 100%;
        }

        .category-section {
            margin-bottom: 4rem;
        }

        .category-title {
            border-bottom: 3px solid var(--color-accent);
            display: inline-block;
            padding-bottom: 0.5rem;
            margin-bottom: 2rem;
            font-size: 1.5rem;
        }

        .course-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
            gap: 2rem;
        }

        .course-card {
            background: var(--bg-card);
            border-radius: var(--radius-lg);
            padding: 2rem;
            box-shadow: var(--shadow-soft);
            transition: var(--transition-bounce);
            display: flex;
            flex-direction: column;
            border: 1px solid var(--border-glass);
            cursor: pointer;
            position: relative;
            overflow: hidden;
        }

        .course-card::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 6px;
            background: linear-gradient(90deg, var(--color-primary), var(--color-accent));
            transform: scaleX(0);
            transform-origin: left;
            transition: var(--transition-smooth);
        }

        .course-card:hover {
            transform: translateY(-10px) scale(1.02);
            box-shadow: var(--shadow-hover);
            border-color: var(--border-glass);
        }

        .course-card:hover::before {
            transform: scaleX(1);
        }

        .course-card.locked {
            opacity: 0.4;
            filter: grayscale(100%);
            cursor: not-allowed;
            pointer-events: auto;
        }

        .course-card.locked:hover {
            transform: none;
            box-shadow: var(--shadow-soft);
            border-color: var(--border-glass);
        }

        .course-card.locked::before {
            display: none;
        }

        .course-card h3 {
            margin: 0 0 0.5rem 0;
            font-size: 1.4rem;
            line-height: 1.3;
        }

        .course-meta {
            display: flex;
            flex-wrap: wrap;
            gap: 0.5rem;
            margin-bottom: 1rem;
            font-size: 0.8rem;
            font-weight: 700;
            color: var(--text-muted);
            letter-spacing: 0.5px;
            flex: 1;
            text-transform: none;
        }

        /* Visual Dashboard Stats (Learner) */
        .dashboard-overview {
            display: grid;
            grid-template-columns: 2fr 1fr;
            gap: 2rem;
            margin-bottom: 3rem;
        }

        .cert-banner {
            display: flex;
            align-items: center;
            gap: 2rem;
            padding: 2.5rem;
            background: linear-gradient(135deg, var(--color-primary), #1e40af);
            color: white;
            border-radius: var(--radius-lg);
            box-shadow: var(--shadow-soft);
            position: relative;
            overflow: hidden;
            border: none;
        }

        .cert-banner::after {
            content: '';
            position: absolute;
            top: -50%;
            right: -20%;
            width: 300px;
            height: 300px;
            background: radial-gradient(circle, rgba(255, 255, 255, 0.2) 0%, rgba(255, 255, 255, 0) 70%);
            border-radius: 50%;
            pointer-events: none;
        }

        .cert-banner-icon {
            font-size: 5rem;
            animation: pulse 3s infinite;
            text-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
        }

        .cert-banner-text h3 {
            color: white;
            font-size: 1.8rem;
            margin-bottom: 0.5rem;
        }

        .cert-banner-text p {
            color: rgba(255, 255, 255, 0.8);
            font-size: 1rem;
        }

        .progress-bar-container {
            height: 12px;
            background: rgba(0, 0, 0, 0.2);
            border-radius: var(--radius-pill);
            overflow: hidden;
            margin-top: 1.5rem;
        }

        .progress-bar {
            height: 100%;
            background: var(--color-accent);
            width: 0%;
            transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);
            box-shadow: 0 0 10px var(--color-accent-glow);
        }

        .language-test-next-step {
            flex: 0 0 100%;
            position: relative;
            z-index: 1;
        }

        .language-test-next-step-card {
            margin-top: 1rem;
            padding: 1.05rem;
            border: 1px solid rgba(37, 99, 235, 0.2);
            border-radius: 20px;
            background: linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(237, 245, 255, 0.9));
            box-shadow: 0 12px 26px rgba(28, 66, 135, 0.1);
            color: var(--text-main);
            text-align: left;
        }

        .language-test-next-step-heading {
            display: flex;
            align-items: flex-start;
            gap: 0.8rem;
        }

        .language-test-next-step-icon {
            flex: 0 0 auto;
            display: grid;
            width: 2.55rem;
            height: 2.55rem;
            place-items: center;
            border-radius: 13px;
            background: var(--color-primary);
            box-shadow: 0 5px 12px rgba(37, 99, 235, 0.24);
            font-size: 1.25rem;
            line-height: 1;
        }

        .language-test-next-step-content {
            min-width: 0;
            margin: 0.8rem 0 0 3.35rem;
        }

        .language-test-next-step-heading-copy {
            min-width: 0;
            flex: 1;
        }

        .language-test-next-step-card h3 {
            margin: 0;
            color: inherit;
            font-size: 1.1rem;
            line-height: 1.25;
        }

        .language-test-next-step-card p {
            margin: 0;
            line-height: 1.45;
        }

        .language-test-requirement {
            margin-top: 0.32rem !important;
            color: var(--text-muted);
            font-size: 0.88rem;
            font-weight: 650;
        }

        .language-test-action-copy {
            margin-top: 0 !important;
            color: var(--text-muted);
            font-size: 0.92rem;
        }

        .language-test-contact {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 0.8rem;
            margin-top: 0.8rem;
            padding: 0.72rem 0.78rem;
            border: 1px solid rgba(37, 99, 235, 0.14);
            border-radius: 14px;
            background: rgba(37, 99, 235, 0.06);
        }

        .language-test-contact-person {
            display: flex;
            align-items: center;
            min-width: 0;
            gap: 0.55rem;
        }

        .language-test-contact-avatar {
            display: grid;
            flex: 0 0 auto;
            width: 2rem;
            height: 2rem;
            place-items: center;
            border-radius: 50%;
            background: rgba(37, 99, 235, 0.13);
            font-size: 0.95rem;
        }

        .language-test-contact-label {
            display: block;
            margin-bottom: 0.05rem;
            color: var(--text-muted);
            font-size: 0.68rem;
            font-weight: 700;
            letter-spacing: 0.04em;
            text-transform: uppercase;
        }

        .language-test-contact strong {
            display: block;
            overflow: hidden;
            font-size: 0.94rem;
            line-height: 1.25;
            text-overflow: ellipsis;
            white-space: nowrap;
        }

        .language-test-contact-actions {
            display: flex;
            flex-wrap: wrap;
            flex: 0 0 auto;
            gap: 0.45rem;
        }

        .language-test-contact-button {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 0.35rem;
            min-height: 38px;
            padding: 0.45rem 0.7rem;
            border-radius: var(--radius-pill);
            background: var(--color-primary);
            color: #fff;
            font-size: 0.82rem;
            font-weight: 750;
            text-decoration: none;
            transition: transform 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
        }

        .language-test-contact-button:hover,
        .language-test-contact-button:focus-visible {
            background: #1e40af;
            color: #fff;
            box-shadow: 0 5px 12px rgba(30, 64, 175, 0.24);
            transform: translateY(-1px);
        }

        .language-test-compact-status {
            display: flex;
            align-items: center;
            gap: 0.45rem;
            margin-top: 0.9rem;
            padding: 0.55rem 0.7rem;
            border: 1px solid rgba(255, 255, 255, 0.45);
            border-radius: var(--radius-sm);
            background: rgba(0, 0, 0, 0.12);
            color: #fff;
            font-size: 0.82rem;
            font-weight: 700;
            line-height: 1.3;
        }

        #bundle-cert-banner .language-test-next-step-card {
            background: linear-gradient(135deg, rgba(9, 37, 108, 0.24), rgba(255, 255, 255, 0.11));
            border-color: rgba(255, 255, 255, 0.26);
            box-shadow: none;
            color: #fff;
        }

        #bundle-cert-banner .language-test-action-copy,
        #bundle-cert-banner .language-test-contact-label {
            color: rgba(255, 255, 255, 0.84);
        }

        #bundle-cert-banner .language-test-contact {
            background: rgba(4, 29, 93, 0.24);
            border-color: rgba(255, 255, 255, 0.14);
        }

        #bundle-cert-banner .language-test-next-step-icon {
            background: var(--color-accent);
            box-shadow: 0 5px 12px rgba(255, 225, 82, 0.2);
        }

        #bundle-cert-banner .language-test-contact-avatar {
            background: rgba(255, 255, 255, 0.15);
        }

        #bundle-cert-banner .language-test-contact strong {
            color: #fff;
        }

        #bundle-cert-banner .language-test-contact-button {
            background: #fff;
            color: var(--color-primary);
        }

        #bundle-cert-banner .language-test-contact-button:hover,
        #bundle-cert-banner .language-test-contact-button:focus-visible {
            background: var(--color-accent);
            color: #000;
        }

        .stats-grid {
            display: grid;
            grid-template-columns: 1fr;
            gap: 1rem;
        }

        .stat-card {
            padding: 2rem;
            text-align: center;
            display: flex;
            flex-direction: column;
            justify-content: center;
            position: relative;
        }

        .stat-value {
            font-size: 3.5rem;
            font-weight: 800;
            color: var(--text-main);
            line-height: 1;
            margin-bottom: 0.5rem;
            background: -webkit-linear-gradient(45deg, var(--color-primary), var(--color-accent));
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
        }

        .stat-label {
            font-weight: 700;
            color: var(--text-muted);
            text-transform: uppercase;
            font-size: 0.85rem;
            letter-spacing: 1.5px;
        }

        /* Article Viewer */
        .article-container {
            max-width: 900px;
            margin: 0 auto;
            width: 100%;
            padding: 4rem !important;
        }

        .article-meta {
            margin-bottom: 2rem;
            display: flex;
            gap: 1rem;
            flex-wrap: wrap;
            text-transform: uppercase;
        }

        .article-title {
            font-size: 3rem;
            color: var(--text-main);
            margin-bottom: 0.5rem;
            line-height: 1.2;
            letter-spacing: -1px;
        }

        .article-subtitle {
            color: var(--text-muted);
            font-size: 1.4rem;
            font-weight: 500;
            margin-bottom: 3rem;
        }

        .article-content {
            display: flex;
            flex-direction: column;
            gap: 2.5rem;
            font-size: 1.2rem;
            line-height: 1.8;
            color: var(--text-main);
        }

        .article-content h2 {
            color: var(--text-main);
            margin-top: 1rem;
            font-size: 2rem;
            padding-bottom: 0.5rem;
        }

        .article-content ul {
            padding-left: 2rem;
        }

        .article-content .details-box {
            background: var(--input-bg);
            padding: 2rem;
            border-left: 5px solid var(--color-primary);
            border-radius: 0 var(--radius-md) var(--radius-md) 0;
            font-weight: 500;
            font-style: italic;
        }

        .video-wrapper {
            position: relative;
            padding-bottom: 56.25%;
            height: 0;
            overflow: hidden;
            border-radius: var(--radius-lg);
            background: #000;
            box-shadow: var(--shadow-hover);
        }

        .video-wrapper iframe, .video-wrapper video, .academy-video-play {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            border: none;
        }

        .academy-video-play {
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            gap: 1rem;
            padding: 1.5rem;
            background: #152a29;
            color: #fff;
            cursor: pointer;
            font: inherit;
            font-weight: 600;
        }

        .academy-video-play-symbol {
            display: grid;
            place-items: center;
            width: 3.5rem;
            height: 3.5rem;
            border-radius: 50%;
            background: #ffed00;
            color: #152a29;
            flex-shrink: 0;
        }

        .academy-video-play-symbol .ui-icon {
            width: 28px;
            height: 28px;
            fill: currentColor;
            stroke: none;
            transform: translateX(1px);
        }

        .academy-video-play:hover { background: #22413f; }
        .academy-video-play:focus-visible { outline: 3px solid #ffed00; outline-offset: -6px; }
        .academy-video-play:disabled { cursor: default; opacity: .7; }

        .course-section {
            transition: opacity 0.4s ease;
        }

        /* Quiz Viewer */
        .test-container {
            max-width: 800px;
            margin: 0 auto;
            width: 100%;
            padding: 4rem !important;
        }

        .test-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 2rem;
        }

        .test-header h2 {
            margin: 0;
        }

        .quiz-question-container {
            min-height: 400px;
        }

        .question-text {
            font-size: 1.8rem;
            font-weight: 700;
            margin-bottom: 3rem;
            color: var(--text-main);
            line-height: 1.4;
        }

        .options-grid {
            display: flex;
            flex-direction: column;
            gap: 1.5rem;
        }

        .option-label {
            display: flex;
            align-items: center;
            padding: 1.5rem 2rem;
            background: var(--input-bg);
            border: 2px solid var(--input-border);
            border-radius: var(--radius-md);
            cursor: pointer;
            transition: var(--transition-bounce);
            font-weight: 600;
            font-size: 1.1rem;
            text-transform: none;
            letter-spacing: normal;
            color: var(--text-main);
        }

        .option-label:hover {
            border-color: var(--color-primary);
            transform: translateX(10px);
            background: var(--bg-card);
        }

        .option-label input[type="radio"] {
            margin-right: 1.5rem;
            width: 24px;
            height: 24px;
            accent-color: var(--color-primary);
            cursor: pointer;
        }

        .option-label.selected {
            border-color: var(--color-primary);
            background: var(--bg-card);
            box-shadow: 0 10px 20px var(--color-primary-glow);
            transform: translateX(10px);
        }

        /* Results & Certificate Utilities */
        #view-quiz-results {
            justify-content: center;
            align-items: center;
            text-align: center;
        }

        .results-card {
            padding: 5rem 3rem;
            text-align: center;
            max-width: 600px;
            width: 100%;
        }

        .score-circle {
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            margin: 3rem auto;
            position: relative;
            transition: background 1.5s cubic-bezier(0.4, 0, 0.2, 1);
            box-shadow: var(--shadow-hover);
        }

        .score-circle::before {
            content: '';
            position: absolute;
            inset: 15px;
            background: var(--bg-card);
            border-radius: 50%;
            z-index: 1;
            transition: background-color var(--transition-smooth);
        }

        .confetti-container {
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            pointer-events: none;
            z-index: 100;
            overflow: hidden;
        }

        .confetti-piece {
            position: absolute;
            width: 15px;
            height: 15px;
            opacity: 0;
            border-radius: 2px;
        }

        /* Exportable Certificate */
        .exportable-certificate {
            container-type: inline-size;
            position: relative;
            width: 100%;
            aspect-ratio: 210 / 297;
            background:
                radial-gradient(120% 120% at 100% 100%, #e9edf0 0%, rgba(244, 246, 247, 0) 45%),
                radial-gradient(120% 120% at 0% 0%, #eef1f3 0%, rgba(244, 246, 247, 0) 40%),
                linear-gradient(135deg, #ffffff 0%, #f6f8f9 50%, #ffffff 100%);
            overflow: hidden;
            box-shadow: 0 25px 60px rgba(0, 0, 0, 0.18);
            font-family: 'Roboto', sans-serif;
            max-width: 900px;
            margin: 0 auto;
        }

        .exportable-certificate .cert-swoosh,
        .exportable-certificate .cert-frame {
            position: absolute;
            inset: 0;
            width: 100%;
            height: 100%;
            z-index: 1;
            pointer-events: none;
        }

        .exportable-certificate .cert-content {
            position: absolute;
            inset: 0;
            display: flex;
            flex-direction: column;
            align-items: center;
            text-align: center;
            padding: 6% 9% 20%;
            overflow: hidden;
            z-index: 2;
        }

        .exportable-certificate .cert-logo {
            width: 17%;
            aspect-ratio: 1;
            border-radius: 28px;
            overflow: hidden;
            margin-top: 2%;
            flex-shrink: 0;
        }

        .exportable-certificate .cert-logo img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            display: block;
        }

        .exportable-certificate h1 {
            font-family: 'Roboto', sans-serif;
            font-weight: 400;
            font-size: 6.0cqw;
            letter-spacing: 7px;
            color: #3a3a3a;
            margin: 3% 0 0;
            padding-left: 7px;
            text-transform: uppercase;
        }

        .exportable-certificate .cert-given {
            font-size: 2.5cqw;
            color: #4a4a4a;
            margin-top: 2.5%;
            letter-spacing: 0.5px;
        }

        .exportable-certificate .cert-recipient {
            font-family: 'Playfair Display', serif;
            font-style: italic;
            font-weight: 600;
            font-size: 6.0cqw;
            color: #1a3a63;
            margin-top: 2%;
        }

        .exportable-certificate .cert-name-line {
            width: 60%;
            border-bottom: 1.5px solid #1a3a63;
            margin-top: 2%;
        }

        .exportable-certificate .cert-label {
            font-size: 2.5cqw;
            font-weight: 400;
            color: #4a4a4a;
            letter-spacing: 0.3px;
            margin-top: 2.5%;
        }

        .exportable-certificate .cert-course {
            font-family: 'Playfair Display', serif;
            font-weight: 600;
            font-size: 5.5cqw;
            line-height: 1.12;
            color: #1a3a63;
            margin-top: 1.5%;
            max-width: 92%;
        }

        .exportable-certificate .cert-topics-label {
            font-size: 2.2cqw;
            font-weight: 500;
            letter-spacing: 1px;
            text-transform: uppercase;
            color: #6a7077;
            margin-top: 4%;
            align-self: flex-start;
        }

        .exportable-certificate .cert-topics {
            font-size: 1.9cqw;
            font-weight: 300;
            color: #4a4a4a;
            line-height: 2.0;
            margin-top: 0.6%;
            width: 100%;
            text-align: left;
        }

        .exportable-certificate .cert-topics.two-col {
            column-count: 2;
            column-gap: 6%;
        }

        .exportable-certificate .cert-topic-item {
            break-inside: avoid;
        }

        .exportable-certificate .cert-topic-item::before {
            content: '— ';
            color: #2fc4b2;
            font-weight: 500;
        }

        .exportable-certificate .cert-signatures {
            position: absolute;
            bottom: 8%;
            left: 10%;
            right: 10%;
            display: grid;
            grid-template-columns: 35% 1fr 35%;
            z-index: 2;
        }

        .exportable-certificate .cert-sig-above {
            align-self: end;
            text-align: center;
        }

        .exportable-certificate .cert-sig-below {
            align-self: start;
            text-align: center;
        }

        .exportable-certificate .cert-sig-scribble {
            width: 62%;
            height: auto;
            display: block;
            margin: 0 auto 4px;
            transform: rotate(-4deg);
        }

        .exportable-certificate .cert-sig-name {
            font-size: 1.3cqw;
            color: #666;
            font-style: italic;
            margin-top: 3px;
        }

        .exportable-certificate .cert-sig-date {
            font-family: 'Roboto', sans-serif;
            font-weight: 500;
            font-size: 1.75cqw;
            color: #1a3a63;
            letter-spacing: 1px;
            padding-bottom: 6px;
        }

        .exportable-certificate .cert-sig-line {
            border-bottom: 1.5px solid #1a3a63;
            margin-bottom: 8px;
        }

        .exportable-certificate .cert-sig-label {
            font-size: 1.6cqw;
            letter-spacing: 4px;
            color: #555;
            text-transform: uppercase;
        }

        .exportable-certificate .cert-disclaimer {
            position: absolute;
            bottom: 4.5%;
            left: 0;
            right: 0;
            text-align: center;
            font-size: 1.4cqw;
            letter-spacing: 0.3px;
            color: #aab0b6;
            font-weight: 300;
            font-style: italic;
            z-index: 2;
        }

        #profile-certificates-list .exportable-certificate {
            max-width: 440px;
        }

        /* Animations */
        @keyframes fadeIn {
            from {
                opacity: 0;
            }

            to {
                opacity: 1;
            }
        }

        @keyframes fadeInUp {
            from {
                opacity: 0;
                transform: translateY(40px);
            }

            to {
                opacity: 1;
            }
        }

        @keyframes scaleUp {
            from {
                opacity: 0;
                transform: scale(0.9);
            }

            to {
                opacity: 1;
            }
        }

        @keyframes pulse {

            0%,
            100% {
                transform: scale(1);
            }

            50% {
                transform: scale(1.05);
            }
        }

        @keyframes fall {
            0% {
                opacity: 1;
                top: -10%;
                transform: translateX(0) rotate(0deg);
            }

            100% {
                opacity: 0;
                top: 100%;
                transform: translateX(100px) rotate(720deg);
            }
        }

        .fade-in-up {
            opacity: 0;
            animation: fadeInUp 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
        }

        .scale-up {
            opacity: 0;
            animation: scaleUp 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
        }

        .stagger-1 {
            animation-delay: 0.1s;
        }

        .stagger-2 {
            animation-delay: 0.2s;
        }

        .stagger-3 {
            animation-delay: 0.3s;
        }

        /* Responsive UI */
        @media (max-width: 900px) {
            .dashboard-overview {
                grid-template-columns: minmax(0, 1fr);
            }

            .stats-grid {
                grid-template-columns: 1fr 1fr;
            }
        }

        @media (max-width: 768px) {
            #main-content {
                padding: 0;
            }

            .dashboard-overview,
            .dashboard-header,
            .course-grid,
            .profile-header,
            .profile-stats-grid,
            #profile-certificates-list {
                padding: 0 0.5rem;
            }

            #profile-certificates-list .exportable-certificate {
                max-width: 320px;
            }

            .dashboard-overview {
                gap: 1rem;
                margin-bottom: 1.5rem;
            }

            .bg-shape {
                display: none;
            }

            .header-content {
                padding: 0.6rem 1rem;
                flex-direction: row;
                justify-content: space-between;
                align-items: center;
                gap: 0.5rem;
            }

            .nav-controls {
                flex-wrap: nowrap;
                justify-content: flex-end;
                gap: 0.5rem;
            }

            .nav-controls .btn-outline {
                font-size: 0.8rem;
                padding: 0.4rem 0.8rem;
            }

            .logo {
                font-size: 1.4rem;
            }

            .logo img {
                height: 1.8rem !important;
                margin-right: 0.3rem !important;
            }

            .cert-banner {
                flex-direction: column;
                text-align: center;
                padding: 1rem;
                gap: 0.5rem;
                border-radius: 12px;
            }

            .stats-grid {
                grid-template-columns: 1fr 1fr;
                gap: 0.5rem;
            }

            .cert-banner>div:last-child {
                padding-top: 0.5rem;
                margin-top: 0.2rem;
            }

            #btn-claim-certificate {
                padding: 0.6rem 1rem;
                font-size: 0.9rem;
                width: 100%;
            }

            .language-test-next-step-card {
                padding: 0.9rem;
            }

            .language-test-next-step-icon {
                width: 2.3rem;
                height: 2.3rem;
                border-radius: 11px;
                font-size: 1.15rem;
            }

            .language-test-next-step-content {
                margin-left: 0;
            }

            .language-test-contact {
                align-items: stretch;
                flex-direction: column;
            }

            .language-test-contact-actions {
                display: grid;
                grid-template-columns: repeat(2, minmax(0, 1fr));
                width: 100%;
            }

            .language-test-contact-button {
                min-height: 44px;
                width: 100%;
            }

            .language-test-compact-status {
                justify-content: center;
                text-align: left;
                font-size: 0.78rem;
            }

            .article-container,
            .test-container {
                padding: 1rem 0.5rem !important;
                border-radius: 0;
                border: none;
                background: transparent;
                box-shadow: none;
                margin: 0;
            }

            .article-title {
                font-size: 1.5rem;
            }

            .test-header {
                margin-bottom: 0.8rem;
            }

            .test-header h2 {
                font-size: 1rem;
            }

            #test-progress-text {
                font-size: 0.7rem;
                padding: 0.2rem 0.6rem;
            }

            .question-text {
                font-size: 0.85rem;
                margin-bottom: 1.2rem;
            }

            .options-grid {
                gap: 0.5rem;
            }

            .option-label {
                padding: 0.8rem 1rem;
                font-size: 0.95rem;
                border-radius: 6px;
            }

            .option-label input[type="radio"] {
                width: 18px;
                height: 18px;
                margin-right: 0.8rem;
            }

            .quiz-question-container {
                min-height: auto;
            }

            #btn-next-question {
                font-size: 0.8rem;
                padding: 0.8rem;
                margin-top: 1rem;
            }

            .stat-value {
                font-size: 1.5rem !important;
                margin-bottom: 0.1rem;
            }

            .stat-card {
                padding: 0.8rem;
            }

            .stat-label {
                font-size: 0.65rem;
            }

            .cert-banner-text h3 {
                font-size: 1.1rem;
                margin-bottom: 0.2rem;
            }

            .cert-banner-text p {
                font-size: 0.8rem;
                margin-bottom: 0.5rem;
                line-height: 1.2;
            }

            .cert-banner-icon {
                font-size: 2rem;
            }

            .progress-bar-container {
                height: 6px;
                margin-top: 0.5rem;
            }

            /* Courses List */
            .course-grid {
                grid-template-columns: 1fr;
                gap: 0.8rem;
            }

            .course-card {
                padding: 1rem;
            }

            .course-card h3 {
                font-size: 1.1rem;
                margin: 0 0 0.5rem 0;
            }

            .course-meta {
                font-size: 0.65rem;
            }


            .profile-header {
                flex-direction: column;
                text-align: center;
            }

            .profile-header>div {
                flex-direction: column;
                gap: 0.5rem !important;
            }

            .profile-header .switch {
                transform: scale(0.8);
                margin-left: 0.5rem;
            }

            #profile-certs-count,
            #profile-completed-count,
            #profile-avg-score,
            #profile-inprogress-count {
                font-size: 2rem !important;
                margin-bottom: 0.3rem !important;
            }
        }

        .global-lang-bar {
            position: absolute;
            top: 1rem;
            right: 2rem;
            z-index: 1000;
        }

        .global-lang-select {
            width: auto !important;
            min-width: 100px;
            padding: 0.5rem 1rem !important;
            border-radius: var(--radius-pill) !important;
            background-color: var(--bg-card) !important;
            border: 1px solid var(--border-glass) !important;
            box-shadow: var(--shadow-soft) !important;
            font-size: 1rem !important;
            color: var(--text-main) !important;
            cursor: pointer;
        }

        .global-lang-select:hover {
            border-color: var(--color-primary) !important;
        }

        @media (max-width: 768px) {
            .global-lang-bar {
                top: 0.5rem;
                right: 0.5rem;
            }

            .global-lang-select {
                font-size: 0.9rem !important;
                padding: 0.3rem 0.8rem !important;
            }
        }

        .skel {
            background: linear-gradient(90deg, var(--input-border) 25%, var(--bg-card) 50%, var(--input-border) 75%);
            background-size: 200% 100%;
            animation: shimmer 1.5s ease-in-out infinite;
            border-radius: 8px;
        }

.skeleton-line {
            height: 1rem;
            max-width: 100%;
        }

        .skeleton-line-title {
            width: min(70%, 18rem);
            height: 1.5rem;
        }

        .skeleton-line-description-short {
            width: 68%;
        }

        @keyframes shimmer {
            0% {
                background-position: 200% 0;
            }

            100% {
                background-position: -200% 0;
            }
        }

        /* Interactive Games Elements */
        .game-card {
            background: var(--input-bg);
            border: 2px solid var(--input-border);
            border-radius: var(--radius-md);
            padding: 1.5rem;
            margin: 2rem 0;
            box-shadow: var(--shadow-soft);
        }

        .game-instructions {
            color: var(--text-muted);
            margin-bottom: 2rem;
            font-weight: 500;
            font-size: 1.1rem;
        }

        .game-feedback {
            margin-top: 1.5rem;
            font-weight: 700;
            text-align: center;
            min-height: 24px;
            transition: 0.3s;
            font-size: 1.1rem;
        }

        .sequence-list {
            display: flex;
            flex-direction: column;
            gap: 1rem;
            margin-bottom: 2rem;
        }

        .sequence-item {
            background: var(--bg-card);
            border: 2px solid var(--input-border);
            border-radius: 12px;
            padding: 1rem 1.5rem;
            display: flex;
            align-items: center;
            gap: 1rem;
            cursor: grab;
            transition: box-shadow 0.2s, border-color 0.2s;
            user-select: none;
            font-weight: 600;
            touch-action: none;
        }

        .sequence-item:hover {
            border-color: var(--color-primary);
        }

        .sortable-ghost {
            opacity: 0.4;
            background: var(--input-border);
            border: 2px dashed var(--text-muted);
        }

        .sortable-drag {
            cursor: grabbing !important;
            box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
            background: var(--bg-card);
            border-color: var(--color-primary);
            opacity: 1 !important;
        }

        .drag-handle-game {
            color: var(--text-muted);
            font-size: 1.5rem;
            display: flex;
            align-items: center;
            cursor: grab;
        }

        .sequence-item.correct {
            border-color: var(--color-success);
            background: rgba(16, 185, 129, 0.1);
        }

        .sequence-item.incorrect {
            border-color: var(--color-error);
            background: rgba(239, 68, 68, 0.1);
        }

        .cloze-text {
            font-size: 1.2rem;
            line-height: 2;
            color: var(--text-main);
        }

        .cloze-select {
            font-family: inherit;
            font-size: 1.1rem;
            padding: 0.4rem;
            border: 2px solid var(--input-border);
            border-radius: 8px;
            background: var(--bg-card);
            cursor: pointer;
            color: var(--text-main);
            font-weight: 600;
            margin: 0 0.3rem;
        }

        .triage-card {
            background: var(--bg-card);
            border: 2px solid var(--color-primary);
            border-radius: 12px;
            padding: 3rem 2rem;
            text-align: center;
            font-size: 1.5rem;
            font-weight: 700;
            margin-bottom: 2rem;
        }

        .triage-buttons {
            display: flex;
            gap: 1rem;
            flex-wrap: wrap;
        }

        .triage-buttons .btn-outline {
            flex: 1;
            min-width: 120px;
        }

        .chat-msg {
            padding: 1rem;
            border-radius: 12px;
            margin-bottom: 1rem;
            max-width: 85%;
            line-height: 1.4;
            font-size: 1.1rem;
        }

        .msg-patient {
            background: var(--bg-card);
            border: 1px solid var(--input-border);
            align-self: flex-start;
        }

        .msg-system {
            background: rgba(16, 185, 129, 0.1);
            color: var(--color-success);
            border: 1px solid var(--color-success);
            align-self: flex-end;
            font-weight: 700;
        }

        .chat-container {
            display: flex;
            flex-direction: column;
            margin-bottom: 1.5rem;
        }

        .chat-options {
            display: flex;
            flex-direction: column;
            gap: 0.8rem;
        }

        .chat-btn {
            background: var(--bg-card);
            border: 2px solid var(--color-primary);
            padding: 1rem;
            border-radius: 12px;
            cursor: pointer;
            text-align: left;
            font-family: inherit;
            font-weight: 600;
            font-size: 1rem;
            transition: 0.2s;
            color: var(--text-main);
        }

        .chat-btn:hover {
            background: var(--color-primary);
            color: white;
        }

        .matching-grid {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 1.5rem;
        }

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

        .match-item {
            padding: 1.2rem;
            border: 2px solid var(--input-border);
            border-radius: 12px;
            background: var(--bg-card);
            cursor: pointer;
            font-weight: 600;
            text-align: center;
            transition: 0.2s;
            font-size: 1.1rem;
        }

        .match-item.selected {
            border-color: var(--color-primary);
            background: var(--color-primary-glow);
        }

        .match-item.matched {
            border-color: var(--color-success);
            background: rgba(16, 185, 129, 0.1);
            cursor: default;
        }

        @media (max-width: 768px) {
            .game-card {
                padding: 1rem 0.8rem;
                margin: 0.8rem 0;
            }

            .game-instructions {
                font-size: 0.9rem;
                margin-bottom: 0.8rem;
            }

            .sequence-item {
                padding: 0.6rem 0.8rem;
                font-size: 0.95rem;
                gap: 0.5rem;
                border-radius: 6px;
            }

            .drag-handle-game {
                font-size: 1rem;
            }

            .cloze-text {
                font-size: 0.95rem;
                line-height: 1.5;
            }

            .cloze-select {
                font-size: 0.95rem;
                padding: 0.3rem;
            }

            .triage-card {
                padding: 1rem 0.5rem;
                font-size: 1rem;
                margin-bottom: 0.8rem;
                border-radius: 6px;
            }

            .triage-buttons {
                flex-direction: column;
            }

            .triage-buttons .btn-outline {
                font-size: 0.95rem;
                padding: 0.8rem;
            }

            .chat-msg {
                font-size: 0.95rem;
                padding: 0.8rem;
                margin-bottom: 0.5rem;
                border-radius: 8px;
            }

            .chat-btn {
                font-size: 0.95rem;
                padding: 0.8rem;
                border-radius: 8px;
            }

            .matching-grid {
                gap: 0.4rem;
                grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
                width: 100%;
                min-width: 0;
            }

            .match-col {
                gap: 0.4rem;
                min-width: 0;
                overflow: hidden;
            }

            .match-item {
                padding: 0.6rem 0.3rem;
                font-size: 0.85rem;
                border-radius: 6px;
                overflow-wrap: break-word;
                word-break: break-all;
                hyphens: auto;
                line-height: 1.2;
                min-width: 0;
                max-width: 100%;
            }
        }

        /* Home Page Course Hub */
        .home-course-grid {
            display: grid;
            grid-template-columns: 1fr;
            gap: 2rem;
            margin-top: 1rem;
        }

        .home-course-card {
            display: flex;
            align-items: center;
            gap: 2rem;
            padding: 2.5rem;
            background: linear-gradient(135deg, var(--color-primary), #1e40af);
            color: white;
            border-radius: var(--radius-lg);
            box-shadow: var(--shadow-soft);
            position: relative;
            overflow: hidden;
            border: none;
            cursor: default;
            transition: var(--transition-bounce);
            flex-wrap: wrap;
        }

        .home-course-card::after {
            content: '';
            position: absolute;
            top: -50%;
            right: -20%;
            width: 300px;
            height: 300px;
            background: radial-gradient(circle, rgba(255, 255, 255, 0.2) 0%, rgba(255, 255, 255, 0) 70%);
            border-radius: 50%;
            pointer-events: none;
        }

        .home-course-card:hover {
            transform: translateY(-6px) scale(1.01);
            box-shadow: var(--shadow-hover);
        }

        .home-course-card .cert-banner-icon {
            z-index: 1;
            font-size: 4rem;
        }

        .home-course-card .cert-banner-text {
            z-index: 1;
            flex: 1;
            min-width: 250px;
        }

        .home-course-card .cert-banner-text h3 {
            color: white;
            font-size: 1.8rem;
            margin-bottom: 0.5rem;
        }

        .home-course-card .cert-banner-text p {
            color: rgba(255, 255, 255, 0.8);
            font-size: 1rem;
        }

        .home-course-card.completed-bundle {
            background: linear-gradient(135deg, #059669, #10b981);
        }

        .home-course-card.locked-bundle {
            cursor: not-allowed;
            filter: grayscale(75%);
            opacity: 0.62;
        }

        .home-course-card.locked-bundle:hover {
            transform: none;
            box-shadow: var(--shadow-soft);
        }

        .home-card-desc {
            display: -webkit-box;
            -webkit-line-clamp: 3;
            line-clamp: 3;
            -webkit-box-orient: vertical;
            overflow: hidden;
            margin-bottom: 0;
            text-align: left;
        }

        .home-card-desc.expanded {
            display: block;
            overflow: visible;
        }

        .home-card-desc-toggle {
            background: none;
            border: none;
            color: rgba(255, 255, 255, 0.75);
            font-size: 1.1rem;
            cursor: pointer;
            padding: 0.15rem 0.3rem;
            margin-top: 0.2rem;
            width: 100%;
            text-align: center;
            line-height: 1;
            transition: color 0.15s, transform 0.2s;
        }

        .home-card-desc-toggle:hover {
            color: white;
        }

        .home-card-desc-toggle.expanded {
            transform: rotate(180deg);
        }

        .student-view-title {
            margin-bottom: 1.5rem;
            font-size: 1.8rem;
        }

        .home-title {
            font-size: 2rem;
            margin-bottom: 0.5rem;
        }

        .home-subtitle {
            color: #0f172a;
            font-size: 1.1rem;
            font-weight: 600;
            text-shadow: 0 1px 10px rgba(255, 255, 255, 0.55);
            margin-bottom: 2rem;
        }

        body.dark-mode .home-subtitle {
            color: #e2e8f0;
            text-shadow: 0 1px 10px rgba(2, 6, 23, 0.7);
        }

        @media (max-width: 768px) {

            /* view-home: pad content to match the 0.5rem system used by other views */
            #view-home .fade-in-up.stagger-1,
            #home-course-grid {
                padding: 0 0.5rem;
            }

            #view-home .fade-in-up.stagger-1 {
                margin-top: 0.5rem;
            }

            /* view-student: back btn and title weren't in the original padding list */
            #view-student .btn-back,
            #view-student .student-view-title {
                padding-left: 0.5rem;
                padding-right: 0.5rem;
            }

            .btn-back {
                margin-bottom: 0.5rem;
            }

            .student-view-title {
                margin-bottom: 0.5rem;
                font-size: 1.3rem;
            }

            /* Home page compactness */
            .home-title {
                font-size: 1.4rem;
                margin-bottom: 0.25rem;
            }

            .home-subtitle {
                font-size: 0.9rem;
                margin-bottom: 0.75rem;
            }

            .home-course-grid {
                gap: 0.75rem;
                margin-top: 0.25rem;
            }

            /* Home card: column layout, full-width text block so content centres properly */
            .home-course-card {
                flex-direction: column;
                align-items: center;
                text-align: center;
                padding: 1rem;
                gap: 0.5rem;
            }

            .home-course-card .cert-banner-icon {
                font-size: 2rem;
            }

            .home-course-card .cert-banner-text {
                width: 100%;
                min-width: 0;
            }





            .home-course-card .cert-banner-text h3 {
                font-size: 1.1rem;
                margin-bottom: 0.25rem;
            }

            .home-course-card .cert-banner-text p {
                font-size: 0.85rem;
            }

            /* dashboard-overview: contain it fully within the viewport */
            .dashboard-overview {
                grid-template-columns: minmax(0, 1fr);
                width: 100%;
                max-width: 100%;
                overflow: hidden;
            }

            #bundle-cert-banner {
                /* The desktop card uses a 100% flex basis for a new row.  In a
                   column layout that basis becomes 100% of the banner height,
                   which pushed the next-step card out of the visible area. */
                flex-wrap: nowrap !important;
                align-items: stretch !important;
                width: 100%;
                box-sizing: border-box;
            }

            #bundle-cert-banner .cert-banner-text {
                min-width: 0 !important;
                width: 100%;
            }

            #bundle-cert-banner .language-test-next-step {
                flex: 0 0 auto;
                width: 100%;
            }

            /* category-title: give it breathing room from the edge */
            .category-section {
                padding-left: 0.5rem;
                padding-right: 0.5rem;
            }

            /* content-body: override the 2rem inline padding on its .card wrapper */
            .content-group.card {
                padding: 1rem 0.75rem !important;
            }
        }

        @media (max-width: 360px) {
            .header-content {
                padding: 0.4rem 0.5rem;
                gap: 0.25rem;
            }

            .logo {
                font-size: 1rem;
                gap: 0.1rem;
                min-width: 0;
                overflow: hidden;
            }

            .logo img {
                height: 1.3rem !important;
                margin-right: 0.15rem !important;
            }

            .nav-controls {
                gap: 0.3rem;
                flex-shrink: 0;
            }

            .global-lang-select {
                min-width: 55px !important;
                padding: 0.2rem 0.35rem !important;
                font-size: 0.8rem !important;
            }
        }

        .locked-toast {
            position: fixed;
            top: 50%;
            transform: translateX(-50%) translateY(-50%);
            left: 50%;
            transform: translateX(-50%);
            background: var(--text-main);
            color: var(--bg-body);
            padding: 0.9rem 2rem;
            border-radius: var(--radius-pill);
            font-weight: 700;
            z-index: 9999;
            pointer-events: none;
            white-space: nowrap;
            animation: toast-in 0.3s ease, toast-out 0.4s ease 2.1s forwards;
        }

        /* Focused interaction polish -------------------------------------------------
           Keep the lesson UI calm and legible at both theme extremes. These rules
           intentionally live at the end so they also cover the responsive shell
           overrides above. */
        .language-test-next-step-icon,
        .language-test-status-icon,
        .language-test-contact-avatar {
            color: #1955ae;
        }

        .language-test-next-step-icon {
            width: 2.7rem;
            height: 2.7rem;
            background: #e7f0ff;
            border: 1px solid #c4d9fb;
            box-shadow: 0 6px 14px rgba(37, 99, 235, 0.16);
        }

        .language-test-next-step-icon svg,
        .language-test-status-icon svg,
        .language-test-contact-avatar svg {
            display: block;
            width: 1.35rem;
            height: 1.35rem;
            fill: none;
            stroke: currentColor;
            stroke-linecap: round;
            stroke-linejoin: round;
            stroke-width: 1.8;
        }

        .language-test-contact-avatar {
            background: #e7f0ff;
            border: 1px solid #c4d9fb;
            box-shadow: none;
        }

        .language-test-status-icon {
            display: inline-grid;
            flex: 0 0 auto;
            width: 1.45rem;
            height: 1.45rem;
            place-items: center;
            border-radius: 8px;
            background: rgba(255, 255, 255, 0.16);
        }

        .language-test-status-icon svg {
            width: 1rem;
            height: 1rem;
        }

        html[data-theme=dark] .language-test-next-step-icon,
        body.dark-mode .language-test-next-step-icon {
            background: #1d4ed8;
            border-color: #60a5fa;
            color: #fff;
            box-shadow: 0 6px 16px rgba(37, 99, 235, 0.3);
        }

        html[data-theme=dark] .language-test-contact-avatar,
        body.dark-mode .language-test-contact-avatar {
            background: #183a72;
            border-color: #3b82f6;
            color: #dbeafe;
        }

        html[data-theme=dark] .language-test-status-icon,
        body.dark-mode .language-test-status-icon {
            color: #bfdbfe;
            background: rgba(96, 165, 250, 0.2);
        }

        #bundle-cert-banner .language-test-next-step-icon {
            background: var(--color-accent);
            border-color: transparent;
            color: #14324a;
        }

        #bundle-cert-banner .language-test-contact-avatar {
            background: rgba(255, 255, 255, 0.16);
            border-color: rgba(255, 255, 255, 0.26);
            color: #fff;
        }

        .lesson-link-button {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 0.55rem;
            min-height: 44px;
            padding: 0.65rem 1rem;
            border: 1px solid var(--input-border);
            border-radius: var(--radius-pill);
            background: var(--bg-card);
            color: var(--shell-blue, #1955ae);
            box-shadow: 0 6px 16px rgba(15, 23, 42, 0.08);
            cursor: pointer;
            font: 700 0.98rem/1.2 var(--font-primary);
            transition: background-color 180ms ease, border-color 180ms ease, box-shadow 180ms ease, color 180ms ease;
        }

        .lesson-link-button svg {
            width: 1.15rem;
            height: 1.15rem;
            fill: none;
            stroke: currentColor;
            stroke-linecap: round;
            stroke-linejoin: round;
            stroke-width: 1.8;
        }

        .lesson-link-button:hover {
            background: var(--input-bg);
            border-color: var(--shell-blue, #1955ae);
            box-shadow: 0 8px 18px rgba(15, 23, 42, 0.12);
        }

        .lesson-link-button:focus-visible {
            outline: 3px solid var(--color-accent);
            outline-offset: 3px;
        }

        html[data-theme=dark] .lesson-link-button,
        body.dark-mode .lesson-link-button {
            background: var(--input-bg);
            border-color: #385477;
            color: #bfdbfe;
            box-shadow: 0 7px 18px rgba(0, 0, 0, 0.22);
        }

        html[data-theme=dark] .lesson-link-button:hover,
        body.dark-mode .lesson-link-button:hover {
            background: #243b5b;
            border-color: #60a5fa;
            color: #fff;
        }

        .course-card {
            transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
        }

        .course-card:hover {
            transform: translateY(-2px);
            box-shadow: 0 14px 28px rgba(15, 23, 42, 0.12);
            border-color: var(--color-primary);
        }

        .course-card.locked:hover {
            transform: none;
            box-shadow: var(--shadow-soft);
        }

        #view-course-article .article-container {
            max-width: 1080px;
            padding: clamp(1rem, 3vw, 3rem) !important;
        }

        #view-course-article .article-container > .content-group.card {
            margin-inline: auto;
            max-width: 920px;
            padding: clamp(1.25rem, 3vw, 2.5rem) !important;
            border: 1px solid var(--input-border);
            background: var(--bg-card);
            box-shadow: var(--shadow-soft);
        }

        #view-course-article .article-title {
            max-width: 820px;
            font-size: clamp(2rem, 4.5vw, 3.45rem);
            line-height: 1.1;
            letter-spacing: -0.035em;
            text-wrap: balance;
        }

        #view-course-article .article-subtitle {
            max-width: 820px;
            margin-bottom: 0;
            font-size: clamp(1rem, 1.7vw, 1.3rem);
            line-height: 1.55;
        }

        #view-course-article .article-content {
            max-width: 920px;
            margin-inline: auto;
            gap: 1.5rem;
            font-size: 1rem;
            line-height: 1.7;
        }

        #view-course-article .article-content .course-section {
            margin-bottom: 1.5rem !important;
            padding-bottom: 1.5rem !important;
        }

        #view-course-article .article-content .content-group.card {
            padding: clamp(1.1rem, 2.5vw, 2rem) !important;
            border: 1px solid var(--input-border);
            border-radius: var(--radius-md);
            background: var(--bg-card);
            box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
        }

        #view-course-article .article-content .content-body,
        #view-course-article .article-content p {
            font-size: 1rem !important;
            line-height: 1.7 !important;
            overflow-wrap: anywhere;
        }

        #view-course-article .article-content h2 {
            font-size: clamp(1.35rem, 2.3vw, 1.85rem) !important;
            line-height: 1.25;
        }

        #view-course-article .game-card {
            margin: 0;
            padding: clamp(1rem, 2.4vw, 1.5rem);
            border: 1px solid var(--input-border);
            border-top: 3px solid var(--color-primary);
            border-radius: var(--radius-md);
            background: var(--bg-card);
            box-shadow: 0 8px 24px rgba(15, 23, 42, 0.07);
        }

        #view-course-article .game-card h3 {
            margin-bottom: 0.45rem !important;
            font-size: clamp(1.2rem, 2.3vw, 1.55rem) !important;
            line-height: 1.3;
        }

        #view-course-article .game-instructions {
            margin-bottom: 1.25rem;
            font-size: 1rem;
            line-height: 1.55;
        }

        #view-course-article .sequence-list,
        #view-course-article .chat-options,
        #view-course-article .match-col {
            gap: 0.7rem;
        }

        #view-course-article .sequence-item,
        #view-course-article .chat-btn,
        #view-course-article .match-item,
        #view-course-article .triage-buttons .btn-outline {
            min-height: 48px;
            padding: 0.8rem 1rem;
            border-width: 1px;
            border-radius: 12px;
            font-size: 1rem;
            line-height: 1.4;
            overflow-wrap: anywhere;
            word-break: normal;
            transition: background-color 160ms ease, border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
        }

        #view-course-article .sequence-item:hover,
        #view-course-article .chat-btn:hover,
        #view-course-article .match-item:hover {
            transform: translateY(-1px);
            box-shadow: 0 5px 12px rgba(15, 23, 42, 0.1);
        }

        #view-course-article .cloze-text {
            font-size: 1rem;
            line-height: 1.75;
            overflow-wrap: anywhere;
        }

        #view-course-article .cloze-select {
            max-width: 100%;
            min-height: 42px;
            padding: 0.45rem 0.65rem;
            font-size: 1rem;
        }

        #view-course-article .triage-card {
            margin-bottom: 1.25rem;
            padding: clamp(1.2rem, 4vw, 2rem);
            border-width: 1px;
            font-size: clamp(1.1rem, 2.5vw, 1.45rem);
            line-height: 1.4;
        }

        #view-course-article .matching-grid {
            gap: 1rem;
        }

        @media (max-width: 680px) {
            #view-course-article .article-container {
                padding: 0.75rem 0 !important;
            }

            #view-course-article .article-container > div:first-child {
                padding-inline: 0.25rem;
            }

            #view-course-article .article-title {
                font-size: clamp(1.8rem, 8vw, 2.5rem);
            }

            #view-course-article .article-content .content-group.card {
                border-radius: 18px;
            }

            #view-course-article .matching-grid {
                gap: 0.55rem;
            }

            #view-course-article .match-item {
                padding-inline: 0.55rem;
                font-size: 0.92rem;
            }
        }

        @keyframes toast-in {
            from {
                opacity: 0;
                transform: translateX(-50%) translateY(calc(-50% + 10px));
            }

            to {
                opacity: 1;
                transform: translateX(-50%) translateY(-50%);
            }
        }

        @keyframes toast-out {
            to {
                opacity: 0;
                transform: translateX(-50%) translateY(calc(-50% + 10px));
            }
        }

        /* ===== Profile: compact layout ===== */
        #view-profile .card {
            padding: 1.5rem;
        }

        #view-profile .stat-card {
            padding: 1rem 0.75rem !important;
        }

        #view-profile .profile-stats-grid {
            gap: 0.8rem;
            margin-top: 0.75rem !important;
        }

        #view-profile .divider {
            margin-top: 0.75rem;
            margin-bottom: 0;
        }

        #view-profile .mt-20 {
            margin-top: 0.75rem !important;
        }

        #view-profile .mt-30 {
            margin-top: 1.25rem !important;
        }

        #view-profile .btn-back {
            margin-bottom: 0.75rem;
        }

        @media (max-width: 768px) {
            #view-profile .card {
                padding: 0.75rem;
                border-radius: var(--radius-md);
            }

            #view-profile .profile-header {
                flex-direction: row !important;
                text-align: left !important;
                margin-top: 0 !important;
            }

            #view-profile .profile-header>div {
                flex-direction: row !important;
                gap: 0.6rem !important;
            }

            #view-profile .profile-stats-grid {
                grid-template-columns: 1fr 1fr !important;
                gap: 0.45rem;
                margin-top: 0.6rem !important;
            }

            #view-profile .stat-card {
                padding: 0.7rem 0.4rem !important;
            }

            #profile-certs-count,
            #profile-completed-count,
            #profile-avg-score,
            #profile-inprogress-count {
                font-size: 1.5rem !important;
                margin-bottom: 0.1rem !important;
            }

            #view-profile .stat-label {
                font-size: 0.58rem !important;
                letter-spacing: 0.3px !important;
            }

            #view-profile .divider {
                font-size: 0.65rem;
                margin-top: 0.55rem;
            }

            #view-profile .mt-20 {
                margin-top: 0.5rem !important;
            }

            #view-profile .mt-30 {
                margin-top: 0.75rem !important;
            }

            #view-profile .btn-back {
                margin-bottom: 0.5rem;
                font-size: 0.9rem;
            }

            #view-profile #profile-course-progress .glass-panel {
                padding: 0.85rem !important;
                border-radius: var(--radius-sm) !important;
            }
        }

        .rate-limit-toast {
            position: fixed;
            top: 1.5rem;
            left: 50%;
            transform: translateX(-50%) translateY(-120%);
            background: var(--color-error, #e53e3e);
            color: #fff;
            padding: 0.9rem 1.6rem;
            border-radius: 10px;
            font-size: 0.95rem;
            font-weight: 500;
            box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
            z-index: 9999;
            transition: transform 0.3s ease;
            max-width: 90vw;
            text-align: center;
            pointer-events: none;
            visibility: hidden;
        }

        .rate-limit-toast.visible {
            transform: translateX(-50%) translateY(0);
            visibility: visible;
        }

        /* ============================================================
           AI VOICE HELPER
           ============================================================ */
        .ai-helper-fab {
            position: fixed;
            bottom: 1.5rem;
            right: 1.5rem;
            width: 56px;
            height: 56px;
            border-radius: 50%;
            background: var(--color-accent);
            color: #000;
            display: flex;
            align-items: center;
            justify-content: center;
            border: none;
            cursor: pointer;
            box-shadow: 0 4px 15px var(--color-accent-glow);
            transition: var(--transition-bounce);
            z-index: 950;
        }

        .ai-helper-fab:hover {
            transform: translateY(-3px) scale(1.05);
            box-shadow: 0 8px 25px var(--color-accent-glow);
        }

        .ai-helper-popover {
            position: fixed;
            bottom: 5.5rem;
            right: 1.5rem;
            width: 320px;
            max-width: calc(100vw - 2rem);
            background: var(--bg-card);
            border: 1px solid var(--border-glass);
            border-radius: var(--radius-lg);
            box-shadow: 0 12px 48px rgba(0, 0, 0, 0.22);
            padding: 1.5rem;
            z-index: 951;
        }

        .ai-helper-popover h3 {
            margin: 0 0 0.5rem 0;
            font-size: 1.15rem;
            color: var(--text-main);
        }

        .ai-helper-popover>p {
            font-size: 0.9rem;
            color: var(--text-muted);
            margin: 0 0 1rem 0;
            line-height: 1.5;
        }

        .ai-helper-steps {
            margin: 0 0 1.2rem 0;
            padding-left: 1.2rem;
            font-size: 0.9rem;
            color: var(--text-main);
            line-height: 1.6;
        }

        .ai-helper-cta {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 0.5rem;
            width: 100%;
            text-align: center;
            text-decoration: none;
            margin-bottom: 0.8rem;
        }

        .ai-helper-reassurance {
            font-size: 0.8rem;
            color: var(--text-muted);
            font-style: italic;
            margin: 0;
        }

        .ai-helper-info-note {
            display: flex;
            align-items: flex-start;
            gap: 0.5rem;
            margin-top: 0.9rem;
            padding-top: 0.9rem;
            border-top: 1px solid var(--border-glass);
            font-size: 0.78rem;
            color: var(--text-muted);
            line-height: 1.5;
        }

        .ai-helper-info-note .ai-helper-i {
            flex-shrink: 0;
            width: 16px;
            height: 16px;
            border-radius: 50%;
            border: 1.5px solid var(--text-muted);
            font-size: 0.7rem;
            font-weight: 700;
            font-style: italic;
            display: flex;
            align-items: center;
            justify-content: center;
            margin-top: 0.1rem;
        }

        .ai-helper-info-note svg {
            flex-shrink: 0;
            vertical-align: -3px;
        }

        .ai-helper-pretest-card {
            background: var(--bg-card);
            border: 1px solid var(--border-glass);
            border-radius: var(--radius-md);
            padding: 1.5rem;
            margin-bottom: 1.5rem;
            text-align: center;
        }

        .ai-helper-pretest-card h4 {
            margin: 0 0 0.4rem 0;
            font-size: 1.1rem;
            color: var(--text-main);
        }

        .ai-helper-pretest-card>p {
            font-size: 0.9rem;
            color: var(--text-muted);
            margin: 0 0 1rem 0;
        }

        .ai-helper-pretest-cta {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 0.5rem;
            text-decoration: none;
        }

        .ai-helper-pretest-footer {
            font-size: 0.8rem;
            color: var(--text-muted);
            font-style: italic;
            margin: 0.8rem 0 0 0;
        }

        @media (max-width: 480px) {
            .ai-helper-popover {
                bottom: 5rem;
                right: 1rem;
                width: calc(100vw - 2rem);
            }

            .ai-helper-fab {
                bottom: 1rem;
                right: 1rem;
            }
        }

        /* Academy application shell: fixed landmarks, with one content scroll. */
        :root {
            --shell-header-height: 76px;
            --shell-nav-height: 80px;
            --shell-ink: #123c5d;
            --shell-blue: #2159bc;
            --shell-soft: #edf3fc;
            --shell-green: #087d65;
            --shell-green-soft: #eaf6f0;
        }

        html[data-theme=dark], body.dark-mode { --shell-ink: #e5f0ff; --shell-blue: #94baff; --shell-soft: #1c3048; --shell-green: #6cd6ad; --shell-green-soft: #153a32; }
        #app { padding-top: calc(var(--shell-header-height) + env(safe-area-inset-top, 0px)); padding-bottom: calc(var(--shell-nav-height) + env(safe-area-inset-bottom, 0px) + 24px); }
        .bg-shape { display: none; }
        #main-header { position: fixed; inset: 0 0 auto; height: calc(var(--shell-header-height) + env(safe-area-inset-top, 0px)); padding-top: env(safe-area-inset-top, 0px); border-bottom: 1px solid var(--input-border); background: var(--bg-card); z-index: 120; }
        .header-content { height: 100%; max-width: 1220px; padding: 0 32px; gap: 16px; flex-wrap: nowrap; }
        .shell-logo { display: inline-flex; align-items: center; min-height: 44px; gap: 0; border: 0; padding: 0; background: none; color: var(--shell-ink); font: 700 26px/1 var(--font-primary); cursor: pointer; white-space: nowrap; flex: none; }
        .shell-logo img { width: 38px !important; height: 38px !important; margin-right: 10px !important; box-shadow: none !important; }
        .shell-logo .logo-text-lms { color: var(--shell-ink); -webkit-text-fill-color: currentColor; background: none; }
        .shell-context { padding-left: 20px; border-left: 1px solid var(--input-border); color: var(--text-muted); font-size: 15px; }
        .shell-context:empty { display: none; }
        .nav-controls { margin-left: auto; flex: none; gap: 0; }
        .shell-icon-button, .shell-install { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; gap: 8px; cursor: pointer; font: 600 14px/1.2 var(--font-primary); border: 0; border-radius: 12px; }
        .shell-icon-button { width: 44px; color: var(--shell-ink); background: var(--input-bg); font-size: 28px; }
        .shell-install { padding: 10px 15px; color: var(--shell-ink); background: var(--shell-soft); }
        .shell-install:hover { filter: brightness(.96); }
        .shell-install svg, .shell-icon-button svg, .shell-nav svg, .shell-avatar svg { width: 23px; height: 23px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
        .shell-install[hidden], .shell-icon-button[hidden], #shell-featured[hidden], .shell-section-heading[hidden] { display: none !important; }
        #main-content { max-width: 1180px; padding: 38px 32px 24px; }
        .shell-page-heading { margin-bottom: 26px; }
        .shell-page-heading h2 { margin: 4px 0 8px; color: var(--shell-ink); font-size: clamp(28px, 3.4vw, 38px); font-weight: 700; line-height: 1.16; letter-spacing: -.8px; text-align: left; }
        .shell-page-heading p { color: var(--text-muted); font-size: 16px; line-height: 1.5; margin: 0; max-width: 680px; }
        .shell-page-heading .shell-eyebrow { color: var(--shell-ink); font-size: 14px; margin-bottom: 9px; }
        .shell-section-heading { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 26px 0 14px; }
        .shell-section-heading h3 { font-size: 21px; color: var(--shell-ink); margin: 0; }
        .shell-text-button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; background: none; border: 0; padding: 0; color: var(--shell-blue); font: 600 14px/1.3 var(--font-primary); cursor: pointer; }
        .home-course-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin: 0; }
        .home-course-card, .home-course-card.completed-bundle { display: grid; grid-template-columns: 48px minmax(0, 1fr); align-items: start; gap: 12px 16px; padding: 24px; background: var(--bg-card); color: var(--text-main); border: 1px solid var(--input-border); border-radius: 22px; box-shadow: 0 3px 12px #123c5d04; min-width: 0; }
        .home-course-card::after { display: none; }
        .home-course-card:hover { transform: none; box-shadow: 0 5px 18px #123c5d09; }
        .home-course-card .cert-banner-icon { display: grid; place-items: center; width: 48px; height: 52px; margin: 0; font-size: 29px; background: var(--shell-soft); border-radius: 14px; line-height: 1; filter: none; }
        .home-course-card.completed-bundle .cert-banner-icon { background: var(--shell-green-soft); }
        .home-course-card .cert-banner-text { width: auto; min-width: 0; flex: initial; text-align: left; }
        .home-course-card .cert-banner-text h3 { margin: 7px 0 9px; color: var(--shell-ink); font-size: 22px; font-weight: 700; line-height: 1.23; letter-spacing: -.3px; overflow-wrap: anywhere; }
        .home-course-card .cert-banner-text p { font-size: 14px; line-height: 1.55; color: var(--text-muted); }
        .home-course-card .shell-course-state { display: inline-block; color: var(--shell-blue); font-size: 12px; font-weight: 600; line-height: 1.4; }
        .home-course-card.completed-bundle .shell-course-state { color: var(--shell-green); }
        .shell-course-progress-label { margin-top: 16px; font-size: 13px; font-weight: 600; color: var(--text-muted); }
        .home-course-card .progress-bar-container { height: 6px; margin: 9px 0 0; background: var(--input-border); border: 0; }
        .home-course-card .progress-bar { background: var(--shell-blue); }
        .home-course-card.completed-bundle .progress-bar { background: var(--shell-green); }
        .home-course-card > div:last-child { grid-column: 2; width: 100%; margin: 2px 0 0; }
        .home-course-card .home-card-open-btn { width: 100%; min-height: 44px; padding: 10px 16px; color: var(--shell-ink); background: var(--shell-soft); font-size: 14px; text-transform: none; font-weight: 600; border-radius: 11px; white-space: normal; }
        .home-course-card.completed-bundle .home-card-open-btn { color: var(--shell-green); background: var(--shell-green-soft); }
        .home-course-card.locked-bundle { filter: none; opacity: 1; }
        .home-course-card.locked-bundle .home-card-open-btn { opacity: .6; }
        .home-course-card .home-card-desc { -webkit-line-clamp: 2; line-clamp: 2; }
        .home-course-card .home-card-desc-toggle { color: var(--shell-blue); min-height: 44px; padding: 5px 0; text-align: left; font: 600 13px/1.3 var(--font-primary); }
        .home-course-card .home-card-desc-toggle.expanded { transform: none; }
        .home-course-card .language-test-compact-status { color: var(--text-main); background: var(--input-bg); border: 1px solid var(--input-border); font-weight: 400; line-height: 1.5; padding: 12px; }
        .home-course-card .language-test-next-step { background: var(--input-bg); color: var(--text-main); border: 1px solid var(--input-border); margin-top: 14px; }
        .home-course-card .language-test-next-step p { color: inherit; }
        .home-course-card.shell-featured-card { grid-template-columns: 72px minmax(0, 1fr) 180px; gap: 22px; padding: 32px; background: #143e61; border-color: #143e61; color: white; }
        .shell-featured-card .cert-banner-icon { width: 72px; height: 80px; font-size: 42px; color: white; background: #ffffff16; }
        .home-course-card.shell-featured-card .cert-banner-text h3 { color: white; font-size: 28px; }
        .home-course-card.shell-featured-card .cert-banner-text p, .shell-featured-card .shell-course-progress-label { color: #d7e4f2; }
        .shell-featured-card .shell-course-state { color: #ffdf68; }
        .shell-featured-card .progress-bar-container { background: #ffffff26; }
        .shell-featured-card .progress-bar { background: #ffdb5c; }
        .home-course-card.shell-featured-card > div:last-child { grid-column: 3; align-self: center; }
        .home-course-card.shell-featured-card .home-card-open-btn { color: #133957; background: #ffda58; min-height: 48px; }
        .shell-featured-card .home-card-desc-toggle { color: #d7e4f2; }
        .shell-learning-summary { display: flex; gap: 32px; flex-wrap: wrap; padding: 20px 0 0; }
        .shell-learning-summary > div { display: flex; align-items: baseline; gap: 9px; }
        .shell-learning-summary strong { font-size: 26px; font-weight: 700; color: var(--shell-ink); line-height: 1; }
        .shell-learning-summary span { color: var(--text-muted); font-size: 14px; }
        .shell-nav { position: fixed; z-index: 130; bottom: 20px; left: 50%; transform: translateX(-50%); width: min(540px, calc(100% - 32px)); display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); padding: 8px; background: var(--bg-card); border: 1px solid var(--input-border); border-radius: 24px; box-shadow: 0 8px 40px #123c5d14; }
        .shell-nav button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-height: 58px; min-width: 0; padding: 4px 2px; color: var(--text-muted); background: none; border: 0; font: 500 12px/1.3 var(--font-primary); cursor: pointer; border-radius: 14px; overflow-wrap: anywhere; }
        .shell-nav-icon { display: grid; place-items: center; width: 46px; height: 30px; border-radius: 10px; }
        .shell-nav button[aria-current=page] { color: var(--shell-blue); font-weight: 700; }
        .shell-nav button[aria-current=page] .shell-nav-icon { background: var(--shell-soft); }
        .shell-nav button:hover { background: var(--input-bg); }
        .shell-profile-card { padding: 28px; border: 1px solid var(--input-border); box-shadow: none; }
        #btn-back-from-profile { display: none; }
        .shell-profile-identity { display: flex; align-items: center; gap: 16px; width: 100%; padding: 0 0 24px; color: var(--text-main); text-align: left; background: none; border: 0; font: 700 23px/1.3 var(--font-primary); }
        .shell-avatar { display: grid; place-items: center; position: relative; width: 64px; height: 64px; border-radius: 20px; background: var(--shell-soft); color: var(--shell-blue); overflow: hidden; flex-shrink: 0; }
        .shell-avatar svg { width: 36px; height: 36px; }
        .shell-avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
        .profile-identity { min-width: 0; overflow-wrap: anywhere; }
        .profile-client-id { margin-top: 6px; color: var(--text-muted); font-size: 13px; font-weight: 400; }
        .shell-settings-title { margin: 8px 0 4px; font-size: 19px; color: var(--shell-ink); }
        .shell-settings-row { display: flex; justify-content: space-between; align-items: center; flex-direction: row; gap: 16px; min-height: 70px; padding: 12px 0; border-bottom: 1px solid var(--input-border); }
        .shell-settings-row label { font-weight: 600; font-size: 15px; }
        .shell-settings-row .global-lang-select { max-width: 55%; width: 200px; min-height: 44px; border-radius: 10px; border: 1px solid var(--input-border); background: var(--input-bg); color: var(--text-main); padding: 8px 12px; font: inherit; font-size: 16px; }
        .shell-settings-row .switch { margin: 0; flex-shrink: 0; }
        .shell-account-actions { padding: 18px 0; }
        .shell-account-actions button { min-height: 44px; border: 1px solid var(--input-border); border-radius: 10px; color: var(--text-muted); background: var(--bg-card); box-shadow: none; font-size: 14px; }
        .shell-profile-card .profile-stats-grid { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; gap: 12px !important; padding: 0; }
        .shell-profile-card .stat-card { padding: 18px 8px !important; box-shadow: none; background: var(--input-bg); border: 0; border-radius: 14px; }
        .shell-profile-card .stat-value { font-size: 28px !important; line-height: 1.15; background: none !important; -webkit-text-fill-color: var(--shell-ink) !important; }
        .shell-profile-card .stat-label { font-size: 12px; line-height: 1.4; color: var(--text-muted) !important; }
        .shell-certificate-status { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
        .shell-certificate-pending, .shell-empty { padding: 24px; border: 1px solid var(--input-border); border-radius: 20px; background: var(--bg-card); }
        .shell-certificate-pending h3 { font-size: 20px; line-height: 1.3; margin-bottom: 12px; color: var(--shell-ink); }
        .shell-certificate-pending > p, .shell-empty { color: var(--text-muted); font-size: 14px; }
        .shell-profile-card .language-test-next-step-card, #view-certificates .language-test-next-step-card { background: var(--input-bg); color: var(--text-main); border: 1px solid var(--input-border); box-shadow: none; }
        .shell-profile-card .language-test-contact, #view-certificates .language-test-contact { background: var(--shell-soft); border-color: var(--input-border); }
        #view-certificates #profile-certificates-list { padding: 0; }
        #view-certificates .divider { font-size: 19px; margin-top: 0; }
        .shell-dialog { position: fixed; margin: auto; inset: 0; width: min(460px, calc(100% - 32px)); max-height: calc(var(--app-viewport-height) - 40px); overflow-y: auto; padding: 26px; background: var(--bg-card); color: var(--text-main); border: 1px solid var(--input-border); border-radius: 24px; box-shadow: 0 20px 70px #0003; }
        .shell-dialog::backdrop { background: #0b243a88; backdrop-filter: blur(4px); }
        .shell-dialog-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 12px; }
        .shell-dialog h2 { font-size: 24px; margin: 0; }
        .shell-dialog p { color: var(--text-muted); font-size: 15px; line-height: 1.6; }
        .shell-install-step { padding-top: 18px; margin-top: 18px; border-top: 1px solid var(--input-border); }
        #course-header-progress, #course-header-progress.is-floating { position: fixed !important; top: calc(var(--shell-header-height) + env(safe-area-inset-top, 0px)) !important; inset-inline: 0; height: 4px !important; z-index: 121; }
        #view-student > .btn-back, #btn-back-from-article { display: none; }
        .ai-helper-fab { bottom: calc(var(--shell-nav-height) + env(safe-area-inset-bottom, 0px) + 24px); }
        .ai-helper-popover { bottom: calc(var(--shell-nav-height) + env(safe-area-inset-bottom, 0px) + 92px); max-height: calc(var(--app-viewport-height) - var(--shell-header-height) - var(--shell-nav-height) - 115px); overflow-y: auto; }
        .locked-toast { bottom: calc(var(--shell-nav-height) + env(safe-area-inset-bottom, 0px) + 24px) !important; }
        #chatButtonDoprava { bottom: calc(var(--shell-nav-height) + env(safe-area-inset-bottom, 0px) + 22px) !important; }
        #app button:focus-visible, #app select:focus-visible, .shell-dialog button:focus-visible { outline: 3px solid var(--shell-blue); outline-offset: 3px; }
        @media (max-width: 767px) {
            :root { --shell-header-height: 64px; --shell-nav-height: 74px; }
            .header-content { padding: 0 max(18px, env(safe-area-inset-left)); gap: 8px; }
            .shell-logo { font-size: 21px; }
            .shell-logo img { width: 32px !important; height: 32px !important; margin-right: 7px !important; }
            .shell-context { display: none; }
            .shell-install { font-size: 12px; padding: 8px 11px; gap: 5px; min-height: 40px; }
            .shell-install svg { width: 18px; height: 18px; }
            #shell-back { width: 44px; min-height: 44px; }
            #main-content { padding: 25px 18px 18px; }
            .shell-page-heading { margin-bottom: 22px; }
            .shell-page-heading p { font-size: 14px; }
            .shell-page-heading h2 { font-size: 30px; }
            .shell-nav { bottom: 0; left: 0; transform: none; width: 100%; border: 0; border-top: 1px solid var(--input-border); border-radius: 22px 22px 0 0; padding: 7px max(8px, env(safe-area-inset-right)) calc(7px + env(safe-area-inset-bottom, 0px)) max(8px, env(safe-area-inset-left)); }
            .shell-nav button { min-height: 59px; font-size: 11px; }
            .home-course-grid { grid-template-columns: 1fr; gap: 14px; }
            .home-course-card, .home-course-card.completed-bundle { padding: 20px; gap: 12px; grid-template-columns: 42px minmax(0, 1fr); }
            .home-course-card .cert-banner-icon { width: 42px; height: 46px; font-size: 25px; }
            .home-course-card .cert-banner-text h3 { font-size: 20px; }
            .home-course-card.shell-featured-card { grid-template-columns: 42px minmax(0, 1fr); padding: 23px; gap: 14px; }
            .home-course-card.shell-featured-card .cert-banner-text h3 { font-size: 24px; }
            .home-course-card.shell-featured-card > div:last-child { grid-column: 1 / -1; }
            .shell-featured-card .home-card-open-btn { min-height: 48px; }
            .shell-section-heading { margin-top: 22px; }
            .shell-section-heading h3 { font-size: 20px; }
            .shell-learning-summary { justify-content: space-between; gap: 18px; padding-top: 22px; }
            .shell-learning-summary > div { flex-direction: column; gap: 5px; }
            .shell-learning-summary span { font-size: 12px; }
            .shell-profile-card { padding: 20px; }
            .shell-profile-identity { font-size: 21px; gap: 12px; }
            .shell-profile-card .profile-stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
            .shell-settings-row { padding: 12px 0; flex-direction: row; }
            .shell-certificate-status { grid-template-columns: 1fr; }
            #view-student .dashboard-overview { padding: 0; }
            .article-container.card, .test-container.card { padding: 14px; border-radius: 18px; }
            .article-container .content-group.card { padding: 18px !important; }
            .ai-helper-fab { right: 16px; bottom: calc(var(--shell-nav-height) + env(safe-area-inset-bottom, 0px) + 14px); }
            .ai-helper-popover { right: 16px; bottom: calc(var(--shell-nav-height) + env(safe-area-inset-bottom, 0px) + 80px); }
        }
        @media (max-width: 360px) {
            .header-content { padding-inline: 12px; }
            .shell-logo { font-size: 18px; }
            .shell-install { font-size: 11px; padding-inline: 8px; }
            #main-content { padding-inline: 12px; }
            .home-course-card.shell-featured-card { padding: 18px; }
        }
        @media (prefers-reduced-motion: reduce) {
            .view, .fade-in-up, .shell-nav, .home-course-card { animation: none; transition: none; }
            .fade-in-up, .scale-up { opacity: 1; transform: none; animation: none !important; }
            html { scroll-behavior: auto; }
        }
    
/* Profile rows use the full container width, including the consultant action. */
#profile-course-progress { display: grid; gap: 16px; }
.shell-progress-row { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 20px 28px; align-items: center; padding: 24px; border: 1px solid var(--input-border); border-radius: 20px; background: var(--bg-card); }
.shell-progress-overview, .shell-progress-heading > h3 { min-width: 0; }
.shell-progress-heading { display: flex; align-items: start; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-bottom: 16px; }
.shell-progress-heading h3 { font-size: 1rem; line-height: 1.4; margin: 0; flex: 1 1 220px; }
.shell-progress-badge { display: inline-block; font-size: .75rem; line-height: 1.5; padding: 5px 10px; border-radius: 9px; color: var(--text-muted); background: var(--input-bg); }
.shell-progress-badge.is-complete { background: var(--shell-green-soft); color: var(--shell-green); }
.shell-progress-metrics { display: flex; justify-content: space-between; gap: 16px; margin-bottom: 8px; font-size: .85rem; color: var(--text-muted); }
.shell-progress-metrics strong { color: var(--text-main); }
.shell-progress-track { height: 7px; border-radius: 8px; overflow: hidden; background: var(--input-border); }
.shell-progress-track > span { display: block; height: 100%; border-radius: inherit; background: var(--color-primary); }
.shell-progress-score { font-size: .85rem; color: var(--text-muted); margin: 10px 0 0; }
.shell-progress-open { max-width: 180px; }
.shell-progress-next { grid-column: 1 / -1; min-width: 0; }
.shell-progress-next .language-test-next-step-card { margin: 0; }
.language-test-next-step-card { container-type: inline-size; }
.language-test-contact { flex-wrap: wrap; flex-direction: row; }
.language-test-contact-person { flex: 1 1 180px; }
.language-test-contact-person > div { min-width: 0; }
.language-test-contact strong { white-space: normal; overflow-wrap: anywhere; }
.language-test-contact-actions { flex-wrap: wrap; max-width: 100%; }
.language-test-contact-button { min-height: 44px; }
.language-test-contact-button .ui-icon { width: 16px; height: 16px; flex: 0 0 16px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
@container (max-width: 420px) {
    .language-test-next-step-content { margin-left: 0; }
    .language-test-contact { align-items: stretch; }
    .language-test-contact-actions { width: 100%; }
    .language-test-contact-button { flex: 1 1 auto; }
}
.shell-certificate-status { grid-template-columns: minmax(0,1fr); align-items: start; }
.shell-certificate-pending { min-width: 0; }
.shell-certificate-heading { display: flex; align-items: center; gap: 16px; margin-bottom: 20px; }
.shell-certificate-heading .shell-eyebrow { margin: 0 0 4px; }
.shell-certificate-heading h3 { margin: 0; }
.shell-certificate-symbol { display: grid; place-items: center; flex: 0 0 48px; height: 48px; border-radius: 15px; background: var(--shell-soft); color: var(--shell-blue); font-size: 24px; }
.is-earned .shell-certificate-symbol { color: var(--shell-green); background: var(--shell-green-soft); }
.shell-certificate-view { margin-top: 12px; }
.shell-certificate-detail { margin-top: 24px; text-align: center; }
.shell-certificate-detail .exportable-certificate { margin: 0 auto 24px; max-width: 100%; }
.shell-certificate-detail[hidden], .home-course-card[hidden], .shell-empty[hidden] { display: none; }
.shell-empty { text-align: center; padding: 48px 24px; border: 1px dashed var(--input-border); border-radius: 20px; background: var(--bg-card); color: var(--text-muted); }
.shell-empty h3 { margin: 12px 0; color: var(--text-main); }
.shell-empty p { margin: 0 auto 24px; max-width: 480px; }
.shell-empty-icon { display: inline-block; color: var(--shell-blue); font-size: 42px; }
.shell-catalog-tools { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: end; gap: 12px; padding: 16px; border: 1px solid var(--input-border); background: var(--bg-card); border-radius: 20px; position: relative; }
.shell-catalog-tools label { display: grid; gap: 8px; min-width: 0; font-size: .8rem; font-weight: 600; color: var(--text-muted); }
.shell-catalog-tools [hidden] { display: none; }
.shell-catalog-tools input, .shell-catalog-tools select { min-width: 0; width: 100%; min-height: 48px; padding: 10px 14px; border: 1px solid var(--input-border); border-radius: 12px; background: var(--input-bg); color: var(--text-main); font: inherit; font-size: 16px; }
.shell-catalog-filters summary { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 10px 14px; border: 1px solid var(--input-border); border-radius: 12px; color: var(--shell-blue); background: var(--input-bg); font-size: .9rem; font-weight: 600; cursor: pointer; list-style: none; }
.shell-catalog-filters summary::-webkit-details-marker { display: none; }
.shell-catalog-filters summary svg { width: 15px; height: 15px; flex: none; transition: transform .18s; }
.shell-catalog-filters[open] summary svg { transform: rotate(180deg); }
.shell-catalog-filters summary:focus-visible { outline: 2px solid var(--shell-blue); outline-offset: 3px; }
#shell-filter-count { min-width: 20px; border-radius: 10px; padding: 1px 5px; background: var(--shell-blue); color: white; text-align: center; font-size: .75rem; }
.shell-filter-panel { position: absolute; right: 0; top: calc(100% + 8px); z-index: 30; width: min(620px, 100%); display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; max-height: min(60vh,460px); overflow: auto; padding: 20px; border: 1px solid var(--input-border); border-radius: 20px; background: var(--bg-card); box-shadow: 0 12px 36px rgba(15,23,42,.16); }
#shell-filter-reset { align-self: end; justify-self: start; min-height: 48px; }
.shell-result-count { font-size: .85rem; color: var(--text-muted); margin: 20px 0 16px; }
#catalog-grid-slot { margin-top: 20px; }
@media (max-width: 680px) {
    .shell-catalog-tools { padding: 12px; gap: 8px; }
    .shell-filter-panel { grid-template-columns: minmax(0,1fr); padding: 16px; gap: 12px; }
    .shell-progress-row { grid-template-columns: minmax(0,1fr); padding: 16px; gap: 16px; }
    .shell-progress-open { justify-self: start; max-width: none; }
    .shell-certificate-pending { padding: 18px; }
    .shell-progress-heading { gap: 8px; }
}
@media (max-width: 380px) {
    .shell-profile-card { padding: 16px; }
}

/* Shared course cards: Home and Catalog use one component style.
   Use sRGB alpha layers: unsupported color-mix(var()) resets older browsers
   to transparent at computed-value time, even with an earlier fallback. */
#app[data-view=home], #app[data-view=courses] {
    background:
        radial-gradient(circle at 0% 16%, rgba(79, 145, 240, 0.16), transparent 30rem),
        radial-gradient(circle at 100% 44%, rgba(252, 211, 77, 0.12), transparent 28rem),
        var(--bg-body);
}

.academy-course-surface .home-course-card:not(.shell-featured-card) {
    --home-card-accent: #2f72e8;
    --home-card-accent-2: #7ca8ff;
    --home-card-tint: #eef4ff;
    --home-card-accent-rgb: 47, 114, 232;
    --home-card-accent-2-rgb: 124, 168, 255;
    --home-card-ink: #295faf;
    --home-card-button-border: #c8d9f7;
    --home-card-track: #d7e4f8;
    position: relative;
    isolation: isolate;
    overflow: hidden;
    background: linear-gradient(145deg, var(--bg-card) 0%, var(--home-card-tint) 100%);
    border-color: var(--home-card-button-border);
    box-shadow: 0 10px 24px rgba(18, 60, 93, 0.08);
}

.academy-course-surface .home-course-card[data-card-tone=mint] {
    --home-card-accent: #0b9b76;
    --home-card-accent-2: #48d3a6;
    --home-card-tint: #eafaf3;
    --home-card-accent-rgb: 11, 155, 118;
    --home-card-accent-2-rgb: 72, 211, 166;
    --home-card-ink: #0c836b;
    --home-card-button-border: #b8e7d4;
    --home-card-track: #c9eddf;
}

.academy-course-surface .home-course-card[data-card-tone=blue] {
    --home-card-accent: #2f72e8;
    --home-card-accent-2: #7ca8ff;
    --home-card-tint: #eef4ff;
    --home-card-accent-rgb: 47, 114, 232;
    --home-card-accent-2-rgb: 124, 168, 255;
    --home-card-ink: #295faf;
    --home-card-button-border: #c8d9f7;
    --home-card-track: #d7e4f8;
}

.academy-course-surface .home-course-card[data-card-tone=amber] {
    --home-card-accent: #d79500;
    --home-card-accent-2: #ffd96a;
    --home-card-tint: #fff8df;
    --home-card-accent-rgb: 215, 149, 0;
    --home-card-accent-2-rgb: 255, 217, 106;
    --home-card-ink: #996a00;
    --home-card-button-border: #f0d58c;
    --home-card-track: #eee2c2;
}

.academy-course-surface .home-course-card[data-card-tone=violet] {
    --home-card-accent: #7654c5;
    --home-card-accent-2: #b297f2;
    --home-card-tint: #f4efff;
    --home-card-accent-rgb: 118, 84, 197;
    --home-card-accent-2-rgb: 178, 151, 242;
    --home-card-ink: #624bad;
    --home-card-button-border: #d9c9f4;
    --home-card-track: #e5daf8;
}

.academy-course-surface .home-course-card:not(.shell-featured-card)::before {
    content: '';
    position: absolute;
    inset: 0 0 auto;
    z-index: 0;
    height: 5px;
    background: linear-gradient(90deg, var(--home-card-accent), var(--home-card-accent-2));
}

.academy-course-surface .home-course-card:not(.shell-featured-card)::after {
    display: block;
    content: '';
    position: absolute;
    z-index: 0;
    top: -110px;
    right: -90px;
    width: 250px;
    height: 250px;
    border-radius: 50%;
    background: radial-gradient(circle, var(--home-card-accent-2), transparent 68%);
    opacity: 0.19;
    pointer-events: none;
}

.academy-course-surface .home-course-card:not(.shell-featured-card) > * {
    position: relative;
    z-index: 1;
}

.academy-course-surface .home-course-card:not(.shell-featured-card) .cert-banner-icon {
    background: linear-gradient(145deg, rgba(var(--home-card-accent-rgb), 0.12), rgba(var(--home-card-accent-2-rgb), 0.24)), #fff;
    border: 1px solid rgba(var(--home-card-accent-rgb), 0.18);
    box-shadow: 0 8px 16px rgba(var(--home-card-accent-rgb), 0.18);
}

.academy-course-surface .home-card-desc-toggle:hover {
    background: rgba(var(--home-card-accent-rgb), 0.15);
    border-color: rgba(var(--home-card-accent-rgb), 0.42);
    color: var(--home-card-accent);
}

.academy-course-surface .home-card-desc-toggle.expanded svg {
    transform: rotate(180deg);
}

.academy-course-surface .shell-featured-card {
    background: linear-gradient(125deg, #15558a 0%, #087f78 48%, #10b981 100%);
    border-color: transparent;
    box-shadow: 0 18px 34px rgba(8, 97, 104, 0.22);
}

.academy-course-surface .shell-featured-card::after {
    display: block;
    top: -48%;
    right: -8%;
    width: 390px;
    height: 390px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.24), transparent 68%);
    opacity: 0.72;
}

.academy-course-surface .shell-featured-card .home-card-desc-toggle:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.48);
    color: #fff;
}

html[data-theme=dark] #app[data-view=home], html[data-theme=dark] #app[data-view=courses],
body.dark-mode #app[data-view=home], body.dark-mode #app[data-view=courses] {
    background:
        radial-gradient(circle at 0% 16%, rgba(41, 98, 184, 0.28), transparent 30rem),
        radial-gradient(circle at 100% 44%, rgba(16, 185, 129, 0.16), transparent 28rem),
        var(--bg-body);
}

html[data-theme=dark] .academy-course-surface .home-course-card:not(.shell-featured-card),
body.dark-mode .academy-course-surface .home-course-card:not(.shell-featured-card) {
    background: linear-gradient(145deg, transparent, rgba(var(--home-card-accent-rgb), .13)), #101e32;
    border-color: rgba(var(--home-card-accent-rgb), 0.4);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.22);
}

html[data-theme=dark] .academy-course-surface .home-course-card:not(.shell-featured-card) .cert-banner-icon,
body.dark-mode .academy-course-surface .home-course-card:not(.shell-featured-card) .cert-banner-icon {
    background: linear-gradient(rgba(var(--home-card-accent-rgb), 0.2), rgba(var(--home-card-accent-rgb), 0.2)), #101e32;
    border-color: rgba(var(--home-card-accent-rgb), 0.38);
    box-shadow: none;
}

@media (max-width: 767px) {
    .academy-course-surface .home-course-card:not(.shell-featured-card) {
        box-shadow: 0 8px 20px rgba(18, 60, 93, 0.08);
    }

    .academy-course-surface .shell-featured-card {
        box-shadow: 0 12px 26px rgba(8, 97, 104, 0.2);
    }
}

/* Scale-friendly catalog controls and compact home actions. */
.shell-text-button-icon {
    width: 17px;
    height: 17px;
    flex: 0 0 17px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.9;
    transition: transform 160ms ease;
}
.shell-text-button:hover .shell-text-button-icon { transform: translateX(3px); }

.academy-course-surface .home-course-card:not(.shell-featured-card) .home-card-desc-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 36px;
    margin-top: 4px;
    padding: 7px 11px;
    border: 1px solid rgba(var(--home-card-accent-rgb), 0.25);
    border-radius: 999px;
    background: rgba(var(--home-card-accent-rgb), 0.08);
    color: var(--home-card-accent);
    font-size: 13px;
    font-weight: 700;
    transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease;
    width: max-content;
    max-width: 100%;
    justify-self: start;
    white-space: nowrap;
}
.academy-course-surface .home-card-desc-toggle svg {
    width: 15px;
    height: 15px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2.1;
    transition: transform 160ms ease;
    display: block;
    min-width: 15px;
    max-width: 15px;
    flex: 0 0 15px;
}
.academy-course-surface .shell-featured-card .home-card-desc-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 36px;
    padding: 7px 11px;
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.1);
    color: #f2f8ff;
    width: max-content;
    max-width: 100%;
}

/* Match action buttons and empty progress tracks to each card's color. */
.academy-course-surface .home-course-card:not(.shell-featured-card) .home-card-open-btn {
    width: 100%;
    min-height: 46px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(var(--home-card-accent-rgb), 0.25);
    background: linear-gradient(135deg, rgba(var(--home-card-accent-rgb), 0.13), rgba(var(--home-card-accent-2-rgb), 0.24)), #fff;
    color: var(--home-card-ink);
    box-shadow: 0 7px 14px rgba(var(--home-card-accent-rgb), 0.13);
}
.academy-course-surface .home-course-card:not(.shell-featured-card) .home-card-open-btn:hover:not(:disabled) {
    border-color: rgba(var(--home-card-accent-rgb), 0.46);
    filter: saturate(1.08) brightness(.99);
    box-shadow: 0 9px 18px rgba(var(--home-card-accent-rgb), 0.2);
}
.academy-course-surface .home-course-card:not(.shell-featured-card) .progress-bar-container {
    display: block;
    width: 100%;
    min-width: 0;
    background: var(--home-card-track);
}
.academy-course-surface .home-course-card:not(.shell-featured-card) .progress-bar {
    background: linear-gradient(90deg, var(--home-card-accent), var(--home-card-accent-2));
}
.academy-course-surface .home-course-card .language-test-compact-status {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    overflow-wrap: anywhere;
    background: linear-gradient(rgba(var(--home-card-accent-rgb), 0.08), rgba(var(--home-card-accent-rgb), 0.08)), var(--bg-card);
    border-color: var(--home-card-button-border);
}
.academy-course-surface .home-course-card .language-test-status-icon {
    width: 1.8rem;
    height: 1.8rem;
    border-radius: 10px;
    background: linear-gradient(rgba(var(--home-card-accent-rgb), 0.18), rgba(var(--home-card-accent-rgb), 0.18)), #fff;
    color: var(--home-card-ink);
}
.academy-course-surface .home-course-card .language-test-status-icon svg {
    width: 1.3rem;
    height: 1.3rem;
    stroke-width: 2;
}

html[data-theme=dark] .academy-course-surface .home-course-card:not(.shell-featured-card) .home-card-open-btn,
body.dark-mode .academy-course-surface .home-course-card:not(.shell-featured-card) .home-card-open-btn {
    background: linear-gradient(135deg, rgba(var(--home-card-accent-rgb), 0.3), rgba(var(--home-card-accent-2-rgb), 0.2)), #102038;
    color: #f4f8ff;
    border-color: rgba(var(--home-card-accent-rgb), 0.52);
    box-shadow: 0 8px 16px rgba(0, 0, 0, .2);
}
html[data-theme=dark] .academy-course-surface .home-course-card .language-test-compact-status,
body.dark-mode .academy-course-surface .home-course-card .language-test-compact-status {
    background: linear-gradient(rgba(var(--home-card-accent-rgb), 0.12), rgba(var(--home-card-accent-rgb), 0.12)), #101e32;
    border-color: rgba(var(--home-card-accent-rgb), 0.34);
}
html[data-theme=dark] .academy-course-surface .home-course-card .language-test-status-icon,
body.dark-mode .academy-course-surface .home-course-card .language-test-status-icon {
    background: linear-gradient(rgba(var(--home-card-accent-rgb), 0.28), rgba(var(--home-card-accent-rgb), 0.28)), #122541;
    color: #eff6ff;
}



#app[data-view=home], #app[data-view=courses] { background-attachment: fixed; }

/* Media controls use the same ink, surfaces and outline icons as the app shell. */
.shell-certificate-symbol svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.audio-card.card { margin-bottom: 24px; padding: 28px; text-align: center; border: 1px solid var(--input-border); border-radius: 22px; background: var(--bg-card); box-shadow: 0 6px 22px #123c5d08; }
.audio-word { margin-bottom: 20px; }
.audio-eyebrow { color: var(--shell-blue); font: 600 11px/1.4 var(--font-primary); text-transform: uppercase; letter-spacing: 1.3px; }
.audio-card .audio-term { margin: 8px 0 5px; font-size: clamp(22px, 3vw, 28px); line-height: 1.3; color: var(--shell-ink); }
.audio-card .audio-gloss { margin: 0; font-size: 16px; line-height: 1.5; color: var(--text-muted); }
.lesson-audio-player { display: flex; align-items: center; gap: 14px; width: 100%; max-width: 440px; margin-inline: auto; padding: 12px; border: 1px solid var(--input-border); border-radius: 18px; background: linear-gradient(125deg, var(--shell-soft), var(--bg-card)); }
.audio-play { position: relative; display: grid; place-items: center; flex: 0 0 48px; width: 48px; height: 48px; padding: 0; border: 0; border-radius: 50%; background: linear-gradient(135deg, #2468df, #184b9e); color: #fff; cursor: pointer; box-shadow: 0 4px 10px #2159bc25; }
.audio-play:hover { filter: brightness(1.1); }
.audio-play svg { width: 23px; height: 23px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.audio-play-symbol { fill: currentColor; stroke-width: 0; }
.audio-pause-symbol { display: none; stroke-width: 3; }
.is-playing .audio-play-symbol { display: none; }
.is-playing .audio-pause-symbol { display: block; }
.is-loading .audio-play::after { content: ''; position: absolute; inset: -4px; border: 2px solid transparent; border-top-color: var(--shell-blue); border-radius: 50%; animation: audio-loading 1s linear infinite; }
.audio-timeline { flex: 1; min-width: 0; }
.audio-seek { display: block; width: 100%; min-width: 0; height: 28px; margin: 0; padding: 0; border: 0; box-shadow: none; background: transparent; appearance: none; -webkit-appearance: none; cursor: pointer; }
.audio-seek::-webkit-slider-runnable-track { height: 5px; border-radius: 4px; background: linear-gradient(to right, var(--shell-blue) var(--audio-progress, 0%), var(--input-border) var(--audio-progress, 0%)); }
.audio-seek::-webkit-slider-thumb { appearance: none; -webkit-appearance: none; width: 13px; height: 13px; margin-top: -4px; border: 2px solid var(--bg-card); border-radius: 50%; background: var(--shell-blue); box-shadow: 0 1px 4px #123c5d25; }
.audio-seek::-moz-range-track { height: 5px; border-radius: 4px; background: var(--input-border); }
.audio-seek::-moz-range-progress { height: 5px; border-radius: 4px; background: var(--shell-blue); }
.audio-seek::-moz-range-thumb { width: 10px; height: 10px; border: 2px solid var(--bg-card); border-radius: 50%; background: var(--shell-blue); }
.audio-seek:disabled { cursor: default; opacity: .6; }
.audio-time { display: flex; justify-content: space-between; color: var(--text-muted); font: 500 11px/1.2 var(--font-primary); font-variant-numeric: tabular-nums; }
.audio-speed { flex: 0 0 74px; width: 74px; min-height: 44px; padding: 6px; color: var(--shell-ink); background: var(--bg-card); border: 1px solid var(--input-border); border-radius: 10px; font: 600 12px/1.2 var(--font-primary); cursor: pointer; }
.audio-play:focus-visible, .audio-seek:focus-visible, .audio-speed:focus-visible { outline: 2px solid var(--shell-blue); outline-offset: 4px; }
.audio-card .audio-error { margin: 12px 0 0; color: var(--text-main); font-size: 13px; line-height: 1.5; }
.audio-error[hidden], .audio-card audio[hidden] { display: none; }
@media (max-width: 480px) {
    .audio-card.card { padding: 18px 12px; }
    .lesson-audio-player { gap: 10px; padding: 10px; }
    .audio-play { flex-basis: 44px; width: 44px; height: 44px; }
    .audio-speed { flex-basis: 64px; width: 64px; padding: 4px; }
}
@media (prefers-reduced-motion: reduce) { .is-loading .audio-play::after { animation: none; } }

@keyframes audio-loading { to { transform: rotate(360deg); } }

.ui-icon { display:inline-block; flex:none; vertical-align:middle; fill:none; stroke:currentColor; }

.home-card-action { position:relative; z-index:1; display:flex; align-items:center; }

.home-course-card .home-card-open-btn { font-size:1rem; }

.home-course-card .cert-banner-icon { color:var(--home-card-accent, var(--shell-blue)); }

.shell-featured-card .cert-banner-icon { color:white; }

.content-state, .content-loading { grid-column: 1 / -1; width: 100%; min-width: 0; }
.content-state { padding: clamp(24px,4vw,48px); border: 1px solid var(--input-border); border-radius: 24px; background: var(--bg-card); text-align: center; }
.content-state-icon { display: inline-flex; color: var(--shell-blue); background: var(--input-bg); padding: 16px; border-radius: 20px; }
.content-state h3 { margin: 20px 0 12px; color: var(--text-main); }
.content-state p { margin: 0 auto 24px; max-width: 560px; color: var(--text-muted); }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
#view-student.is-loading > .dashboard-overview, #view-student.is-loading > .student-view-title { display: none; }
.content-skeletons { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(240px,100%),1fr)); gap: 20px; }
.content-skeleton { display: grid; gap: 18px; padding: 28px; border: 1px solid var(--input-border); border-radius: 24px; background: var(--bg-card); }
.content-skeleton .skeleton-line { min-height: 16px; margin: 0; }
.content-skeleton .skeleton-line-title { min-height: 24px; }
@media (prefers-reduced-motion: reduce) { .content-skeleton .skel { animation: none; } }

:root { --app-safe-bottom: env(safe-area-inset-bottom, 0px); }
html { min-height: 100%; }
body { padding-bottom: calc(1rem + var(--app-safe-bottom)); }
#app[hidden], #academy-gate[hidden], [data-pwa][hidden] { display: none !important; }
#academy-gate { position: relative; z-index: 10; max-width: 29rem; margin: max(2rem, env(safe-area-inset-top)) auto 2rem; padding: 2rem; border: 1px solid #d4e5e2; border-radius: 1.5rem; background: #fff; color: #16332e; box-shadow: 0 12px 50px #103a2a15; }
#academy-gate h1 { margin: .5rem 0 1rem; font-size: 1.9rem; }
#academy-gate img { width: 96px; height: 64px; border-radius: .5rem; }
#academy-gate label { display: block; margin-top: 1rem; font-weight: 600; }
#academy-gate input, #academy-gate select { width: 100%; min-height: 44px; padding: .7rem; border: 1px solid #77958f; border-radius: .5rem; color: #16332e; background: white; font-size: 16px; }
#academy-gate button, .academy-app-button { padding: .65rem 1rem; min-height: 44px; border: 1px solid #176b63; border-radius: .6rem; background: #176b63; color: white; cursor: pointer; font: inherit; }
#academy-gate button { margin-top: 1rem; width: 100%; }
#academy-gate button:disabled, .academy-app-button:disabled { opacity: .6; cursor: wait; }
.academy-app-links { display: flex; flex-wrap: wrap; gap: 1rem; font-size: .9rem; margin-top: 1rem; }
.academy-app-links a { color: #176b63; text-decoration: underline; }
#academy-status { min-height: 1.5em; white-space: pre-line; margin: 1rem 0; }
#academy-status[role=alert] { color: #a52b28; }
#academy-startup-spinner { display: none; }
/* The anonymous shell checks the session before showing private content. Only
   sign-in/errors need the full card; the ordinary startup is a quiet loader. */
#academy-gate[data-state=loading] { position: fixed; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; overflow-y: auto; max-width: none; margin: 0; padding: 2rem; border: 0; border-radius: 0; background: transparent; color: var(--text-muted); box-shadow: none; text-align: center; }
#academy-gate[data-state=loading] > :not(#academy-status):not(#academy-startup-spinner):not(noscript) { display: none !important; }
#academy-gate[data-state=loading] #academy-startup-spinner { position: relative; display: grid; place-items: center; width: 124px; height: 124px; border-radius: 50%; filter: drop-shadow(0 16px 26px rgba(15, 23, 42, .12)); }
#academy-gate[data-state=loading] .academy-startup-spinner-ring { position: absolute; inset: 0; border: 5px solid transparent; border-radius: 50%; background: conic-gradient(from -35deg, var(--color-primary) 0 34%, var(--color-accent) 34% 53%, #38c8bb 53% 67%, rgba(226, 232, 240, .9) 67% 100%) border-box; -webkit-mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0); -webkit-mask-composite: xor; mask-composite: exclude; animation: academy-startup-spin 1.25s cubic-bezier(.55, .1, .35, .9) infinite; }
#academy-gate[data-state=loading] .academy-startup-spinner-ring::after { content: ''; position: absolute; inset: -8px; border: 1px solid rgba(37, 99, 235, .13); border-radius: 50%; }
#academy-gate[data-state=loading] .academy-startup-spinner-core { position: relative; z-index: 1; display: grid; place-items: center; width: 92px; height: 92px; border-radius: 50%; background: transparent; }
#academy-gate[data-state=loading] .academy-startup-spinner-core img { width: 88px; height: 88px; border-radius: 50%; object-fit: contain; filter: drop-shadow(0 5px 9px rgba(15, 23, 42, .16)); }
#academy-gate[data-state=loading] #academy-status { max-width: 22rem; font-size: 1.08rem; font-weight: 600; letter-spacing: .01em; margin: 1.25rem 0 0; color: var(--text-muted); }
#academy-gate:not([hidden]) ~ #ai-helper-fab, #academy-gate:not([hidden]) ~ #ai-helper-popover { display: none !important; }
@keyframes academy-startup-spin { to { transform: rotate(360deg); } }
/* Keep the sign-in card centred in the available viewport without locking its
   height. On short screens and when the keyboard is open, the minimum margin
   falls back to a small gutter so the whole form remains scrollable. */
#academy-gate[data-state=action] { margin-top: max(1rem, calc((var(--app-viewport-height) - 38rem) / 2)); margin-bottom: max(1rem, env(safe-area-inset-bottom)); }
#academy-app-notice { position: fixed; z-index: 10001; bottom: calc(var(--shell-nav-height, 0px) + 1.5rem + var(--app-safe-bottom)); left: max(.75rem, env(safe-area-inset-left)); right: max(.75rem, env(safe-area-inset-right)); max-width: 48rem; margin: auto; display: flex; flex-wrap: wrap; gap: .7rem; align-items: center; padding: .85rem 1rem; border-radius: .8rem; color: #16332e; background: #fff; border: 2px solid #176b63; box-shadow: 0 4px 24px #0002; }
#academy-app-notice span { flex: 1; min-width: 12rem; }
#academy-app-notice button { flex-shrink: 0; }
#main-header { padding-top: max(.5rem, env(safe-area-inset-top)); }
.header-content, #app > main { padding-left: max(1rem, env(safe-area-inset-left)); padding-right: max(1rem, env(safe-area-inset-right)); }
button, a, input, select { touch-action: manipulation; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible { outline: 3px solid #eab308; outline-offset: 3px; }
@media (max-width: 520px) { #academy-gate { margin: 1rem; padding: 1.4rem; } .nav-controls { flex-wrap: wrap; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; } }
@media (max-width: 520px) { #academy-gate[data-state=loading] #academy-startup-spinner { width: 108px; height: 108px; } #academy-gate[data-state=loading] .academy-startup-spinner-core { width: 84px; height: 84px; } #academy-gate[data-state=loading] .academy-startup-spinner-core img { width: 80px; height: 80px; } }
@media (prefers-reduced-motion: reduce) { #academy-gate[data-state=loading] .academy-startup-spinner-ring { animation: none !important; } }
/* The saved theme is applied in the document head, before CSS or authentication. */
html[data-theme=dark] { color-scheme: dark; }
html[data-theme=light] { color-scheme: light; }
#academy-gate { background: var(--bg-card); color: var(--text-main); border-color: var(--input-border); }
#academy-gate input, #academy-gate select { color: var(--text-main); background: var(--input-bg); border-color: var(--input-border); }
#academy-gate button, .academy-app-button { background: var(--color-primary); border-color: var(--color-primary); }
.academy-app-links a { color: var(--shell-blue, #165fb8); }
#academy-gate[data-state=loading] { background: radial-gradient(ellipse at center, rgba(0,108,255,.06), transparent 60%); color: var(--text-main); }
#academy-gate[data-state=loading] #academy-status { color: var(--text-main); }
#academy-gate[data-state=loading] .academy-startup-spinner-ring { background: conic-gradient(from -35deg, var(--color-primary) 0 40%, var(--color-accent) 40% 62%, var(--input-border) 62% 100%) border-box; }
#academy-app-notice { color: var(--text-main); background: var(--bg-card); border-color: var(--input-border); }
