/* CCMR Completion Readiness — application surface.
   System contract lives in DESIGN.md. Colors are Region 4's published brand guide;
   they are inherited, not chosen here. */

@font-face { font-family: 'Bebas Neue'; src: url('assets/fonts/BebasNeue-Regular.woff2') format('woff2');
  font-weight: 400; font-display: swap; }
@font-face { font-family: 'Open Sans'; src: url('assets/fonts/OpenSans-Regular.woff2') format('woff2');
  font-weight: 400; font-display: swap; }
@font-face { font-family: 'Open Sans'; src: url('assets/fonts/OpenSans-Bold.woff2') format('woff2');
  font-weight: 700; font-display: swap; }

:root {
  /* three inks */
  --navy-950:#001E2E; --navy-900:#002A40; --navy-800:#003652; --navy-700:#174963;
  --navy-600:#315F77; --navy-500:#548096; --navy-400:#83A0AF; --navy-300:#A9BCC6;
  --navy-200:#CBD6DC; --navy-100:#E3EAED; --navy-50:#F1F4F6; --navy-25:#F9FAFB;
  --red-700:#821722; --red:#AC1F2E; --red-400:#D34554; --red-200:#EFBEC3; --red-50:#FBF1F2;
  --tea:#0D6CB9; --tea-dark:#0A548F; --tea-50:#EAF3FB;

  /* rubric levels — hue-locked teal ramp, light to dark. Red is never a level. */
  --lvl-1:#D8E4E8; --lvl-2:#B7CED7; --lvl-3:#5D96AC; --lvl-4:#254B5B;
  --lvl-1-ink:#254B5B; --lvl-2-ink:#254B5B; --lvl-3-ink:#fff; --lvl-4-ink:#fff;
  --ne:#E8E8E6; --ne-ink:#5C5C58;

  /* tiers — always with the word */
  --tier-universal:#8DB7C9; --tier-targeted:#3F738D; --tier-coordinated:var(--red);

  /* surface */
  --paper:#F7F8F6; --surface:#FFFFFF; --line:#DDE3E5; --line-strong:#C3CDD1;
  --ink:#1F2A2E; --ink-mid:#45535A; --ink-soft:#5A686F;

  --shadow-sm:0 1px 2px rgba(0,42,64,.06), 0 1px 3px rgba(0,42,64,.04);
  --shadow-md:0 2px 4px rgba(0,42,64,.06), 0 4px 12px rgba(0,42,64,.07);
  --shadow-lg:0 8px 28px rgba(0,42,64,.12);

  --r-sm:4px; --r:7px; --r-lg:11px;
  --ease:cubic-bezier(.22,.61,.36,1);
  --sidebar:250px;

  /* semantic z-scale — never arbitrary values */
  --z-sticky:100; --z-dropdown:200; --z-backdrop:300; --z-modal:400; --z-toast:500; --z-tooltip:600;
}

* { box-sizing:border-box; }
html { -webkit-text-size-adjust:100%; }
body {
  margin:0; background:var(--paper); color:var(--ink);
  font:400 14px/1.55 'Open Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  font-variant-numeric: tabular-nums;
}
h1,h2,h3,h4 { margin:0; font-weight:700; letter-spacing:-.01em; text-wrap:balance; }
p { margin:0 0 .8em; text-wrap:pretty; }
a { color:var(--tea-dark); }
:focus-visible { outline:2px solid var(--tea); outline-offset:2px; border-radius:2px; }
::selection { background:var(--navy-200); }

/* Bebas: page titles and lone headline numerals only. Never inside a data column. */
.display { font-family:'Bebas Neue', Impact, sans-serif; font-weight:400; letter-spacing:.012em; line-height:.94; }
:lang(es) .display, .es .display { font-family:'Open Sans', sans-serif; font-weight:700; letter-spacing:-.02em; line-height:1.05; }

/* ───────────────────────── shell ───────────────────────── */
.draftbar {
  background:var(--red); color:#fff; text-align:center; padding:6px 16px;
  font-size:11px; font-weight:700; letter-spacing:.07em; text-transform:uppercase;
  position:relative; z-index:var(--z-sticky);
}
.shell { display:grid; grid-template-columns:var(--sidebar) 1fr; min-height:100vh; align-items:start;
  background:linear-gradient(90deg, var(--navy-900) 0, var(--navy-900) var(--sidebar), var(--paper) var(--sidebar)); }

.side {
  background:var(--navy-900); color:var(--navy-200); position:sticky; top:0;
  height:100vh; display:flex; flex-direction:column; overflow-y:auto; overscroll-behavior:contain;
}
.brandblock { padding:20px 18px 16px; position:relative; overflow:hidden; flex:none; }
.brandblock::before {
  content:''; position:absolute; left:-40px; top:0; bottom:0; width:74px;
  background:var(--red); transform:skewX(-14deg); opacity:.9;
}
.wordmark { position:relative; font-family:'Bebas Neue',Impact,sans-serif; font-size:34px;
  color:#fff; letter-spacing:.02em; line-height:1; }
.wordmark .r { color:var(--red-400); }
.wordmark small { display:block; font-family:'Open Sans',sans-serif; font-size:8.5px; font-weight:700;
  letter-spacing:.16em; color:var(--navy-300); margin-top:3px; }
.cobrand { position:relative; margin-top:14px; font-size:10.5px; font-weight:700; letter-spacing:.11em;
  color:var(--navy-300); text-transform:uppercase; }
.cobrand span { color:var(--navy-400); margin:0 5px; }

.navgroup { padding:10px 0 2px; flex:none; }
.navgroup h4 { padding:0 18px 6px; font-size:9.5px; letter-spacing:.15em; text-transform:uppercase;
  color:var(--navy-500); font-weight:700; }
.nav { display:flex; align-items:center; gap:9px; width:100%; padding:8px 18px; border:0; background:none;
  color:var(--navy-200); font:inherit; font-size:13px; text-align:left; cursor:pointer;
  border-left:3px solid transparent; transition:background .15s var(--ease), color .15s var(--ease); }
.nav:hover { background:rgba(255,255,255,.055); color:#fff; }
.nav[aria-current='page'] { background:rgba(255,255,255,.1); color:#fff; font-weight:700; border-left-color:var(--red); }
.nav svg { width:15px; height:15px; flex:none; stroke:currentColor; fill:none; stroke-width:1.7;
  stroke-linecap:round; stroke-linejoin:round; opacity:.85; }
.nav .count { margin-left:auto; font-size:11px; color:var(--navy-400); font-weight:400; }

.sidefoot { margin-top:auto; padding:16px 18px; border-top:1px solid rgba(255,255,255,.1);
  font-size:11px; line-height:1.5; color:var(--navy-400); flex:none; }
.sidefoot strong { color:var(--navy-200); display:block; font-size:12px; font-weight:700; }
.sidefoot .fict { color:var(--red-400); font-weight:700; }

/* ───────────────────────── main ───────────────────────── */
.main { min-width:0; }
.topbar { background:var(--surface); border-bottom:1px solid var(--line); padding:13px 28px;
  display:flex; align-items:center; gap:16px; flex-wrap:wrap; position:sticky; top:0; z-index:var(--z-sticky); }
.crumb { font-size:12px; color:var(--ink-soft); }
.crumb b { color:var(--ink); font-weight:700; }
.topbar .spacer { margin-left:auto; }

.wrap { padding:26px 28px 64px; max-width:1500px; }
.pagehead { margin-bottom:22px; }
.pagehead .display { font-size:40px; color:var(--navy-900); margin:6px 0 8px; }
.pagehead .lede { font-size:14.5px; color:var(--ink-mid); max-width:68ch; }

/* statute strip */
.statute { background:var(--tea-50); border:1px solid #C6DDF2; border-radius:var(--r);
  padding:12px 16px; font-size:12.5px; color:var(--navy-800); margin:16px 0; }
.statute q { font-style:italic; }
.chip-statute { display:inline-block; background:var(--tea); color:#fff; font-size:10.5px; font-weight:700;
  letter-spacing:.04em; padding:2.5px 7px; border-radius:var(--r-sm); margin-right:8px;
  font-variant-numeric:tabular-nums; white-space:nowrap; }

/* provenance */
.prov { display:inline-block; font-size:9.5px; font-weight:700; letter-spacing:.08em; text-transform:uppercase;
  padding:2px 6px; border-radius:3px; border:1px solid var(--line-strong); color:var(--ink-soft);
  background:var(--navy-25); vertical-align:middle; }
.prov.texas { border-color:#B9D3EA; color:var(--tea-dark); background:var(--tea-50); }
.prov.r4 { border-color:var(--red-200); color:var(--red-700); background:var(--red-50); }
.prov.ours { border-color:var(--navy-200); color:var(--navy-700); background:var(--navy-50); }
.prov.illus { border-color:#DCCFA8; color:#6B5518; background:#FBF6E7; }

/* ───────────────────────── panels & grid ───────────────────────── */
.panel { background:var(--surface); border:1px solid var(--line); border-radius:var(--r-lg);
  padding:18px 20px; box-shadow:var(--shadow-sm); }
.panel > h3 { font-size:15px; color:var(--navy-900); margin-bottom:3px; }
.panel > .sub { font-size:12.5px; color:var(--ink-soft); margin-bottom:14px; }
.panel.dark { background:var(--navy-900); border-color:var(--navy-800); color:var(--navy-100); }
.panel.dark h3 { color:#fff; }
.panel.dark .sub { color:var(--navy-400); }

.grid { display:grid; gap:16px; align-items:start; }
.g2 { grid-template-columns:repeat(auto-fit, minmax(340px,1fr)); }
.g3 { grid-template-columns:repeat(auto-fit, minmax(250px,1fr)); }
.g4 { grid-template-columns:repeat(auto-fit, minmax(190px,1fr)); }
.split { display:grid; grid-template-columns:minmax(0,1.35fr) minmax(0,1fr); gap:16px; align-items:start; }

/* metric — Bebas allowed: one number, headline size, not in a column */
.metric .n { font-family:'Bebas Neue',Impact,sans-serif; font-size:46px; line-height:.9;
  color:var(--navy-900); letter-spacing:.01em; }
.metric .k { font-size:12px; font-weight:700; color:var(--ink-mid); margin-bottom:2px; }
.metric .foot { font-size:11.5px; color:var(--ink-soft); margin-top:4px; line-height:1.4; }

/* ───────────────────────── levels ───────────────────────── */
.lvl { display:inline-flex; align-items:center; gap:5px; padding:2.5px 8px; border-radius:var(--r-sm);
  font-size:11.5px; font-weight:700; white-space:nowrap; }
.lvl-1 { background:var(--lvl-1); color:var(--lvl-1-ink); }
.lvl-2 { background:var(--lvl-2); color:var(--lvl-2-ink); }
.lvl-3 { background:var(--lvl-3); color:var(--lvl-3-ink); }
.lvl-4 { background:var(--lvl-4); color:var(--lvl-4-ink); }
/* NE sits visually outside the ramp because it is not a low score */
.lvl-ne { background:var(--ne); color:var(--ne-ink); font-weight:700;
  background-image:repeating-linear-gradient(45deg, transparent 0 4px, rgba(0,0,0,.05) 4px 8px); }

.tier { display:inline-flex; align-items:center; gap:6px; padding:3px 10px; border-radius:999px;
  font-size:11.5px; font-weight:700; }
.tier::before { content:''; width:8px; height:8px; border-radius:50%; background:currentColor; flex:none; }
.tier-universal { background:#EAF1F5; color:#2C5A6E; }
.tier-targeted { background:#E4EDF1; color:var(--tier-targeted); }
.tier-coordinated { background:var(--red-50); color:var(--red-700); }
.tier-incomplete { background:var(--ne); color:var(--ne-ink); }

/* ───────────────────────── competency profile ───────────────────────── */
.profile { display:flex; flex-direction:column; gap:2px; }
.prow { display:grid; grid-template-columns:minmax(140px,1.1fr) minmax(120px,1.5fr) auto;
  gap:12px; align-items:center; padding:7px 8px; border-radius:var(--r-sm); cursor:pointer;
  border:1px solid transparent; background:none; width:100%; text-align:left; font:inherit;
  transition:background .15s var(--ease), border-color .15s var(--ease); }
.prow:hover { background:var(--navy-25); border-color:var(--line); }
.prow[aria-selected='true'] { background:var(--navy-50); border-color:var(--navy-200); }
.prow .cname { font-size:12.5px; font-weight:700; color:var(--navy-800); }
.prow .canchor { font-size:10px; color:var(--ink-soft); font-variant-numeric:tabular-nums; }

/* four cells, the filled one is the level. Depth, not judgement. */
.ladder { display:grid; grid-template-columns:repeat(4,1fr); gap:3px; }
.ladder i { height:11px; border-radius:2px; background:var(--navy-100); display:block;
  transition:background .2s var(--ease); }
.ladder i.on-1 { background:var(--lvl-1); } .ladder i.on-2 { background:var(--lvl-2); }
.ladder i.on-3 { background:var(--lvl-3); } .ladder i.on-4 { background:var(--lvl-4); }
.ladder.is-ne i { background:var(--ne);
  background-image:repeating-linear-gradient(45deg, transparent 0 3px, rgba(0,0,0,.05) 3px 6px); }

/* range: the level plus its uncertainty. A point estimate never ships alone. */
.range { position:relative; height:11px; }
.range .band { position:absolute; top:3px; height:5px; background:var(--navy-200); border-radius:3px; }
.range .pt { position:absolute; top:0; width:3px; height:11px; background:var(--navy-800); border-radius:2px; }

/* ───────────────────────── tables ───────────────────────── */
table { width:100%; border-collapse:collapse; font-size:12.5px; }
thead th { text-align:left; font-size:10px; letter-spacing:.09em; text-transform:uppercase;
  color:var(--ink-soft); font-weight:700; padding:7px 10px; border-bottom:1.5px solid var(--line-strong);
  background:var(--navy-25); position:sticky; top:0; }
tbody td { padding:8px 10px; border-bottom:1px solid var(--line); vertical-align:middle; }
tbody tr:hover { background:var(--navy-25); }
tbody tr.clickable { cursor:pointer; }
.tablewrap { overflow-x:auto; border:1px solid var(--line); border-radius:var(--r);
  background:var(--surface); max-height:none; }

.avatar { width:28px; height:28px; border-radius:50%; background:var(--navy-100); color:var(--navy-700);
  display:inline-grid; place-items:center; font-size:10.5px; font-weight:700; flex:none; }
.who { display:flex; align-items:center; gap:9px; }
.who b { font-weight:700; color:var(--navy-900); }
.who small { display:block; color:var(--ink-soft); font-size:11px; font-weight:400; }

/* ───────────────────────── controls ───────────────────────── */
.btn { display:inline-flex; align-items:center; gap:7px; padding:8px 14px; border-radius:var(--r);
  border:1px solid var(--navy-900); background:var(--navy-900); color:#fff; font:inherit; font-size:12.5px;
  font-weight:700; cursor:pointer; transition:background .15s var(--ease), border-color .15s var(--ease); }
.btn:hover { background:var(--navy-800); border-color:var(--navy-800); }
.btn:active { background:var(--navy-950); }
.btn[disabled] { opacity:.45; cursor:not-allowed; background:var(--navy-400); border-color:var(--navy-400); }
.btn.ghost { background:transparent; color:var(--navy-900); border-color:var(--line-strong); }
.btn.ghost:hover { background:var(--navy-50); border-color:var(--navy-300); }
.btn.danger { background:var(--red); border-color:var(--red); }
.btn.danger:hover { background:var(--red-700); border-color:var(--red-700); }
.btn.sm { padding:5px 10px; font-size:11.5px; }

input[type=text], input[type=search], select, textarea {
  padding:7px 10px; border:1px solid var(--line-strong); border-radius:var(--r); background:var(--surface);
  font:inherit; font-size:12.5px; color:var(--ink); }
input::placeholder { color:var(--ink-soft); }
select { cursor:pointer; }
.field { display:flex; flex-direction:column; gap:4px; }
.field label { font-size:11px; font-weight:700; color:var(--ink-mid); }

.toggle { display:inline-flex; border:1px solid var(--line-strong); border-radius:var(--r); overflow:hidden; }
.toggle button { border:0; background:var(--surface); color:var(--ink-mid); font:inherit; font-size:12px;
  font-weight:700; padding:6px 13px; cursor:pointer; transition:background .15s var(--ease); }
.toggle button + button { border-left:1px solid var(--line-strong); }
.toggle button[aria-pressed='true'] { background:var(--navy-900); color:#fff; }
.toggle button:not([aria-pressed='true']):hover { background:var(--navy-50); }

/* ───────────────────────── notes ───────────────────────── */
.note { background:var(--navy-25); border:1px solid var(--line); border-radius:var(--r);
  padding:11px 14px; font-size:12.5px; color:var(--ink-mid); }
.note b { color:var(--navy-900); }
.note.warn { background:var(--red-50); border-color:var(--red-200); color:var(--red-700); }
.note.warn b { color:var(--red-700); }

.kv { display:grid; grid-template-columns:auto 1fr; gap:5px 14px; font-size:12.5px; align-items:baseline; }
.kv dt { color:var(--ink-soft); }
.kv dd { margin:0; font-weight:700; color:var(--navy-900); }

.empty { text-align:center; padding:44px 20px; color:var(--ink-soft); }
.empty h4 { color:var(--navy-800); font-size:14px; margin-bottom:6px; }
.empty p { max-width:46ch; margin:0 auto; font-size:12.5px; }

/* ───────────────────────── moments ───────────────────────── */
.moments { display:grid; grid-template-columns:repeat(3,1fr); gap:0; border:1px solid var(--line);
  border-radius:var(--r-lg); overflow:hidden; background:var(--surface); }
.moment { padding:16px 18px; border:0; border-left:1px solid var(--line); background:var(--surface);
  cursor:pointer; text-align:left; font:inherit; position:relative;
  transition:background .15s var(--ease); }
.moment:first-child { border-left:0; }
.moment:hover { background:var(--navy-25); }
.moment[aria-current='true'] { background:var(--navy-50); }
.moment[aria-current='true']::after { content:''; position:absolute; left:0; right:0; bottom:0; height:3px;
  background:var(--red); }
.moment .g { font-family:'Bebas Neue',Impact,sans-serif; font-size:30px; color:var(--navy-900); line-height:1; }
.moment .w { font-size:13px; font-weight:700; color:var(--navy-800); margin-top:2px; }
.moment .d { font-size:11.5px; color:var(--ink-soft); margin-top:3px; line-height:1.45; }
.moment .n { font-size:11px; color:var(--ink-soft); margin-top:7px; }

/* the scrubber across a student's administrations */
.scrub { display:flex; align-items:stretch; gap:0; border:1px solid var(--line); border-radius:var(--r);
  overflow:hidden; background:var(--surface); }
.scrub button { flex:1; border:0; border-left:1px solid var(--line); background:var(--surface);
  padding:9px 12px; font:inherit; cursor:pointer; text-align:left;
  transition:background .15s var(--ease); }
.scrub button:first-child { border-left:0; }
.scrub button:hover { background:var(--navy-25); }
.scrub button[aria-pressed='true'] { background:var(--navy-900); color:#fff; }
.scrub .t { font-size:12px; font-weight:700; }
.scrub .s { font-size:10.5px; opacity:.72; }

/* ───────────────────────── voice ───────────────────────── */
.voice { border:1px solid var(--line); border-radius:var(--r-lg); background:var(--surface); overflow:hidden; }
.voice-bar { display:flex; align-items:center; gap:12px; padding:12px 14px; background:var(--navy-25);
  border-bottom:1px solid var(--line); }
.playbtn { width:38px; height:38px; border-radius:50%; border:0; background:var(--navy-900); color:#fff;
  display:grid; place-items:center; cursor:pointer; flex:none;
  transition:background .15s var(--ease), transform .12s var(--ease); }
.playbtn:hover { background:var(--navy-700); }
.playbtn:active { transform:scale(.94); }
.playbtn svg { width:15px; height:15px; fill:currentColor; }
.wave { flex:1; height:34px; display:flex; align-items:center; gap:1.5px; cursor:pointer; min-width:0; }
.wave i { flex:1; background:var(--navy-200); border-radius:1px; min-height:3px;
  transition:background .1s linear; }
.wave i.played { background:var(--navy-600); }
.tcode { font-size:11px; color:var(--ink-soft); font-variant-numeric:tabular-nums; flex:none; }

.transcript { padding:15px 17px; font-size:15px; line-height:1.85; color:var(--ink); }
.transcript w { transition:background .12s linear, color .12s linear; border-radius:2px; padding:1px 0; }
.transcript w.spoken { background:var(--navy-100); }
.transcript w.now { background:var(--navy-800); color:#fff; }
/* passages the rating actually read */
.transcript w.anchor { text-decoration:underline; text-decoration-color:var(--red);
  text-decoration-thickness:2px; text-underline-offset:3px; text-decoration-skip-ink:none; }
.anchorkey { padding:0 17px 14px; font-size:11.5px; color:var(--ink-soft); }
.anchorkey em { font-style:normal; text-decoration:underline; text-decoration-color:var(--red);
  text-decoration-thickness:2px; text-underline-offset:3px; }

.synth { display:flex; align-items:center; gap:7px; padding:8px 14px; background:var(--navy-50);
  border-top:1px solid var(--line); font-size:11px; color:var(--ink-mid); }
.synth svg { width:13px; height:13px; flex:none; stroke:currentColor; fill:none; stroke-width:1.8; }

/* ───────────────────────── misc ───────────────────────── */
.toast { position:fixed; left:50%; bottom:26px; transform:translateX(-50%); background:var(--navy-900);
  color:#fff; padding:11px 18px; border-radius:var(--r); font-size:13px; box-shadow:var(--shadow-lg);
  z-index:var(--z-toast); display:none; max-width:min(560px,90vw); }
.skeleton { background:linear-gradient(90deg,var(--navy-50) 25%,var(--navy-100) 37%,var(--navy-50) 63%);
  background-size:400% 100%; animation:sk 1.3s ease-in-out infinite; border-radius:var(--r-sm); }
@keyframes sk { 0%{background-position:100% 50%} 100%{background-position:0 50%} }

.sr { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden;
  clip:rect(0,0,0,0); white-space:nowrap; border:0; }
.skiplink { position:absolute; left:-9999px; top:0; z-index:var(--z-tooltip); background:var(--navy-900);
  color:#fff; padding:10px 16px; font-weight:700; }
.skiplink:focus { left:0; }

.pagefoot { margin-top:34px; padding-top:16px; border-top:1px solid var(--line);
  font-size:11.5px; color:var(--ink-soft); display:flex; gap:16px; flex-wrap:wrap; }

/* ───────────────────────── responsive ───────────────────────── */
@media (max-width:1080px) {
  .split { grid-template-columns:1fr; }
}
@media (max-width:860px) {
  .shell { grid-template-columns:1fr; }
  .side { position:static; height:auto; flex-direction:column; }
  .navgroup { display:flex; flex-wrap:wrap; gap:2px; padding:6px 10px; }
  .navgroup h4 { width:100%; padding:4px 8px 2px; }
  .nav { width:auto; border-left:0; border-bottom:3px solid transparent; border-radius:var(--r-sm); padding:7px 11px; }
  .nav[aria-current='page'] { border-left:0; border-bottom-color:var(--red); }
  .nav .count { margin-left:6px; }
  .sidefoot { display:none; }
  .wrap { padding:18px 15px 52px; }
  .pagehead .display { font-size:31px; }
  .moments { grid-template-columns:1fr; }
  .moment { border-left:0; border-top:1px solid var(--line); }
  .moment:first-child { border-top:0; }
  .prow { grid-template-columns:1fr auto; }
  .prow .ladder { grid-column:1/-1; }
  .topbar { padding:11px 15px; }
}

@media (prefers-reduced-motion:reduce) {
  *, *::before, *::after { animation-duration:.01ms !important; animation-iteration-count:1 !important;
    transition-duration:.01ms !important; scroll-behavior:auto !important; }
}

@media print {
  .side, .topbar, .draftbar, .btn, .toggle { display:none !important; }
  .shell { grid-template-columns:1fr; }
  body { background:#fff; }
  .panel { break-inside:avoid; box-shadow:none; }
}

@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:.32} }
textarea { font:inherit; font-size:13px; padding:10px 12px; border:1px solid var(--line-strong);
  border-radius:var(--r); resize:vertical; }
details summary::-webkit-details-marker { color:var(--tea-dark); }

/* A ghost button on the navy sidebar needs light ink — the default navy-on-navy
   was invisible. Any button placed on a dark surface uses this. */
.side .btn.ghost, .panel.dark .btn.ghost {
  color:#fff; border-color:rgba(255,255,255,.32); background:transparent;
}
.side .btn.ghost:hover, .panel.dark .btn.ghost:hover {
  background:rgba(255,255,255,.1); border-color:rgba(255,255,255,.5);
}

@media (max-width:860px) { .shell { background:var(--paper); } }

/* ═══════════════════════════════════════════════════════════════════════════
   THE LEARNER SURFACE

   Deliberately not the counselor surface. Wider measure, larger type, more air,
   warmer ground, and no institutional chrome — no provenance pills, no statute
   chips, no tier words, no bare level numerals. A young person reading their own
   words should not feel like they are reading a record about themselves.
   ═══════════════════════════════════════════════════════════════════════════ */

.learner { max-width: 720px; margin: 0 auto; }

.l-head { margin-bottom: 26px; }
.l-kicker { font-size: 11px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase;
  color: var(--red); margin-bottom: 8px; }
.l-head .display { font-size: 44px; color: var(--navy-900); margin-bottom: 12px; }
.l-head p { font-size: 16px; line-height: 1.62; color: var(--ink-mid); max-width: 60ch; }

.l-label { font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  color: var(--ink-soft); margin-bottom: 9px; }

.l-picker { margin-bottom: 18px; }
.l-chips { display: flex; flex-wrap: wrap; gap: 7px; }
.l-chip { border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink-mid);
  font: inherit; font-size: 13px; padding: 7px 14px; border-radius: 999px; cursor: pointer;
  transition: background .15s var(--ease), border-color .15s var(--ease), color .15s var(--ease); }
.l-chip:hover { border-color: var(--navy-300); background: var(--navy-25); }
.l-chip[aria-pressed='true'] { background: var(--navy-900); border-color: var(--navy-900); color: #fff; }

/* The question is the largest thing on the screen, because it is the only thing
   being asked of them. */
.l-prompt { background: var(--surface); border: 1px solid var(--line); border-left: 0;
  border-radius: var(--r-lg); padding: 26px 28px; margin-bottom: 20px;
  box-shadow: var(--shadow-sm); }
.l-prompt p { margin: 0; font-size: 21px; line-height: 1.5; color: var(--navy-900);
  font-style: italic; text-wrap: pretty; }

.l-actions { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; margin-bottom: 18px; }
.l-rec { font-size: 14px; padding: 12px 20px; }
.l-rec svg { width: 17px; height: 17px; stroke: currentColor; fill: none; stroke-width: 1.8; }

.l-typed summary { font-size: 13px; color: var(--tea-dark); cursor: pointer; padding: 4px 0; }
.l-typed textarea { width: 100%; margin-top: 10px; font-size: 15px; }

.l-live { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 30px 28px; display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
  box-shadow: var(--shadow-sm); }
.l-live p { margin: 0; flex: 1; min-width: 190px; font-size: 14px; color: var(--ink-mid); }
.l-dot { width: 14px; height: 14px; border-radius: 50%; background: var(--red); flex: none;
  animation: pulse 1.3s ease-in-out infinite; }
.l-clock { font-size: 34px; color: var(--navy-900); }

.l-panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 24px 26px; margin-bottom: 16px; box-shadow: var(--shadow-sm); }
.l-panel h2 { font-size: 17px; color: var(--navy-900); margin-bottom: 12px; }
.l-panel > p { font-size: 15px; line-height: 1.6; color: var(--ink-mid); }

.l-player { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.l-track { flex: 1; height: 6px; background: var(--navy-100); border-radius: 3px; overflow: hidden; }
.l-track i { display: block; height: 100%; width: 0; background: var(--navy-700); border-radius: 3px; }

.l-transcript { font-size: 17px; line-height: 1.85; color: var(--ink); margin: 0; }
.l-transcript w { border-radius: 2px; transition: background .12s linear, color .12s linear; }
.l-transcript w.spoken { background: var(--navy-100); }
.l-transcript w.now { background: var(--navy-800); color: #fff; }

.l-verdict { font-size: 16px; line-height: 1.6; color: var(--navy-900); margin-bottom: 18px;
  text-wrap: pretty; }

/* The five moves. Present ones are filled and quote the person's own words back
   to them; absent ones are an instruction, never a deficit. */
.l-moves { display: flex; flex-direction: column; gap: 2px; }
.l-move { display: grid; grid-template-columns: 26px 1fr; gap: 12px; align-items: start;
  padding: 12px 13px; border-radius: var(--r); background: var(--navy-25); }
.l-move.on { background: #EAF1F4; }
.l-move b { display: block; font-size: 14px; color: var(--navy-900); margin-bottom: 3px; }
.l-move q { font-size: 13.5px; color: var(--ink-mid); font-style: italic; }
.l-move .l-hint { font-size: 13.5px; color: var(--ink-soft); }
.l-tick { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center;
  font-size: 12px; font-weight: 700; background: var(--navy-100); color: transparent; }
.l-move.on .l-tick { background: var(--lvl-3); color: #fff; }

.l-next { margin-top: 18px; padding: 16px 18px; border-radius: var(--r); background: var(--navy-900); }
.l-next .l-label { color: var(--navy-300); }
.l-next p { margin: 0; font-size: 15.5px; line-height: 1.55; color: #fff; }

.l-opens { margin-top: 16px; display: flex; flex-direction: column; gap: 12px; }
.l-open { border: 1px solid var(--line); border-radius: var(--r); padding: 15px 17px; }
.l-open b { font-size: 15px; color: var(--navy-900); display: block; margin-bottom: 9px; }
.l-open ul { margin: 0 0 9px; padding-left: 18px; }
.l-open li { font-size: 14px; color: var(--ink); padding: 1px 0; }
.l-open .l-hint { font-size: 13px; color: var(--ink-soft); margin: 0; }

.l-fine { font-size: 12.5px; color: var(--ink-soft); line-height: 1.55; margin-top: 14px; }

@media (max-width: 620px) {
  .l-head .display { font-size: 32px; }
  .l-prompt { padding: 20px; }
  .l-prompt p { font-size: 18px; }
  .l-panel { padding: 19px 17px; }
}

/* Nav entries that are documents rather than routes. */
a.nav { text-decoration:none; }
a.nav .count { font-size:13px; opacity:.65; }
a.btn { text-decoration:none; }
