/* 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) 3.4em 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 (Ameer, 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
   (Ameer, 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}
