/*
 * Aurora design system, Raven edition: raven black #0c0c0f, powder blue #b8d4ec, poppy red #e8352b.
 * Light: powder-tinted canvas, white cards. Dark: raven canvas (follows the device, or data-theme on <html>).
 * Rules: one .hero per screen; amber-orange = behind/wrong; green = good.
 * Release C colour rule: red (or white on the dark top card) = click here, one main button per screen;
 * powder blue = progress (bars, chart); every other button outlined (--edge, at least 3:1). White text on
 * --cta is 5.24:1 (the old #e8352b was 4.22:1); --poppy is the brand red for decoration only.
 */
:root {
  --bg: #edf2f8; --dots: #cbd8e6; --panel: #ffffff; --panel-2: #f3f6fa;
  --fg: #0c0c0f; --ink: #33363e; --muted: #5f6878; --faint: #98a1b0; --badge-n: #4b5563;
  --line: #e2e8ef; --grid: #e8edf3;
  --accent: #d0281e; --accent-strong: #b3201a; --accent-bg: #fdecea; --on-accent: #ffffff;
  --cta: #d0281e; --cta-strong: #b3201a; --on-cta: #ffffff; --edge: #737c8c; --poppy: #e8352b;
  --powder: #b8d4ec; --powder-ink: #5f88ad; --powder-bg: #e3eef8; --powder-text: #1f3a52;
  --good: #15803d; --good-bg: #e8f7ee;
  --bad: #c2410c; --bad-bg: #fff1e6;
  --warn: #b45309; --warn-bg: #fff6df;
  --rose: #be185d; --rose-bg: #fdeef5;
  --l1: #4f7699; --l2: #7aa6cf;
  --radius: 22px;
  --shadow-card: 0 1px 2px rgba(12,12,15,.04), 0 12px 30px -20px rgba(12,12,15,.18);
  --shadow: 0 10px 30px -10px rgba(12,12,15,.4);
  --hatch: repeating-linear-gradient(135deg, #e6ecf3 0 5px, #f3f6fa 5px 10px);
  --sans: 'Geist', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #08080a; --dots: #1d1f25; --panel: #121317; --panel-2: #18191e;
    --fg: #f1f4f8; --ink: #c9cdd5; --muted: #8e95a2; --faint: #616874; --badge-n: #c9cdd5;
    --line: #23252c; --grid: #1f2126;
    --accent: #ff4b3e; --accent-strong: #ff6b5f; --accent-bg: rgba(255,75,62,.14); --on-accent: #ffffff;
    --cta: #d0281e; --cta-strong: #b3201a; --on-cta: #ffffff; --edge: #727a88; --poppy: #e8352b;
    --powder: #b8d4ec; --powder-ink: #b8d4ec; --powder-bg: rgba(184,212,236,.12); --powder-text: #b8d4ec;
    --good: #5ee09a; --good-bg: rgba(94,224,154,.12);
    --bad: #ffa25c; --bad-bg: rgba(255,162,92,.14);
    --warn: #fbbf24; --warn-bg: rgba(251,191,36,.13);
    --rose: #ff7ab6; --rose-bg: rgba(255,122,182,.14);
    --l1: #8fb6da; --l2: #b8d4ec;
    --shadow-card: 0 1px 2px rgba(0,0,0,.4), 0 12px 30px -20px rgba(0,0,0,.7);
    --shadow: 0 10px 30px -10px rgba(0,0,0,.8);
    --hatch: repeating-linear-gradient(135deg, #1d1f25 0 5px, #16171c 5px 10px);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #08080a; --dots: #1d1f25; --panel: #121317; --panel-2: #18191e;
    --fg: #f1f4f8; --ink: #c9cdd5; --muted: #8e95a2; --faint: #616874; --badge-n: #c9cdd5;
    --line: #23252c; --grid: #1f2126;
    --accent: #ff4b3e; --accent-strong: #ff6b5f; --accent-bg: rgba(255,75,62,.14); --on-accent: #ffffff;
    --cta: #d0281e; --cta-strong: #b3201a; --on-cta: #ffffff; --edge: #727a88; --poppy: #e8352b;
    --powder: #b8d4ec; --powder-ink: #b8d4ec; --powder-bg: rgba(184,212,236,.12); --powder-text: #b8d4ec;
    --good: #5ee09a; --good-bg: rgba(94,224,154,.12);
    --bad: #ffa25c; --bad-bg: rgba(255,162,92,.14);
    --warn: #fbbf24; --warn-bg: rgba(251,191,36,.13);
    --rose: #ff7ab6; --rose-bg: rgba(255,122,182,.14);
    --l1: #8fb6da; --l2: #b8d4ec;
    --shadow-card: 0 1px 2px rgba(0,0,0,.4), 0 12px 30px -20px rgba(0,0,0,.7);
    --shadow: 0 10px 30px -10px rgba(0,0,0,.8);
    --hatch: repeating-linear-gradient(135deg, #1d1f25 0 5px, #16171c 5px 10px);
    color-scheme: dark;
}

/* Base */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; }
body.aurora {
  background: var(--bg); color: var(--fg); font-family: var(--sans); font-size: 14px; line-height: 1.5;
  -webkit-font-smoothing: antialiased; font-variant-numeric: tabular-nums;
  background-image: radial-gradient(var(--dots) 1px, transparent 1px); background-size: 22px 22px;
  min-height: 100vh;
}
.aurora button, .aurora input, .aurora select, .aurora textarea { font: inherit; color: inherit; }
.aurora a { color: inherit; }
.aurora :focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.aurora h1, .aurora h2, .aurora h3, .aurora h4 { margin: 0; font-weight: 600; letter-spacing: -.02em; }
.num { font-weight: 500; letter-spacing: -0.025em; font-feature-settings: 'tnum' 1; }
.wrap { max-width: 1240px; margin: 0 auto; padding: 18px max(16px, env(safe-area-inset-right, 0px)) 48px max(16px, env(safe-area-inset-left, 0px)); display: flex; flex-direction: column; gap: 22px; }
.eyebrow { font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); font-weight: 500; }
.lab { color: var(--muted); font-size: 13px; }
.muted { color: var(--muted); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Nav */
/* Top bar: raven black in both themes so the white Express logo always reads */
.nav { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; background: #0c0c0f; border: 1px solid rgba(255,255,255,.07); border-radius: 20px; padding: 16px 18px 16px 24px; box-shadow: 0 1px 2px rgba(0,0,0,.08), 0 14px 30px -18px rgba(12,12,15,.55); color: #f1f4f8; }
.brand { display: flex; align-items: center; text-decoration: none; min-height: 40px; }
.brand-logo { height: 34px; width: auto; display: block; color: #fff; font-weight: 700; font-size: 16px; }
.wordmark { font-weight: 700; letter-spacing: -.03em; font-size: 17px; color: var(--fg); }
.wordmark em { font-style: normal; color: var(--accent); }
.product { font-size: 11px; letter-spacing: .22em; text-transform: uppercase; color: rgba(255,255,255,.55); margin-left: 14px; padding-left: 14px; border-left: 1px solid rgba(255,255,255,.14); }
.links { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; font-size: 13.5px; }
.aurora .links a { color: rgba(255,255,255,.68); text-decoration: none; padding: 8px 12px; border-radius: 10px; font-weight: 500; }
.aurora .links a:hover { color: #fff; background: rgba(255,255,255,.08); }
.aurora .links a.on { color: #fff; background: rgba(255,255,255,.12); font-weight: 600; box-shadow: inset 0 -2px 0 #e8352b; }
.avatar { width: 28px; height: 28px; border-radius: 50%; background: linear-gradient(135deg, #ff5a4c, #c4231b); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; flex: none; text-transform: uppercase; }
.who { display: inline-flex; align-items: center; gap: 8px; color: #fff; font-weight: 500; padding-left: 6px; }

/* Cards */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 24px; min-width: 0; box-shadow: var(--shadow-card); }
.ch { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.ct { display: flex; align-items: center; gap: 12px; font-size: 17px; font-weight: 600; letter-spacing: -.01em; }
.big { font-size: 34px; line-height: 1.1; margin-top: 6px; }
.big small { font-size: 15px; color: var(--muted); font-weight: 400; letter-spacing: 0; }
.ctx { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 10px; font-size: 12.5px; color: var(--muted); }
.mono .ct .icon { color: var(--ink); width: 20px; height: 20px; flex: none; }
.mono .ct { gap: 10px; }
.empty { text-align: center; padding: 28px 12px; color: var(--muted); font-size: 13.5px; }
.empty b { display: block; color: var(--fg); font-size: 15px; margin-bottom: 4px; }
/* Release C: an empty box = one line what shows here, one button for the first step, one helpful detail */
.empty:has(.btn-a, .edetail) { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.empty:has(.btn-a, .edetail) b { margin-bottom: 0; }
.empty .edetail { font-size: 12.5px; color: var(--muted); }
.empty .btn-a.two-line { align-items: center; text-align: center; }
.pline { margin: 10px 0 0; color: var(--ink); font-size: 13.5px; }

/* Icon tiles (top row and strip only) */
.ic { width: 40px; height: 40px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; color: #fff; box-shadow: inset 0 -2px 0 rgba(0,0,0,.14); flex: none; }
.ic svg { width: 20px; height: 20px; }
.ic.sm { width: 32px; height: 32px; border-radius: 10px; } .ic.sm svg { width: 17px; height: 17px; }
.ic.red { background: linear-gradient(135deg, #ff5a4c, #c4231b); }
.ic.crimson { background: linear-gradient(135deg, #c4231b, #6e120d); }
.ic.powder { background: linear-gradient(135deg, #d3e5f4, #8fb6da); color: #0c0c0f; }
.ic.charcoal { background: linear-gradient(135deg, #3a3c45, #0c0c0f); }
.ic.rose { background: linear-gradient(135deg, #fb7185, #e11d48); }
.ic.amber { background: linear-gradient(135deg, #fbbf24, #f59e0b); }

/* Badges and deltas */
.delta, .badge { display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px; font-weight: 600; padding: 3px 9px; border-radius: 999px; white-space: nowrap; }
.delta.up, .badge.g { color: var(--good); background: var(--good-bg); }
.delta.down, .badge.o { color: var(--bad); background: var(--bad-bg); }
.delta.flat, .badge.n { color: var(--muted); background: var(--grid); }
.badge.n { color: var(--badge-n); }  /* >= 4.5:1 on the grid grey, light and dark */
.badge.r { color: var(--accent); background: var(--accent-bg); }
.badge.b { color: var(--powder-text); background: var(--powder-bg); }
.badge.w { color: var(--warn); background: var(--warn-bg); }
.badge.p { color: var(--rose); background: var(--rose-bg); }

/* Buttons */
.btn-a { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 12px; padding: 10px 16px; font-weight: 600; font-size: 13.5px; cursor: pointer; text-decoration: none; white-space: nowrap; line-height: 1.2; }
.btn-a svg { width: 16px; height: 16px; }
.btn-a.primary { background: var(--cta); color: var(--on-cta); box-shadow: 0 8px 18px -10px rgba(208,40,30,.8); }
.btn-a.primary:hover { background: var(--cta-strong); color: var(--on-cta); }
.btn-a.ghost { background: transparent; color: var(--fg); border: 1px solid var(--edge); }
.btn-a.ghost:hover { background: var(--panel-2); border-color: var(--fg); }
.btn-a.white { background: #fff; color: #0c0c0f; }
.btn-a.sm { padding: 7px 12px; font-size: 12.5px; border-radius: 10px; }
/* Release B: two-line button (not .wrap: that is the page container) */
.btn-a.two-line { white-space: normal; flex-direction: column; align-items: flex-start; text-align: left; gap: 2px; }
.btn-a.two-line small { font-weight: 500; font-size: 12.5px; }
/* Release B: small controls get a 44px tap height on phones */
@media (max-width: 600px) { .btn-a.tap, .link.tap { min-height: 44px; display: inline-flex; align-items: center; } }
.rnext { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; margin-top: 18px; }
.rnext .edetail { font-size: 12.5px; color: var(--muted); }
.link, .aurora .link { color: var(--accent); font-weight: 500; text-decoration: none; }
.link:hover { text-decoration: underline; }
.link.quiet, .aurora .link.quiet { color: var(--ink); }
.link.quiet:hover, .aurora .link.quiet:hover { color: var(--accent); }

/* Hero: the ONE raven aurora card per screen */
.hero { position: relative; overflow: hidden; isolation: isolate; border-radius: 24px; padding: 26px 28px; color: #fff; min-width: 0;
  background:
    radial-gradient(120% 140% at 100% 0%, rgba(255,255,255,.22) 0%, rgba(255,255,255,0) 26%),
    radial-gradient(70% 95% at 18% -15%, #ff3a2e 0%, rgba(255,58,46,0) 62%),
    radial-gradient(60% 80% at 62% 30%, rgba(176,24,18,.85) 0%, rgba(176,24,18,0) 65%),
    radial-gradient(85% 110% at 105% 118%, #c3dcf1 0%, rgba(195,220,241,0) 58%),
    linear-gradient(125deg, #0c0c0f 0%, #140708 55%, #0c0c0f 100%);
  box-shadow: 0 20px 40px -18px rgba(200,30,22,.55); }
/* fine concentric lines, like the moiré on the brand board */
.hero::after { content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none; opacity: .16; mix-blend-mode: overlay;
  background: repeating-radial-gradient(circle at 22% -10%, #fff 0 1px, transparent 1px 4px); }
.hero .hlab { font-size: 13px; color: rgba(255,255,255,.88); }
.hero .hv { font-size: 40px; margin-top: 6px; line-height: 1.05; }
.hero .hv small { font-size: 17px; color: rgba(255,255,255,.8); font-weight: 400; letter-spacing: 0; }
.hero .hrow { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.hero p { color: rgba(255,255,255,.9); margin: 10px 0 0; max-width: 62ch; line-height: 1.55; }
.glass { display: inline-flex; align-items: center; gap: 6px; padding: 4px 11px; border-radius: 99px; background: rgba(255,255,255,.18); backdrop-filter: blur(6px); border: 1px solid rgba(255,255,255,.3); font-size: 12.5px; font-weight: 500; white-space: nowrap; color: #fff; }
.hbar { margin-top: 22px; height: 10px; border-radius: 99px; background: rgba(255,255,255,.25); position: relative; }
.hbar i { position: absolute; inset: 0 auto 0 0; border-radius: 99px; background: #b8d4ec; }
.hbar b { position: absolute; top: -5px; bottom: -5px; width: 2px; margin-left: -1px; background: #fff; }
/* Release C: the main button of the page, white on the dark top card (19.5:1) */
.hnext { margin-top: 18px; display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.hero .btn-a.primary { background: #fff; color: #0c0c0f; box-shadow: 0 10px 24px -12px rgba(0,0,0,.6); min-height: 48px; padding: 11px 18px; font-size: 15px; }
.hero .btn-a.primary:hover { background: #f1f4f8; color: #0c0c0f; }
.hero .btn-a.primary small { color: #33363e; }
.aurora .hero :focus-visible { outline-color: #fff; }
.hero .hdetail, .hero .hnote { margin: 0; color: rgba(255,255,255,.9); font-size: 13px; }
.hero .hnote { margin-top: 8px; }
.aurora .hero .hero-alt { color: #fff; font-size: 13px; font-weight: 500; text-decoration: underline; text-underline-offset: 3px; }
@media (max-width: 600px) { .hero .btn-a.primary { width: 100%; } .aurora .hero .hero-alt { min-height: 44px; display: inline-flex; align-items: center; } }
.hscale { display: flex; justify-content: space-between; gap: 8px; margin-top: 8px; font-size: 11.5px; color: rgba(255,255,255,.85); }

/* Totals strip */
.strip { display: grid; grid-template-columns: repeat(4, 1fr); background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-card); overflow: hidden; }
.seg { padding: 20px 22px; border-left: 1px solid var(--line); min-width: 0; }
.seg:first-child { border-left: 0; }
.seg .top { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 14px; }
.seg .n { font-size: 30px; margin-top: 14px; }
.seg .n small { font-size: 13px; color: var(--muted); font-weight: 400; letter-spacing: 0; }

/* Goal rows */
.gr { display: grid; grid-template-columns: 1fr auto; align-items: center; padding: 14px 0; border-top: 1px solid var(--line); gap: 8px 12px; }
.gr:first-of-type, .ch + .gr { border-top: 0; }
.gname { display: flex; align-items: center; gap: 10px; font-weight: 500; min-width: 0; }
.gname svg { width: 18px; height: 18px; color: var(--ink); flex: none; }
.gv { font-size: 22px; text-align: right; } .gv small { font-size: 13px; color: var(--muted); font-weight: 400; letter-spacing: 0; }
.gbar { grid-column: 1 / -1; height: 8px; border-radius: 99px; background: var(--hatch); position: relative; }
.gbar i { position: absolute; inset: 0 auto 0 0; border-radius: 99px; background: linear-gradient(90deg, var(--l1), var(--l2)); }
.gbar b { position: absolute; top: -4px; bottom: -4px; width: 2px; background: var(--fg); opacity: .55; }
.gmeta { grid-column: 1 / -1; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 6px; font-size: 12px; color: var(--muted); }

/* Tables */
.tscroll { overflow-x: auto; margin-top: 14px; }
table.at { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13.5px; box-shadow: none; border-radius: 0; overflow: visible; margin: 0; }
table.at th { background: var(--panel-2); text-align: right; font-weight: 500; color: var(--muted); font-size: 11.5px; letter-spacing: .03em; padding: 10px; white-space: nowrap; border: 0; }
table.at th:first-child { border-radius: 10px 0 0 10px; text-align: left; } table.at th:last-child { border-radius: 0 10px 10px 0; }
table.at td { text-align: right; padding: 11px 10px; border: 0; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.at td:first-child, table.at th.l, table.at td.l { text-align: left; }
table.at tr:last-child td { border-bottom: 0; }
table.at tbody tr:hover td { background: var(--panel-2); }
table.at tr.miss td { background: color-mix(in srgb, var(--bad-bg) 60%, transparent); }

/* Segmented control */
.presets { display: inline-flex; gap: 4px; background: var(--panel-2); padding: 4px; border-radius: 12px; flex-wrap: wrap; }
.pbtn { background: none; border: 0; padding: 6px 12px; border-radius: 9px; font-weight: 500; color: var(--muted); font-size: 13px; cursor: pointer; }
.pbtn[aria-pressed='true'] { background: var(--panel); color: var(--fg); box-shadow: 0 1px 3px rgba(12,12,15,.14); }

/* Chart */
.chartbox { position: relative; margin-top: 12px; }
.chartbox svg { display: block; width: 100%; height: auto; overflow: visible; }
.legend { display: flex; gap: 16px; font-size: 12px; color: var(--muted); align-items: center; flex-wrap: wrap; margin-top: 12px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.lg-cur { width: 18px; height: 3px; border-radius: 2px; background: linear-gradient(90deg, var(--l1), var(--l2)); display: inline-block; }
.lg-tgt { width: 18px; border-top: 2px dashed var(--muted); display: inline-block; }
.tip { position: absolute; background: #0c0c0f; color: #fff; border-radius: 12px; box-shadow: var(--shadow); padding: 10px 12px; font-size: 12px; line-height: 1.6; min-width: 180px; pointer-events: none; transform: translate(-50%, -112%); z-index: 3; }
.tip .t { font-weight: 600; } .tip .m { color: rgba(255,255,255,.65); }

/* Test cards */
.tests { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.test { display: flex; flex-direction: column; gap: 14px; }
.test .tt { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.test h3 { font-size: 16px; }
.skills { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.sk { border-radius: 10px; padding: 8px 6px; text-align: center; font-size: 11px; color: var(--muted); background: var(--panel-2); border: 1px solid var(--line); }
.sk b { display: block; font-size: 15px; color: var(--fg); font-weight: 500; letter-spacing: -.02em; margin-bottom: 1px; }
.sk.todo b { color: var(--muted); }
.test .foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: auto; font-size: 12.5px; color: var(--muted); flex-wrap: wrap; }
.mini { height: 6px; border-radius: 99px; background: var(--hatch); position: relative; }
.mini i { position: absolute; inset: 0 auto 0 0; border-radius: 99px; background: linear-gradient(90deg, var(--l1), var(--l2)); }

/* Part chooser (take exam) */
.parts { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; margin-top: 16px; }
.part { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 16px; background: var(--panel); text-decoration: none; color: var(--fg); font-weight: 600; transition: border-color .15s, transform .15s; }
.part:hover { border-color: var(--accent); transform: translateY(-1px); }
.part svg { width: 20px; height: 20px; color: var(--ink); flex: none; }
.part span { display: block; font-size: 12px; font-weight: 400; color: var(--muted); }
.part.main { background: var(--cta); border-color: var(--cta); color: var(--on-cta); }
.part.main svg, .part.main span { color: rgba(255,255,255,.85); }
.steps-list { margin: 14px 0 0; padding-left: 20px; color: var(--ink); line-height: 1.6; }
.steps-list li { margin-bottom: 8px; }

/* Answer map + answers */
.qmap { display: grid; grid-template-columns: repeat(19, 1fr); gap: 4px; margin-top: 14px; }
.qmap i { aspect-ratio: 1; border-radius: 4px; background: var(--good-bg); border: 1px solid color-mix(in srgb, var(--good) 35%, transparent); }
.qmap i.x { background: var(--bad-bg); border-color: color-mix(in srgb, var(--bad) 45%, transparent); }
.qlegend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--muted); margin-top: 10px; }
.qlegend > span { display: inline-flex; gap: 6px; align-items: center; }
.qlegend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.ok { color: var(--good); font-weight: 600; }
.no { color: var(--bad); font-weight: 600; }
.coach { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border-radius: 14px; background: var(--panel-2); border: 1px solid var(--line); margin-top: 14px; font-size: 13px; line-height: 1.5; color: var(--ink); }
.coach svg { width: 20px; height: 20px; flex: none; color: var(--ink); margin-top: 1px; }

/* Forms */
.field { display: flex; flex-direction: column; gap: 6px; font-size: 11px; color: var(--muted); font-weight: 500; letter-spacing: .06em; text-transform: uppercase; }
.field input, .field select, .field textarea, .aurora .form-control { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 9px 12px; font-size: 14px; letter-spacing: 0; text-transform: none; color: var(--fg); width: 100%; }
.field input:focus, .field select:focus, .aurora .form-control:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent; }
.fgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.ferr { color: var(--bad); font-size: 12px; text-transform: none; letter-spacing: 0; }

/* Notices (Django messages) */
.notice { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 14px; font-size: 13.5px; line-height: 1.5; border: 1px solid var(--line); background: var(--panel); box-shadow: var(--shadow-card); }
.notice.error { background: var(--bad-bg); color: var(--fg); border-color: transparent; }
.notice.warning { background: var(--warn-bg); color: var(--fg); border-color: transparent; }
.notice.success { background: var(--good-bg); color: var(--fg); border-color: transparent; }

/* Layout grids */
.row1 { display: grid; grid-template-columns: 1.55fr 1fr 1fr; gap: 22px; }
.row3 { display: grid; grid-template-columns: 1fr 1.5fr; gap: 22px; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.report { display: grid; grid-template-columns: 1fr 1.35fr; gap: 22px; }
.herogrid { display: flex; gap: 24px; align-items: center; flex-wrap: wrap; }
.ring { width: 132px; height: 132px; flex: none; }
.pagehead { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 14px; }
.pagehead h1 { font-size: 26px; margin-top: 6px; }

@media (max-width: 1100px) {
  .row1 { grid-template-columns: 1fr 1fr; } .row1 .hero { grid-column: 1 / -1; }
  .row3, .report, .two { grid-template-columns: 1fr; }
  .strip { grid-template-columns: repeat(2, 1fr); } .seg:nth-child(3) { border-left: 0; } .seg:nth-child(n+3) { border-top: 1px solid var(--line); }
  .tests { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .nav { padding: 12px 14px 12px 18px; } .brand-logo { height: 28px; }
  .wrap { padding-top: 12px; gap: 14px; }
  .row1, .tests, .fgrid { grid-template-columns: 1fr; }
  .card { padding: 18px; border-radius: 18px; }
  .hero { padding: 22px 20px; } .hero .hv { font-size: 32px; }
  .hide-sm { display: none !important; }
  .qmap { grid-template-columns: repeat(10, 1fr); }
  .product { display: none; }
}
@media (prefers-reduced-motion: reduce) { .aurora * { transition: none !important; animation: none !important; } }
.ans-img { width: 130px; max-width: 100%; height: auto; border-radius: 8px; border: 1px solid var(--line); }

/* Light / dark switch in the top bar */
.theme-toggle { width: 34px; height: 34px; border-radius: 10px; border: 1px solid rgba(255,255,255,.14); background: rgba(255,255,255,.06); color: rgba(255,255,255,.85); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; padding: 0; flex: none; }
.theme-toggle:hover { background: rgba(255,255,255,.12); color: #fff; }
.theme-toggle svg { width: 17px; height: 17px; }
.theme-toggle .i-sun { display: none; }
.theme-toggle[aria-pressed="true"] .i-sun { display: block; }
.theme-toggle[aria-pressed="true"] .i-moon { display: none; }
.theme-toggle.on-card { position: absolute; top: 14px; right: 14px; }

/* Product name: "CELPIP Test Simulator Pro" */
.product-name { font-size: 13.5px; font-weight: 600; letter-spacing: -.01em; text-transform: none; color: rgba(255,255,255,.88); display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; }
.nav .product.product-name { letter-spacing: -.01em; text-transform: none; color: rgba(255,255,255,.88); font-size: 13.5px; }
.pro { font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #fff; padding: 2px 7px; border-radius: 6px; background: linear-gradient(120deg, #b3201a, #e8352b 60%, #ff5a4c); box-shadow: inset 0 0 0 1px rgba(255,255,255,.22); line-height: 1.4; }
.hero .pro { background: rgba(255,255,255,.2); box-shadow: inset 0 0 0 1px rgba(255,255,255,.4); }

/* Show / hide password */
.pw-wrap { position: relative; display: block; width: 100%; }
.pw-wrap input { padding-right: 44px !important; }
.pw-eye { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 34px; height: 34px; border: 0; background: none; color: var(--muted); border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; padding: 0; }
.pw-eye:hover { color: var(--fg); background: var(--panel-2); }
.pw-eye svg { width: 18px; height: 18px; }
.pw-eye .i-eye-off { display: none; }
.pw-eye[aria-pressed="true"] .i-eye { display: none; }
.pw-eye[aria-pressed="true"] .i-eye-off { display: block; }


/* Account menu under the student's name (Billing, Log out) */
.who-menu { position: relative; }
.who-menu > summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; color: #fff; font-weight: 500; padding: 4px 8px 4px 4px; margin-left: 4px; border-radius: 10px; transition: background-color .15s cubic-bezier(.22,1,.36,1); }
.who-menu > summary::-webkit-details-marker { display: none; }
.who-menu > summary:hover, .who-menu[open] > summary { background: rgba(255,255,255,.08); }
.who-menu > summary:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.who-menu .chev { width: 14px; height: 14px; opacity: .7; }
.who-menu .menu { position: absolute; right: 0; top: calc(100% + 8px); min-width: 210px; display: flex; flex-direction: column; padding: 6px; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 12px 30px -12px rgba(12,12,15,.35); z-index: 50; }
.aurora .who-menu .menu a { color: var(--fg); padding: 9px 12px; border-radius: 9px; font-weight: 500; background: none; box-shadow: none; }
.aurora .who-menu .menu a:hover { background: var(--panel-2); color: var(--fg); }
.who-menu .who-email { padding: 8px 12px 10px; margin-bottom: 4px; border-bottom: 1px solid var(--line); font-size: 12.5px; color: var(--muted); max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 640px) { .who-menu .who-name { display: none; } }

/* ===== Student side menu (studentbase.html) =====
 * Wide screens: a raven-black panel on the left, 252px, or an 84px icon rail when collapsed (html.nav-mini,
 * remembered per browser). Below 901px: a slim top bar (.sn-bar) and the same menu as a slide-in drawer
 * (html.nav-open). Named sidenav / sn-* because review.css already uses .side. */
:root { --sn-w: 252px; --sn-w-mini: 84px; }
.sn-shell { display: grid; grid-template-columns: var(--sn-w) minmax(0, 1fr); min-height: 100vh; transition: grid-template-columns .22s cubic-bezier(.22,1,.36,1); }
html.nav-mini .sn-shell { grid-template-columns: var(--sn-w-mini) minmax(0, 1fr); }
.sn-shell > .wrap { width: 100%; container-type: inline-size; }

.sidenav { position: sticky; top: 0; height: 100vh; height: 100dvh; padding: 18px 0 18px max(16px, env(safe-area-inset-left, 0px)); z-index: 40; }
.sn-in { height: 100%; display: flex; flex-direction: column; gap: 4px; background: #0c0c0f; color: #f1f4f8; border: 1px solid rgba(255,255,255,.07); border-radius: 20px; padding: 16px 12px 12px; box-shadow: 0 1px 2px rgba(0,0,0,.08), 0 14px 30px -18px rgba(12,12,15,.55); overflow-x: hidden; overflow-y: auto; scrollbar-width: none; }

.sn-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 2px 2px 8px 8px; }
.sidenav .brand { min-height: 36px; }
.sidenav .brand-logo { height: 30px; }
.sn-mark { display: none; width: 36px; height: 36px; border-radius: 10px; }
.sn-product { padding: 0 10px 14px; margin: 0 0 8px; border-bottom: 1px solid rgba(255,255,255,.09); }
.sn-collapse, .sn-close { width: 32px; height: 32px; border-radius: 9px; border: 0; padding: 0; background: rgba(255,255,255,.06); color: rgba(255,255,255,.75); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; flex: none; }
.sn-collapse:hover, .sn-close:hover { background: rgba(255,255,255,.12); color: #fff; }
.sn-collapse svg, .sn-close svg { width: 18px; height: 18px; }
.sn-collapse svg { transition: transform .22s cubic-bezier(.22,1,.36,1); }
html.nav-mini .sn-collapse svg { transform: rotate(180deg); }
.sn-close { display: none; }

.sn-links { display: flex; flex-direction: column; gap: 2px; }
.aurora .sn-links a, .aurora .sn-row { position: relative; display: flex; align-items: center; gap: 12px; width: 100%; height: auto; padding: 10px 12px; border: 0; border-radius: 11px; background: none; color: rgba(255,255,255,.68); text-decoration: none; font-weight: 500; font-size: 13.5px; white-space: nowrap; cursor: pointer; text-align: left; justify-content: flex-start; }
.sn-links a svg, .sn-row svg { width: 19px; height: 19px; flex: none; }
.aurora .sn-links a:hover, .aurora .sn-row:hover { color: #fff; background: rgba(255,255,255,.08); }
.aurora .sn-links a.on { color: #fff; background: rgba(255,255,255,.12); font-weight: 600; }
.aurora .sn-links a.on:not(.study-nav)::before { content: ""; position: absolute; left: -12px; top: 9px; bottom: 9px; width: 3px; border-radius: 0 3px 3px 0; background: #e8352b; }
/* Study for CELPIP (students without coach feedback): a calm outlined button, no pulse (Release C) */
/* Study for CELPIP (Mike, 2026-11-16): solid red, white text (5.24:1), graduation cap icon */
.aurora .sn-links a.study-nav { margin-top: 10px; color: #fff; background: var(--cta, #d0281e); border: 1px solid var(--cta, #d0281e); font-weight: 600; animation: none; box-shadow: none; }
.aurora .sn-links a.study-nav:hover, .aurora .sn-links a.study-nav.on { background: #b8221a; border-color: #b8221a; color: #fff; }
.aurora .sidenav :focus-visible { outline-color: #fff; }

.sn-space { flex: 1; min-height: 12px; }
.sn-foot { display: flex; flex-direction: column; gap: 2px; border-top: 1px solid rgba(255,255,255,.09); padding-top: 10px; }
.sn-who-menu > summary { display: flex; margin: 0; padding: 8px; gap: 10px; border-radius: 12px; }
.sn-who-menu .avatar { width: 34px; height: 34px; font-size: 12px; }
.sn-who-txt { display: flex; flex-direction: column; min-width: 0; flex: 1; line-height: 1.25; }
.sn-who-txt b { font-weight: 600; font-size: 13.5px; }
.sn-who-txt span { font-size: 11.5px; color: rgba(255,255,255,.55); font-weight: 400; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.aurora .sn-who-menu .menu a { text-decoration: none; }
.sn-who-menu .menu { left: 0; right: 0; top: auto; bottom: calc(100% + 8px); min-width: 210px; }
@media (max-width: 640px) { .sn-who-menu .who-name { display: inline; } }

/* Collapsed rail: icons only. Labels stay for screen readers; sighted users get a tooltip. */
html.nav-mini .sidenav .brand-logo, html.nav-mini .sn-product, html.nav-mini .sn-who-txt, html.nav-mini .sn-who-menu .chev { display: none; }
html.nav-mini .sn-mark { display: block; }
html.nav-mini .sn-lbl { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
html.nav-mini .sn-top { flex-direction: column; gap: 12px; padding: 2px 0 14px; margin-bottom: 8px; border-bottom: 1px solid rgba(255,255,255,.09); }
html.nav-mini .aurora .sn-links a, html.nav-mini .aurora .sn-row { justify-content: center; padding: 11px 0; }
html.nav-mini .sn-who-menu > summary { justify-content: center; padding: 8px 0; }
html.nav-mini .sn-who-menu .menu { left: calc(100% + 14px); right: auto; bottom: 0; }
html.nav-mini .sn-in { overflow: visible; }
html.nav-mini .sidenav [data-tip]:hover::after { content: attr(data-tip); position: absolute; left: calc(100% + 14px); top: 50%; transform: translateY(-50%); background: #0c0c0f; color: #fff; padding: 6px 10px; border-radius: 8px; border: 1px solid rgba(255,255,255,.12); font-size: 12.5px; font-weight: 500; white-space: nowrap; box-shadow: 0 8px 20px -8px rgba(0,0,0,.5); pointer-events: none; z-index: 60; }
html.nav-mini .sn-who-menu[open] > summary::after { display: none; }
html.nav-mini .sn-who-menu > summary { position: relative; }

/* Content beside the menu: switch the dashboard grids by the room they really have, not the window width */
@container (max-width: 1080px) {
  .row1 { grid-template-columns: 1fr 1fr; } .row1 .hero { grid-column: 1 / -1; }
  .row3, .report, .two { grid-template-columns: 1fr; }
  .strip { grid-template-columns: repeat(2, 1fr); } .seg:nth-child(3) { border-left: 0; } .seg:nth-child(n+3) { border-top: 1px solid var(--line); }
  .tests { grid-template-columns: repeat(2, 1fr); }
}
/* Narrow content (phones): one column again; without this the rule above wins over the 640px one and the
   page scrolls sideways at 390px */
@container (max-width: 600px) {
  .row1, .tests, .fgrid { grid-template-columns: 1fr; }
}

/* Phones and small tablets: top bar + drawer */
.sn-bar { display: none; }
@media (max-width: 900px) {
  .sn-shell, html.nav-mini .sn-shell { display: block; }
  .sn-bar { display: flex; align-items: center; gap: 12px; position: sticky; top: 0; z-index: 30; margin: 12px max(16px, env(safe-area-inset-right, 0px)) 0 max(16px, env(safe-area-inset-left, 0px)); background: #0c0c0f; color: #fff; border: 1px solid rgba(255,255,255,.07); border-radius: 16px; padding: 8px 10px; box-shadow: 0 14px 30px -18px rgba(12,12,15,.55); }
  .sn-bar .brand { min-height: 0; margin-right: auto; }
  .sn-bar .brand-logo { height: 26px; }
  .sn-open { width: 40px; height: 40px; border-radius: 10px; border: 0; padding: 0; background: rgba(255,255,255,.08); color: #fff; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
  .sn-open svg { width: 20px; height: 20px; }
  .sn-open.sn-who { background: none; }
  .sidenav { position: fixed; left: 0; top: 0; bottom: 0; width: 288px; max-width: 86vw; padding: 12px; transform: translateX(-105%); visibility: hidden; transition: transform .25s cubic-bezier(.22,1,.36,1), visibility 0s linear .25s; }
  html.nav-open .sidenav { transform: none; visibility: visible; transition: transform .25s cubic-bezier(.22,1,.36,1); }
  .sn-scrim { position: fixed; inset: 0; z-index: 35; background: rgba(12,12,15,.45); }
  html.nav-open body { overflow: hidden; }
  .sn-collapse { display: none; }
  .sn-close { display: inline-flex; }
  /* the drawer always shows labels, whatever the wide-screen choice */
  html.nav-mini .sidenav .brand-logo { display: block; } html.nav-mini .sn-mark { display: none; }
  html.nav-mini .sn-product { display: inline-flex; } html.nav-mini .sn-who-txt { display: flex; } html.nav-mini .sn-who-menu .chev { display: inline; }
  html.nav-mini .sn-lbl { position: static; width: auto; height: auto; overflow: visible; clip: auto; }
  html.nav-mini .sn-top { flex-direction: row; gap: 8px; padding: 2px 2px 8px 8px; margin: 0; border: 0; }
  html.nav-mini .aurora .sn-links a, html.nav-mini .aurora .sn-row { justify-content: flex-start; padding: 10px 12px; }
  html.nav-mini .sn-who-menu > summary { justify-content: flex-start; padding: 8px; }
  html.nav-mini .sn-who-menu .menu { left: 0; right: 0; bottom: calc(100% + 8px); }
  html.nav-mini .sn-in { overflow-y: auto; }
  html.nav-mini .sidenav [data-tip]:hover::after { display: none; }
}
@media (prefers-reduced-motion: reduce) { .sn-shell, .sidenav, .sn-collapse svg { transition: none !important; } }

/* Release C: phones get 44px tap targets on the dashboard and My marks (tabs, card links, result links, goal) */
@media (max-width: 600px) {
  .pbtn, .ch > .link, .ctx > .link, td > .link { min-height: 44px; display: inline-flex; align-items: center; }
  td > .link { min-width: 44px; justify-content: center; }
  #target_clb, #test_date { min-height: 44px; }
  button.pw-eye { width: 44px; height: 44px; right: 0; }
  button.theme-toggle.on-card { width: 44px; height: 44px; top: 8px; right: 8px; }
}
