/* Deir Hanna: flowing color, neon code, and clear glass. No remote assets. */
:root {
    color-scheme: light;
    --forest: #13345b;
    --forest-deep: #082443;
    --olive: #1c62b1;
    --dark: #263d56;
    --gold: #c27508;
    --sunlight: #dcff94;
    --bg: #f2f8ff;
    --glass: rgba(255, 255, 255, .86);
    --line: rgba(31, 105, 173, .15);
    --muted: #5f7388;
    --accent-violet: #7c3aed;
    --accent-pink: #df2a9d;
    --accent-cyan: #07b7d4;
    --accent-lime: #c6f36b;
    --accent-orange: #ff996b;
    --error: #a03631;
    --radius: 24px;
    --shadow: 0 14px 42px -25px rgba(26, 106, 177, .28), 0 1px 0 rgba(255, 255, 255, .94) inset;
    --ease: 180ms ease;
    font-synthesis: none;
}
* { box-sizing: border-box; }
html { scroll-padding-top: 116px; }
body {
    isolation: isolate;
    margin: 0;
    min-width: 320px;
    background: var(--bg);
    color: var(--dark);
    font-family: "Avenir Next", Avenir, "Segoe UI", system-ui, -apple-system, sans-serif;
    font-size: 15px;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}
body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: -2;
    background:
        radial-gradient(ellipse at 3% 0%, rgba(51, 142, 255, .20), transparent 45%),
        radial-gradient(ellipse at 93% 20%, rgba(255, 107, 188, .11), transparent 38%),
        radial-gradient(ellipse at 70% 90%, rgba(36, 211, 228, .17), transparent 44%),
        linear-gradient(135deg, #eff7ff, #f8fcff 58%, #ecfaff);
}
.ambient-scene { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; contain: paint; }
.ambient-wave { position: absolute; width: 155%; height: 62vh; min-height: 360px; left: -28%; opacity: .2; transform-origin: center; animation: ambient-flow 25s ease-in-out infinite alternate; }
.wave-a { top: 2vh; }
.wave-b { top: 35vh; left: -10%; opacity: .18; animation-duration: 31s; animation-direction: alternate-reverse; }
.wave-c { top: 67vh; opacity: .16; animation-duration: 28s; animation-delay: -12s; }
a { color: var(--olive); text-decoration-thickness: 1px; text-underline-offset: 4px; }
a:hover { color: var(--forest-deep); }
img, svg { vertical-align: middle; }
img { max-width: 100%; }
button, input, select, textarea { font: inherit; }
button[hidden], .button[hidden] { display: none; }
button, a, input, select, textarea, summary { -webkit-tap-highlight-color: transparent; }
::selection { background: #ccecff; color: #13345b; }
:focus-visible { outline: 3px solid #1689d6; outline-offset: 4px; }

/* A quiet glass frame keeps navigation in one predictable place. */
.site-header {
    position: sticky;
    top: 0;
    z-index: 30;
    background: rgba(247, 252, 255, .86);
    border-bottom: 1px solid rgba(31, 105, 173, .10);
    backdrop-filter: blur(22px) saturate(1.25);
    -webkit-backdrop-filter: blur(22px) saturate(1.25);
}
.header-inner { max-width: 1440px; margin: 0 auto; min-height: 99px; padding: 14px clamp(20px, 3.2vw, 48px); display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: inline-flex; flex: 0 0 auto; align-items: center; gap: 13px; text-decoration: none; color: var(--forest); line-height: 1.3; }
.brand:hover { color: var(--forest); }
.brand-mark { display: grid; place-items: center; width: 78px; height: 63px; border-radius: 16px; background: #fff; border: 1px solid rgba(57, 73, 95, .08); }
.brand img { width: 69px; height: auto; max-height: 55px; object-fit: contain; }
.brand-copy { display: flex; flex-direction: column; gap: 3px; }
.brand-school { font-size: 11px; font-weight: 600; letter-spacing: 1.6px; text-transform: uppercase; color: #617f9b; }
.brand strong { font-size: 19px; font-weight: 750; letter-spacing: -.6px; }
.brand-dot { color: #e027a6; }
.main-nav { display: flex; align-items: center; gap: 4px; }
.main-nav > a { padding: 9px 13px; border-radius: 11px; font-size: 13px; font-weight: 650; color: #527491; text-decoration: none; white-space: nowrap; transition: color var(--ease), background var(--ease); }
.main-nav > a:hover { color: var(--forest); background: rgba(31, 105, 173, .045); }
.main-nav > a[aria-current="page"] { color: #175caa; background: linear-gradient(115deg, #dfedff, #dcf6ff); box-shadow: 0 1px 0 rgba(255, 255, 255, .8) inset; }
.signout-form { margin: 0 0 0 12px; padding-left: 16px; border-left: 1px solid var(--line); }
.main-nav .signout-button { margin: 0; padding: 8px 13px; border-color: rgba(31, 105, 173, .2); background: transparent; box-shadow: none; font-size: 12px; }
.nav-toggle { display: none; align-items: center; gap: 7px; }
.school-year { font-size: 12px; font-weight: 650; letter-spacing: 1.8px; color: #647c93; border: 1px solid var(--line); border-radius: 100px; padding: 7px 14px; }
.school-year span { color: #8ca6bf; padding: 0 2px; }
.site-main { max-width: 1336px; margin: 38px auto 58px; padding: 0 clamp(20px, 3.2vw, 48px); min-height: calc(100vh - 246px); }
.site-footer { max-width: 1336px; padding: 20px 24px 28px; margin: 0 auto; text-align: center; color: #6785a0; font-size: 11px; letter-spacing: .3px; display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.footer-separator { color: #a4bfd5; }
.skip { position: fixed; top: -120px; left: 16px; z-index: 50; padding: 12px 18px; background: #fff; color: var(--forest); border-radius: 0 0 10px 10px; box-shadow: var(--shadow); }
.skip:focus { top: 0; }

/* Type and spacing establish hierarchy before any decoration. */
h1, h2, h3 { color: var(--forest); line-height: 1.2; }
h1 { font-size: clamp(29px, 3.3vw, 43px); font-weight: 750; letter-spacing: -1.5px; margin: 0 0 14px; }
h2 { font-size: 21px; font-weight: 700; letter-spacing: -.6px; margin: 0 0 13px; }
h3 { font-size: 16px; font-weight: 700; letter-spacing: -.2px; margin: 22px 0 12px; }
p { margin: 0 0 17px; }
p:last-child { margin-bottom: 0; }
small { font-size: 12px; }
.muted, .subtle, small { color: var(--muted); }
.eyebrow, .page-eyebrow, .section-kicker { font-size: 10px; font-weight: 750; letter-spacing: 2px; text-transform: uppercase; line-height: 1.6; color: #975ba3; margin: 0 0 12px; }
.page-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 28px; }
.page-header p { max-width: 680px; }
.page-header h1 { margin-bottom: 10px; }
.section-header, .section-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 22px; }
.section-header h2, .section-heading h2 { margin: 0; }
.section-header > a, .section-heading > a { font-size: 12px; font-weight: 650; white-space: nowrap; }
.section-heading .card-icon { margin-bottom: 0; flex: 0 0 43px; }
.stack { display: flex; flex-direction: column; gap: 22px; }
.row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.narrow { width: 100%; max-width: 700px; margin-left: auto; margin-right: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.text-link { font-size: 12px; font-weight: 650; }
.file-name { font-size: 14px; font-weight: 650; color: #2b5982; overflow-wrap: anywhere; }

/* Frosted surfaces are restrained; the hero carries the visual energy. */
.card, .action-card, .tile, .leaderboard-panel {
    background: var(--glass);
    border: 1px solid rgba(255, 255, 255, .95);
    border-radius: var(--radius);
    box-shadow: var(--shadow), 0 0 0 1px rgba(31, 105, 173, .035);
    padding: clamp(22px, 2.5vw, 32px);
    margin-bottom: 24px;
    min-width: 0;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}
.card > :last-child, .action-card > :last-child, .tile > :last-child { margin-bottom: 0; }
.hero-panel, .page-hero {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 36px;
    min-height: 227px;
    padding: clamp(28px, 3.3vw, 43px);
    margin-bottom: 28px;
    border: 1px solid rgba(255, 255, 255, .14);
    border-radius: 28px;
    background: linear-gradient(118deg, #071f53 0%, #1246aa 42%, #096fbb 76%, #0d96aa 100%);
    box-shadow: 0 24px 48px -27px rgba(21, 96, 185, .65), 0 1px 0 rgba(255, 255, 255, .22) inset;
    color: #fff;
}
.hero-panel::before, .page-hero::before {
    content: "";
    position: absolute;
    z-index: -1;
    inset: -35% -30% -45% 23%;
    background: linear-gradient(125deg, #64b5ff 5%, #2e71ed 35%, #20daed 68%, #cbfa70 100%);
    opacity: .38;
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1000 400' preserveAspectRatio='none'%3E%3Cpath d='M0 230C180 30 300 350 520 140S850 80 1000 170V400H0Z' fill='white'/%3E%3C/svg%3E");
    mask-size: 100% 100%;
    animation: hero-swell 19s ease-in-out infinite alternate;
    pointer-events: none;
}
.hero-panel::after, .page-hero::after, .auth-aside::after {
    content: ""; position: absolute; inset: 0 -10% 0 18%; z-index: -1; opacity: .32; pointer-events: none;
    mask-image: linear-gradient(90deg, transparent, #000 65%);
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1000 400' preserveAspectRatio='none'%3E%3Cpath d='M-50 180C180 -80 280 480 570 170S850 80 1050 90' fill='none' stroke='%23b6f8ff' stroke-width='1.2'/%3E%3Cpath d='M-50 200C180 -60 280 500 570 190S850 100 1050 110' fill='none' stroke='%23ff9bd9' stroke-width='1.2'/%3E%3Cpath d='M-50 220C180 -40 280 520 570 210S850 120 1050 130' fill='none' stroke='%23e2ffb2' stroke-width='1.2'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
    animation: hero-swell 23s ease-in-out infinite alternate-reverse;
}
.hero-copy { min-width: 0; max-width: 730px; }
.hero-panel h1, .page-hero h1, .hero-title { color: #f9fdff; font-size: clamp(31px, 3.5vw, 46px); line-height: 1.12; letter-spacing: -1.7px; margin-bottom: 14px; }
.hero-panel .eyebrow, .page-hero .eyebrow, .hero-kicker { color: #9fefff; font-size: 10px; font-weight: 700; letter-spacing: 2px; text-transform: uppercase; margin: 0 0 15px; }
.hero-panel p:not(.eyebrow):not(.hero-kicker), .page-hero p:not(.eyebrow):not(.hero-kicker), .hero-description { color: #d3eaff; max-width: 580px; font-size: 14px; line-height: 1.7; margin-bottom: 0; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; flex-shrink: 0; margin-top: 24px; }
.hero-panel .button, .page-hero .button { background: linear-gradient(110deg, #c6f36b, #86f5df); border-color: #d9ff9e; color: #253c3e; box-shadow: 0 4px 20px rgba(115, 255, 190, .2); }
.hero-panel .button:hover, .page-hero .button:hover { background: #dcff94; border-color: #e4ffbb; box-shadow: 0 4px 25px rgba(115, 255, 190, .35); }
.hero-panel .button.secondary, .page-hero .button.secondary { background: rgba(255, 255, 255, .06); color: #f9fdff; border-color: rgba(232, 229, 222, .28); box-shadow: none; }
.hero-panel .button.secondary:hover, .page-hero .button.secondary:hover { background: rgba(255, 255, 255, .12); }
.hero-panel .status-pill, .page-hero .status-pill { color: #e6e0d5; border-color: rgba(232, 229, 222, .2); background: rgba(242, 239, 233, .09); }
.hero-link { color: #e7dfd1; font-size: 12px; font-weight: 600; text-decoration-color: #98a5b6; }
.hero-link:hover { color: #fff; }
.hero-art { flex: 0 0 200px; width: 200px; height: 200px; position: relative; display: grid; place-items: center; margin: -15px 8px -15px 22px; }
.project-mark { width: 100%; height: auto; display: block; }
.signal-code { animation: code-float 7s ease-in-out infinite alternate; transform-origin: center; }
.signal-bars rect { transform-box: fill-box; transform-origin: center bottom; animation: signal-groove 2.8s ease-in-out infinite alternate; }
.signal-bars rect:nth-child(2n) { animation-delay: -.9s; animation-duration: 3.7s; }
.signal-bars rect:nth-child(3n) { animation-delay: -1.6s; animation-duration: 3.1s; }
.signal-spark { animation: code-float 8s ease-in-out infinite alternate-reverse; transform-origin: center; }
.welcome-panel { position: relative; }
.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(290px, 1fr); gap: 24px; align-items: start; margin-bottom: 24px; }
.dashboard-main, .dashboard-side { min-width: 0; }
.dashboard-grid > .card, .dashboard-grid > .action-card { height: 100%; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); gap: 24px; }
.grid > .card, .grid > .tile, .grid > .action-card { margin-bottom: 24px; }
.split { display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; margin-bottom: 22px; }
.split > :first-child { min-width: 0; }
.split h1 { margin-bottom: 8px; }
.toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: 11px; margin: 20px 0; }
.toolbar > a:not(.button) { font-size: 13px; font-weight: 600; }
.toolbar form { margin: 0; }
.toolbar form > button { margin-top: 0; }

.stat-strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); background: var(--glass); border: 1px solid #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 25px 8px; margin: 0 0 28px; backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); }
.stat-item { min-width: 0; padding: 0 25px; border-right: 1px solid var(--line); }
.stat-item:last-child { border-right: 0; }
.stat-card { padding: 23px 25px; background: var(--glass); border: 1px solid rgba(255, 255, 255, .95); border-radius: 21px; box-shadow: var(--shadow); }
.stat, .stat-value { display: block; font-size: 32px; font-weight: 700; line-height: 1.3; letter-spacing: -1.2px; color: var(--forest); font-variant-numeric: tabular-nums; margin: 0 0 5px; }
.stat-label { display: block; color: #81678e; font-size: 12px; font-weight: 550; line-height: 1.5; }
.stat-item:nth-child(4n+1) .stat-value { color: #1765c6; }
.stat-item:nth-child(4n+2) .stat-value { color: #c3248d; }
.stat-item:nth-child(4n+3) .stat-value { color: #087b92; }
.stat-item:nth-child(4n+4) .stat-value { color: #c05b28; }
.stat-detail { display: block; color: var(--muted); font-size: 11px; margin-top: 6px; }
.card-icon, .action-icon { display: inline-grid; place-items: center; width: 43px; height: 43px; border-radius: 14px; background: linear-gradient(140deg, #d7eaff, #dcf7ff); color: #176eb1; border: 1px solid #bedff5; margin-bottom: 20px; font-size: 20px; }
.dashboard-grid:nth-of-type(even) .card-icon, .action-card .action-icon { background: linear-gradient(140deg, #d5fbfb, #e9ffd4); border-color: #b9ece8; color: #087d8a; }
.card-icon svg, .action-icon svg { width: 21px; height: 21px; }
.card-copy { min-width: 0; }
.action-card { text-decoration: none; color: var(--dark); transition: border-color var(--ease), box-shadow var(--ease); }
a.action-card { display: block; }
a.action-card:hover { color: var(--dark); border-color: #96c8ea; box-shadow: 0 17px 36px -23px rgba(26, 106, 177, .26); }
.action-title { font-size: 19px; font-weight: 700; letter-spacing: -.5px; color: var(--forest); margin: 0 0 9px; }
.action-description { color: var(--muted); font-size: 13px; margin-bottom: 19px; }
.next-step { background: #eaf5ff; border: 1px solid #cce3f5; border-radius: 17px; padding: 17px 19px; margin: 20px 0; }
.next-step p { font-size: 13px; color: #4f7a9c; }
.card.next-step { display: flex; align-items: center; gap: 22px; padding: 24px 28px; }
.card.next-step .card-icon { margin: 0; flex: 0 0 43px; }
.card.next-step .card-copy { flex: 1; }
.card.next-step .section-kicker { margin-bottom: 4px; }
.card.next-step h2 { margin-bottom: 6px; font-size: 19px; }
.card.next-step .button { flex: 0 0 auto; }
.step-list { list-style: none; margin: 20px 0 0; padding: 0; }
.step-list li { display: flex; align-items: flex-start; gap: 14px; padding: 16px 0; border-bottom: 1px solid var(--line); font-size: 13px; color: #81678e; }
.step-list li:last-child { border-bottom: 0; padding-bottom: 0; }
.step-list strong { display: block; color: #255a83; font-size: 13px; margin-bottom: 3px; }
.step-number { display: grid; place-items: center; flex: 0 0 29px; width: 29px; height: 29px; border: 1px solid #c9e0f3; background: #f4f5f7; border-radius: 10px; color: #9750b9; font-size: 11px; font-weight: 700; }
.empty-state { padding: 32px 16px; text-align: center; color: var(--muted); font-size: 13px; }
.empty-state h2, .empty-state h3 { color: #326e9b; font-size: 17px; margin: 12px 0 8px; }
.empty-state p { max-width: 420px; margin-left: auto; margin-right: auto; }
.empty-icon { display: grid; place-items: center; width: 49px; height: 49px; margin: 0 auto 16px; border-radius: 17px; color: #a865b7; background: #f7e9ff; }
.empty-icon svg { width: 23px; height: 23px; }
.session-list { display: flex; flex-direction: column; gap: 0; }
.session-item { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 19px 0; border-top: 1px solid var(--line); }
.session-item:first-child { padding-top: 0; border-top: 0; }
.session-item:last-child { padding-bottom: 0; }
.session-item h3 { margin: 0 0 5px; font-size: 14px; }
.session-item p, .session-item small { font-size: 12px; }

/* Consistent, generous targets make teacher forms easier to scan. */
button, .button { display: inline-flex; justify-content: center; align-items: center; gap: 9px; min-height: 44px; background: linear-gradient(115deg, #1765d9, #087d9f); color: #fff; border: 1px solid #2885cb; border-radius: 12px; padding: 11px 19px; font-size: 13px; font-weight: 650; line-height: 1.5; text-decoration: none; text-align: center; cursor: pointer; transition: background var(--ease), border-color var(--ease), box-shadow var(--ease); box-shadow: 0 5px 18px -8px rgba(25, 120, 199, .5); }
button:hover, .button:hover { background: #1556b3; border-color: #1556b3; color: #fff; }
button:disabled, .button[aria-disabled="true"] { opacity: .5; cursor: not-allowed; box-shadow: none; }
.secondary { background: rgba(255, 255, 255, .6); border-color: #c1d9ed; color: #1d68ab; box-shadow: none; }
.secondary:hover { background: #e8f4ff; border-color: #7bb4dd; color: #164f81; }
.danger { background: #95423a; border-color: #95423a; }
.danger:hover { background: #7e302c; border-color: #7e302c; }
.small { min-height: 36px; padding: 7px 12px; font-size: 12px; border-radius: 10px; }
.button svg, button svg { flex: 0 0 auto; width: 17px; height: 17px; }
form { margin: 0; }
form > button { margin-top: 20px; }
label { display: block; font-size: 12px; font-weight: 650; color: #375e80; margin: 17px 0 7px; }
input, select, textarea { width: 100%; min-width: 0; max-width: 100%; padding: 12px 14px; border: 1px solid #bed7ec; border-radius: 11px; background: rgba(255, 255, 255, .85); color: var(--dark); outline-offset: 3px; box-shadow: 0 1px 2px rgba(26, 106, 177, .02) inset; transition: border-color var(--ease), background var(--ease); }
input:hover, select:hover, textarea:hover { border-color: #7bb0da; }
input:focus, select:focus, textarea:focus { border-color: #2786d0; background: #fff; outline: 3px solid rgba(39, 134, 208, .20); }
input::placeholder, textarea::placeholder { color: #647b90; opacity: 1; }
input[type="checkbox"], input[type="radio"] { flex: 0 0 auto; width: 18px; height: 18px; min-height: 0; margin: 3px 7px 0 0; padding: 0; accent-color: var(--olive); box-shadow: none; }
input[type="file"] { padding: 10px; font-size: 13px; background: #f5faff; border-style: dashed; }
input[type="file"]::file-selector-button { padding: 8px 12px; margin-right: 12px; border: 1px solid #c8e1f5; border-radius: 8px; background: #eaf5ff; color: #1d68ab; font: 600 12px "Avenir Next", system-ui, sans-serif; cursor: pointer; }
textarea { min-height: 110px; resize: vertical; }
.code-input, input[name="code"] { font-family: ui-monospace, "SFMono-Regular", monospace; letter-spacing: 3px; text-transform: uppercase; font-size: 20px; padding: 14px 16px; }
input[name="code"]::placeholder { font-family: "Avenir Next", system-ui, sans-serif; letter-spacing: .2px; font-size: 12px; text-transform: none; }
.check { display: flex; align-items: flex-start; gap: 7px; font-size: 13px; font-weight: 450; line-height: 1.65; }
fieldset { border: 1px solid var(--line); border-radius: 16px; margin: 26px 0; padding: 20px 23px 24px; }
legend { font-size: 13px; font-weight: 700; padding: 0 8px; color: #1d68ab; }
fieldset .grid { gap: 8px 25px; }
.inline-form { display: flex; align-items: flex-end; gap: 15px; flex-wrap: wrap; margin-bottom: 24px; }
.inline-form > * { width: auto; }
.inline-form > div { min-width: 170px; }
.inline-form label { margin-top: 0; }
.inline-form input, .inline-form select { width: auto; max-width: 100%; }
.inline-form button { margin: 0; }
.join-form { margin-top: 20px; }
.join-form .inline-form { flex-wrap: nowrap; gap: 10px; margin-bottom: 15px; }
.join-form .code-input { flex: 1 1 0; width: 0; min-width: 0; height: 54px; }
.join-form .inline-form button { flex: 0 0 auto; width: auto; min-height: 54px; }
.upload-form { margin-top: 23px; }
.upload-feedback { margin: 11px 0 0; font-size: 12px; }
.upload-form > button { margin-top: 15px; }
.upload-progress { display: block; margin-top: 15px; }
.upload-progress[hidden] { display: none; }
.upload-summary { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.upload-summary .file-name { font-size: 20px; margin-bottom: 10px; }
.upload-summary .card-copy { flex: 1; }
.upload-summary .status-pill { flex: 0 0 auto; margin-top: 4px; }
.upload-summary p { font-size: 13px; }
.check-list { padding-left: 20px; margin: 18px 0 0; font-size: 13px; color: var(--muted); }
.check-list li { padding: 6px 0; }
.check-list li::marker { color: #b069c8; }
.notice { position: relative; padding: 16px 19px; border: 1px solid #c5e4f6; border-radius: 14px; background: rgba(251, 232, 255, .92); color: #246f9f; font-size: 13px; margin-bottom: 23px; }
.error, .validation-summary-errors, .field-validation-error, .text-danger { color: var(--error); }
.validation-summary-errors { padding: 12px 16px; border-radius: 12px; border: 1px solid #ebcdc7; background: #fff4f0; font-size: 13px; margin-bottom: 18px; }
.validation-summary-errors ul { padding-left: 17px; margin: 0; }
.validation-summary-valid { display: none; }
.input-validation-error { border-color: #bc665c; }
.badge, .status-pill { display: inline-flex; align-items: center; gap: 6px; background: #eaf5ff; border: 1px solid #cce3f5; padding: 4px 10px; border-radius: 100px; font-size: 10px; font-weight: 650; line-height: 1.6; color: #406d94; white-space: nowrap; vertical-align: middle; }
.badge.warning, .status-pill.warning { background: #f6f0db; border-color: #eaddb7; color: #7c632b; }
.status-pill.success { background: #e7f0e3; border-color: #d4e3ca; color: #3a6134; }
.status-pill.neutral { background: #eff6fb; border-color: #d5e6f2; color: #627d95; }
.status-pill.error { background: #faeae6; border-color: #efd1c9; color: #91483e; }

/* Tables retain their plain labels; light rules keep the page airy. */
/* Keep absolute screen-reader labels inside their scrolling table, even on narrow phones. */
.table-wrap, .table-scroll { position: relative; max-width: 100%; overflow-x: auto; overscroll-behavior-x: contain; -webkit-overflow-scrolling: touch; border-radius: 13px; border: 1px solid rgba(31, 105, 173, .08); }
table { width: 100%; border-collapse: collapse; font-size: 12px; line-height: 1.6; }
th { text-align: left; background: rgba(242, 225, 255, .61); color: #5a7e9d; font-size: 9px; font-weight: 750; text-transform: uppercase; letter-spacing: 1.1px; white-space: nowrap; }
td, th { padding: 16px; border-bottom: 1px solid rgba(31, 105, 173, .09); vertical-align: top; }
td { color: #58748e; }
td:first-child { color: #255a83; }
td a { font-weight: 600; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: rgba(248, 232, 255, .42); }
td form { display: inline-block; }
td form button { margin-top: 0; }
td input, td select { min-width: 110px; font-size: 12px; }
td label { font-size: 10px; }
td code { font-size: 11px; overflow-wrap: anywhere; }
details { border-top: 1px solid var(--line); margin: 17px 0 0; padding-top: 17px; }
summary { cursor: pointer; font-size: 13px; font-weight: 650; color: #1d68ab; padding-right: 8px; }
details[open] > summary { margin-bottom: 18px; }
summary::marker { color: #7da7c9; }
pre { white-space: pre-wrap; overflow-wrap: anywhere; padding: 19px; border: 1px solid #cce3f5; border-radius: 13px; background: #eef7ff; color: #375f86; font-size: 12px; line-height: 1.75; }
code { font-family: ui-monospace, "SFMono-Regular", Consolas, monospace; }
progress { width: 100%; height: 8px; accent-color: #2786d0; border: 0; border-radius: 9px; overflow: hidden; }
progress::-webkit-progress-bar { background: #eee0f8; border-radius: 9px; }
progress::-webkit-progress-value { background: #2786d0; border-radius: 9px; }

/* Assessment controls stay stable while the timer is running. */
.timer { position: sticky; top: 115px; z-index: 10; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; border: 1px solid rgba(255, 255, 255, .15); border-radius: 16px; padding: 16px 22px; background: #174d8b; color: #f9fdff; box-shadow: 0 9px 25px -16px rgba(21, 96, 185, .4); font-variant-numeric: tabular-nums; }
.timer small, .timer .muted { color: #d3eaff; }
.test-header { position: sticky; top: 110px; z-index: 15; align-items: center; padding: 14px 19px; border: 1px solid #fff; border-radius: 18px; background: rgba(247, 247, 247, .96); box-shadow: 0 10px 22px -20px rgba(26, 106, 177, .25); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); }
.test-header .eyebrow { margin-bottom: 4px; font-size: 9px; }
.test-header h1 { font-size: 26px; margin-bottom: 0; letter-spacing: -.8px; }
.test-header .timer { position: static; min-width: 163px; justify-content: center; padding: 12px 17px; font-size: 14px; }
.question { scroll-margin-top: 220px; }
.option { display: flex; align-items: flex-start; gap: 10px; padding: 16px 18px; border: 1px solid #c9e0f3; border-radius: 13px; background: rgba(255, 255, 255, .72); font-weight: 450; font-size: 14px; line-height: 1.6; cursor: pointer; transition: background var(--ease), border-color var(--ease); }
.option:hover { background: #eff8ff; border-color: #8ebde1; }
.option:has(input:checked) { background: #dceeff; border-color: #2786d0; box-shadow: 0 0 0 1px #2786d0; }
.option input { margin-top: 2px; }
.question { margin: 28px 0; }
.question h2 { font-size: 19px; line-height: 1.5; }
.question .eyebrow { margin-bottom: 14px; }
.selection-hint { color: #6c8399; font-size: 11px; margin: 9px 0 15px; }
.save-status { font-size: 12px; color: #3e7aa9; }
.attempt-toolbar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin: 28px 0; }
.access-code { display: inline-block; font: 650 clamp(25px, 4vw, 38px)/1.5 ui-monospace, "SFMono-Regular", monospace; letter-spacing: 5px; color: var(--forest); padding: 12px 18px; background: #eaf5ff; border: 1px solid #c5e4f6; border-radius: 13px; }
.correct { border-left: 4px solid #6d8c52; }
.incorrect { border-left: 4px solid #b76254; }
.score-panel { text-align: center; max-width: 690px; margin: 0 auto; padding: 43px 35px; }
.score-panel .score-value { font-size: clamp(34px, 4.5vw, 48px); letter-spacing: -1.6px; margin: 17px 0 25px; }
.score-panel .stat-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); box-shadow: none; background: #edf7ff; border-color: #cce3f5; }
.score-panel .stat-item { padding: 0 20px; }
.score-panel .toolbar { justify-content: center; }
.review-question { padding-bottom: 5px; }
.result-summary { padding: 14px 18px; margin-bottom: 24px; border: 1px solid #c9e0f3; border-radius: 13px; background: #edf7ff; }
.result-summary p { margin: 0; align-self: center; }
.review-question.result-correct,
.review-question.result-incorrect { padding: 17px 18px; border: 1px solid; border-inline-start-width: 4px; border-radius: 13px; }
.review-question.result-correct { background: #f0faf4; border-color: #93c8aa; border-inline-start-color: #23764d; }
.review-question.result-incorrect { background: #fff3f3; border-color: #dcaaa8; border-inline-start-color: #b94349; }
.review-result-label { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 16px; margin-top: 11px; font-size: 13px; font-weight: 700; }
.review-result-label [lang="ar"] { font-family: "Segoe UI", Tahoma, Arial, sans-serif; font-size: 16px; text-align: right; }
.review-question.result-correct .review-result-label { color: #205d3e; }
.review-question.result-incorrect .review-result-label { color: #8b3037; }
.review-answer-result { padding: 14px 16px; border: 1px solid; border-radius: 11px; }
.review-answer-result.result-correct { background: #e4f5eb; border-color: #93c8aa; }
.review-answer-result.result-incorrect { background: #ffe8e8; border-color: #dcaaa8; }

/* Class rankings show only the essential comparison. */
.leaderboard-summary { flex: 0 0 180px; display: flex; flex-direction: column; justify-content: center; gap: 3px; padding: 23px; border-radius: 19px; border: 1px solid rgba(232, 229, 222, .19); background: rgba(232, 229, 222, .07); text-align: center; backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.leaderboard-summary strong { color: #deff9e; font-size: 34px; font-weight: 650; letter-spacing: -1px; line-height: 1.3; }
.hero-panel .leaderboard-summary p, .leaderboard-summary span { color: #eee1ff; font-size: 11px; }
.leaderboard-top { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin-bottom: 26px; }
.leaderboard-list { display: flex; flex-direction: column; gap: 8px; }
.leaderboard-row { display: grid; grid-template-columns: 52px minmax(120px, 1fr) 100px 80px; align-items: center; gap: 16px; padding: 15px 18px; border-radius: 15px; border: 1px solid transparent; background: rgba(250, 241, 255, .58); }
.leaderboard-row.is-you, .leaderboard-table tr.is-you { background: #dceeff; border-color: #99c8ed; }
.leaderboard-person { display: flex; gap: 13px; align-items: center; min-width: 0; }
.leaderboard-person strong { display: block; font-size: 13px; font-weight: 650; color: #255a83; }
.leaderboard-avatar { flex: 0 0 38px; width: 38px; height: 38px; display: grid; place-items: center; border-radius: 13px; color: #2d7bbb; background: #e0f1ff; font-size: 12px; font-weight: 700; }
.leaderboard-score { font-size: 20px; font-weight: 700; letter-spacing: -.7px; color: var(--forest); font-variant-numeric: tabular-nums; }
.leaderboard-meta { font-size: 11px; color: var(--muted); }
.rank-badge { display: inline-grid; place-items: center; width: 31px; height: 31px; border-radius: 10px; background: #e8f4ff; color: #537fa6; font-size: 12px; font-weight: 750; font-variant-numeric: tabular-nums; }
.rank-badge.rank-1 { background: #ffefb2; color: #8b5700; }
.rank-badge.rank-2 { background: #d3f5ff; color: #126b86; }
.rank-badge.rank-3 { background: #ffe1ee; color: #a82d6f; }
.leaderboard-table { font-size: 13px; }
.leaderboard-table td { vertical-align: middle; padding-top: 18px; padding-bottom: 18px; }
.leaderboard-table tbody th { vertical-align: middle; background: transparent; text-transform: none; letter-spacing: 0; white-space: normal; color: #255a83; font-size: 15px; font-weight: 650; }
.leaderboard-table td:first-child { width: 65px; }
.leaderboard-table .leaderboard-score { font-size: 19px; }
.leaderboard-table .unranked-label { display: inline-block; font-size: 11px; font-weight: 550; letter-spacing: 0; line-height: 1.4; color: var(--muted); }
.leaderboard-summary .stat-detail { display: block; max-width: 200px; font-size: 11px; margin-top: 6px; }
.leaderboard-basis { max-width: 670px; font-size: 13px; color: var(--muted); }
.leaderboard-note { margin-top: 18px; font-size: 12px; color: var(--muted); }
.class-tabs { display: flex; list-style: none; padding: 0; gap: 7px; margin: 0 0 23px; }
.class-tabs a { display: inline-block; padding: 9px 18px; border: 1px solid transparent; border-radius: 11px; text-decoration: none; font-size: 12px; font-weight: 650; color: #507ba0; }
.class-tabs a:hover { background: #e4f3ff; }
.class-tabs a.is-active, .class-tabs a[aria-current="page"] { color: var(--forest); border-color: #aed4f1; background: #e4f2ff; }

/* A colorful welcome leaves clear space for sign-in and school identity. */
.auth-layout .site-header { background: rgba(247, 252, 255, .65); border-bottom-color: transparent; }
.auth-layout .site-main { margin-top: 34px; display: grid; align-content: center; min-height: calc(100vh - 252px); }
.login { width: 100%; max-width: 480px; padding: 36px; margin: 15px auto 28px; }
.login h1 { font-size: 32px; }
.login-logo { display: block; width: 133px; height: auto; margin: 0 auto 24px; border-radius: 10px; }
.login form { margin-top: 23px; }
.login form button { width: 100%; margin-top: 24px; }
.login > .muted { margin-top: 21px; font-size: 12px; }
.auth-shell { display: grid; grid-template-columns: minmax(0, 1fr) minmax(370px, .88fr); gap: 0; width: 100%; max-width: 1040px; margin: 0 auto; background: var(--glass); border: 1px solid #fff; border-radius: 30px; box-shadow: var(--shadow); overflow: hidden; backdrop-filter: blur(22px); -webkit-backdrop-filter: blur(22px); }
.auth-panel { padding: clamp(30px, 4vw, 55px); min-width: 0; }
.auth-panel h1 { font-size: 32px; }
.auth-panel h2 { font-size: 29px; letter-spacing: -.9px; }
.auth-panel form { margin-top: 27px; }
.auth-panel form button { width: 100%; margin-top: 25px; }
.auth-panel > .muted { font-size: 12px; margin-top: 22px; }
.auth-panel > .subtle { font-size: 11px; margin-top: 22px; }
.auth-panel .login-logo { margin-left: 0; width: 113px; margin-bottom: 23px; }
.auth-aside { position: relative; isolation: isolate; display: flex; flex-direction: column; justify-content: center; padding: clamp(32px, 4vw, 54px); overflow: hidden; background: linear-gradient(118deg, #071f53 0%, #1246aa 42%, #096fbb 76%, #0d96aa 100%); color: #e0f0ff; }
.auth-aside::before { content: ""; position: absolute; inset: -10% -80% -10% 10%; background: linear-gradient(135deg, #579fff, #2876ed 40%, #29d9ed 75%, #d2f97c); opacity: .35; mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1000 400' preserveAspectRatio='none'%3E%3Cpath d='M0 230C180 30 300 350 520 140S850 80 1000 170V400H0Z' fill='white'/%3E%3C/svg%3E"); mask-size: 100% 100%; z-index: -1; pointer-events: none; animation: hero-swell 19s ease-in-out infinite alternate; }
.auth-aside::after { inset: 8% -80% 0 10%; opacity: .32; }
.auth-aside h1, .auth-aside h2 { color: #f9fdff; font-size: clamp(28px, 3vw, 38px); line-height: 1.23; letter-spacing: -1.4px; margin-bottom: 20px; }
.auth-aside .eyebrow { color: #9fefff; }
.auth-aside p { font-size: 14px; color: #d3eaff; }
.auth-aside .step-list li { border-bottom-color: rgba(232, 229, 222, .13); color: #d4eaff; }
.auth-aside .step-list strong { color: #f5fbff; }
.auth-aside .step-number { background: rgba(242, 239, 233, .08); border-color: rgba(232, 229, 222, .22); color: #d5ffaf; }
.auth-aside .hero-art { width: 180px; height: 180px; flex-basis: 180px; align-self: flex-start; margin: 0 0 24px -10px; }
.auth-aside .auth-signature { font-size: 9px; letter-spacing: 1.7px; text-transform: uppercase; color: #adceeb; margin-top: 29px; }

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
    .site-header { background: #f3faff; }
    .card, .action-card, .tile, .leaderboard-panel, .stat-strip, .stat-card, .auth-shell { background: #f9fdff; }
}
@media (min-width: 1500px) { .site-main { margin-top: 44px; } }
@media (max-width: 1120px) {
    .header-inner { gap: 14px; }
    .main-nav > a { padding: 9px 10px; font-size: 12px; }
    .brand strong { font-size: 17px; }
    .brand-mark { width: 65px; height: 57px; }
    .brand img { width: 58px; }
    .brand { gap: 10px; }
    .signout-form { margin-left: 5px; padding-left: 11px; }
}
@media (max-width: 1000px) {
    .header-inner { min-height: 86px; flex-wrap: wrap; padding-top: 13px; padding-bottom: 13px; }
    .main-nav { width: 100%; flex-wrap: wrap; padding: 9px 0 4px; gap: 7px; }
    .main-nav > a { padding: 10px 13px; font-size: 13px; }
    .nav-enhanced .nav-toggle { display: inline-flex; min-height: 39px; padding: 8px 12px; font-size: 12px; margin: 0; }
    .nav-enhanced .main-nav { display: none; }
    .nav-enhanced.is-nav-open .main-nav { display: flex; }
    .main-nav .signout-form { margin-left: auto; }
    .site-main { margin-top: 28px; }
    .hero-panel, .page-hero { min-height: 211px; gap: 25px; }
    .dashboard-grid { grid-template-columns: minmax(0, 1.2fr) minmax(265px, 1fr); gap: 20px; }
    .stat-item { padding: 0 21px; }
    .stat-value { font-size: 28px; }
    .timer { top: 100px; }
    .test-header { top: 97px; }
    .auth-shell { grid-template-columns: minmax(0, 1fr) minmax(310px, .8fr); }
    .hero-art { flex-basis: 150px; width: 150px; height: 150px; margin-right: 0; }
}
@media (max-width: 760px) {
    html { scroll-padding-top: 98px; }
    input, select, textarea { font-size: 16px; }
    td input, td select { font-size: 16px; }
    input[type="file"] { font-size: 16px; }
    .header-inner { padding-left: 20px; padding-right: 20px; }
    .brand-mark { width: 58px; height: 51px; border-radius: 13px; }
    .brand img { width: 51px; }
    .brand strong { font-size: 16px; letter-spacing: -.5px; }
    .brand-school { font-size: 9px; letter-spacing: 1.5px; }
    .site-main { padding-left: 19px; padding-right: 19px; margin-top: 22px; margin-bottom: 34px; }
    .site-footer { font-size: 10px; gap: 7px; padding-left: 16px; padding-right: 16px; }
    h1 { font-size: 31px; letter-spacing: -1.1px; }
    h2 { font-size: 19px; }
    .page-header, .split { flex-direction: column; align-items: stretch; gap: 16px; margin-bottom: 22px; }
    .page-header > .button, .split > .button { align-self: flex-start; }
    .split .toolbar { margin: 0; }
    .hero-panel, .page-hero { flex-direction: column; align-items: stretch; padding: 28px; border-radius: 23px; gap: 0; min-height: auto; }
    .hero-panel h1, .page-hero h1 { font-size: 34px; letter-spacing: -1.3px; max-width: 580px; }
    .hero-panel p:not(.eyebrow):not(.hero-kicker), .page-hero p:not(.eyebrow):not(.hero-kicker) { font-size: 13px; }
    .hero-actions { max-width: none; width: auto; margin-top: 23px; }
    .hero-art { display: none; }
    .hero-panel::before, .page-hero::before { inset: -30% -75% -45% 7%; opacity: .28; }
    .dashboard-grid { grid-template-columns: 1fr; gap: 0; }
    .dashboard-grid > .card, .dashboard-grid > .action-card { height: auto; }
    .grid { gap: 0 20px; }
    .stat-strip { padding: 21px 0; }
    .stat-item { padding: 0 16px; }
    .stat-label { font-size: 11px; }
    .stat-value, .stat { font-size: 28px; }
    .stat-detail { display: none; }
    .card, .action-card, .tile, .leaderboard-panel { padding: 23px; border-radius: 21px; margin-bottom: 21px; }
    .card.next-step { flex-wrap: wrap; padding: 24px; gap: 18px; }
    .card.next-step .card-icon { display: none; }
    .card.next-step .card-copy { flex-basis: 100%; }
    .table-wrap, .table-scroll { margin-top: 4px; }
    td, th { padding: 13px; }
    .section-header, .section-heading { gap: 12px; align-items: flex-start; }
    .section-header > a, .section-heading > a { font-size: 11px; }
    .empty-state { padding: 25px 5px; }
    .timer { top: 99px; padding: 13px 17px; }
    .test-header { top: 96px; flex-direction: row; align-items: center; gap: 12px; padding: 11px 13px; }
    .test-header h1 { font-size: 23px; }
    .test-header .eyebrow { font-size: 7px; letter-spacing: 1px; }
    .test-header .timer { min-width: 139px; padding: 10px 12px; font-size: 12px; }
    .question h2 { font-size: 17px; }
    .option { font-size: 13px; padding: 14px; }
    .inline-form { align-items: stretch; gap: 13px; }
    .inline-form > div { flex: 1 1 200px; min-width: 0; }
    .inline-form input, .inline-form select { width: 100%; }
    .leaderboard-summary { margin-top: 23px; flex-basis: auto; align-items: flex-start; padding: 15px 19px; text-align: left; }
    .leaderboard-summary strong { font-size: 28px; }
    .leaderboard-row { grid-template-columns: 33px minmax(100px, 1fr) 65px 45px; gap: 10px; padding: 13px 10px; }
    .leaderboard-avatar { display: none; }
    .leaderboard-score { font-size: 18px; }
    .leaderboard-person strong { font-size: 12px; }
    .leaderboard-top { gap: 11px; }
    .leaderboard-table th { white-space: normal; }
    .leaderboard-table, .leaderboard-table tbody { display: block; }
    .leaderboard-table thead { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
    .leaderboard-table tbody tr { display: grid; grid-template-columns: 34px minmax(0, 1fr) 70px; grid-template-rows: auto auto; align-items: center; column-gap: 12px; row-gap: 3px; padding: 16px 13px; border-bottom: 1px solid var(--line); }
    .leaderboard-table tbody tr:last-child { border-bottom: 0; }
    .leaderboard-table tbody td, .leaderboard-table tbody th { padding: 0; border: 0; }
    .leaderboard-table tbody td:first-child { grid-column: 1; grid-row: 1 / span 2; width: auto; }
    .leaderboard-table tbody th { grid-column: 2; grid-row: 1; min-width: 0; font-size: 14px; line-height: 1.5; overflow-wrap: anywhere; }
    .leaderboard-table tbody .leaderboard-score { grid-column: 3; grid-row: 1 / span 2; justify-self: end; font-size: 18px; line-height: 1.4; text-align: right; }
    .leaderboard-table tbody .leaderboard-meta { grid-column: 2; grid-row: 2; font-size: 10px; }
    .leaderboard-table tbody .leaderboard-meta::before { content: "Tests finished: "; }
    .auth-layout .site-main { margin-top: 10px; }
    .auth-shell { grid-template-columns: minmax(0, 1fr); max-width: 510px; border-radius: 25px; }
    .auth-panel { padding: 31px; }
    .auth-aside { padding: 30px 32px; }
    .auth-aside h1, .auth-aside h2 { font-size: 29px; }
    .auth-aside .step-list, .auth-aside .hero-art { display: none; }
    .auth-aside p { font-size: 13px; }
    .login { padding: 30px; }
    .score-panel { padding: 33px 23px; }
}
@media (max-width: 460px) {
    .header-inner { padding-left: 16px; padding-right: 16px; gap: 10px; }
    .brand { gap: 9px; }
    .brand-mark { width: 49px; height: 46px; }
    .brand img { width: 44px; }
    .brand strong { font-size: 14px; }
    .brand-school { font-size: 8px; }
    .nav-enhanced .nav-toggle { font-size: 0; gap: 0; padding: 9px; }
    .nav-toggle svg { width: 19px; height: 19px; }
    .main-nav { gap: 4px; }
    .main-nav > a { font-size: 12px; padding: 9px 11px; }
    .main-nav .signout-form { margin-left: 0; padding-left: 0; border-left: 0; }
    .site-main { padding-left: 15px; padding-right: 15px; }
    .hero-panel, .page-hero { padding: 26px 23px; }
    .hero-panel h1, .page-hero h1 { font-size: 31px; }
    .hero-actions .button { font-size: 12px; padding: 10px 15px; }
    .stat-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 0; overflow: hidden; }
    .stat-item { padding: 18px 20px; border-bottom: 1px solid var(--line); }
    .stat-item:nth-child(2) { border-right: 0; }
    .stat-item:nth-last-child(-n+2) { border-bottom: 0; }
    .stat-value { font-size: 27px; }
    .card, .action-card, .tile, .leaderboard-panel { padding: 21px; }
    .eyebrow, .page-eyebrow { font-size: 9px; letter-spacing: 1.6px; }
    .leaderboard-row { grid-template-columns: 29px minmax(78px, 1fr) 56px 34px; gap: 7px; padding: 12px 8px; }
    .leaderboard-meta { font-size: 10px; }
    .rank-badge { width: 27px; height: 27px; font-size: 11px; }
    .auth-panel { padding: 27px 24px; }
    .auth-aside { padding: 28px 25px; }
    .school-year { font-size: 10px; padding: 6px 9px; letter-spacing: 1px; }
    .score-panel .stat-item { padding: 17px 12px; border-bottom: 0; }
    .score-panel .score-value { font-size: 34px; }
}
@keyframes ambient-flow {
    from { transform: translate3d(-4%, -5%, 0) rotate(-5deg) scale(1.02); }
    to { transform: translate3d(7%, 9%, 0) rotate(6deg) scale(1.08); }
}
@media (max-width: 460px) {
    .header-inner .header-tools { gap: 5px; }
    .header-inner { padding-left: 12px; padding-right: 12px; gap: 8px; }
    .brand { gap: 7px; }
    .brand-mark { width: 43px; height: 45px; }
    .brand img { width: 39px; }
    .brand strong { font-size: 12px; }
}
@media (max-width: 360px) {
    .brand-copy { max-width: 84px; }
    .brand strong { line-height: 1.15; }
}
@keyframes hero-swell {
    from { transform: translate3d(-3%, -5%, 0) rotate(-5deg); }
    to { transform: translate3d(6%, 7%, 0) rotate(6deg); }
}
@keyframes code-float {
    from { transform: translateY(-4px) rotate(-2deg); }
    to { transform: translateY(5px) rotate(2deg); }
}
@keyframes signal-groove {
    from { transform: scaleY(.45); }
    to { transform: scaleY(1); }
}
:root:not([data-motion="running"]) :is(.ambient-wave, .signal-code, .signal-spark, .signal-bars rect),
:root:not([data-motion="running"]) :is(.hero-panel, .page-hero, .auth-aside)::before,
:root:not([data-motion="running"]) :is(.hero-panel, .page-hero, .auth-aside)::after { animation: none !important; }
@media (max-width: 760px) {
    .ambient-wave { opacity: .15; width: 190%; left: -45%; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
@media (prefers-contrast: more) {
    :root { --muted: #46576e; --line: #9facbf; --glass: #fff; }
    .card, .action-card, .tile, .leaderboard-panel, .stat-strip, .stat-card { border-color: #a4b1c4; }
    .main-nav > a { color: #375f86; }
    .stat-label, .leaderboard-meta { color: #46576e; }
}
@media print {
    .site-header, .site-footer, .skip, .hero-actions, .toolbar, .ambient-scene, .hero-art { display: none; }
    .hero-panel::before, .hero-panel::after, .page-hero::before, .page-hero::after, .auth-aside::before, .auth-aside::after { display: none; }
    body { background: #fff; color: #111; font-size: 11pt; }
    body::before { display: none; }
    .site-main { max-width: none; padding: 0; margin: 0; }
    .card, .action-card, .leaderboard-panel, .stat-strip { background: #fff; border: 1px solid #bbb; box-shadow: none; backdrop-filter: none; break-inside: avoid; }
    .hero-panel, .page-hero { color: #111; background: #fff; box-shadow: none; border: 1px solid #bbb; padding: 20px; }
    .hero-panel h1, .page-hero h1, .hero-panel p:not(.eyebrow), .page-hero p:not(.eyebrow) { color: #111; }
    .table-wrap, .table-scroll { overflow: visible; }
    .timer { position: static; background: #fff; color: #111; border: 1px solid #bbb; }
}
