/* kit.css: the look every motion visual shares (newsroom/visual-kit/kit.css). build.py puts it first in styles.css and the
   visual's own CSS after it.
   Palette: dark card, white text, indigo and cyan for marks, rose only for "not confirmed / not stated", amber only for a note.
   Two frames on one DOM: tall (the fixed 1060px frame below 900px wide) is the base; wide (the block's aspect ratio, 5:4 or
   16:10 on screens 900px and wider) overrides it in the media query near the end. The wide query must match WIDE_QUERY in kit.js.
   Wide sizes are in rem and the root font size scales with the frame, so the wide design is one fixed composition. */
:root {
  --bg: #0b1726; --panel: #102039; --panel2: #16294a; --line: #2f4668; --line2: #4a6590;
  --mute: #b9c7dc; --ink: #0b1726;
  --indigo: #635bff; --indigo-t: #b3afff; --cyan: #06b6d4; --cyan-t: #3fd9f0; --rose: #fb7185; --amber: #fbbf24;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
* { box-sizing: border-box; }
html { background: var(--bg); color-scheme: dark; font-size: 16px; }
body { margin: 0; background: var(--bg); color: #fff; font-family: var(--font); line-height: 1.35; min-height: 100vh; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
button:focus-visible, input:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
.sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
ol, ul { margin: 0; padding: 0; list-style: none; }
.lw { display: none; }
.lt { display: inline; }

/* ---------- the frame ---------- */
.stage { position: relative; display: flex; flex-direction: column; height: 100vh; padding: 0.6rem 0.7rem 0.5rem; gap: 0.4rem; max-width: 46rem; margin: 0 auto; }
.top { display: flex; flex-direction: column; gap: 0.4rem; }
h1 { margin: 0; font-size: 1.1rem; line-height: 1.2; font-weight: 700; }
.ctl { display: flex; gap: 0.5rem; }
.btn { min-height: 2.5rem; min-width: 5.5rem; padding: 0 1rem; border: 1px solid #5b7399; background: var(--panel2); border-radius: 0.5rem; font-size: 0.875rem; font-weight: 600; }
.btn:hover:not(:disabled) { border-color: #fff; }
.btn:disabled { color: #a8b6cc; border-color: var(--line); background: transparent; cursor: default; }
.btn[hidden] { display: none; }

/* ---------- slider row: label, range input, readout ---------- */
.scrub { display: grid; grid-template-columns: auto 1fr; column-gap: 0.7rem; align-items: center; flex: none; }
.scrub-l { font-size: 0.875rem; color: var(--mute); white-space: nowrap; }
.scrub input[type="range"] { -webkit-appearance: none; appearance: none; display: block; width: 100%; height: 2.2rem; margin: 0; background: transparent; cursor: pointer; }
.scrub input[type="range"]::-webkit-slider-runnable-track { height: 6px; border-radius: 3px; background: #3a5278; }
.scrub input[type="range"]::-moz-range-track { height: 6px; border-radius: 3px; background: #3a5278; }
.scrub input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 26px; height: 26px; margin-top: -10px; border-radius: 50%; background: #fff; border: 5px solid var(--indigo); }
.scrub input[type="range"]::-moz-range-thumb { width: 16px; height: 16px; border-radius: 50%; background: #fff; border: 5px solid var(--indigo); }
.when { grid-column: 1 / span 2; margin: 0; font-size: 0.875rem; color: var(--mute); min-height: 1.35em; }

/* ---------- tooltip: a sheet over the free edge of the frame (tall), floating beside the target (wide) ---------- */
.dock { flex: none; }
.tip { position: absolute; left: 0.5rem; right: 0.5rem; bottom: 0.5rem; z-index: 30; max-height: 58%; overflow: auto; padding: 0.5rem 0.8rem 0.6rem; background: #09111f; border: 1px solid #5b7399; border-left-width: 5px; border-radius: 0.5rem; font-size: 0.875rem; box-shadow: 0 0.6rem 1.6rem rgba(0, 0, 0, 0.6); pointer-events: none; }
.tip.pinned { pointer-events: auto; }
.tip[hidden] { display: none; }
.tip p { margin: 0; }
.tip[data-tone="plain"], .tip[data-tone="stage"] { border-left-color: var(--indigo); }
.tip[data-tone="rose"] { border-left-color: var(--rose); }
.tip[data-tone="amber"] { border-left-color: var(--amber); }
.tip[data-tone="cyan"] { border-left-color: var(--cyan); }
.tk-kick { color: var(--mute); }
.tk-title { font-weight: 700; font-size: 1rem; margin-top: 0.1rem !important; }
.tk-plain { margin-top: 0.25rem !important; }
.vb { margin-top: 0.35rem; }
.vh { color: var(--cyan-t); font-weight: 700; }
.q { margin: 0.1rem 0 0; padding: 0 0 0 0.6rem; border-left: 2px solid #5b7399; font-style: italic; }
.vn { color: var(--mute); margin-top: 0.15rem !important; }
.tk-der { margin-top: 0.4rem !important; color: var(--cyan-t); font-weight: 600; }
.tk-mid { margin-top: 0.4rem !important; }
.tk-ns { margin-top: 0.4rem !important; color: var(--rose); font-weight: 600; }
.tk-close { display: none; position: sticky; bottom: 0; margin-top: 0.5rem; min-height: 2.6rem; padding: 0 1.2rem; background: var(--panel2); border: 1px solid #5b7399; border-radius: 0.4rem; font-weight: 600; font-size: 0.875rem; pointer-events: auto; }
.tip.pinned .tk-close { display: inline-block; }
.src { margin: 0; flex: none; font-size: 0.875rem; color: var(--mute); }
.tipping .src { display: none; }

/* ---------- wide frame ---------- */
@media (min-aspect-ratio: 21/20) {
  .lw { display: inline; }
  .lt { display: none; }
  html { font-size: min(calc(100vw / 53), calc(100vh / 42.4)); }
  body { overflow: hidden; }
  .stage { max-width: calc(100vh * 1.25); padding: 0.5rem 1rem 0.35rem; gap: 0.3rem; }
  .top { flex-direction: row; align-items: center; justify-content: space-between; gap: 1rem; }
  h1 { font-size: 1.2rem; }
  .btn { min-height: 1.9rem; min-width: 4.6rem; padding: 0 0.8rem; font-size: 0.85rem; }
  .scrub { grid-template-columns: auto minmax(0, 20rem) 1fr; column-gap: 0.7rem; }
  .scrub-l { font-size: 0.85rem; }
  .scrub input[type="range"] { height: 1.6rem; }
  .scrub input[type="range"]::-webkit-slider-thumb { width: 20px; height: 20px; margin-top: -7px; border-width: 4px; }
  .when { grid-column: auto; font-size: 0.85rem; }
  .dock { position: static; height: 0; }
  .tip { right: auto; bottom: auto; width: 28rem; max-width: calc(100% - 1rem); max-height: calc(100% - 1rem); font-size: 0.85rem; padding: 0.5rem 0.7rem; }
  .tk-title { font-size: 0.95rem; }
  .tk-close { margin-top: 0.4rem; min-height: 1.9rem; font-size: 0.85rem; }
  .src, .tipping .src { display: block; font-size: 0.8rem; }
}

/* ---------- without script ----------
   A module script runs a moment after first paint, so the plain list waits 1.4 seconds before it appears. A reader with script
   never sees it flash, a reader without script still gets it. */
html:not(.js) .plain { opacity: 0; animation: nojs 0.01s 1.4s forwards; }
@keyframes nojs { to { opacity: 1; } }
html:not(.js) body { overflow: auto; }
html:not(.js) .stage { height: auto; min-height: 100vh; }
html:not(.js) .scrub, html:not(.js) .dock, html:not(.js) .ctl, html:not(.js) .chart { display: none; }
html.js .plain { display: none; }

/* ---------- reduced motion, and the freeze while a tooltip is open ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
.frozen *, .frozen *::before, .frozen *::after { transition: none !important; animation: none !important; }

/* Chart styles. Come after kit.css in styles.css. The tall frame is the base (the fixed 1060px frame below 900px wide); the wide
   frame (5:4) overrides it in the media query near the end. Four measures on one DOM, one shown at a time behind four tabs: the
   margins of the post's table on one points scale, where the index lead comes from (a waterfall, a weight slider and a live
   ranking), the arena Elo with its intervals, and the cost per task. Every mark is a real button. Bars start at zero, the zero
   line is drawn. Four marks for the four models of the post's table (circle, ring, diamond, square), grey for the other rows of
   the arena, rose only for what is missing from the post or is a deficit, amber for the one slider marker. */
:root { --c-g: #22d3ee; --c-as: #8b85ff; --c-ge: #fb923c; --c-grey: #94a3b8; --c-rose: #fb7185; --bh: 1.4rem; --th: 13px; --lab: 0rem; --ins: 0.9rem; }
.tip { bottom: auto; }
@media not all and (min-aspect-ratio: 21/20) { .tip { max-height: 80%; } }
h1 { font-size: 1.05rem; }

/* ---------- tabs and controls ---------- */
.tabs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.35rem; flex: none; }
.vbtn { min-width: 0; padding: 0 0.15rem; line-height: 1.15; }
.vbtn[aria-pressed="true"], .pbtn[aria-pressed="true"] { background: var(--indigo); border-color: #fff; color: #fff; }
.pl { font-size: 0.875rem; line-height: 1.2; color: var(--mute); }
.prow2 { display: flex; flex-direction: column; gap: 0.15rem; min-width: 0; }
.pgroup { display: grid; gap: 0.35rem; min-width: 0; }
.wgroup { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.wgroup .pbtn { padding: 0 0.1rem; }
.pbtn { min-width: 0; padding: 0 0.3rem; line-height: 1.15; }
.wctl { display: flex; flex-direction: column; gap: 0.35rem; margin-top: 0.45rem; padding-top: 0.4rem; border-top: 1px solid var(--line); }
.wctl .scrub { margin-top: 0.05rem; }

/* the marks under the slider: AA's 25%, and the amber marker where the lead ends */
.sl { position: relative; min-width: 0; }
.marks { position: relative; height: 2.4rem; margin-top: -0.35rem; }
.mkt { position: absolute; top: 0; left: calc(var(--th) + (100% - 2 * var(--th)) * var(--k, 0)); transform: translateX(-50%); margin: 0; padding: 0; border: 0; border-radius: 0.25rem; background: none; font-size: 0.875rem; line-height: 1.15; color: var(--mute); white-space: nowrap; text-align: center; }
.mkt.first { left: 0; transform: none; }
.mkt.last { left: 100%; transform: translateX(-100%); }
.mkt.mkaa { color: #fff; font-weight: 700; }
.mk { color: var(--amber); }
.mk .mkn, .mk .mkw { display: block; }
.mk .mkw { font-weight: 700; padding-top: 0.08rem; }
.mk::before { content: ""; position: absolute; left: 50%; top: -0.35rem; width: 0; height: 0.3rem; border-left: 2px solid var(--amber); }
.mk::after { content: ""; position: absolute; inset: -0.4rem -0.4rem -0.2rem; }
.mk:hover, .mk.pin { box-shadow: 0 0 0 2px #fff; }
.mk[hidden] { display: none; }

/* ---------- panels ---------- */
.chart { flex: none; }
.panel { display: none; min-width: 0; }
.stage[data-view="margins"] .vmargins, .stage[data-view="index"] .vindex, .stage[data-view="arena"] .varena, .stage[data-view="cost"] .vcost { display: block; }
.phead { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 0.6rem; }
.ph { margin: 0; font-size: 1rem; line-height: 1.2; font-weight: 700; }
.ph2 { margin: 0; font-size: 0.95rem; line-height: 1.2; font-weight: 700; }
.pu { margin: 0.05rem 0 0; font-size: 0.875rem; line-height: 1.3; color: var(--mute); }
.cap { margin: 0.35rem 0 0; font-size: 0.875rem; line-height: 1.3; color: #fff; }
.note { margin-top: 0.25rem; }
.key { display: flex; flex-wrap: wrap; gap: 0.1rem 0.8rem; margin-top: 0.25rem; font-size: 0.875rem; line-height: 1.3; color: var(--mute); }
.key li { display: flex; align-items: center; gap: 0.3rem; }
.kg { display: inline-block; flex: none; width: 0.85rem; height: 0.85rem; box-sizing: border-box; }
.kg.circle { border-radius: 50%; background: var(--c-g); }
.kg.ring { border-radius: 50%; border: 3px solid var(--c-g); }
.kg.diamond { transform: rotate(45deg) scale(0.88); background: var(--c-as); }
.kg.square { background: var(--c-ge); }
.kg.g { border-radius: 50%; background: var(--c-grey); }
.kg.hollow { border-radius: 50%; border: 2px dashed #fff; }
.kg.post { background: var(--c-as); }
.kg.miss { background: repeating-linear-gradient(135deg, var(--c-rose) 0 3px, rgba(251, 113, 133, 0.45) 3px 6px); border: 1px solid var(--c-rose); }

/* ---------- axis, rows and tracks ---------- */
.tkbox { position: relative; height: 1.25rem; }
.mrow { position: relative; }
.mrow .tka { position: absolute; left: 0; right: 0; bottom: -1.2rem; margin: 0 var(--ins); pointer-events: none; }
.tkbox .ticks { position: absolute; left: 0; right: 0; top: 0; margin: 0 var(--ins); }
.ticks { position: relative; height: 1.25rem; margin: 0.2rem var(--ins) 0; }
.tk { position: absolute; top: 0; left: calc(var(--k, 0) * 100%); transform: translateX(-50%); font-size: 0.875rem; line-height: 1.2; color: var(--mute); white-space: nowrap; }
.tk[hidden], .gl[hidden], .row[hidden], .mk[hidden] { display: none; }
.row { display: block; margin-top: 0.3rem; }
.rh { display: flex; flex-wrap: wrap; align-items: center; gap: 0.15rem 0.6rem; }
.rl { display: inline-flex; flex-wrap: wrap; align-items: baseline; gap: 0 0.5rem; min-width: 0; }
.rn { font-weight: 600; font-size: 0.875rem; line-height: 1.25; }
.rn.inpost { font-weight: 700; }
.rs { color: var(--mute); font-size: 0.875rem; line-height: 1.25; }
.rno { display: inline-block; min-width: 1.1rem; font-size: 0.875rem; font-weight: 700; color: var(--mute); }
.rrow .rl { display: flex; flex-wrap: nowrap; align-items: flex-start; gap: 0.35rem; }
.rrow .rl .rno { flex: none; min-width: 1.1rem; }
.rrow .rl .kg { margin-top: 0.12rem; }
.rrow .rl .rn { flex: 1; min-width: 0; }
.tagmiss { color: var(--c-rose); font-weight: 600; }
.track { position: relative; height: var(--bh); margin: 0.1rem var(--ins) 0; }
.gl { position: absolute; top: -0.15rem; bottom: -0.15rem; left: calc(var(--k, 0) * 100%); width: 0; border-left: 1px dashed var(--line2); pointer-events: none; }
.gl.zero { border-left: 2px solid var(--mute); }
.vl { position: absolute; top: 50%; transform: translateY(-50%); left: calc(var(--e, 0) * 100% + 0.3rem); padding: 0.12rem 0.25rem; border-radius: 0.2rem; background: rgba(11, 23, 38, 0.9); font-size: 0.875rem; font-weight: 700; line-height: 1; white-space: nowrap; color: #fff; pointer-events: none; z-index: 5; }
.vl.in { left: 0.2rem; }
.vl.lft { left: calc(var(--l, 0) * 100% - 0.3rem); transform: translate(-100%, -50%); }

/* the chip: the margin, or the count of cheaper models, as a button */
.chip { min-height: 1.7rem; padding: 0.1rem 0.6rem; border: 1px solid var(--c-g); border-radius: 0.4rem; background: transparent; font-size: 0.875rem; line-height: 1.2; color: #fff; text-align: left; }
.chip.lose, .chip.rosechip { border-color: var(--c-rose); }
.chip:hover, .chip.pin { box-shadow: 0 0 0 2px #fff; }
.rosechip { margin-top: 0.45rem; }
.chip[style*="hidden"] { pointer-events: none; }

/* ---------- measure 1: the margins ---------- */
.mrow .track { height: 2.3rem; --cy: 1.45rem; }
.mrow.tsr .track { height: 3.1rem; --cy: 1.85rem; }
.pt { position: absolute; left: calc(var(--x, 0) * 100%); top: var(--cy); margin: 0; padding: 0; border: 0; background: none; transform: translate(-50%, calc(-50% - var(--d, 0) * 1.4rem)) rotate(var(--rot, 0deg)); opacity: calc(1 - var(--d, 0)); z-index: 3; }
.pt:hover, .pt.pin { box-shadow: 0 0 0 3px #fff; }
.pt.circle { width: 1rem; height: 1rem; border-radius: 50%; background: var(--c-g); z-index: 4; }
.pt.ring { width: 1.55rem; height: 1.55rem; border-radius: 50%; border: 3px solid var(--c-g); z-index: 1; }
.pt.ring::after { content: ""; position: absolute; inset: -0.3rem; border-radius: 50%; }
.pt.diamond { width: 0.9rem; height: 0.9rem; background: var(--c-as); --rot: 45deg; z-index: 2; }
.pt.diamond::after { content: ""; position: absolute; inset: -0.3rem; }
.pt.square { width: 0.9rem; height: 0.9rem; background: var(--c-ge); z-index: 3; }
.pt.square::after { content: ""; position: absolute; inset: -0.3rem; }
.br { position: absolute; top: 0.1rem; left: calc(var(--x, 0) * 100%); width: calc(var(--w, 0) * 100%); min-width: 6px; height: 0.9rem; background: linear-gradient(var(--c-g), var(--c-g)) center / 100% 3px no-repeat; z-index: 2; }
.br::before, .br::after { content: ""; position: absolute; top: 0.1rem; height: 0.7rem; border-left: 3px solid var(--c-g); }
.br::before { left: 0; }
.br::after { right: 0; }
.br.lose { background-image: linear-gradient(var(--c-rose), var(--c-rose)); }
.br.lose::before, .br.lose::after { border-left-color: var(--c-rose); }
.wh { position: absolute; left: calc(var(--x, 0) * 100%); width: calc(var(--w, 0) * 100%); height: 1rem; margin: 0; padding: 0; border: 0; background: none; color: var(--c-g); z-index: 1; }
.wh.a { top: calc(var(--cy) - 1.05rem); }
.wh.b { top: calc(var(--cy) + 0.05rem); }
.wh .ln { position: absolute; left: 0; right: 0; top: calc(50% - 1.5px); height: 3px; background: currentColor; opacity: 0.75; transform-origin: left; transform: scaleX(var(--s, 1)); }
.wh .cp { position: absolute; top: 12%; height: 76%; width: 3px; background: currentColor; opacity: 0.75; }
.wh .cp.l { left: 0; }
.wh .cp.r { left: calc(var(--s, 1) * 100% - 3px); }
.wh:hover, .wh.pin { box-shadow: 0 0 0 2px #fff; }

/* ---------- measure 2: the waterfall, the weights, the ranking ---------- */
.wrow .track { height: 1.3rem; }
.wrow, .rrow { margin-top: 0.2rem; }
.wfb { position: absolute; top: 10%; height: 80%; left: calc(var(--x, 0) * 100%); width: calc(var(--w, 0) * 100%); min-width: 2px; margin: 0; padding: 0; border: 0; border-radius: 0; background: var(--c-g); z-index: 1; }
.wfb::after { content: ""; position: absolute; inset: -0.3rem -0.4rem; }
.wfb.neg { background: repeating-linear-gradient(135deg, var(--c-rose) 0 4px, rgba(251, 113, 133, 0.45) 4px 8px); border: 1px solid var(--c-rose); }
.wfb.step { background-color: #0ea5c4; }
.wfb.neg.step { background-color: transparent; }
.wfb:hover, .wfb.pin, .rb:hover, .rb.pin, .bar:hover, .bar.pin { box-shadow: 0 0 0 2px #fff; z-index: 3; }
.rkbox { margin-top: 0.45rem; padding-top: 0.4rem; border-top: 1px solid var(--line); }
.rrow .track { height: 1.2rem; }
.rb { position: absolute; top: 0; height: 100%; left: 0; width: calc(var(--w, 0) * 100%); min-width: 2px; margin: 0; padding: 0; border: 0; border-radius: 0; background: var(--c-grey); z-index: 1; }
.rb::after { content: ""; position: absolute; inset: -0.25rem -0.4rem; }
.rb.k-g3 { background: var(--c-g); }
.rb.k-g2 { background: #19b5cf; }
.rb.k-astra { background: var(--c-as); }
.rb.k-gem { background: var(--c-ge); }

/* ---------- measure 3: the arena ---------- */
.erow .track { height: 1.7rem; }
.er { position: absolute; left: calc(var(--lo, 0) * 100%); width: calc(var(--hw, 0) * 100%); top: 0; height: 100%; margin: 0; padding: 0; border: 0; background: none; color: var(--c-grey); z-index: 1; }
.er.k-g3, .er.k-g2 { color: var(--c-g); }
.er.k-astra { color: var(--c-as); }
.er.k-gem { color: var(--c-ge); }
.er .ln { position: absolute; left: 0; right: 0; top: calc(50% - 1.5px); height: 3px; background: currentColor; opacity: 0.7; transform-origin: left; transform: scaleX(var(--t, 0)); }
.er .cp { position: absolute; top: 22%; height: 56%; width: 3px; background: currentColor; opacity: 0.7; }
.er .cp.l { left: 0; }
.er .cp.r { left: calc(var(--t, 0) * 100% - 3px); }
.er .dot { position: absolute; left: calc(var(--p, 0) * 100%); top: 50%; opacity: clamp(0, calc((var(--t, 0) - 0.55) * 4), 1); }
.er .dot.circle { width: 0.95rem; height: 0.95rem; border-radius: 50%; transform: translate(-50%, -50%); background: currentColor; }
.er .dot.ring { width: 1.4rem; height: 1.4rem; border-radius: 50%; transform: translate(-50%, -50%); border: 3px solid currentColor; }
.er .dot.diamond { width: 0.85rem; height: 0.85rem; transform: translate(-50%, -50%) rotate(45deg); background: currentColor; }
.er .dot.square { width: 0.85rem; height: 0.85rem; transform: translate(-50%, -50%); background: currentColor; }
.er.grey .dot.circle { width: 0.75rem; height: 0.75rem; }
.er::after { content: ""; position: absolute; inset: -0.1rem -0.4rem; }
.er:hover, .er.pin { box-shadow: 0 0 0 2px #fff; }
.fz { position: absolute; left: calc(var(--x, 0) * 100%); top: 50%; width: 1.15rem; height: 1.15rem; margin: 0; padding: 0; border: 2px dashed #fff; border-radius: 50%; background: transparent; transform: translate(-50%, -50%); z-index: 4; }
.fz::after { content: ""; position: absolute; inset: -0.2rem; border-radius: 50%; }
.fz:hover, .fz.pin { background: rgba(255, 255, 255, 0.25); }

/* ---------- measure 4: the cost ---------- */
.crow .track { height: 1.7rem; }
.bar { position: absolute; top: 8%; height: 84%; left: 0; width: calc(var(--w, 0) * 100%); min-width: 2px; margin: 0; padding: 0; border: 0; border-radius: 0; z-index: 1; }
.bar::after { content: ""; position: absolute; inset: -0.25rem -0.4rem; }
.bar.g3 { background: var(--c-g); }
.bar.post { background: var(--c-as); }
.bar.miss { background: repeating-linear-gradient(135deg, var(--c-rose) 0 4px, rgba(251, 113, 133, 0.45) 4px 8px); border: 1px solid var(--c-rose); }

/* ---------- the plain tables, shown without script ---------- */
.plain { padding: 0.2rem 0; font-size: 0.95rem; }
.plain table { width: 100%; border-collapse: collapse; margin: 0.3rem 0 0.8rem; table-layout: fixed; }
.plain caption { padding: 0.3rem 0; text-align: left; font-weight: 700; }
.plain th, .plain td { padding: 0.3rem 0.3rem; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; overflow-wrap: anywhere; font-size: 0.875rem; }
.plain th { color: var(--mute); font-weight: 600; }
.plain p { margin: 0.3rem 0; }
html:not(.js) .tabs { display: none; }

/* ---------- very narrow screens: the title leaves the frame (it stays for screen readers) so the panels fit ---------- */
@media (max-width: 329px) {
  h1 { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
  .stage { padding: 0.45rem 0.55rem 0.4rem; gap: 0.3rem; }
  .vbtn, .pbtn { padding: 0 0.1rem; }
}

/* ---------- wide frame: 53rem by 42.4rem composition (5:4) ---------- */
@media (min-aspect-ratio: 21/20) {
  :root { --lab: 17rem; --bh: 1.1rem; --th: 10px; }
  .src, .tipping .src, .btn, .tk-close, .tip, .scrub-l, .when { font-size: 0.875rem; }
  h1 { font-size: 1.2rem; }
  .tabs { grid-template-columns: repeat(4, 9rem); gap: 0.5rem; }
  .ph { font-size: 1.05rem; }
  .tip { width: 30rem; }
  .wgroup { grid-template-columns: repeat(4, 7.5rem); }
  .wctl { flex-direction: column; gap: 0.25rem; }
  .wctl .prow2 { flex-direction: row; align-items: center; gap: 0.6rem; }
  .wctl .pl { width: 4.2rem; flex: none; }
  .pbtn { white-space: nowrap; }
  .wctl .scrub { margin: 0; grid-template-columns: 4.8rem minmax(0, 20rem) 1fr; align-items: start; }
  .wctl .scrub-l { padding-top: 0.2rem; }
  .wctl .when { grid-column: auto; padding-top: 0.2rem; }
  .erow, .crow, .wrow, .rrow { display: grid; grid-template-columns: var(--lab) minmax(0, 1fr); align-items: center; min-height: 1.7rem; margin-top: 0.1rem; }
  .wrow { --lab: 9.5rem; }
  .rrow { --lab: 19rem; min-height: 1.55rem; }
  .rrow .rl { white-space: nowrap; align-items: center; }
  .rrow .rl .kg { margin-top: 0; }
  .rl { flex-direction: row; padding-right: 0.3rem; }
  .erow .rl, .crow .rl { flex-direction: column; gap: 0; }
  .erow .track, .crow .track, .wrow .track, .rrow .track { margin-top: 0; margin-left: 0.3rem; }
  .tkbox, .tkbox + *, .ticks { margin-top: 0.1rem; }
  .vmargins .tkbox { height: 1.25rem; }
  .vindex .ticks, .varena .ticks, .vcost .ticks { margin-left: calc(var(--lab) + 0.3rem + var(--ins)); }
  .vindex .ticks { margin-left: calc(9.5rem + 0.3rem + var(--ins)); }
  .vindex .rkbox .ticks { margin-left: calc(19rem + 0.3rem + var(--ins)); }
  .rkbox { margin-top: 0.3rem; padding-top: 0.3rem; }
  .wctl { margin-top: 0.3rem; }
  .rosechip { margin-top: 0.3rem; }
}
