/* 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. Five steps on one DOM, one shown at a time behind five tabs: what the
   hardware sentence allows (bars on a linear axis), the check from parameters and tokens (bars and four timing chips), the EU line
   (markers on a logarithmic axis), the 4.2 to 12.3 times claim (markers on a logarithmic axis with the gap shaded) and the ruler
   that moved (percentage bars). Every bar and marker is a real button. Bars start at zero. Colours: cyan for a figure derived from
   the note's statements, indigo for a value read from the figures the lab note's page embeds, amber for the set Microsoft built,
   grey and white rings for the reference models, rose only for the EU line, the gap and a Not stated line. */
:root { --c-nv: #22d3ee; --c-aa: #8b85ff; --c-gr: #94a3b8; --c-am: #fbbf24; --c-ro: #fb7185; --bh: 1.4rem; --ins: 0.9rem; --lab: 0rem; }
.tip { bottom: auto; }
@media not all and (min-aspect-ratio: 21/20) { .tip { max-height: 80%; } }
h1 { font-size: 1.05rem; }

/* ---------- tabs and toggles ---------- */
.tabs { display: grid; grid-template-columns: repeat(3, 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; }
.opts { display: flex; flex-direction: column; gap: 0.35rem; flex: none; }
.opts[hidden] { display: none; }
.og { display: flex; flex-direction: column; gap: 0.15rem; min-width: 0; }
.pl { font-size: 0.875rem; line-height: 1.2; color: var(--mute); }
.pgroup { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.35rem; min-width: 0; }
.pbtn { min-width: 0; padding: 0 0.3rem; line-height: 1.15; }

/* ---------- panels ---------- */
.chart { flex: none; }
.panel { display: none; min-width: 0; }
.stage[data-view="compute"] .vcompute, .stage[data-view="tokens"] .vtokens, .stage[data-view="eu"] .veu, .stage[data-view="claim"] .vclaim, .stage[data-view="ruler"] .vruler { 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; }
.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; }
.axt { margin: 0.3rem 0 0; font-size: 0.875rem; line-height: 1.25; color: var(--mute); }
.gh { margin: 0.35rem 0 0; font-size: 0.875rem; line-height: 1.3; font-weight: 700; color: #fff; }
.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.nv { background: var(--c-nv); }
.kg.aa { background: var(--c-aa); }
.kg.circle { border-radius: 50%; background: var(--c-aa); }
.kg.dia { transform: rotate(45deg) scale(0.82); }
.kg.dia.am { background: var(--c-am); }
.kg.dia.nv { background: var(--c-nv); }
.kg.ring { border-radius: 50%; border: 3px solid #fff; }
.kg.eul { height: 0; width: 1rem; border-top: 2px dashed var(--c-ro); }

/* ---------- axis, rows and tracks ---------- */
.ticks { position: relative; height: 1.25rem; margin: 0.05rem 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] { display: none; }
.euBtn { top: -0.05rem; padding: 0 0.35rem; border: 1px solid var(--c-ro); border-radius: 0.3rem; background: var(--bg); font-weight: 700; color: #fff; }
.euBtn::after { content: ""; position: absolute; inset: -0.3rem -0.4rem -0.2rem; }
.euBtn:hover, .euBtn.pin { box-shadow: 0 0 0 2px #fff; }
.grp { margin-top: 0.3rem; }
.row { display: block; margin-top: 0.3rem; }
.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; }
.rs { color: var(--mute); font-size: 0.875rem; line-height: 1.25; }
.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); }
.gl.eu { border-left: 2px dashed var(--c-ro); z-index: 2; }
.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: calc(var(--e, 0) * 100% - 0.3rem); transform: translate(-100%, -50%); }
.erow .vl, .krow .vl { left: calc(var(--e, 0) * 100% + 1rem); }
.erow .vl.lft, .krow .vl.lft { left: calc(var(--e, 0) * 100% - 1rem); transform: translate(-100%, -50%); }
.krow .vl.mid, .krow .vl.mid.lft { left: calc(var(--e, 0) * 100%); transform: translate(-50%, -50%); background: rgba(11, 23, 38, 0.95); border: 1px solid var(--c-ro); }
.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.c-nv { background: var(--c-nv); }
.bar.c-aa { background: var(--c-aa); }
.bar.faded { opacity: 0.4; }
.bar:hover, .bar.pin { box-shadow: 0 0 0 2px #fff; z-index: 3; opacity: 1; }

/* ---------- markers ---------- */
.pt { position: absolute; left: calc(var(--x, 0) * 100%); top: 50%; margin: 0; padding: 0; border: 0; background: none; transform: translate(-50%, -50%) rotate(var(--rot, 0deg)); z-index: 3; }
.pt::after { content: ""; position: absolute; inset: -0.3rem; }
.pt:hover, .pt.pin { box-shadow: 0 0 0 3px #fff; }
.pt.circle { width: 1rem; height: 1rem; border-radius: 50%; }
.pt.circle.big { width: 1.25rem; height: 1.25rem; }
.pt.ring { width: 1.15rem; height: 1.15rem; border-radius: 50%; background: none; border: 3px solid var(--tone); }
.pt.diamond { width: 0.95rem; height: 0.95rem; --rot: 45deg; }
.pt.t-nv { --tone: var(--c-nv); }
.pt.t-aa { --tone: var(--c-aa); }
.pt.t-am { --tone: var(--c-am); }
.pt.t-wh { --tone: #fff; }
.pt.t-gr { --tone: var(--c-gr); }
.pt.circle, .pt.diamond { background: var(--tone); }
.krow.two .pt.circle::after { inset: -0.2rem; }
.veu .track { height: 2rem; }
.vruler .row { margin-top: 0.1rem; }
.vruler .track { height: 1.25rem; }
.vruler .gh { margin-top: 0.25rem; }
.veu .gl, .vclaim .gl { top: -0.2rem; bottom: -0.2rem; }

/* ---------- the gap row and the zone ---------- */
.gz { position: absolute; top: -0.1rem; bottom: -0.1rem; left: calc(var(--x, 0) * 100%); width: calc(var(--w, 0) * 100%); background: rgba(251, 113, 133, 0.13); border-left: 1px dashed rgba(251, 113, 133, 0.7); border-right: 1px dashed rgba(251, 113, 133, 0.7); pointer-events: none; z-index: 0; }
.grow .track { height: 1.7rem; }
.brk { position: absolute; top: 50%; height: 0.7rem; margin-top: -0.35rem; left: calc(var(--x, 0) * 100%); width: calc(var(--w, 0) * 100%); border-left: 2px solid var(--c-ro); border-right: 2px solid var(--c-ro); background: linear-gradient(var(--c-ro), var(--c-ro)) center / 100% 2px no-repeat; z-index: 1; }
.gapbtn { position: relative; padding: 0.1rem 0.45rem; border: 1px solid var(--c-ro); border-radius: 0.3rem; background: var(--bg); font-size: 0.875rem; line-height: 1.25; font-weight: 700; color: #fff; text-align: left; }
.gapbtn::after { content: ""; position: absolute; inset: -0.3rem; }
.gapbtn:hover, .gapbtn.pin { box-shadow: 0 0 0 2px #fff; }

/* ---------- the timing chips ---------- */
.chips { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.35rem; margin-top: 0.25rem; }
.chip { display: flex; flex-direction: column; align-items: flex-start; gap: 0.05rem; min-width: 0; min-height: 2.6rem; padding: 0.25rem 0.5rem; border: 1px solid var(--c-nv); border-radius: 0.4rem; background: transparent; text-align: left; color: #fff; font-size: 0.875rem; line-height: 1.2; }
.chip#b-ck-steps { border-color: var(--c-aa); }
.chip:hover, .chip.pin { box-shadow: 0 0 0 2px #fff; }
.cn { color: var(--mute); }
.cv { font-weight: 700; overflow-wrap: anywhere; }

/* ---------- 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, html:not(.js) .opts { 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 { --bh: 1.35rem; }
  .src, .tipping .src, .btn, .tk-close, .tip { font-size: 0.875rem; }
  h1 { font-size: 1.2rem; }
  .tabs { grid-template-columns: repeat(5, 8.6rem); gap: 0.5rem; }
  .vbtn { white-space: nowrap; }
  .opts { flex-direction: column; align-items: flex-start; gap: 0.35rem; }
  .og { display: grid; grid-template-columns: 14rem auto; align-items: center; gap: 0.6rem; }
  .pl { white-space: nowrap; }
  .pgroup { grid-template-columns: repeat(2, 8.4rem); gap: 0.4rem; }
  .pbtn { white-space: nowrap; }
  .tip { width: 40rem; }
  .vcompute, .vtokens { --lab: 18rem; }
  .veu { --lab: 15rem; }
  .vclaim { --lab: 16rem; }
  .vruler { --lab: 18rem; }
  .row.brow { display: grid; grid-template-columns: var(--lab) minmax(0, 1fr); align-items: center; min-height: 1.7rem; margin-top: 0.08rem; }
  .rl { flex-direction: row; flex-wrap: nowrap; white-space: nowrap; padding-right: 0.3rem; gap: 0 0.5rem; }
  .vcompute .rl, .vtokens .rl, .veu .rl, .krow.two .rl { flex-direction: column; align-items: flex-start; gap: 0; }
  .vcompute .row.brow, .vtokens .row.brow { min-height: 3rem; margin-top: 0.25rem; }
  .veu .row.brow { min-height: 3rem; margin-top: 0; }
  .veu .track { height: 3rem; }
  .vclaim .track { height: 1.9rem; }
  .vclaim .row.brow { min-height: 1.9rem; margin-top: 0; }
  .vclaim .grow .track { height: 2rem; }
  .vclaim .krow.two .track { height: 2.2rem; }
  .row .track { margin-top: 0; margin-left: var(--ins); }
  .ticks { margin-left: calc(var(--lab) + var(--ins)); margin-right: var(--ins); }
  .vcompute .rn, .vcompute .rs, .vtokens .rn, .vtokens .rs, .veu .rn, .veu .rs { font-size: 0.95rem; }
  .vcompute .cap, .veu .cap { font-size: 1rem; margin-top: 0.5rem; }
  .vtokens .cap { font-size: 0.95rem; }
  .vcompute .row.brow, .veu .row.brow { min-height: 3.4rem; }
  .veu .track { height: 3.4rem; }
  .grp { margin-top: 0.2rem; }
  .gh { margin-top: 0.2rem; }
  .cap { margin-top: 0.25rem; }
  .chips { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.5rem; }
  .vtokens .chips { margin-top: 0.15rem; }
  .grow .track { height: 1.5rem; }
}
