@font-face {
    font-family: 'Plus Jakarta Sans';
    src: url('../fonts/plus-jakarta-sans.woff2') format('woff2');
    font-style: normal;
    font-weight: 200 800;
    font-display: swap;
}

@font-face {
    font-family: 'Bricolage Grotesque';
    src: url('../fonts/bricolage-grotesque.woff2') format('woff2');
    font-style: normal;
    font-weight: 400 800;
    font-display: swap;
}

@font-face {
    font-family: 'DM Sans';
    src: url('../fonts/dm-sans.woff2') format('woff2');
    font-style: normal;
    font-weight: 400 800;
    font-display: swap;
}

/* Light mode — 60:30:10 rule */
:root {
    color-scheme: light;

    --bg-primary: #faf8f4;
    --bg-card: #FFFFFF;
    --bg-secondary: #f1ede8;

    --primary: #9e3915;
    --primary-hover: #963B05;
    --secondary: #D99A24;
    --on-primary: #FFFFFF;

    --text-primary: #251c2a;
    --text-secondary: #705B49;
    --text-muted: #685f68;

    --border: #d9d3cd;
    --selected: #FFF0DD;

    --success: #367344;
    --danger: #B83232;
    --warning: #94600C;

    --brand-gradient: linear-gradient(135deg, #F2BA32, #E68A19, #CC5500);

    --font-heading: 'Bricolage Grotesque', 'Trebuchet MS', sans-serif;
    --font-primary: 'DM Sans', sans-serif;
    --font-mono: 'Consolas', monospace;

    /* Component aliases */
    --font-sans: var(--font-primary);
    --bg: var(--bg-primary);
    --surface: var(--bg-card);
    --surface-muted: var(--bg-secondary);
    --text: var(--text-primary);
    --primary-soft: var(--selected);
    --success-soft: rgba(54, 115, 68, 0.14);
    --warning-soft: rgba(148, 96, 12, 0.14);
    --danger-soft: rgba(184, 50, 50, 0.14);
    --review: #7c3aed;
    --review-soft: rgba(124, 58, 237, 0.14);
    --radius: 14px;
    --shadow: 0 3px 12px rgb(40 24 30 / .045);
    --shadow-hover: 7px 7px 0 var(--primary);
    --focus-ring: 3px solid var(--primary);
}

/* Dark mode — 60:30:10 rule */
[data-theme="dark"] {
    color-scheme: dark;

    --bg-primary: #14110E;
    --bg-card: #1E1915;
    --bg-secondary: #2B231C;

    --primary: #F2BA32;
    --primary-hover: #FFD166;
    --secondary: #FF914D;
    --on-primary: #14110E;

    --text-primary: #F8F0E5;
    --text-secondary: #C7B8A6;
    --text-muted: #A69684;

    --border: #403328;
    --selected: #35271A;

    --success: #8BCB91;
    --danger: #FF8585;
    --warning: #F2BA32;

    --success-soft: rgba(139, 203, 145, 0.16);
    --warning-soft: rgba(242, 186, 50, 0.16);
    --danger-soft: rgba(255, 133, 133, 0.16);
    --review: #ddd6fe;
    --review-soft: rgba(221, 214, 254, 0.16);
}

*, *::before, *::after {
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    font-family: var(--font-sans);
    line-height: 1.6;
    color: var(--text);
    background-color: var(--bg);
}

code, pre, .mono, .exam-timer, .palette-btn, .brand-mark {
    font-family: var(--font-mono);
}

.visually-hidden:where(:not(:focus-within, :active)) {
    position: absolute !important;
    clip-path: inset(50%) !important;
    overflow: hidden !important;
    width: 1px !important;
    height: 1px !important;
    white-space: nowrap !important;
}

.skip-link:focus {
    position: fixed;
    top: 0.75rem;
    left: 0.75rem;
    z-index: 9999;
    padding: 0.65rem 1rem;
    background: var(--primary);
    color: #fff;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
}

:focus-visible {
    outline: var(--focus-ring);
    outline-offset: 2px;
}

a {
    color: var(--primary);
}

.container, .navbar, .exam-shell {
    width: 95%;
    max-width: 95%;
    margin-inline: auto;
}
.main-content { flex: 1; padding-block: clamp(1rem, 2vw, 2rem) 3rem; }
.site-header {
    position: sticky;
    inset-block-start: 0;
    z-index: 20;
    height: 5.4rem;
    pointer-events: none;
}
.navbar { display: flex; align-items: flex-start; justify-content: space-between; gap: .6rem; padding-block: .85rem; }
.brand, .nav-rail { pointer-events: auto; }
.nav-links a, .menu-toggle {
    background: var(--surface);
    color: var(--text);
    border: 1.5px solid var(--text);
    border-radius: 999px;
    box-shadow: 2px 3px 0 var(--text);
}
.brand {
    display: inline-flex;
    align-items: flex-end;
    gap: .25rem;
    color: var(--text);
    text-decoration: none;
}
.brand img {
    width: clamp(2.5rem, 5vw, 4rem);
    height: auto;
    aspect-ratio: 1;
    object-fit: contain;
    object-position: bottom;
}
.brand-wordmark {
    margin-bottom: .25rem;
    font: 700 clamp(1rem, 1.8vw, 1.65rem)/1 'Plus Jakarta Sans', sans-serif;
    letter-spacing: -.04em;
}
.brand small {
    display: block;
    margin-top: .1em;
    font-size: .62em;
    font-weight: 500;
    letter-spacing: 0;
    text-align: center;
    color: var(--primary);
}
.landing-page .brand { color: #291d30; }
.landing-page .brand small { color: #963a13; }
.landing-page .brand-wordmark { text-shadow: 0 0 .25em #fff4db, 0 0 .45em #fff4db; }
.nav-rail, .nav-links { display: flex; flex-direction: column; align-items: flex-end; gap: .6rem; }
.rail-controls { display: flex; align-items: center; gap: .5rem; }
.nav-links { padding: .2rem .35rem .4rem; max-height: calc(100vh - 5rem); max-height: calc(100dvh - 5rem); overflow-y: auto; }
.nav-links[hidden], .menu-toggle[hidden] { display: none; }
.nav-links a, .menu-toggle { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: .4rem 1.1rem; text-decoration: none; font: 700 .9rem/1.2 var(--font-sans); cursor: pointer; }
.menu-toggle { gap: .5rem; }
.nav-links a[aria-current] { background: var(--surface-muted); }
.nav-links .nav-pill-cta { background: var(--text); color: var(--surface); }
@media (max-width: 380px) {
    .navbar { gap: .25rem; }
    .brand img { width: 2.25rem; }
    .menu-toggle { padding-inline: .65rem; }
}
.site-footer {
    background: var(--surface);
    border-top: 1px solid var(--border);
    padding-block: 1.25rem;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-inner nav {
    display: flex;
    gap: 1.25rem;
}

/* Cards & Grids */
.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
}

.container > .card + .card {
    margin-top: 1.25rem;
}

.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.25rem;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.25rem;
}

.grid-4 {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1.25rem;
}

@media (max-width: 900px) {
    .grid-4, .grid-3 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .grid-4, .grid-3, .grid-2 {
        grid-template-columns: 1fr;
    }
}

.stat-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem;
    box-shadow: var(--shadow);
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.stat-value {
    font-size: 2rem;
    font-weight: 800;
    margin-top: 0.35rem;
    color: var(--text);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    min-height: 44px;
    padding: 0.6rem 1.15rem;
    border-radius: 8px;
    border: 1px solid transparent;
    font: inherit;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.15s ease, border-color 0.15s ease;
}

.btn-sm {
    min-height: 36px;
    padding: 0.35rem 0.8rem;
    font-size: 0.88rem;
}

.btn-primary {
    background: var(--primary);
    color: var(--on-primary) !important;
}

.btn-primary:hover {
    background: var(--primary-hover);
    color: var(--on-primary) !important;
}

.btn-outline {
    background: var(--surface);
    border-color: var(--border);
    color: var(--text) !important;
}

.btn-outline:hover {
    background: var(--surface-muted);
}

.btn-danger {
    background: var(--danger);
    color: #fff !important;
}

.btn-success {
    background: var(--success);
    color: #fff !important;
}

/* Forms */
.form-stack {
    max-width: 520px;
    margin-inline: auto;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    margin-block-end: 1.15rem;
}

.form-group label {
    font-weight: 600;
    font-size: 0.94rem;
}

.form-control,
input[type="text"],
input[type="email"],
input[type="password"],
input[type="tel"],
input[type="number"],
input[type="search"],
input[type="datetime-local"],
select,
textarea {
    font: inherit;
    font-size: max(1rem, 1em);
    min-height: 48px;
    padding: 0.6rem 0.85rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface);
    color: var(--text);
    width: 100%;
}

textarea {
    min-height: 110px;
    resize: vertical;
}

input:user-invalid,
select:user-invalid,
textarea:user-invalid {
    border-color: var(--danger);
}

.field-hint {
    font-size: 0.84rem;
    color: var(--text-muted);
}

.field-error {
    font-size: 0.86rem;
    color: var(--danger);
    font-weight: 500;
}

.checkbox-row {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    margin-block-end: 1.15rem;
}

.checkbox-row input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin-top: 0.2rem;
    flex-shrink: 0;
}

/* Alerts & Badges */
.flash-stack {
    margin-bottom: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.alert {
    padding: 0.85rem 1.1rem;
    border-radius: 8px;
    border: 1px solid transparent;
    font-weight: 500;
}

.alert-success { background: var(--success-soft); color: var(--success); border-color: #bbf7d0; }
.alert-warning { background: var(--warning-soft); color: var(--warning); border-color: #fde68a; }
.alert-danger, .alert-error { background: var(--danger-soft); color: var(--danger); border-color: #fecaca; }
.alert-info { background: var(--primary-soft); color: var(--primary); border-color: #bfdbfe; }

.badge {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 700;
}

.badge-success { background: var(--success-soft); color: var(--success); }
.badge-warning { background: var(--warning-soft); color: var(--warning); }
.badge-danger { background: var(--danger-soft); color: var(--danger); }
.badge-info { background: var(--primary-soft); color: var(--primary); }
.badge-muted { background: var(--surface-muted); color: var(--text-muted); }

/* Tables */
.table-wrap {
    overflow-x: auto;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
}

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

th, td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border);
    vertical-align: top;
}

th {
    background: var(--surface-muted);
    font-weight: 700;
    color: var(--text);
}

tbody tr:last-child td {
    border-bottom: none;
}

/* Page header */
.page-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.page-head h1 {
    margin: 0;
    font-size: 1.7rem;
}

.page-subtitle {
    margin: 0.25rem 0 0;
    color: var(--text-muted);
}

/* Exam Engine Layout */
.exam-shell {
    max-width: 95%;
    margin-inline: auto;
    padding: 1rem 1rem 2rem;
}

.exam-topbar {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.85rem 1.25rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.25rem;
    box-shadow: var(--shadow);
}

.exam-timer {
    font-variant-numeric: tabular-nums;
    font-size: 1.35rem;
    font-weight: 800;
    padding: 0.35rem 0.9rem;
    border-radius: 8px;
    background: var(--primary-soft);
    color: var(--primary);
}

.exam-timer.is-critical {
    background: var(--danger-soft);
    color: var(--danger);
}

.exam-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 1.25rem;
    align-items: start;
}

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

.option-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-block: 1.25rem;
}

.option-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.9rem 1rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    cursor: pointer;
    min-height: 48px;
    background: var(--surface);
}

.option-item:has(input:checked) {
    border-color: var(--primary);
    background: var(--primary-soft);
}

.option-item input[type="radio"] {
    width: 20px;
    height: 20px;
    margin-top: 0.15rem;
    flex-shrink: 0;
}

.palette-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 0.5rem;
    margin-block: 1rem;
}

.palette-btn {
    min-height: 42px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--surface);
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

.palette-btn.is-current {
    outline: 2px solid var(--text);
    outline-offset: 1px;
}

.palette-btn.is-attempted {
    background: var(--success-soft);
    border-color: var(--success);
    color: var(--success);
}

.palette-btn.is-review {
    background: var(--review-soft);
    border-color: var(--review);
    color: var(--review);
}

/* Native Dialog */
dialog {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    max-width: 460px;
    width: calc(100% - 2rem);
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.25);
}

dialog:modal {
    overscroll-behavior: contain;
}

dialog::backdrop {
    background: rgba(15, 23, 42, 0.55);
    overflow: hidden;
    overscroll-behavior: contain;
}

/* Admin Score Distribution Bar Chart */
.chart-bars {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 1rem;
}

.chart-row {
    display: grid;
    grid-template-columns: 90px 1fr 56px;
    align-items: center;
    gap: 0.75rem;
}

.chart-track {
    height: 22px;
    background: var(--surface-muted);
    border-radius: 6px;
    overflow: hidden;
}

.chart-fill {
    height: 100%;
    background: var(--primary);
    border-radius: 6px;
}

@media print {
    .site-header, .site-footer, .no-print {
        display: none !important;
    }
}

body {
    transition: opacity 0.35s ease;
}

body.is-leaving {
    opacity: 0;
}

.progress-bar-track {
    width: 100%;
    height: 8px;
    background: var(--surface-muted);
    border-radius: 999px;
    overflow: hidden;
    margin-top: 1rem;
}

.progress-bar-fill {
    width: 100%;
    height: 100%;
    background: var(--primary);
    transform-origin: left;
    animation: regProgress 1.4s ease forwards;
}

@keyframes regProgress {
    from { transform: scaleX(0); }
    to { transform: scaleX(1); }
}

body { font-size: clamp(1rem, .94rem + .18vw, 1.125rem); }
h1, h2, h3, .stat-value { font-family: var(--font-heading); line-height: 1.12; letter-spacing: -.04em; text-wrap: balance; }
h1, .page-head h1 { font-size: clamp(1.9rem, 1.35rem + 2.2vw, 3.5rem); }
h2 { font-size: clamp(1.4rem, 1rem + 1.5vw, 2.5rem); }
h3 { font-size: clamp(1.15rem, 1rem + .5vw, 1.5rem); }
img, input, select { max-width: 100%; }
.card, .stat-card, .form-group, .exam-grid > *, .page-head > * { min-width: 0; }
.card { padding: clamp(1rem, 2.2vw, 2rem); overflow-wrap: anywhere; }
.exam-shell { padding-inline: 0; }
.btn { border-radius: .75rem; font-weight: 700; }
[aria-invalid="true"] { border-color: var(--danger) !important; }
.landing-hero { display: grid; grid-template-columns: 1fr 1fr; overflow: hidden; background: #fff4db; color: #291d30; }
.hero-copy { align-self: center; padding: clamp(1.5rem, 4vw, 5rem); }
.eyebrow { display: flex; align-items: center; gap: .55rem; margin: 0; font: 700 clamp(.7rem, .7vw + .3rem, .88rem)/1.4 var(--font-mono); letter-spacing: .09em; text-transform: uppercase; }
.status-dot { background: #eb652b; border-radius: 50%; width: .65rem; height: .65rem; }
.hero-copy h1 { margin: .28em 0 .22em; font-size: clamp(3rem, 5.9vw, 7rem); line-height: .96; letter-spacing: -.065em; }
.hero-copy em { color: #a43e1a; font-family: Georgia, serif; font-weight: 500; }
.hero-description { max-width: 45ch; margin: 0; color: #54434c; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .65rem; margin-top: clamp(1rem, 2vw, 2rem); }
.hero-actions .btn-primary { background: #302038; color: white !important; }
.hero-actions .btn-outline { background: transparent; border-color: #978a80; color: #302038 !important; }
.hero-art { width: 100%; height: 100%; min-height: 0; object-fit: cover; object-position: 42% center; }
.assessment-facts { display: grid; grid-template-columns: repeat(4, 1fr); margin: 1rem 0 0; padding: 1.2rem 0; border-block: 1px solid var(--border); }
.assessment-facts div { display: flex; flex-wrap: wrap; gap: .65rem; align-items: baseline; justify-content: center; padding-inline: .6rem; }
.assessment-facts div + div { border-left: 1px solid var(--border); }
.assessment-facts dd { order: -1; margin: 0; font: 800 clamp(1.5rem,2.3vw,2.3rem)/1 var(--font-heading); }
.assessment-facts dt { color: var(--text-muted); font-size: .92rem; }
.subjects { margin-block: clamp(2rem,4vw,4rem); }
.subjects h2 { margin: 0; }
.subject-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: clamp(.7rem,1.3vw,1.5rem); margin-top: 1.35rem; }
.subject-card { overflow: hidden; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.subject-card img { display: block; width: 100%; height: clamp(8rem,11vw,13rem); object-fit: cover; }
.subject-card div { padding: 1rem; }
.subject-card h3, .register-aside h2 { margin: 0; }
.subject-card p, .register-aside p { color: var(--text-muted); margin: .6rem 0 0; }
.subject-card p { font-size: .94rem; }
.register-grid { display: grid; grid-template-columns: minmax(15rem,1fr) minmax(0,2fr); gap: clamp(1.5rem,4vw,5rem); align-items: start; }
.register-aside { border-radius: 1rem; overflow: hidden; background: var(--surface-muted); }
.register-aside img { display: block; width: 100%; }
.register-aside div { padding: clamp(1rem,2vw,2rem); }
.register-shell fieldset { border: 0; border-top: 1px solid var(--border); margin: 1.4rem 0; padding: 1rem 0 0; min-width: 0; }
.register-shell legend { font: 700 clamp(1.15rem,1.5vw,1.5rem)/1.25 var(--font-heading); padding-right: .75rem; }
.registration-fields { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 1rem; }
.registration-fields .form-group { margin: 0; }
@media (max-width: 960px) { .subject-grid { grid-template-columns: repeat(3,minmax(0,1fr)); } }
@media (max-width: 720px) {
    .landing-hero, .register-grid { grid-template-columns: 1fr; }
    .hero-art { aspect-ratio: 2.4; height: auto; }
    .register-aside { display: flex; align-items: center; }
    .register-aside img { width: 30%; align-self: stretch; object-fit: cover; }
    .register-aside h2 { font-size: 1.2rem; }
    .register-aside p { font-size: .9rem; }
    .subject-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .assessment-facts div { flex-direction: column; align-items: center; gap: .25rem; text-align: center; }
    .assessment-facts dt { font-size: .8rem; }
    .card div[style*="display: flex"] { flex-wrap: wrap; }
}
@media (max-width: 480px) {
    .registration-fields { grid-template-columns: 1fr; }
    .subject-grid { grid-template-columns: 1fr; }
    .subject-card { display: grid; grid-template-columns: 30% 1fr; }
    .subject-card img { height: 100%; }
}
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* The artwork bleeds into the reading surface along the split. */
.landing-page .site-header { margin-bottom: -5.4rem; }
.landing-page .main-content { padding-top: 0; }
.landing-page .main-content > .container {
    display: grid;
    grid-template-columns: 2.5% minmax(0, 1fr) 2.5%;
    width: 100%;
    max-width: none;
}
.landing-page .container > * { grid-column: 2; }
.landing-page .container > .landing-hero { grid-column: 1 / -1; }
.landing-hero {
    position: relative;
    isolation: isolate;
    min-height: 100vh;
    min-height: 100svh;
    width: 100%;
    grid-template-columns: minmax(0, 49%) 1fr;
    padding-block: 5.4rem 2rem;
}
.hero-art {
    position: absolute;
    z-index: -1;
    inset: 0 0 0 auto;
    width: 65%;
    height: 100%;
    object-fit: cover;
    object-position: 43% center;
    mask-image: linear-gradient(to right, transparent, #000 32%);
}
.hero-copy { padding-right: 0; }
.btn, .palette-btn { border: 1.5px solid var(--text); box-shadow: 2px 3px 0 var(--text); }
.btn { border-radius: 999px; }
:is(button, .btn, .nav-links a, .option-item) {
    transition: transform .16s ease, box-shadow .16s ease, background-color .16s ease, filter .16s ease;
}
@media (hover: hover) {
    :is(button:enabled, .btn, .nav-links a):hover {
        transform: translateY(-2px);
        box-shadow: 3px 5px 0 var(--text);
        filter: brightness(.96);
    }
    .option-item:hover { border-color: var(--primary); background: var(--primary-soft); }
}
:is(button:enabled, .btn, .nav-links a):active {
    transform: translateY(2px); box-shadow: 0 1px 0 var(--text);
}
button:disabled { opacity: .56; cursor: default; }
@media (max-width: 720px) {
    .landing-hero { grid-template-columns: 1fr; align-content: space-between; padding: 5.5rem 0 0; }
    .hero-copy { padding: 1.25rem; }
    .hero-art { position: relative; width: 100%; height: clamp(12rem, 40svh, 28rem); object-position: center 38%; mask-image: linear-gradient(to bottom, transparent, #000 24%); }
}
@media (prefers-reduced-motion: reduce) {
    :is(button, .btn, .nav-links a):is(:hover, :active) { transform: none; }
}

@media (hover: hover) and (pointer: fine) {
    body { cursor: url('../images/cursor.svg') 3 2, auto; }
    :is(.card, .subject-card, .stat-card, .exam-topbar, .table-wrap, .register-aside, .landing-hero) {
        transition: box-shadow .2s ease, border-color .2s ease;
    }
    :is(.card, .subject-card, .stat-card, .exam-topbar, .table-wrap, .register-aside, .landing-hero):hover {
        box-shadow: 0 4px 16px color-mix(in srgb, var(--text) 12%, transparent);
        border-color: var(--primary);
    }
    a, button:enabled, label[for], .option-item { cursor: pointer; }
    input:not([type]), input:is([type=text], [type=email], [type=password], [type=search]), textarea { cursor: text; }
}

.layout-admin .page-head { border-bottom: 1px solid var(--border); padding-bottom: 1rem; }
.layout-admin .page-head h2, #fullscreen-title { margin: 0; }
.layout-admin .stat-card { border-top: .25rem solid var(--primary); }
.layout-admin table tbody tr:hover { background: var(--surface-muted); }
.layout-admin #questions { margin-block: 2rem 1rem; scroll-margin-top: 6rem; }
.layout-admin select { min-width: 0; }
#fullscreen-prompt { color: var(--text); background: var(--surface); }
html:fullscreen { background: var(--bg); overflow-y: auto; }
.test-awaiting-fullscreen :is(#practice-test-app, .layout-exam .exam-grid) { visibility: hidden; }

.student-layout { display:grid;grid-template-columns:clamp(10rem,16vw,16rem) minmax(0,1fr);gap:clamp(1rem,3vw,3rem);align-items:start; }
.student-sidebar { display:grid;gap:.4rem;position:sticky;top:6rem;padding:.75rem;border:1px solid var(--border);border-radius:1rem;background:var(--surface); }
.student-sidebar a { padding:.7rem .9rem;border-radius:.6rem;color:var(--text);text-decoration:none;font-weight:650; }
.student-sidebar a:is(:hover,[aria-current]) { background:var(--primary-soft);color:var(--primary); }
.student-body { min-width:0; }
.assessment-list + .assessment-list { margin-top:1rem; }
.assessment-list h2,.assessment-list h3 { margin:.3rem 0; }
.assessment-list article { display:flex;align-items:center;justify-content:space-between;gap:1rem;flex-wrap:wrap;padding-block:1rem;border-top:1px solid var(--border); }
.assessment-list small { color:var(--text-muted); }
.navbar { gap:.55rem; }
#section-progress { width:100%;margin-top:1rem;accent-color:var(--primary); }
#conduct-dialog { border-top:5px solid var(--warning);background:var(--surface);color:var(--text); }
.loading-overlay:not([hidden]) { position:fixed;inset:0;z-index:60;display:grid;place-items:center;background:#2217278c; }
.loading-overlay .card { display:flex;align-items:center;gap:1rem; }
.load-spinner { width:1.6rem;height:1.6rem;border:3px solid var(--border);border-top-color:var(--primary);border-radius:50%;animation:load-spin .8s linear infinite; }
@keyframes load-spin { to { transform:rotate(360deg); } }
@media (prefers-reduced-motion:no-preference) { @view-transition { navigation:auto; } }
@media(max-width:720px) {
 .student-layout { grid-template-columns:1fr; }
 .student-sidebar { display:flex;flex-wrap:wrap;position:static; }
 .student-sidebar a { padding:.4rem .6rem; }
}
.nav-rail { position: absolute; right: env(safe-area-inset-right, 0px); }
.menu-toggle { width: 3.4rem; height: 3rem; border-radius: 2rem 0 0 2rem; padding: 0; }
.burger-lines { display: grid; gap: 4px; }
.burger-lines i { width: 21px; height: 2px; border-radius: 2px; background: currentColor; }
.menu-toggle[aria-expanded="true"] i:first-child { transform: translateY(6px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] i:nth-child(2) { opacity: 0; }
.menu-toggle[aria-expanded="true"] i:last-child { transform: translateY(-6px) rotate(-45deg); }
.nav-links { padding-right: .5rem; }
.toast-stack { position: fixed; z-index: 35; top: max(4.4rem, env(safe-area-inset-top)); right: max(.75rem, env(safe-area-inset-right)); width: min(23rem, calc(100% - 1.5rem)); max-height: 65vh; overflow-y: auto; }
.toast { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; margin: 0 0 .5rem; border-inline-start: 4px solid currentColor; border-radius: 1rem; box-shadow: 0 4px 14px #20152920; }
.toast-close { flex: none; background: transparent; color: inherit; border: 0; font: bold 1.25rem/1 sans-serif; padding: .2rem .4rem; }
.hero-rounds { position: absolute; left: 4%; bottom: 1.75rem; display: inline-flex; align-items: center; gap: .65rem; color: #382036; font-weight: 700; text-decoration: none; }
.hero-rounds span { display: grid; place-items: center; width: 2.25rem; aspect-ratio: 1; border: 1px solid; border-radius: 50%; background: #fff4db; }
.landing-hero { background: radial-gradient(ellipse at 0% 0%, #ffdfa3, transparent 45%), #fff4db; }
.hero-copy em { display: inline-block; position: relative; isolation: isolate; }
.hero-copy em::after { content: ""; position: absolute; z-index: -1; bottom: .03em; left: 0; right: -.05em; height: .12em; border-radius: 70% 25%; background: #ffb955; transform: rotate(-3deg); }
#assessment-rounds { scroll-margin-top: 5.5rem; }
@media (min-width: 721px) { .hero-copy { padding-bottom: 4rem; } }
@media (max-width: 720px) {
    .hero-rounds { position: static; justify-self: start; margin: 0 1.25rem .5rem; }
}
@media (prefers-reduced-motion: no-preference) {
    .burger-lines i, .hero-rounds span, .hero-actions .btn span { transition: transform .24s ease, opacity .2s ease; }
    .hero-actions .btn span { display: inline-block; }
    .hero-actions .btn:is(:hover,:focus-visible) span { transform: translate(3px,-3px); }
    .hero-rounds:is(:hover,:focus-visible) span { transform: translateY(3px); }
    .nav-links:not([hidden]) a, .toast { animation: arrive-from-right .24s ease-out backwards; }
    .nav-links a:nth-child(2) { animation-delay: 35ms; }
    .nav-links a:nth-child(n+3) { animation-delay: 70ms; }
    .hero-copy { animation: hero-arrival .55s ease-out both; }
    @keyframes arrive-from-right { from { opacity: 0; translate: .7rem 0; } }
    @keyframes hero-arrival { from { opacity: 0; translate: 0 .75rem; } }
}

.admin-layout { display:grid; grid-template-columns:clamp(12rem,17vw,17rem) minmax(0,1fr); align-items:start; gap:clamp(1rem,3vw,3rem); }
.admin-sidebar { position:sticky; top:1rem; max-height:calc(100dvh - 2rem); overflow:auto; border-radius:1.25rem; background:var(--surface); border:1px solid var(--border); }
.admin-navigation { padding:1rem; }
.admin-navigation summary { display:flex; gap:.6rem; align-items:center; font-weight:800; cursor:pointer; }
.admin-navigation h2 { margin:1.3rem .4rem .35rem; font-size:.78rem; color:var(--text-muted); }
.admin-navigation a { display:block; color:var(--text); text-decoration:none; border-radius:.55rem; padding:.48rem .65rem; }
.admin-navigation a:is(:hover,[aria-current]) { background:var(--primary-soft); color:var(--primary); }
.admin-signout { margin-top:.8rem; border-top:1px solid var(--border); }
.admin-body { min-width:0; }
.roadmap-filter,.section-index { display:flex;align-items:center;flex-wrap:wrap;gap:.75rem;margin:1rem 0; }
.roadmap-filter select { width:auto; max-width:100%; }
.section-index a { color:var(--primary); }
.question-preview { border:1px solid var(--border); border-radius:1.25rem; background:var(--surface); padding:clamp(1rem,2vw,2rem);margin:1.25rem 0; }
.question-preview article { border-top:1px solid var(--border); padding:.85rem 0; }
.question-preview h3 { font-size:clamp(1rem,1.25vw,1.2rem); line-height:1.5; margin:.35rem 0; }
.question-preview img { display:block; width:min(100%,35rem); margin:.8rem 0; }
.question-preview summary { color:var(--primary); cursor:pointer; }
@media(max-width:760px) { .admin-layout { grid-template-columns:1fr; }.admin-sidebar { position:static; max-height:none; }.admin-navigation summary::after { content:'⌄'; margin-inline-start:auto; } }
