/* Adaptive Board Review — redesign v3 "Map & Focus" (Nunito)
   Fonts: <link rel="preconnect" href="https://fonts.googleapis.com">
          <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
          <link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Nunito:ital,wght@0,400;0,500;0,600;0,700;0,800;1,700;1,800&display=swap">
   Tokens live on :root. Dark = system preference unless <html data-theme="light">, or forced with <html data-theme="dark">.
   Everything visual sits under .app (put class="app" on <body> or the page wrapper). */
/* ===== Adaptive Board Review v3: "Map & Focus" ===== */
:root{
  --bg:#EFEBE3; --surface:#F8F5EF; --surface-2:#E9E4DA;
  --fg:#24211D; --muted:#5D5852; --line:#D6CFC3;
  --accent:#24211D; --accent-ink:#F8F5EF; --accent-soft:#DFD8CB;
  --right:#276178; --right-soft:#DCE9EB;
  --wrong:#7E2236; --wrong-soft:#F3DFDA;
  --hook:#7C5A06;  --hook-soft:#F3E4A8;
  --flag:#4B4A96;  --flag-soft:#E3E2F1;
  --s1:#2A448A; --s2:#CC7C25; --s3:#479E87; --s4:#743155;
  --display:"Nunito",ui-rounded,system-ui,sans-serif;
  --body:"Nunito",ui-rounded,system-ui,sans-serif;
  --mono:"Nunito",ui-rounded,system-ui,sans-serif;
}
@media (prefers-color-scheme:dark){:root:not([data-theme="light"]){
  --bg:#191816; --surface:#211F1C; --surface-2:#2B2925;
  --fg:#ECE5D8; --muted:#AEA79C; --line:#3A3732;
  --accent:#ECE5D8; --accent-ink:#191816; --accent-soft:#3B3832;
  --right:#7FC9C9; --right-soft:#1D3637;
  --wrong:#F59487; --wrong-soft:#432622;
  --hook:#E8C964;  --hook-soft:#3E3420;
  --flag:#AEABEE;  --flag-soft:#2E2D48;
  --s1:#7A8CDB; --s2:#CC8A38; --s3:#6CC4A0; --s4:#B190B8;
  color-scheme:dark;
}}
:root[data-theme="dark"],[data-theme="dark"]{
  --bg:#191816; --surface:#211F1C; --surface-2:#2B2925;
  --fg:#ECE5D8; --muted:#AEA79C; --line:#3A3732;
  --accent:#ECE5D8; --accent-ink:#191816; --accent-soft:#3B3832;
  --right:#7FC9C9; --right-soft:#1D3637;
  --wrong:#F59487; --wrong-soft:#432622;
  --hook:#E8C964;  --hook-soft:#3E3420;
  --flag:#AEABEE;  --flag-soft:#2E2D48;
  --s1:#7A8CDB; --s2:#CC8A38; --s3:#6CC4A0; --s4:#B190B8;
  color-scheme:dark;
}
*{box-sizing:border-box}
.app{background-color:var(--bg);background-image:radial-gradient(circle at 1px 1px,color-mix(in srgb,var(--line) 90%,transparent) 1px,transparent 1.5px);background-size:22px 22px;
  color:var(--fg);font:18px/1.6 var(--body);min-height:100vh;-webkit-font-smoothing:antialiased}
.app button{font:inherit;color:inherit}
.app :focus-visible{outline:2px solid var(--accent);outline-offset:3px}
.mono{font-family:var(--mono)}
.label{font:500 .7rem/1.3 var(--mono);letter-spacing:.14em;text-transform:uppercase;color:var(--muted)}
.muted{color:var(--muted)}
.up{color:var(--right)} .down{color:var(--wrong)}

/* top bar */
.topbar{display:flex;align-items:center;justify-content:space-between;gap:16px;flex-wrap:wrap;padding:14px 32px;border-bottom:1px solid var(--line);background:var(--surface)}
.brand{display:flex;align-items:baseline;gap:10px;font:400 1.6rem/1 var(--display)}
.brand small{font:500 .68rem var(--mono);letter-spacing:.14em;text-transform:uppercase;color:var(--muted)}
.nav{display:flex;gap:4px;flex-wrap:wrap}
.nav a,.nav button{font:500 .82rem var(--mono);color:var(--fg);text-decoration:none;padding:9px 14px;border:1px solid transparent;border-radius:2px;background:none;cursor:pointer;display:inline-flex;align-items:center;gap:8px;min-height:40px}
.nav a:hover,.nav button:hover{border-color:var(--line)}
.nav a[aria-current="page"]{border-color:var(--fg)}
.badge{font:500 .68rem/1.6 var(--mono);background:var(--flag);color:var(--surface);padding:0 6px;border-radius:2px}
.shell{max-width:1320px;margin:0 auto;padding:36px 32px 72px}
@media (max-width:640px){.topbar{padding:12px 16px}.shell{padding:24px 16px 56px}}

/* buttons */
.btn{font:500 .84rem/1.2 var(--mono)!important;border:1px solid var(--fg);background:transparent;color:var(--fg);min-height:44px;padding:11px 18px;border-radius:2px;cursor:pointer;display:inline-flex;align-items:center;gap:10px}
.btn:hover{background:var(--accent-soft)}
.btn.primary{background:var(--accent);color:var(--accent-ink)!important;border-color:var(--accent)}
.btn.big{font-size:1rem!important;padding:16px 26px;min-height:56px}
.btn.ghost{border-color:transparent}
.btn.flagged{background:var(--flag-soft);border-color:var(--flag);color:var(--flag)!important}
.btn.warn{border-color:var(--wrong);color:var(--wrong)!important}
.kbd{font:500 .7rem/1 var(--mono);border:1px solid currentColor;border-bottom-width:2px;border-radius:4px;padding:3px 5px;opacity:.8}

/* ---------- HOME ---------- */
.hero{display:grid;grid-template-columns:minmax(0,.9fr) minmax(0,1.1fr);gap:28px;align-items:stretch}
@media (max-width:980px){.hero{grid-template-columns:1fr}}
.panel{background:var(--surface);border:1px solid var(--line);border-top:2px solid var(--fg);border-radius:2px;padding:26px 28px;min-width:0}
.ability{display:flex;flex-direction:column;gap:10px}
.ability .num{font:400 7.5rem/.85 var(--display);letter-spacing:-.02em;font-variant-numeric:lining-nums}
.ability .num sup{font-size:.2em;vertical-align:top;margin-left:6px;color:var(--right);font-family:var(--mono)}
.ability p{margin:0;max-width:34ch}
.spark{width:100%;height:84px;display:block;margin-top:auto}
.sentence{font:400 2rem/1.55 var(--display);margin:6px 0 22px;text-wrap:pretty}
.slot{font:inherit;font-style:italic;background:none;border:0;border-bottom:2px dashed var(--fg);padding:0 4px;cursor:pointer;color:var(--fg)}
.slot:hover{background:var(--accent-soft)}
.slot::after{content:"▾";font:400 .5em var(--mono);margin-left:6px;vertical-align:middle;color:var(--muted)}
.mix{display:flex;height:34px;border:1px solid var(--fg);border-radius:2px;overflow:hidden}
.mix span{display:flex;align-items:center;padding:0 10px;font:500 .72rem var(--mono);color:#F8F5EF;white-space:nowrap;overflow:hidden}
.mix-legend{display:flex;justify-content:space-between;flex-wrap:wrap;gap:6px 16px;margin-top:8px}
.start-row{display:flex;align-items:center;justify-content:space-between;gap:16px;flex-wrap:wrap;margin-top:24px}

.sec-head{display:flex;align-items:flex-end;justify-content:space-between;gap:16px;flex-wrap:wrap;margin:56px 0 18px}
.sec-head h2{font:400 2.6rem/1 var(--display);margin:0}
.sec-head p{margin:6px 0 0;color:var(--muted);max-width:60ch}
.legend{display:flex;align-items:center;gap:6px;font:400 .72rem var(--mono);color:var(--muted)}
.legend i{width:22px;height:14px;display:inline-block;border:1px solid var(--line)}

.map{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:18px}
@media (max-width:1100px){.map{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media (max-width:620px){.map{grid-template-columns:1fr}}
.dcol{display:flex;flex-direction:column;gap:8px;min-width:0}
.dcol header{display:flex;justify-content:space-between;align-items:baseline;gap:8px;border-bottom:1.5px solid var(--fg);padding-bottom:8px}
.dcol header b{font:400 1.35rem/1.1 var(--display)}
.dcol header .mono{font-size:.78rem}
.dnum{font:500 .7rem var(--mono);color:var(--muted);margin-right:6px}
.tiles{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px}
.tile{position:relative;display:flex;flex-direction:column;justify-content:space-between;gap:6px;text-align:left;min-height:78px;padding:10px 11px;border:1px solid transparent;border-radius:2px;cursor:pointer;background:var(--surface)}
.tile .t{font:500 .95rem/1.2 var(--body)}
.tile .c{font:400 .7rem var(--mono);color:var(--fg);opacity:.75;display:flex;justify-content:space-between}
.tile.wide{grid-column:span 2}
.tile:hover{border-color:var(--fg)}
.tile[aria-pressed="true"]{border:2px solid var(--fg);padding:9px 10px}
.tile[aria-pressed="true"]::after{content:"✓";position:absolute;top:-1px;right:-1px;width:20px;height:20px;background:var(--fg);color:var(--bg);font:600 .7rem/20px var(--mono);text-align:center}
.p3{background:color-mix(in srgb,var(--right) 42%,var(--surface))}
.p2{background:color-mix(in srgb,var(--right) 26%,var(--surface))}
.p1{background:color-mix(in srgb,var(--right) 12%,var(--surface))}
.z0{background:var(--surface)}
.n1{background:color-mix(in srgb,var(--wrong) 12%,var(--surface))}
.n2{background:color-mix(in srgb,var(--wrong) 26%,var(--surface))}
.n3{background:color-mix(in srgb,var(--wrong) 40%,var(--surface))}
.new{background:repeating-linear-gradient(135deg,var(--surface) 0 6px,var(--surface-2) 6px 7px)}

.tray{position:sticky;bottom:16px;margin-top:22px;display:flex;align-items:center;justify-content:space-between;gap:18px;flex-wrap:wrap;
  background:var(--fg);color:var(--bg);border-radius:2px;padding:14px 16px 14px 24px}
.tray .sentence-sm{font:400 1.25rem/1.5 var(--display)}
.tray .slot{border-bottom-color:var(--bg);color:var(--bg);font-size:inherit}
.tray .slot::after{color:var(--bg);opacity:.6}
.tray .slot:hover{background:color-mix(in srgb,var(--bg) 18%,transparent)}
.tray .btn.primary{background:var(--bg);color:var(--fg)!important;border-color:var(--bg)}
.foot{display:flex;justify-content:space-between;gap:16px;flex-wrap:wrap;margin-top:56px;padding-top:18px;border-top:1px solid var(--line);font:400 .78rem var(--mono);color:var(--muted)}
.foot button{background:none;border:0;padding:6px 0;cursor:pointer;text-decoration:underline;text-underline-offset:4px;font:inherit;color:var(--muted)}

/* ---------- FOCUS (question) ---------- */
.qtop{display:grid;grid-template-columns:auto 1fr auto;gap:22px;align-items:center;padding:16px 32px;border-bottom:1px solid var(--line);background:var(--surface)}
.qtop .count{font:400 1.7rem/1 var(--display)}
.qtop .count small{font:400 .75rem var(--mono);color:var(--muted);margin-left:6px}
.clock{font:500 1.05rem var(--mono);padding:6px 12px;border:1px solid var(--fg);border-radius:2px;font-variant-numeric:tabular-nums}
.timeline{display:flex;align-items:flex-end;gap:3px;height:34px}
.timeline i{flex:1 1 0;min-width:4px;height:100%;display:block}
.timeline .r{background:var(--right)}
.timeline .w{border:2px solid var(--wrong)}
.timeline .p{background:linear-gradient(to top,var(--hook) 50%,transparent 50%);border:2px solid var(--hook)}
.timeline .cur{background:var(--fg);height:100%;box-shadow:0 0 0 3px var(--bg),0 0 0 4px var(--fg)}
.timeline .todo{height:6px;background:var(--line)}
.timeline .fl{position:relative}
.timeline .fl::before{content:"";position:absolute;top:-7px;left:50%;margin-left:-3px;width:6px;height:6px;background:var(--flag)}
@media (max-width:640px){.qtop{grid-template-columns:auto auto;padding:12px 16px}.qtop .timeline{grid-column:1 / -1;grid-row:2;height:24px;gap:2px}}

.stage{position:relative;max-width:1320px;margin:0 auto;padding:48px 32px 120px}
.focus{max-width:760px;margin:0 auto;display:flex;flex-direction:column;gap:26px}
.meta{display:flex;flex-wrap:wrap;gap:6px 16px;font:400 .74rem var(--mono);color:var(--muted);letter-spacing:.04em}
.meta b{font-weight:500;color:var(--fg)}
.meta .lvl{border:1px solid var(--fg);padding:1px 8px;color:var(--fg);cursor:help}
.stem{font:400 1.32rem/1.6 var(--body);margin:0;max-width:62ch}
.stem p{margin:0 0 .7em}
.stem .ask{font-weight:500}
.choices{display:flex;flex-direction:column;gap:10px}
.choice{position:relative;display:grid;grid-template-columns:40px minmax(0,1fr) auto;gap:16px;align-items:start;text-align:left;width:100%;
  background:var(--surface);border:1px solid var(--line);border-radius:3px;padding:14px 18px 14px 14px;cursor:pointer;overflow:hidden;min-height:60px}
.choice:hover{border-color:var(--fg)}
.choice .key{width:36px;height:34px;display:flex;align-items:center;justify-content:center;font:500 .9rem var(--mono);border:1.5px solid var(--fg);border-bottom-width:4px;border-radius:5px;background:var(--surface);position:relative;z-index:1}
.choice .txt{font:400 1.1rem/1.5 var(--body);padding-top:3px;position:relative;z-index:1}
.choice .pct{font:500 .76rem var(--mono);color:var(--muted);padding-top:7px;position:relative;z-index:1}
.choice[aria-pressed="true"]{border:2px solid var(--fg);padding:13px 17px 13px 13px;background:var(--accent-soft)}
.choice[aria-pressed="true"] .key{background:var(--fg);color:var(--bg);border-color:var(--fg)}
.choice .dist{position:absolute;left:0;top:0;bottom:0;background:color-mix(in srgb,var(--fg) 6%,transparent);z-index:0}
.choice.right{border:2px solid var(--right);padding:13px 17px 13px 13px;background:var(--right-soft)}
.choice.right .key{background:var(--right);border-color:var(--right);color:var(--surface)}
.choice.right .dist{background:color-mix(in srgb,var(--right) 14%,transparent)}
.choice.wrong{border:2px solid var(--wrong);padding:13px 17px 13px 13px;background:var(--wrong-soft)}
.choice.wrong .key{background:var(--wrong);border-color:var(--wrong);color:var(--surface)}
.choice.wrong .dist{background:color-mix(in srgb,var(--wrong) 12%,transparent)}
.choice.done{cursor:default}
.whynot{display:block;margin-top:8px;font:400 .95rem/1.5 var(--body);color:var(--fg)}
.whynot b{font:500 .66rem var(--mono);letter-spacing:.12em;text-transform:uppercase;margin-right:6px;color:var(--muted)}
.choice.right .whynot b{color:var(--right)} .choice.wrong .whynot b{color:var(--wrong)}

.actionbar{position:sticky;bottom:0;display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;
  max-width:760px;margin:30px auto 0;padding:14px 0;border-top:1.5px solid var(--fg);background:transparent}
.actionbar .grp{display:flex;gap:8px;flex-wrap:wrap;align-items:center}
.linklike{background:none;border:0;padding:8px 2px;cursor:pointer;font:500 .8rem var(--mono)!important;color:var(--muted)!important;text-decoration:underline;text-underline-offset:4px}

/* curve widget, top-right of stage */
.curve{position:absolute;top:48px;right:32px;width:250px;background:var(--surface);border:1px solid var(--line);border-top:2px solid var(--fg);border-radius:2px;padding:16px 18px;display:flex;flex-direction:column;gap:10px}
.curve .big{font:400 3rem/1 var(--display)}
.curve .big small{font:500 .78rem var(--mono);margin-left:6px}
.gauge{position:relative;height:12px;border-bottom:1px solid var(--line);background:repeating-linear-gradient(90deg,var(--line) 0 1px,transparent 1px 10%) left bottom/100% 5px no-repeat}
.gauge .mid{position:absolute;left:50%;top:-5px;bottom:-1px;width:2px;margin-left:-1px;background:var(--fg)}
.gauge .fill{position:absolute;bottom:0;height:6px}
.gauge .fill.a{left:50%;background:var(--right)} .gauge .fill.b{right:50%;background:var(--wrong)}
.gauge-k{display:flex;justify-content:space-between;font:400 .66rem var(--mono);color:var(--muted)}
@media (max-width:1240px){.curve{position:static;width:auto;max-width:760px;margin:0 auto 24px}}

/* ---------- EXPLAIN (after answering) ---------- */
.split{display:grid;grid-template-columns:minmax(0,1fr) 460px;gap:40px;align-items:start;max-width:1320px;margin:0 auto;padding:40px 32px 96px}
@media (max-width:1100px){.split{grid-template-columns:1fr}}
.split .focus{margin:0;max-width:none}
.explain{position:sticky;top:20px;background:var(--surface);border:1px solid var(--line);border-top:2px solid var(--fg);border-radius:2px;padding:24px 26px;display:flex;flex-direction:column;gap:16px}
.stamp{align-self:flex-start;display:inline-flex;align-items:center;gap:10px;font:500 .9rem/1.2 var(--mono);letter-spacing:.16em;text-transform:uppercase;padding:8px 16px;border:3px double currentColor;border-radius:3px;transform:rotate(-1.5deg)}
.stamp.ok{color:var(--right);background:var(--right-soft)} .stamp.bad{color:var(--wrong);background:var(--wrong-soft)} .stamp.part{color:var(--hook);background:var(--hook-soft)}
.explain h3{display:flex;align-items:center;gap:12px;font:500 .7rem/1.3 var(--mono);letter-spacing:.14em;text-transform:uppercase;color:var(--muted);margin:6px 0 0}
.explain h3::after{content:"";flex:1;border-top:1px solid var(--line)}
.explain ul{margin:0;padding-left:20px;list-style:"–  "}
.explain li{margin:5px 0;font-size:1rem;line-height:1.6}
.hook{background:var(--hook-soft);border-radius:3px 12px 4px 10px / 10px 4px 12px 3px;padding:14px 18px;font-size:1.02rem}
.hook b{display:block;font:500 .66rem var(--mono);letter-spacing:.14em;text-transform:uppercase;color:var(--hook);margin-bottom:4px}
.bottom{border:1.5px solid var(--fg);padding:14px 18px;border-radius:2px;font-size:1.02rem}
.bottom b{font:500 .66rem var(--mono);letter-spacing:.14em;text-transform:uppercase;margin-right:6px}
.refs{font-size:.88rem;color:var(--muted)}
.refs summary{cursor:pointer;font:500 .76rem var(--mono);color:var(--fg)}

/* ---------- DEBRIEF ---------- */
.debrief-hero{display:grid;grid-template-columns:minmax(0,1.3fr) minmax(0,1fr);gap:40px;align-items:end;padding-bottom:28px;border-bottom:1.5px solid var(--fg)}
@media (max-width:1000px){.debrief-hero{grid-template-columns:1fr}}
.debrief-hero h1{font:400 4.4rem/1 var(--display);margin:8px 0 14px;letter-spacing:-.01em}
.debrief-hero h1 em{color:var(--right)}
.debrief-hero p{margin:0;font-size:1.15rem;max-width:46ch}
.stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:0 18px}
.stats div{border-top:1.5px solid var(--fg);padding-top:8px}
.stats b{display:block;font:400 2.6rem/1.05 var(--display);font-variant-numeric:lining-nums}
.debrief{display:grid;grid-template-columns:minmax(0,1fr) 440px;gap:40px;margin-top:36px;align-items:start}
@media (max-width:1100px){.debrief{grid-template-columns:1fr}}
.grid100{display:grid;grid-template-columns:repeat(20,minmax(0,1fr));gap:4px;margin:14px 0 10px}
.app .sq{aspect-ratio:1;border:0;padding:0;cursor:pointer;position:relative;background:var(--surface-2);font:500 .62rem/1 var(--mono);color:var(--fg)}
.app .sq.r{color:var(--surface)} .app .sq.w{color:var(--wrong)}
.sq.r{background:var(--right)} .sq.w{background:transparent;box-shadow:inset 0 0 0 2px var(--wrong)} .sq.p{background:linear-gradient(to top,var(--hook) 50%,transparent 50%);box-shadow:inset 0 0 0 2px var(--hook)}
.sq.f::after{content:"";position:absolute;top:0;right:0;border-top:8px solid var(--flag);border-left:8px solid transparent}
.sq.sel{outline:2px solid var(--fg);outline-offset:2px}
.sq:hover{outline:2px solid var(--muted);outline-offset:1px}
.domrows{display:flex;flex-direction:column;gap:14px;margin-top:14px}
.domrow{display:grid;grid-template-columns:minmax(0,15em) 1fr 5.5em;gap:16px;align-items:center}
.domrow .nm{font-size:1rem;line-height:1.3}
.scale{position:relative;height:22px;border-bottom:1px solid var(--line);background:repeating-linear-gradient(90deg,var(--line) 0 1px,transparent 1px 12.5%) left bottom/100% 6px no-repeat}
.scale .zero{position:absolute;left:50%;top:0;bottom:-1px;border-left:1.5px dashed var(--fg)}
.scale .dot{position:absolute;bottom:-7px;width:14px;height:14px;margin-left:-7px;border-radius:99px;border:2px solid var(--surface)}
.scale .dot.a{background:var(--right)} .scale .dot.b{background:var(--wrong)}
.scale .from{position:absolute;bottom:-3px;width:6px;height:6px;margin-left:-3px;border-radius:99px;background:var(--muted)}
.scale .arrow{position:absolute;bottom:0;height:2px;background:var(--muted)}
.domrow .v{font:500 .85rem var(--mono);text-align:right}
@media (max-width:640px){.domrow{grid-template-columns:1fr auto}.domrow .scale{grid-column:1 / -1;grid-row:2}}
.notes{margin:0;padding:0;list-style:none;display:flex;flex-direction:column;gap:10px}
.notes li{padding-left:18px;position:relative;font-size:1rem}
.notes li::before{content:"–";position:absolute;left:0;color:var(--muted)}

/* ---------- HISTORY ---------- */
.chart{width:100%;height:auto;display:block}
.sessions{display:flex;flex-direction:column;margin-top:10px;border-top:1.5px solid var(--fg)}
.sess{color:inherit;text-decoration:none;display:grid;grid-template-columns:6.5em 9.5em minmax(0,1fr) 5.6em 4.6em;gap:16px;align-items:center;padding:14px 4px;border-bottom:1px solid var(--line);text-align:left;width:100%;background:none;border-left:0;border-right:0;border-top:0;cursor:pointer}
.sess:hover{background:var(--surface-2)}
.sess .when{font:400 .8rem/1.4 var(--mono)}
.sess .what{font-size:1rem;line-height:1.35}
.sess .what small{display:block;font:400 .72rem var(--mono);color:var(--muted)}
.mini{display:flex;gap:1px;height:20px;align-items:stretch;width:100%}
.mini i{flex:1 1 0;min-width:0}
.mini .r{background:var(--right)} .mini .w{background:color-mix(in srgb,var(--wrong) 30%,transparent);border-top:2px solid var(--wrong)} .mini .p{background:var(--hook)}
.sess .pc{font:400 1.6rem/1 var(--display);text-align:right}
.sess .ab{font:500 .82rem var(--mono);text-align:right}
@media (max-width:820px){.sess{grid-template-columns:1fr auto}.sess .mini{grid-column:1 / -1}.sess .when{grid-column:1 / -1}}

/* ---------- FLAGS ---------- */
.inbox{display:grid;grid-template-columns:400px minmax(0,1fr);gap:0;border:1px solid var(--line);border-top:2px solid var(--fg);background:var(--surface);border-radius:2px;min-height:640px}
@media (max-width:960px){.inbox{grid-template-columns:1fr}}
.ilist{border-right:1px solid var(--line);display:flex;flex-direction:column}
.ilist h3{margin:0;padding:16px 20px 10px}
.item{display:flex;flex-direction:column;gap:6px;text-align:left;padding:14px 20px;border:0;border-bottom:1px solid var(--line);background:none;cursor:pointer;width:100%}
.item:hover{background:var(--surface-2)}
.item[aria-current="true"]{background:var(--accent-soft);box-shadow:inset 3px 0 0 var(--fg)}
.item .tx{font-size:.98rem;line-height:1.4;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.item .k{display:flex;gap:10px;font:400 .7rem var(--mono);color:var(--muted)}
.item .k .fg{color:var(--flag)}
.detail{padding:28px 34px;display:flex;flex-direction:column;gap:18px;max-width:780px}
.detail .stem{font-size:1.15rem}
.bubbles{display:flex;gap:10px;flex-wrap:wrap}
.bubble{width:62px;height:62px;border-radius:99px;border:1.5px solid var(--fg);background:transparent;cursor:pointer;display:flex;flex-direction:column;align-items:center;justify-content:center;font:400 1.4rem/1 var(--display)}
.bubble small{font:400 .52rem var(--mono);letter-spacing:.04em;text-transform:uppercase;margin-top:2px}
.bubble:hover{background:var(--accent-soft)}
.bubble[aria-pressed="true"]{background:var(--fg);color:var(--bg)}
.bubble.now{box-shadow:0 0 0 3px var(--bg),0 0 0 4px var(--muted)}
.note{border-left:0;background:var(--surface-2);padding:12px 16px;border-radius:2px;font-size:.98rem}
.tabs{display:flex;gap:4px;padding:0 0 16px}
.tabs button{font:500 .8rem var(--mono)!important;padding:8px 12px;border:1px solid transparent;border-radius:2px;background:none;cursor:pointer;min-height:40px}
.tabs button[aria-pressed="true"]{border-color:var(--fg)}

/* ---------- PHONE ---------- */
.sheet{background:var(--surface);border-top:2px solid var(--fg);border-radius:12px 12px 0 0;padding:18px 18px 26px;margin:0 -16px;display:flex;flex-direction:column;gap:14px;box-shadow:0 -1px 0 var(--line)}
.grab{width:44px;height:4px;border-radius:99px;background:var(--line);align-self:center}

/* ---------- Nunito tuning: one family for everything; weight does the work serif/mono used to ---------- */
.app{font-variant-numeric:tabular-nums lining-nums;font-size:17.5px}
.label{font-weight:800;letter-spacing:.12em}
.btn,.nav a,.nav button,.tabs button,.linklike{font-weight:700!important}
.kbd{font-weight:800}
.brand{font-weight:800;font-size:1.35rem;letter-spacing:-.01em}
.brand small{font-weight:800}
.ability .num{font-weight:800;font-size:6.2rem;letter-spacing:-.04em}
.ability .num sup{font-weight:800}
.sentence{font-weight:600;font-size:1.7rem;line-height:1.7}
.slot{font-style:normal;font-weight:800}
.tray .sentence-sm{font-weight:600;font-size:1.15rem}
.sec-head h2{font-weight:800;font-size:2.2rem;letter-spacing:-.02em}
.dcol header b{font-weight:800;font-size:1.1rem}
.dnum{font-weight:800}
.tile .t{font-weight:700;font-size:.9rem}
.tile .c{font-weight:600}
.legend{font-weight:600}
.qtop .count{font-weight:800;font-size:1.5rem}
.qtop .count small{font-weight:700}
.clock{font-weight:800}
.meta{font-weight:600}
.meta b{font-weight:800}
.stem{font-size:1.2rem;line-height:1.65}
.stem .ask{font-weight:800}
.choice .key{font-weight:800}
.choice .txt{font-size:1.05rem;font-weight:500}
.choice .pct{font-weight:700}
.whynot{font-size:.93rem}
.whynot b{font-weight:800}
.curve .big{font-weight:800;font-size:2.6rem;letter-spacing:-.02em}
.curve .big small{font-weight:800}
.gauge-k{font-weight:600}
.stamp{font-weight:800}
.explain h3{font-weight:800}
.explain li{font-size:.97rem}
.hook b,.bottom b{font-weight:800}
.refs summary{font-weight:700}
.debrief-hero h1{font-weight:800;font-size:3.3rem;line-height:1.08;letter-spacing:-.03em}
.debrief-hero p{font-size:1.08rem}
.stats b{font-weight:800;font-size:2.2rem;letter-spacing:-.02em}
.app .sq{font-weight:800}
.domrow .v{font-weight:800}
.sess .when{font-weight:600}
.sess .what{font-weight:700}
.sess .what small{font-weight:600}
.sess .pc{font-weight:800;font-size:1.35rem}
.sess .ab{font-weight:800}
.item .k{font-weight:700}
.bubble{font-weight:800;font-size:1.3rem}
.bubble small{font-weight:800}
.badge{font-weight:800}
.foot{font-weight:600}

/* ===================== app additions (Claude Code, 2026-10-27) =====================
   Pieces the mockups don't draw: real <select> slots, popovers, the older question formats,
   tooltips, profiles, the phone sheet, and the reading-font choice. Tokens only. */
[hidden]{display:none!important}
body{margin:0}
.app h1,.app h2,.app h3{color:var(--fg)}
.banner{position:sticky;top:0;z-index:30;background:var(--hook-soft);color:var(--fg);border-bottom:1px solid color-mix(in srgb,var(--hook) 40%,transparent);padding:10px 32px;font-weight:600;font-size:.95rem}
#loading{display:flex;justify-content:center;padding:96px 16px}
.h-big{font:800 2.7rem/1.1 var(--display);letter-spacing:-.02em;margin:6px 0 0}
.h-sec{font:800 1.8rem/1.1 var(--display);letter-spacing:-.02em;margin:0 0 4px}
.lede{margin:6px 0 0;color:var(--muted);max-width:60ch;font-size:.98rem}
.stack{display:flex;flex-direction:column;gap:16px}

/* top bar: profile chip */
.nav .who{border-color:var(--line)}
.nav .who small{font-weight:600;color:var(--muted);font-size:.7rem}

/* slots that are real <select>s: the design's slot text shows, the native select sits invisibly
   on top of it (so it opens the platform picker and reads correctly to screen readers) */
.slotsel{position:relative;display:inline-block;white-space:nowrap}
.slotsel select{position:absolute;inset:0;width:100%;height:100%;opacity:0;cursor:pointer;font:inherit;margin:0;border:0;appearance:none;-webkit-appearance:none}
.slotsel:focus-within .slot{outline:2px solid var(--accent);outline-offset:3px}
.tray .slotsel:focus-within .slot{outline-color:var(--bg)}
.slotsel:hover .slot{background:var(--accent-soft)}
.tray .slotsel:hover .slot{background:color-mix(in srgb,var(--bg) 18%,transparent)}
.slotsel select option{color:#24211D;background:#F8F5EF}
.slot.static{cursor:default}.slot.static::after{content:none}
.slot.static:hover{background:none}

/* popovers: <details class="pop"> with a slot or a footer link as the summary */
.pop{position:relative;display:inline-block}
.pop>summary{list-style:none;display:inline}
.pop>summary::-webkit-details-marker{display:none}
.pop .menu{position:absolute;z-index:40;left:0;bottom:calc(100% + 10px);min-width:260px;background:var(--surface);color:var(--fg);border:1px solid var(--line);border-top:2px solid var(--fg);border-radius:2px;padding:14px 16px;display:flex;flex-direction:column;gap:10px;font:500 .9rem/1.4 var(--body);box-shadow:0 10px 30px rgb(0 0 0 / .14)}
.foot .pop .menu{left:auto;right:0}
.pop .menu .label{display:block}
.toggles{display:flex;flex-wrap:wrap;gap:4px}
.toggles button{font:700 .82rem var(--mono)!important;border:1px solid var(--line);background:none;color:var(--fg);border-radius:2px;padding:7px 11px;min-height:38px;cursor:pointer}
.toggles button:hover{border-color:var(--fg)}
.toggles button[aria-pressed="true"]{background:var(--fg);color:var(--bg)!important;border-color:var(--fg)}
.foot .pop>summary{cursor:pointer;text-decoration:underline;text-underline-offset:4px;padding:6px 0}
.foot .armed{color:var(--wrong)!important}
.linklike.armed{color:var(--wrong)!important}

/* home bits the mockup leaves to text */
.shortfall{color:var(--wrong);margin-top:8px}
.dcol header .acts{display:flex;align-items:baseline;gap:10px}
.dcol header .linklike{padding:2px 0;font-size:.72rem!important}
.tile .t small{display:block;font-weight:600;font-size:.7rem;color:var(--muted)}
.tray .slot.static{border-bottom-color:var(--bg)}
.tray .hint{font-weight:600}

/* question chrome */
.qtools{display:flex;gap:10px;align-items:center;justify-self:end}
.qtools .tgl{display:inline-flex;align-items:center;gap:6px;font:700 .8rem var(--mono);cursor:pointer;min-height:40px}
.qtools .tgl input{width:16px;height:16px;accent-color:var(--fg);margin:0}
.clock.low{color:var(--wrong);border-color:var(--wrong)}
.timeline .done{background:var(--fg);opacity:.35}
.timeline.dense i{min-width:2px}
.timeline.dense{gap:1px}
@media (max-width:640px){.qtools .tgl span{display:none}}
.choices>.label{margin:0 0 2px}
.focus .label.sel{margin:-14px 0 -12px}
.meta .lvl{position:relative}
/* split view: the question and its buttons in one column, the explanation beside it; when the
   page stacks, the column dissolves so the buttons come after the explanation (phone mockup) */
.split>.qcol{grid-column:1;display:flex;flex-direction:column;min-width:0}
.split>.explain{grid-column:2;grid-row:1}
#stage.split .actionbar{max-width:none;margin:30px 0 0}
@media (max-width:1100px){
  .split>.qcol{display:contents}
  .split>.qcol>.focus{order:1}
  .split>.explain{order:2;grid-column:1;grid-row:auto;position:static}
  #stage.split .actionbar{position:static}
  .split>.qcol>.actionbar{order:3}
  .split>.noteform{order:4}
}
/* source explanations are HTML that often starts with bare text and inline tags (GABA<sub>A</sub>),
   so they flow as ordinary text: a flex column would put every inline piece on its own line */
.rat{display:block;font-size:1rem;line-height:1.6;overflow-wrap:anywhere}
.rat p{margin:0 0 .75em}
.rat>:last-child,.rat p:last-child{margin-bottom:0}
.rat ul,.rat ol{margin:.4em 0 .75em;padding-left:22px}
.rat ol{list-style:decimal}
.rat li{margin:4px 0}
.rat h2,.rat h3{font:700 1rem/1.4 var(--body);letter-spacing:0;text-transform:none;color:var(--fg);margin:.9em 0 .3em}
.rat h3::after{content:none}
.rat img{display:block;margin:.6em 0}
.rat table{margin:.6em 0}
.rat div+div{margin-top:.5em}
.whynot p{margin:.3em 0}
.whynot ul,.whynot ol{margin:.3em 0;padding-left:20px}
.whynot img{max-width:100%;height:auto;display:block;margin:.4em 0}
.whynot table{display:block;overflow-x:auto;max-width:100%;border-collapse:collapse;font-size:.88rem;margin:.4em 0}
.whynot td,.whynot th{border:1px solid var(--line);padding:4px 7px}
.bottom ul,.bottom ol{margin:.4em 0 0;padding-left:20px}
.hook i,.rat i{font-style:italic}
.explain img,.stem img{max-width:100%;height:auto;border-radius:2px;background:#F8F5EF}
.explain table,.stem table{border-collapse:collapse;display:block;overflow-x:auto;max-width:100%;font-size:.92rem}
.explain td,.explain th,.stem td,.stem th{border:1px solid var(--line);padding:5px 9px}
.stem{overflow-wrap:anywhere}
.fig{margin:0}.fig svg{max-width:100%;height:auto}
.answer-line{margin:0;font-size:1.05rem}
.curve .early{font:700 .8rem var(--mono);color:var(--muted)}
@media (max-width:640px){
  #stage.stage,#stage.split{padding:22px 16px 0}
  .split{gap:20px}
  .split>.explain{position:static;margin:0 -16px;border:0;border-top:2px solid var(--fg);border-radius:12px 12px 0 0;padding:18px 18px 26px;box-shadow:0 -1px 0 var(--line)}
  .split>.explain::before{content:"";width:44px;height:4px;border-radius:99px;background:var(--line);align-self:center}
  #stage.split .actionbar{margin:-20px -16px 0;padding:14px 16px 20px;background:var(--surface);border-top:0}
  .choice{grid-template-columns:36px minmax(0,1fr) auto;gap:12px}
  .stem{font-size:1.12rem}
}

/* older question formats, restyled with the tokens */
.match{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.3fr);gap:10px;align-items:center;font-size:1.05rem}
.match select,.numin{font:600 1rem var(--body);padding:10px 12px;min-height:46px;border:1px solid var(--fg);border-radius:2px;background:var(--surface);color:var(--fg);width:100%;min-width:0}
.match .ok{color:var(--right);font-weight:700}.match .bad{color:var(--wrong);font-weight:700}
.numin{max-width:16em}
@media (max-width:640px){.match{grid-template-columns:1fr}}
.noteform{display:flex;flex-direction:column;gap:10px;max-width:760px;margin:0 auto}
.noteform textarea{font:500 1rem/1.5 var(--body);padding:12px;border:1px solid var(--fg);border-radius:2px;background:var(--surface);color:var(--fg);min-height:84px}
.keys{font:600 .74rem var(--mono);color:var(--muted);margin:10px auto 0;max-width:760px}
.keys kbd{font:800 .7rem var(--mono);border:1px solid currentColor;border-bottom-width:2px;border-radius:4px;padding:1px 5px}

/* level tooltips: hover or keyboard focus */
[data-tip]{position:relative}
[data-tip]:hover::after,[data-tip]:focus-visible::after{content:attr(data-tip);position:absolute;left:50%;bottom:calc(100% + 8px);transform:translateX(-50%);
  width:max-content;max-width:min(280px,80vw);white-space:normal;text-align:left;background:var(--fg);color:var(--bg);
  font:600 .8rem/1.5 var(--body);letter-spacing:0;text-transform:none;padding:8px 12px;border-radius:2px;z-index:50;pointer-events:none}
.meta [data-tip]:hover::after,.meta [data-tip]:focus-visible::after{left:0;transform:none}

/* debrief + history extras */
.debrief-hero h1 em.behind{color:var(--wrong)}
.debrief-hero h1 em.even{color:var(--fg);font-style:normal}
.grid100.ten{grid-template-columns:repeat(10,minmax(0,1fr));max-width:420px}
.explain .short{margin:0;font-size:1.05rem}
.explain .choice.done{min-height:0;padding:10px 14px 10px 10px}
.explain .choice.right.done,.explain .choice.wrong.done{padding:9px 13px 9px 9px}
.hist-grid{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.6fr);gap:48px;margin-top:48px;align-items:start}
@media (max-width:900px){.hist-grid{grid-template-columns:1fr}}
.chart text{font-family:var(--mono)}
.sess{font:inherit;color:inherit}

/* flags inbox extras */
.ilist .empty{padding:20px;color:var(--muted);font-size:.95rem}
.detail .full{border-top:1px solid var(--line);padding-top:16px;display:flex;flex-direction:column;gap:16px}
.rt{width:100%;border-collapse:collapse;font-size:.95rem}
.rt th{font:800 .66rem var(--mono);letter-spacing:.12em;text-transform:uppercase;color:var(--muted);text-align:left;padding:8px;border-bottom:1.5px solid var(--fg)}
.rt td{padding:10px 8px;border-bottom:1px solid var(--line);vertical-align:top}
.rt td:nth-child(2){white-space:nowrap}

/* profiles + import */
.plist{display:grid;grid-template-columns:repeat(auto-fill,minmax(200px,1fr));gap:8px}
.plist .tile{min-height:64px;background:var(--surface);border:1px solid var(--line)}
.addrow{display:flex;gap:8px;flex-wrap:wrap;align-items:center}
.addrow input{font:600 1rem var(--body);padding:10px 12px;min-height:46px;border:1px solid var(--fg);border-radius:2px;background:var(--surface);color:var(--fg);min-width:0;flex:1 1 220px;max-width:340px}

@media (max-width:640px){.banner{padding:10px 16px}.h-big{font-size:2.1rem}.debrief-hero h1{font-size:2.4rem}.ability .num{font-size:4.6rem}.sentence{font-size:1.35rem}.sec-head h2{font-size:1.8rem}}
@media (prefers-reduced-motion:reduce){.stamp{transform:none}*{transition:none!important;animation:none!important}}

/* reading font (footer → Display): js/prefs.js sets html[data-font]; Nunito is the design's default */
:root[data-font="lexend"]{--display:"Lexend",system-ui,sans-serif;--body:"Lexend",system-ui,sans-serif;--mono:"Lexend",system-ui,sans-serif}
:root[data-font="atkinson"]{--display:"Atkinson Hyperlegible Next",system-ui,sans-serif;--body:"Atkinson Hyperlegible Next",system-ui,sans-serif;--mono:"Atkinson Hyperlegible Next",system-ui,sans-serif}
:root[data-font="inter"]{--display:"Inter",system-ui,sans-serif;--body:"Inter",system-ui,sans-serif;--mono:"Inter",system-ui,sans-serif}
:root[data-font="literata"]{--display:"Literata",Georgia,serif;--body:"Literata",Georgia,serif;--mono:"Literata",Georgia,serif}
.ability .num sup.down{color:var(--wrong)}
.ability .num sup.flat{color:var(--muted)}
.btn:disabled,.btn[disabled]{opacity:.42;cursor:default}
.btn:disabled:hover{background:transparent}
.btn.primary:disabled:hover{background:var(--accent)}
.tray .btn.primary:disabled:hover{background:var(--bg)}
@media (max-width:640px){
  .tray{padding:10px 12px 10px 14px;gap:8px;bottom:8px}
  .tray .sentence-sm{font-size:.95rem;line-height:1.55}
  .tray .btn.big{min-height:44px;padding:10px 16px;font-size:.88rem!important}
  .topbar{gap:8px}
  .nav button{padding:8px 10px}
}

/* ===== lighter type (2026-10-27: "too bold and chunky in some places, cluttered") =====
   One notch down everywhere: the design's 800s become 700 (big numbers 600), 700s become 600,
   choice and body text back to regular, small uppercase labels lighter. Overrides the
   "Nunito tuning" block above; delete this block to get the design's original weights back. */
.label{font-weight:700;letter-spacing:.1em}
.btn,.nav a,.nav button,.tabs button,.linklike{font-weight:600!important}
.kbd{font-weight:600}
.brand{font-weight:700}
.brand small{font-weight:600}
.ability .num{font-weight:600}
.ability .num sup{font-weight:600}
.sentence{font-weight:500}
.slot,.slotsel .slot{font-weight:700}
.tray .sentence-sm{font-weight:500}
.sec-head h2,.h-big,.h-sec{font-weight:700}
.dcol header b{font-weight:700}
.dnum{font-weight:600}
.tile .t{font-weight:600}
.tile .t small{font-weight:500}
.tile .c{font-weight:500}
.legend{font-weight:500}
.foot{font-weight:500}
.badge{font-weight:700}
.qtop .count{font-weight:700}
.qtop .count small{font-weight:500}
.clock{font-weight:600}
.meta{font-weight:500}
.meta b{font-weight:700}
.stem .ask{font-weight:700}
.choice .key{font-weight:700}
.choice .txt{font-weight:400}
.choice .pct{font-weight:600}
.whynot b{font-weight:700}
.curve .big{font-weight:700}
.curve .big small{font-weight:600}
.gauge-k{font-weight:500}
.stamp{font-weight:700}
.explain h3{font-weight:700}
.hook b,.bottom b{font-weight:700}
.refs summary{font-weight:600}
.debrief-hero h1{font-weight:700}
.stats b{font-weight:600}
.app .sq{font-weight:600}
.domrow .v{font-weight:600}
.sess .when{font-weight:500}
.sess .what{font-weight:600}
.sess .what small{font-weight:500}
.sess .pc{font-weight:600}
.sess .ab{font-weight:600}
.item .k{font-weight:600}
.bubble{font-weight:600}
.bubble small{font-weight:600}
.toggles button{font-weight:600!important}
.app b,.app strong{font-weight:700}

/* the button bar sits after the content instead of floating over the options while you scroll
   (2026-10-27); the design had it sticky with a see-through background */
#stage .actionbar{position:static}
/* TrueLearn wraps figures and tables in fixed-width boxes; keep them inside the panel and let a
   wide table scroll sideways within itself. Their hidden toolbar placeholder stays hidden. */
.rat .injected,.whynot .injected,.bottom .injected{width:auto!important;max-width:100%;display:block}
.rat table,.whynot table,.bottom table{width:auto!important;height:auto!important;max-width:100%;display:block;overflow-x:auto}
.rat img,.whynot img,.bottom img,.stem img{max-width:100%!important;height:auto!important}
.rat .opacity-0,.whynot .opacity-0,.bottom .opacity-0{display:none}
.rat .table-responsive{overflow-x:auto;max-width:100%}
.missing-img{color:var(--muted);font-style:italic;font-size:.9rem}

/* ===== Figures (figs.json) =====
   The 46 Prodigy library pictures are inline SVG drawn with f-* classes; without these rules every
   shape fills solid black (2026-10-27). Ported from prodigy-bank, mapped to this palette:
   the patient trace is --right so it stands apart from the dashed normal reference. */
:root{--ecg-grid:#f2c7c0;--ecg-gridb:#e39a8f}
@media (prefers-color-scheme:dark){:root:not([data-theme="light"]){--ecg-grid:#3a2622;--ecg-gridb:#64392f}}
:root[data-theme="dark"]{--ecg-grid:#3a2622;--ecg-gridb:#64392f}
.fig svg{display:block;margin:4px 0 8px}
.f-t{font-family:var(--body);fill:var(--fg)}
.f-title{font:600 17px var(--body);fill:var(--fg)}
.f-tick,.f-axl{font-size:16px;fill:var(--muted)}
.f-lab{font:700 19px var(--display);fill:var(--fg)}
.f-labalt{fill:var(--wrong)}
.f-mono{font:500 14px var(--mono);fill:var(--fg)}
.f-gas{font:700 13px var(--mono);fill:#111}
.f-axis{stroke:var(--muted);stroke-width:1.2;fill:none}
.f-zero{stroke:var(--line);stroke-width:1}
.f-guide{stroke:var(--muted);stroke-width:1;stroke-dasharray:3 4;fill:none}
.f-grid{stroke:var(--ecg-grid);stroke-width:.5}
.f-gridb{stroke:var(--ecg-gridb);stroke-width:1}
.f-ecg{stroke:var(--fg);stroke-width:1.8;fill:none;stroke-linejoin:round}
.f-trace{stroke:var(--right);stroke-width:2.6;fill:none;stroke-linejoin:round}
.f-tracefill{fill:var(--right-soft);fill-opacity:.7}
.f-ref{stroke:var(--muted);stroke-width:2;stroke-dasharray:7 6;fill:none}
.f-reffill{fill:var(--surface-2);fill-opacity:.6}
.f-alt{stroke:var(--wrong);stroke-width:2.6;fill:none}
.f-ink{stroke:var(--fg);stroke-width:2;fill:none}
.f-dot,.f-mark{fill:var(--hook)}
.f-arrow{fill:var(--right);stroke:var(--fg);stroke-width:1.6}
.f-arrowhead{fill:var(--fg)}
.f-tube{fill:var(--surface-2);stroke:var(--muted);stroke-width:1.5}
.f-o2{fill:#2e8b3a}.f-air{fill:#e2c21f}.f-n2o{fill:#2f6fd0}.f-co2{fill:#8d949a}
.f-valve{fill:var(--muted)}
.f-pinon{fill:var(--right);stroke:var(--fg);stroke-width:1.5}
.f-pinoff{fill:none;stroke:var(--muted);stroke-width:1.5;stroke-dasharray:3 3}
.f-port{fill:var(--surface-2);stroke:var(--muted)}
.f-bar{fill:var(--right)}
.f-barnone{fill:var(--line)}
.f-z1{fill:var(--wrong-soft)}.f-z2{fill:var(--hook-soft)}.f-z3{fill:var(--right-soft)}
.f-box{fill:var(--surface-2);stroke:var(--line);stroke-width:1.5}
.f-vessel{stroke:var(--wrong);stroke-width:14;fill:none;stroke-linecap:round;stroke-linejoin:round;opacity:.85}
.f-nerve{stroke:var(--hook);stroke-width:4;fill:none;stroke-linecap:round}
.f-nerve.f-post{stroke:var(--s1)}
.f-nerve.f-side{stroke:var(--muted);stroke-width:2.2;stroke-dasharray:6 4}

/* Running score bar (replaced the vs-the-curve gauge, 2026-10-27) */
.scorebar{display:flex;gap:2px;height:8px}
.scorebar .r{background:var(--right);border-radius:2px 0 0 2px}
.scorebar .w{flex:1;background:var(--wrong-soft);border-radius:0 2px 2px 0}

/* Retake missed panel (home, under the hero) */
.panel.missed{margin-top:28px;display:flex;flex-direction:column;gap:12px}
.retake-row{display:flex;align-items:center;justify-content:space-between;gap:18px;flex-wrap:wrap}
.retake-row .sentence-sm{font:400 1.2rem/1.5 var(--display)}

/* Flashcards over the missed bank (2026-10-27): the question without choices, flip for the answer */
#cards .scorebar{margin:4px 0 22px}
.card{max-width:760px;margin:0 auto;background:var(--surface);border:1px solid var(--line);border-top:2px solid var(--fg);border-radius:2px;padding:28px 30px;display:flex;flex-direction:column;gap:20px}
.card .label.sel{margin:-8px 0 0}
.card-back{border-top:1px dashed var(--line);padding-top:18px;display:flex;flex-direction:column;gap:12px}
.card-back h3{margin:0}
.card-answer{margin:0;padding-left:20px;font:600 1.1rem/1.5 var(--body);color:var(--right)}
.card-answer li+li{margin-top:4px}
.card-more summary{cursor:pointer}
.card-more[open]{display:flex;flex-direction:column;gap:10px}
.card-actions{display:flex;gap:10px;justify-content:flex-end;flex-wrap:wrap}
#cards > p.muted{max-width:760px;margin:14px auto 0}
@media (max-width:620px){.card{padding:20px 16px}.card-actions .btn{flex:1}}

/* ---------- WHERE TO FOCUS (History): weak-spot explorer, from the history-page mockup 2026-10-27 ---------- */
.fsec{margin-top:56px}
.fhead{display:flex;justify-content:space-between;align-items:flex-end;gap:16px;flex-wrap:wrap;margin-bottom:18px}
.fhead h2{font:800 2.2rem/1.05 var(--display);letter-spacing:-.02em;margin:0}
.fhead p{margin:6px 0 0;color:var(--muted);max-width:64ch}
.starts{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:10px;margin-bottom:22px}
@media (max-width:1100px){.starts{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media (max-width:560px){.starts{grid-template-columns:1fr}}
.start{display:flex;flex-direction:column;gap:6px;text-align:left;background:var(--surface);border:1px solid var(--line);border-top:3px solid var(--wrong);border-radius:2px;padding:12px 14px 14px;cursor:pointer;min-height:124px}
.start:hover{border-color:var(--fg);border-top-color:var(--wrong)}
.start.on{box-shadow:inset 0 0 0 1px var(--fg)}
.start .rk{font-weight:800;font-size:.72rem;letter-spacing:.12em;color:var(--wrong);text-transform:uppercase}
.start .tt{font-weight:800;font-size:1.02rem;line-height:1.25}
.start .pp{font-weight:600;font-size:.74rem;color:var(--muted);line-height:1.35}
.start .mm{margin-top:auto;display:flex;justify-content:space-between;font-weight:800;font-size:.82rem}
.crumbs{display:flex;flex-wrap:wrap;align-items:center;gap:6px 8px;font-weight:700;font-size:.86rem;margin:0 0 10px}
.crumbs span:not(:last-child)::after{content:"›";margin-left:8px;color:var(--muted)}
.crumbs span:last-child{color:var(--muted)}
.cols{display:grid;grid-template-columns:minmax(0,.95fr) minmax(0,1.25fr) minmax(0,1.1fr) minmax(0,1.45fr);background:var(--surface);border:1px solid var(--line);border-top:2px solid var(--fg);border-radius:2px}
@media (max-width:1000px){.cols{grid-template-columns:1fr}.col{border-left:0!important;border-top:1px solid var(--line)}}
.col{border-left:1px solid var(--line);display:flex;flex-direction:column;min-width:0}
.col:first-child{border-left:0}
.col h4{margin:0;padding:12px 14px 10px;border-bottom:1px solid var(--line);font-weight:800;font-size:.7rem;letter-spacing:.14em;text-transform:uppercase;color:var(--muted);display:flex;justify-content:space-between}
.list{overflow:auto;max-height:540px}
.node{display:grid;grid-template-columns:8px minmax(0,1fr) auto;gap:12px;align-items:center;width:100%;text-align:left;padding:11px 14px;border:0;border-bottom:1px solid var(--line);background:none;cursor:pointer;position:relative}
.node:hover{background:var(--surface-2)}
.node.on{background:var(--accent-soft);box-shadow:inset 3px 0 0 var(--fg)}
.node.on::after{content:"›";position:absolute;right:6px;top:50%;transform:translateY(-50%);font-weight:800;color:var(--fg)}
.node.leaf.on::after{content:none}
.node.on .nv{margin-right:10px}
.node .heat{align-self:stretch;width:8px;border-radius:1px}
.heat.n3{background:var(--wrong)} .heat.n2{background:color-mix(in srgb,var(--wrong) 65%,var(--surface))} .heat.n1{background:color-mix(in srgb,var(--wrong) 32%,var(--surface))}
.heat.z0{background:var(--line)} .heat.p1{background:color-mix(in srgb,var(--right) 32%,var(--surface))} .heat.p2{background:color-mix(in srgb,var(--right) 65%,var(--surface))} .heat.p3{background:var(--right)}
.heat.few{background:repeating-linear-gradient(135deg,var(--line) 0 3px,transparent 3px 6px)}
.nl{display:flex;flex-direction:column;gap:3px;min-width:0}
.nl small{font-weight:800;font-size:.64rem;letter-spacing:.1em;text-transform:uppercase;color:var(--muted)}
.nl b{font-weight:700;font-size:.95rem;line-height:1.25}
.nl .meta2{font-weight:600;font-size:.72rem;color:var(--muted)}
.nbar{display:block;height:4px;background:var(--surface-2);border-radius:2px;overflow:hidden;margin-top:2px}
.nbar i{display:block;height:100%;background:var(--fg);opacity:.55}
.nv{display:flex;flex-direction:column;align-items:flex-end;gap:2px;font-weight:800;font-size:.95rem;white-space:nowrap}
.nv em{font-style:normal;font-weight:700;font-size:.7rem}
.node.few{opacity:.72}
.rec{display:flex;gap:3px}
.rec i{width:9px;height:9px;border-radius:99px;display:block}
.rec i.ok{background:var(--right)} .rec i.miss{box-shadow:inset 0 0 0 2px var(--wrong)}
.tipbox{margin:14px;padding:14px 16px;background:var(--hook-soft);border-radius:3px 12px 4px 10px / 10px 4px 12px 3px;display:flex;flex-direction:column;gap:8px}
.tipbox b{font-weight:800;font-size:.66rem;letter-spacing:.14em;text-transform:uppercase;color:var(--hook)}
.tipbox p{margin:0;font-size:1rem;line-height:1.5}
.tipbox .row2{display:flex;gap:8px;flex-wrap:wrap;margin-top:4px}
.drillbar{display:flex;justify-content:space-between;align-items:center;gap:14px;flex-wrap:wrap;padding:14px 16px;border:1px solid var(--line);border-top:0;background:var(--surface-2)}
.drillbar p{margin:0;font-size:.98rem;max-width:70ch}
.drillbar .grp{display:flex;gap:8px;flex-wrap:wrap}
/* outline view */
.outline{background:var(--surface);border:1px solid var(--line);border-top:2px solid var(--fg);border-radius:2px}
.otools{display:flex;justify-content:space-between;align-items:center;gap:10px;flex-wrap:wrap;padding:10px 14px;border-bottom:1px solid var(--line)}
.orow{display:grid;grid-template-columns:30px 8px minmax(0,1fr) 120px 7.5em;gap:12px;align-items:center;padding:8px 14px;border-bottom:1px solid var(--line)}
.orow.d1{padding-left:44px} .orow.d2{padding-left:74px} .orow.d3{padding-left:104px;grid-template-columns:30px 8px minmax(0,1fr) 120px 7.5em}
.otog{width:30px;height:30px;border:1px solid var(--line);border-radius:2px;background:none;cursor:pointer;font-weight:800;display:flex;align-items:center;justify-content:center}
.otog:hover{border-color:var(--fg)}
.ospacer{width:30px}
.orow .heat{align-self:stretch;min-height:24px;border-radius:1px}
.orow .ol{display:flex;flex-direction:column;gap:2px;min-width:0}
.orow.d0 .ol b{font-weight:800;font-size:1.12rem} .orow.d1 .ol b{font-weight:800;font-size:1rem} .orow.d2 .ol b{font-weight:700;font-size:.97rem} .orow.d3 .ol b{font-weight:600;font-size:.94rem}
.orow .ol small{font-weight:800;font-size:.62rem;letter-spacing:.1em;text-transform:uppercase;color:var(--muted)}
.orow .ol .tip{font-size:.88rem;color:var(--muted);line-height:1.45}
.orow .obar{height:6px;background:var(--surface-2);border-radius:3px;overflow:hidden}
.orow .obar i{display:block;height:100%;background:var(--fg);opacity:.55}
.orow .nv{font-size:.9rem}
.orow.few{opacity:.72}
.orow.d0{background:var(--surface-2)}
@media (max-width:760px){.orow{grid-template-columns:30px 8px minmax(0,1fr) 5.5em}.orow .obar{display:none}.orow.d1{padding-left:26px}.orow.d2{padding-left:38px}.orow.d3{padding-left:50px}}
@media print{
  .topbar,.starts,.otools,.tabs,.fhead p,.drillbar,.tipbox .row2{display:none!important}
  .app{background:#fff!important;color:#000}
  .outline,.cols{border-color:#000}
  #history>.panel,#history .hist-grid,#history .debrief-hero{display:none!important}
}

/* ---------- SEE score reports (History), 2026-10-28 ---------- */
.see-sec{margin-top:56px}
.see-panel{margin-top:18px;padding:20px 24px}
.see-head{display:flex;justify-content:space-between;align-items:flex-start;gap:16px;margin-bottom:6px}
.see-head h3{font:800 1.6rem/1.15 var(--display);margin:4px 0 0}
.see-head h3 em{font-style:normal;font-weight:700;font-size:1.05rem}
.see-row .nm{display:flex;flex-direction:column;gap:2px}
.see-row .nm small{font-weight:600;font-size:.78rem;color:var(--muted)}
.see-row.tot .nm{font-weight:800}
.see-row.tot{padding-bottom:12px;border-bottom:1px solid var(--line)}
.see-list{display:flex;flex-wrap:wrap;gap:8px;margin-top:16px}
.see-pill{background:none;border:1px solid var(--line);border-radius:99px;padding:6px 12px;cursor:pointer;font-size:.85rem;min-height:36px}
.see-pill:hover{border-color:var(--fg)}
.see-pill.on{border-color:var(--fg);background:var(--accent-soft)}
.see-form{margin-top:18px;border:1px solid var(--line);border-radius:2px;background:var(--surface)}
.see-form summary{cursor:pointer;padding:14px 18px;font-weight:700;min-height:44px}
.see-form form{display:flex;flex-direction:column;gap:14px;padding:4px 18px 18px}
.see-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(170px,1fr));gap:12px}
.see-grid label{display:flex;flex-direction:column;justify-content:space-between;gap:6px}
.see-sec a{color:inherit;text-decoration:underline;text-underline-offset:2px}
.see-grid input,.see-grid select{font:inherit;font-size:1rem;color:var(--fg);background:var(--bg);border:1px solid var(--line);border-radius:2px;padding:8px 10px;min-height:42px;width:100%}
.see-grid input:focus,.see-grid select:focus{border-color:var(--fg)}
.see-msg{margin:0;color:var(--wrong);font-weight:600;font-size:.9rem}
.see-msg:empty{display:none}
.see-form .btn{align-self:flex-start}
@media print{.see-sec{display:none!important}}

/* New / seen tag on a question's meta line (2026-10-28) */
.meta .fresh{padding:1px 8px;border-radius:99px;font-weight:700}
.meta .fresh.new{background:var(--right-soft);color:var(--right)}
.meta .fresh.seen{background:var(--surface-2);color:var(--muted);cursor:help}

/* Level-weighted points in the running score (2026-11-06) */
.curve .pts{margin:0;font-size:.95rem;cursor:help}
.curve .pts b{font-weight:800}

/* Cross out answers (2026-11-06) */
.choice-wrap{position:relative}
.choice-wrap .choice{padding-right:56px}
.choice-wrap .choice[aria-pressed="true"]{padding-right:55px}
.strike{position:absolute;right:10px;top:50%;transform:translateY(-50%);width:34px;height:34px;border:1px solid transparent;border-radius:99px;background:none;cursor:pointer;color:var(--muted);font-size:.95rem;z-index:2}
.strike:hover{border-color:var(--line);color:var(--fg)}
.choice-wrap.struck .choice{opacity:.45;border-style:dashed}
.choice-wrap.struck .choice .txt{text-decoration:line-through;text-decoration-thickness:1.5px}
.choice-wrap.struck .strike{color:var(--fg);opacity:1}
@media (hover:hover){.choice-wrap:not(.struck) .strike{opacity:.35}.choice-wrap:hover .strike{opacity:1}}

/* Picture zoom (2026-11-06) */
#quiz img,#quiz .fig,#end img,#end .fig,#cards img,#cards .fig,#flags img,#flags .fig{cursor:zoom-in}
.choice img,.choice .fig{cursor:inherit}
.zoom{border:0;padding:0;background:transparent;max-width:min(96vw,1400px);max-height:94vh;cursor:zoom-out}
.zoom::backdrop{background:color-mix(in srgb,#000 82%,transparent)}
.zoom-body{background:var(--surface);border-radius:4px;padding:12px;overflow:auto;max-height:88vh}
.zoom-body img{display:block;width:auto;height:auto;max-width:calc(96vw - 24px);max-height:84vh;min-width:min(70vw,900px);object-fit:contain;cursor:zoom-out}
.zoom-body .fig{width:min(90vw,1100px);cursor:zoom-out}
.zoom-body .fig svg{width:100%;height:auto}
.zoom-hint{margin:8px 0 0;text-align:center;color:#ddd;font-size:.85rem}
.sess .pc small{display:block;font:600 .7rem/1.3 var(--body);color:var(--muted);margin-top:4px;white-space:nowrap}

/* Last quiz on home (2026-11-06) */
.panel.lastquiz{margin-top:28px;display:flex;flex-direction:column;gap:14px}
.lq-head{display:flex;justify-content:space-between;align-items:flex-start;gap:16px;flex-wrap:wrap}
.lq-what{margin:4px 0 0;font-weight:700;font-size:1.05rem}
.lq-nums{display:flex;gap:40px;flex-wrap:wrap}
.lq-nums div{display:flex;flex-direction:column;gap:2px}
.lq-nums b{font:800 2.2rem/1 var(--display);letter-spacing:-.02em}
.lq-nums b small{font-size:.45em;font-weight:600;color:var(--muted);letter-spacing:0}

/* Level pick in the "Rating seems off?" form (2026-11-07) */
.qcol>.noteform{margin:18px 0 0;max-width:none}
.noteform .bubbles{margin-bottom:4px}
.noteform .btn{align-self:flex-start}

/* Rationale pictures (2026-11-07): ultrasound / anatomy pictures matched from Apex and TrueLearn */
.fig.pic{margin:0 0 14px}
.fig.pic img{display:block;width:100%;height:auto;border-radius:3px;background:#F8F5EF}
.fig.pic figcaption{margin-top:6px}

/* Hotspot questions (Apex, 2026-11-15): tap a spot on the picture; the key area is outlined after answering */
.hot-ask { display: flex; flex-direction: column; gap: 8px; }
.hotspot { position: relative; display: inline-block; max-width: 100%; line-height: 0; background: #fff; border-radius: 10px; overflow: hidden; align-self: flex-start; }
.hotspot img { display: block; max-width: 100%; max-height: 62vh; height: auto; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.hotspot.live { cursor: crosshair; touch-action: manipulation; }
.hot-key { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.hot-key > * { fill: color-mix(in srgb, var(--right, #2c7a4b) 18%, transparent); stroke: var(--right, #2c7a4b); stroke-width: 3px; vector-effect: non-scaling-stroke; }
.hot-mark { position: absolute; width: 22px; height: 22px; margin: -11px 0 0 -11px; border-radius: 50%; border: 3px solid var(--accent, #5b5bd6); background: rgba(255,255,255,.55); box-shadow: 0 0 0 2px rgba(0,0,0,.35); pointer-events: none; }
.hot-mark.ok { border-color: var(--right, #2c7a4b); }
.hot-mark.bad { border-color: var(--wrong, #7E2236); }

/* Question sets above the knowledge map (2026-11-15): "Hotspot questions" picks every hotspot in any topic */
.sets { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; margin-bottom: 14px; }
.sets .tile.set { grid-column: span 1; }
@media (max-width: 760px) { .sets { grid-template-columns: 1fr 1fr; } }

/* Remediation badges (2026-11-25): colours stay on first tries; the badge says what's been fixed since */
.rb { display: inline-block; font: 600 .62rem/1.5 var(--mono); letter-spacing: .02em; padding: 0 5px; border-radius: 2px; border: 1px solid currentColor; white-space: nowrap; vertical-align: 1px; }
.rb-part { color: var(--muted); }
.rb-fixed { color: var(--fg); background: color-mix(in srgb, var(--right) 18%, transparent); border-color: color-mix(in srgb, var(--right) 55%, var(--line)); }
.rb-locked { color: var(--bg); background: var(--right); border-color: var(--right); }
.tile .rbw { display: block; margin-top: 4px; }
.nl .rb, .ol .rb, .start .rb { margin-left: 6px; }
.start .rb { margin: 6px 0 0; align-self: flex-start; }
.tile.faded { opacity: .28; }
.tile.faded:hover { opacity: .7; }
.hide-remed { cursor: pointer; gap: 6px; }
.hide-remed input { margin: 0; accent-color: var(--fg); }
