@font-face {
  font-family: 'Onest';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url('assets/fonts/onest-latin-ext-wght-normal.woff2') format('woff2-variations');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308,
    U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113,
    U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Onest';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url('assets/fonts/onest-latin-wght-normal.woff2') format('woff2-variations');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304,
    U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-display: swap;
  font-weight: 100 800;
  src: url('assets/fonts/jetbrains-mono-latin-wght-normal.woff2') format('woff2-variations');
}

:root {
  --page: #f4f7fb;
  --surface: #ffffff;
  --ink: #1c2b33;
  --muted: #536372;
  --line: #d8e1eb;
  --rail: #0f2742;
  --rail-ink: #e8eef7;
  --rail-muted: #a3b5ca;
  --rail-hover: #19395d;
  --rail-line: #27445f;
  --blue: #0064e0;
  --blue-deep: #0050b5;
  --blue-wash: #e5eefc;
  --cream: #f3e6d6;
  --highlight: #f7dfc0;
  --danger: #b42318;
  --danger-soft: #fdecea;
  --sans: 'Onest', 'Segoe UI', sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, Consolas, monospace;
  --rail-width: 272px;
}

* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
  scroll-padding-top: 24px;
}
body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font: 16px/1.65 var(--sans);
  -webkit-font-smoothing: antialiased;
  font-synthesis: none;
}
::selection {
  background: var(--highlight);
  color: var(--ink);
}
a {
  color: var(--blue);
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}
a:hover {
  color: var(--blue-deep);
}
:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
  border-radius: 4px;
}
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  padding: 10px 14px;
  background: var(--surface);
  z-index: 10;
}
.skip-link:focus {
  top: 12px;
}

/* Stage rail: the same navy rail as the app, listing the run's stages. */
.rail {
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--rail-width);
  background: var(--rail);
  color: var(--rail-ink);
  padding: 28px 18px 24px;
  display: flex;
  flex-direction: column;
}
.rail :focus-visible {
  outline-color: var(--cream);
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  text-decoration: none;
  font-size: 18px;
  font-weight: 650;
  letter-spacing: -0.02em;
  padding: 0 6px;
}
.brand:hover {
  color: #fff;
}
.rail-note {
  margin: 28px 8px 10px;
  color: var(--rail-muted);
  font-size: 13px;
}
.stage-index {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 2px;
}
.stage-index a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 10px;
  border-radius: 8px;
  color: var(--rail-muted);
  text-decoration: none;
  font-size: 14px;
  transition: background-color 160ms ease, color 160ms ease;
}
.stage-index a:hover {
  background: var(--rail-hover);
  color: var(--rail-ink);
}
.stage-index a.is-current {
  background: var(--cream);
  color: var(--rail);
  font-weight: 600;
}
.stage-index .glyph {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}
.rail-cta {
  margin-top: auto;
  display: block;
  text-align: center;
  padding: 11px 14px;
  border-radius: 8px;
  border: 1px solid var(--rail-line);
  color: var(--rail-ink);
  text-decoration: none;
  font-weight: 550;
  font-size: 14px;
}
.rail-cta:hover {
  background: var(--rail-hover);
  color: #fff;
}

main {
  margin-left: var(--rail-width);
  padding: 0 clamp(24px, 6vw, 96px);
}
main > section,
.site-footer {
  max-width: 760px;
}

/* Opening: the post itself is the first thing read. */
.intro {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 72px 0 56px;
}
.intro-lede {
  color: var(--muted);
  margin: 0 0 14px;
}
.post {
  margin: 0 0 36px;
}
.post p {
  margin: 0;
  font-size: clamp(30px, 4.2vw, 52px);
  line-height: 1.15;
  font-weight: 600;
  letter-spacing: -0.03em;
  text-wrap: balance;
}
.post footer {
  margin-top: 12px;
  color: var(--muted);
  font-size: 15px;
}
.intro h1 {
  margin: 0 0 14px;
  font-size: clamp(20px, 2vw, 24px);
  line-height: 1.4;
  font-weight: 500;
  letter-spacing: -0.01em;
  text-wrap: balance;
  max-width: 34ch;
}
.intro-body {
  margin: 0 0 28px;
  color: var(--muted);
  max-width: 60ch;
}
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.button {
  display: inline-flex;
  align-items: center;
  min-height: 46px;
  padding: 0 20px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  font-weight: 550;
  text-decoration: none;
  transition: background-color 160ms ease, border-color 160ms ease;
}
.button:hover {
  border-color: #b0bfcf;
  color: var(--ink);
}
.button.primary {
  background: var(--blue);
  border-color: var(--blue);
  color: #fff;
}
.button.primary:hover {
  background: var(--blue-deep);
  border-color: var(--blue-deep);
  color: #fff;
}
.provenance {
  margin: 36px 0 0;
  font-size: 13px;
  color: var(--muted);
  max-width: 64ch;
}

/* Stages */
.stage {
  padding: 72px 0;
  border-top: 1px solid var(--line);
}
.stage h2 {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 10px;
  font-size: clamp(24px, 2.6vw, 30px);
  line-height: 1.2;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.stage h2 .glyph {
  display: none;
  width: 34px;
  height: 34px;
  color: var(--blue);
  flex-shrink: 0;
}
.stage-lead {
  margin: 0 0 28px;
  color: var(--muted);
  max-width: 62ch;
}
.aside-note {
  margin: 22px 0 0;
  font-size: 14px;
  color: var(--muted);
  max-width: 64ch;
}

.capture {
  margin: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
}
.capture > div {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 16px;
  padding: 14px 18px;
}
.capture > div + div {
  border-top: 1px solid var(--line);
}
.capture dt {
  color: var(--muted);
  font-size: 14px;
}
.capture dd {
  margin: 0;
}

.checks,
.outcomes {
  display: grid;
  gap: 14px;
}
.check,
.outcome {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 18px 20px;
}
.check header,
.outcome header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 14px;
  font-weight: 600;
}
.check ul {
  margin: 10px 0 0;
  padding-left: 18px;
  color: var(--muted);
  font-size: 15px;
}
.outcome p {
  margin: 10px 0 0;
  font-size: 15px;
}
.outcome .cites {
  color: var(--muted);
  font-size: 13px;
  font-family: var(--mono);
}
.tag {
  flex-shrink: 0;
  font-size: 12px;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--blue-wash);
  color: var(--blue-deep);
  white-space: nowrap;
}
.tag-bad {
  background: var(--danger-soft);
  color: var(--danger);
}

.claim-split {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 22px 24px;
}
.claim {
  display: flex;
  gap: 14px;
  align-items: baseline;
  margin: 0;
  font-size: clamp(19px, 2vw, 22px);
  font-weight: 500;
  line-height: 1.4;
}
.claim-no {
  font-family: var(--mono);
  color: var(--blue);
  font-size: 15px;
}
.details {
  list-style: none;
  margin: 16px 0 0 28px;
  padding: 0;
  display: grid;
  gap: 8px;
}
.details li {
  padding: 10px 14px;
  border-radius: 8px;
  background: var(--page);
}

.reviews {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  font-size: 15px;
}
.reviews th,
.reviews td {
  text-align: left;
  padding: 12px 18px;
  border-bottom: 1px solid var(--line);
}
.reviews tbody tr:last-child td {
  border-bottom: 0;
}
.reviews th {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
}
.reviews .num {
  font-family: var(--mono);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* The signature: quoted source text with the passage that carries the finding highlighted. */
.evidence {
  margin: 0 0 32px;
}
.evidence blockquote {
  margin: 0;
  font-size: clamp(21px, 2.4vw, 28px);
  line-height: 1.5;
  letter-spacing: -0.01em;
}
.evidence mark {
  background: linear-gradient(var(--highlight), var(--highlight)) no-repeat 0 0 / 100% 100%;
  color: inherit;
  padding: 0 3px;
  border-radius: 3px;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}
.js .evidence mark {
  background-size: 0% 100%;
  transition: background-size 900ms cubic-bezier(0.22, 1, 0.36, 1);
}
.js .evidence.is-seen mark {
  background-size: 100% 100%;
}
.evidence figcaption {
  margin-top: 12px;
  font-size: 14px;
  color: var(--muted);
}

.commands {
  margin: 0;
  padding: 20px 22px;
  border-radius: 12px;
  background: var(--rail);
  color: var(--rail-ink);
  font: 14px/1.8 var(--mono);
  overflow-x: auto;
}
.commands .prompt {
  color: var(--rail-muted);
  user-select: none;
}
.after-commands {
  margin: 16px 0 0;
}
code {
  font-family: var(--mono);
  font-size: 0.9em;
}
.demo {
  margin-top: 40px;
  aspect-ratio: 16 / 9;
  border-radius: 14px;
  background: var(--blue-wash);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 24px;
}
.demo h3 {
  margin: 0 0 4px;
  font-size: 18px;
}
.demo p {
  margin: 0;
  color: var(--muted);
}

.site-footer {
  border-top: 1px solid var(--line);
  padding: 40px 0 56px;
  font-size: 14px;
  color: var(--muted);
}
.built-with {
  display: flex;
  gap: 18px;
  align-items: center;
}
.built-with > img {
  border-radius: 8px;
  flex-shrink: 0;
}
.built-with p {
  margin: 0;
}
.meta-logo {
  vertical-align: -2px;
}
.fine {
  margin: 20px 0 0;
  font-size: 13px;
}

/* Stage glyphs: they move only for the stage being read. */
.glyph {
  overflow: visible;
}
.glyph .glyph-reader,
.glyph .glyph-mark {
  fill: var(--highlight);
  stroke: none;
}
.glyph .glyph-mark {
  transform-box: fill-box;
  transform-origin: left center;
}
.glyph .glyph-draw,
.glyph .glyph-write {
  stroke-dasharray: 1;
}
.glyph .glyph-tilt {
  transform-origin: 24px 16px;
}
.is-current .glyph .glyph-drop,
.is-current .glyph-drop {
  animation: glyph-drop 1.8s cubic-bezier(0.22, 1, 0.36, 1) infinite;
}
.is-current .glyph-scan {
  animation: glyph-scan 2s ease-in-out infinite alternate;
}
.is-current .glyph-reader {
  animation: glyph-reader 2.4s steps(1) infinite;
}
.is-current .glyph-split-up {
  animation: glyph-split-up 2s ease-in-out infinite alternate;
}
.is-current .glyph-split-down {
  animation: glyph-split-down 2s ease-in-out infinite alternate;
}
.is-current .glyph-draw {
  animation: glyph-draw 2.2s cubic-bezier(0.65, 0, 0.35, 1) infinite;
}
.is-current .glyph-search {
  animation: glyph-search 2.6s ease-in-out infinite;
}
.is-current .glyph-mark {
  animation: glyph-mark 2.2s cubic-bezier(0.22, 1, 0.36, 1) infinite;
}
.is-current .glyph-tilt {
  animation: glyph-tilt 2.4s ease-in-out infinite alternate;
}
@keyframes glyph-drop {
  0% { transform: translateY(-8px); opacity: 0; }
  45%, 80% { transform: translateY(0); opacity: 1; }
  100% { transform: translateY(2px); opacity: 0; }
}
@keyframes glyph-scan {
  to { transform: translateY(18px); }
}
@keyframes glyph-reader {
  0% { transform: translate(0, 0); }
  16% { transform: translate(14px, 0); }
  33% { transform: translate(0, 9px); }
  50% { transform: translate(14px, 9px); }
  66% { transform: translate(0, 18px); }
  83% { transform: translate(6px, 18px); }
}
@keyframes glyph-split-up {
  to { transform: translateY(-6px); }
}
@keyframes glyph-split-down {
  to { transform: translateY(6px); }
}
@keyframes glyph-draw {
  0% { stroke-dashoffset: 1; }
  55%, 85% { stroke-dashoffset: 0; }
  100% { stroke-dashoffset: 0; opacity: 0; }
}
@keyframes glyph-search {
  0%, 100% { transform: translate(0, 0); }
  33% { transform: translate(9px, 3px); }
  66% { transform: translate(3px, 8px); }
}
@keyframes glyph-mark {
  0% { transform: scaleX(0); }
  60%, 100% { transform: scaleX(1); }
}
@keyframes glyph-tilt {
  from { transform: rotate(-7deg); }
  to { transform: rotate(7deg); }
}

/* Phones and narrow windows: the rail becomes a top bar and glyphs move to the headings. */
@media (max-width: 960px) {
  :root {
    --rail-width: 0px;
  }
  html {
    scroll-padding-top: 76px;
  }
  .rail {
    position: sticky;
    inset: auto;
    top: 0;
    width: auto;
    z-index: 5;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
  }
  .brand .mark {
    width: 28px;
    height: 28px;
  }
  .rail-note,
  .stage-index {
    display: none;
  }
  .rail-cta {
    margin: 0;
    padding: 8px 12px;
    font-size: 13px;
  }
  main {
    margin-left: 0;
    padding: 0 16px;
  }
  .intro {
    min-height: auto;
    padding: 48px 0 40px;
  }
  .stage {
    padding: 52px 0;
  }
  .stage h2 .glyph {
    display: block;
  }
  .check header,
  .outcome header {
    flex-direction: column;
    gap: 8px;
  }
  .capture > div {
    grid-template-columns: 1fr;
    gap: 2px;
  }
  .details {
    margin-left: 0;
  }
  .reviews th,
  .reviews td {
    padding: 10px 12px;
  }
  .built-with {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
  .js .evidence mark {
    background-size: 100% 100%;
  }
}
