/* Model page: formulas, tables, collapsible parts, the model map (F.01) and the interactive figures (F.08, F.13).
   Loaded after hp-story.css, only on pages with `model: true`. Same type (Baloo 2 + Nunito Sans) and colours; nothing under 15px.
   Formulas are MathML drawn by the browser from the fonts already on the reader's system (no web font is added). */

/* ── formulas ─────────────────────────────────────────────────────── */
math{font-family:"Cambria Math","STIX Two Math","Latin Modern Math","Noto Sans Math",math;font-style:normal;font-weight:400;line-height:normal;font-size:1.1em;letter-spacing:normal;text-indent:0;text-transform:none;direction:ltr;font-size-adjust:none;font-feature-settings:"dtls" off;color:var(--ink)}
math *{border-color:currentColor}
math.tml-display{display:block;width:100%}
mfrac>:nth-child(2),msqrt,mover>:first-child{math-shift:compact}
.tml-sml-pad{padding-left:.05em}
.tml-right{text-align:right}
.tml-left{text-align:left}
mtext.tml-tag{color:var(--muted);font-size:.9em}
.article-section .eq{margin:1.5em 0;padding:12px clamp(12px,2vw,24px);max-width:46em;border-radius:var(--radius-sm);background:var(--surface);border:1px solid var(--line);border-left:5px solid var(--teal);overflow-x:auto;overflow-y:hidden;font-size:1.05rem}
.eq math{margin:0 auto;font-size:1.18em}
.article-section .eq-note{margin:8px 0 0;max-width:none;font-size:1rem;color:var(--muted)}
.article-section p math,.article-section td math,.article-section li math{font-size:1.06em}

/* ── tables ───────────────────────────────────────────────────────── */
.mtable{margin:1.8em 0}
.mtable table{width:100%;min-width:34em;font-size:1rem;line-height:1.5;border-collapse:collapse}
.mtable caption{caption-side:top;text-align:left;padding:14px 16px 6px;font-weight:700;color:var(--ink)}
.mtable th,.mtable td{padding:10px 16px;vertical-align:top}
.mtable th{white-space:normal}
.mtable thead th{white-space:nowrap}
.mtable tbody th{font-weight:700;background:none;color:var(--ink)}
.mtable td.num,.mtable th.num{text-align:right;font-variant-numeric:tabular-nums}
.mtable tbody tr:last-child>*{border-bottom:0}

/* ── collapsible block, references, back-to-map link ──────────────── */
.article-section .refs{margin:1.2em 0;padding:0 0 0 1.6em;list-style:decimal;display:block;max-width:46em}
.article-section .refs li{padding:0 0 .8em .3em;background:none;border:0;border-radius:0;font-size:1.0625rem;line-height:1.55}
.article-section .refs li::before{display:none}
.article-section .to-map{margin:2.2em 0 0;max-width:none;font-size:1rem}
.to-map a{display:inline-flex;gap:8px;align-items:center;padding:6px 16px;border-radius:999px;border:1px solid var(--line);background:var(--surface);text-decoration:none;font-weight:700}
.to-map a:hover{border-color:var(--teal)}

/* A jump from the model map: the heading it lands on lights up briefly. */
.article-story :is(h3,h4,.eq,.mtable,.wfig,.fig):target{scroll-margin-top:calc(var(--header-h,72px) + var(--sheet-h,0px) + 20px)}
.article-story section:target{scroll-margin-top:calc(var(--header-h,72px) + var(--sheet-h,0px) + 10px)}
.article-story :is(h3,h4):target,.article-story section:target>.chapter-head h2,.article-story section:target>h2{animation:target-flash 2.4s ease-out}
@keyframes target-flash{0%,35%{background:color-mix(in srgb,var(--amber) 55%,transparent);box-shadow:0 0 0 10px color-mix(in srgb,var(--amber) 55%,transparent);border-radius:6px}100%{background:transparent;box-shadow:0 0 0 10px transparent}}
@media (prefers-reduced-motion:reduce){.article-story :is(h3,h4):target,.article-story section:target>.chapter-head h2,.article-story section:target>h2{animation:none;outline:3px solid var(--amber);outline-offset:6px}}
.article-story h4{margin:1.9em 0 .4em;font:700 clamp(1.25rem,1.9vw,1.5rem)/1.2 var(--font-display);color:var(--ink)}

/* ── the maps of the Model page: the loop of the PTS model, and F.01 of the AI vision tab ───────────────
   A box is a link to its section; an arrow says which box comes next. Narrow: one column, arrows down. Wide (by the width of the
   figure, not of the screen): the loop runs in two rows, the routes side by side. */
.mmap{container-type:inline-size;--mm-gap:30px;--mm-arrow:var(--teal);margin:2.2em 0 2.6em;padding:clamp(16px,3vw,34px);border-radius:var(--radius);background:var(--surface-2,var(--surface));color:var(--ink);border:1px solid var(--line)}
.mm-head{margin:0 0 clamp(16px,2.4vw,26px)}
.article-section .mm-kicker{margin:0 0 4px;max-width:none;font-size:.9375rem;font-weight:700;letter-spacing:.1em;text-transform:uppercase;color:var(--teal)}
.article-section .mmap h3{margin:0 0 6px;font-size:clamp(1.4rem,2.6vw,1.9rem);color:var(--ink)}
.article-section .mm-hint{margin:0;max-width:none;color:var(--muted);font-size:1.0625rem}
.article-section .mmap li{padding:0;background:none;border:0;border-radius:0;color:inherit}
.article-section .mmap li::before{display:none}
.article-section .mmap :is(.mm-loop,.mm-steps){display:grid;gap:var(--mm-gap);margin:0;padding:0;list-style:none}
.mm-loop>li,.mm-steps>li{position:relative;display:grid;min-width:0}
.article-section .mmap a.mm-node{position:relative;display:grid;gap:3px;align-content:start;padding:14px 16px;border-radius:12px;background:var(--surface);border:1px solid var(--line);border-left:4px solid var(--teal);color:var(--ink);text-align:left;text-decoration:none;font-weight:400;transition:border-color .18s,box-shadow .18s,transform .18s}
.article-story .article-section .mmap a.mm-node strong{font:700 1.1875rem/1.25 var(--font-display);color:var(--ink)}
.article-section .mmap a.mm-node:hover,.article-section .mmap a.mm-node:focus-visible{border-color:var(--teal);box-shadow:0 0 0 3px color-mix(in srgb,var(--teal) 25%,transparent);transform:translateY(-1px);outline:none}
.mm-sub{font-size:.9375rem;line-height:1.4;color:var(--muted)}
.mm-tag{font-size:.9375rem;font-weight:700;letter-spacing:.06em;text-transform:uppercase;color:var(--teal)}
/* the arrow after a box: down, in a column */
.mm-loop>li::after,.mm-steps>li:not(:last-child)::after{content:"↓";content:"↓" / "";position:absolute;top:100%;left:0;right:0;height:var(--mm-gap);display:grid;place-items:center;font:700 1.5rem/1 var(--font-text);color:var(--mm-arrow);pointer-events:none}
.mm-loop>li.mm-u::after{display:none}   /* the last step closes the loop: said in words below, drawn when the loop is wide */
.article-section .mm-again{display:flex;gap:10px;align-items:baseline;margin:20px 0 0;max-width:none;font-size:1.0625rem;color:var(--muted)}
.mm-again::before{content:"↺";font-size:1.5rem;line-height:1}
/* plain links under a label: the places the map leads to besides its boxes */
.article-section .mm-rest{display:flex;flex-wrap:wrap;align-items:baseline;gap:0 22px;margin:clamp(18px,2.6vw,26px) 0 0;padding-top:16px;border-top:1px solid var(--line);max-width:none;font-size:1.0625rem;line-height:1.3}
.mm-rest span{flex:0 0 100%;margin-bottom:2px;font-size:.9375rem;font-weight:700;letter-spacing:.08em;text-transform:uppercase;color:var(--teal)}
.article-section .mmap .mm-rest a{padding:7px 0;color:var(--ink);font-weight:600;text-decoration:underline;text-decoration-thickness:1px;text-underline-offset:4px}
.article-section .mmap .mm-rest a:hover{color:var(--teal)}
.article-section .mmap .mm-rest a:focus-visible{outline:2px solid var(--teal);outline-offset:3px;border-radius:4px}
/* F.01: the images, the two routes, then the checks and the evidence */
.mm-start{display:grid}
.mm-fork{display:grid;height:var(--mm-gap)}
.mm-fork i{display:grid;place-items:center;font-style:normal}
.mm-fork i::before{content:"↓";content:"↓" / "";font:700 1.5rem/1 var(--font-text);color:var(--mm-arrow)}
.mm-fork i+i{display:none}
.mm-routes{display:grid;gap:var(--mm-gap)}
.mm-route{display:flex;flex-direction:column;min-width:0;padding:0;border-radius:0;background:none;border:0}
.mm-route>header{display:grid;gap:2px;margin:0 0 16px}
.article-section .mm-route h4{margin:0;font:700 1.3rem/1.2 var(--font-display);color:var(--ink)}
.mm-route>header span{font-size:.9375rem;font-weight:700;letter-spacing:.06em;text-transform:uppercase;color:var(--teal)}
.mm-side{display:grid;gap:8px;margin-top:auto;padding-top:14px}
.mm-route .mm-steps+.mm-side{margin-top:20px;border-top:1px dashed var(--line)}
.mm-side>span{font-size:.9375rem;font-weight:700;letter-spacing:.06em;text-transform:uppercase;color:var(--muted)}
.article-section .mm-foot{margin:20px 0 0;max-width:none;font-size:.9375rem;line-height:1.55;color:var(--muted)}
.article-section .mmap .mm-cap{margin:8px 0 0;max-width:none;font-size:.9375rem;line-height:1.55;color:var(--muted)}
@container (min-width:44rem){
  .mm-routes{grid-template-columns:repeat(2,minmax(0,1fr))}
  .mm-fork{grid-template-columns:repeat(2,minmax(0,1fr));gap:var(--mm-gap)}
  .mm-fork i+i{display:grid}
}
@container (min-width:48rem){
  .mm-loop{grid-template-columns:repeat(4,minmax(0,1fr))}
  .mm-loop>li{grid-area:var(--row)/var(--col)}
  .mm-loop>li.mm-r::after{content:"→";content:"→" / "";top:0;bottom:0;left:100%;right:auto;width:var(--mm-gap);height:auto}
  .mm-loop>li.mm-l::after{content:"←";content:"←" / "";top:0;bottom:0;right:100%;left:auto;width:var(--mm-gap);height:auto}
  .mm-loop>li.mm-u::after{display:grid;content:"↑";content:"↑" / "";top:auto;bottom:100%}
}
@container (max-width:30rem){.mm-node .mm-sub{display:none}}   /* on a phone a box is its name; its section says the rest */
@media (prefers-reduced-motion:reduce){.article-section .mmap a.mm-node{transition:none}.article-section .mmap a.mm-node:hover{transform:none}}
@media print{.mmap{box-shadow:none}}

/* ── interactive figures (F.08, F.13) ─────────────────────────────── */
.wfig{--w-a:#00808c;--w-b:#c4571a;--w-on:#2f8a50;--w-off:#4d7080;margin:2.4em 0;padding:clamp(14px,2.4vw,26px);border-radius:var(--radius);background:var(--surface);border:1px solid var(--line);box-shadow:var(--shadow)}
:root[data-theme=dark] .wfig{--w-a:#4fd3e0;--w-b:#ff9a5c;--w-on:#66e5b9;--w-off:#9bc0d0}
.article-section .wfig-kicker{margin:0 0 12px;max-width:none;font:700 1.1875rem/1.3 var(--font-display);color:var(--ink)}
.wfig-kicker span{color:var(--accent)}
.wfig-kicker em{margin-left:12px;padding:2px 12px;border-radius:999px;background:var(--accent-soft);color:var(--accent);font:700 .9375rem/1.5 var(--font-text);font-style:normal;vertical-align:.1em}
.wfig-stage{display:grid;gap:14px;min-width:0}
.wfig-two{grid-template-columns:repeat(auto-fit,minmax(min(100%,330px),1fr))}
.wfig-grid{grid-template-columns:repeat(auto-fit,minmax(min(100%,280px),1fr))}
.wfig.is-live .wfig-grid{grid-template-columns:repeat(var(--cols,3),minmax(0,1fr))}
.wchart{display:block;width:100%;height:auto}
.wchart .ax-grid{stroke:var(--line);stroke-width:1}
.wchart .ax-grid-x{stroke-opacity:.55}
.wchart .ax-text{fill:var(--muted);font:400 15px var(--font-text)}
.wchart .ax-label{fill:var(--text);font:600 15px var(--font-text)}
.wchart .ax-title{fill:var(--ink);font:700 16px var(--font-display)}
.wchart .ax-line{stroke:var(--muted);stroke-width:1.2}
.wchart .line{fill:none;stroke-width:2.6;stroke-linejoin:round;stroke-linecap:round}
.wchart .s-a{stroke:var(--w-a)}.wchart .s-b{stroke:var(--w-b)}.wchart .s-on{stroke:var(--w-on)}.wchart .s-off{stroke:var(--w-off)}
.wchart .crit{stroke-width:2;stroke-dasharray:2 5}.wchart .crit-a{stroke:var(--w-a)}.wchart .crit-b{stroke:var(--w-b)}
.wchart .base{stroke:var(--muted);stroke-width:2;stroke-dasharray:7 5}
.wchart .pick{stroke:var(--ink);stroke-width:2}
.wchart .dot{stroke:var(--surface);stroke-width:2}
.wchart .dot-a{fill:var(--w-a)}.wchart .dot-b{fill:var(--w-b)}.wchart .dot-on{fill:var(--w-on)}.wchart .dot-off{fill:var(--w-off)}
.wfig-controls{display:grid;gap:14px;margin-top:16px}
.wfig-controls:empty{display:none}
.wfig-slider{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:6px 14px;align-items:center;font-weight:700;color:var(--ink)}
.wfig-slider>span{grid-column:1/-1}
.wfig-slider input{width:100%;min-height:36px;accent-color:var(--teal)}
.wfig-slider output{min-width:6.5em;text-align:right;font-variant-numeric:tabular-nums;font-weight:700;color:var(--accent)}
.wfig-btn,.wfig-tog{min-height:44px;padding:8px 18px;border-radius:999px;border:1px solid var(--line);background:var(--bg);color:var(--ink);font:700 1rem/1.2 var(--font-text);cursor:pointer}
.wfig-btn:hover,.wfig-tog:hover{border-color:var(--teal)}
.wfig-controls>.wfig-btn{justify-self:start}
.wfig-toggles{display:flex;flex-wrap:wrap;gap:10px}
.wfig-tog{display:inline-flex;align-items:center;gap:10px}
.wfig-tog i{width:22px;height:0;border-top:3px solid var(--w-on)}
.wfig-tog.tog-off i{border-top:3px dashed var(--w-off)}
.wfig-tog[aria-pressed=false]{opacity:.55;text-decoration:line-through}
.wfig-read{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,240px),1fr));gap:12px;margin:0}
.wfig-card{padding:12px 16px;border-radius:12px;border:1px solid var(--line);border-left:5px solid var(--w-a);background:var(--bg)}
.wfig-card.card-b{border-left-color:var(--w-b)}
.wfig-card dt{margin:0 0 4px;font-weight:700;color:var(--ink)}
.wfig-card dd{margin:0;line-height:1.55}
.wfig-flag{display:inline-block;margin-top:4px;padding:1px 12px;border-radius:999px;background:var(--accent-soft);color:var(--accent);font-size:.9375rem;font-weight:700}
.wfig-flag.is-cap{background:color-mix(in srgb,var(--amber) 30%,transparent);color:var(--ink)}
.wfig-table{margin:0;max-width:none}
.wfig-table table{min-width:0;font-size:1rem}
.wfig-table th,.wfig-table td{padding:8px 14px}
.wfig figcaption{margin-top:16px;color:var(--muted);font-size:1rem;line-height:1.6;max-width:none}
.wfig figcaption strong{color:var(--ink)}
@media (max-width:640px){.wfig{margin-inline:calc(var(--gutter) * -.5);border-radius:var(--radius-sm)}}
@media print{.wfig-controls{display:none}}

/* ── code and commands ────────────────────────────────────────────── */
.article-section .codeblock{margin:1.6em 0;padding:16px 20px;max-width:46em;overflow-x:auto;border-radius:var(--radius-sm);background:#0B2A40;border:1px solid #1D4863;color:#E4F4EF;font:400 .9375rem/1.65 ui-monospace,SFMono-Regular,Menlo,Consolas,"Liberation Mono",monospace}
.article-story .article-section .codeblock code{padding:0;border-radius:0;background:none;color:inherit;font:inherit;white-space:pre}

/* legend above a chart */
.wfig-legend{display:flex;flex-wrap:wrap;gap:6px 22px;margin:0 0 10px;padding:0;list-style:none}
.article-section .wfig-legend li{position:relative;padding:0 0 0 38px;background:none;border:0;border-radius:0;font-size:1rem;line-height:1.4;color:var(--text)}
.article-section .wfig-legend li::before{content:"";position:absolute;left:0;top:50%;width:28px;height:0;border-top:3px solid currentColor;border-radius:0;background:none}
.wfig-legend .lg-a::before{border-top-color:var(--w-a)!important}
.wfig-legend .lg-b::before{border-top-color:var(--w-b)!important}
.wfig-legend .lg-base::before{border-top:3px dashed var(--muted)!important}
.wfig-legend .lg-crit::before{border-top:3px dotted var(--muted)!important}

/* ── equation sheet: two systems side by side ──────────────────────── */
.cmp{container-type:inline-size;--cmp-mcp:#B25E18;--cmp-pts:#00808C;margin:2em 0;border:1px solid var(--line);border-radius:var(--radius);background:var(--surface);box-shadow:var(--shadow);overflow:hidden}
:root[data-theme=dark] .cmp{--cmp-mcp:#FF9A5C;--cmp-pts:#4FD3E0}
.cmp-head,.cmp-row{display:grid;grid-template-columns:minmax(8.5rem,9.5rem) minmax(0,1fr) minmax(0,1fr)}
.cmp-head{background:var(--surface-2);border-bottom:1px solid var(--line)}
.article-section .cmp-h{display:block;padding:14px 18px;font:700 1.1875rem/1.25 var(--font-display);color:var(--ink)}
.cmp-h small{display:block;margin-top:2px;font:600 .9375rem/1.35 var(--font-text);color:var(--muted)}
.cmp-h-mcp{box-shadow:inset 0 4px 0 var(--cmp-mcp)}.cmp-h-pts{box-shadow:inset 0 4px 0 var(--cmp-pts)}
.cmp-row{border-top:1px solid var(--line)}
.cmp-row:first-of-type{border-top:0}
.cmp-step{display:flex;flex-direction:column;gap:6px;align-items:flex-start;padding:16px 18px;background:var(--bg)}
.article-section .cmp-step strong{font:700 1.0625rem/1.3 var(--font-display);color:var(--ink)}
.cmp-badge{display:inline-block;padding:1px 10px;border-radius:999px;font-size:.9375rem;font-weight:700;line-height:1.5;border:1px solid currentColor}
.cmp-shared{color:#1B7F4B}.cmp-replaced{color:#B25E18}.cmp-new{color:#00808C}.cmp-adapted{color:#5C4DB1}
:root[data-theme=dark] .cmp-shared{color:#66E5B9}:root[data-theme=dark] .cmp-replaced{color:#FFB27A}:root[data-theme=dark] .cmp-new{color:#6FE0EA}:root[data-theme=dark] .cmp-adapted{color:#B7A9FF}
.cmp-cell{min-width:0;padding:14px 18px 12px;border-left:1px solid var(--line)}
.cmp-both{grid-column:2 / 4;background:color-mix(in srgb,var(--green) 7%,transparent)}
.cmp-tag{display:block;margin-bottom:2px;font-size:.9375rem;font-weight:700;letter-spacing:.04em;color:var(--muted)}
.cmp-mcp .cmp-tag{color:var(--cmp-mcp)}.cmp-pts .cmp-tag{color:var(--cmp-pts)}
.cmp-eq{overflow-x:auto;overflow-y:hidden;padding:2px 0}
.cmp-eq math{margin:0;font-size:1.1em}
.cmp-eq math.tml-display{width:auto;min-width:100%}
.article-section .cmp-note{margin:6px 0 0;max-width:none;font-size:1rem;line-height:1.55;color:var(--muted)}
.article-section .cmp-none{margin:6px 0 0;max-width:none;font-style:italic;color:var(--muted)}
@container (max-width:760px){
  .cmp-head{display:none}
  .cmp-row{grid-template-columns:minmax(0,1fr)}
  .cmp-step{flex-direction:row;flex-wrap:wrap;align-items:center;gap:8px 12px;padding:12px 16px}
  .cmp-cell{border-left:0;border-top:1px solid var(--line);padding:12px 16px}
  .cmp-both{grid-column:auto}
}
@media print{.cmp{box-shadow:none}}

/* ── bar chart with intervals (simulator experiments) ─────────────── */
.bars{container-type:inline-size;--w-a:#00808c;--w-b:#c4571a;--w-off:#4d7080;margin:2.4em 0;padding:clamp(14px,2.4vw,26px);border-radius:var(--radius);background:var(--surface);border:1px solid var(--line);box-shadow:var(--shadow)}
:root[data-theme=dark] .bars{--w-a:#4fd3e0;--w-b:#ff9a5c;--w-off:#9bc0d0}
.bars .bars-legend{display:flex;flex-wrap:wrap;gap:6px 22px;max-width:none;margin:0 0 6px;font-size:.9375rem;line-height:1.4;color:var(--muted)}
.bars .bars-legend li{display:flex;align-items:center;gap:8px;margin:0;padding:0;border:0;border-radius:0;background:none}
.bars .bars-legend li::before{content:"";position:static;display:block;flex:none;background:none}
.bars .bars-legend .lg-ref::before{width:0;height:18px;border-radius:0;border-left:2px dashed var(--ink)}
.bars .bars-legend .lg-ci::before{width:22px;height:0;border-radius:2px;border-top:3px solid var(--ink)}
.bars-group-title{margin:18px 0 6px;font:700 1.0625rem/1.35 var(--font-display);color:var(--ink)}
.bars .bars-list{display:block;max-width:none;margin:0;padding:0;list-style:none}
.bars .bars-list .bar-row{display:grid;grid-template-columns:15rem minmax(0,1fr) 6.5rem;align-items:center;column-gap:14px;margin:0;padding:6px 0;border:0;background:none;border-radius:0}
.bars .bar-row::before{display:none}
.bar-name{font-size:1rem;line-height:1.35;color:var(--text)}
.bar-name small{display:block;margin-top:1px;font-size:.9375rem;line-height:1.35;color:var(--muted)}
.bar-track{position:relative;height:26px;border-radius:6px;background:color-mix(in srgb,var(--line) 55%,transparent)}
.bar-track::before{content:"";position:absolute;z-index:2;top:-4px;bottom:-4px;left:var(--ref);border-left:2px dashed var(--ink);opacity:.7}
.bar-fill{position:absolute;left:0;top:0;bottom:0;border-radius:6px;background:var(--bar,var(--w-a));opacity:.85}
.bar-ci{position:absolute;z-index:3;top:50%;height:3px;margin-top:-1px;background:var(--ink);border-radius:2px}
.bar-ci::before,.bar-ci::after{content:"";position:absolute;top:-5px;bottom:-5px;width:3px;border-radius:2px;background:var(--ink)}
.bar-ci::before{left:0}.bar-ci::after{right:0}
.bar-val{font-variant-numeric:tabular-nums;white-space:nowrap}
.bar-val strong{font:700 1.125rem/1.2 var(--font-display);color:var(--ink)}
.bar-val small{margin-left:6px;font-size:.9375rem;color:var(--muted)}
.bar-t-wild{--bar:var(--w-a)}.bar-t-eng{--bar:var(--w-b)}.bar-t-ctrl{--bar:var(--w-off)}
.bars-axis{display:grid;grid-template-columns:15rem minmax(0,1fr) 6.5rem;column-gap:14px;margin-top:4px}
.bars-ticks{position:relative;height:22px}
.bars-ticks i{position:absolute;top:0;translate:-50% 0;font-style:normal;font-size:.9375rem;line-height:1.4;color:var(--muted);font-variant-numeric:tabular-nums}
.bars-ticks i:first-child{translate:0 0}
.bars figcaption{margin-top:14px;font-size:1rem;line-height:1.55;color:var(--muted);max-width:50em}
@container (max-width:600px){
  .bars .bars-list .bar-row{grid-template-columns:minmax(0,1fr) 5.8rem;row-gap:4px}
  .bar-name{grid-column:1 / -1}
  .bars-axis{grid-template-columns:minmax(0,1fr) 5.8rem}
  .bars-axis>span:first-child{display:none}
}
@media print{.bars{box-shadow:none}}

/* ── the AI vision tab: citations, figures with a picker ───────────────────────────────────────────── */
.article-story a.cite{margin-left:.12em;padding:0 .08em;font-size:.9em;font-weight:700;text-decoration:none;white-space:nowrap}
.cite::before{content:"["}.cite::after{content:"]"}
.article-story a.cite:hover{text-decoration:underline}
.article-story :is(p[id],.refs li,.ftabs,.mmap):target{scroll-margin-top:calc(var(--header-h,72px) + var(--sheet-h,0px) + 20px)}
.refs li:target{animation:target-flash 2.4s ease-out}
@media (prefers-reduced-motion:reduce){.refs li:target{animation:none;outline:3px solid var(--amber);outline-offset:4px}}


/* a figure that combines several plots: the whole figure, and a picker for each plot */
.ftabs{margin:2.4em 0;padding:clamp(14px,2.4vw,26px);border-radius:var(--radius);background:var(--surface);border:1px solid var(--line);box-shadow:var(--shadow)}
.ft-hint{margin-left:12px;padding:2px 12px;border-radius:999px;background:var(--accent-soft);color:var(--accent);font:700 .9375rem/1.5 var(--font-text);font-style:normal;vertical-align:.1em}
.ft-hint[hidden]{display:none}
.ft-bar{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin:0 0 14px}
.ft-bar[hidden]{display:none}
.ft-tab{min-height:44px;padding:8px 18px;border-radius:999px;border:1px solid var(--line);background:var(--bg);color:var(--ink);font:700 1rem/1.2 var(--font-text);cursor:pointer}
.ft-tab:hover{border-color:var(--teal)}
.ft-tab[aria-selected=true]{background:var(--accent-soft);border-color:var(--accent);color:var(--accent)}
.ft-stage{min-width:0}
.ft-pane[hidden]{display:none}
.ft-pane .fig-scroll img,.ft-pane>img{display:block;width:100%;height:auto;border-radius:var(--radius);background:var(--surface-2);border:1px solid var(--line)}
.ft-pane .fig-scroll img{max-width:none;min-width:var(--min,0)}
:root[data-theme=dark] .ft-pane img{filter:brightness(.9)}
.ft-set{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
.ft-set>.ft-pane{min-width:0}
@media (min-width:761px){.ft-set .fig-scroll img{min-width:0;max-width:100%}}   /* four readings side by side fit; on a phone each one scrolls */
.ftabs figcaption{margin-top:16px;color:var(--muted);font-size:1rem;line-height:1.6;max-width:none}
.ftabs figcaption strong{color:var(--ink)}
@media (max-width:760px){
  .ft-set{grid-template-columns:minmax(0,1fr)}
  .ftabs{margin-inline:calc(var(--gutter) * -.5);border-radius:var(--radius-sm)}
  .ftabs .ft-stage+figcaption::after{content:" Swipe a picture sideways to see all of it.";color:var(--accent);font-weight:600}
}
@media print{.ft-bar{display:none}}

/* ── AI vision clips (block `clip`, tools/model-blocks.mjs): one video from video.igem.org, or two side by side ── */
.clip{margin:2.4em 0;padding:clamp(14px,2.4vw,26px);border-radius:var(--radius);background:var(--surface);border:1px solid var(--line);box-shadow:var(--shadow)}
.clip-row{position:relative;display:grid;gap:14px}
.clip-pair{grid-template-columns:repeat(auto-fit,minmax(240px,1fr))}
.clip-one{margin:0;min-width:0}
.clip-stage{position:relative;width:100%;border-radius:var(--radius-sm);overflow:hidden;background:#111}
.clip iframe{position:absolute;inset:0;display:block;width:100%;height:100%;border:0}
.article-section .clip-label{margin:8px 0 0;max-width:none;font:700 1rem/1.4 var(--font-display);color:var(--ink)}
.clip-label span{color:var(--accent)}
.clip figcaption{margin-top:16px;color:var(--muted);font-size:1rem;line-height:1.6;max-width:none}
.clip-meta{display:block;margin-top:8px;font-size:.9375rem;color:var(--muted)}
.clip-meta::before{content:"▶ ";color:var(--accent)}
.article-story .clip:target{scroll-margin-top:calc(var(--header-h,72px) + var(--sheet-h,0px) + 20px)}
@media (max-width:719px){.clip{margin-inline:calc(var(--gutter) * -.5);border-radius:var(--radius-sm)}}

/* copy button on a code block; the one-button Markdown save on the Experiments page */
.article-section .codewrap{position:relative;margin:1.6em 0;max-width:46em}
.article-section .codewrap .codeblock{margin:0;max-width:none}
.codewrap .copy-btn{position:absolute;top:8px;right:8px;z-index:1;padding:4px 14px;border-radius:999px;border:1px solid #3B7A9C;background:#12405C;color:#E4F4EF;font:700 .9375rem/1.4 inherit;font-family:inherit;cursor:pointer}
.codewrap .copy-btn:hover,.codewrap .copy-btn:focus-visible{background:#1D4863;outline:2px solid var(--accent,#1DCA85);outline-offset:2px}
.article-section .mdsave{display:flex;flex-wrap:wrap;align-items:center;gap:12px 18px;margin:1.2em 0 1.6em}
.mdsave .md-save{padding:12px 24px;font-size:1rem}
.mdsave .md-note{font-size:.9375rem;color:var(--muted,inherit)}
