/* Lab shared pieces */
.lab-sub { font-family: var(--sans); font-size: .9375rem; font-weight: 700; margin: 1.5rem 0 .55rem; line-height: 1.3; }
.note { font-size: .875rem; line-height: 1.45; color: var(--ink-2); margin: .8rem 0 0; max-width: 46rem; }
.note.strong { color: var(--ink); font-weight: 550; }
.note.honest { font-style: italic; }
.lab-done { font-family: var(--serif); font-size: 1.0625rem; line-height: 1.45; background: var(--bench-raised); border-left: 3px solid var(--accent); padding: .75rem .9rem; margin: 1rem 0 0; border-radius: 0 var(--radius) var(--radius) 0; }
.lab-foot { margin-top: .7rem; display: flex; flex-wrap: wrap; gap: .3rem; }
.big-readout { font-family: var(--serif); font-size: 1.1875rem; font-weight: 600; line-height: 1.3; margin: .7rem 0; }
.btn[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.sample-row { margin-bottom: .2rem; }
.sample-btn { font-weight: 450; text-align: left; justify-content: flex-start; white-space: normal; overflow-wrap: anywhere; }
.form-field { margin-bottom: .85rem; }
.warn-line { font-size: .875rem; line-height: 1.4; background: var(--warn-bg); color: var(--ink); padding: .35rem .6rem; border-radius: .35rem; margin: .35rem 0 0; }
.warn-line.risk { background: var(--bad-bg); }

.feedback { font-size: .9375rem; line-height: 1.45; padding: .6rem .8rem; border-radius: var(--radius); margin: .7rem 0; border-left: 3px solid; }
.feedback.good { background: var(--good-bg); border-color: var(--good); }
.feedback.bad { background: var(--bad-bg); border-color: var(--bad); }
.fb-label { font-weight: 700; }
.feedback .icon { vertical-align: -.14em; }

/* Percent bars */
.bars { display: grid; gap: .28rem; }
.bars.narrow { max-width: 28rem; }
.pb { display: grid; grid-template-columns: minmax(4.6rem, 34%) minmax(0, 1fr) 3.3rem; align-items: center; gap: .55rem; width: 100%; font-size: .875rem; line-height: 1.25; min-height: 2rem; text-align: left; font-family: var(--sans); padding: 0; background: none; border: 0; color: inherit; }
.pb-btn { min-height: 2.75rem; padding: 0 .4rem; border: 1px solid var(--rule-strong); border-radius: var(--radius); background: var(--bench-raised); }
.pb-btn:hover:not(:disabled) { border-color: var(--accent); }
.pb-btn:disabled { background: transparent; border-color: transparent; color: var(--ink-2); cursor: default; }
.pb-label { overflow-wrap: anywhere; min-width: 0; }
.pb-track { height: .85rem; background: var(--paper-sunk); border-radius: 2px; overflow: hidden; display: block; }
.pb-fill { display: block; height: 100%; background: var(--accent); border-radius: 2px; transition: width .35s var(--ease); }
.pb-fill.alt { background: var(--ink-2); }
.pb.muted .pb-fill { background: var(--rule-strong); }
.pb-value { text-align: right; font-size: .8125rem; white-space: nowrap; }
.word-label { font-weight: 550; }

/* Sorter */
.sorter-now { background: var(--bench-raised); border-radius: var(--radius); padding: .9rem 1rem; border: 1px solid var(--rule); display: flex; gap: .7rem; align-items: baseline; }
.sorter-count { font-size: .8125rem; color: var(--ink-3); flex: none; }
.sorter-item { font-family: var(--serif); font-size: 1.1875rem; line-height: 1.35; margin: 0; font-weight: 500; }
.bins { display: grid; gap: .5rem; margin-top: .7rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 8.5rem), 1fr)); }
.bins.n5, .bins.n6 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 48rem) { .bins.n5 { grid-template-columns: repeat(5, 1fr); } .bins.n6 { grid-template-columns: repeat(6, 1fr); } }
.bin { min-height: 3.6rem; padding: .55rem .6rem; font-family: var(--sans); font-size: .9375rem; font-weight: 550; line-height: 1.25; background: var(--paper-raised); border: 1.5px dashed var(--rule-strong); border-radius: var(--radius); color: var(--ink); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .2rem; text-align: center; overflow-wrap: anywhere; hyphens: auto; }
.bin:hover { border-color: var(--accent); border-style: solid; }
.bin.wrong { border-color: var(--bad); border-style: solid; background: var(--bad-bg); }
.bin-count { font-size: .75rem; font-weight: 500; color: var(--ink-3); }
.sorted { display: grid; gap: .6rem; margin-top: .7rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr)); }
.sorted-bin { background: var(--bench-raised); border-top: 3px solid var(--accent); border-radius: 0 0 var(--radius) var(--radius); padding: .6rem .8rem; }
.sorted-bin h4 { font-family: var(--sans); font-size: .875rem; font-weight: 700; margin-bottom: .3rem; }
.sorted-bin ul { margin: 0; padding-left: 1.1em; font-size: .875rem; line-height: 1.35; }
.sorted-bin li { margin: .25em 0; }

/* In the quiz, sorters sit on paper rather than on the bench. */
.quiz .sorter-now, .quiz .sorted-bin { background: var(--paper-raised); }
.quiz .feedback { font-family: var(--sans); }
.quiz .lab-done { background: var(--paper-raised); }

/* Tokenizer */
.chips { display: flex; flex-wrap: wrap; gap: .2rem; align-items: flex-start; }
.chips .tile { font-size: .9375rem; }
.token-panel { background: var(--bench-raised); border-radius: var(--radius); padding: .8rem .9rem; margin-top: .7rem; }
.token-stats { display: flex; flex-wrap: wrap; gap: .2rem 1.2rem; margin: .7rem 0 0; font-size: .875rem; }
.compare { display: grid; gap: .55rem; }
.compare-row { background: var(--bench-raised); border-radius: var(--radius); padding: .6rem .8rem; }
.compare-head { display: flex; justify-content: space-between; gap: 1rem; font-size: .8125rem; margin-bottom: .35rem; }
@media (min-width: 64rem) { .compare { grid-template-columns: repeat(3, 1fr); } }

/* Next token */
.grown-text { font-family: var(--serif); font-size: 1.1875rem; line-height: 1.75; background: var(--bench-raised); border-radius: var(--radius); padding: .7rem .9rem; margin: .7rem 0; min-height: 3.4rem; }
.grown-text .tile { margin: 0 .08em; font-size: .85em; }
.cursor { display: inline-block; width: 2px; height: 1.05em; background: var(--accent); vertical-align: -.16em; margin-left: .15em; }

/* Plots */
.plot-bg { fill: var(--bench-raised); }
.plot-grid { stroke: var(--rule); stroke-width: .6; }
.plot-line { stroke: var(--ink); stroke-width: 2.5; stroke-linecap: round; }
.plot-label { font-family: var(--sans); font-size: 12px; fill: var(--ink-2); }
.pt.spam { fill: var(--p1); }
.pt.ham { fill: var(--p2); }
.pt.wrong { stroke: var(--ink); stroke-width: 2.5; }
.legend { display: flex; flex-wrap: wrap; gap: .25rem .9rem; font-size: .8125rem; margin-top: .4rem; align-items: center; }
.legend span { display: inline-flex; gap: .35rem; align-items: center; }
.lg { display: inline-block; width: .75rem; height: .75rem; }
.lg.spam { background: var(--p1); border-radius: 2px; }
.lg.ham { background: var(--p2); border-radius: 50%; }

.knob-grid { display: grid; gap: 1rem; }
.knob-plot svg { display: block; width: 100%; max-width: 26rem; height: auto; }
@media (min-width: 48rem) { .knob-grid { grid-template-columns: minmax(0, 26rem) minmax(0, 1fr); gap: 2rem; } }

/* Meaning map */
.map-grid { display: grid; gap: 1rem; margin-top: .7rem; }
.map { display: block; width: 100%; height: auto; max-width: 38rem; }
.map-word { cursor: pointer; outline: none; }
.map-word:focus-visible .map-text { text-decoration: underline; font-weight: 700; }
.map-dot { fill: var(--gc); stroke: var(--bench-raised); stroke-width: 1; transition: r .15s; }
.map-text { font-family: var(--sans); font-size: 11px; fill: var(--ink); font-weight: 500; }
.map-leader { stroke: var(--gc); stroke-width: .6; opacity: .55; }
.map-link { stroke: var(--ink); stroke-width: 1.2; opacity: .55; }
.map-word.dim { opacity: .28; }
.map-word.active .map-dot { r: 7; stroke: var(--ink); stroke-width: 2; }
.map-word.active .map-text, .map-word.near .map-text { font-weight: 750; }
.g1 { --gc: var(--p1); } .g2 { --gc: var(--p3); } .g3 { --gc: var(--p6); } .g4 { --gc: var(--p4); } .g5 { --gc: var(--p2); } .g6 { --gc: var(--p5); }
.lg-dot { display: inline-block; width: .7rem; height: .7rem; border-radius: 50%; background: var(--gc); }
@media (min-width: 62rem) { .map-grid { grid-template-columns: minmax(0, 38rem) minmax(0, 1fr); gap: 2rem; } }
.context-grid { display: grid; gap: .7rem; }
@media (min-width: 48rem) { .context-grid { grid-template-columns: 1fr 1fr; } }
.context-card { background: var(--bench-raised); border-radius: var(--radius); padding: .8rem .9rem; }
.sentence { font-family: var(--serif); font-size: 1.0625rem; line-height: 1.4; margin: 0 0 .6rem; }

/* Context window */
.cw-grid { display: grid; gap: 1.1rem; }
@media (min-width: 56rem) { .cw-grid { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 2rem; } }
.cw-window { background: var(--bench-raised); border: 2px solid var(--ink); border-radius: var(--radius); padding: .5rem; min-height: 28rem; }
.cw-cap { display: flex; justify-content: space-between; font-size: .8125rem; font-weight: 600; margin-bottom: .4rem; }
.cw-stack { display: grid; gap: .25rem; }
.cw-block { border-radius: .3rem; padding: .32rem .5rem; font-size: .8125rem; line-height: 1.3; animation: cw-in .3s var(--ease); }
@keyframes cw-in { from { opacity: 0; transform: translateY(8px); } }
.cw-block.system { background: var(--paper-sunk); border: 1px dashed var(--rule-strong); }
.cw-block.user { background: var(--t3); color: var(--t-ink); }
.cw-block.assistant { background: var(--t2); color: var(--t-ink); }
.cw-block.summary { background: var(--t6); color: var(--t-ink); }
.cw-role { display: flex; justify-content: space-between; font-size: .6875rem; font-weight: 700; letter-spacing: .03em; opacity: .8; }
.cw-text { display: block; }
.cw-next { width: 100%; margin-top: .8rem; }
.cw-chart { display: flex; align-items: flex-end; gap: .22rem; height: 7rem; border-bottom: 1.5px solid var(--ink); }
.cw-bar { flex: 1 1 0; min-width: 0; background: var(--accent); border-radius: 2px 2px 0 0; position: relative; transition: height .3s var(--ease); }
.cw-bar span { position: absolute; bottom: 100%; left: 50%; transform: translateX(-50%); font-size: .625rem; line-height: 1.4; color: var(--ink-2); }
.seg { border: 0; padding: 0; margin: 0; }
.seg-row { display: grid; grid-template-columns: 1fr 1fr; gap: .35rem; }
.seg-opt { display: flex; align-items: center; justify-content: center; text-align: center; min-height: 2.75rem; padding: .3rem .5rem; font-size: .875rem; font-weight: 550; line-height: 1.2; border: 1px solid var(--rule-strong); border-radius: var(--radius); background: var(--paper-raised); cursor: pointer; }
.seg-opt.on { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.seg-opt:focus-within { outline: 2.5px solid var(--accent); outline-offset: 2px; }

/* Temperature */
.temp-grid { display: grid; gap: 1.1rem; margin-top: .8rem; }
@media (min-width: 56rem) { .temp-grid { grid-template-columns: 1fr 1fr; gap: 2rem; } }
.range-ends { display: flex; justify-content: space-between; font-size: .8125rem; color: var(--ink-2); margin: -.1rem 0 .7rem; }
.runs-grid { display: grid; gap: .7rem; }
@media (min-width: 62rem) { .runs-grid { grid-template-columns: repeat(3, 1fr); } }
.run-group { background: var(--bench-raised); border-radius: var(--radius); padding: .7rem .85rem; }
.run-group h5 { font-family: var(--sans); font-size: .8125rem; font-weight: 700; margin: 0 0 .35rem; color: var(--accent); }
.run-group ol { margin: 0; padding-left: 1.15em; font-family: var(--serif); font-size: .9375rem; line-height: 1.42; }
.run-group li { margin: .4em 0; }

/* Claim marker */
.claim-par { font-family: var(--serif); font-size: 1.0625rem; line-height: 1.75; background: var(--bench-raised); border-radius: var(--radius); padding: .9rem 1rem; }
.claim { font: inherit; padding: .12em 0; border-bottom: 1.5px dotted var(--rule-strong); cursor: pointer; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.claim:hover { border-bottom-color: var(--accent); }
.claim.marked { background: var(--warn-bg); border-bottom: 2px solid var(--warn); }
.claim.caught { background: var(--good-bg); border-bottom: 2px solid var(--good); }
.claim.missed { background: var(--bad-bg); border-bottom: 2px solid var(--bad); }
.claim.extra { background: var(--warn-bg); border-bottom: 2px dashed var(--warn); }
.claim.safe { border-bottom: 0; color: var(--ink-2); }
.why-list { list-style: none; padding: 0; margin: .5rem 0; font-size: .9375rem; line-height: 1.4; }
.why-list li { display: flex; gap: .5rem; padding: .45rem 0; border-top: 1px solid var(--rule-strong); }
.why-list em { font-family: var(--serif); }
.why-text { display: block; color: var(--ink-2); font-style: normal; margin-top: .1rem; }
.why-mark { color: var(--good); flex: none; }
.why-list li.risky .why-mark { color: var(--bad); }
.why-more summary { cursor: pointer; font-size: .875rem; min-height: 2.25rem; display: flex; align-items: center; }

/* Traps */
.traps { display: grid; gap: 1rem; }
@media (min-width: 62rem) { .traps { grid-template-columns: 1fr 1fr; gap: 1.2rem; } }
.trap { background: var(--bench-raised); border-radius: var(--radius); padding: .85rem 1rem; }
.trap-prompt { font-family: var(--serif); font-weight: 600; font-size: 1.0625rem; line-height: 1.35; margin: 0 0 .5rem; }
.trap-runs { list-style: none; padding: 0; margin: 0 0 .8rem; font-family: var(--serif); font-size: .9375rem; line-height: 1.45; }
.trap-runs li { padding: .4rem 0; border-top: 1px solid var(--rule); }
.run-label { display: block; font-family: var(--sans); font-size: .75rem; font-weight: 650; color: var(--ink-3); }
.trap h5 { font-family: var(--sans); font-size: .8125rem; font-weight: 700; margin: 0 0 .35rem; }

/* Scenarios */
.scene { background: var(--bench-raised); border-radius: var(--radius); padding: .8rem .9rem; display: grid; gap: .55rem; margin-top: .7rem; font-size: .9375rem; line-height: 1.42; }
.scene-step { display: grid; gap: .45rem; }
.scene-step + .scene-step { padding-top: .55rem; border-top: 1px dashed var(--rule-strong); }
.line { display: block; }
.who-tag { display: block; font-size: .6875rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--ink-3); margin-bottom: .05rem; }
/* chat style: bubbles, clearly written by us */
.style-chat .line { max-width: 88%; padding: .45rem .7rem; border-radius: .7rem; background: var(--paper-sunk); justify-self: start; }
.style-chat .who-user { background: var(--t3); color: var(--t-ink); justify-self: end; border-bottom-right-radius: .15rem; }
.style-chat .who-user .who-tag { color: inherit; opacity: .75; }
.style-chat .who-model { background: var(--paper-sunk); border-bottom-left-radius: .15rem; }
.style-chat .who-system { justify-self: center; background: transparent; font-style: italic; text-align: center; color: var(--ink-2); padding: 0; max-width: 100%; }
/* agent style: a step log, with think, tool and result visually distinct */
.style-agent .line { padding-left: .7rem; border-left: 3px solid var(--rule-strong); }
.style-agent .who-think { font-family: var(--serif); font-style: italic; }
.style-agent .who-tool { border-left-color: var(--accent); font-family: var(--mono); font-size: .8125rem; overflow-wrap: anywhere; }
.style-agent .who-tool .who-tag, .style-agent .who-result .who-tag, .style-agent .who-ask .who-tag, .style-agent .who-system .who-tag { font-family: var(--sans); }
.style-agent .who-result { font-family: var(--mono); font-size: .8125rem; background: var(--paper-sunk); padding: .3rem .5rem .3rem .7rem; overflow-wrap: anywhere; }
.style-agent .who-ask { border-left-color: var(--warn); background: var(--warn-bg); padding: .35rem .6rem; font-weight: 550; }
.style-agent .who-system { border-left-color: var(--ink); font-weight: 550; }
.style-agent .who-user { border-left-color: var(--p3); }
/* terminal style: a transcript */
.style-terminal { background: var(--term-bg); color: var(--term-ink); font-family: var(--mono); font-size: .8125rem; line-height: 1.5; }
.style-terminal .who-tag { display: none; }
.style-terminal .line { overflow-wrap: anywhere; }
.style-terminal .who-agent::before { content: "• "; color: var(--term-acc); }
.style-terminal .who-tool { color: var(--term-dim); }
.style-terminal .who-tool::before { content: "$ "; color: var(--term-dim); }
.style-terminal .who-result { color: var(--term-dim); padding-left: 1.2em; }
.style-terminal .who-ask { color: var(--term-acc); }
.style-terminal .who-ask::before { content: "? "; }
.style-terminal .who-system { color: var(--term-ink); font-family: var(--sans); font-style: italic; border-left: 2px solid var(--term-dim); padding-left: .6rem; }
.style-terminal .chosen-line { font-family: var(--sans); color: var(--ink); }
.style-terminal .chosen-text { color: var(--term-ink); }
.style-terminal .chosen-text::before { content: "> "; font-family: var(--mono); color: var(--term-acc); }
.style-terminal .scene-step + .scene-step { border-top-color: #3a352c; }
.chosen-line { font-family: var(--sans); }
.chosen-text { display: block; font-weight: 600; font-size: .875rem; }
.verdict-note { font-family: var(--sans); font-size: .875rem; line-height: 1.4; padding: .35rem .6rem; border-radius: .35rem; margin-top: .3rem; color: var(--ink); }
.verdict-note.good { background: var(--good-bg); }
.verdict-note.ok { background: var(--warn-bg); }
.verdict-note.bad { background: var(--bad-bg); }
.scene-prompt { font-weight: 650; margin: .8rem 0 .4rem; font-family: var(--serif); font-size: 1.0625rem; line-height: 1.3; }
.choices { display: grid; gap: .4rem; }
.choice-btn { justify-content: flex-start; text-align: left; font-weight: 500; line-height: 1.32; padding: .6em .8em; }

/* Timeline: vertical on phones, horizontal on wide screens. */
.timeline { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--rule-strong); margin-left: .4rem; }
.tl-item { position: relative; padding-left: .9rem; }
.tl-item::before { content: ""; position: absolute; left: -.42rem; top: 1rem; width: .72rem; height: .72rem; border-radius: 2px; background: var(--paper-raised); border: 2px solid var(--rule-strong); }
.tl-item.seen::before { background: var(--accent-tint); border-color: var(--accent); }
.tl-item.open::before { background: var(--accent); border-color: var(--accent); }
.tl-btn { display: block; width: 100%; text-align: left; background: none; border: 0; padding: .5rem 0; min-height: 2.75rem; color: inherit; font-family: var(--sans); line-height: 1.25; }
.tl-date { display: block; font-size: .75rem; color: var(--ink-3); margin: 0; }
.tl-title { font-weight: 600; font-size: .9375rem; }
.tl-item.open .tl-title { color: var(--accent); }
.tl-text-inline { font-size: .9375rem; line-height: 1.42; padding: 0 0 .7rem; }
.tl-panel { display: none; }
@media (min-width: 62rem) {
  .timeline { display: grid; grid-template-columns: repeat(15, minmax(0, 1fr)); border-left: 0; margin: 0; border-top: 2px solid var(--rule-strong); padding-top: .1rem; }
  .tl-item { padding: .9rem .25rem 0 0; }
  .tl-item::before { left: 0; top: -.48rem; }
  .tl-btn { padding: 0; font-size: .75rem; }
  .tl-title { font-size: .75rem; line-height: 1.2; display: block; overflow-wrap: anywhere; hyphens: auto; }
  .tl-date { font-size: .6875rem; }
  .tl-text-inline { display: none; }
  .tl-panel { display: block; background: var(--bench-raised); border-radius: var(--radius); padding: .8rem 1rem; margin-top: 1rem; }
  .tl-panel .tl-date { font-size: .8125rem; }
  .tl-panel-title { font-family: var(--serif); font-weight: 650; font-size: 1.1875rem; margin: 0 0 .2rem; }
  .tl-panel p:last-child { margin: 0; }
}

/* Model cards: the same for every company. */
.model-card { font-family: var(--sans); font-size: .9375rem; line-height: 1.4; background: var(--paper-raised); border: 1px solid var(--rule-strong); border-radius: var(--radius); padding: .9rem 1rem; margin: 1.6em 0 1.8em; clear: both; }
.mc-head { display: flex; justify-content: space-between; align-items: baseline; gap: .8rem; flex-wrap: wrap; padding-bottom: .5rem; border-bottom: 2px solid var(--ink); }
.mc-head h4 { font-family: var(--serif); font-size: 1.25rem; font-weight: 650; }
.mc-unit { font-size: .75rem; color: var(--ink-2); }
.mc-tier { margin-top: .7rem; }
.mc-tier h5, .mc-plans h5 { font-family: var(--sans); font-size: .6875rem; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: var(--ink-3); margin: 0 0 .15rem; }
.mc-model { padding: .4rem 0; border-top: 1px solid var(--rule); }
.mc-name { font-weight: 650; margin: 0 0 .15rem; }
.facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(5.2rem, 1fr)); gap: .3rem .7rem; margin: 0; font-size: .8125rem; }
@media (max-width: 40rem) { .facts { grid-template-columns: repeat(3, minmax(0, 1fr)); } .facts .fact-date { grid-column: span 2; } }
.facts dt { color: var(--ink-3); font-size: .6875rem; line-height: 1.3; }
.facts dd { margin: 0; font-weight: 500; line-height: 1.3; }
.license { display: block; font-size: .6875rem; color: var(--ink-2); font-weight: 400; }
.mc-note { font-size: .8125rem; color: var(--ink-2); margin: .25rem 0 0; line-height: 1.35; }
.mc-plans { margin-top: .9rem; }
.plans-table { margin: .1rem 0 0; border-bottom: 0; }
.plans-table th { font-weight: 550; white-space: nowrap; }
.plans-table td, .plans-table th { font-size: .8125rem; }
.mc-coding { color: var(--ink-2); }
.facts-checked { font-size: .75rem; color: var(--ink-2); margin: .7rem 0 0; line-height: 1.4; }
.model-pick { display: flex; flex-wrap: wrap; gap: .4rem; }
.compare-pick { margin: .8rem 0; max-width: 26rem; }
.compare-cols { display: grid; gap: .7rem; }
.compare-cols.two { grid-template-columns: 1fr; }
@media (min-width: 40rem) { .compare-cols.two { grid-template-columns: 1fr 1fr; } }
.compare-col { background: var(--bench-raised); border-radius: var(--radius); padding: .8rem .9rem; }
.compare-col h4 { font-family: var(--serif); font-size: 1.125rem; font-weight: 650; margin-bottom: .4rem; }
.compare-col h5 { font-family: var(--sans); font-size: .8125rem; font-weight: 700; margin: .7rem 0 .1rem; }
.dollar { font-size: 1.0625rem; font-weight: 600; margin: 0; line-height: 1.3; }
.dollar span { font-size: .875rem; font-weight: 450; color: var(--ink-2); }

/* Hospital */
.moe-grid { display: grid; gap: 1rem; }
.moe-doors { display: block; width: 100%; height: auto; }
.door { fill: var(--paper-sunk); stroke: var(--rule-strong); stroke-width: .4; transition: fill .3s; }
.door.lit { fill: var(--accent); stroke: var(--accent); }
@media (min-width: 56rem) { .moe-grid { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 2rem; } }

/* Cost tables */
.preset-row { display: flex; flex-wrap: wrap; gap: .4rem; }
.num-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 8.5rem), 1fr)); gap: .6rem .8rem; margin-top: .9rem; align-items: end; }
.num-wrap { display: flex; align-items: center; gap: .3rem; }
.num-prefix { font-weight: 600; }
.cost-table, .app-table { background: var(--bench-raised); border-radius: var(--radius); padding: .4rem .8rem .7rem; margin-top: .9rem; }
.cost-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .05rem .6rem; padding: .36rem 0; border-bottom: 1px solid var(--rule); font-size: .875rem; align-items: baseline; }
.cost-row.head, .app-row.head { font-size: .75rem; font-weight: 700; color: var(--ink-2); border-bottom: 1px solid var(--rule-strong); }
.cost-name { font-weight: 550; min-width: 0; }
.cost-sub { display: block; font-weight: 400; font-size: .75rem; color: var(--ink-2); line-height: 1.25; }
.cost-sub.loss { color: var(--bad); font-weight: 600; }
.cost-num { text-align: right; white-space: nowrap; }
.cost-bar { grid-column: 1 / -1; height: .3rem; background: var(--paper-sunk); border-radius: 2px; overflow: hidden; display: block; }
.cost-bar i { display: block; height: 100%; background: var(--accent); transition: width .3s var(--ease); }
.app-row { display: grid; grid-template-columns: minmax(0, 1fr) 3.9rem 3.3rem 3.6rem; gap: .05rem .35rem; padding: .36rem 0; border-bottom: 1px solid var(--rule); font-size: .8125rem; align-items: baseline; }
.app-row.head { align-items: end; font-size: .6875rem; line-height: 1.15; }
.app-row.head .cost-num { white-space: normal; overflow-wrap: anywhere; hyphens: auto; }
.app-row.loses .margin { color: var(--bad); font-weight: 650; }
@media (min-width: 40rem) { .app-row { grid-template-columns: minmax(0, 1fr) 6.5rem 6.5rem 7.5rem; font-size: .875rem; gap: .05rem .6rem; } .app-row.head { font-size: .75rem; } }

/* Tool chooser */
.chooser { display: grid; gap: .9rem; }
@media (min-width: 56rem) { .chooser { grid-template-columns: 1fr 1fr; } }
.choose-q { border: 0; padding: 0; margin: 0; }
.choose-q legend { font-family: var(--serif); font-size: 1.0625rem; font-weight: 600; margin-bottom: .35rem; padding: 0; line-height: 1.3; }
.choose-opts { display: grid; gap: .3rem; }
.choose-opt { display: flex; align-items: center; min-height: 2.75rem; padding: .4rem .7rem; background: var(--paper-raised); border: 1px solid var(--rule-strong); border-radius: var(--radius); cursor: pointer; font-size: .9375rem; line-height: 1.3; font-weight: 500; }
.choose-opt.on { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.choose-opt:focus-within { outline: 2.5px solid var(--accent); outline-offset: 2px; }
.advice { background: var(--bench-raised); border-left: 3px solid var(--accent); border-radius: 0 var(--radius) var(--radius) 0; padding: .8rem 1rem; margin-top: 1rem; }
.advice p { font-size: .9375rem; line-height: 1.45; margin: 0 0 .6rem; }
.advice p:last-child { margin: 0; }
.advice strong { display: block; font-weight: 650; font-size: .8125rem; color: var(--ink-2); }

/* Prompt builder */
.pb-grid { display: grid; gap: 1rem; }
@media (min-width: 56rem) { .pb-grid { grid-template-columns: 1fr 1fr; gap: 2rem; } }
.layer { background: var(--bench-raised); border-left: 4px solid var(--accent); padding: .4rem .7rem; border-radius: 0 .3rem .3rem 0; margin-bottom: .3rem; font-size: .9375rem; line-height: 1.38; }
.layer.fresh { animation: cw-in .35s var(--ease); }
.layer.c1 { border-left-color: var(--p1); } .layer.c2 { border-left-color: var(--p2); } .layer.c3 { border-left-color: var(--p3); } .layer.c4 { border-left-color: var(--p4); } .layer.c5 { border-left-color: var(--p5); }
.layer-tag { display: block; font-size: .6875rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--ink-3); }
.pb-add { margin-top: .4rem; width: 100%; }
.pb-answer { background: var(--bench-raised); border-radius: var(--radius); padding: .8rem .9rem; }
.answer-text { font-family: var(--serif); font-size: 1rem; line-height: 1.5; margin: 0; }
.added { background: var(--good-bg); border-radius: 2px; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.pb-own { margin-top: 1.2rem; max-width: 46rem; }

/* Fact picker */
.fp-grid { display: grid; gap: 1rem; }
@media (min-width: 56rem) { .fp-grid { grid-template-columns: 1fr 1fr; gap: 2rem; } }
.fp-facts { display: grid; gap: .3rem; align-content: start; }
.fp-btn { display: flex; gap: .5rem; width: 100%; align-items: flex-start; background: var(--paper-raised); border: 1px solid var(--rule-strong); border-radius: var(--radius); padding: .55rem .7rem; min-height: 2.75rem; text-align: left; font-family: var(--sans); font-size: .9375rem; line-height: 1.35; color: inherit; }
.fp-btn:hover { border-color: var(--accent); }
.fp-mark { flex: none; width: 1.1em; }
.fp-fact.high .fp-btn { border-color: var(--good); background: var(--good-bg); }
.fp-fact.none .fp-btn { color: var(--ink-3); border-style: dashed; background: transparent; }
.fp-effect { font-size: .8125rem; color: var(--ink-2); margin: .2rem 0 .3rem .7rem; line-height: 1.35; }
.fp-answer { background: var(--bench-raised); border-radius: var(--radius); padding: .8rem .9rem; align-self: start; }
.fp-changes { margin: .6rem 0 0; padding-left: 1.1em; font-size: .9375rem; line-height: 1.4; }
.fp-changes li { margin: .3em 0; animation: cw-in .35s var(--ease); }
.fp-changes li::marker { color: var(--good); }

/* Recipes */
.recipe-list { list-style: none; padding: 0; margin: 0; display: grid; gap: .4rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 15rem), 1fr)); }
.recipe-card { width: 100%; height: 100%; text-align: left; background: var(--paper-raised); border: 1px solid var(--rule-strong); border-radius: var(--radius); padding: .65rem .8rem; color: inherit; font-family: var(--sans); display: block; }
.recipe-card:hover { border-color: var(--accent); }
.recipe-name { display: block; font-family: var(--serif); font-size: 1.0625rem; font-weight: 650; line-height: 1.25; }
.recipe-when { display: block; font-size: .8125rem; color: var(--ink-2); line-height: 1.35; margin-top: .15rem; }
.fav-tag { font-family: var(--sans); font-size: .6875rem; font-weight: 700; color: var(--accent); }
.recipe-title { font-family: var(--serif); font-size: 1.25rem; font-weight: 650; margin: .5rem 0 .1rem; }
.recipe-grid { display: grid; gap: .8rem; margin-top: .7rem; }
@media (min-width: 56rem) { .recipe-grid { grid-template-columns: 1fr 1fr; gap: 1.5rem; } }
.recipe-preview { background: var(--bench-raised); border-left: 3px solid var(--accent); border-radius: 0 var(--radius) var(--radius) 0; padding: .7rem .85rem; font-family: var(--mono); font-size: .8125rem; line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere; }

/* Terminal */
.terminal { background: var(--term-bg); color: var(--term-ink); font-family: var(--mono); font-size: .8125rem; line-height: 1.5; border-radius: var(--radius); overflow: hidden; }
.term-screen { padding: .7rem .8rem 0; max-height: 20rem; overflow-y: auto; }
.term-entry { margin-bottom: .45rem; overflow-wrap: anywhere; }
.term-prompt { color: var(--term-acc); white-space: nowrap; }
.term-out { color: var(--term-ink); white-space: pre-wrap; }
.term-out.err { color: var(--term-bad); font-family: var(--sans); }
.term-ok { color: var(--term-ok); font-family: var(--sans); font-size: .8125rem; }
.term-line { display: flex; align-items: center; gap: .4rem; padding: .2rem .4rem .35rem .8rem; flex-wrap: wrap; }
.term-input { flex: 1 1 7rem; min-width: 5rem; background: transparent; border: 0; color: var(--term-ink); font-family: var(--mono); font-size: 1rem; min-height: 2.5rem; outline: none; caret-color: var(--term-acc); }
.term-line:focus-within { box-shadow: inset 0 0 0 1px var(--term-dim); }
.term-run { background: transparent; color: var(--term-ink); border: 1px solid var(--term-dim); border-radius: .35rem; min-width: 2.75rem; min-height: 2.5rem; display: inline-flex; align-items: center; justify-content: center; }
.term-task { display: grid; gap: .4rem; margin-top: .7rem; background: var(--bench-raised); border-radius: var(--radius); padding: .7rem .85rem; }
.term-task p { margin: 0; font-weight: 550; }
.term-task-n { font-size: .75rem; color: var(--ink-3); }
.term-task .btn { justify-self: start; }

/* Spec builder */
.spec-grid { display: grid; gap: 1.2rem; }
@media (min-width: 62rem) { .spec-grid { grid-template-columns: 1fr 1fr; gap: 2rem; } .spec-side { position: sticky; top: calc(var(--bar-h) + .8rem); align-self: start; } }
.spec-preview { background: var(--paper-raised); border: 1px solid var(--rule); border-radius: var(--radius); padding: .7rem .85rem; font-family: var(--mono); font-size: .75rem; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; max-height: 18rem; overflow-y: auto; margin: 0 0 .7rem; }
.missing-list { margin: 0 0 .5rem; padding: 0; list-style: none; font-size: .8125rem; color: var(--ink-2); line-height: 1.4; }
.prompt-box.inset { margin: 0; }

/* Save points */
.sp-grid { display: grid; gap: .9rem; }
@media (min-width: 48rem) { .sp-grid { grid-template-columns: 1.3fr 1fr; gap: 1.5rem; } }
.sp-project { background: var(--bench-raised); border: 2px solid var(--good); border-radius: var(--radius); padding: .7rem .85rem; min-height: 9.5rem; transition: border-color .2s; }
.sp-project.broken { border-color: var(--bad); }
.sp-status { display: flex; flex-wrap: wrap; gap: .4rem .8rem; align-items: center; justify-content: space-between; font-size: .875rem; }
.sp-badge { font-weight: 650; padding: .1rem .5rem; border-radius: .3rem; }
.sp-badge.good { background: var(--good-bg); }
.sp-badge.bad { background: var(--bad-bg); }
.sp-unsaved { color: var(--ink-2); font-size: .8125rem; }
.sp-features { list-style: none; display: flex; flex-wrap: wrap; gap: .3rem; margin: .7rem 0 0; padding: 0; }
.sp-features .tile { font-family: var(--sans); font-size: .8125rem; }
.sp-features li.unsaved .tile { outline: 1.5px dashed var(--ink-2); outline-offset: 1px; }
.sp-project.broken .sp-features { opacity: .35; filter: grayscale(1); }
.sp-actions { display: grid; gap: .35rem; align-content: start; }
.sp-actions .btn { width: 100%; }
.sp-line { display: flex; flex-wrap: wrap; gap: .4rem .1rem; min-height: 2.4rem; margin-top: .9rem; padding: .4rem 0; border-top: 2px solid var(--ink); }
.sp-pin { display: inline-flex; gap: .3rem; align-items: center; padding-right: .7rem; font-size: .75rem; min-width: 0; }
.sp-msg { overflow-wrap: anywhere; }
.sp-dot { width: .7rem; height: .7rem; flex: none; border-radius: 50%; background: var(--accent); }

/* Checklists */
.check-row { display: grid; grid-template-columns: minmax(0, 1fr); gap: .4rem; padding: .6rem 0; border-top: 1px solid var(--rule-strong); }
.check-row p { margin: 0; font-size: .9375rem; line-height: 1.38; font-weight: 500; }
@media (min-width: 48rem) { .check-row { grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 1.2rem; } }
.static-q { border-top: 0; }
.yesno { display: grid; grid-template-columns: repeat(2, minmax(4.5rem, 1fr)); gap: .3rem; }
.yn { display: flex; align-items: center; justify-content: center; min-height: 2.75rem; padding: 0 .9rem; background: var(--paper-raised); border: 1px solid var(--rule-strong); border-radius: var(--radius); cursor: pointer; font-weight: 550; font-size: .9375rem; }
.yn.on.yes { background: var(--good-bg); border-color: var(--good); }
.yn.on.no { background: var(--bad-bg); border-color: var(--bad); }
.yn:focus-within { outline: 2.5px solid var(--accent); outline-offset: 2px; }
.risk { padding: .8rem .95rem; border-radius: var(--radius); margin-top: .8rem; background: var(--bench-raised); border-left: 4px solid var(--good); }
.risk.medium { border-left-color: var(--warn); }
.risk.high { border-left-color: var(--bad); }
.risk .big-readout { margin-top: 0; }
.gaps { list-style: none; padding: 0; margin: 0; font-size: .9375rem; line-height: 1.4; }
.gaps li { padding: .45rem 0 .45rem .7rem; border-top: 1px solid var(--rule); border-left: 3px solid var(--warn); margin-bottom: .2rem; }
.gaps li.red { border-left-color: var(--bad); }
.gaps li.red strong { color: var(--bad); }
.briefs { display: grid; gap: .4rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr)); }
.brief { text-align: left; background: var(--paper-raised); border: 1px solid var(--rule-strong); border-radius: var(--radius); padding: .65rem .8rem; color: inherit; font-family: var(--sans); }
.brief:hover { border-color: var(--accent); }
.brief.on { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.brief-title { display: block; font-family: var(--serif); font-weight: 650; font-size: 1.0625rem; line-height: 1.25; }
.brief-text { display: block; font-size: .8125rem; line-height: 1.35; margin-top: .15rem; }
.tracker-grid { display: grid; gap: 0 2rem; }
@media (min-width: 56rem) { .tracker-grid { grid-template-columns: 1fr 1fr; } }
.ticks { list-style: none; padding: 0; margin: 0 0 1rem; }
.tick { display: flex; gap: .55rem; align-items: flex-start; padding: .4rem 0; min-height: 2.5rem; cursor: pointer; font-size: .9375rem; line-height: 1.35; }
.tick input { width: 1.25rem; height: 1.25rem; flex: none; margin: .1rem 0 0; accent-color: var(--accent); }
.tick.on span { color: var(--ink-2); text-decoration: line-through; text-decoration-color: var(--rule-strong); }
.tick.compact { min-height: 2.25rem; font-size: .875rem; margin-top: .3rem; }

/* Benchmark */
.bm-tasks { display: grid; gap: .7rem; }
@media (min-width: 56rem) { .bm-tasks { grid-template-columns: 1fr 1fr; } }
.bm-task { background: var(--bench-raised); border-radius: var(--radius); padding: .7rem .85rem; }
.bm-task h4 { font-family: var(--serif); font-size: 1.0625rem; font-weight: 650; margin-bottom: .4rem; }
.bm-add { display: flex; gap: .4rem; flex-wrap: wrap; }
.bm-add .input { flex: 1 1 12rem; }
.bm-results { display: grid; gap: .7rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 19rem), 1fr)); margin-top: .8rem; }
.bm-model { background: var(--bench-raised); border-radius: var(--radius); padding: .5rem .85rem .75rem; }
.bm-model header { display: flex; justify-content: space-between; align-items: center; gap: .5rem; }
.bm-model h5 { font-family: var(--serif); font-weight: 650; font-size: 1.0625rem; margin: 0; overflow-wrap: anywhere; }
.bm-score { display: grid; grid-template-columns: 5rem minmax(0, 1fr); gap: .5rem; align-items: center; margin-top: .3rem; font-size: .875rem; }

/* Quiz */
.quiz { font-family: var(--sans); }
.quiz-q { padding: 1.1rem 0; border-top: 1px solid var(--rule); }
.q-prompt { font-family: var(--serif); font-size: 1.125rem; font-weight: 550; line-height: 1.35; margin: 0 0 .7rem; }
.options { display: grid; gap: .35rem; }
.option { display: flex; gap: .55rem; align-items: flex-start; width: 100%; text-align: left; background: var(--paper-raised); border: 1px solid var(--rule-strong); border-radius: var(--radius); padding: .6rem .75rem; min-height: 2.75rem; color: inherit; font-family: var(--sans); font-size: .9688rem; line-height: 1.35; }
.option:hover:not(:disabled) { border-color: var(--accent); }
.option:disabled { cursor: default; opacity: 1; }
.option-mark { flex: none; width: 1.1em; height: 1.2em; }
.option.wrong { background: var(--bad-bg); border-color: var(--bad); }
.option.right { background: var(--good-bg); border-color: var(--good); font-weight: 600; }
.option.chosen { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.quiz-foot { display: flex; flex-wrap: wrap; gap: .4rem 1rem; align-items: center; justify-content: space-between; padding-top: .9rem; border-top: 1px solid var(--rule); }
.quiz-score { font-family: var(--serif); font-size: 1.125rem; font-weight: 650; margin: 0; }
.final-sort-row { padding: .6rem 0; border-top: 1px solid var(--rule); }
.final-sort-row p { margin: 0 0 .4rem; font-size: 1rem; line-height: 1.35; }
.final-nav { margin-top: 1.1rem; justify-content: space-between; }
.final-progress { display: flex; gap: 3px; margin-bottom: 1.2rem; }
.final-progress i { flex: 1 1 0; height: .35rem; background: var(--paper-sunk); border-radius: 1px; }
.final-progress i.on { background: var(--accent); }
.final-progress i.now { background: var(--ink); }
