/* ===========================================================
   PathwayAI Pro — Professional Design System
   ----------------------------------------------------------- */

/* Google Fonts + quality.css load from `<head>` via pathway_print_dns_prefetch_external()
   (non-blocking fonts + early quality) — avoids render-blocking @import chains. */

:root {
    /* Brand */
    --brand-50:  #f8f1df;
    --brand-100: #f0e2bf;
    --brand-200: #e8c872;
    --brand-300: #dfba63;
    --brand-400: #d9b45d;
    --brand-500: #c89a3c;
    --brand-600: #b8872f;
    --brand-700: #9a6f22;
    --brand-800: #7d5818;
    --brand-900: #5f420f;

    --accent-400: #f4dfb0;
    --accent-500: #e8c872;
    --accent-600: #d9b45d;

    --success-500: #58d68d;
    --warn-500:    #ffb06a;
    --danger-500:  #ff7d8d;

    --bg:          #070b16;
    --bg-soft:     #0d1428;
    --surface:     rgba(16, 24, 46, 0.88);
    --surface-2:   rgba(22, 32, 58, 0.94);
    --surface-3:   rgba(28, 40, 72, 0.82);
    --text:        #f4f7ff;
    --text-soft:   #d7def5;
    --muted:       #a8b2cf;
    --border:      rgba(214, 180, 106, 0.22);
    --border-soft: rgba(255, 255, 255, 0.08);

    --radius-xs: 8px;
    --radius-sm: 12px;
    --radius-md: 16px;
    --radius-lg: 22px;
    --radius-xl: 28px;
    --radius-pill: 999px;

    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.28);
    --shadow-sm: 0 8px 24px rgba(0, 0, 0, 0.28);
    --shadow-md: 0 18px 40px rgba(0, 0, 0, 0.34);
    --shadow-lg: 0 28px 60px rgba(0, 0, 0, 0.42);
    --shadow-glow: 0 0 0 1px rgba(232, 200, 114, 0.12), 0 18px 36px rgba(232, 200, 114, 0.16);

    --grad-hero:   linear-gradient(135deg, #0a1020 0%, #12192f 48%, #1b2544 100%);
    --grad-hero-overlay: radial-gradient(circle at 18% 0%, rgba(232, 200, 114, 0.22), transparent 42%),
                         radial-gradient(circle at 100% 100%, rgba(90, 130, 255, 0.12), transparent 50%);
    --grad-brand:  linear-gradient(135deg, #f4dfb0, #d9b45d);
    --grad-soft:   linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.01));
    --grad-card:   linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.015));
    --grad-bg:     radial-gradient(circle at top, rgba(232, 200, 114, 0.12), transparent 34%),
                   linear-gradient(180deg, #05070f 0%, #0a1020 48%, #070b16 100%);

    --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
    --transition: 260ms var(--ease-out-expo);
    --transition-slow: 420ms var(--ease-out-expo);

    /* Spacing scale (use for padding/gap consistency) */
    --space-1: 4px;
    --space-2: 8px;
    --space-3: 12px;
    --space-4: 16px;
    --space-5: 20px;
    --space-6: 24px;
    --space-8: 32px;
    --space-10: 40px;

    /* Typography scale */
    --text-xs: 0.8125rem;
    --text-sm: 0.875rem;
    --text-base: 0.9375rem;
    --text-lg: 1.05rem;
    --text-xl: 1.25rem;

    /* Pro UI layer */
    --glass-blur: 12px;
    --glass-bg: rgba(12, 18, 36, 0.55);
    --rail-x: clamp(14px, 3.5vw, 28px);

    /* Navbar / brand */
    --topbar-height: 68px;
    --brand-logo-height: 54px;
}

* { box-sizing: border-box; }

/* ============================ Light Theme ============================ */
/* Add `body.light` to enable a light-mode color system using the same vars */
body.light {
    --bg:          #ffffff;
    --bg-soft:     #f6f8fa;
    --surface:     rgba(255, 255, 255, 1);
    --surface-2:   rgba(247, 249, 252, 1);
    --surface-3:   rgba(240, 243, 247, 1);
    --text:        #061028;
    --text-soft:   #334155;
    --muted:       #6b7280;
    --border:      rgba(2, 6, 23, 0.06);
    --border-soft: rgba(2, 6, 23, 0.04);

    --grad-hero:   linear-gradient(135deg, #ffffff 0%, #f6f9ff 48%, #f2f6fb 100%);
    --grad-bg:     radial-gradient(circle at top, rgba(232, 200, 114, 0.06), transparent 34%), linear-gradient(180deg, #ffffff 0%, #f7f9fc 48%, #f6f8fa 100%);
    --glass-bg:    rgba(255, 255, 255, 0.9);
}

/* Theme toggle button (fixed top-right) */
.theme-toggle {
    position: fixed;
    top: 12px;
    right: 16px;
    z-index: 70;
    background: var(--surface);
    color: var(--text);
    border: 1px solid var(--border-soft);
    padding: 6px 10px;
    border-radius: 10px;
    box-shadow: var(--shadow-xs);
    cursor: pointer;
    font-size: 1rem;
    line-height: 1;
}

@media (max-width: 480px) {
    .theme-toggle { right: 10px; top: 8px; padding: 6px 8px; }
}
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
*:focus-visible {
    outline: 2px solid var(--brand-500);
    outline-offset: 2px;
    border-radius: 6px;
}

/* Gold / cream buttons: brand-colored outline is low-contrast — use a blue ring for keyboard focus */
.btn:focus-visible:not(:disabled),
a.btn:focus-visible,
button.nav-cta:focus-visible,
a.nav-cta:focus-visible,
button.lw-btn:focus-visible,
a.lw-btn:focus-visible {
    outline: 3px solid #2452e8;
    outline-offset: 3px;
}

body.dark .btn:focus-visible:not(:disabled),
body.dark a.btn:focus-visible,
body.dark button.nav-cta:focus-visible,
body.dark a.nav-cta:focus-visible,
body.dark button.lw-btn:focus-visible,
body.dark a.lw-btn:focus-visible {
    outline-color: #9ec0ff;
}

body {
    margin: 0;
    font-family: 'Inter', 'Segoe UI', Arial, sans-serif;
    font-size: var(--text-base);
    line-height: 1.65;
    color: var(--text);
    text-align: start;
    background: var(--grad-bg), var(--bg);
    background-attachment: fixed;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    min-height: 100vh;
    position: relative;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    opacity: 0.16;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
    background-size: 28px 28px;
    z-index: -1;
}

/* Slow ambient wash — transform-only for smooth “cinematic” depth (honors reduced motion via quality.css). */
body::after {
    content: "";
    position: fixed;
    inset: -12%;
    pointer-events: none;
    z-index: -2;
    opacity: 0.42;
    background:
        radial-gradient(ellipse 85% 55% at 18% 22%, rgba(110, 168, 255, 0.16), transparent 55%),
        radial-gradient(ellipse 75% 50% at 88% 78%, rgba(232, 200, 114, 0.11), transparent 54%),
        radial-gradient(ellipse 60% 45% at 50% 100%, rgba(90, 130, 255, 0.08), transparent 50%);
    animation: pathwayAmbientDrift 26s ease-in-out infinite alternate;
}
@keyframes pathwayAmbientDrift {
    from { transform: translate3d(-1.5%, -1%, 0) scale(1); }
    to   { transform: translate3d(1.5%, 1.2%, 0) scale(1.03); }
}

h1, h2, h3, h4, h5 {
    font-family: 'Plus Jakarta Sans', 'Inter', Arial, sans-serif;
    color: var(--text);
    letter-spacing: -0.01em;
    margin: 0 0 12px;
    line-height: 1.25;
    text-wrap: balance;
}
h1 { font-size: clamp(2rem, 4.2vw, 3rem); font-weight: 800; letter-spacing: -0.025em; }
h2 { font-size: 1.55rem; font-weight: 800; letter-spacing: -0.015em; }
h3 { font-size: 1.05rem; font-weight: 700; letter-spacing: -0.005em; }

p { margin: 0 0 10px; color: var(--text-soft); overflow-wrap: anywhere; }
a { color: var(--accent-400); text-decoration: none; transition: color var(--transition); font-weight: 500; }
/* Exclude .nav-cta (e.g. Progress in .nav-actions) — same contrast bug as gold .btn links. */
a:hover:not(.btn):not(.nav-cta) { color: #fff4d6; }

ul { margin: 0; padding-inline-start: 18px; }
ul li { margin-bottom: 4px; color: var(--text-soft); }

.container { width: min(1180px, calc(100% - 2 * var(--rail-x))); margin-inline: auto; }
.container--nav { width: min(1440px, calc(100% - 2 * var(--rail-x))); }

/* ============================ Topbar / Navbar ============================ */

.topbar {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(36, 48, 68, 0.94);
    backdrop-filter: saturate(160%) blur(14px);
    -webkit-backdrop-filter: saturate(160%) blur(14px);
    border-bottom: 1px solid rgba(148, 163, 184, 0.22);
    box-shadow: 0 4px 18px rgba(15, 23, 42, 0.22);
}
.topbar-pro {
    background: linear-gradient(180deg, rgba(51, 65, 85, 0.97) 0%, rgba(36, 48, 68, 0.95) 100%);
    border-bottom-color: rgba(148, 163, 184, 0.28);
}
.topbar-inner {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 7px 0;
    flex-wrap: nowrap;
    min-height: var(--topbar-height);
}
.topbar-pro .container {
    width: min(1440px, calc(100% - 2 * var(--rail-x)));
    margin-inline: auto;
}
.topbar-nav-shell {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px 16px;
    flex: 1 1 auto;
    min-width: 0;
}
/* Language, theme, a11y — keep one horizontal strip on desktop; mobile rules can wrap */
.topbar-util-cluster {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 10px 14px;
    flex: 0 0 auto;
    min-width: 0;
}
@media (min-width: 981px) {
    .topbar-nav-shell {
        flex-wrap: nowrap;
    }
    /* Nav scrolls; utilities + actions keep fixed intrinsic width (no vertical stack) */
    .topbar-nav-shell > .nav.nav-student.nav-student--pro,
    .topbar-nav-shell > .nav.nav--guest {
        flex: 1 1 0;
        min-width: 0;
    }
    .topbar-util-cluster {
        flex-shrink: 0;
        align-items: center;
    }
    .topbar-util-cluster .nav-lang-wrap {
        flex: 0 0 auto;
        max-width: min(300px, 32vw);
    }
    .topbar-util-cluster .nav-lang-select {
        max-width: min(190px, 26vw);
    }
    .topbar-nav-shell > .nav-actions {
        flex-shrink: 0;
        align-self: center;
    }
}
.brand {
    color: #fff;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-weight: 800;
    font-size: 1.05rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    flex: 0 0 auto;
    white-space: nowrap;
    text-decoration: none;
    min-height: var(--brand-logo-height);
    padding-right: 4px;
    text-shadow: none;
}

.topbar :is(.nav-link, .nav-lang-wrap label, .nav-lang-select, .nav-actions .btn, .nav-cta) {
    text-shadow: none;
    -webkit-text-fill-color: currentColor;
}

.brand:hover {
    color: #fff;
}

.brand-logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    flex-shrink: 0;
}

.brand-logo--horizontal {
    width: auto;
    height: var(--brand-logo-height);
    max-width: min(300px, 52vw);
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
}

.brand--horizontal {
    gap: 0;
    align-self: stretch;
    align-items: center;
}

.brand-logo__img,
.admin-topbar-mark__img,
.pathway-auth-brand-mark__img {
    display: block;
    width: 40px;
    height: 40px;
    object-fit: contain;
}

.brand-logo__img--horizontal,
.brand-logo__img--nav,
.admin-topbar-mark__img--horizontal,
.pathway-auth-brand-mark__img--horizontal {
    width: auto;
    height: var(--brand-logo-height);
    max-height: var(--brand-logo-height);
    max-width: min(300px, 52vw);
    object-fit: contain;
    object-position: left center;
}

.admin-topbar-mark--horizontal {
    height: var(--brand-logo-height);
    display: inline-flex;
    align-items: center;
}

.admin-topbar-mark__img--horizontal {
    max-width: min(280px, 50vw);
}

.pathway-auth-brand-mark__img--horizontal {
    height: 58px;
    max-height: 58px;
    max-width: min(320px, 88vw);
}

@media (max-width: 520px) {
    :root {
        --topbar-height: 62px;
        --brand-logo-height: 46px;
    }

    .topbar-inner {
        padding: 6px 0;
    }

    .brand-logo--horizontal {
        max-width: min(220px, 58vw);
    }

    .brand-logo__img--horizontal,
    .brand-logo__img--nav,
    .admin-topbar-mark__img--horizontal {
        max-width: min(220px, 58vw);
    }

    .pathway-auth-brand-mark__img--horizontal {
        height: 50px;
        max-height: 50px;
        max-width: min(260px, 92vw);
    }
}

.pathway-auth-brand-mark__img:not(.pathway-auth-brand-mark__img--horizontal) {
    width: 44px;
    height: 44px;
}

.admin-topbar-brand--horizontal {
    display: inline-flex;
    align-items: center;
    gap: 0;
    flex: 0 0 auto;
    min-width: 0;
    text-decoration: none;
}

.admin-topbar-end {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    flex: 1 1 auto;
    min-width: 0;
    margin-left: auto;
}

.admin-topbar-badge {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #e8efff;
    background: rgba(37, 99, 235, 0.28);
    padding: 5px 10px;
    border-radius: var(--radius-pill);
    border: 1px solid rgba(147, 197, 253, 0.45);
    flex-shrink: 0;
    line-height: 1.2;
    text-shadow: none;
    -webkit-text-fill-color: #e8efff;
    box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.35);
}

.brand-text {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.brand small {
    font-size: 0.7rem;
    font-weight: 600;
    color: #b9c6f5;
    background: rgba(255, 255, 255, 0.08);
    padding: 3px 8px;
    border-radius: var(--radius-pill);
    border: 1px solid rgba(255, 255, 255, 0.1);
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.nav {
    display: flex;
    flex-wrap: nowrap;
    gap: 2px;
    align-items: center;
    min-width: 0;
}
.nav-student {
    flex: 1 1 auto;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: thin;
    scrollbar-color: rgba(232, 200, 114, 0.45) transparent;
    padding: 2px 4px;
    -webkit-overflow-scrolling: touch;
    mask-image: linear-gradient(90deg, transparent 0, #000 10px, #000 calc(100% - 10px), transparent 100%);
}
.nav-student::-webkit-scrollbar { height: 4px; }
.nav-student::-webkit-scrollbar-thumb {
    background: rgba(232, 200, 114, 0.35);
    border-radius: 999px;
}

/* Pro student navbar: core strip + More / Admin dropdowns */
.nav.nav-student.nav-student--pro {
    overflow: visible;
    mask-image: none;
    flex-wrap: nowrap;
    gap: 8px;
    align-items: center;
}
.nav.nav-student.nav-student--pro .nav-primary-track {
    display: flex;
    flex-wrap: nowrap;
    gap: 4px;
    align-items: center;
    flex: 1 1 auto;
    min-width: 0;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: thin;
    scrollbar-color: rgba(232, 200, 114, 0.45) transparent;
    padding: 2px 4px;
    -webkit-overflow-scrolling: touch;
    mask-image: linear-gradient(90deg, transparent 0, #000 10px, #000 calc(100% - 10px), transparent 100%);
}
.nav.nav-student.nav-student--pro .nav-primary-track::-webkit-scrollbar {
    height: 3px;
}
.nav.nav-student.nav-student--pro .nav-primary-track::-webkit-scrollbar-thumb {
    background: rgba(232, 200, 114, 0.22);
    border-radius: 999px;
}

/* Phase 2 grouped student nav (PATHWAY_NAV_GROUPS_V2) */
.nav.nav-student.nav-student--pro .nav-primary-track--grouped {
    display: flex;
    flex-wrap: nowrap;
    gap: 6px;
    align-items: center;
    flex: 1 1 auto;
    min-width: 0;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: thin;
    scrollbar-color: rgba(232, 200, 114, 0.45) transparent;
    padding: 2px 4px;
    -webkit-overflow-scrolling: touch;
    mask-image: linear-gradient(90deg, transparent 0, #000 10px, #000 calc(100% - 10px), transparent 100%);
}

.nav.nav-student.nav-student--pro .nav-dropdown--student-group .nav-dropdown__summary {
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 6px 10px;
    white-space: nowrap;
}

.nav.nav-student.nav-student--pro .nav-dropdown--student-group .nav-dropdown__summary::after {
    opacity: 0.65;
}

@media (max-width: 980px) {
    .nav.nav-student.nav-student--pro.nav-student--grouped .nav-dropdown--student-group .nav-dropdown__panel {
        left: 0;
        right: auto;
        min-width: min(320px, 92vw);
    }
}

.nav-dropdown {
    position: relative;
    flex: 0 0 auto;
}
.nav-dropdown__summary {
    list-style: none;
    cursor: pointer;
    user-select: none;
}
.nav-dropdown__summary::-webkit-details-marker {
    display: none;
}
.nav-dropdown__summary::after {
    content: "";
    display: inline-block;
    width: 0.32em;
    height: 0.32em;
    margin-inline-start: 0.4em;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg);
    vertical-align: 0.12em;
    opacity: 0.7;
}
.nav-dropdown[open] .nav-dropdown__summary::after {
    transform: rotate(-135deg);
    vertical-align: 0.04em;
}
.nav-dropdown__summary--active {
    background: rgba(110, 168, 255, 0.22) !important;
    color: #fff !important;
    box-shadow: inset 0 0 0 1px rgba(110, 168, 255, 0.35);
}
.nav-dropdown--admin .nav-dropdown__summary--admin.nav-dropdown__summary--active {
    background: rgba(232, 200, 114, 0.2) !important;
    color: #f4dfb0 !important;
    box-shadow: inset 0 0 0 1px rgba(232, 200, 114, 0.35);
}
.nav-link--drawer {
    justify-content: flex-start !important;
    width: 100%;
    border-radius: 10px !important;
    padding: 10px 12px !important;
    font-size: 0.82rem !important;
}
@media (min-width: 981px) {
    .nav-dropdown__panel {
        position: absolute;
        top: calc(100% + 10px);
        right: 0;
        min-width: min(280px, 72vw);
        max-height: min(480px, 72vh);
        overflow-y: auto;
        padding: 8px;
        border-radius: 14px;
        background: rgba(10, 14, 28, 0.98);
        border: 1px solid rgba(96, 165, 250, 0.28);
        box-shadow: 0 18px 48px rgba(0, 0, 0, 0.45);
        z-index: 120;
        display: flex;
        flex-direction: column;
        gap: 2px;
        filter: none;
        opacity: 1;
    }
    [dir="rtl"] .nav-dropdown__panel {
        right: auto;
        left: 0;
    }

    /* Keep dropdown above page content / context strip */
    .topbar,
    .topbar-pro,
    .topbar-inner,
    .topbar-nav-shell,
    .topbar-util-cluster,
    .nav-actions,
    .nav-dropdown {
        overflow: visible !important;
    }

    .topbar,
    .topbar-pro {
        z-index: 400 !important;
    }
}

/* Admin dropdown links — always readable (never inherit invisible / transparent fills) */
.nav-dropdown__panel .nav-link,
.nav-dropdown__panel .nav-link--drawer,
.nav-dropdown__panel a.nav-link {
    color: #e8eefc !important;
    -webkit-text-fill-color: #e8eefc !important;
    text-shadow: none !important;
    opacity: 1 !important;
    visibility: visible !important;
}

.nav-dropdown__panel .nav-link:hover,
.nav-dropdown__panel .nav-link--drawer:hover {
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    background: rgba(37, 99, 235, 0.28) !important;
}

.nav-dropdown--admin .nav-dropdown__panel .nav-link,
.nav-dropdown--admin .nav-dropdown__panel .nav-link--drawer {
    color: #f1f5f9 !important;
    -webkit-text-fill-color: #f1f5f9 !important;
}
@media (max-width: 980px) {
    .nav.nav-student.nav-student--pro {
        flex-direction: column;
        align-items: stretch;
    }
    .nav.nav-student.nav-student--pro .nav-primary-track {
        mask-image: none;
        width: 100%;
    }
    .nav-dropdown__panel {
        position: static;
        margin-top: 4px;
        padding: 6px 0 6px 10px;
        border-left: 2px solid rgba(232, 200, 114, 0.28);
        background: rgba(6, 10, 22, 0.55);
        border-radius: 0 10px 10px 0;
        display: flex;
        flex-direction: column;
        gap: 2px;
    }
    [dir="rtl"] .nav-dropdown__panel {
        border-left: 0;
        border-right: 2px solid rgba(232, 200, 114, 0.28);
        padding-left: 0;
        padding-right: 10px;
        border-radius: 10px 0 0 10px;
    }
}

/* Guest navbar: product vs account clusters — single row on desktop; horizontal scroll if narrow */
.nav.nav--guest {
    flex: 1 1 auto;
    min-width: 0;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: thin;
    scrollbar-color: rgba(232, 200, 114, 0.45) transparent;
    -webkit-overflow-scrolling: touch;
    padding: 2px 0;
    mask-image: linear-gradient(90deg, transparent 0, #000 8px, #000 calc(100% - 8px), transparent 100%);
}
.nav.nav--guest::-webkit-scrollbar {
    height: 4px;
}
.nav.nav--guest::-webkit-scrollbar-thumb {
    background: rgba(232, 200, 114, 0.35);
    border-radius: 999px;
}
.nav-public-wrap {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 8px 14px;
    width: max-content;
}
.nav-public-group {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 2px;
    flex: 0 0 auto;
}
.nav-public-group--meta {
    padding-inline-start: 12px;
    margin-inline-start: 2px;
    border-inline-start: 1px solid rgba(255, 255, 255, 0.14);
}
@media (max-width: 980px) {
    .nav.nav--guest {
        overflow-x: visible;
        mask-image: none;
        scrollbar-width: auto;
    }
    .nav-public-wrap {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
        width: 100%;
        max-width: none;
    }
    .nav-public-group--meta {
        border-inline-start: none;
        padding-inline-start: 0;
        margin-inline-start: 0;
        border-block-start: 1px solid rgba(255, 255, 255, 0.1);
        padding-block-start: 8px;
    }
}
.nav a,
.nav .nav-link {
    color: #d8e1ff;
    padding: 7px 11px;
    border-radius: var(--radius-pill);
    font-size: 0.84rem;
    font-weight: 500;
    transition: background-color var(--transition), color var(--transition), transform var(--transition), box-shadow var(--transition);
    position: relative;
    white-space: nowrap;
    flex: 0 0 auto;
}
.nav-student a,
.nav-student .nav-link {
    font-size: 0.78rem;
    padding: 6px 9px;
    letter-spacing: 0.01em;
}
.nav a:hover,
.nav .nav-link:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}
.nav a.active,
.nav .nav-link.active {
    background: var(--grad-brand);
    color: #1a1408;
    box-shadow: 0 6px 18px rgba(232, 200, 114, 0.28);
}
.nav-actions--guest {
    flex-shrink: 0;
    z-index: 6;
}
.nav-actions--guest .nav-cta {
    margin-left: 0;
}
@media (min-width: 981px) {
    .topbar-util-cluster {
        position: relative;
        z-index: 5;
        flex-shrink: 0;
    }
}
.nav-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 0 0 auto;
    align-self: center;
    padding-left: 10px;
    margin-left: 2px;
    border-left: 1px solid rgba(255, 255, 255, 0.12);
    position: relative;
}

.nav-dropdown--admin-end {
    flex-shrink: 0;
}

.nav-dropdown--admin-end .nav-dropdown__summary--admin {
    background: rgba(37, 99, 235, 0.24);
    border: 1px solid rgba(147, 197, 253, 0.42);
    color: #e8efff;
    text-shadow: none;
    -webkit-text-fill-color: #e8efff;
    font-weight: 700;
    letter-spacing: 0.04em;
}

.nav-dropdown--admin-end .nav-dropdown__summary--admin:hover,
.nav-dropdown--admin-end .nav-dropdown__summary--admin.nav-dropdown__summary--active {
    background: rgba(37, 99, 235, 0.38);
    color: #ffffff;
    -webkit-text-fill-color: #ffffff;
}

.nav-lang-wrap {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 8px;
    flex: 0 0 auto;
    padding-left: 10px;
    margin-left: 2px;
    border-left: 1px solid rgba(255, 255, 255, 0.12);
}
.nav-lang-wrap label {
    font-size: 0.68rem;
    color: #c8d4f0;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    white-space: nowrap;
    text-shadow: none;
}
.nav-theme-wrap {
    display: flex;
    align-items: center;
    flex: 0 0 auto;
    padding-left: 8px;
    margin-left: 4px;
    border-left: 1px solid rgba(255, 255, 255, 0.12);
}
.nav-theme-toggle {
    font-size: 0.72rem !important;
    padding: 6px 10px !important;
    white-space: nowrap;
    line-height: 1.2;
}
.nav-lang-select {
    font: inherit;
    font-size: 0.78rem;
    font-weight: 600;
    color: #eaf0ff;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 10px;
    padding: 6px 10px;
    max-width: min(220px, 46vw);
    cursor: pointer;
    min-width: 0;
}
.nav-lang-select:focus {
    outline: 2px solid rgba(110, 168, 255, 0.45);
    outline-offset: 2px;
}
.nav a.nav-cta,
.nav .nav-link.nav-cta {
    background: var(--grad-brand);
    color: #1a1408;
    font-weight: 700;
    margin-left: 4px;
}
.nav a.nav-cta:hover,
.nav .nav-link.nav-cta:hover {
    background: linear-gradient(135deg, #fff0c8, #e8c872);
    color: #1a1408;
    transform: translateY(-1px);
    box-shadow: 0 8px 18px rgba(232, 200, 114, 0.28);
}
.nav-cta--soft {
    background: var(--grad-brand);
    color: #1a1408;
    font-weight: 700;
    padding: 7px 14px;
    border-radius: var(--radius-pill);
    font-size: 0.78rem;
    line-height: 1.2;
    box-shadow: 0 6px 18px rgba(232, 200, 114, 0.22);
}
.nav-cta--soft:hover,
.nav-cta--soft.active {
    background: linear-gradient(135deg, #fff0c8, #e8c872);
    color: #1a1408;
}
.nav-cta--ghost {
    background: rgba(255, 255, 255, 0.08);
    color: #eef2ff;
    border: 1px solid rgba(255, 255, 255, 0.16);
    box-shadow: none;
}
.nav-cta--ghost:hover {
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: none;
}

.nav form.logout-inline,
.admin-topbar-nav form.logout-inline {
    display: inline;
    margin: 0;
}

.nav form.logout-inline button.nav-cta,
.nav-actions form.logout-inline button.nav-cta,
.admin-topbar-nav form.logout-inline button.admin-topbar-logout {
    border: 0;
    cursor: pointer;
    font: inherit;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 14px;
    border-radius: 999px;
}

.logout-inline.logout-block {
    display: block;
    width: 100%;
}

.logout-inline.logout-block button {
    width: 100%;
}

.nav-toggle { display: none; }
.nav-toggle-btn {
    display: none;
    width: 40px;
    height: 36px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.05);
    transition: background-color var(--transition);
    flex-shrink: 0;
}
.nav-toggle-btn:hover { background: rgba(255, 255, 255, 0.12); }
.nav-toggle-btn span {
    width: 18px;
    height: 2px;
    background: #fff;
    border-radius: 2px;
}

#pageProgressBar {
    position: fixed;
    top: 0; left: 0;
    height: 3px;
    width: 0%;
    background: linear-gradient(90deg, #f4dfb0, #e8c872, #d9b45d);
    box-shadow: 0 0 12px rgba(232, 200, 114, 0.45);
    z-index: 9999;
    transition: width 0.25s ease-out, opacity 0.3s ease;
    opacity: 0;
    pointer-events: none;
}
#pageProgressBar.active { opacity: 1; }

/* ============================ Hero ============================ */

.hero {
    color: #fff;
    padding: 84px 0 80px;
    background: var(--grad-hero);
    position: relative;
    overflow: hidden;
    isolation: isolate;
    border-bottom: 1px solid rgba(232, 200, 114, 0.12);
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.22);
    text-align: center;
}
.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: var(--grad-hero-overlay);
    z-index: -1;
}
.hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(circle at 1px 1px, rgba(255, 255, 255, 0.08) 1px, transparent 0);
    background-size: 32px 32px;
    opacity: 0.5;
    z-index: -1;
}
.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.22);
    color: #e8eeff;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    border-radius: var(--radius-pill);
    backdrop-filter: blur(6px);
    margin-bottom: 18px;
}
.hero-badge::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent-400);
    box-shadow: 0 0 10px var(--accent-400);
    animation: pulseDot 1.8s ease-in-out infinite;
}
@keyframes pulseDot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%      { opacity: 0.55; transform: scale(0.85); }
}

.hero h1 {
    color: #fff;
    margin-bottom: 14px;
    line-height: 1.15;
}
.hero h1 br { display: inline; }
.hero .subtitle strong { color: #fff; }
.hero .subtitle {
    max-width: min(720px, 92vw);
    color: rgba(232, 238, 255, 0.92);
    font-size: clamp(0.98rem, 1.5vw, 1.08rem);
    line-height: 1.55;
    margin: 0 auto 22px;
    text-wrap: balance;
}
.hero .meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    font-size: 0.85rem;
    margin: 0 auto 22px;
    justify-content: center;
}
.hero .meta span {
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.22);
    padding: 6px 12px;
    border-radius: var(--radius-pill);
    color: #f8fafc;
    text-shadow: none;
    -webkit-text-fill-color: #f8fafc;
}
.hero .meta .logged-in-chip {
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.32);
    color: #fff;
    font-weight: 500;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
}
.hero .meta .logged-in-chip::before {
    content: "●";
    color: #4ade80;
    margin-right: 6px;
    font-size: 0.7rem;
    vertical-align: middle;
    text-shadow: 0 0 6px rgba(74, 222, 128, 0.7);
}
.hero .meta .logged-in-email {
    opacity: 0.85;
    font-weight: 400;
}
.cta-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; justify-content: flex-start; }
.hero .cta-row { justify-content: center; }

.cta-card {
    text-align: center;
    background: var(--grad-brand);
    color: #fff;
    border: none;
    box-shadow: 0 24px 48px rgba(59, 99, 255, 0.35);
    padding: 36px 28px;
}
.cta-card h2 { color: #fff; margin-bottom: 6px; }
.cta-card p  { color: rgba(255, 255, 255, 0.92); margin-bottom: 14px; }
.cta-card .cta-row { justify-content: center; }
.cta-card .btn-ghost {
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.4);
}
.cta-card .btn-ghost:hover {
    background: rgba(255, 255, 255, 0.22);
    border-color: #fff;
}

/* ============================ Buttons ============================ */

.btn {
    border: 1px solid transparent;
    text-decoration: none;
    border-radius: var(--radius-sm);
    padding: 10px 18px;
    font-weight: 600;
    font-size: 0.92rem;
    line-height: 1.2;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: transform var(--transition), background-color var(--transition),
                color var(--transition), box-shadow var(--transition), border-color var(--transition), filter var(--transition);
    user-select: none;
    white-space: nowrap;
    position: relative;
    overflow: hidden;
    isolation: isolate;
}
.btn::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.25), transparent);
    transform: translateX(-100%);
    transition: transform 0.55s ease;
    pointer-events: none;
}
.btn:hover::after { transform: translateX(100%); }
.btn-outline::after,
.btn-ghost::after {
    display: none;
}
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; transform: none; }

.btn-primary {
    background: var(--grad-brand);
    color: #1a1408;
    box-shadow: 0 12px 30px rgba(232, 200, 114, 0.22), inset 0 1px 0 rgba(255,255,255,0.35);
}
.btn-primary:hover {
    color: #120d05;
    transform: translateY(-1px);
    box-shadow: 0 16px 34px rgba(232, 200, 114, 0.3);
    filter: brightness(1.03);
}
.btn-primary:focus-visible {
    color: #120d05;
}

/* Links styled as buttons: keep dark label on gold (beats any stray `a:hover` / hero inheritance). */
a.btn.btn-primary:hover,
a.btn.btn-primary:focus-visible {
    color: #120d05;
}

.btn-outline {
    border-color: rgba(255, 255, 255, 0.6);
    color: #fff;
    background: transparent;
}
.btn-outline:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: #fff;
    color: #fff;
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.04);
    color: var(--text);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-xs);
}
.btn-secondary:hover {
    color: var(--text);
    transform: translateY(-1px);
    border-color: rgba(232, 200, 114, 0.42);
    box-shadow: var(--shadow-sm);
}
.btn-secondary:focus-visible {
    color: var(--text);
}

.btn-ghost {
    background: rgba(255, 255, 255, 0.03);
    color: var(--text);
    border-color: var(--border-soft);
    box-shadow: var(--shadow-xs);
}
.btn-ghost:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(232, 200, 114, 0.35);
    box-shadow: var(--shadow-sm);
}

.btn-sm { padding: 7px 12px; font-size: 0.82rem; }

.resource-open {
    background: var(--surface-2);
    color: var(--brand-700);
    border: 1px solid var(--border);
    padding: 7px 14px;
    margin-inline-start: 8px;
    font-size: 0.82rem;
    border-radius: var(--radius-pill);
    font-weight: 600;
    box-shadow: var(--shadow-xs);
    transition: all var(--transition);
}
.resource-open:hover {
    background: var(--brand-50);
    border-color: var(--brand-300);
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

/* ============================ Layout ============================ */

main,
#mainContent {
    min-width: 0;
    text-align: start;
}

/* Panels & prose blocks: one alignment baseline (use .pathway-align-center / .pub-home-steps for intentional center). */
#mainContent .hero-journey-day,
#mainContent .hero-journey-timeline,
#mainContent .verified-resource-item,
#mainContent .pilot-school-card,
#mainContent .faq-item,
#mainContent .task-row,
#mainContent .stack,
#mainContent .stack-grid,
#mainContent dl {
    text-align: start;
}

main { padding: clamp(var(--space-8), 5vw, var(--space-10)) 0 clamp(48px, 8vw, 88px); }

.card {
    position: relative;
    background: var(--grad-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 28px 30px;
    margin-bottom: 20px;
    box-shadow: var(--shadow-sm);
    text-align: start;
    overflow-wrap: anywhere;
    transition:
        transform var(--transition-slow),
        box-shadow var(--transition-slow),
        border-color var(--transition);
    overflow: hidden;
    isolation: isolate;
    backdrop-filter: blur(var(--glass-blur)) saturate(140%);
    -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(140%);
}
.card::before {
    content: "";
    position: absolute;
    top: 0; left: 24px; right: 24px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(232, 200, 114, 0.28), transparent);
    opacity: 0;
    transition: opacity var(--transition);
}
.card::after {
    content: "";
    position: absolute;
    top: 0; right: 0;
    width: 240px;
    height: 240px;
    background: radial-gradient(circle at 100% 0%, rgba(232, 200, 114, 0.08), transparent 60%);
    opacity: 0;
    transition: opacity var(--transition);
    pointer-events: none;
    z-index: -1;
}
.card:hover {
    transform: none;
    box-shadow: inherit;
    border-color: inherit;
}
.card:hover::before,
.card:hover::after { opacity: 0; }
.card > :last-child { margin-bottom: 0; }
.card h2 { margin-top: 0; position: relative; padding-inline-start: 14px; }
.card h2::before {
    content: "";
    position: absolute;
    inset-inline-start: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 70%;
    background: var(--grad-brand);
    border-radius: 4px;
    box-shadow: 0 2px 6px rgba(232, 200, 114, 0.28);
}
body.dark .card::after { background: radial-gradient(circle at 100% 0%, rgba(232, 200, 114, 0.1), transparent 60%); }

.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 18px; align-items: start; }

.grid-2 > .span-full {
    grid-column: 1 / -1;
}

.nav-dropdown > summary,
.nav-dropdown__summary {
    cursor: pointer;
    list-style: none;
}

.nav-dropdown > summary::-webkit-details-marker,
.nav-dropdown__summary::-webkit-details-marker {
    display: none;
}

.ai-response[data-placeholder]:empty::before {
    content: attr(data-placeholder);
    color: var(--muted);
    font-style: italic;
}

.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }

/* ============================ Feature boxes ============================ */

.feature-box {
    background: var(--grad-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 20px 20px 18px;
    transition:
        transform var(--transition-slow),
        box-shadow var(--transition-slow),
        border-color var(--transition);
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-xs);
    backdrop-filter: blur(10px) saturate(130%);
    -webkit-backdrop-filter: blur(10px) saturate(130%);
}
.feature-box::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: var(--grad-brand);
    opacity: 0;
    transition: opacity var(--transition);
    border-radius: 3px 3px 0 0;
}
.feature-box::after {
    content: "";
    position: absolute;
    top: -50%;
    right: -30%;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(232, 200, 114, 0.08), transparent 70%);
    opacity: 0;
    transition: opacity var(--transition);
    pointer-events: none;
}
.feature-box:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md), 0 0 0 1px rgba(232, 200, 114, 0.12), 0 0 40px rgba(232, 200, 114, 0.06);
    border-color: rgba(232, 200, 114, 0.34);
}
.feature-box:hover::before,
.feature-box:hover::after { opacity: 1; }
.feature-box h3 { margin: 0 0 6px; font-size: 1rem; color: var(--text); font-weight: 700; }
.feature-box p { margin: 0; font-size: 0.9rem; }

/* ============================ Stats ============================ */

.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 12px;
    margin-top: 22px;
}
.stat {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(6px);
    padding: 14px 16px;
    border-radius: var(--radius-md);
    color: rgba(255, 255, 255, 0.95);
    transition: transform var(--transition), background-color var(--transition);
}
.stat:hover { transform: none; background: inherit; }
.stat strong {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 1.45rem;
    display: block;
    color: #fff;
    font-weight: 800;
    margin-bottom: 2px;
}

/* Light-mode overrides for components that assume dark backgrounds */
body.light .stat {
    background: var(--surface-2);
    border: 1px solid var(--border-soft);
    color: var(--text);
}
body.light .stat:hover { background: inherit; }
body.light .stat strong { color: var(--text); }

body.light .feature-box h3 { color: var(--text); }
body.light .feature-box p { color: var(--text-soft); }

body.light .step-item { background: var(--surface-2); border: 1px solid var(--border-soft); }
body.light .step-item h3, body.light .step-item p { color: var(--text); }

body.light .pub-home-steps > h2 { color: var(--text); }
body.light .pub-home-steps .small-muted { color: var(--muted); }

body.light .tags span { background: linear-gradient(135deg, var(--brand-50), #e6edff); color: var(--brand-700); }

/* Hero area adjustments for light mode */
body.light .hero {
    background: var(--grad-hero);
    box-shadow: none;
    border-bottom-color: rgba(2,6,23,0.04);
}
body.light .hero::before, body.light .hero::after { opacity: 0.12; }
body.light .hero h1 { color: var(--text); }
body.light .hero .subtitle { color: var(--text-soft); }
body.light .hero .subtitle strong { color: var(--text); }
body.light .hero-badge {
    background: var(--surface-3);
    border: 1px solid var(--border-soft);
    color: var(--brand-700);
}
body.light .hero .meta span {
    background: var(--surface-3);
    border: 1px solid var(--border-soft);
    color: var(--text);
}
body.light .hero .meta .logged-in-chip { background: var(--surface-2); border-color: var(--border-soft); color: var(--text); }

/* ============================ Onboarding steps ============================ */

/* Homepage index: step cards (div). Do not use plain .onboarding-steps — ol rules below would override. */
div.onboarding-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px;
    width: 100%;
    max-width: 960px;
    margin-inline: auto;
    justify-content: center;
}
.step-item {
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 20px;
    background: var(--grad-card);
    transition:
        transform var(--transition-slow),
        box-shadow var(--transition-slow),
        border-color var(--transition);
    position: relative;
    box-shadow: var(--shadow-xs);
    backdrop-filter: blur(8px) saturate(125%);
    -webkit-backdrop-filter: blur(8px) saturate(125%);
}
.step-item:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md), 0 0 36px rgba(59, 99, 255, 0.1);
    border-color: rgba(59, 99, 255, 0.28);
}
.step-number {
    display: inline-flex;
    width: 36px;
    height: 36px;
    border-radius: 12px;
    align-items: center;
    justify-content: center;
    background: var(--grad-brand);
    color: #fff;
    font-weight: 800;
    margin-bottom: 12px;
    box-shadow: 0 8px 18px rgba(59, 99, 255, 0.35), inset 0 1px 0 rgba(255,255,255,0.2);
    font-size: 0.95rem;
}

/* Home: "From syllabus to daily class" — center heading + copy + stable grid */
.pub-home-steps {
    text-align: center;
}
.pub-home-steps > h2 {
    padding-inline-start: 0;
    margin-inline: auto;
    max-width: 28ch;
}
.pub-home-steps > h2::before {
    /* No gold bar here — centered title reads cleaner (global .card h2::before would overlap text). */
    content: none;
    display: none;
}
.pub-home-steps > p {
    margin-inline: auto;
    max-width: 52ch;
}
.pub-home-steps-sub {
    margin-bottom: 14px;
    font-style: normal;
}
div.onboarding-steps .step-item {
    text-align: center;
}
div.onboarding-steps .step-item .step-number {
    margin-inline: auto;
}
div.onboarding-steps .step-item h3,
div.onboarding-steps .step-item p {
    text-wrap: balance;
    margin-inline: auto;
    max-width: 36ch;
}
[dir="rtl"] .pub-home-steps > h2 {
    padding-inline-end: 0;
}

/* ============================ Timeline ============================ */

.timeline article {
    text-align: start;
    border-inline-start: 3px solid var(--brand-300);
    padding-block: 10px;
    padding-inline: 0;
    padding-inline-start: 18px;
    margin-bottom: 10px;
    border-start-start-radius: 0;
    border-start-end-radius: 12px;
    border-end-end-radius: 12px;
    border-end-start-radius: 0;
    transition:
        background-color var(--transition),
        border-color var(--transition),
        padding-inline-start var(--transition);
    position: relative;
}
.timeline article::before {
    content: "";
    position: absolute;
    inset-inline-start: -7px;
    top: 16px;
    width: 11px;
    height: 11px;
    border-radius: 50%;
    background: #fff;
    border: 3px solid var(--brand-500);
    box-shadow: 0 0 0 4px rgba(59, 99, 255, 0.14);
    transition: box-shadow var(--transition), transform var(--transition);
}
.timeline article:hover {
    background: linear-gradient(to inline-end, rgba(59, 99, 255, 0.06), transparent 80%);
    border-color: var(--brand-500);
    padding-inline-start: 22px;
}
.timeline article:hover::before {
    box-shadow: 0 0 0 5px rgba(59, 99, 255, 0.2), 0 0 12px rgba(59, 99, 255, 0.4);
    transform: scale(1.1);
}
.timeline h3 { margin: 0 0 4px; font-size: 0.98rem; }
.timeline p   { margin: 0; font-size: 0.9rem; }

/* ============================ Tags ============================ */

.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.tags span {
    background: linear-gradient(135deg, var(--brand-50), #e6edff);
    color: var(--brand-700);
    border: 1px solid var(--brand-100);
    border-radius: var(--radius-pill);
    padding: 6px 13px;
    font-size: 0.82rem;
    font-weight: 600;
    transition: background-color var(--transition), border-color var(--transition), transform var(--transition), box-shadow var(--transition);
    box-shadow: var(--shadow-xs);
}
.tags span:hover {
    background: linear-gradient(135deg, var(--brand-100), var(--brand-50));
    border-color: var(--brand-300);
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}
.tags a { color: inherit; }

/* ============================ Blockquote ============================ */

blockquote {
    border-left: 4px solid var(--brand-500);
    background: var(--brand-50);
    margin: 0 0 12px;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    padding: 14px 16px;
    color: var(--brand-800);
    font-style: italic;
}

/* ============================ Tables ============================ */

.table-wrap {
    overflow-x: auto;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    background: var(--surface);
    box-shadow: var(--shadow-xs);
}
table { width: 100%; border-collapse: collapse; background: transparent; }
th, td { border-bottom: 1px solid var(--border-soft); padding: 14px 16px; font-size: 0.9rem; text-align: start; }
th {
    background: linear-gradient(180deg, var(--surface-3), var(--surface-2));
    font-weight: 700;
    color: var(--text);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    position: sticky;
    top: 0;
}
tr:last-child td { border-bottom: none; }
tr:hover td { background: rgba(59, 99, 255, 0.04); }

.status {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 4px 11px;
    border-radius: var(--radius-pill);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    border: 1px solid transparent;
}
.status.good {
    color: #0a5f3e;
    background: linear-gradient(135deg, #d4f8e6, #b9efce);
    border-color: rgba(22, 163, 102, 0.25);
}
.status.warn {
    color: #6a4900;
    background: linear-gradient(135deg, #fff1c2, #ffe49c);
    border-color: rgba(217, 145, 0, 0.3);
}

/* ============================ Stack grid ============================ */

.stack-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
}
.stack-grid div {
    background: var(--grad-card);
    border: 1px solid var(--border);
    padding: 16px 18px;
    border-radius: var(--radius-md);
    transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
    font-size: 0.92rem;
    box-shadow: var(--shadow-xs);
}
.stack-grid div:hover {
    transform: none;
    border-color: inherit;
    box-shadow: inherit;
}
.stack-grid strong { color: var(--brand-700); }

/* ============================ FAQ ============================ */

.faq-item {
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    margin-bottom: 10px;
    overflow: hidden;
    background: var(--surface);
    transition: border-color var(--transition), box-shadow var(--transition);
    box-shadow: var(--shadow-xs);
}
.faq-item:hover { border-color: rgba(59, 99, 255, 0.22); box-shadow: var(--shadow-sm); }
.faq-q {
    width: 100%;
    text-align: start;
    background: transparent;
    color: var(--text);
    border: none;
    padding: 16px 18px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: background-color var(--transition);
}
.faq-q:hover { background: inherit; }
.faq-a { display: none; padding: 0 18px 16px; color: var(--text-soft); font-size: 0.92rem; line-height: 1.65; }

/* ============================ Charts / cards ============================ */

.chart-card { height: 360px; }

.form-card {
    max-width: min(660px, 100%);
    margin-left: auto;
    margin-right: auto;
}

/* ============================ Forms ============================ */

form { display: grid; gap: 12px; }

label {
    font-weight: 600;
    font-size: 0.84rem;
    color: var(--text);
    letter-spacing: 0.01em;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
}

.inline-form label,
form.inline-form label {
    display: inline;
    flex-direction: unset;
    gap: 0;
}

input:not(.pathway-auth-input),
select:not(.pathway-auth-input),
textarea:not(.pathway-auth-input) {
    width: 100%;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 12px 14px;
    font-size: 0.95rem;
    font-family: inherit;
    background: rgba(4, 8, 18, 0.55);
    color: var(--text);
    transition: border-color var(--transition), box-shadow var(--transition), background-color var(--transition);
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.18);
}
input::placeholder,
textarea::placeholder { color: var(--muted); }
input:hover:not(:focus),
select:hover:not(:focus),
textarea:hover:not(:focus) { border-color: rgba(232, 200, 114, 0.28); }
input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: rgba(232, 200, 114, 0.55);
    background: rgba(4, 8, 18, 0.72);
    box-shadow: 0 0 0 4px rgba(232, 200, 114, 0.12), inset 0 1px 2px rgba(0, 0, 0, 0.12);
}
input[type="file"] { padding: 9px 11px; background: var(--surface-2); cursor: pointer; }
textarea { resize: vertical; min-height: 96px; }

.alert {
    border-radius: var(--radius-md);
    padding: 13px 16px;
    font-size: 0.9rem;
    margin: 8px 0 14px;
    border: 1px solid transparent;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    line-height: 1.5;
    box-shadow: var(--shadow-xs);
}
.alert.success {
    background: linear-gradient(135deg, rgba(88, 214, 141, 0.16), rgba(22, 163, 102, 0.12));
    color: #b8f5d4;
    border-color: rgba(88, 214, 141, 0.35);
}
.alert.error {
    background: linear-gradient(135deg, rgba(255, 125, 141, 0.16), rgba(220, 53, 69, 0.12));
    color: #ffd0d7;
    border-color: rgba(255, 125, 141, 0.35);
}

.alert.offline-banner {
    background: linear-gradient(135deg, rgba(255, 176, 102, 0.14), rgba(255, 140, 66, 0.1));
    color: #ffe8d2;
    border-color: rgba(255, 176, 102, 0.42);
}

/* ============================ Task rows ============================ */

.task-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 14px 16px;
    margin-bottom: 10px;
    background: var(--grad-card);
    transition: border-color var(--transition), box-shadow var(--transition);
    box-shadow: var(--shadow-xs);
}
.task-row:hover {
    border-color: rgba(232, 200, 114, 0.28);
    box-shadow: var(--shadow-sm);
}
.task-row > div:first-child {
    min-width: 0;
}
.task-row-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
    align-items: center;
}
.task-row-actions .btn,
.task-row-actions .inline-form .btn {
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
    min-width: 7.25rem;
    max-width: 100%;
    padding: 8px 14px;
    font-size: 0.82rem;
    line-height: 1.25;
    text-align: center;
    justify-content: center;
}
[dir="rtl"] .task-row-actions .btn,
[dir="rtl"] .task-row-actions .inline-form .btn {
    min-width: 6.5rem;
    font-size: 0.78rem;
}
[dir="rtl"] .task-row {
    grid-template-columns: auto minmax(0, 1fr);
}
[dir="rtl"] .task-row > div:first-child {
    order: 2;
}
[dir="rtl"] .task-row-actions {
    order: 1;
    justify-content: flex-start;
}

.inline-form { display: inline-flex; margin: 0; }

#pomodoroDisplay {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--brand-700);
    letter-spacing: -0.02em;
}

/* ============================ AI Tutor ============================ */

.ai-tutor-controls {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, var(--surface-2), #ffffff);
    border: 1px solid var(--border);
    border-radius: var(--radius-pill);
    padding: 5px 7px 5px 16px;
    margin: 8px 0 16px;
    box-shadow: var(--shadow-sm);
}
.ai-lang-label {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--muted);
    letter-spacing: 0.04em;
    text-transform: uppercase;
}
.ai-lang-select {
    border: none !important;
    background: var(--surface) !important;
    color: var(--text) !important;
    width: auto !important;
    padding: 6px 30px 6px 12px !important;
    font-size: 0.85rem !important;
    border-radius: var(--radius-pill) !important;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(15, 21, 48, 0.06);
    appearance: none;
    background-image: linear-gradient(45deg, transparent 50%, var(--brand-500) 50%),
                      linear-gradient(135deg, var(--brand-500) 50%, transparent 50%) !important;
    background-position: calc(100% - 14px) 50%, calc(100% - 9px) 50% !important;
    background-size: 5px 5px, 5px 5px !important;
    background-repeat: no-repeat !important;
}
.ai-lang-select:focus {
    box-shadow: 0 0 0 3px rgba(59, 99, 255, 0.18), 0 2px 6px rgba(15, 21, 48, 0.08) !important;
    outline: none !important;
}

.ai-tutor-box textarea {
    margin-bottom: 10px;
    font-family: 'Inter', monospace;
    font-size: 0.95rem;
    background: var(--surface-2);
}

.small-muted {
    color: var(--muted);
    font-size: 0.86rem;
    margin-top: 8px;
    font-style: normal;
    letter-spacing: 0.01em;
    line-height: 1.5;
}

.ai-response {
    margin-top: 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 16px 18px;
    background: linear-gradient(135deg, var(--surface-2), #ffffff);
    min-height: 60px;
    line-height: 1.65;
    color: var(--text);
    white-space: pre-wrap;
    font-size: 0.95rem;
    box-shadow: var(--shadow-xs);
}

/* ============================ Testimonials ============================ */

.testimonial-slider {
    position: relative;
    min-height: 130px;
}
.testimonial-slide {
    display: none;
    padding: 18px 20px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--grad-card);
    box-shadow: var(--shadow-xs);
}
.testimonial-slide.active {
    display: block;
    animation: fadeInSlide 0.5s ease;
}
.testimonial-slide p { font-size: 0.96rem; color: var(--text-soft); }
.testimonial-slide h4 { margin: 10px 0 0; color: var(--brand-600); font-weight: 700; font-size: 0.9rem; }

.slider-dots { margin-top: 12px; display: flex; gap: 8px; }
.dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    border: none;
    background: var(--brand-100);
    cursor: pointer;
    transition: background-color var(--transition), transform var(--transition);
}
.dot:hover { background: var(--brand-300); transform: scale(1.15); }
.dot.active { background: var(--brand-500); transform: scale(1.2); }

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

/* ============================ Footer ============================ */

.footer,
.site-footer {
    background: linear-gradient(180deg, rgba(10, 14, 32, 0.98), #080c22);
    color: #c8d4f5;
    text-align: center;
    padding: 36px 0 40px;
    margin-top: 32px;
    border-top: 1px solid rgba(232, 200, 114, 0.12);
    font-size: 0.88rem;
    box-shadow: 0 -12px 40px rgba(0, 0, 0, 0.2);
}
.footer p,
.site-footer p { color: #b4c0e8; margin: 0; }

/* ============================ Dark mode ============================ */

body.dark {
    --bg:        #06091a;
    --bg-soft:   #0d1230;
    --surface:   #111738;
    --surface-2: #161e44;
    --surface-3: #1a2350;
    --text:      #eef2ff;
    --text-soft: #b6c0e3;
    --muted:     #98a3c9;
    --border:    #25325d;
    --border-soft: #1c2649;

    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.4);
    --shadow-sm: 0 4px 14px rgba(0, 0, 0, 0.35);
    --shadow-md: 0 12px 28px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 24px 48px rgba(0, 0, 0, 0.6);

    --grad-soft: linear-gradient(180deg, #161d44 0%, #11163a 100%);
    --grad-card: linear-gradient(180deg, #141b40 0%, #0f1535 100%);
    --grad-bg:   radial-gradient(900px 500px at 90% -100px, #0e1741 0%, transparent 60%),
                 radial-gradient(800px 600px at -10% 10%, #1a1340 0%, transparent 55%);

    background: var(--grad-bg), var(--bg);
    background-attachment: fixed;
}
body.dark .card,
body.dark .feature-box,
body.dark .step-item,
body.dark .task-row,
body.dark .stack-grid div,
body.dark .testimonial-slide {
    background: var(--grad-card);
    border-color: var(--border);
}
body.dark .ai-response,
body.dark .ai-tutor-controls {
    background: linear-gradient(135deg, var(--surface-2), var(--surface));
}
body.dark .ai-response { color: var(--text); border-color: var(--border); }
body.dark .ai-response[data-placeholder]:empty::before { color: var(--muted); }
body.dark input,
body.dark select,
body.dark textarea {
    background: var(--surface-2);
    color: var(--text);
    border-color: var(--border);
}
body.dark input::placeholder,
body.dark textarea::placeholder { color: var(--muted); }
body.dark input:focus,
body.dark select:focus,
body.dark textarea:focus {
    border-color: var(--brand-400);
    background: var(--surface-3);
    box-shadow: 0 0 0 4px rgba(59, 99, 255, 0.22);
}
body.dark th { background: linear-gradient(180deg, var(--surface-3), var(--surface-2)); color: var(--text); }
body.dark tr:hover td { background: rgba(123, 155, 255, 0.06); }
body.dark .table-wrap { background: var(--surface); }
body.dark .status.good { background: rgba(22, 163, 102, 0.18); color: #5eecae; border-color: rgba(22, 163, 102, 0.4); }
body.dark .status.warn { background: rgba(217, 145, 0, 0.18); color: #ffd166; border-color: rgba(217, 145, 0, 0.4); }
body.dark .tags span {
    background: linear-gradient(135deg, rgba(59, 99, 255, 0.18), rgba(59, 99, 255, 0.08));
    color: var(--brand-200);
    border-color: var(--border);
}
body.dark .tags span:hover {
    background: linear-gradient(135deg, rgba(59, 99, 255, 0.28), rgba(59, 99, 255, 0.14));
    border-color: var(--brand-400);
}
body.dark .timeline article:hover {
    background: linear-gradient(90deg, rgba(123, 155, 255, 0.12), transparent 80%);
}
body.dark .resource-open {
    background: var(--surface-2);
    color: var(--brand-200);
    border-color: var(--border);
}
body.dark .resource-open:hover {
    background: rgba(59, 99, 255, 0.18);
    border-color: var(--brand-400);
}
body.dark .btn-ghost {
    background: var(--surface-2);
    color: var(--brand-200);
    border-color: var(--border);
}
body.dark .btn-ghost:hover {
    background: var(--surface-3);
    border-color: var(--brand-400);
}
body.dark .btn-primary {
    background: var(--grad-brand);
    color: #1a1408;
}
body.dark .alert.success {
    background: linear-gradient(135deg, #0d3d28, #0a3320);
    color: #b6f0d2;
    border-color: #1d6f4d;
}
body.dark .alert.error {
    background: linear-gradient(135deg, #3d0d18, #320a14);
    color: #f5b9c5;
    border-color: #6b1c2c;
}
body.dark .alert.offline-banner {
    background: linear-gradient(135deg, rgba(90, 48, 8, 0.55), rgba(55, 32, 6, 0.72));
    color: #ffe8c8;
    border-color: rgba(255, 176, 102, 0.45);
}
body.dark .footer { background: #04061a; color: #93a3d2; }
body.dark .topbar { background: rgba(5, 9, 26, 0.85); }
/* Do not set generic link color on .nav-cta / .btn — they beat .nav-cta--soft in cascade
   and caused illegible light-gold labels on gold pills (Progress, context strip CTAs). */
body.dark a:not(.btn):not(.nav-cta) { color: var(--brand-300); }
body.dark a:hover:not(.btn):not(.nav-cta) { color: var(--brand-200); }
/* Active gold pill in student strip (Dashboard, etc.): class is .nav-link.active, not .nav-cta —
   generic `body.dark a:not(.nav-cta)` was winning and forced light gold text on gold background. */
body.dark .nav a.nav-link.active,
body.dark .nav .nav-link.active {
    color: #141109;
    font-weight: 700;
}
body.dark .nav a.nav-link.active:hover,
body.dark .nav .nav-link.active:hover {
    color: #0d0b06;
}
body.dark .nav a.nav-link.active:focus-visible,
body.dark .nav .nav-link.active:focus-visible {
    outline: 2px solid rgba(13, 11, 6, 0.85);
    outline-offset: 2px;
}
body.dark .faq-item { background: var(--grad-card); }
body.dark .faq-q { background: transparent; color: var(--text); }
body.dark .faq-q:hover { background: inherit; }
body.dark blockquote { background: var(--surface-2); color: #cdd6f5; border-color: var(--brand-400); }

/* ============================ Admin Panel ============================ */

.admin-panel-body {
    background:
        radial-gradient(900px 480px at 95% -120px, rgba(232, 200, 114, 0.14), transparent 62%),
        radial-gradient(760px 420px at -10% 120px, rgba(90, 130, 255, 0.1), transparent 58%),
        var(--bg);
}

.admin-topbar {
    position: sticky;
    top: 0;
    z-index: 80;
    background: rgba(5, 9, 26, 0.94);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 12px 30px rgba(5, 9, 26, 0.22);
    backdrop-filter: blur(18px) saturate(160%);
    -webkit-backdrop-filter: blur(18px) saturate(160%);
}

.admin-topbar-inner {
    width: min(1400px, calc(100% - 40px));
    min-height: 72px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.admin-topbar-brand {
    display: inline-flex;
    align-items: center;
    gap: 0;
    color: #fff;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 1.05rem;
    font-weight: 800;
    text-decoration: none;
    white-space: nowrap;
    flex: 0 0 auto;
    min-width: 0;
}

.admin-topbar-brand:hover { color: #fff; }

.admin-topbar-mark:not(.admin-topbar-mark--horizontal) {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.admin-topbar-mark--horizontal {
    display: inline-flex;
    align-items: center;
    height: var(--brand-logo-height);
    width: auto;
    max-width: min(320px, 42vw);
}

.admin-topbar-brand small {
    margin-left: 6px;
    padding: 3px 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.14);
    color: #c7d4ff;
    font-size: 0.68rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.admin-topbar-nav {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    flex-wrap: nowrap;
    flex: 0 1 auto;
    min-width: 0;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: rgba(232, 200, 114, 0.35) transparent;
    padding: 4px 0;
}

.admin-topbar-nav a,
.admin-topbar-nav button {
    text-shadow: none;
    -webkit-text-fill-color: currentColor;
}
.admin-topbar-nav::-webkit-scrollbar {
    height: 3px;
}
.admin-topbar-nav::-webkit-scrollbar-thumb {
    background: rgba(232, 200, 114, 0.3);
    border-radius: 999px;
}

.admin-topbar-nav a {
    color: #d7e0ff;
    padding: 8px 13px;
    border-radius: 999px;
    font-size: 0.86rem;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.18s, color 0.18s, transform 0.18s;
    flex: 0 0 auto;
    white-space: nowrap;
}

.admin-topbar-nav a:hover,
.admin-topbar-nav a.active {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.admin-topbar-nav .admin-topbar-logout {
    margin-left: 8px;
    background: #fff;
    color: var(--brand-700);
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.2);
}

.admin-topbar-nav .admin-topbar-logout:hover {
    background: linear-gradient(135deg, var(--brand-500), var(--brand-700));
    color: #fff;
    transform: translateY(-1px);
}

.admin-shell {
    display: grid;
    grid-template-columns: 260px 1fr;
    max-width: 1400px;
    margin: 0 auto;
    padding: 24px;
    gap: 24px;
    min-height: calc(100vh - 80px);
}

.admin-sidebar {
    background: var(--surface);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    padding: 22px 18px;
    box-shadow: var(--shadow-sm);
    height: fit-content;
    position: sticky;
    top: 24px;
    display: flex;
    flex-direction: column;
    gap: 18px;
}
.admin-sidebar-head h3 { margin: 12px 0 4px; font-size: 1.05rem; }
.admin-sidebar-head p  { margin: 0; font-size: 0.82rem; word-break: break-all; }
.admin-sidebar-head .admin-badge {
    display: inline-flex; align-items: center; gap: 6px;
    background: linear-gradient(135deg, rgba(59,99,255,0.1), rgba(0,178,255,0.08));
    border: 1px solid rgba(59,99,255,0.22);
    color: var(--brand-700);
    font-size: 0.68rem; font-weight: 700; letter-spacing: 0.1em;
    text-transform: uppercase; padding: 5px 10px; border-radius: 999px;
}

.admin-nav { display: flex; flex-direction: column; gap: 2px; }
.admin-nav a {
    display: block;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    color: var(--text-soft);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.93rem;
    transition: background 0.15s, color 0.15s, transform 0.1s;
}
.admin-nav a:hover { background: var(--surface-2); color: var(--brand-700); }
.admin-nav a.active {
    background: linear-gradient(135deg, var(--brand-500), var(--brand-700));
    color: #fff;
    box-shadow: 0 6px 14px rgba(59,99,255,0.28);
}

.admin-sidebar-foot { display: flex; flex-direction: column; gap: 8px; padding-top: 12px; border-top: 1px solid var(--border-soft); }
.btn-block { width: 100%; }

.admin-main { min-width: 0; }
.admin-title { font-family: 'Plus Jakarta Sans', 'Inter', sans-serif; font-size: 1.9rem; margin: 0 0 4px; }
.admin-sub { color: var(--muted); margin: 0 0 22px; font-size: 0.95rem; }

.admin-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 14px;
    margin-bottom: 24px;
}
.stat-card {
    padding: 20px;
    border-radius: var(--radius-md);
    background: var(--surface);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-xs);
    display: flex;
    flex-direction: column;
    gap: 4px;
    position: relative;
    overflow: hidden;
}
.stat-card::before {
    content: ''; position: absolute; top: 0; left: 0; right: 0; height: 4px;
    background: var(--brand-500);
}
.stat-card.stat-green::before  { background: var(--success-500); }
.stat-card.stat-purple::before { background: #8b5cf6; }
.stat-card.stat-orange::before { background: #f59e0b; }
.stat-card.stat-cyan::before   { background: var(--accent-500); }
.stat-card.stat-pink::before   { background: #ec4899; }

.stat-label { font-size: 0.78rem; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; }
.stat-value { font-family: 'Plus Jakarta Sans', sans-serif; font-size: 2.1rem; font-weight: 800; color: var(--text); line-height: 1; }
.stat-meta  { font-size: 0.78rem; color: var(--muted); margin-top: 2px; }

.admin-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.admin-grid-2 > .card { margin: 0; }
@media (max-width: 920px) { .admin-grid-2 { grid-template-columns: 1fr; } }

.admin-search-bar { display: flex; gap: 10px; margin-bottom: 16px; }
.admin-search-bar input { flex: 1; max-width: 380px; }

.admin-table { width: 100%; border-collapse: collapse; }
.admin-table th { background: var(--surface-3); color: var(--text); font-size: 0.78rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; padding: 12px 10px; text-align: start; border-bottom: 1px solid var(--border); }
.admin-table td { padding: 11px 10px; border-bottom: 1px solid var(--border-soft); font-size: 0.9rem; vertical-align: middle; }
.admin-table tbody tr:hover { background: var(--surface-2); }
.admin-table tbody tr.row-blocked { background: rgba(220,53,69,0.04); }

.admin-actions { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.admin-actions form.inline-form { display: inline-flex; gap: 4px; align-items: center; margin: 0; }
.btn-mini {
    padding: 6px 12px;
    font-size: 0.78rem;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text);
    cursor: pointer;
    font-weight: 600;
    transition: all 0.15s;
}
.btn-mini:hover { background: var(--brand-500); color: #fff; border-color: var(--brand-500); }
.btn-mini.btn-warn   { background: #fff4e0; color: #92590a; border-color: #f8d8a3; }
.btn-mini.btn-warn:hover { background: var(--warn-500); color: #fff; border-color: var(--warn-500); }
.btn-mini.btn-danger { background: #fdebef; color: #9c1c2c; border-color: #f5c6cd; }
.btn-mini.btn-danger:hover { background: var(--danger-500); color: #fff; border-color: var(--danger-500); }
.input-mini {
    padding: 6px 10px !important; font-size: 0.78rem !important;
    border: 1px solid var(--border) !important;
    border-radius: 8px !important;
    background: var(--surface-2) !important;
    width: auto !important;
    margin: 0 !important;
    min-width: 90px;
}

.pill {
    display: inline-block; padding: 3px 9px;
    border-radius: 999px; font-size: 0.7rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.04em;
}
.pill-admin   { background: rgba(139,92,246,0.12); color: #6d28d9; }
.pill-student { background: rgba(59,99,255,0.12); color: var(--brand-700); }
.pill-success { background: rgba(22,163,102,0.14); color: #0d6c45; }
.pill-danger  { background: rgba(220,53,69,0.14); color: #9c1c2c; }
.pill-self    { background: var(--surface-3); color: var(--muted); margin-left: 4px; font-size: 0.65rem; }
.pill-easy    { background: rgba(22,163,102,0.14); color: #0d6c45; }
.pill-medium  { background: rgba(245,158,11,0.16); color: #92590a; }
.pill-hard    { background: rgba(220,53,69,0.14); color: #9c1c2c; }
.pill-video   { background: rgba(220,53,69,0.12); color: #9c1c2c; }
.pill-article { background: rgba(59,99,255,0.12); color: var(--brand-700); }
.pill-pdf     { background: rgba(245,158,11,0.16); color: #92590a; }
.pill-course  { background: rgba(139,92,246,0.12); color: #6d28d9; }
.pill-book    { background: rgba(0,178,255,0.14); color: #0080c0; }
.pill-other   { background: var(--surface-3); color: var(--muted); }
.pill-pending { background: var(--surface-3); color: var(--muted); }
.pill-parsed  { background: rgba(22,163,102,0.14); color: #0d6c45; }
.pill-failed  { background: rgba(220,53,69,0.14); color: #9c1c2c; }

.admin-chip-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.admin-chip-card {
    display: flex; align-items: center; gap: 10px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 10px 14px;
    transition: transform 0.15s, box-shadow 0.15s;
}
.admin-chip-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.admin-chip-card > div { display: flex; flex-direction: column; }
.admin-chip-card .small-muted { font-size: 0.75rem; }
.admin-chip-icon {
    width: 38px; height: 38px;
    background: linear-gradient(135deg, var(--brand-500), var(--brand-700));
    color: #fff; border-radius: 10px;
    display: inline-flex; align-items: center; justify-content: center;
    font-weight: 800; font-size: 0.85rem;
    box-shadow: 0 4px 8px rgba(59,99,255,0.25);
}
.btn-icon {
    background: transparent; border: none;
    color: var(--muted); font-size: 1.4rem; line-height: 1;
    cursor: pointer; padding: 4px 8px;
    border-radius: 6px; transition: background 0.15s, color 0.15s;
}
.btn-icon:hover { background: rgba(220,53,69,0.12); color: var(--danger-500); }

.admin-checkbox-row { display: flex; align-items: center; gap: 8px; margin: 12px 0; }
.admin-checkbox-row input[type=checkbox] { width: auto !important; margin: 0; }

.admin-activity-list { list-style: none; padding: 0; margin: 12px 0 0; }
.admin-activity-list li { padding: 8px 0; border-bottom: 1px dashed var(--border-soft); font-size: 0.9rem; }
.admin-activity-list li:last-child { border-bottom: none; }

.admin-leaderboard { list-style: none; padding: 0; margin: 0; counter-reset: rank; }
.admin-leaderboard li {
    display: flex; align-items: center; gap: 14px;
    padding: 12px 0; border-bottom: 1px dashed var(--border-soft);
}
.admin-leaderboard li:last-child { border-bottom: none; }
.admin-leaderboard .rank {
    width: 32px; height: 32px; border-radius: 50%;
    background: linear-gradient(135deg, var(--brand-500), var(--brand-700));
    color: #fff; display: inline-flex; align-items: center; justify-content: center;
    font-weight: 800; font-size: 0.88rem;
    flex-shrink: 0;
}
.admin-leaderboard div { display: flex; flex-direction: column; }
.admin-leaderboard .small-muted { font-size: 0.78rem; }

@media (max-width: 980px) {
    .admin-topbar-inner {
        width: min(100% - 28px, 1400px);
        min-height: auto;
        padding: 12px 0;
        align-items: flex-start;
        flex-direction: column;
        gap: 10px;
    }
    .admin-topbar-end {
        width: 100%;
        flex-wrap: wrap;
        justify-content: flex-start;
        margin-left: 0;
    }
    .admin-topbar-nav {
        width: 100%;
        justify-content: flex-start;
    }
    .admin-topbar-nav .admin-topbar-logout {
        margin-left: 0;
    }
    .admin-shell { grid-template-columns: 1fr; padding: 16px; }
    .admin-sidebar { position: static; }
}

/* ============================ Syllabus / Today Task ============================ */

.today-task-card {
    background: linear-gradient(135deg, rgba(59,99,255,0.08), rgba(0,178,255,0.05));
    border: 1px solid rgba(59,99,255,0.18);
    position: relative;
}
.today-task-card.today-task-empty {
    background: linear-gradient(135deg, rgba(139,92,246,0.06), rgba(0,178,255,0.04));
    border-color: rgba(139,92,246,0.18);
}
.today-task-badge {
    display: inline-block;
    background: linear-gradient(135deg, var(--brand-500), var(--brand-700));
    color: #fff;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding: 4px 12px;
    border-radius: 999px;
    margin-bottom: 6px;
    box-shadow: 0 6px 14px rgba(59,99,255,0.25);
}
.syllabus-progress-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    flex-wrap: wrap;
}

.syllabus-links-panel {
    margin-top: 8px;
    margin-bottom: 4px;
    padding: 14px 16px;
    border-radius: var(--radius-md);
    border: 1px solid rgba(110, 168, 255, 0.24);
    background: linear-gradient(145deg, rgba(14, 22, 48, 0.62), rgba(8, 12, 24, 0.42));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}
.syllabus-links-panel textarea {
    min-height: 100px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
    font-size: 0.86rem;
}

/* Replace / reset syllabus: same radius/size as other .card; idle pulse + hover lift */
@keyframes syllabusResetPulse {
    0%, 100% {
        box-shadow: var(--shadow-sm);
        border-color: var(--border);
    }
    50% {
        box-shadow: var(--shadow-sm), 0 0 28px rgba(248, 113, 113, 0.14);
        border-color: rgba(248, 113, 113, 0.32);
    }
}
.card.card--syllabus-reset {
    border-radius: var(--radius-lg);
    min-width: 0;
    transition:
        transform 0.28s cubic-bezier(0.22, 1, 0.36, 1),
        box-shadow 0.28s cubic-bezier(0.22, 1, 0.36, 1),
        border-color 0.28s ease;
}
@media (prefers-reduced-motion: no-preference) {
    .card.card--syllabus-reset:not(:hover):not(:focus-within) {
        animation: syllabusResetPulse 4.5s ease-in-out infinite;
    }
}
.card.card--syllabus-reset:hover,
.card.card--syllabus-reset:focus-within {
    animation: none;
    transform: translateY(-4px) scale(1.008);
    box-shadow: var(--shadow-md), 0 0 36px rgba(248, 113, 113, 0.16);
    border-color: rgba(248, 113, 113, 0.42);
}
.card.card--syllabus-reset:active {
    transform: translateY(-1px) scale(1.002);
    transition-duration: 0.12s;
}
.syllabus-reset-form {
    margin-top: 14px;
    min-width: 0;
}
.syllabus-reset-confirm {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 12px;
    align-items: start;
    margin-bottom: 14px;
    font-size: 0.95rem;
    line-height: 1.45;
    cursor: pointer;
    min-width: 0;
    transition: opacity 0.2s ease;
}
.syllabus-reset-confirm:hover span {
    opacity: 0.95;
}
.syllabus-reset-confirm span {
    min-width: 0;
    overflow-wrap: break-word;
    word-break: normal;
}
.syllabus-reset-confirm input {
    margin-top: 4px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.syllabus-reset-confirm:hover input,
.syllabus-reset-confirm:focus-within input {
    transform: scale(1.06);
    box-shadow: 0 0 0 3px rgba(248, 113, 113, 0.2);
}
.card.card--syllabus-reset .syllabus-reset-submit {
    transition:
        transform 0.22s cubic-bezier(0.22, 1, 0.36, 1),
        box-shadow 0.22s ease,
        filter 0.22s ease;
}
.card.card--syllabus-reset .syllabus-reset-submit:hover {
    transform: translateY(-2px);
    filter: brightness(1.05);
    box-shadow: 0 10px 24px rgba(220, 53, 69, 0.28);
}
.card.card--syllabus-reset .syllabus-reset-submit:active {
    transform: translateY(0);
}
@media (prefers-reduced-motion: reduce) {
    .card.card--syllabus-reset {
        animation: none !important;
    }
    .card.card--syllabus-reset:hover,
    .card.card--syllabus-reset:focus-within,
    .card.card--syllabus-reset:active {
        transform: none;
    }
    .syllabus-reset-confirm:hover input,
    .syllabus-reset-confirm:focus-within input {
        transform: none;
        box-shadow: none;
    }
    .card.card--syllabus-reset .syllabus-reset-submit:hover {
        transform: none;
    }
}

.progress-ring {
    width: 110px; height: 110px;
    border-radius: 50%;
    background: conic-gradient(var(--brand-500) 0% var(--p,0%), var(--surface-3) 0%);
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    flex-shrink: 0;
    box-shadow: var(--shadow-sm);
}
.progress-ring-value { font-family: 'Plus Jakarta Sans', sans-serif; font-size: 1.5rem; font-weight: 800; color: var(--brand-700); }

.mcq-block {
    margin: 18px 0 12px;
    padding: 16px 18px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
}
.mcq-q { margin: 0 0 12px; font-size: 1rem; }
.mcq-opt {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 12px;
    background: var(--surface);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-sm);
    margin-bottom: 6px;
    cursor: pointer;
    font-size: 0.92rem;
    transition: border-color 0.15s, background 0.15s;
}
.mcq-opt:hover { border-color: var(--brand-500); background: var(--surface-2); }
.mcq-opt input[type=radio] {
    margin-top: 4px;
    accent-color: var(--brand-500);
    width: auto !important;
}

/* ============================ Admin Login (Pro v2) ============================ */

.admin-login-body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(1100px 700px at 100% -10%, rgba(59, 99, 255, 0.22), transparent 55%),
        radial-gradient(900px 600px at -10% 110%, rgba(0, 178, 255, 0.20), transparent 55%),
        linear-gradient(135deg, #060a20 0%, #0c1340 50%, #15205c 100%);
    color: #fff;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    overflow-x: hidden;
    position: relative;
    isolation: isolate;
}

/* ----- Animated background orbs + grid ----- */
.admin-bg {
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    overflow: hidden;
}
.admin-bg-grid {
    position: absolute; inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
    background-size: 56px 56px;
    mask-image: radial-gradient(ellipse 70% 80% at 50% 50%, #000 30%, transparent 90%);
    -webkit-mask-image: radial-gradient(ellipse 70% 80% at 50% 50%, #000 30%, transparent 90%);
}
.admin-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(70px);
    opacity: 0.55;
    will-change: transform;
}
.admin-orb-1 {
    width: 460px; height: 460px;
    top: -120px; left: -120px;
    background: radial-gradient(circle, #3b63ff 0%, transparent 70%);
    animation: adminOrbFloat 14s ease-in-out infinite;
}
.admin-orb-2 {
    width: 520px; height: 520px;
    bottom: -150px; right: -100px;
    background: radial-gradient(circle, #00b2ff 0%, transparent 70%);
    animation: adminOrbFloat 18s ease-in-out infinite reverse;
}
.admin-orb-3 {
    width: 380px; height: 380px;
    top: 40%; left: 38%;
    background: radial-gradient(circle, #7b3bff 0%, transparent 70%);
    opacity: 0.35;
    animation: adminOrbFloat 22s ease-in-out infinite;
}
@keyframes adminOrbFloat {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50%      { transform: translate(40px, -30px) scale(1.08); }
}

/* ----- Layout ----- */
.admin-login-shell {
    display: grid;
    grid-template-columns: 1.05fr 1fr;
    min-height: 100vh;
    max-width: 1320px;
    margin: 0 auto;
    padding: 32px;
    gap: 0;
    align-items: stretch;
}

/* ----- LEFT: Brand / Trust panel ----- */
.admin-login-aside {
    position: relative;
    padding: 48px 56px;
    color: #e8edff;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    border-radius: 36px 0 0 36px;
    background:
        linear-gradient(160deg, rgba(255,255,255,0.06) 0%, rgba(255,255,255,0.01) 100%);
    border: 1px solid rgba(255,255,255,0.08);
    border-right: none;
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

.admin-aside-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.admin-aside-brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
}
.admin-aside-brand-mark {
    width: 44px; height: 44px;
    border-radius: 13px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    background: linear-gradient(135deg, #3b63ff, #00b2ff);
    box-shadow: 0 12px 28px rgba(59, 99, 255, 0.5), inset 0 1px 0 rgba(255,255,255,0.4);
}
.admin-aside-brand-mark svg { width: 22px; height: 22px; }
.admin-aside-brand strong {
    display: block;
    font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
    font-size: 1.1rem;
    font-weight: 800;
    color: #fff;
    line-height: 1.05;
}
.admin-aside-brand small {
    display: block;
    color: rgba(200, 215, 255, 0.7);
    font-size: 0.74rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.admin-aside-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    color: #c4d1ff;
    padding: 7px 14px;
    border: 1px solid rgba(52, 210, 255, 0.32);
    border-radius: 999px;
    background: rgba(52, 210, 255, 0.08);
    text-transform: uppercase;
}
.admin-aside-eyebrow-dot {
    width: 7px; height: 7px;
    border-radius: 50%;
    background: #34d2ff;
    box-shadow: 0 0 8px #34d2ff;
    animation: adminPulse 1.8s ease-in-out infinite;
}

.admin-aside-content { margin: 36px 0; }

.admin-login-aside h1 {
    font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
    font-size: 2.6rem;
    line-height: 1.08;
    margin: 0 0 14px;
    font-weight: 800;
    background: linear-gradient(120deg, #ffffff 0%, #c8d4ff 55%, #7b9bff 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.02em;
}
.admin-login-aside p {
    color: rgba(220, 228, 255, 0.72);
    font-size: 0.98rem;
    line-height: 1.65;
    max-width: 440px;
    margin: 0 0 28px;
}

.admin-aside-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 26px;
    padding: 16px 18px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 14px;
}
.admin-aside-stats > div {
    display: flex;
    flex-direction: column;
    gap: 2px;
    border-right: 1px solid rgba(255,255,255,0.08);
    padding-right: 10px;
}
.admin-aside-stats > div:last-child { border-right: none; padding-right: 0; }
.admin-aside-stats strong {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 1.15rem;
    font-weight: 800;
    background: linear-gradient(120deg, #fff, #b6c8ff);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.admin-aside-stats span {
    font-size: 0.72rem;
    color: rgba(190, 200, 230, 0.65);
    font-weight: 500;
    letter-spacing: 0.02em;
}

.admin-aside-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 10px;
}
.admin-aside-list li {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 14px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 11px;
    color: rgba(232, 238, 255, 0.92);
    font-size: 0.9rem;
    font-weight: 500;
    transition: background 0.2s, border-color 0.2s, transform 0.2s;
}
.admin-aside-list li:hover {
    background: rgba(255,255,255,0.07);
    border-color: rgba(123, 155, 255, 0.3);
    transform: translateX(3px);
}
.admin-aside-tick {
    flex-shrink: 0;
    width: 26px;
    height: 26px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #16a366, #0d8a52);
    border-radius: 8px;
    color: #fff;
    box-shadow: 0 4px 10px rgba(22, 163, 102, 0.4);
}
.admin-aside-tick svg { width: 13px; height: 13px; }

.admin-aside-foot {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: rgba(180, 195, 230, 0.7);
    font-size: 0.78rem;
    margin: 0;
    letter-spacing: 0.02em;
}
.admin-aside-shield {
    width: 28px; height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: rgba(52, 210, 255, 0.12);
    color: #34d2ff;
    border: 1px solid rgba(52, 210, 255, 0.28);
}
.admin-aside-shield svg { width: 14px; height: 14px; }

/* ----- RIGHT: Login card ----- */
.admin-login-main {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    background:
        linear-gradient(180deg, rgba(11, 16, 48, 0.6) 0%, rgba(20, 28, 78, 0.55) 100%);
    border-radius: 0 36px 36px 0;
    border: 1px solid rgba(255,255,255,0.08);
    border-left: none;
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

.admin-login-card {
    position: relative;
    width: 100%;
    max-width: 460px;
    margin: 40px;
    padding: 42px 38px 34px;
    color: #e8edff;
    background:
        linear-gradient(180deg, rgba(20, 30, 78, 0.85) 0%, rgba(14, 22, 60, 0.9) 100%);
    border-radius: 32px;
    box-shadow:
        0 36px 90px rgba(0, 0, 0, 0.55),
        inset 0 1px 0 rgba(255,255,255,0.08),
        0 0 0 1px rgba(123, 155, 255, 0.18);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    overflow: hidden;
    z-index: 1;
}
.admin-card-glow {
    position: absolute;
    inset: -2px;
    border-radius: 34px;
    padding: 2px;
    background: linear-gradient(135deg, rgba(59, 99, 255, 0.6), rgba(0, 178, 255, 0.4) 40%, transparent 70%);
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
            mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
            mask-composite: exclude;
    pointer-events: none;
    z-index: -1;
    animation: adminGlowRotate 8s linear infinite;
}
@keyframes adminGlowRotate {
    0%   { background: linear-gradient(0deg,   rgba(59, 99, 255, 0.5), rgba(0, 178, 255, 0.3) 40%, transparent 70%); }
    50%  { background: linear-gradient(180deg, rgba(59, 99, 255, 0.5), rgba(123, 59, 255, 0.3) 40%, transparent 70%); }
    100% { background: linear-gradient(360deg, rgba(59, 99, 255, 0.5), rgba(0, 178, 255, 0.3) 40%, transparent 70%); }
}

.admin-login-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 20px;
    padding-bottom: 18px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.admin-login-logo {
    display: inline-flex;
    align-items: center;
    gap: 12px;
}

.admin-login-logo-mark {
    width: 46px;
    height: 46px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    background: linear-gradient(135deg, #3b63ff 0%, #00b2ff 100%);
    box-shadow:
        0 12px 28px rgba(59, 99, 255, 0.45),
        inset 0 1px 0 rgba(255,255,255,0.4);
    position: relative;
    overflow: hidden;
}
.admin-login-logo-mark::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(160deg, rgba(255,255,255,0.35), transparent 55%);
    pointer-events: none;
}
.admin-login-logo-mark svg {
    width: 22px; height: 22px;
    position: relative;
    z-index: 1;
}

.admin-login-logo strong {
    display: block;
    font-family: 'Plus Jakarta Sans', sans-serif;
    color: #fff;
    font-size: 1.05rem;
    font-weight: 800;
    line-height: 1.05;
}
.admin-login-logo small {
    display: block;
    color: rgba(200, 215, 255, 0.7);
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-top: 2px;
}

.admin-badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: linear-gradient(135deg, rgba(34, 220, 140, 0.18), rgba(22, 163, 102, 0.12));
    border: 1px solid rgba(34, 220, 140, 0.4);
    color: #5eecae;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 6px 12px;
    border-radius: 999px;
    margin-bottom: 0;
}
.admin-badge-dot {
    width: 7px; height: 7px;
    border-radius: 50%;
    background: #22dc8c;
    box-shadow: 0 0 0 3px rgba(34, 220, 140, 0.22), 0 0 8px #22dc8c;
    animation: adminPulse 1.8s ease-in-out infinite;
}
@keyframes adminPulse {
    0%, 100% { box-shadow: 0 0 0 3px rgba(34, 220, 140, 0.22), 0 0 8px #22dc8c; }
    50%      { box-shadow: 0 0 0 6px rgba(34, 220, 140, 0.08), 0 0 12px #22dc8c; }
}

.admin-login-card h2 {
    font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
    font-size: 1.7rem;
    font-weight: 800;
    margin: 8px 0 6px;
    color: #fff;
    letter-spacing: -0.01em;
    background: linear-gradient(120deg, #ffffff 0%, #c8d4ff 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.admin-login-sub {
    color: rgba(200, 215, 255, 0.7);
    font-size: 0.92rem;
    margin: 0 0 22px;
    line-height: 1.55;
}

.admin-alert {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    background: linear-gradient(135deg, rgba(229, 64, 95, 0.18), rgba(180, 35, 60, 0.12));
    color: #ffb6c1;
    border: 1px solid rgba(229, 64, 95, 0.4);
    padding: 12px 14px;
    border-radius: 12px;
    font-size: 0.88rem;
    line-height: 1.4;
    margin: 0 0 16px;
}
.admin-alert svg {
    width: 18px; height: 18px;
    flex-shrink: 0;
    margin-top: 1px;
    color: #ff8095;
}

.admin-login-form { margin: 0; }

.admin-login-card label {
    display: block;
    font-size: 0.74rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(180, 200, 240, 0.85);
    margin: 14px 0 6px;
}

.admin-input-wrap {
    position: relative;
    display: block;
}
.admin-input-icon {
    position: absolute;
    top: 50%;
    left: 14px;
    transform: translateY(-50%);
    color: rgba(160, 180, 220, 0.55);
    pointer-events: none;
    transition: color 0.2s;
}
.admin-input-icon svg { width: 18px; height: 18px; }

.admin-login-card input[type=email],
.admin-login-card input[type=password],
.admin-login-card input[type=text] {
    width: 100%;
    padding: 14px 16px 14px 44px;
    font-size: 0.96rem;
    background: rgba(8, 14, 40, 0.55);
    border: 1.5px solid rgba(123, 155, 255, 0.18);
    border-radius: 12px;
    color: #f0f4ff;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
    box-sizing: border-box;
    font-family: inherit;
}
.admin-login-card input::placeholder { color: rgba(160, 180, 220, 0.45); }
.admin-login-card input:focus {
    outline: none;
    border-color: rgba(123, 155, 255, 0.6);
    background: rgba(8, 14, 40, 0.75);
    box-shadow: 0 0 0 4px rgba(59, 99, 255, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}
.admin-input-wrap:focus-within .admin-input-icon { color: #7b9bff; }

.admin-pass-wrap input { padding-right: 50px; }
.admin-pass-toggle {
    position: absolute;
    top: 50%;
    right: 8px;
    transform: translateY(-50%);
    width: 38px; height: 38px;
    background: transparent;
    border: 1px solid transparent;
    color: rgba(160, 180, 220, 0.6);
    padding: 0;
    border-radius: 9px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.admin-pass-toggle:hover {
    background: rgba(123, 155, 255, 0.12);
    color: #c8d4ff;
    border-color: rgba(123, 155, 255, 0.28);
}
.admin-pass-toggle svg { width: 18px; height: 18px; }

.admin-login-meta {
    margin: 14px 0 4px;
    display: flex;
    justify-content: flex-start;
}
.admin-login-tip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: rgba(180, 200, 240, 0.65);
    font-size: 0.78rem;
    font-weight: 500;
}
.admin-login-tip svg { width: 14px; height: 14px; color: rgba(160, 180, 220, 0.55); }

.admin-submit {
    width: 100%;
    margin-top: 18px;
    padding: 14px 20px;
    font-size: 0.98rem;
    font-weight: 700;
    background: linear-gradient(135deg, #f4dfb0 0%, #d9b45d 100%);
    border: none;
    border-radius: 12px;
    color: #1a1408 !important;
    cursor: pointer;
    transition: transform 0.18s, box-shadow 0.25s, filter 0.2s;
    box-shadow: 0 12px 28px rgba(232, 200, 114, 0.32), inset 0 1px 0 rgba(255,255,255,0.25);
    letter-spacing: 0.01em;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    position: relative;
    overflow: hidden;
}
.admin-submit::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transform: translateX(-100%);
    transition: transform 0.6s ease;
}
.admin-submit:hover::before { transform: translateX(100%); }
.admin-submit svg {
    width: 18px; height: 18px;
    transition: transform 0.2s;
}
.admin-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 36px rgba(232, 200, 114, 0.34);
    filter: brightness(1.06);
}
.admin-submit:hover svg { transform: translateX(4px); }
.admin-submit:active { transform: translateY(0); }

.admin-login-foot {
    margin-top: 24px;
    padding-top: 18px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    text-align: center;
    font-size: 0.82rem;
    color: rgba(180, 200, 240, 0.65);
    font-weight: 600;
}
.admin-login-foot svg { width: 14px; height: 14px; color: rgba(160, 180, 220, 0.55); }

@media (max-width: 1024px) {
    .admin-login-shell {
        grid-template-columns: 1fr;
        padding: 16px;
    }
    .admin-login-aside {
        border-radius: 32px 32px 0 0;
        border-right: 1px solid rgba(255,255,255,0.08);
        border-bottom: none;
        padding: 32px 28px;
    }
    .admin-login-aside h1 { font-size: 2rem; }
    .admin-login-main {
        border-radius: 0 0 32px 32px;
        border-left: 1px solid rgba(255,255,255,0.08);
        border-top: none;
    }
    .admin-login-card { margin: 24px; padding: 32px 26px; border-radius: 26px; }
    .admin-card-glow { border-radius: 28px; }
    .admin-aside-stats { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 560px) {
    .admin-login-shell { padding: 0; }
    .admin-login-aside,
    .admin-login-main { border-radius: 0; border: none; }
    .admin-login-aside { padding: 28px 22px; }
    .admin-login-aside h1 { font-size: 1.7rem; }
    .admin-aside-list li { font-size: 0.84rem; padding: 10px 12px; }
    .admin-aside-stats { padding: 12px 14px; gap: 8px; }
    .admin-aside-stats strong { font-size: 1rem; }
    .admin-aside-stats span { font-size: 0.66rem; }
    .admin-login-card { margin: 18px; padding: 26px 22px; }
    .admin-login-head { flex-direction: column; align-items: flex-start; gap: 10px; }
}

/* ============================ Learning World Board Display ============================ */

.lw-lecture-board-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 65%;
    height: 60%;
    max-width: 720px;
    max-height: 420px;
    z-index: 10;
    pointer-events: none;
    user-select: none;
    font-size: 0.75rem;
    line-height: 1.3;
    color: #fff;
    overflow: hidden;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
    opacity: 0;
    transition: opacity 0.35s ease;
    will-change: opacity;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    word-break: break-word;
    overflow-wrap: break-word;
    font-weight: 500;
    letter-spacing: 0.5px;
}

.lw-lecture-board-text.is-visible {
    opacity: 1;
    pointer-events: auto;
}

@media (max-width: 768px) {
    .lw-lecture-board-text {
        font-size: 0.7rem;
        width: 70%;
        height: 55%;
        padding: 16px;
    }
}

@media (max-width: 480px) {
    .lw-lecture-board-text {
        font-size: 0.65rem;
        width: 75%;
        height: 50%;
        padding: 12px;
    }
}

/* ============================ Responsive ============================ */

@media (max-width: 980px) {
    .topbar-inner {
        flex-wrap: wrap;
        gap: 10px 12px;
        align-items: center;
    }
    .nav-toggle-btn {
        display: inline-flex;
    }
    .topbar-nav-shell {
        width: 100%;
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        gap: 10px;
        align-items: stretch;
    }
    .topbar-util-cluster {
        grid-row: 1;
        width: 100%;
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        justify-content: space-between;
        gap: 10px 12px;
        padding: 2px 0 10px;
        margin: 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        box-sizing: border-box;
    }
    .topbar-util-cluster .nav-lang-wrap {
        flex: 1 1 200px;
        min-width: 0;
        max-width: 100%;
        margin: 0;
        padding: 0;
        border-left: 0;
        border-bottom: 0;
    }
    .topbar-util-cluster .nav-lang-select {
        max-width: min(280px, 100%);
        flex: 1 1 auto;
    }
    .topbar-util-cluster .nav-theme-wrap {
        flex: 0 0 auto;
        margin: 0;
        padding: 0 0 0 10px;
        border-left: 1px solid rgba(255, 255, 255, 0.12);
    }
    [dir="rtl"] .topbar-util-cluster .nav-theme-wrap {
        padding: 0 10px 0 0;
        border-left: 0;
        border-right: 1px solid rgba(255, 255, 255, 0.12);
    }
    .topbar-util-cluster .nav-dropdown--a11y {
        flex: 0 0 auto;
    }
    .nav,
    .nav-student {
        grid-row: 2;
        width: 100%;
        display: none;
        flex-direction: column;
        flex-wrap: nowrap;
        gap: 4px;
        overflow: visible;
        mask-image: none;
        background: rgba(8, 14, 34, 0.95);
        border: 1px solid rgba(255, 255, 255, 0.1);
        border-radius: var(--radius-md);
        padding: 10px;
    }
    .nav a,
    .nav .nav-link {
        width: 100%;
        border-radius: var(--radius-sm);
        padding: 12px 14px;
        font-size: 0.9rem;
    }
    .nav-actions {
        grid-row: 3;
        width: 100%;
        display: none;
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
        padding: 0 10px 10px;
        margin: 0;
        border-left: 0;
        border-top: 1px solid rgba(255, 255, 255, 0.08);
    }
    .nav-actions .nav-cta,
    .nav-actions form.logout-inline button.nav-cta {
        width: 100%;
        justify-content: center;
        margin: 0;
    }
    .nav-toggle:checked ~ .topbar-nav-shell .nav,
    .nav-toggle:checked ~ .topbar-nav-shell .nav-actions {
        display: flex;
    }
}

@media (max-width: 520px) {
    .topbar-inner {
        padding-inline: max(10px, env(safe-area-inset-left, 0px)) max(10px, env(safe-area-inset-right, 0px));
        box-sizing: border-box;
    }

    .topbar-util-cluster {
        gap: 8px 10px;
    }

    .topbar-util-cluster .nav-lang-wrap {
        flex: 1 1 100%;
    }

    .page-context-inner {
        flex-direction: column;
        align-items: stretch;
        text-align: start;
    }

    .page-context-copy {
        width: 100%;
        max-width: none;
    }

    .page-context-action {
        width: 100%;
        display: flex;
        justify-content: flex-start;
    }

    .page-context-action .nav-cta {
        width: auto;
        max-width: 100%;
    }

    main.container,
    main#mainContent.container {
        max-width: 100%;
        box-sizing: border-box;
    }
}

body:has(.mobile-tabbar) {
    padding-bottom: calc(72px + env(safe-area-inset-bottom, 0px));
}

.mobile-tabbar {
    display: none;
}

@media (max-width: 980px) {
    .mobile-tabbar {
        display: grid;
        grid-template-columns: repeat(6, minmax(0, 1fr));
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 1200;
        gap: 2px;
        padding: 6px 4px calc(6px + env(safe-area-inset-bottom, 0px));
        background: rgba(8, 14, 34, 0.96);
        border-top: 1px solid rgba(255, 255, 255, 0.12);
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
    }
    .mobile-tabbar-link {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 2px;
        min-height: 48px;
        padding: 4px 2px;
        border-radius: var(--radius-sm);
        color: rgba(255, 255, 255, 0.88);
        font-size: clamp(0.625rem, 2.6vw, 0.72rem);
        font-weight: 700;
        line-height: 1.1;
        text-decoration: none;
        text-align: center;
        -webkit-tap-highlight-color: transparent;
    }
    .mobile-tabbar-icon {
        flex: 0 0 auto;
        width: 20px;
        height: 20px;
        opacity: 0.92;
    }
    .mobile-tabbar-label {
        display: block;
        max-width: 100%;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        letter-spacing: 0.01em;
    }
    .mobile-tabbar-link.active {
        color: #fff;
        background: rgba(99, 102, 241, 0.28);
    }
    .mobile-tabbar-link.active .mobile-tabbar-icon {
        opacity: 1;
    }
}

@media (max-width: 820px) {
    .mobile-tabbar {
        gap: 4px;
        padding: 8px 6px calc(8px + env(safe-area-inset-bottom, 0px));
    }
}

.hero-journey-kicker {
    margin: 0 0 6px;
    font-size: 0.78rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
}

.hero-journey-hero-head,
.hero-journey-dashboard-head {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: center;
}

.hero-journey-ring {
    width: 88px;
    height: 88px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    border: 4px solid rgba(99, 102, 241, 0.35);
    background: radial-gradient(circle at 30% 30%, rgba(99, 102, 241, 0.35), rgba(15, 23, 42, 0.2));
    font-weight: 800;
    font-size: 1.1rem;
}

.hero-journey-metrics {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin-top: 16px;
}

.hero-journey-metrics article {
    padding: 12px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.03);
}

.hero-journey-metrics strong {
    display: block;
    font-size: 1.2rem;
}

.hero-journey-metrics span {
    font-size: 0.75rem;
    color: var(--muted);
}

.hero-journey-metrics--compact article {
    padding: 10px;
}

.hero-journey-today {
    margin-top: 16px;
    padding: 14px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    background: rgba(99, 102, 241, 0.08);
}

.hero-journey-timeline {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 12px;
}

.hero-journey-day {
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 14px;
    background: rgba(255, 255, 255, 0.02);
}

.hero-journey-day header {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 8px;
}

.hero-journey-day-num {
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.hero-journey-day-state {
    font-size: 0.72rem;
    color: var(--muted);
}

.hero-journey-day--completed {
    border-color: rgba(46, 204, 113, 0.45);
}

.hero-journey-day--active {
    border-color: rgba(99, 102, 241, 0.55);
    box-shadow: 0 0 0 1px rgba(99, 102, 241, 0.15);
}

.hero-journey-day--locked {
    opacity: 0.72;
}

.verified-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #ecfdf5;
    background: rgba(16, 185, 129, 0.35);
    border: 1px solid rgba(16, 185, 129, 0.55);
}

.verified-resource-item {
    display: grid;
    gap: 6px;
    margin-bottom: 12px;
}

.verified-library-grid .feature-box ul {
    margin: 0;
    padding-inline-start: 0;
    list-style: none;
}

.hero-journey-tips {
    margin: 10px 0;
    padding-inline-start: 18px;
    color: var(--muted);
    font-size: 0.86rem;
}

/* RTL locales (Arabic, Urdu script): align student panel copy */
[dir="rtl"] body {
    text-align: start;
}
[dir="rtl"] .hero .container,
[dir="rtl"] .card,
[dir="rtl"] .topbar-inner,
[dir="rtl"] .nav-lang-wrap {
    direction: rtl;
}
[dir="rtl"] .hero .meta,
[dir="rtl"] .hero .subtitle,
[dir="rtl"] .cta-row {
    direction: rtl;
    text-align: start;
}
[dir="rtl"] .nav-student {
    direction: rtl;
}
[dir="rtl"] input,
[dir="rtl"] textarea,
[dir="rtl"] select {
    text-align: start;
}

@media (max-width: 740px) {
    .hero { padding: 60px 0 50px; }
    .hero-journey-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .hero-journey-timeline { grid-template-columns: 1fr; }
    .hero-journey-dashboard-head { flex-direction: column; align-items: stretch; }
    .hero-journey-dashboard-head .btn { width: 100%; }
    .card { padding: 20px 18px; }
    .grid-2, .grid-3 { grid-template-columns: 1fr; }
    .task-row {
        grid-template-columns: 1fr;
    }
    .task-row-actions {
        width: 100%;
        justify-content: stretch;
    }
    .task-row-actions .btn,
    .task-row-actions .inline-form,
    .task-row-actions .inline-form .btn {
        width: 100%;
        min-width: 0;
    }
    #pomodoroDisplay { font-size: 1.7rem; }
    h1 { font-size: 1.85rem; }
    h2 { font-size: 1.3rem; }
}

/* ============================ Trust / institute strip (public pages) ============================ */
.trust-institute-strip {
    background: linear-gradient(90deg, rgba(12, 18, 36, 0.97), rgba(24, 36, 72, 0.95));
    border-bottom: 1px solid rgba(232, 200, 114, 0.22);
    padding: 14px 0 10px;
}
.trust-institute-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 12px 18px;
    text-align: center;
}
.trust-institute-grid article strong {
    display: block;
    font-size: 1.35rem;
    color: #f4dfb0;
    letter-spacing: -0.02em;
}
.trust-institute-grid article span {
    display: block;
    font-size: 0.72rem;
    color: #b8c4df;
    margin-top: 4px;
    line-height: 1.35;
}
.trust-institute-note {
    text-align: center;
    font-size: 0.72rem;
    color: #8a96ad;
    margin: 8px 0 0;
    padding: 0 12px;
}
@media (max-width: 900px) {
    .trust-institute-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
@media (max-width: 520px) {
    .trust-institute-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.pub-honest-strip {
    margin-top: 16px;
    margin-bottom: 8px;
}
.pub-honest-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}
@media (max-width: 900px) {
    .pub-honest-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* ============================ Pilot schools (public + admin proof) ============================ */
.pilot-schools-section {
    margin-bottom: 24px;
    border: 1px solid rgba(232, 200, 114, 0.2);
    background: linear-gradient(165deg, rgba(14, 22, 44, 0.12), rgba(22, 34, 68, 0.12));
}
.pilot-schools-head {
    text-align: center;
    margin-bottom: 18px;
}
.pilot-schools-head h2 {
    margin: 10px 0 6px;
}
.pilot-schools-metrics {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 20px;
}
.pilot-schools-metrics article {
    text-align: center;
    padding: 12px 10px;
    border-radius: 10px;
    background: rgba(22, 34, 68, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.06);
}
.pilot-schools-metrics article strong {
    display: block;
    font-size: 1.25rem;
    color: #f4dfb0;
}
.pilot-schools-metrics article span {
    display: block;
    font-size: 0.72rem;
    color: #9aa8c4;
    margin-top: 4px;
}
.pilot-schools-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}
.pilot-schools-metrics article,
.pilot-school-card {
    transition:
        transform 0.22s cubic-bezier(0.16, 1, 0.3, 1),
        border-color 0.22s ease;
}

.pilot-schools-metrics article:hover,
.pilot-school-card:hover {
    transform: translateY(-2px);
    border-color: rgba(147, 197, 253, 0.22);
    background: rgba(22, 34, 68, 0.12);
    background-color: rgba(22, 34, 68, 0.12);
}

.pilot-schools-metrics article:hover strong,
.pilot-school-card:hover h3 {
    text-shadow: 0 0 14px rgba(147, 197, 253, 0.38);
}

.pilot-school-card {
    padding: 14px 16px;
    border-radius: 12px;
    background: rgba(22, 34, 68, 0.12);
    border: 1px solid rgba(110, 168, 255, 0.15);
}
.pilot-school-card h3 {
    margin: 0 0 6px;
    font-size: 1rem;
}
.pilot-school-since {
    display: inline-block;
    margin-top: 8px;
    font-size: 0.7rem;
    color: #8ec89a;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}
.pilot-schools-note {
    margin: 16px 0 0;
    font-size: 0.72rem;
    color: #7d8aa3;
    text-align: center;
}
.admin-pilot-proof {
    margin-bottom: 20px;
}
.admin-pilot-proof h2 {
    margin-top: 0;
}
.admin-analytics-hero .hero-badge {
    margin-bottom: 8px;
}
.admin-analytics-page .comp-shell {
    padding-top: 12px;
}
@media (max-width: 900px) {
    .pilot-schools-metrics {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .pilot-schools-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
@media (max-width: 520px) {
    .pilot-schools-grid {
        grid-template-columns: 1fr;
    }
}

/* --- Global layout: spacing + mobile rhythm (consistency pass) --- */
@media (max-width: 640px) {
    .container {
        width: min(1180px, 94%);
    }
    main.container {
        padding-left: var(--space-3);
        padding-right: var(--space-3);
    }
    .form-card,
    .card.form-card {
        padding: var(--space-5);
    }
    .topbar-inner {
        gap: var(--space-2);
        padding: var(--space-2) 0;
        min-height: 52px;
    }
    h2 {
        font-size: clamp(1.2rem, 5vw, 1.45rem);
    }
    .small-muted {
        font-size: var(--text-xs);
    }
}

/* --- Winning polish: home hero + dashboard next-win --- */
@keyframes heroWinGlow {
    0%, 100% { box-shadow: 0 0 0 0 rgba(232, 200, 114, 0); }
    50% { box-shadow: 0 0 42px 2px rgba(232, 200, 114, 0.18); }
}
.hero.hero--winning {
    animation: heroWinGlow 6s ease-in-out infinite;
}

/* Home winning hero: one centered editorial column (badge → headline → proof → CTAs → stats). */
.hero.hero--winning .container {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    max-width: min(52rem, calc(100% - 2 * var(--rail-x)));
    margin-inline: auto;
}

.hero.hero--winning .hero-badge {
    margin-inline: auto;
}

.hero.hero--winning h1 {
    text-align: center;
    margin-inline: auto;
    max-width: min(34rem, 100%);
    font-size: clamp(1.85rem, 4vw + 0.55rem, 3.1rem);
    font-weight: 800;
    letter-spacing: -0.035em;
    line-height: 1.12;
    text-wrap: balance;
}

.hero.hero--winning h1 br {
    display: block;
}

.hero.hero--winning .subtitle {
    text-align: center;
    margin-inline: auto;
    max-width: min(40rem, 94vw);
}

.hero.hero--winning .hero-ecosystem-line {
    margin-top: var(--space-6);
    margin-bottom: var(--space-2);
    padding-top: var(--space-6);
    border-top: 1px solid rgba(255, 255, 255, 0.14);
    max-width: min(46rem, 94vw);
    margin-inline: auto;
    text-align: center;
}

.hero.hero--winning .meta {
    justify-content: center;
    width: 100%;
    max-width: min(52rem, 100%);
}

.hero.hero--winning .cta-row {
    justify-content: center;
    width: 100%;
    gap: 12px;
}

.hero.hero--winning .stats {
    width: 100%;
    max-width: min(56rem, 100%);
    margin-inline: auto;
}

.hero.hero--winning .stat {
    text-align: center;
}

[dir="rtl"] .hero.hero--winning .container {
    text-align: center;
}

[dir="rtl"] .hero.hero--winning h1,
[dir="rtl"] .hero.hero--winning .subtitle,
[dir="rtl"] .hero.hero--winning .hero-ecosystem-line {
    text-align: center;
}

@media (max-width: 820px) {
    .hero.hero--winning .meta,
    .hero.hero--winning .cta-row {
        align-items: center;
    }

    .hero.hero--winning .cta-row .btn,
    .hero.hero--winning .cta-row a.btn {
        width: min(20rem, 100%);
        justify-content: center;
    }

    .hero.hero--winning .meta span {
        text-align: center;
        justify-content: center;
    }
}

.hero-ecosystem-line {
    max-width: 46rem;
    margin: 0.45rem auto 0;
    font-size: clamp(0.95rem, 2.1vw, 1.08rem);
    line-height: 1.55;
    color: rgba(238, 242, 255, 0.92);
    font-weight: 600;
    text-align: center;
    letter-spacing: 0.01em;
}
body.dark .hero-ecosystem-line {
    color: rgba(226, 232, 255, 0.94);
}
.pub-home-steps.card {
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: linear-gradient(165deg, rgba(22, 32, 58, 0.78), rgba(10, 14, 32, 0.62));
    backdrop-filter: blur(16px) saturate(165%);
    -webkit-backdrop-filter: blur(16px) saturate(165%);
    box-shadow: 0 28px 70px rgba(2, 6, 22, 0.42);
}
.pathway-judge-surface .page-hero-compact {
    position: relative;
}
.judge-live-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
    justify-content: center;
}
.judge-live-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 600;
    color: #eaf0ff;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.14);
}
.judge-live-chip strong {
    font-weight: 800;
    color: #fff;
}
.judge-live-chip--gold {
    border-color: rgba(232, 200, 114, 0.45);
    background: linear-gradient(120deg, rgba(232, 200, 114, 0.18), rgba(255, 255, 255, 0.06));
}
.judge-live-chip--blue {
    border-color: rgba(110, 168, 255, 0.45);
    background: linear-gradient(120deg, rgba(110, 168, 255, 0.2), rgba(255, 255, 255, 0.05));
}
.pathway-xp-toast {
    position: fixed;
    right: 16px;
    bottom: calc(16px + env(safe-area-inset-bottom, 0px));
    z-index: 14000;
    max-width: min(360px, 92vw);
    padding: 12px 14px;
    border-radius: 14px;
    font-size: 0.86rem;
    line-height: 1.35;
    opacity: 0;
    transform: translateY(12px) scale(0.98);
    transition: opacity 0.35s ease, transform 0.35s ease;
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.14);
    pointer-events: none;
}
.pathway-xp-toast--gold {
    background: linear-gradient(145deg, rgba(32, 26, 10, 0.96), rgba(18, 22, 40, 0.96));
    color: #f4e8c8;
}
.pathway-xp-toast--blue {
    background: linear-gradient(145deg, rgba(12, 20, 44, 0.96), rgba(10, 14, 30, 0.96));
    color: #dbe7ff;
}
.pathway-xp-toast strong {
    display: block;
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 4px;
    opacity: 0.95;
}
.pathway-xp-toast span {
    display: block;
    font-weight: 600;
}
.pathway-xp-toast--show {
    opacity: 1;
    transform: translateY(0) scale(1);
}
.pathway-xp-toast--out {
    opacity: 0;
    transform: translateY(10px) scale(0.98);
}
@keyframes pathwayStreakPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(232, 200, 114, 0); }
    40% { box-shadow: 0 0 0 6px rgba(232, 200, 114, 0.35); }
}
.pathway-streak-pulse {
    animation: pathwayStreakPulse 1.1s ease-in-out 2;
}
body.lw-hero-feature .lw-institute-strip {
    border-color: rgba(110, 168, 255, 0.28);
    box-shadow: 0 0 28px rgba(110, 168, 255, 0.12);
}
body.dark .topbar .nav-theme-toggle.btn-outline {
    color: #f6e9bc;
    border-color: rgba(232, 200, 114, 0.5);
    background: rgba(255, 255, 255, 0.06);
}
body.dark .topbar .nav-theme-toggle.btn-outline:hover {
    color: #141109;
    background: linear-gradient(135deg, #fff0c8, #e8c872);
    border-color: transparent;
}
.dashboard-win-strip {
    border: 1px solid rgba(232, 200, 114, 0.35);
    background: linear-gradient(120deg, rgba(18, 28, 52, 0.98), rgba(32, 48, 88, 0.92));
    margin-bottom: 18px;
}
.dashboard-win-strip-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}
.dashboard-win-kicker {
    margin: 0 0 4px;
    font-size: 0.72rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #e8c872;
    font-weight: 700;
}
.dashboard-win-line {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 600;
    color: #eef3ff;
    line-height: 1.4;
    max-width: 52ch;
}
@media (max-width: 560px) {
    .dashboard-win-strip-inner {
        flex-direction: column;
        align-items: flex-start;
    }
    .dashboard-win-strip-inner .btn {
        width: 100%;
        text-align: center;
    }
}

/* Dashboard: hero + context strip aligned with main column (center, same rail width) */
body.page-dashboard .hero .container {
    text-align: center;
}
body.page-dashboard .hero h1,
body.page-dashboard .hero .subtitle {
    text-align: center;
}
body.page-dashboard .hero .subtitle {
    margin-inline: auto;
}
body.page-dashboard .hero .meta {
    justify-content: center;
}
body.page-dashboard .hero .cta-row {
    justify-content: center;
}
body.page-dashboard .page-context-inner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    text-align: start;
    gap: var(--space-4);
}
body.page-dashboard .page-context-copy {
    text-align: start;
    max-width: none;
    flex: 1 1 auto;
    min-width: 0;
}
body.page-dashboard .page-context-action {
    flex: 0 0 auto;
    width: auto;
    align-self: center;
}

body.page-portal.page-portal-dashboard .page-context-inner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    text-align: start;
    gap: var(--space-4);
}
body.page-portal.page-portal-dashboard .page-context-copy {
    text-align: start;
    max-width: none;
    flex: 1 1 auto;
    min-width: 0;
}
body.page-portal.page-portal-dashboard .page-context-action {
    flex: 0 0 auto;
    width: auto;
    align-self: center;
}

/* ===========================================================
   Global UI polish — cards, context strip, rhythm (2026)
   =========================================================== */

.page-context-wrap {
    margin-top: var(--space-3);
}
.page-context {
    text-align: start;
    padding: var(--space-4) var(--space-5) !important;
    margin-bottom: var(--space-4) !important;
    border-inline-start: 3px solid rgba(110, 168, 255, 0.85);
    box-shadow: var(--shadow-sm), inset 0 1px 0 rgba(255, 255, 255, 0.04);
}
.page-context-inner {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-4);
    align-items: center;
    justify-content: space-between;
}
.page-context-title {
    margin: 0 0 4px;
    font-weight: 800;
    font-size: var(--text-lg);
    color: #f8fafc;
    letter-spacing: -0.02em;
    text-shadow: none;
}
.page-context-hint {
    margin: 0;
    color: #cbd5e1;
    font-size: var(--text-sm);
    line-height: 1.5;
    max-width: 62ch;
    text-shadow: none;
}
.page-context-action {
    flex-shrink: 0;
    width: auto;
    display: inline-flex;
    align-self: center;
}
.page-context-action.nav-cta--soft {
    white-space: nowrap;
}

::selection {
    background: rgba(232, 200, 114, 0.28);
    color: var(--text);
}

@media (prefers-reduced-motion: reduce) {
    .card:hover,
    .feature-box:hover,
    .btn:hover {
        transform: none !important;
    }
    .hero.hero--winning {
        animation: none !important;
    }
}

.container--wide {
    width: min(1320px, calc(100% - 2 * var(--rail-x)));
    margin-inline: auto;
}

.tags span {
    transition: border-color var(--transition), background-color var(--transition), transform var(--transition);
}
.tags span:hover {
    transform: translateY(-1px);
}

body.dark .page-context {
    border-inline-start-color: rgba(110, 168, 255, 0.55);
    box-shadow: var(--shadow-sm), inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.table,
table.table {
    border-collapse: separate;
    border-spacing: 0;
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-xs);
}

/* --- Pathway winning layer: onboarding, exam mode, report card, judge magic, a11y --- */
.onboarding-page {
    /* Keep the global dark base: these radials alone replaced body background and
       faded to transparent → white canvas behind glass cards + unreadable type. */
    background: radial-gradient(1200px 600px at 10% -10%, rgba(59, 99, 255, 0.18), transparent 55%),
        radial-gradient(900px 500px at 90% 0%, rgba(232, 200, 114, 0.12), transparent 50%),
        var(--grad-bg),
        var(--bg);
    background-attachment: fixed;
}
.onboarding-wrap {
    max-width: 880px;
    margin-inline: auto;
    padding-bottom: 48px;
}
.onboarding-hero {
    margin-bottom: 18px;
    border: 1px solid var(--border-soft);
}
.onboarding-kicker {
    font-size: var(--text-sm);
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--accent, #6ea8ff);
    margin: 0 0 6px;
}
ol.onboarding-steps {
    display: flex;
    gap: 12px;
    list-style: none;
    padding: 0;
    margin: 16px 0 0;
    flex-wrap: wrap;
}
ol.onboarding-steps li {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 999px;
    border: 1px solid var(--border);
    color: var(--text-soft);
    font-size: var(--text-sm);
}
ol.onboarding-steps li span {
    display: inline-flex;
    width: 26px;
    height: 26px;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.06);
    font-weight: 800;
}
ol.onboarding-steps li.is-active {
    border-color: rgba(110, 168, 255, 0.65);
    color: var(--text);
}
.onboarding-card {
    border: 1px solid var(--border-soft);
}
.onboarding-grid {
    display: grid;
    gap: 12px;
    margin: 16px 0 20px;
}
@media (min-width: 640px) {
    .onboarding-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
    .onboarding-grid--paths {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
.onboarding-choice {
    display: block;
    padding: 14px 16px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    cursor: pointer;
    transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}
.onboarding-choice:hover {
    border-color: rgba(110, 168, 255, 0.55);
    transform: translateY(-1px);
}
.onboarding-choice:has(input:checked) {
    border-color: rgba(110, 168, 255, 0.95);
    box-shadow: 0 0 0 1px rgba(110, 168, 255, 0.35);
}
.onboarding-choice input {
    margin-right: 8px;
}
.onboarding-choice-title {
    display: block;
    font-weight: 800;
}
.onboarding-choice-sub {
    display: block;
    font-size: var(--text-sm);
    color: var(--text-soft);
    margin-top: 4px;
}
.onboarding-choice--wide {
    grid-column: span 1;
}

.exam-mode-toggle-card {
    border: 1px solid rgba(255, 99, 71, 0.45);
    background: linear-gradient(135deg, rgba(255, 99, 71, 0.12), rgba(59, 99, 255, 0.08));
}
.exam-mode-toggle-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}
.exam-mode-kicker {
    margin: 0;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    font-size: var(--text-sm);
    color: #ff8a65;
}
.exam-mode-line {
    margin: 4px 0 0;
    color: var(--text-soft);
}
.exam-yield-focus {
    border: 1px solid rgba(110, 168, 255, 0.55);
}

.today-task-card--exam-focus {
    box-shadow: 0 0 0 2px rgba(255, 152, 0, 0.45), 0 12px 40px rgba(59, 99, 255, 0.12);
}
.today-task-card--yield-match {
    box-shadow: 0 0 0 2px rgba(110, 255, 180, 0.35), 0 12px 40px rgba(59, 99, 255, 0.12);
}
.today-task-card--exam-focus.today-task-card--yield-match {
    box-shadow: 0 0 0 2px rgba(110, 255, 180, 0.55), 0 0 0 4px rgba(255, 152, 0, 0.25), 0 12px 40px rgba(59, 99, 255, 0.14);
}
.exam-yield-chip {
    display: inline-block;
    margin: 0 0 10px 8px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    background: rgba(255, 152, 0, 0.2);
    color: #ffd699;
    border: 1px solid rgba(255, 193, 7, 0.45);
    vertical-align: middle;
}

body.pathway-exam-mode .dashboard-stack-quiet {
    display: none !important;
}

.report-card-overlay {
    position: fixed;
    inset: 0;
    background: rgba(6, 10, 24, 0.72);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 4000;
    padding: 20px;
}
.report-card-overlay.is-open {
    display: flex;
}
.report-card-sheet {
    width: min(520px, 100%);
    background: linear-gradient(180deg, #121a3a, #0b1024);
    color: #f4f6ff;
    border-radius: 18px;
    padding: 26px 24px 22px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
}
.report-card-kicker {
    margin: 0 0 6px;
    font-size: var(--text-sm);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #9db7ff;
}
.report-card-sheet h2 {
    margin: 0 0 10px;
}
.report-card-list {
    margin: 14px 0 0;
    padding-left: 18px;
    line-height: 1.55;
}
.report-motivation {
    margin: 16px 0 0;
    font-size: 1.02rem;
    line-height: 1.55;
    color: #e8edff;
}
.report-motivation-status {
    margin: 6px 0 0;
    min-height: 1.2em;
}
.report-card-actions {
    flex-wrap: wrap;
}
.report-card-foot {
    margin-top: 16px;
}

.judge-magic-fab {
    position: fixed;
    right: 18px;
    bottom: 88px;
    z-index: 2500;
    border: none;
    border-radius: 999px;
    padding: 14px 18px;
    font-weight: 800;
    cursor: pointer;
    color: #0a0f22;
    background: linear-gradient(120deg, #ffe6a8, #7cf7ff, #b18cff);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
}
.judge-magic-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2600;
    padding: 20px;
}
.judge-magic-overlay.is-open {
    display: flex;
}
.judge-magic-card {
    width: min(520px, 100%);
    background: #0f1530;
    color: #eef2ff;
    border-radius: 16px;
    padding: 22px;
    border: 1px solid rgba(255, 255, 255, 0.12);
}
.judge-magic-log {
    list-style: none;
    padding: 0;
    margin: 14px 0 0;
    min-height: 120px;
}
.judge-magic-log li {
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    font-size: var(--text-sm);
}

.nav-dropdown--a11y {
    position: relative;
}
.nav-a11y-panel {
    min-width: 240px;
}
.nav-a11y-h {
    margin: 0 0 8px;
    font-weight: 700;
    font-size: var(--text-sm);
}
.nav-a11y-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}
.nav-a11y-check {
    display: block;
    margin: 8px 0;
    font-size: var(--text-sm);
}

html.pathway-a11y-font-sm {
    font-size: 93%;
}
html.pathway-a11y-font-lg {
    font-size: 112%;
}
html.pathway-a11y-contrast {
    filter: contrast(1.12) saturate(1.08);
}
html.pathway-a11y-dyslexia body {
    font-family: "Atkinson Hyperlegible", "Lexend", "Segoe UI", system-ui, sans-serif;
}

.quiz-review-list {
    display: grid;
    gap: 14px;
    margin-top: 12px;
}
.quiz-ai-explain-out {
    margin-top: 8px;
    white-space: pre-wrap;
}

.engineering-trust-card {
    border: 1px solid rgba(110, 168, 255, 0.28);
    background: linear-gradient(135deg, rgba(18, 26, 58, 0.55), rgba(59, 99, 255, 0.08));
}
.engineering-trust-list {
    margin: 14px 0 0;
    padding-left: 1.25rem;
    line-height: 1.55;
    color: var(--text-soft, #c9d4f0);
}
.engineering-trust-list li {
    margin-bottom: 8px;
}

.verify-cert-main {
    padding-top: 28px;
    padding-bottom: 48px;
}
.verify-cert-card {
    max-width: 720px;
    margin: 0 auto;
    border: 1px solid rgba(110, 168, 255, 0.22);
    box-shadow: 0 18px 48px rgba(6, 12, 32, 0.35);
}
.verify-cert-head .subtitle {
    margin-top: 8px;
}
.verify-cert-form {
    margin-top: 18px;
}
.verify-cert-label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-soft, #b8c7f0);
}
.verify-cert-row {
    flex-wrap: wrap;
    align-items: stretch;
    gap: 10px;
}
.verify-cert-input {
    flex: 1 1 220px;
    min-width: 200px;
    padding: 12px 14px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(10, 14, 28, 0.55);
    color: inherit;
    font-size: 1rem;
}
.verify-cert-help {
    margin-top: 14px;
}
.verify-cert-details {
    display: grid;
    grid-template-columns: minmax(120px, 34%) 1fr;
    gap: 10px 16px;
    margin-top: 18px;
}
.verify-cert-details dt {
    margin: 0;
    font-weight: 700;
    color: var(--text-soft, #b8c7f0);
    font-size: 0.9rem;
}
.verify-cert-details dd {
    margin: 0;
    word-break: break-word;
}
.verify-cert-hash {
    display: block;
    white-space: pre-wrap;
    font-size: 0.82rem;
    line-height: 1.45;
}
.verify-cert-actions {
    margin-top: 22px;
}
.verify-cert-foot {
    margin-top: 16px;
    text-align: center;
}
@media (max-width: 520px) {
    .verify-cert-details {
        grid-template-columns: 1fr;
    }
    .verify-cert-details dt {
        margin-top: 8px;
    }
}
