/* RootCause replay site. Colour tokens first, then page furniture, then the scoreboard. */

:root {
  --paper: #EDF0F2;
  --ink: #16263A;
  --muted: #5B6B7D;
  --cause: #2350C8;
  --hit: #0B7A62;         /* "correct" text */
  --miss: #B0283F;        /* "wrong" text */
  --hit-fill: #0B7A62;    /* tile behind a white glyph */
  --miss-fill: #B0283F;
  --trace: #C47A12;
  --hairline: #C5CED7;   /* row separators: navy ink thinned against the paper */
  --wash: #F7F9FA;       /* row hover: lighter than the paper, so muted text keeps AA contrast */
  /* chart series: hue is the model (the rule is ink); fill is the toolset (v1 filled, v0 hollow) */
  --gemini: #B5620E;
  --nemotron: #6A4BC4;
  --glm: #1E7F84;

  --display: "Archivo", "Arial Narrow", system-ui, sans-serif;
  --body: "Atkinson Hyperlegible", system-ui, sans-serif;
  --glyph: "Archivo", "Segoe UI Symbol", "Apple Symbols", "DejaVu Sans", sans-serif;

  --gutter: clamp(16px, 4vw, 48px);
  --measure: 68ch;
  color-scheme: light;
}

/* Dark: the same navy-and-paper scheme inverted. Text and series colours lighten for contrast on the dark paper; tile
   fills keep their depth so the white glyphs stay readable. */
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #111A24;
    --ink: #E3E9EF;
    --muted: #98A6B5;
    --cause: #8DB0FF;
    --hit: #45C9A0;
    --miss: #FF7D90;
    --hit-fill: #0B7A62;
    --miss-fill: #B0283F;
    --trace: #E8A23A;
    --hairline: #2C3A4A;
    --wash: #1A2532;
    --gemini: #F0A04B;
    --nemotron: #B4A0FF;
    --glm: #5CCDD1;
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1.0625rem/1.55 var(--body);
  overflow-wrap: break-word;
}

a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

code { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: 0.9em; }

h1, h2, h3 { font-family: var(--display); font-weight: 700; margin: 0; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------------------------------------------------------------- page furniture */

.masthead, main, .colophon {
  max-width: 76rem;
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip { position: absolute; left: -999px; }
.skip:focus { left: var(--gutter); top: 0.75rem; z-index: 10; padding: 0.5rem 0.75rem; background: var(--ink); color: var(--paper); }

.masthead {
  display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0.5rem 1.5rem;
  padding-block: 1.1rem 0.9rem;
}
.wordmark { font: 800 1.125rem/1 var(--display); font-stretch: 75%; letter-spacing: 0.01em; text-decoration: none; }
.masthead nav { display: flex; flex-wrap: wrap; gap: 0.25rem 1.25rem; font-size: 0.9375rem; }
.masthead nav a { color: var(--muted); text-decoration: none; }
.masthead nav a:hover { color: var(--ink); text-decoration: underline; }

.hero { padding-block: clamp(2.5rem, 7vw, 5rem) 0; }
.hero h1 {
  font-size: clamp(1.6rem, 1rem + 2.4vw, 2.4rem);
  line-height: 1.1; letter-spacing: -0.01em; font-stretch: 92%; font-weight: 650;
  max-width: 24em; text-wrap: balance;
}
/* the answer is the loudest type on the site: the question asked, then this */
.answer-line {
  margin: 0.4rem 0 0;
  font: 800 clamp(2.75rem, 1.5rem + 5.5vw, 5rem)/0.95 var(--display); font-stretch: 72%; letter-spacing: -0.015em;
}
.lede { max-width: 62ch; margin: 1.5rem 0 0; font-size: 1.125rem; line-height: 1.55; }
#hero-plot { margin-top: 2.25rem; max-width: 64rem; }
#findings-plot { margin-top: 1.75rem; max-width: 64rem; }

main > section + section { margin-top: clamp(4rem, 9vw, 6.5rem); }
main > section:not(.hero) > h2 {
  border-top: 3px solid var(--ink);
  padding-top: 0.75rem;
  font-size: clamp(1.5rem, 1.2rem + 1vw, 1.875rem); line-height: 1.15; font-stretch: 90%;
}
.section-lede { max-width: 62ch; margin: 0.6rem 0 0; color: var(--muted); }

.prose li + li { margin-top: 0.75rem; }
.two-col { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.5rem clamp(2rem, 5vw, 4rem); margin-top: 1.25rem; }
.two-col > div { max-width: 60ch; }
.two-col h3 { font-size: 1.125rem; line-height: 1.3; }
.steps { padding-left: 1.75rem; margin: 0.75rem 0 0; }
.steps li { padding-left: 0.25rem; }
.steps li::marker { font: 700 1rem var(--display); }
.limits { padding-left: 1.25rem; margin: 0.75rem 0 0; }
.limits li::marker { color: var(--muted); }

.commands {
  margin: 1.25rem 0 0; padding: 0.9rem 1.1rem; max-width: 36rem; overflow-x: auto;
  background: var(--wash); border-left: 3px solid var(--ink);
  font: 0.9375rem/1.65 ui-monospace, "Cascadia Mono", Consolas, monospace;
}

figure { margin: 0; }
figcaption { margin-top: 0.85rem; color: var(--muted); font-size: 0.9375rem; line-height: 1.5; max-width: 66ch; }

/* ---------------------------------------------------------------- charts

   Forest and dot plots are HTML rows: a label column and a track where marks sit at percentage positions, so they stay
   crisp and readable at any width. The coverage chart is an SVG that scales as a whole. */

.dot {
  display: inline-block; flex: none; width: 0.85rem; height: 0.85rem; border-radius: 50%;
  border: 2px solid currentColor; background: currentColor;
}
.dot.t-v0 { background: var(--paper); }                 /* naive tools: hollow */
.dot.t-rule { border-radius: 2px; }                      /* the rule: a square */
.m-rule { color: var(--ink); }
.m-gemini { color: var(--gemini); }
.m-nemotron { color: var(--nemotron); }
.m-glm { color: var(--glm); }
.m-other { color: var(--muted); }

.f-rows { list-style: none; margin: 0; padding: 0; }
.f-row, .f-axis, .f-scale {
  display: grid; grid-template-columns: minmax(10rem, 19rem) minmax(0, 1fr); column-gap: clamp(1rem, 3vw, 2rem);
  align-items: center;
}
.f-row { padding-block: 0.6rem; border-bottom: 1px solid var(--hairline); }
.f-label { position: relative; padding-left: 1.5rem; min-width: 0; }
.f-label > .dot { position: absolute; left: 0; top: 0.3rem; }
.f-name { display: block; font: 700 1.0625rem/1.25 var(--display); font-stretch: 90%; }
.f-sub { display: block; color: var(--muted); font-size: 0.875rem; line-height: 1.35; }

.f-track { position: relative; height: 1.75rem; }
.f-zero { position: absolute; top: -0.6rem; bottom: -0.6rem; left: 50%; border-left: 2px solid var(--ink); }
.f-int { position: absolute; inset: 0; }
.f-bar { position: absolute; top: 50%; height: 4px; transform: translateY(-50%); border-radius: 2px; background: currentColor; }
.f-dot { position: absolute; top: 50%; transform: translate(-50%, -50%); }

.f-track.double { height: 2.6rem; }
.f-track.double .f-int { bottom: 50%; }
.f-track.double .f-int.ctl { top: 50%; bottom: 0; }
.f-int.ctl .f-bar { height: 2px; opacity: 0.6; }
.f-int.ctl .f-dot { width: 0.6rem; height: 0.6rem; border-width: 1.5px; }

.f-axis { margin-top: 0.35rem; }
.f-axis .f-track { height: 1.25rem; }
.f-tick {
  position: absolute; top: 0; transform: translateX(-50%);
  font: 0.8125rem/1 var(--display); font-stretch: 85%; font-variant-numeric: tabular-nums; color: var(--muted);
}
.f-tick.zero { color: var(--ink); font-weight: 700; }
.f-scale { margin-bottom: 0.25rem; }
.f-ends { display: flex; justify-content: space-between; color: var(--muted); font-size: 0.875rem; }

.f-group {
  padding: 1.5rem 0 0.4rem; border-bottom: 1px solid var(--ink);
  font: 700 1rem/1.2 var(--display); font-stretch: 90%;
}
.f-group:first-child { padding-top: 0.5rem; }

/* the hero plot is the one place the site raises its voice: thicker marks, larger names */
.hero-plot .f-row { padding-block: 0.85rem; }
.hero-plot .f-name { font-size: 1.25rem; }
.hero-plot .f-track { height: 2.25rem; }
.hero-plot .f-bar { height: 6px; border-radius: 3px; }
.hero-plot .f-dot { width: 1.15rem; height: 1.15rem; border-width: 3px; }
.hero-plot .f-label > .dot { top: 0.4rem; }

.key { display: inline-flex; align-items: center; gap: 0.4rem; margin: 0 1.1rem 0.35rem 0; color: var(--ink); }
.key-bar { display: inline-block; width: 1.5rem; height: 4px; border-radius: 2px; background: var(--muted); }
.key-bar.ctl { height: 2px; opacity: 0.6; }
.keys { display: flex; flex-wrap: wrap; margin-bottom: 0.35rem; }

.dotplot .f-row, .dotplot .f-axis { grid-template-columns: minmax(8rem, 15rem) minmax(0, 1fr); }
.dotplot .f-label { padding-left: 0; }
.dotplot .f-track { height: 2.4rem; }
.dotplot .f-dot.lane-0 { top: 18%; }
.dotplot .f-dot.lane-1 { top: 34%; }
.dotplot .f-dot.lane-2 { top: 50%; }
.dotplot .f-dot.lane-3 { top: 66%; }
.dotplot .f-dot.lane-4 { top: 82%; }
.dotplot .f-dot.lane-5 { top: 50%; }
.f-grid { position: absolute; top: 0; bottom: 0; border-left: 1px dashed var(--hairline); }
.dotplot .f-row.total { border-top: 2px solid var(--ink); }
.dotplot .f-row.total .f-name { font-size: 1.125rem; }

.chart-pair { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 2rem clamp(2rem, 5vw, 4rem); margin-top: 1.25rem; align-items: start; }
.chart-title { font-size: 1.0625rem; line-height: 1.3; margin-bottom: 0.5rem; }

.cov { display: block; width: 100%; height: auto; }
.cov-grid { stroke: var(--hairline); stroke-width: 1; }
.cov-tick { fill: var(--muted); font: 13px var(--display); font-stretch: 85%; }
.cov-line { fill: none; stroke: currentColor; stroke-width: 2.5; stroke-linejoin: round; }
.cov-pt { fill: currentColor; stroke: currentColor; stroke-width: 2; }
.cov-pt.t-v0 { fill: var(--paper); }

.status { color: var(--ink); max-width: var(--measure); }

.colophon {
  margin-top: clamp(4rem, 9vw, 6rem);
  padding-block: 1rem 2.5rem;
  color: var(--muted);
  font-size: 0.9375rem;
}
.colophon p { margin: 0; border-top: 1px solid var(--ink); padding-top: 0.75rem; }

/* ---------------------------------------------------------------- scoreboard */

.board-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 2rem; margin: 1.25rem 0 0.75rem; }
.seg { display: inline-flex; border: 1px solid var(--ink); border-radius: 6px; overflow: hidden; }
.seg button {
  font: 700 0.9375rem/1.2 var(--display); font-stretch: 90%;
  padding: 0.5rem 0.85rem; border: 0; background: transparent; color: var(--ink); cursor: pointer;
}
.seg button + button { border-left: 1px solid var(--ink); }
.seg button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.partial-note { max-width: 70ch; margin: 0 0 1rem; }

.legend {
  display: flex; flex-wrap: wrap; gap: 0.5rem 1.25rem;
  margin: 0; padding: 0; list-style: none;
  color: var(--muted); font-size: 0.9375rem;
}
.legend li { display: inline-flex; align-items: center; gap: 0.4rem; }
.legend .tile { width: 1.25rem; height: 1.25rem; font-size: 0.8125rem; }

.table-scroll { overflow-x: auto; max-width: 100%; }

.scoreboard {
  width: 100%;
  border-collapse: separate;   /* separate, so borders travel with the sticky first column */
  border-spacing: 0;
  border-top: 3px solid var(--ink);
  font-family: var(--display);
  font-stretch: 82%;
  font-variant-numeric: tabular-nums;
  text-align: left;
}
.scoreboard th, .scoreboard td { padding: 0.6rem 1rem 0.6rem 0; vertical-align: top; }
.scoreboard th:first-child { padding-left: 4px; }
.scoreboard td:last-child, .scoreboard th:last-child { padding-right: 0; }

.scoreboard thead th {
  padding-block: 0.75rem;
  border-bottom: 1px solid var(--ink);
  font-weight: 700; font-size: 1rem; vertical-align: bottom;
}
.scoreboard .sub {
  display: block;
  font-family: var(--body); font-stretch: normal; font-weight: 400;
  font-size: 0.8125rem; color: var(--muted); line-height: 1.3;
}

/* the first column stays put while the runs scroll sideways */
.scoreboard th.incident {
  position: sticky; left: 0; z-index: 1;
  background: var(--paper);
  min-width: 15rem; width: 45%;
}
/* solver columns hug their run strips, so each accuracy figure sits under its own strip */
.scoreboard th.solver, .scoreboard td.runs, .scoreboard td.num { width: 1%; min-width: 7.5rem; }
.scoreboard th.solver { font-size: 1.1875rem; font-weight: 750; font-stretch: 90%; }

.group th {
  padding-top: 2rem; padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--ink);
  font-size: 1.1875rem; font-weight: 750; font-stretch: 100%;
}
.group-label { position: sticky; left: 0; display: inline-block; }
.group .sub { display: inline; margin-left: 0.6rem; }
tbody:first-of-type .group th { padding-top: 1rem; }

.incident-row th, .incident-row td { border-bottom: 1px solid var(--hairline); }
.incident-row:hover th, .incident-row:hover td { background: var(--wash); }
.incident-row th.incident { font-weight: 600; font-size: 1.0625rem; }
.incident-row th a { text-decoration-color: var(--hairline); }
.incident-row th a:hover { text-decoration-color: currentColor; }
.heldout {
  margin-left: 0.5rem;
  font-family: var(--body); font-stretch: normal; font-weight: 400; font-style: italic;
  font-size: 0.875rem; color: var(--muted); white-space: nowrap;
}
.alert {
  display: block; max-width: 40ch; margin-top: 0.15rem;
  font-family: var(--body); font-stretch: normal; font-weight: 400;
  font-size: 0.875rem; line-height: 1.4; color: var(--muted);
}

.truth { min-width: 9rem; font-size: 0.9375rem; }
.cause { display: block; }
.svc { color: var(--cause); font-weight: 650; }
.ftype, .none { color: var(--muted); }

.runs { white-space: nowrap; }
.strip { display: inline-flex; gap: 3px; }
.tile {
  display: inline-grid; place-items: center;
  width: 1.75rem; height: 1.75rem;
  font: 700 1.0625rem/1 var(--glyph);
  color: #fff;
}
a.tile { text-decoration: none; }
a.tile:hover { outline: 2px solid var(--ink); outline-offset: 1px; }
a.tile:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }
.tile.hit { background: var(--hit-fill); }
.tile.miss { background: var(--miss-fill); }
.tile.part { background: linear-gradient(135deg, var(--hit-fill) 50%, var(--miss-fill) 50%); }
.tile.empty { border: 1px dashed var(--muted); }

.num { text-align: right; }
.acc-row th, .acc-row td { padding-top: 0.7rem; padding-bottom: 0.9rem; vertical-align: baseline; }
.acc-row th.incident { font-weight: 600; font-size: 0.9375rem; color: var(--muted); }
.acc { display: block; font-size: 1.375rem; font-weight: 750; font-stretch: 90%; line-height: 1.1; }
.acc-detail, .acc-none {
  display: block; white-space: nowrap;
  font-family: var(--body); font-stretch: normal; font-size: 0.8125rem; color: var(--muted);
}

tfoot .total th, tfoot .total td { border-top: 3px solid var(--ink); padding-top: 0.9rem; }
tfoot .total th.incident { color: var(--ink); font-size: 1.0625rem; }
tfoot .total .acc { font-size: 1.75rem; }

/* ---------------------------------------------------------------- narrow screens */

@media (max-width: 800px) {
  .chart-pair, .two-col { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  .lede { font-size: 1.0625rem; }
  /* forest rows stack: the label over its track */
  .f-row, .f-axis, .f-scale, .dotplot .f-row, .dotplot .f-axis { grid-template-columns: minmax(0, 1fr); row-gap: 0.35rem; }
  .f-axis .f-axis-pad, .f-scale .f-axis-pad { display: none; }
  .masthead nav { gap: 0.25rem 0.9rem; font-size: 0.875rem; }
  .scoreboard th, .scoreboard td { padding-right: 0.75rem; }
  .scoreboard th.incident { min-width: 0; width: 9.5rem; max-width: 9.5rem; padding-right: 0.6rem; border-right: 1px solid var(--hairline); }
  .incident-row th.incident { font-size: 0.9375rem; }
  .alert { display: none; }           /* the alert is on the incident page; here the column must stay narrow */
  .heldout { display: block; margin: 0.1rem 0 0; }
  .group .sub { display: block; margin: 0.15rem 0 0; white-space: normal; max-width: calc(100vw - 2 * var(--gutter)); }
}

/* ---------------------------------------------------------------- incident replay */

.incident-head { padding-block: clamp(2rem, 5vw, 3.5rem) 1.5rem; max-width: var(--measure); }
.incident-head h1 {
  font-size: clamp(1.75rem, 1.1rem + 2.6vw, 2.6rem);
  line-height: 1.08; letter-spacing: -0.01em; font-stretch: 88%;
}
.incident-meta { margin: 0.5rem 0 0; color: var(--muted); }
.incident-meta .heldout { display: block; margin: 0.15rem 0 0; font-size: 1rem; white-space: normal; }

.alert-quote { margin: 1.75rem 0 0; }
.alert-quote blockquote { margin: 0; padding-left: 1.25rem; border-left: 3px solid var(--ink); }
.alert-quote blockquote p {
  margin: 0; font: 600 clamp(1.3rem, 1rem + 1.2vw, 1.75rem)/1.3 var(--display); font-stretch: 95%;
  text-wrap: balance;
}
.alert-quote figcaption { margin: 0.5rem 0 0 1.25rem; color: var(--muted); font-size: 0.9375rem; }

.every-solver { margin: 1.75rem 0 1.25rem; }
main > section.every-solver > h2 { border-top: 1px solid var(--hairline); padding-top: 0.75rem; font-size: 1.0625rem; line-height: 1.3; font-stretch: 100%; }
.solver-strips {
  list-style: none; margin: 0.5rem 0 0; padding: 0;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(18rem, 1fr)); column-gap: 2rem;
}
.solver-strips li {
  display: flex; align-items: center; justify-content: space-between; gap: 0.75rem;
  padding: 0.35rem 0; border-bottom: 1px solid var(--hairline);
}
.solver-strips .who { font: 600 0.9375rem/1.3 var(--display); font-stretch: 90%; }
.solver-strips li.current { box-shadow: inset 3px 0 0 var(--ink); padding-left: 0.6rem; }
.solver-strips li.current .who { font-weight: 800; }
.solver-strips .tile { width: 1.35rem; height: 1.35rem; font-size: 0.875rem; }

/* pickers and the replay control: the only rounded things on the site */
.controls {
  display: flex; flex-wrap: wrap; align-items: end; gap: 0.75rem 1.25rem;
  padding-block: 1rem; border-block: 1px solid var(--ink);
}
.pick { display: grid; gap: 0.2rem; }
.pick label { font-size: 0.875rem; color: var(--muted); }
.pick select {
  font: 600 1rem/1.2 var(--body); color: var(--ink);
  background: var(--wash); border: 1px solid var(--ink); border-radius: 6px;
  padding: 0.45rem 0.6rem; min-width: 9rem;
}
.replay-buttons { display: flex; gap: 0.5rem; }
.replay-buttons button {
  font: 700 1rem/1.2 var(--display); font-stretch: 90%;
  padding: 0.5rem 1rem; border: 1px solid var(--ink); background: transparent; color: var(--ink); cursor: pointer;
}
.replay-buttons button.primary { background: var(--ink); color: var(--paper); }
.replay-buttons button:hover { text-decoration: underline; text-underline-offset: 0.2em; }
.replay-status { margin: 0; min-height: 1.5em; color: var(--muted); font-size: 0.9375rem; font-variant-numeric: tabular-nums; flex-basis: 100%; }
.replay-status:empty { min-height: 0; }  /* stays rendered: a live region added on first use is often not announced */

.replay-body { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2.5rem; padding-top: 2rem; }

.investigation h2, .verdict h2 { font-size: 1.5rem; line-height: 1.2; }
.note { margin: 0.35rem 0 0; color: var(--muted); font-size: 0.875rem; line-height: 1.45; }

.timeline { margin: 1.25rem 0 0; padding-left: 2.25rem; }
.step { padding: 0.9rem 0 1.1rem 0.25rem; border-top: 1px solid var(--hairline); }
.step::marker { font: 700 1rem var(--display); font-variant-numeric: tabular-nums; }
.call { margin: 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.15rem 0.75rem; }
.call .tool { font: 700 1.0625rem/1.3 var(--display); font-stretch: 90%; }
.call .args { color: var(--muted); font-size: 0.8125rem; overflow-wrap: anywhere; }
.output { margin-top: 0.6rem; min-width: 0; }
.out-line { margin: 0; font-size: 0.9375rem; }

.out-pre {
  margin: 0.4rem 0 0; padding: 0.6rem 0.75rem; max-height: 18rem; overflow: auto;
  background: var(--wash); border-left: 2px solid var(--hairline);
  font: 0.8125rem/1.5 ui-monospace, "Cascadia Mono", Consolas, monospace;
  white-space: pre-wrap; overflow-wrap: anywhere;
}

.out {
  border-collapse: collapse; margin-top: 0.4rem; min-width: 100%;
  font-family: var(--display); font-stretch: 82%; font-variant-numeric: tabular-nums;
  font-size: 0.9375rem; text-align: left;
}
.out th, .out td { padding: 0.3rem 0.9rem 0.3rem 0; vertical-align: top; }
.out th:last-child, .out td:last-child { padding-right: 0; }
.out th { font-weight: 700; border-bottom: 1px solid var(--ink); white-space: nowrap; }
.out td { border-bottom: 1px solid var(--hairline); }
.out .num { text-align: right; white-space: nowrap; }
.out .msg { display: block; color: var(--muted); font-family: var(--body); font-stretch: normal; font-size: 0.8125rem; }
.out code { font-size: 0.8125rem; color: var(--muted); }

.facts { margin: 0; display: grid; gap: 0.2rem; font-size: 0.9375rem; }
.facts div { display: grid; grid-template-columns: 8.5rem 1fr; gap: 0.75rem; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; overflow-wrap: anywhere; }

.good { color: var(--hit); }
.bad { color: var(--miss); }

/* sparkline: the line in ink, the after-the-alert region tinted amber */
.spark-fig {
  margin: 0.4rem 0 0; display: grid; grid-template-columns: minmax(0, 1fr) 6rem; column-gap: 0.6rem;
}
.spark { display: block; width: 100%; height: 48px; border-bottom: 1px solid var(--hairline); }
.spark-after { fill: var(--trace); opacity: 0.16; }
.spark-alert { stroke: var(--trace); stroke-width: 1.5; }
.spark-line { fill: none; stroke: var(--ink); stroke-width: 1.75; stroke-linejoin: round; }
.spark-range {
  display: flex; flex-direction: column; justify-content: space-between;
  font: 0.8125rem/1 var(--display); font-stretch: 82%; font-variant-numeric: tabular-nums; color: var(--muted);
}
.spark-axis {
  position: relative; display: flex; justify-content: space-between; margin-top: 0.25rem; max-width: none;
  font-size: 0.8125rem; color: var(--muted); font-variant-numeric: tabular-nums;
}
.spark-zero { position: absolute; top: 0; transform: translateX(-100%); padding-right: 0.3rem; color: var(--ink); }  /* ends at the rule, clear of the end label */
.spark-fig > .note { grid-column: 1 / -1; margin: 0.25rem 0 0; }  /* "No points after ..." spans the figure, under the axis */

/* verdict */
.verdict { min-width: 0; }
.result { margin: 0.5rem 0 0; font: 750 1.25rem/1.2 var(--display); font-stretch: 90%; }
.result.big { font-size: 2.25rem; letter-spacing: -0.01em; }
.result.hit { color: var(--hit); }
.result.miss { color: var(--miss); }
.result.part { color: var(--ink); }
.problem { margin: 0.75rem 0 0; padding-left: 0.75rem; border-left: 3px solid var(--miss); }

.verdict-facts { margin: 1rem 0 0; }
.verdict-facts > div { padding-block: 0.6rem; border-top: 1px solid var(--hairline); }
.verdict-facts dt { color: var(--muted); font-size: 0.875rem; }
.verdict-facts dd { margin: 0.15rem 0 0; }
.said { margin: 0; }
.ranked, .truth-list { margin: 0; padding-left: 1.4rem; }
.truth-list { list-style: none; padding-left: 0; }
.ranked li::marker { font-family: var(--display); color: var(--muted); }
.svc-other { font-weight: 650; }
.verdict .good { font-weight: 700; }

.rule, .evidence { margin-top: 1.5rem; padding-top: 0.75rem; border-top: 1px solid var(--ink); }
.rule h3, .evidence h3 { font-size: 1.0625rem; line-height: 1.3; }
.rule .result { margin-top: 0.35rem; }
.rule .ranked { margin-top: 0.35rem; }

.evidence-list { margin: 0.5rem 0 0; padding: 0; list-style: none; }
.evidence-list li { padding-block: 0.5rem; border-bottom: 1px solid var(--hairline); font-size: 0.9375rem; line-height: 1.45; }
.evidence-list .claim { display: block; overflow-wrap: anywhere; }
.badges { display: flex; flex-wrap: wrap; gap: 0.25rem 0.9rem; margin-top: 0.2rem; }
.badge { font: 650 0.8125rem/1.3 var(--display); font-stretch: 85%; }
.badge.unchecked { color: var(--muted); font-weight: 500; }

/* replay animation */
.pending { visibility: hidden; }
.revealed { animation: reveal 280ms ease-out; }
@keyframes reveal { from { opacity: 0; transform: translateY(4px); } }
@media (prefers-reduced-motion: reduce) {
  .revealed { animation: none; }
}

@media (min-width: 900px) {
  .replay-body { grid-template-columns: minmax(0, 72ch) minmax(17rem, 1fr); column-gap: clamp(2rem, 4vw, 4rem); align-items: start; }
  .investigation { grid-column: 1; grid-row: 1; }
  .verdict {
    grid-column: 2; grid-row: 1;
    position: sticky; top: 1rem; max-height: calc(100vh - 2rem); overflow-y: auto; scrollbar-width: thin;
  }
}

@media (max-width: 600px) {
  .timeline { padding-left: 1.75rem; }
  .facts div { grid-template-columns: 6.5rem 1fr; gap: 0.5rem; }
  .result.big { font-size: 1.875rem; }
  .pick { flex: 1 1 8rem; }
  .pick select { width: 100%; min-width: 0; }
}

/* many solvers: smaller tiles and narrower columns so the whole scoreboard fits the page */
.scoreboard.dense th.incident { min-width: 12rem; width: 30%; }
.scoreboard.dense .truth { min-width: 7rem; }
.scoreboard.dense th.solver, .scoreboard.dense td.runs, .scoreboard.dense td.num { min-width: 6.25rem; }
.scoreboard.dense th.solver { font-size: 1rem; }
.scoreboard.dense .strip { gap: 2px; }
.scoreboard.dense .tile { width: 1.15rem; height: 1.15rem; font-size: 0.75rem; }
/* the scoreboard page is wider than the reading pages; its prose keeps its own measure */
body[data-page="index"] main, body[data-page="index"] .masthead, body[data-page="index"] .colophon { max-width: 92rem; }

/* ---------------------------------------------------------------- share card (card.html, 1280x640) */

body.card { width: 1280px; height: 640px; overflow: hidden; }
body.card main { max-width: none; padding: 44px 64px 0; }
.card-mark { margin: 0; font: 800 1.25rem/1 var(--display); font-stretch: 75%; color: var(--muted); }
body.card h1 { margin-top: 22px; font-size: 2.1rem; line-height: 1.1; font-stretch: 92%; font-weight: 650; max-width: 30em; }
body.card .answer-line { font-size: 4.5rem; margin-top: 4px; }
body.card #hero-plot { margin-top: 20px; max-width: none; }
body.card .hero-plot .f-row { padding-block: 0.7rem; }
body.card .hero-plot .f-name { font-size: 1.375rem; }
body.card .hero-plot figcaption { display: none; }
.card-foot { position: absolute; left: 64px; bottom: 28px; margin: 0; color: var(--muted); font-size: 1.0625rem; }
