@font-face{font-family:'Source Serif 4';font-style:normal;font-weight:200 900;font-display:swap;src:url(fonts/SourceSerif4-normal.woff2) format('woff2')}
@font-face{font-family:'Source Serif 4';font-style:italic;font-weight:200 900;font-display:swap;src:url(fonts/SourceSerif4-italic.woff2) format('woff2')}
@font-face{font-family:'IBM Plex Mono';font-style:normal;font-weight:400;font-display:swap;src:url(fonts/IBMPlexMono-400.woff2) format('woff2')}
@font-face{font-family:'IBM Plex Mono';font-style:normal;font-weight:500;font-display:swap;src:url(fonts/IBMPlexMono-500.woff2) format('woff2')}
/* OMEGA case-file system, Warren Smith commercial edition.
   Colour carries meaning only: grey-green = a tool's own success flag; oxblood = a failure the
   independent check found; forest = a result that holds; amber = can't tell. Everything else is ink on paper. */
:root {
  --paper: #f4f2eb; --surface: #fbfaf5; --ink: #252b26; --graphite: #565c55; --faint: #62675f;
  --rule: #c7cbc0; --hair: #dddfd4;
  --voice: #5b6c59;              /* the italic counter-line */
  --forest: #28403a;             /* holds, and actions */
  --flag: #346a45; --flag-bg: #e2e9d8;
  --oxblood: #8d1c1c; --oxblood-bg: #f1e2dc;
  --unknown: #855610;
  --sage: #e3e6d8; --blush: #e9dfd2; --mist: #dee6e7; --lilac: #e0dfe6; --olive: #e7e5d7;
  --code-bg: #e8e8de;
  --serif: 'Iowan Old Style', 'Source Serif 4', Charter, 'Bitstream Charter', Georgia, serif;
  --sans: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --mono: ui-monospace, 'SF Mono', 'IBM Plex Mono', Menlo, Consolas, monospace;
  --w: 1320px; --gut: clamp(16px, 5vw, 64px);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #161a17; --surface: #1d221e; --ink: #e9e7de; --graphite: #b3b6ab; --faint: #9a9e94; --rule: #3a413b; --hair: #2b312c;
    --voice: #a9b9a2; --forest: #9cc5a8; --flag: #8fc59b; --flag-bg: #22311f; --oxblood: #ff8c7a; --oxblood-bg: #3a1d19; --unknown: #e0b25a;
    --sage: #222a23; --blush: #2b2521; --mist: #212a2b; --lilac: #26252c; --olive: #2a291f; --code-bg: #262c27;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #161a17; --surface: #1d221e; --ink: #e9e7de; --graphite: #b3b6ab; --faint: #9a9e94; --rule: #3a413b; --hair: #2b312c;
  --voice: #a9b9a2; --forest: #9cc5a8; --flag: #8fc59b; --flag-bg: #22311f; --oxblood: #ff8c7a; --oxblood-bg: #3a1d19; --unknown: #e0b25a;
  --sage: #222a23; --blush: #2b2521; --mist: #212a2b; --lilac: #26252c; --olive: #2a291f; --code-bg: #262c27;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; animation: none !important; } }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 1.0625rem/1.62 var(--sans); overflow-x: hidden; }
a { color: inherit; text-underline-offset: .2em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--forest); outline-offset: 3px; }
code, pre { font-family: var(--mono); font-size: .88em; }
code { background: var(--code-bg); padding: .06em .3em; }
p { margin: 0 0 1em; }
h1, h2, h3 { font-family: var(--serif); font-weight: 400; letter-spacing: -.012em; margin: 0 0 .5em; line-height: 1.08; }
h3 { font-size: 1.3rem; line-height: 1.2; }
em { font-style: italic; }
.wrap { max-width: var(--w); margin: 0 auto; padding: 0 var(--gut); }
.cap { font: 500 .72rem/1.4 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--graphite); }
.fine { font-size: .86rem; color: var(--faint); }
.lede { font-size: clamp(1.08rem, 1.45vw, 1.24rem); line-height: 1.55; max-width: 40rem; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 12px; top: 12px; z-index: 20; background: var(--surface); padding: 8px 12px; }

/* The couplet: a claim in roman, its challenge in italic. */
.couplet { font: 400 clamp(2.7rem, 6.6vw, 6.1rem)/1.02 var(--serif); letter-spacing: -.024em; margin: 0; max-width: 15.5em; }
.couplet em, .sec-h em, .case-h em { display: block; color: var(--voice); }
.sec-h { font-size: clamp(2.1rem, 4.6vw, 3.8rem); line-height: 1.04; letter-spacing: -.018em; margin: 0 0 1rem; }
.claimrule { border: 0; border-top: 2px solid var(--ink); margin: 2.4rem 0 2rem; }

/* Actions: OMEGA's outlined pill; a filled forest pill at decision points. */
.pill { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 0 1.3rem; border: 1px solid var(--ink); border-radius: 999px; text-decoration: none; font: 500 1rem/1 var(--sans); white-space: nowrap; background: transparent; color: var(--ink); cursor: pointer; }
.pill:hover { background: var(--ink); color: var(--paper); text-decoration: none; }
.pill.solid { background: var(--forest); border-color: var(--forest); color: var(--paper); }
.pill.solid:hover { filter: brightness(1.15); }
.pill.small { min-height: 40px; font-size: .94rem; padding: 0 1.05rem; }
.textlink { text-decoration: underline; }
.acts { display: flex; flex-wrap: wrap; gap: 1.1rem 1.6rem; align-items: center; }

/* Masthead */
.mast { border-bottom: 1px solid var(--rule); background: var(--paper); position: sticky; top: 0; z-index: 10; }
.mast-in { display: flex; align-items: center; gap: 2rem; min-height: 78px; }
.name { text-decoration: none; margin-right: auto; line-height: 1; }
.name b { display: block; font: 400 1.38rem/1 var(--serif); letter-spacing: -.01em; }
.name span { display: block; margin-top: .4rem; }
.mast nav { display: flex; gap: 1.7rem; }
.mast nav a { text-decoration: none; font-size: .98rem; }
.mast nav a:hover { text-decoration: underline; }
@media (max-width: 820px) { .mast nav { display: none; } .mast-in { min-height: 66px; gap: 1rem; } .name b { font-size: 1.2rem; } .name span { font-size: .62rem; } }

/* Sheet: main column + margin dossier */
.sheet { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 0 56px; }
.dossier { border-left: 1px solid var(--rule); padding-left: 28px; }
.dossier dl { margin: 0; }
.dossier dt { font: 600 .68rem/1 var(--mono); letter-spacing: .13em; text-transform: uppercase; margin-top: 1.35rem; }
.dossier dt:first-child { margin-top: .2rem; }
.dossier dd { margin: .45rem 0 0; font: 400 .82rem/1.55 var(--mono); color: var(--graphite); }
.dossier a { color: var(--ink); }
@media (max-width: 1000px) { .sheet { grid-template-columns: 1fr; } .dossier { border-left: 0; border-top: 1px solid var(--rule); padding: 1.4rem 0 0; margin-top: 2rem; } }

.tags { display: flex; flex-wrap: wrap; gap: .35rem; }
.tag { display: inline-block; border: 1px solid currentColor; padding: .18rem .5rem; font: 500 .7rem/1.3 var(--mono); letter-spacing: .08em; text-transform: uppercase; }
.t-hold { color: var(--forest); } .t-fail { color: var(--oxblood); } .t-unk { color: var(--unknown); }

/* Hero */
.hero { padding: clamp(2.8rem, 7vw, 6.2rem) 0 clamp(2.5rem, 5vw, 4rem); }
.hero .acts { margin-top: 1.7rem; }

/* Figure plates */
.plate { background: var(--sage); }
.plate-in { padding: clamp(1.1rem, 2.6vw, 2.2rem); }
.plate-cap { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; padding: .9rem clamp(1.1rem, 2.6vw, 2.2rem) 1rem; border-top: 1px solid color-mix(in srgb, var(--forest) 25%, transparent); }

/* Fig. 1: the bench */
.bench-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem 2rem; flex-wrap: wrap; margin-bottom: 1.2rem; }
.bench-head h2 { font-size: clamp(1.7rem, 3.2vw, 2.6rem); margin: 0; }
.bench-head h2 em { color: var(--voice); }
.rail { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--forest); min-width: min(100%, 520px); }
.rail span { padding: .6rem .1rem 0; font: 500 .7rem var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--faint); border-top: 3px solid transparent; margin-top: -2px; }
.rail span.done { color: var(--forest); }
.rail span.now { color: var(--ink); border-top-color: var(--ink); }
.rail span.now.f { color: var(--oxblood); border-top-color: var(--oxblood); }
.bench { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 0; background: var(--surface); border: 1px solid var(--rule); }
.bench-plot { padding: 1rem 1.1rem .6rem; min-width: 0; }
.bench-side { border-left: 1px solid var(--rule); padding: 1.2rem 1.3rem; display: flex; flex-direction: column; gap: .9rem; background: color-mix(in srgb, var(--sage) 55%, var(--surface)); }
.surv-cap { display: flex; justify-content: space-between; }
.surv { display: flex; align-items: baseline; gap: .7rem; }
.surv b { font: 400 clamp(3.6rem, 6vw, 5.2rem)/.9 var(--serif); letter-spacing: -.03em; font-variant-numeric: lining-nums; }
.surv span { font: 500 .78rem/1.35 var(--mono); color: var(--graphite); }
.checks { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule); }
.checks li { border-bottom: 1px solid var(--rule); }
.checks label { display: grid; grid-template-columns: 1.3rem 1fr auto; gap: .55rem; align-items: center; padding: .6rem 0; cursor: pointer; font-size: .92rem; line-height: 1.3; }
.checks input { accent-color: var(--forest); width: 1.05rem; height: 1.05rem; margin: 0; }
.checks .n { font: 500 .72rem var(--mono); color: var(--graphite); white-space: nowrap; }
.checks .n.bad { color: var(--oxblood); }
.vline { font: 400 italic 1.12rem/1.35 var(--serif); margin: 0; min-height: 3em; }
.vline.bad { color: var(--oxblood); } .vline.ok { color: var(--forest); }
.bench-btns { display: flex; gap: .6rem; flex-wrap: wrap; margin-top: auto; }
.inspect { font-size: .86rem; color: var(--graphite); min-height: 2.6em; padding: .4rem 0 0; }
.inspect b { font-family: var(--mono); font-weight: 500; color: var(--ink); margin: 0 .35rem; }
.evidence { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4rem 2rem; padding: 1.2rem 1.3rem 1.3rem; border-top: 1px solid var(--rule); background: var(--surface); }
.evidence[hidden] { display: none; }
.evidence h3 { font-size: 1.15rem; margin: .3rem 0 .3rem; }
.evidence p { margin: 0; font-size: .93rem; }
@media (max-width: 1000px) { .bench { grid-template-columns: 1fr; } .bench-side { border-left: 0; border-top: 1px solid var(--rule); } .evidence { grid-template-columns: 1fr; } }
@media (max-width: 640px) { .rail { min-width: 0; width: 100%; } .rail span { font-size: .6rem; letter-spacing: .05em; } .bench-side { order: -1; border-top: 0; border-bottom: 1px solid var(--rule); } .bench-plot { padding: .8rem .6rem .4rem; } .surv b { font-size: 3.2rem; } .vline { min-height: 0; } }

/* The plot */
.ins svg { display: block; width: 100%; height: auto; overflow: visible; }
.ins .grid { stroke: var(--hair); stroke-width: 1; }
.ins .tick { font: 500 11px var(--mono); fill: var(--graphite); }
.ins .axlab { font: 500 10.5px var(--mono); fill: var(--graphite); letter-spacing: .06em; text-transform: uppercase; }
.ins .band-rect { fill: var(--sage); stroke: var(--forest); stroke-width: 1; }
.ins .band-lab { font: 500 11px var(--mono); fill: var(--forest); }
.ins .g { font: 500 12px var(--mono); fill: var(--ink); }
.ins .flag { font: 500 10px var(--mono); fill: var(--graphite); }
.ins .conv .flag { fill: var(--flag); }
.ins .dot { fill: var(--flag-bg); stroke: var(--flag); stroke-width: 2; transition: cy .9s cubic-bezier(.2,.7,.2,1), cx .9s cubic-bezier(.2,.7,.2,1), fill .35s, stroke .35s; }
.ins .unread .dot { fill: var(--surface); stroke-dasharray: 2 2; }
.ins .stem { stroke: var(--flag); stroke-width: 1.5; stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset .9s cubic-bezier(.2,.7,.2,1), stroke .35s; }
.ins .read .stem { stroke-dashoffset: 0; }
.ins .x { stroke: var(--graphite); stroke-width: 1.6; opacity: .55; }
.ins .col { cursor: pointer; outline: none; }
.ins .col:focus-visible .g { text-decoration: underline; }
.ins .hold .dot { fill: var(--forest); stroke: var(--forest); }
.ins .failed .dot { fill: var(--oxblood); stroke: var(--oxblood); }
.ins .failed .stem { stroke: var(--oxblood); }
.ins .failed .g { fill: var(--oxblood); }
.ins .failed .flag { fill: var(--oxblood); text-decoration: line-through; }

/* CTA strip under the figure */
.strip { display: flex; flex-wrap: wrap; gap: 1rem 2rem; align-items: center; justify-content: space-between; padding: 1.4rem 0 0; }
.strip p { margin: 0; max-width: 48rem; color: var(--graphite); }
.strip b { color: var(--ink); font-weight: 600; }

/* Sections */
.sec { padding: clamp(3.2rem, 7vw, 6rem) 0; border-top: 1px solid var(--rule); }
.sec-top { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem 2rem; flex-wrap: wrap; }
.sec-top p { max-width: 30rem; margin: 0 0 1.2rem; color: var(--graphite); }

/* Case specimens (aligned, not staggered) */
.specimens { display: grid; grid-template-columns: repeat(4, 1fr); gap: 26px; margin-top: 2rem; }
@media (max-width: 1050px) { .specimens { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .specimens { grid-template-columns: 1fr; } }
.spec { text-decoration: none; display: flex; flex-direction: column; }
.spec figure { margin: 0; aspect-ratio: 4 / 3.1; display: grid; place-items: center; position: relative; overflow: hidden; }
.spec figure svg { width: 88%; height: auto; }
.spec figcaption { position: absolute; left: 12px; bottom: 9px; font-size: .62rem; }
.spec .cap { margin: 1rem 0 .25rem; }
.spec h3 { margin: 0 0 .55rem; }
.spec:hover h3 { text-decoration: underline; text-decoration-thickness: 1px; }
.said { font: 500 .86rem/1.4 var(--mono); color: var(--flag); margin: 0; }
.found { margin: .3rem 0 .5rem; font-size: .96rem; line-height: 1.45; }
.found::before { content: ''; display: inline-block; width: .5rem; height: .5rem; background: var(--oxblood); margin-right: .45rem; vertical-align: .05em; }
.st { font: 400 .76rem var(--mono); color: var(--graphite); margin: 0; }
.f-pandapower { background: var(--mist); } .f-pybamm { background: var(--blush); } .f-cvc5 { background: var(--lilac); } .f-pulp-ecc { background: var(--olive); }
.mini text { font-family: var(--mono); }

/* Claim Check */
.proc { display: grid; grid-template-columns: 1.1fr 1fr; gap: 2rem 4rem; margin-top: 1rem; }
.proc ol { list-style: none; margin: 0; padding: 0; counter-reset: p; }
.proc li { counter-increment: p; display: grid; grid-template-columns: 3rem 1fr; padding: 1.05rem 0; border-top: 1px solid var(--rule); }
.proc li::before { content: counter(p); font: 400 1.9rem/1 var(--serif); color: var(--voice); }
.proc h3 { font: 600 1.02rem/1.35 var(--sans); margin: 0 0 .2rem; letter-spacing: 0; }
.proc li p { margin: 0; color: var(--graphite); }
.terms { margin: 1.4rem 0 0; }
.terms div { display: grid; grid-template-columns: 6.5rem 1fr; gap: 1rem; padding: .7rem 0; border-top: 1px solid var(--rule); }
.terms dt { font: 600 .68rem/1.6 var(--mono); letter-spacing: .12em; text-transform: uppercase; }
.terms dd { margin: 0; font-size: .95rem; }
@media (max-width: 900px) { .proc { grid-template-columns: 1fr; } }

/* Situations: an index, not tabs */
.situ { display: grid; grid-template-columns: 1fr 1.15fr; gap: 1.5rem 4rem; margin-top: 1.6rem; }
.situ-list { border-top: 2px solid var(--ink); }
.situ-opt { display: grid; grid-template-columns: 1.4rem 1fr; gap: .6rem; align-items: start; padding: .85rem 0; border-bottom: 1px solid var(--rule); cursor: pointer; font: 400 1.12rem/1.3 var(--serif); }
.situ-opt input { accent-color: var(--forest); margin-top: .3rem; }
.situ-opt:has(input:checked) { color: var(--forest); }
.situ-opt:has(input:checked) span { font-style: italic; }
.situ-panel { border-left: 1px solid var(--rule); padding-left: 2rem; }
.situ-panel h3 { font: 600 .68rem/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; margin: 1.3rem 0 .45rem; }
.situ-panel h3:first-child { margin-top: .4rem; }
.situ-panel p { margin: 0; }
.situ-panel .pill { margin-top: 1.4rem; }
.js .situ-panel[data-off] { display: none; }
.situ-panels { display: grid; gap: 2rem; align-content: start; }
@media (max-width: 860px) { .situ { grid-template-columns: 1fr; } .situ-panel { border-left: 0; padding-left: 0; border-top: 1px solid var(--rule); padding-top: 1rem; } }
.notfit { margin-top: 2.2rem; color: var(--graphite); max-width: 46rem; }

/* Why not */
.why { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 4rem; margin-top: 1.6rem; }
.why div { padding: 1.1rem 0; border-top: 1px solid var(--rule); }
.why dt { font: 400 1.3rem/1.25 var(--serif); margin-bottom: .35rem; }
.why dd { margin: 0; color: var(--graphite); }
@media (max-width: 760px) { .why { grid-template-columns: 1fr; } }

/* About */
.about-body { font: 400 1.22rem/1.55 var(--serif); max-width: 42rem; }
.about-body p { margin-bottom: 1rem; }

/* Send */
.send { background: var(--surface); border-top: 1px solid var(--rule); }
.send-in { display: grid; grid-template-columns: 1fr 1.05fr; gap: 2rem 4rem; }
.builder { display: grid; gap: .35rem; border-top: 2px solid var(--ink); padding-top: 1.2rem; }
.builder label { font: 600 .68rem/1.4 var(--mono); letter-spacing: .12em; text-transform: uppercase; margin-top: .9rem; }
.builder label:first-child { margin-top: 0; }
.opt { font-weight: 400; color: var(--faint); letter-spacing: .04em; text-transform: none; margin-left: .3rem; }
.builder input, .builder textarea { font: 400 1.05rem/1.45 var(--serif); color: var(--ink); background: transparent; border: 0; border-bottom: 1px solid var(--rule); padding: .45rem 0; width: 100%; border-radius: 0; }
.builder input:focus, .builder textarea:focus { outline: none; border-bottom-color: var(--forest); box-shadow: 0 1px 0 var(--forest); }
.builder textarea::placeholder, .builder input::placeholder { color: var(--faint); font-style: italic; }
.preview { margin-top: 1.2rem; }
.preview pre { margin: .4rem 0 0; white-space: pre-wrap; word-break: break-word; background: var(--paper); border: 1px solid var(--rule); padding: .8rem; font-size: .8rem; max-height: 14rem; overflow: auto; }
.builder-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.1rem; }
@media (max-width: 860px) { .send-in { grid-template-columns: 1fr; } }

/* Footer */
.foot { padding: 2.6rem 0 3rem; border-top: 1px solid var(--rule); font-size: .92rem; color: var(--graphite); }
.foot-in { display: grid; grid-template-columns: 1fr auto; gap: 1rem 3rem; }
.foot nav { display: flex; flex-wrap: wrap; gap: .4rem 1.4rem; }
.foot .name b { font-size: 1.15rem; color: var(--ink); }
@media (max-width: 760px) { .foot-in { grid-template-columns: 1fr; } }

/* Case pages */
.case-top { padding: clamp(2.2rem, 5vw, 4rem) 0 2rem; }
.crumb { margin-bottom: 1.2rem; }
.crumb a { text-decoration: none; }
.case-h { font-size: clamp(2.2rem, 4.8vw, 4.2rem); line-height: 1.05; max-width: 17em; margin-bottom: 1.6rem; }
.saidtrue { display: grid; grid-template-columns: 1fr 1fr; border-top: 2px solid var(--ink); max-width: 56rem; }
.saidtrue div { padding: .9rem 1.2rem .9rem 0; }
.saidtrue div + div { border-left: 1px solid var(--rule); padding-left: 1.2rem; }
.saidtrue .said { font-size: 1rem; }
.saidtrue .found { font: 400 1.15rem/1.4 var(--serif); margin: .2rem 0 0; color: var(--oxblood); }
.saidtrue .found::before { display: none; }
@media (max-width: 600px) { .saidtrue { grid-template-columns: 1fr; } .saidtrue div + div { border-left: 0; padding-left: 0; border-top: 1px solid var(--rule); } }
.case-sum { font: 400 1.2rem/1.55 var(--serif); max-width: 44rem; margin-top: 1.6rem; }
.case-int { margin: 2.5rem 0; }
.case-int .bench-head h2 { font-size: clamp(1.5rem, 2.6vw, 2.1rem); }
.trail { margin: 3rem 0; }
.trail ol { list-style: none; margin: 1.6rem 0 0; padding: 0; counter-reset: t; max-width: 50rem; }
.trail li { counter-increment: t; display: grid; grid-template-columns: 3.2rem 1fr; padding: 1.1rem 0; border-top: 1px solid var(--rule); }
.trail li::before { content: counter(t); font: 400 1.7rem/1 var(--serif); color: var(--voice); }
.trail li.t-attack::before { color: var(--oxblood); }
.trail li.t-conclusion::before { color: var(--forest); }
.trail h3 { font: 600 .7rem/1.4 var(--mono); letter-spacing: .12em; text-transform: uppercase; margin: .35rem 0 .45rem; }
.trail p { margin: 0; }
.limits { border-left: 3px solid var(--unknown); padding: .2rem 0 .2rem 1.2rem; max-width: 50rem; margin: 2.5rem 0; }
.limits h2, .yours h2, .sources h2 { font-size: 1.5rem; }
.yours, .sources { max-width: 50rem; margin: 2.5rem 0; }
.next { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; margin: 3rem 0 4rem; padding-top: 1.4rem; border-top: 2px solid var(--ink); }
.next a { text-decoration: none; font: 400 1.15rem/1.3 var(--serif); }
.next a:hover { text-decoration: underline; }
.next .cap { display: block; margin-bottom: .35rem; }
@media (max-width: 760px) { .next { grid-template-columns: 1fr; } }

/* Case interactives (PyBaMM, cvc5, PULP) */
.panel { background: var(--surface); border: 1px solid var(--rule); padding: clamp(1rem, 2.4vw, 1.6rem); }
.chips { display: flex; flex-wrap: wrap; gap: .45rem; margin-bottom: 1.3rem; }
.chip { display: inline-flex; align-items: center; gap: .4rem; border: 1px solid var(--rule); border-radius: 999px; padding: .38rem .8rem; cursor: pointer; font: 500 .78rem var(--mono); background: var(--paper); }
.chip input { accent-color: var(--forest); }
.chip:has(input:checked) { border-color: var(--ink); background: var(--ink); color: var(--paper); }
.pyb-row { display: grid; grid-template-columns: 16rem 1fr 7rem; gap: 1rem; align-items: center; padding: .55rem 0; border-top: 1px solid var(--hair); }
.pyb-name { font-size: .92rem; }
.pyb-track { height: 12px; background: var(--hair); position: relative; }
.pyb-bar { position: absolute; left: 0; top: 0; bottom: 0; background: var(--forest); transition: width .45s; }
.pyb-row[data-case="basic_variable"] .pyb-bar { background: var(--oxblood); }
.pyb-val { font: 500 .85rem var(--mono); text-align: right; }
.pyb-axis { display: flex; justify-content: space-between; margin: .3rem 7rem 0 17rem; font: 500 .7rem var(--mono); color: var(--graphite); }
.pyb-note { margin: 1.1rem 0 0; font: 400 italic 1.1rem/1.4 var(--serif); }
@media (max-width: 700px) { .pyb-row { grid-template-columns: 1fr auto; } .pyb-track { grid-column: 1 / -1; grid-row: 2; } .pyb-axis { margin: .3rem 0 0; } }
.smt-controls { display: flex; flex-wrap: wrap; gap: 1rem 2rem; align-items: center; margin-bottom: 1rem; }
.switch { display: inline-flex; gap: .5rem; align-items: center; cursor: pointer; }
.switch input { accent-color: var(--forest); width: 1.05rem; height: 1.05rem; }
.seg { display: inline-flex; flex-wrap: wrap; border: 1px solid var(--ink); }
.seg label { cursor: pointer; }
.seg input { position: absolute; opacity: 0; }
.seg span { display: block; padding: .5rem .85rem; font: 500 .78rem var(--mono); }
.seg input:checked + span { background: var(--ink); color: var(--paper); }
.seg input:focus-visible + span { outline: 2px solid var(--forest); outline-offset: -4px; }
.smt-src { background: var(--paper); border: 1px solid var(--rule); padding: 1rem; overflow-x: auto; margin: 0; line-height: 1.7; }
.smt-src code { background: none; padding: 0; }
.smt-src mark { background: color-mix(in srgb, var(--voice) 22%, transparent); color: inherit; padding: 0 .15em; }
.smt-line.off { opacity: .35; text-decoration: line-through; }
.smt-out { display: flex; flex-wrap: wrap; gap: .5rem 1rem; align-items: baseline; margin-top: 1rem; }
.smt-out code { font-size: 1.6rem; background: none; padding: 0; }
.smt-out.bad code, .smt-out.bad .smt-verdict { color: var(--oxblood); }
.smt-out.good code { color: var(--forest); }
.smt-verdict { font: 400 italic 1.1rem var(--serif); }
.pulp-out { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-top: 1.2rem; }
.pulp-cell { border-top: 2px solid var(--rule); padding: .8rem 0; }
.pulp-cell strong { display: block; font: 400 1.7rem/1.1 var(--serif); margin-top: .3rem; }
.pulp-cell.ok { border-color: var(--forest); } .pulp-cell.ok strong { color: var(--forest); }
.pulp-cell.bad { border-color: var(--oxblood); } .pulp-cell.bad strong { color: var(--oxblood); }
.pulp-cell.none strong { color: var(--faint); font-style: italic; }
.pulp-note { grid-column: 1 / -1; margin: 0; }
@media (max-width: 600px) { .pulp-out { grid-template-columns: 1fr; } }

/* Long-form pages */
.doc, .report { padding-top: clamp(2.2rem, 5vw, 4rem); padding-bottom: 4rem; }
.doc h1, .report h1 { font-size: clamp(2.3rem, 4.8vw, 4rem); max-width: 17em; }
.qa { max-width: 46rem; margin: 2.4rem 0; }
.qa section, .report section { margin-bottom: 2.2rem; }
.qa h2, .report h2 { font-size: 1.55rem; }
.qa ul, .qa ol, .report ul { padding-left: 1.2rem; }
.qa li, .report li { margin-bottom: .4rem; }
.report { max-width: 54rem; }
.report-note { border-left: 3px solid var(--voice); padding: .2rem 0 .2rem 1rem; font-size: .95rem; color: var(--graphite); }
.report-head { border-bottom: 1px solid var(--rule); margin-bottom: 2rem; padding-bottom: .5rem; }
.report-head .meta, .case-meta { display: grid; grid-template-columns: repeat(3, auto); justify-content: start; gap: .5rem 2.5rem; margin: 1.2rem 0; }
.meta dt { font: 600 .66rem/1.4 var(--mono); letter-spacing: .12em; text-transform: uppercase; }
.meta dd { margin: .2rem 0 0; font-size: .95rem; }
.v-fail { color: var(--oxblood); }
@media (max-width: 700px) { .report-head .meta { grid-template-columns: 1fr; } }
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: .8rem 0; }
table { border-collapse: collapse; width: 100%; font-size: .9rem; font-variant-numeric: tabular-nums; }
th, td { text-align: left; padding: .55rem .7rem .55rem 0; border-bottom: 1px solid var(--hair); vertical-align: top; }
thead th { font: 600 .66rem/1.4 var(--mono); letter-spacing: .1em; text-transform: uppercase; border-bottom: 1px solid var(--ink); }
tr.r-fail th, tr.r-fail td { color: var(--oxblood); }
details summary { cursor: pointer; font: 500 .8rem var(--mono); letter-spacing: .06em; text-transform: uppercase; }
.rec th[scope="row"] { font: 400 1.05rem/1.3 var(--serif); white-space: nowrap; }
@media (max-width: 700px) { .rec th[scope="row"] { white-space: normal; } }

/* Phone: a sticky check bar so the plot stays in view while checks are toggled */
.mbar { display: none; }
@media (max-width: 640px) {
  .hide-s { display: none; }
  .mbar { display: flex; align-items: center; gap: .6rem; position: sticky; top: 66px; z-index: 6; background: var(--paper); border-bottom: 1px solid var(--rule); padding: .55rem .6rem; margin: 0 -.6rem; }
  .mbar b { font: 400 2.1rem/1 var(--serif); min-width: 1.4rem; }
  .mbar .mcap { font: 500 .58rem/1.25 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--graphite); width: 4.6rem; }
  .mchips { display: flex; gap: .3rem; overflow-x: auto; scrollbar-width: none; }
  .mchips button { all: unset; flex: none; border: 1px solid var(--rule); border-radius: 999px; padding: .42rem .65rem; font: 500 .72rem var(--mono); cursor: pointer; background: var(--surface); }
  .mchips button[aria-pressed="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
  .mchips button.bad[aria-pressed="true"] { background: var(--oxblood); border-color: var(--oxblood); }
  .mchips button:focus-visible { outline: 2px solid var(--forest); }
  .bench-side { order: 0; border-top: 1px solid var(--rule); border-bottom: 0; }
}
.name .cap span { display: inline; margin: 0; }
@media (max-width: 640px) { .name .cap span.hide-s { display: none; } }
.ins .hint-t { font: 400 italic 23px var(--serif); fill: var(--voice); }
.ins .hint-line { fill: none; stroke: var(--voice); stroke-width: 1; stroke-dasharray: 3 3; }
.ins .hint { transition: opacity .4s; } .ins .hint.off { opacity: 0; }

/* Bench additions */
.ins .hit { fill: transparent; }
.ins .lane-rule { stroke: var(--rule); stroke-dasharray: 2 3; }
.ins .novalue { font: 500 13px var(--mono); fill: var(--faint); }
.ins .read:not(.failed) .stem { stroke: var(--graphite); }
.ins .col.conv:focus-visible .dot { stroke-width: 4; }
html:not(.js) .bench-side, html:not(.js) .bench-plot .ins, html:not(.js) .rail { display: none; }
html:not(.js) .bench { display: block; }
.nojs { font-size: .95rem; }
/* Above-the-fold exhibit */
.exhibit { display: grid; grid-template-columns: auto 1fr; gap: 0; margin-top: 2.2rem; max-width: 40rem; text-decoration: none; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.exhibit > span { padding: .9rem 1.2rem .9rem 0; }
.exhibit .ex-true { border-left: 1px solid var(--rule); padding-left: 1.2rem; }
.exhibit code { display: block; background: none; padding: 0; margin-top: .3rem; font-size: 1.05rem; color: var(--flag); }
.exhibit b { display: inline-block; margin-top: .1rem; font: 400 clamp(2rem, 3.4vw, 2.7rem)/1 var(--serif); color: var(--oxblood); letter-spacing: -.02em; }
.exhibit .ex-unit { display: block; font-size: .86rem; color: var(--graphite); margin-top: .25rem; }
.exhibit:hover b { text-decoration: underline; text-decoration-thickness: 1px; }
/* Menu (small screens) */
.menu { display: none; position: relative; }
.menu summary { list-style: none; cursor: pointer; font: 500 .72rem var(--mono); letter-spacing: .1em; text-transform: uppercase; padding: .6rem 0; }
.menu summary::-webkit-details-marker { display: none; }
.menu nav { position: absolute; right: 0; top: 100%; background: var(--surface); border: 1px solid var(--rule); display: grid; min-width: 11rem; z-index: 30; }
.menu nav a { padding: .75rem 1rem; text-decoration: none; border-bottom: 1px solid var(--hair); }
@media (max-width: 820px) { .menu { display: block; } }
/* Chips in PyBaMM: hide the radio dot */
.chip input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.chip:has(input:focus-visible) { outline: 2px solid var(--forest); outline-offset: 2px; }
@media (max-width: 640px) {
  .mbar { flex-wrap: wrap; row-gap: .45rem; }
  .mcount { display: flex; align-items: center; gap: .45rem; }
  .mchips { flex-wrap: wrap; overflow: visible; flex: 1 1 100%; order: 3; }
  .mstage { margin-left: auto; font: 600 .66rem var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--graphite); }
  .mstage.s-Failure { color: var(--oxblood); } .mstage.s-Evidence { color: var(--forest); }
  .bench-side .surv, .bench-side .surv-cap { display: none; }
  .exhibit { grid-template-columns: 1fr; } .exhibit .ex-true { border-left: 0; border-top: 1px solid var(--rule); padding-left: 0; }
  .rec thead { display: none; }
  .rec tr { display: block; border-top: 1px solid var(--rule); padding: .7rem 0; }
  .rec th[scope="row"], .rec td { display: block; border: 0; padding: .15rem 0; }
}
[hidden] { display: none !important; }
.exhibit .cap { display: block; }
.exhibit b { margin-top: .35rem; }
@media (max-width: 640px) { .name span.cap { letter-spacing: .06em; } }

/* Plain-first layer (D540 visual language unchanged) */
.lede-plain { font: 400 clamp(1.25rem, 1.9vw, 1.55rem)/1.45 var(--serif); max-width: 36rem; color: var(--ink); }
.example { padding: clamp(2.5rem, 5vw, 4rem) 0 1.6rem; }
.example .sec-h { margin-bottom: 1rem; }
.story { font: 400 clamp(1.15rem, 1.6vw, 1.35rem)/1.5 var(--serif); max-width: 40rem; }
.story p { margin: 0 0 .55rem; }
.ox { color: var(--oxblood); font-weight: 400; }
.sta { margin: .4rem 0 .9rem; }
.sta div { display: grid; grid-template-columns: 5.2rem 1fr; gap: .6rem; padding: .45rem 0; border-top: 1px solid var(--rule); }
.sta dt { font: 600 .64rem/1.7 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--graphite); }
.sta dd { margin: 0; font-size: .95rem; line-height: 1.42; }
.sta .said-p { color: var(--flag); }
.sta .found-p { color: var(--oxblood); }
.sta-wide { max-width: 44rem; margin-top: 1.2rem; }
.sta-wide dd { font: 400 1.12rem/1.45 var(--serif); }
.spec .more { margin-top: auto; padding-top: .4rem; font-size: .9rem; text-decoration: underline; }
.answers { margin: 1rem 0 0; max-width: 36rem; }
.answers div { display: grid; grid-template-columns: 9.5rem 1fr; gap: 1rem; align-items: baseline; padding: .6rem 0; border-top: 1px solid var(--rule); }
.answers dd { margin: 0; }
.techhead { margin: 2.6rem 0 .8rem; border-top: 2px solid var(--ink); padding-top: .8rem; }
.tech-sum { max-width: 44rem; margin-top: 1.2rem; color: var(--graphite); }
.techtoggle { display: flex; gap: .45rem; align-items: center; font: 500 .72rem var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--graphite); cursor: pointer; }
.techtoggle input { accent-color: var(--forest); }
.tech-l { display: none; }
[data-bench].tech .tech-l { display: inline; }
[data-bench].tech .plain-l { display: none; }
[data-bench].tech p.tech-l { display: block; }
.ins .grp { font: 500 11px var(--mono); fill: var(--graphite); }
.ins .grp-bad { fill: var(--oxblood); }
@media (max-width: 640px) { .answers div { grid-template-columns: 1fr; gap: .3rem; } .sta div { grid-template-columns: 4.6rem 1fr; } }

.sendline { font-size: 1.02rem; margin: -.2rem 0 1.4rem; color: var(--graphite); max-width: 36rem; }
@media (max-width: 640px) { .hero .dossier { display: none; } }

/* Simplified homepage */
.exhibit-big { max-width: 46rem; margin-top: 1rem; }
.exhibit-big code { font-size: 1.3rem; }
.exhibit-big b { font-size: clamp(2.4rem, 4.6vw, 3.4rem); }
.exhibit-big .ex-unit { font-size: 1rem; }
.example .story { margin-top: 1.2rem; }
.tiny p { margin: 0 0 .35rem; font-size: .98rem; line-height: 1.45; }

.plainanswers { list-style: none; margin: .6rem 0 .8rem; padding: 0; display: flex; flex-wrap: wrap; gap: .5rem; }
.plainanswers .tag { font-size: .78rem; padding: .35rem .65rem; }
