:root { color-scheme: light; --ink:#112c43; --muted:#42586b; --blue:#075ca8; --red:#aa2849; --line:#ccd7e1; --paper:#fff; --bg:#edf3f8; --teal:#00665e; }
* { box-sizing:border-box; }
[hidden] { display:none !important; }
body { margin:0; background:var(--bg); color:var(--ink); font:17px/1.55 system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif; }
main { max-width:1320px; margin:auto; padding:28px 30px; }
header { display:flex; justify-content:space-between; align-items:center; gap:18px; }
h1 { font-size:clamp(1.6rem,3vw,2.3rem); line-height:1.15; margin:5px 0 12px; letter-spacing:-.025em; }
h2 { font-size:1.4rem; line-height:1.25; margin:5px 0 15px; }
h3 { font-size:1.1rem; margin:15px 0 6px; }
p { margin:8px 0 16px; }
.eyebrow { color:var(--teal); font-size:.8rem; font-weight:750; letter-spacing:.055em; text-transform:uppercase; margin:0; }
.intro { color:var(--muted); }
button, input { font:inherit; }
button { background:white; color:var(--ink); border:1px solid #9bafc0; border-radius:7px; min-height:46px; padding:10px 15px; cursor:pointer; line-height:1.3; }
button:hover { background:#e1edf7; }
button:focus-visible,input:focus-visible,summary:focus-visible,a:focus-visible { outline:3px solid #9a4600; outline-offset:4px; }
.primary { background:var(--ink); border-color:var(--ink); color:white; font-weight:650; margin-top:10px; }
.primary:hover { background:#234a69; }
.toolbar { display:flex; gap:8px; flex-wrap:wrap; }
.toolbar button { font-size:.85rem; }
nav { display:grid; grid-template-columns:repeat(3,1fr); gap:9px; margin:24px 0; }
nav button { text-align:left; padding:14px; border:0; border-bottom:4px solid #c3d2df; border-radius:4px 4px 0 0; }
nav button[aria-current] { border-bottom-color:var(--teal); background:var(--ink); color:white; }
nav span { display:inline-block; margin-right:10px; font-weight:750; opacity:.8; }
.workspace { display:grid; grid-template-columns:minmax(290px,.85fr) minmax(0,1.2fr); gap:24px; align-items:start; }
.task,.visual,.transfer { padding:25px; border-radius:12px; background:var(--paper); border:1px solid var(--line); }
.task { border-top:5px solid var(--teal); }
.visual { padding:22px; }
.chart-header { display:flex; align-items:baseline; justify-content:space-between; gap:10px; }
.badge { font-size:.8rem; background:#e6f1f3; padding:4px 9px; border-radius:4px; white-space:nowrap; }
svg { width:100%; height:auto; display:block; overflow:visible; }
.legend { font-size:.8rem; display:flex; gap:15px; flex-wrap:wrap; margin:3px 0 15px; }
.demand-key { color:var(--red); font-weight:700; }.supply-key { color:var(--blue); font-weight:700; }
.metrics { display:grid; grid-template-columns:1fr 1fr; gap:15px; border-top:1px solid var(--line); padding-top:15px; }
.metrics span { display:block; font-size:.85rem; color:var(--muted); }
.metrics strong { font-size:1.8rem; letter-spacing:-.03em; }
.reading { color:var(--muted); margin-bottom:0; }
fieldset { border:0; padding:0; margin:0; min-width:0; }
legend { font-weight:650; margin:8px 0 10px; }
.option { display:flex; align-items:flex-start; gap:10px; border:1px solid var(--line); padding:11px 12px; margin:8px 0; border-radius:6px; cursor:pointer; min-height:46px; }
.option:has(input:checked) { background:#eaf4f4; border-color:var(--teal); }
input[type=radio] { margin:5px 0 0; min-width:18px; min-height:18px; accent-color:var(--teal); }
input[type=range] { width:100%; min-height:44px; accent-color:var(--teal); margin:0 0 7px; }
label:has(+input[type=range]) { display:flex; justify-content:space-between; gap:12px; font-weight:650; }
output { color:var(--teal); white-space:nowrap; }
.small { font-size:.85rem; color:var(--muted); }
.preset-buttons { display:flex; flex-wrap:wrap; gap:7px; }.preset-buttons button { font-size:.8rem; flex:1; min-width:110px; }
details { margin-top:16px; border-top:1px solid var(--line); padding-top:12px; }
summary { cursor:pointer; font-weight:650; min-height:36px; }
details p { margin-top:12px; }
table { width:100%; border-collapse:collapse; font-size:.9rem; margin-top:10px; }
caption { text-align:left; color:var(--muted); padding:6px 0; }
td,th { text-align:left; padding:8px; border-bottom:1px solid var(--line); }
.transfer { margin-top:24px; max-width:850px; }
.transfer .option { max-width:720px; }
.advance { width:100%; }
[role=status]:empty { display:none; }
[role=status] { padding:12px; border-left:4px solid var(--teal); background:#eaf4f4; }
.assumptions { max-width:850px; font-size:.9rem; color:var(--muted); }
footer { margin-top:22px; color:var(--muted); font-size:.8rem; display:flex; gap:18px; flex-wrap:wrap; } a { color:var(--blue); }
.skip { position:absolute; top:-100px; background:white; padding:10px; }.skip:focus { top:5px; }
body.present { font-size:21px; } body.present main { max-width:1600px; } body.present .transfer { display:none; } body.present .workspace { grid-template-columns:minmax(300px,.85fr) minmax(0,1.2fr); }
@media(min-width:801px) {
  body.present main { padding:16px 24px; }
  body.present h1 { font-size:1.6rem; margin-bottom:0; }
  body.present .intro,body.present footer,body.present .assumptions,body.present .table-details,body.present .advance { display:none; }
  body.present nav { margin:14px 0; }
  body.present nav button { padding:10px; font-size:1rem; }
  body.present .task,body.present .visual { padding:18px; }
  body.present #story,body.present #challenge { font-size:1rem; }
  body.present #experiment-title,body.present #step,body.present #presets>.small { display:none; }
  body.present #control-note { font-size:.75rem; margin:0 0 8px; }
  body.present #found { font-size:.85rem; margin:8px 0; padding:7px; }
  body.present .visual svg { max-height:360px; }
  body.present .visual svg text { font-size:24px; }
  body.present .reading { font-size:.85rem; }
  body.present .metrics strong { font-size:1.5rem; }
}
@media(max-width:800px) { main { padding:18px 14px; } header { display:block; }.toolbar { margin-top:16px; }.workspace,body.present .workspace { grid-template-columns:1fr; }.task,.visual,.transfer { padding:19px; }nav { gap:5px; }nav button { font-size:.85rem; padding:11px 7px; } nav span { display:block; }.visual { grid-row:2; } }
@media(max-width:380px) { .chart-header { display:block; }.metrics strong { font-size:1.5rem; }.task,.visual { padding:14px; } }
@media(max-width:800px) { .visual svg text { font-size:26px; } }
@media print { body { background:white; }.toolbar,nav,button,footer { display:none; } main { padding:0; }.workspace { display:block; }.task,.visual { break-inside:avoid; margin-bottom:15px; } }
