/* Rerunner design system

   The idea is a printer's proof: the test impression you check before the
   full run. Four rules follow from it.
   1. Paper and ink. Colour appears only where it carries meaning: the four
      verdicts, and lines added or removed in a diff.
   2. Crop marks frame illustrations. Anything inside them is an example,
      not captured output, and its caption says so.
   3. A dashed outline means planned, not built.
   4. Headlines are set in a condensed grotesque, prose in a serif, literal
      evidence (files, commands, verdicts) in mono. */

:root {
  color-scheme: light dark;

  --paper: #f1f3f7;
  --sheet: #ffffff;
  --sheet-2: #f6f7fa;
  --ink: #161a2d;
  --ink-2: #474d66;
  --ink-3: #8a90a6;
  --rule: #d4d9e3;
  --rule-2: #b9c0ce;

  --pass: #17734a;
  --pass-bg: #e2f1e9;
  --regressed: #b42318;
  --regressed-bg: #fbe8e5;
  --improved: #2155c4;
  --improved-bg: #e5ecfa;
  --inconclusive: #855600;
  --inconclusive-bg: #f6eddb;

  --display: "Avenir Next Condensed", "Bahnschrift", "DejaVu Sans Condensed", "Roboto Condensed", "Arial Narrow", sans-serif;
  --sans: "Avenir Next", "Avenir", "Segoe UI", "Helvetica Neue", "Roboto", "Noto Sans", "Liberation Sans", sans-serif;
  --serif: "Charter", "Bitstream Charter", "Sitka Text", "Iowan Old Style", "Cambria", "Noto Serif", "Georgia", serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", "Segoe UI Mono", "JetBrains Mono", "Menlo", "Consolas", "Liberation Mono", monospace;

  --fs-xs: 0.8125rem;
  --fs-sm: 0.9375rem;
  --fs-body: 1.125rem;
  --fs-lede: 1.3125rem;
  --fs-h4: 1.1875rem;
  --fs-h3: 1.5rem;
  --fs-h2: clamp(1.875rem, 1.35rem + 1.7vw, 2.625rem);
  --fs-h1: clamp(2.5rem, 1.5rem + 3.6vw, 4.375rem);
  --fs-hero: clamp(2.75rem, 1.2rem + 4.2vw, 4.875rem);

  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px;
  --s7: 48px; --s8: 64px; --s9: 96px; --s10: 128px;

  --gutter: 24px;
  --measure: 38em;
  --crop: 14px;
  --radius: 6px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #11131d;
    --sheet: #191c29;
    --sheet-2: #1e2231;
    --ink: #e7e9f1;
    --ink-2: #a9aec2;
    --ink-3: #6f758c;
    --rule: #2b3042;
    --rule-2: #3d4359;

    --pass: #5cc893;
    --pass-bg: #15301f;
    --regressed: #ff8a7e;
    --regressed-bg: #3a1b1a;
    --improved: #8fb1ff;
    --improved-bg: #1a2545;
    --inconclusive: #e8b85a;
    --inconclusive-bg: #352a14;
  }
}

/* Base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 56px; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: var(--fs-body)/1.62 var(--serif);
  font-kerning: normal;
  font-variant-numeric: lining-nums proportional-nums;
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.18em; text-decoration-color: var(--ink-3); }
a:hover { text-decoration-color: currentColor; }
:focus-visible { outline: 2px solid var(--improved); outline-offset: 3px; border-radius: 2px; }
::selection { background: var(--improved-bg); }

h1, h2, h3, h4 {
  margin: 0;
  font-family: var(--display);
  font-stretch: condensed;
  font-weight: 600;
  line-height: 1.04;
  letter-spacing: -0.005em;
  text-wrap: balance;
}
h1 { font-size: var(--fs-h1); max-width: 15em; }
h2 { font-size: var(--fs-h2); max-width: 20em; }
h3 { font-size: var(--fs-h3); line-height: 1.12; }
h4 { font-size: var(--fs-h4); line-height: 1.2; }
p { margin: 0 0 1em; max-width: var(--measure); }
ul, ol { margin: 0 0 1em; padding-left: 1.2em; max-width: var(--measure); }
li { margin-bottom: 0.45em; }
li::marker { color: var(--ink-3); }
strong, b { font-weight: 700; }
small { font-size: var(--fs-sm); }
hr { border: 0; border-top: 1px solid var(--rule); margin: var(--s7) 0; }
code, pre, kbd, samp { font-family: var(--mono); font-variant-numeric: normal; }
code { font-size: 0.82em; padding: 0.08em 0.3em; border-radius: 3px; background: var(--sheet-2); box-shadow: inset 0 0 0 1px var(--rule); }
pre code, .bare code, h1 code, h2 code, h3 code { background: none; box-shadow: none; padding: 0; }
blockquote { margin: 0 0 1em; padding-left: var(--s5); border-left: 2px solid var(--ink); max-width: var(--measure); font-style: italic; }
abbr[title] { text-decoration: none; }

.sr {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}
.skip {
  position: absolute; left: 12px; top: -80px; z-index: 20;
  background: var(--ink); color: var(--paper);
  padding: 10px 16px; border-radius: var(--radius);
  font: 600 var(--fs-sm)/1 var(--sans); text-decoration: none;
}
.skip:focus { top: 12px; }

.wrap { width: 100%; max-width: 1200px; margin-inline: auto; padding-inline: var(--gutter); }
.ui { font-family: var(--sans); }
.muted { color: var(--ink-2); }
.small { font-family: var(--sans); font-size: var(--fs-sm); color: var(--ink-2); line-height: 1.5; }
.nowrap { white-space: nowrap; }

/* Brand mark: a registration target, the mark printers use to check that
   two impressions line up. */
.mark { width: 22px; height: 22px; flex: none; color: inherit; }

/* Header */
.site-head { border-bottom: 1px solid var(--rule); }
.head-row { display: flex; align-items: center; gap: var(--s5); min-height: 68px; }
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  font: 600 1.375rem/1 var(--display); font-stretch: condensed; letter-spacing: 0.005em;
  text-decoration: none; margin-right: auto;
}
.nav-inline { display: none; }
.nav-inline ul { display: flex; gap: 2px; list-style: none; margin: 0; padding: 0; max-width: none; }
.nav-inline li { margin: 0; }
.nav-link {
  display: block; padding: 8px 10px; border-radius: var(--radius);
  font: 500 var(--fs-sm)/1.2 var(--sans); color: var(--ink-2); text-decoration: none;
}
.nav-link:hover { color: var(--ink); background: var(--sheet-2); }
.nav-link[aria-current="page"] { color: var(--ink); box-shadow: inset 0 -2px 0 var(--ink); border-radius: 0; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 10px 18px; border-radius: var(--radius);
  border: 1.5px solid var(--ink);
  font: 600 var(--fs-sm)/1.2 var(--sans); text-decoration: none; white-space: nowrap;
}
.btn-primary { background: var(--ink); color: var(--paper); }
.btn-primary:hover { background: var(--ink-2); border-color: var(--ink-2); }
.btn-quiet { background: transparent; color: var(--ink); }
.btn-quiet:hover { background: var(--sheet); }
.head-cta { min-height: 38px; padding: 8px 14px; }

.menu { position: relative; }
.menu > summary {
  list-style: none; cursor: pointer;
  display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 8px 12px;
  border: 1px solid var(--rule-2); border-radius: var(--radius);
  font: 600 var(--fs-sm)/1 var(--sans);
}
.menu > summary::-webkit-details-marker { display: none; }
.menu > summary svg { width: 14px; height: 14px; }
.menu[open] > summary { background: var(--sheet); }
.menu-panel {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 10;
  width: min(320px, calc(100vw - 2 * var(--gutter)));
  background: var(--sheet); border: 1px solid var(--rule-2); border-radius: 10px;
  padding: var(--s3); box-shadow: 0 18px 40px -18px rgb(10 12 30 / 0.35);
}
.menu-panel ul { list-style: none; margin: 0; padding: 0; }
.menu-panel li { margin: 0; }
.menu-panel .nav-link { padding: 11px 12px; font-size: 1rem; color: var(--ink); }
.menu-panel .nav-link[aria-current="page"] { box-shadow: inset 2px 0 0 var(--ink); }
.menu-panel hr { margin: var(--s2) 0; }
.menu-panel .btn { width: 100%; margin-top: var(--s2); }

@media (min-width: 1100px) {
  .nav-inline { display: block; }
  .menu { display: none; }
}
@media (max-width: 1099.98px) {
  .head-cta { display: none; }
}

/* Footer */
.site-foot { margin-top: 0; border-top: 1px solid var(--rule); padding-block: var(--s8) var(--s7); font-family: var(--sans); font-size: var(--fs-sm); color: var(--ink-2); }
.foot-grid { display: grid; gap: var(--s6) var(--s7); grid-template-columns: minmax(0, 1fr); }
@media (min-width: 820px) { .foot-grid { grid-template-columns: minmax(0, 1.3fr) repeat(3, minmax(0, 1fr)); } }
.foot-brand p { max-width: 24em; margin-bottom: 0.6em; }
.foot-brand .brand { color: var(--ink); margin-bottom: var(--s4); }
.foot-col h2 { font: 600 var(--fs-sm)/1.3 var(--sans); color: var(--ink); margin-bottom: var(--s3); letter-spacing: 0; }
.foot-col ul { list-style: none; padding: 0; margin: 0; }
.foot-col li { margin-bottom: 6px; }
.foot-col a { text-decoration: none; }
.foot-col a:hover, .foot-col a[aria-current="page"] { color: var(--ink); text-decoration: underline; }
.foot-legal { margin-top: var(--s7); padding-top: var(--s5); border-top: 1px solid var(--rule); display: grid; gap: var(--s2); }
.foot-legal p { margin: 0; max-width: 60em; }

/* Status pill. Dashed, because the product is not built yet. */
.status {
  display: inline-flex; align-items: center; gap: 8px;
  margin: 0 0 var(--s5); padding: 4px 12px 4px 10px;
  border: 1px dashed var(--ink-3); border-radius: 999px;
  font: 500 var(--fs-xs)/1.4 var(--sans); color: var(--ink-2);
}
.status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; border: 1.5px solid currentColor; }

/* Hero */
.hero { padding-block: var(--s8) var(--s9); }
.hero-grid { display: grid; gap: var(--s7); grid-template-columns: minmax(0, 1fr); align-items: start; }
@media (min-width: 1000px) { .hero-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--s7); } }
/* The headline is two sentences: the event, then the question. */
.hero h1 { font-size: var(--fs-hero); line-height: 0.98; letter-spacing: -0.012em; max-width: 11em; margin-bottom: var(--s5); }
.hero h1 span { display: block; }
.lede { font-size: var(--fs-lede); line-height: 1.5; max-width: 32em; margin-bottom: var(--s6); }
.actions { display: flex; flex-wrap: wrap; gap: var(--s3); margin-bottom: var(--s4); }
.hero .small { max-width: 30em; }

/* Page head */
.page-head { padding-block: var(--s8) var(--s7); border-bottom: 1px solid var(--rule); }
.page-head h1 { margin-bottom: var(--s5); }
.page-head .lede { margin-bottom: 0; }
/* The plain-language lede comes first; the technical summary follows, quieter. */
.page-head .lede-2 { margin: var(--s4) 0 0; color: var(--ink-2); max-width: 36em; }
.page-head .actions { margin-top: var(--s5); }
.page-head .status { margin-bottom: var(--s5); }
.crumb { font: 500 var(--fs-sm)/1.4 var(--sans); color: var(--ink-2); margin-bottom: var(--s4); }
.crumb a { text-decoration: none; }
.crumb a:hover { text-decoration: underline; }

.toc { margin-top: var(--s6); font-family: var(--sans); font-size: var(--fs-sm); }
.toc h2 { font: 600 var(--fs-sm)/1.3 var(--sans); color: var(--ink-2); margin-bottom: var(--s2); letter-spacing: 0; }
.toc ol { display: flex; flex-wrap: wrap; gap: 4px 20px; list-style: none; padding: 0; margin: 0; max-width: none; }
.toc li { margin: 0; }

/* Sections with a side head: the heading sits in the margin, like a report. */
.sec { padding-block: var(--s9); border-top: 1px solid var(--rule); }
.sec:first-child, .page-head + .sec { border-top: 0; }
.sec-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s5); }
.side h2 { margin-bottom: var(--s4); }
.side .small { max-width: 22em; }
@media (min-width: 960px) {
  .sec-grid { grid-template-columns: minmax(0, 17rem) minmax(0, 1fr); gap: var(--s8); }
  .side { position: sticky; top: var(--s6); align-self: start; }
  .side h2 { font-size: clamp(1.875rem, 1.2rem + 1.2vw, 2.375rem); }
}
.body > :last-child { margin-bottom: 0; }
.body > h3, .planned > h3 { margin: var(--s7) 0 var(--s3); }
.body > h3:first-child, .body > .first { margin-top: 0; }
.body > h4 { margin: var(--s6) 0 var(--s2); }
.sec-wide h2 { margin-bottom: var(--s4); }
.sec-wide > .wrap > .intro { margin-bottom: var(--s7); }
.sec-wide .proof + .cols { margin-top: var(--s7); }
.intro { font-size: var(--fs-lede); line-height: 1.5; color: var(--ink-2); max-width: 34em; }
.after { margin-top: var(--s5); }
.after-gap { margin-top: var(--s5); }
.more { font-family: var(--sans); font-size: var(--fs-sm); font-weight: 600; margin-top: var(--s5); }

/* Crop-marked figures: illustrations, never captured output. */
.proof { margin: var(--s6) 0 0; min-width: 0; }
.proof:first-child { margin-top: 0; }
.crop {
  --c: var(--ink-3);
  padding: var(--crop);
  background:
    linear-gradient(var(--c), var(--c)) 0 var(--crop) / calc(var(--crop) - 4px) 1px,
    linear-gradient(var(--c), var(--c)) var(--crop) 0 / 1px calc(var(--crop) - 4px),
    linear-gradient(var(--c), var(--c)) 100% var(--crop) / calc(var(--crop) - 4px) 1px,
    linear-gradient(var(--c), var(--c)) calc(100% - var(--crop)) 0 / 1px calc(var(--crop) - 4px),
    linear-gradient(var(--c), var(--c)) 0 calc(100% - var(--crop)) / calc(var(--crop) - 4px) 1px,
    linear-gradient(var(--c), var(--c)) var(--crop) 100% / 1px calc(var(--crop) - 4px),
    linear-gradient(var(--c), var(--c)) 100% calc(100% - var(--crop)) / calc(var(--crop) - 4px) 1px,
    linear-gradient(var(--c), var(--c)) calc(100% - var(--crop)) 100% / 1px calc(var(--crop) - 4px);
  background-repeat: no-repeat;
}
.sheet { background: var(--sheet); border: 1px solid var(--rule); border-radius: 4px; min-width: 0; overflow: hidden; }
.proof figcaption, .fig-note {
  margin: var(--s2) var(--crop) 0; font: 400 var(--fs-xs)/1.5 var(--sans); color: var(--ink-2);
  max-width: none;
}
.proof figcaption strong { color: var(--ink); font-weight: 600; }
.plain-fig { margin: var(--s6) 0 0; }
.plain-fig figcaption { margin-top: var(--s3); font: 400 var(--fs-xs)/1.5 var(--sans); color: var(--ink-2); }

/* Sheet internals */
.sheet-head {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px;
  padding: 12px 18px; border-bottom: 1px solid var(--rule);
  font: 400 var(--fs-sm)/1.4 var(--sans); color: var(--ink-2);
}
.sheet-head strong { color: var(--ink); font-weight: 600; }
.sheet-head .mark { width: 16px; height: 16px; align-self: center; color: var(--ink); }
.sheet-body { padding: 16px 18px 18px; }
.sheet-body > :last-child { margin-bottom: 0; }
.sheet h3 { font-size: 1.25rem; margin-bottom: var(--s3); }
.sheet h4 { font: 600 var(--fs-sm)/1.3 var(--sans); margin: var(--s5) 0 var(--s2); letter-spacing: 0; }
.sheet h4:first-child { margin-top: 0; }
.sheet p, .sheet li { font-family: var(--sans); font-size: var(--fs-sm); line-height: 1.5; }
.sheet ul { padding-left: 1.1em; }
.label { font: 500 var(--fs-xs)/1.4 var(--sans); color: var(--ink-2); }

/* Diff */
.diff { font: 400 0.78rem/1.6 var(--mono); border-bottom: 1px solid var(--rule); overflow-x: auto; }
.diff:last-child { border-bottom: 0; }
.diff-file { display: flex; justify-content: space-between; gap: 12px; padding: 7px 14px; background: var(--sheet-2); border-bottom: 1px solid var(--rule); font: 500 var(--fs-xs)/1.4 var(--mono); }
.diff-file span:last-child { color: var(--ink-2); font-family: var(--sans); white-space: nowrap; }
.diff-file .add { color: var(--pass); }
.diff-file .del { color: var(--regressed); }
.diff ol { list-style: none; margin: 0; padding: 6px 0; max-width: none; }
.diff li { font: inherit; display: grid; grid-template-columns: 2.6em 1.4em minmax(0, 1fr); margin: 0; padding: 0 14px 0 0; }
.diff li::before { content: attr(data-n); text-align: right; padding-right: 0.8em; color: var(--ink-2); }
.diff li > span:first-child { color: var(--ink-2); text-align: center; }
.diff li > span:last-child { white-space: pre-wrap; }
.diff .del { background: var(--regressed-bg); }
.diff .del > span:first-child { color: var(--regressed); }
.diff .add { background: var(--pass-bg); }
.diff .add > span:first-child { color: var(--pass); }
.diff .gap { color: var(--ink-2); }

/* Verdicts: the only saturated colour on the site */
.v {
  display: inline-block; padding: 1px 7px; border-radius: 4px;
  font: 700 0.74rem/1.5 var(--mono); letter-spacing: 0.02em; white-space: nowrap;
  vertical-align: 0.08em;
}
.v-pass { color: var(--pass); background: var(--pass-bg); }
.v-regressed { color: var(--regressed); background: var(--regressed-bg); }
.v-improved { color: var(--improved); background: var(--improved-bg); }
.v-inconclusive { color: var(--inconclusive); background: var(--inconclusive-bg); }
.v-block { color: var(--paper); background: var(--regressed); }
.t-pass { color: var(--pass); }
.t-regressed { color: var(--regressed); }

/* Run tiles: a filled square is a passing run, an empty one a failing run. */
.tiles { display: inline-flex; gap: 3px; vertical-align: middle; }
.tiles i { width: 11px; height: 11px; border-radius: 2px; border: 1.5px solid var(--ink); }
.tiles i.ok { background: var(--ink); }
.tiles-lg i { width: 15px; height: 15px; }

/* Run table */
.runs { width: 100%; border-collapse: collapse; font-family: var(--sans); font-size: var(--fs-sm); font-variant-numeric: tabular-nums; }
.runs th, .runs td { text-align: left; vertical-align: middle; padding: 10px 14px 10px 0; border-top: 1px solid var(--rule); }
.runs th:first-child, .runs td:first-child { padding-left: 18px; }
.runs th:last-child, .runs td:last-child { padding-right: 18px; }
.runs thead th { border-top: 0; font: 500 var(--fs-xs)/1.3 var(--sans); color: var(--ink-2); padding-top: 12px; padding-bottom: 8px; }
.runs tbody th { font: 500 0.8rem/1.3 var(--mono); }
.runs .count { font: 400 var(--fs-xs)/1 var(--mono); color: var(--ink-2); margin-left: 6px; font-variant-numeric: tabular-nums; }
.runs td.c-base, .runs td.c-pr, .runs tbody th { white-space: nowrap; }
.runs tr.hl { background: var(--regressed-bg); }
.runs tr.hl th, .runs tr.hl td { border-top-color: transparent; }
/* Plain-language run table: task names are descriptions, not identifiers. */
.runs-plain tbody th { font: 500 var(--fs-sm)/1.3 var(--sans); white-space: normal; }
.runs-foot { margin: 0; padding: 12px 18px; border-top: 1px solid var(--rule); font: 400 var(--fs-xs)/1.5 var(--sans); color: var(--ink-2); }
.runs-foot strong { color: var(--ink); font-weight: 600; }

@media (max-width: 600px) {
  .runs thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .runs, .runs tbody { display: block; }
  .runs tbody tr {
    display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "task verdict" "base base" "pr pr";
    gap: 6px 12px; padding: 12px 14px; border-top: 1px solid var(--rule);
  }
  .runs tbody th, .runs tbody td { padding: 0 !important; border: 0; }
  .runs tbody th { grid-area: task; align-self: center; }
  .runs td.c-base { grid-area: base; }
  .runs td.c-pr { grid-area: pr; }
  .runs td.c-v { grid-area: verdict; justify-self: end; }
  .runs td[data-label]::before { content: attr(data-label); display: inline-block; width: 3.4em; font: 400 var(--fs-xs)/1 var(--sans); color: var(--ink-2); }
}

/* Hero proof: one orchestrated moment. Base runs are already in; the pull
   request's runs complete one by one, then the verdicts settle. */
.hero-proof .sheet { box-shadow: 0 30px 60px -40px rgb(22 26 45 / 0.45); }
@media (prefers-reduced-motion: no-preference) {
  .hero-proof .c-pr i { animation: tile 0.22s ease-out both; }
  .hero-proof tr:nth-child(1) .c-pr i { animation-delay: calc(0.35s + var(--i) * 0.07s); }
  .hero-proof tr:nth-child(2) .c-pr i { animation-delay: calc(0.55s + var(--i) * 0.07s); }
  .hero-proof tr:nth-child(3) .c-pr i { animation-delay: calc(0.75s + var(--i) * 0.07s); }
  .hero-proof tr:nth-child(4) .c-pr i { animation-delay: calc(0.95s + var(--i) * 0.07s); }
  .hero-proof .c-v .v { animation: settle 0.45s ease-out 1.65s both; }
  .hero-proof tr.hl { animation: flag 0.6s ease-out 1.65s both; }
  .hero-proof .runs-foot { animation: settle 0.45s ease-out 1.9s both; }
  @keyframes tile { from { opacity: 0; transform: scale(0.4); } }
  @keyframes settle { from { opacity: 0; } }
  @keyframes flag { from { background: transparent; } }
}
.tiles i:nth-child(1) { --i: 0; } .tiles i:nth-child(2) { --i: 1; } .tiles i:nth-child(3) { --i: 2; }
.tiles i:nth-child(4) { --i: 3; } .tiles i:nth-child(5) { --i: 4; } .tiles i:nth-child(6) { --i: 5; }

/* The problem, in one picture */
.story { display: grid; gap: var(--s3); grid-template-columns: minmax(0, 1fr); margin-top: var(--s6); }
.story-step { min-width: 0; }
.story-arrow { display: flex; justify-content: center; color: var(--ink-3); }
.story-arrow svg { width: 22px; height: 22px; transform: rotate(90deg); }
.outcomes { display: grid; gap: var(--s3); }
.outcome { border: 1px solid var(--rule); border-radius: 4px; background: var(--sheet); overflow: hidden; }
.outcome .sheet-head { padding: 9px 14px; }
.outcome pre { margin: 0; padding: 10px 14px; font: 400 0.76rem/1.6 var(--mono); white-space: pre-wrap; border: 0; border-radius: 0; background: none; }
.outcome-res { display: flex; gap: 8px; align-items: baseline; padding: 9px 14px; border-top: 1px solid var(--rule); font: 500 var(--fs-xs)/1.45 var(--sans); }
.outcome.bad { border-color: var(--regressed); }
.prompt-card .sheet-body p { font-family: var(--serif); font-size: 1rem; font-style: italic; }
.story-foot { margin-top: var(--s4); display: flex; gap: 10px; align-items: baseline; font: 400 var(--fs-sm)/1.5 var(--sans); color: var(--ink-2); max-width: 46em; }
.story-foot strong { color: var(--ink); }
@media (min-width: 1000px) {
  .story { grid-template-columns: minmax(0, 1.15fr) 28px minmax(0, 0.8fr) 28px minmax(0, 1.15fr); align-items: center; }
  .story-arrow svg { transform: none; }
}

/* Layers: a sequence. The dashed segment leads to what is planned. */
.layers { list-style: none; padding: 0; margin: var(--s5) 0 0; max-width: 44rem; }
.layer { position: relative; padding: 0 0 var(--s6) 72px; margin: 0; }
.layer::before { content: ""; position: absolute; left: 22px; top: 50px; bottom: 6px; border-left: 1.5px solid var(--ink); }
.layer:last-child::before { display: none; }
.layer:has(+ .layer-planned)::before { border-left-style: dashed; border-color: var(--ink-3); }
.layer .num {
  position: absolute; left: 0; top: -4px; width: 45px; height: 45px;
  display: grid; place-items: center; border: 1.5px solid var(--ink); border-radius: 50%;
  font: 600 1.25rem/1 var(--display); font-stretch: condensed; background: var(--paper);
}
.layer-planned .num { border-style: dashed; border-color: var(--ink-3); color: var(--ink-2); }
.layer h3 { margin-bottom: var(--s2); }
.layer p { margin-bottom: 0; }
.layers + .moment { margin-top: var(--s2); }

.tag {
  display: inline-block; padding: 1px 8px; border: 1px dashed currentColor; border-radius: 4px;
  font: 500 var(--fs-xs)/1.5 var(--sans); color: var(--ink-2); letter-spacing: 0; vertical-align: 0.3em; white-space: nowrap;
}
h2 .tag, h3 .tag { margin-left: 6px; }
.planned { border: 1.5px dashed var(--ink-3); border-radius: 10px; padding: var(--s5) var(--s5) var(--s2); max-width: 46rem; }
.planned > :last-child { margin-bottom: var(--s3); }

/* Definition lists */
.defs { display: grid; grid-template-columns: minmax(0, 1fr); margin: var(--s5) 0; max-width: 48rem; }
.defs dt { font: 600 1rem/1.35 var(--sans); padding-top: var(--s4); border-top: 1px solid var(--rule); }
.defs dd { margin: 0; padding: var(--s1) 0 var(--s4); }
.defs dd p { font-size: 1.0625rem; }
.defs dd > :last-child { margin-bottom: 0; }
@media (min-width: 720px) {
  .defs { grid-template-columns: minmax(0, 14rem) minmax(0, 1fr); }
  .defs dt { padding: var(--s4) var(--s5) var(--s4) 0; }
  .defs dd { padding: var(--s4) 0; border-top: 1px solid var(--rule); }
}

/* Lists and groups */
.cols { display: grid; gap: var(--s6) var(--s7); grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr)); margin-top: var(--s5); }
.cols > div > :last-child { margin-bottom: 0; }
.cols h3 { font-size: 1.375rem; margin-bottom: var(--s2); }
@media (min-width: 1100px) { .cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s6); } }
.cols p { font-size: 1.0625rem; }
.points { padding-left: 1.15em; }
.points li { margin-bottom: 0.6em; }
.checklist { list-style: none; padding: 0; }
.checklist li { position: relative; padding-left: 1.7em; }
.checklist li::before { content: ""; position: absolute; left: 0.15em; top: 0.55em; width: 0.62em; height: 0.62em; border: 1.5px solid var(--ink); border-radius: 2px; }

/* Evidence: a claim, then where it comes from. */
.evidence { list-style: none; padding: 0; margin: var(--s5) 0 0; max-width: 46rem; counter-reset: none; }
.evidence > li { padding: var(--s5) 0; border-top: 1px solid var(--rule); margin: 0; }
.evidence > li:last-child { border-bottom: 1px solid var(--rule); }
.evidence p { margin-bottom: var(--s2); }
.evidence .claim { font-size: 1.1875rem; line-height: 1.45; }
.src { font: 400 var(--fs-sm)/1.5 var(--sans); color: var(--ink-2); margin: 0; }
.src a { color: var(--ink); }
.cite { font-family: var(--sans); font-size: 0.8em; white-space: nowrap; }

/* Code */
pre {
  margin: 0; padding: 16px 18px; overflow-x: auto;
  background: var(--sheet); border: 1px solid var(--rule); border-radius: 4px;
  font-size: 0.8rem; line-height: 1.65; tab-size: 2;
}
.sheet pre { border: 0; border-radius: 0; }
.c { color: var(--ink-2); font-style: italic; }
.k { font-weight: 700; }
.cmd { font: 400 0.82rem/1.6 var(--mono); }

/* PR comment */
.meta { display: flex; flex-wrap: wrap; gap: 2px 22px; margin: 0 0 var(--s2); font: 400 var(--fs-sm)/1.5 var(--sans); }
.meta div { display: flex; gap: 6px; }
.meta dt { color: var(--ink-2); }
.meta dd { margin: 0; }
.files, .checks { list-style: none; padding: 0; margin: 0; max-width: none; }
.files li, .checks li { margin: 0; padding: 4px 0; font: 400 var(--fs-sm)/1.5 var(--sans); }
.files .what { color: var(--ink-2); }
.checks li { display: grid; grid-template-columns: 1.5em minmax(0, 1fr); }
.checks .icon { font: 700 0.9rem/1.5 var(--mono); }
.result { margin-top: var(--s4); padding-top: var(--s3); border-top: 1px solid var(--rule); }
.comment .runs { margin: var(--s2) 0 0; }
.comment .runs th:first-child, .comment .runs td:first-child { padding-left: 0; }
.comment .runs th:last-child, .comment .runs td:last-child { padding-right: 0; }

/* Context diff table */
.ctx { width: 100%; border-collapse: collapse; font: 400 var(--fs-sm)/1.45 var(--sans); }
.ctx th, .ctx td { text-align: left; vertical-align: top; padding: 10px 14px 10px 0; border-top: 1px solid var(--rule); }
.ctx th:first-child, .ctx td:first-child { padding-left: 18px; }
.ctx th:last-child, .ctx td:last-child { padding-right: 18px; }
.ctx thead th { border-top: 0; font: 500 var(--fs-xs)/1.3 var(--sans); color: var(--ink-2); padding-top: 12px; padding-bottom: 8px; }
.ctx tbody th { font: 500 0.78rem/1.5 var(--mono); }
.ctx .why { display: block; font: 400 var(--fs-xs)/1.4 var(--sans); color: var(--ink-2); margin-top: 2px; }
.ctx .gone { color: var(--regressed); font-weight: 600; }
.ctx .new { color: var(--pass); font-weight: 600; }
.ctx tr.flag { background: var(--regressed-bg); }
@media (max-width: 680px) {
  .ctx thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .ctx, .ctx tbody { display: block; }
  .ctx tbody tr { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 4px 14px; padding: 12px 14px; border-top: 1px solid var(--rule); }
  .ctx tbody th { grid-column: 1 / -1; }
  .ctx tbody th, .ctx tbody td { padding: 0 !important; border: 0; }
  .ctx td[data-label]::before { content: attr(data-label); display: block; font: 500 var(--fs-xs)/1.3 var(--sans); color: var(--ink-2); }
}

/* Fisher worked examples */
.worked .proof { margin-top: 0; }
.worked { display: grid; gap: var(--s5); grid-template-columns: repeat(auto-fit, minmax(min(100%, 19rem), 1fr)); margin-top: var(--s5); }
.worked .sheet-body p { font-family: var(--sans); font-size: var(--fs-sm); }
.worked .row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 6px 0; font: 400 var(--fs-sm)/1.4 var(--sans); }
.worked .row + .row { border-top: 1px solid var(--rule); }
.worked .math { font: 400 0.8rem/1.6 var(--mono); color: var(--ink-2); margin: var(--s3) 0; }
.worked .verdict-line { display: flex; align-items: center; gap: 10px; margin-top: var(--s3); font: 500 var(--fs-sm)/1.4 var(--sans); }

/* Field table */
.fields { width: 100%; border-collapse: collapse; font-size: 1rem; margin-top: var(--s5); }
.fields th, .fields td { text-align: left; vertical-align: top; padding: 10px 16px 10px 0; border-top: 1px solid var(--rule); }
.fields thead th { border-top: 0; font: 500 var(--fs-xs)/1.3 var(--sans); color: var(--ink-2); }
.fields tbody th { font: 500 0.82rem/1.6 var(--mono); white-space: nowrap; }
.fields td { font-family: var(--serif); }
.fields .scope { font: 400 var(--fs-xs)/1.6 var(--sans); color: var(--ink-2); white-space: nowrap; }
@media (max-width: 600px) {
  .fields, .fields tbody, .fields tr { display: block; }
  .fields thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .fields tr { padding: 10px 0; border-top: 1px solid var(--rule); }
  .fields th, .fields td { display: inline; padding: 0; border: 0; }
  .fields td.scope { margin-left: 8px; }
  .fields td:last-child { display: block; margin-top: 4px; }
}

/* Pipeline diagram */
.pipe { margin: var(--s6) 0 0; }
.pipe svg { display: block; width: 100%; height: auto; }
.pipe .tall { display: block; max-width: 420px; margin-inline: auto; }
.pipe .wide { display: none; }
@media (min-width: 900px) { .pipe .tall { display: none; } .pipe .wide { display: block; } }
.d-box { fill: var(--sheet); stroke: var(--rule-2); stroke-width: 1.2; }
.d-box-claude { fill: var(--sheet); stroke: var(--ink); stroke-width: 1.6; }
.d-box-plan { fill: none; stroke: var(--ink-3); stroke-width: 1.4; stroke-dasharray: 5 4; }
.d-line { fill: none; stroke: var(--ink-2); stroke-width: 1.4; }
.d-line-plan { fill: none; stroke: var(--ink-3); stroke-width: 1.4; stroke-dasharray: 4 4; }
.d-head { fill: var(--ink-2); }
.d-t { fill: var(--ink); font: 600 15px var(--sans); }
.d-s { fill: var(--ink-2); font: 400 12.5px var(--sans); }
.d-m { fill: var(--ink); font: 500 11.5px var(--mono); }
.d-n { fill: var(--paper); font: 700 12px var(--sans); }
.d-dot { fill: var(--ink); }
.d-dot-plan { fill: var(--paper); stroke: var(--ink-3); stroke-width: 1.4; stroke-dasharray: 3 2; }
.d-tag { fill: var(--ink-2); font: 500 11px var(--sans); }
.d-band { fill: var(--sheet-2); stroke: none; }

/* Touchpoint list on the Claude page */
.touch { list-style: none; padding: 0; margin: var(--s5) 0 0; max-width: 48rem; counter-reset: t; }
.touch > li { position: relative; margin: 0; padding: var(--s5) 0 var(--s5) 3.25rem; border-top: 1px solid var(--rule); counter-increment: t; }
.touch > li::before {
  content: counter(t); position: absolute; left: 0; top: var(--s5);
  width: 2.1rem; height: 2.1rem; display: grid; place-items: center; border-radius: 50%;
  background: var(--ink); color: var(--paper); font: 700 0.875rem/1 var(--sans);
}
.touch h3 { font-size: 1.375rem; margin-bottom: var(--s2); }
.touch p { font-size: 1.0625rem; }
.touch .src { margin-top: var(--s2); }

/* Use cases */
.case { padding-block: var(--s8); border-top: 1px solid var(--rule); }
.case-grid { display: grid; gap: var(--s6); grid-template-columns: minmax(0, 1fr); }
@media (min-width: 1000px) { .case-grid { grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: var(--s8); } }
.case h2 { margin-bottom: var(--s4); }
.case .who { font: 500 var(--fs-sm)/1.4 var(--sans); color: var(--ink-2); margin-bottom: var(--s3); }
.case .proof { margin-top: 0; }
.case h3 { font: 600 1.0625rem/1.3 var(--sans); letter-spacing: 0; margin: var(--s5) 0 var(--s2); }

/* Repo matrix (shared rules use case) */
.matrix { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(12.5rem, 1fr)); gap: 0; max-width: none; }
.matrix li span:first-child { white-space: nowrap; }
.matrix li { margin: 0; display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 8px 12px; border-top: 1px solid var(--rule); font: 400 0.76rem/1.4 var(--mono); }

/* Size bar (AGENTS.md case) */
.bar { position: relative; height: 26px; border-radius: 3px; background: var(--sheet-2); border: 1px solid var(--rule); margin: 6px 0 4px; overflow: hidden; }
.bar span { position: absolute; inset: 0 auto 0 0; background: var(--ink); opacity: 0.85; }
.bar span.over { background: repeating-linear-gradient(135deg, var(--regressed) 0 6px, transparent 6px 10px); opacity: 1; left: auto; }
.bar .cap { position: absolute; top: -4px; bottom: -4px; width: 0; border-left: 2px dashed var(--regressed); }
.bar-legend { position: relative; height: 1.5em; margin-bottom: var(--s4); font: 400 var(--fs-xs)/1.4 var(--sans); color: var(--ink-2); }
.bar-legend span { position: absolute; left: 0; white-space: nowrap; }
.bar-legend .lcap { left: 80%; transform: translateX(-50%); }

/* Personas */
.persona { padding-block: var(--s8); border-top: 1px solid var(--rule); }
.persona-grid { display: grid; gap: var(--s5) var(--s8); grid-template-columns: minmax(0, 1fr); }
@media (min-width: 960px) { .persona-grid { grid-template-columns: minmax(0, 17rem) minmax(0, 1fr) minmax(0, 1fr); } }
.persona h2 { font-size: clamp(1.75rem, 1.3rem + 1.2vw, 2.25rem); }
.persona h3 { font: 600 var(--fs-sm)/1.3 var(--sans); color: var(--ink-2); margin-bottom: var(--s3); letter-spacing: 0; }
.moment { border-left: 2px solid var(--ink); padding-left: var(--s4); font-style: italic; }

/* Roadmap */
.phases { display: grid; gap: var(--s5); grid-template-columns: minmax(0, 1fr); margin-top: var(--s6); }
@media (min-width: 960px) { .phases { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.phase { border-radius: 10px; padding: var(--s5); border: 1.5px solid var(--ink); background: var(--sheet); }
.phase.next { border-style: dashed; border-color: var(--ink-2); background: transparent; }
.phase.later { border-style: dashed; border-color: var(--ink-3); background: transparent; }
.phase h2 { font-size: 2.25rem; margin-bottom: var(--s2); }
.phase .lead { font: 500 var(--fs-sm)/1.45 var(--sans); color: var(--ink-2); margin-bottom: var(--s4); }
.phase ul { padding-left: 1.1em; margin-bottom: 0; }
.phase li { font-size: 1.0625rem; margin-bottom: 0.7em; }
.phase li strong { font-family: var(--sans); font-size: 0.95em; }

/* FAQ */
.faq { max-width: 50rem; margin-top: var(--s4); }
.faq details { border-top: 1px solid var(--rule); }
.faq details:last-of-type { border-bottom: 1px solid var(--rule); }
.faq summary {
  cursor: pointer; list-style: none; position: relative;
  padding: var(--s5) 3rem var(--s5) 0;
  font: 600 1.3125rem/1.25 var(--display); font-stretch: condensed;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; position: absolute; right: 6px; top: 50%; width: 12px; height: 12px; margin-top: -8px;
  border-right: 2px solid var(--ink); border-bottom: 2px solid var(--ink); transform: rotate(45deg);
}
.faq details[open] summary::after { transform: rotate(-135deg); margin-top: -2px; }
.faq summary:hover { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
.faq .a { padding: 0 0 var(--s5); }
.faq .a > :last-child { margin-bottom: 0; }
@media (prefers-reduced-motion: no-preference) {
  .faq details[open] .a { animation: open 0.2s ease-out; }
  @keyframes open { from { opacity: 0; transform: translateY(-4px); } }
}

/* Essay */
.essay { max-width: 40rem; }
@media (min-width: 960px) { .essay { margin-left: calc(17rem + var(--s8)); } }
.essay p, .essay li { font-size: 1.1875rem; line-height: 1.7; }
.essay h2 { font-size: clamp(1.625rem, 1.3rem + 1vw, 2rem); margin: var(--s8) 0 var(--s4); }
.essay .byline { font: 400 var(--fs-sm)/1.5 var(--sans); color: var(--ink-2); }
.essay blockquote { font-size: 1.25rem; }
.notes { margin-top: var(--s8); padding-top: var(--s5); border-top: 1px solid var(--rule); }
.notes h2 { font: 600 var(--fs-sm)/1.3 var(--sans); margin: 0 0 var(--s3); letter-spacing: 0; }
.notes ol { font: 400 var(--fs-sm)/1.55 var(--sans); color: var(--ink-2); max-width: none; }
.notes li { margin-bottom: 0.5em; }
.notes a { color: var(--ink); }
sup a { text-decoration: none; font: 600 0.72em/1 var(--sans); padding: 0 1px; }

/* Callouts and CTA */
.note {
  border: 1px solid var(--rule-2); border-radius: 8px; padding: var(--s4) var(--s5);
  font: 400 var(--fs-sm)/1.55 var(--sans); color: var(--ink-2); max-width: 46rem; background: var(--sheet);
}
.note strong { color: var(--ink); }
.note p { margin-bottom: 0.5em; } .note > :last-child { margin-bottom: 0; }
.cta { padding-block: var(--s9); border-top: 1px solid var(--rule); }
.cta-box { display: grid; gap: var(--s5) var(--s8); grid-template-columns: minmax(0, 1fr); align-items: end; }
@media (min-width: 960px) { .cta-box { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); } }
.cta h2 { font-size: var(--fs-h1); max-width: 12em; margin-bottom: var(--s4); }
.cta p { color: var(--ink-2); }
.cta .actions { margin: 0; }

/* Mail template */
.template { font: 400 0.82rem/1.65 var(--mono); white-space: pre-wrap; }

/* A secondary section: less air, a smaller head. */
.sec.sec-aside { padding-block: var(--s7); }
.sec-aside .side h2 { font-size: var(--fs-h3); }
.sec-aside .body p { font-size: 1.0625rem; }

/* Glossary: the technical name under the plain one. */
.defs .aka { display: block; margin-top: 2px; font: 400 var(--fs-xs)/1.4 var(--mono); color: var(--ink-2); }

/* 404 */
.lost { padding-block: var(--s10); }
.page-head + .sec-wide, .page-head + .case, .page-head + .persona { border-top: 0; }
.lost h1 { margin-bottom: var(--s5); }

@media (max-width: 640px) {
  :root { --gutter: 16px; --crop: 9px; }
  body { font-size: 1.0625rem; }
  .hero { padding-block: var(--s6) var(--s8); }
  .sec, .case, .persona { padding-block: var(--s8); }
  .page-head { padding-block: var(--s6) var(--s6); }
  .lede { font-size: 1.1875rem; }
  .sheet-head, .sheet-body { padding-inline: 14px; }
  .runs th:first-child, .runs td:first-child, .ctx th:first-child, .ctx td:first-child { padding-left: 14px; }
  .layer { padding-left: 60px; }
  .layer .num { width: 40px; height: 40px; }
  .layer::before { left: 20px; }
  .touch > li { padding-left: 2.9rem; }
  .actions .btn { flex: 1 1 auto; }
}

@media print {
  .site-head nav, .menu, .skip, .cta { display: none; }
  body { background: #fff; }
}
