:root {
  --bg: #fbfbf9;
  --surface: #ffffff;
  --text: #1c1c1a;
  --muted: #5d5d58;
  --line: #e2e1dc;
  --accent: #b45309;
  --accent-soft: rgba(180, 83, 9, 0.09);
  --ok: #217a45;
  --ok-soft: rgba(33, 122, 69, 0.12);
  --term-bg: #17181b;
  --term-text: #e6e6e3;
  --term-dim: #9a9a95;
  --band-bg: #17181b;
  --band-text: #f3f3f1;
  --band-muted: #a9a9a3;
  --band-accent: #f7c164;
  --mono:
    ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  --sans:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto,
    "Helvetica Neue", Arial, sans-serif;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121315;
    --surface: #1a1b1e;
    --text: #ececea;
    --muted: #a4a49f;
    --line: #2c2d31;
    --accent: #f5a524;
    --accent-soft: rgba(245, 165, 36, 0.12);
    --ok: #63c58b;
    --ok-soft: rgba(99, 197, 139, 0.14);
    --term-bg: #0b0c0d;
    --band-bg: #0b0c0d;
  }
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 72px;
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--accent);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}
a:focus-visible,
.btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip {
  position: absolute;
  left: 8px;
  top: -48px;
  z-index: 20;
  padding: 8px 14px;
  border-radius: 4px;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
}
.skip:focus {
  top: 8px;
}

code {
  font-family: var(--mono);
  font-size: 0.88em;
}
p code,
li code,
figcaption code,
h3 code {
  background: var(--accent-soft);
  padding: 0.1em 0.35em;
  border-radius: 4px;
}

.wrap {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

/* nav */
.nav {
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
  gap: 16px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -0.01em;
}
.brand:hover {
  text-decoration: none;
}
nav {
  display: flex;
  gap: 22px;
  font-size: 15px;
  align-items: center;
}
nav a {
  color: var(--muted);
}
nav a:hover {
  color: var(--text);
  text-decoration: none;
}
nav .gh {
  color: var(--text);
  font-weight: 600;
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--surface);
}
nav .gh:hover {
  border-color: var(--muted);
}

/* hero */
.hero {
  padding: 80px 24px 48px;
  position: relative;
}

.preview {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 22px;
  padding: 4px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font-size: 13px;
}
.preview .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 0 3px var(--ok-soft);
}
.eyebrow {
  margin: 0 0 8px;
  color: var(--band-muted);
  font-weight: 500;
  font-size: 14px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
h1 {
  margin: 0;
  max-width: 20ch;
  font-size: clamp(40px, 6.6vw, 64px);
  line-height: 1.02;
  font-weight: 600;
  letter-spacing: -0.035em;
}
h1 .hl {
  color: var(--accent);
}
.lead {
  max-width: 60ch;
  margin: 24px 0 30px;
  color: var(--muted);
  font-size: 16px;
}
.lead strong {
  color: var(--text);
}
.cta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.btn {
  display: inline-block;
  padding: 11px 20px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--surface);
  color: var(--text);
  font-weight: 500;
  font-size: 14px;
}
.btn:hover {
  text-decoration: none;
  border-color: var(--muted);
}
.btn.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  box-shadow: 0 6px 18px -8px var(--accent);
}
.btn.primary:hover {
  filter: brightness(1.08);
}
@media (prefers-color-scheme: dark) {
  .btn.primary {
    color: #0b0c0d;
  }
}

.facts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin: 22px 0 0;
  padding: 0;
  list-style: none;
  color: var(--muted);
  font-size: 14px;
}
.facts li::before {
  content: "✓";
  margin-right: 6px;
  color: var(--ok);
  font-weight: 700;
}

/* history diagram */
.history {
  margin: 48px 0 0;
  padding: 28px 28px 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 20px 50px -30px rgba(0, 0, 0, 0.25);
}
.hist {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}
.hist-m {
  display: none;
}
.hist-m text {
  font-size: 8px;
}
.hist-m .rowlab .big {
  font-size: 17px;
}
.hist-m .pill text,
.hist-m .passlab text {
  font-size: 11px;
}
.hist-m .clab text:last-child {
  text-anchor: end;
}
.hist text.start {
  text-anchor: start;
}
.hist text.end {
  text-anchor: end;
}
.hist text {
  font-family: var(--sans);
  fill: var(--muted);
  font-size: 15px;
}
.hist .rowlab .big {
  fill: var(--text);
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.hist .rowlab .big.acc {
  fill: var(--accent);
}
.hist .rowlab .sub {
  font-size: 14px;
}
.hist .gitline {
  stroke: var(--text);
  stroke-width: 3;
  opacity: 0.8;
}
.hist .commits circle {
  fill: var(--surface);
  stroke: var(--text);
  stroke-width: 3.5;
}
.hist .clab text {
  fill: var(--text);
  font-weight: 600;
  text-anchor: middle;
}
.hist .boundary {
  stroke: var(--line);
  stroke-width: 1.5;
  stroke-dasharray: 5 6;
}
.hist .pill rect {
  fill: var(--bg);
  stroke: var(--line);
}
.hist .pill text {
  text-anchor: middle;
  font-size: 13px;
  font-weight: 600;
}
.hist .link {
  fill: none;
  stroke: var(--muted);
  stroke-width: 1.5;
  stroke-dasharray: 3 5;
}
.hist .trace {
  fill: none;
  stroke: var(--accent);
  stroke-width: 2.5;
  opacity: 0.45;
}
.hist .trace.fork {
  opacity: 0.35;
  stroke-dasharray: 6 4;
}
.hist .ck {
  fill: var(--accent);
}
.hist .ck.fk {
  fill: var(--surface);
  stroke: var(--accent);
  stroke-width: 2;
}
.hist .ck.pass {
  fill: var(--ok);
  stroke: var(--surface);
  stroke-width: 2.5;
}
.hist .passlab path {
  stroke: var(--ok);
  stroke-width: 1.5;
}
.hist .passlab rect {
  fill: var(--ok-soft);
  stroke: var(--ok);
}
.hist .passlab text {
  fill: var(--ok);
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 600;
  text-anchor: middle;
}
.hist .note-l {
  font-size: 14px;
  fill: var(--text);
}
.hist .note-l.dimmer {
  fill: var(--muted);
}
.hist .note-c {
  font-size: 14px;
  text-anchor: middle;
}

@media (prefers-reduced-motion: no-preference) {
  .hist .ck {
    animation: pop 0.45s cubic-bezier(0.2, 0.8, 0.3, 1.4) both;
    animation-delay: calc(var(--i) * 45ms + 200ms);
    transform-box: fill-box;
    transform-origin: center;
  }
  @keyframes pop {
    from {
      opacity: 0;
      transform: scale(0.2);
    }
    to {
      opacity: 1;
      transform: scale(1);
    }
  }
}

.history figcaption {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
}
.history .k {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.sw {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex: none;
}
.sw.commit {
  border: 3px solid var(--text);
}
.sw.ck {
  background: var(--accent);
}
.sw.pass {
  background: var(--ok);
}
.sw.fk {
  border: 2px solid var(--accent);
}

.term {
  margin: 0;
  padding: 18px 20px;
  overflow-x: auto;
  border-radius: 4px;
  background: var(--term-bg);
  color: var(--term-text);
  font: 14px/1.65 var(--mono);
}
.term code {
  font-size: inherit;
  background: none;
  padding: 0;
  border-radius: 0;
}
.term .p {
  color: var(--term-dim);
  user-select: none;
}
.term .dim {
  color: var(--term-dim);
}
.term .ok {
  color: #7fd6a0;
}

/* numbers band */
.band {
  margin: 24px 0 16px;
  padding: 56px 0 44px;
  background: var(--band-bg);
  color: var(--band-text);
}
.band-title {
  margin: 0 0 28px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--band-muted);
}
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  margin: 0;
}
.stats > div {
  display: flex;
  flex-direction: column-reverse;
  justify-content: flex-end;
  padding: 0 24px;
  border-left: 1px solid rgba(255, 255, 255, 0.12);
}
.stats > div:first-child {
  padding-left: 0;
  border-left: 0;
}
.stats dd {
  margin: 0 0 8px;
  font-size: clamp(32px, 5.4vw, 46px);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
  color: var(--band-text);
}
.stats dd span {
  margin-left: 6px;
  font-size: 0.42em;
  font-weight: 600;
  letter-spacing: 0;
  color: var(--band-accent);
}
.stats dt {
  color: var(--band-muted);
  font-size: 14px;
  line-height: 1.45;
}
.band-note {
  margin: 32px 0 0;
  color: var(--band-muted);
  font-size: 13px;
}
.band-note code {
  background: rgba(255, 255, 255, 0.08);
  padding: 0.1em 0.35em;
  border-radius: 4px;
  color: var(--band-text);
}
.band-note a {
  color: var(--band-accent);
  margin-left: 4px;
}

/* sections */
section {
  padding-top: 48px;
  padding-bottom: 48px;
}
main > section.wrap {
  padding-top: 56px;
  padding-bottom: 56px;
}
main > section.hero {
  padding: 80px 24px 48px;
}
main > section.note {
  padding-top: 0;
}
main > section.problem {
  padding-top: 72px;
}
.kicker {
  margin: 0 0 10px;
  color: var(--accent);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.section {
  margin: 0 0 26px;
  max-width: 36ch;
  font-size: clamp(22px, 3.4vw, 40px);
  font-weight: 500;
  letter-spacing: -0.025em;
  line-height: 1.15;
  text-wrap: balance;
}
.wide {
  max-width: 68ch;
  color: var(--muted);
}
.small {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 14px;
}

/* problem */
.cols {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 40px;
  align-items: start;
}
.cols .wide {
  margin: 0;
  font-size: 18px;
}
.pains {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
}
.pains li {
  position: relative;
  padding: 14px 18px 14px 50px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--surface);
  color: var(--muted);
  font-size: 15px;
}
.pains li::before {
  content: "✕";
  position: absolute;
  left: 16px;
  top: 13px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(200, 60, 50, 0.1);
  color: #c43c32;
  font-size: 8px;
  font-weight: 700;
  line-height: 22px;
  text-align: center;
}
.pains strong {
  color: var(--text);
}

/* split */
.split {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.split > div {
  padding: 20px 22px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--surface);
}
.split h3 {
  margin: 0 0 6px;
  font-size: 16px;
}
.split p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
}
.split .accent {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.concepts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 16px;
}
.concepts article {
  position: relative;
  padding: 22px;
  border-radius: 4px;
  background: var(--surface);
  border: 1px solid var(--line);
}
.concepts .num {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  margin-bottom: 10px;
  border-radius: 4px;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  font-size: 14px;
}
@media (prefers-color-scheme: dark) {
  .concepts .num {
    color: #0b0c0d;
  }
}
.concepts h3 {
  margin: 0 0 6px;
  font-size: 16px;
}
.concepts p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
}
.concepts strong {
  color: var(--text);
  font-weight: 600;
}

.example {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
  margin-top: 40px;
}
.example-text {
  max-width: 72ch;
}
.example h3 {
  margin: 0 0 8px;
  font-size: 20px;
  letter-spacing: -0.01em;
}
.example p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
}
.example .term {
  min-width: 0;
}

.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.grid.two {
  grid-template-columns: repeat(2, 1fr);
}
.grid.feat {
  grid-template-columns: repeat(3, 1fr);
}
.grid article {
  padding: 20px 22px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--surface);
}
.grid h3 {
  margin: 0 0 6px;
  font-size: 17px;
}
.grid p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
}
.grid .cta-card {
  border-color: var(--accent);
  background: var(--accent-soft);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}
.grid .cta-card h3,
.grid .cta-card p {
  margin: 0;
}
.feat .ico {
  display: inline-grid;
  place-items: center;
  width: 26px;
  height: 26px;
  margin-right: 10px;
  border-radius: 4px;
  background: var(--ok-soft);
  color: var(--ok);
  font-size: 14px;
  vertical-align: -5px;
}

/* diagram */
.diagram {
  margin: 0;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}
.diagram svg {
  display: block;
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  height: auto;
}
.diagram figcaption {
  margin-top: 14px;
  color: var(--muted);
  font-size: 15px;
}
.diagram .edges path {
  stroke: var(--muted);
  stroke-width: 1.25;
}
.diagram .mk {
  fill: var(--muted);
}
.diagram rect {
  fill: none;
  stroke: var(--line);
  stroke-width: 1.5;
}
.diagram .main rect {
  fill: var(--accent-soft);
  stroke: var(--accent);
  stroke-width: 2;
}
.diagram text {
  fill: var(--muted);
  font: 12px var(--sans);
  text-anchor: middle;
}
.diagram text.name {
  fill: var(--text);
  font-size: 13px;
  font-weight: 600;
}
.diagram .main text {
  fill: var(--text);
}
.diagram .label text.start {
  text-anchor: start;
}

/* agents + server */
.agents {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 20px 40px;
  align-items: start;
}
.agents .term {
  grid-column: 1 / -1;
}
.agents .wide {
  margin-top: 0;
}
.agents .term {
  min-width: 0;
  white-space: pre;
}
.ticks {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
}
.ticks li {
  position: relative;
  padding-left: 30px;
  font-size: 14px;
}
.ticks li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 1px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--ok-soft);
  color: var(--ok);
  font-size: 8px;
  font-weight: 700;
  line-height: 20px;
  text-align: center;
}
.server {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  align-items: center;
  padding: 32px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}
.server .section {
  margin-bottom: 8px;
}
.server .wide {
  margin: 0;
}

/* steps */
.steps {
  margin: 0 0 18px;
  padding: 0;
  list-style: none;
  counter-reset: step;
  display: grid;
  gap: 18px;
}
.steps {
  grid-template-columns: minmax(0, 1fr);
}
.steps li {
  counter-increment: step;
  min-width: 0;
}
.steps h3 {
  margin: 0 0 8px;
  font-size: 16px;
}
.steps h3::before {
  content: counter(step);
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  margin-right: 10px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 13px;
}

/* table */
.table {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
}
th,
td {
  padding: 8px 18px;
  text-align: left;
  border-bottom: 1px solid var(--line);
}
tbody tr:last-child td {
  border-bottom: 0;
}
th {
  color: var(--muted);
  font-weight: 600;
  font-size: 14px;
}
td:not(:first-child),
th:not(:first-child) {
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

/* final cta */
.final-inner {
  padding: 48px 40px;
  border-radius: 8px;
  background:
    linear-gradient(135deg, var(--accent-soft), transparent 70%), var(--surface);
  border: 1px solid var(--accent);
  text-align: center;
}
.final-inner h2 {
  margin: 0 0 8px;
  font-size: clamp(28px, 3.6vw, 42px);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.1;
}
.final-inner p {
  margin: 0 0 24px;
  color: var(--muted);
}
.final-inner .cta {
  justify-content: center;
}

.note {
  padding-top: 0;
}
.note p {
  margin: 0;
  padding: 18px 22px;
  border-left: 3px solid var(--accent);
  border-radius: 0 4px 4px 0;
  background: var(--accent-soft);
  font-size: 15px;
}

.foot {
  padding-top: 32px;
  padding-bottom: 48px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
}
.foot p {
  margin: 6px 0;
}

@media (max-width: 960px) {
  .stats {
    grid-template-columns: repeat(2, 1fr);
    row-gap: 32px;
  }
  .stats > div:nth-child(3) {
    padding-left: 0;
    border-left: 0;
  }
  .grid.feat {
    grid-template-columns: repeat(2, 1fr);
  }
  .agents,
  .cols {
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
  }
}

@media (max-width: 820px) {
  .split,
  .grid,
  .grid.two,
  .grid.feat,
  .concepts,
  .server {
    grid-template-columns: 1fr;
  }
  nav a:not(.gh) {
    display: none;
  }
  main > section.hero {
    padding-top: 48px;
  }
  main > section.wrap {
    padding-top: 40px;
    padding-bottom: 40px;
  }
  .lead {
    font-size: 16px;
  }
  .diagram {
    padding: 8px;
  }
  .history {
    margin-top: 36px;
    padding: 16px 14px 14px;
  }
  .server {
    padding: 22px;
  }
  .final-inner {
    padding: 36px 20px;
  }
}

@media (max-width: 600px) {
  .hist-d {
    display: none;
  }
  .hist-m {
    display: block;
  }
}

@media (max-width: 480px) {
  .stats {
    grid-template-columns: 1fr;
  }
  .stats > div {
    padding: 0;
    border-left: 0;
  }
  .btn {
    flex: 1 1 auto;
    text-align: center;
  }
  .cta .btn {
    min-width: 46%;
  }
}

/* GitStory: blame-to-story hero figure */
.storyfig {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: 20px;
  align-items: stretch;
  margin: 48px 0 0;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 20px 50px -30px rgba(0, 0, 0, 0.25);
}
.storyfig .term {
  font-size: 13px;
}
.code {
  margin: 0;
  padding: 14px 0;
  overflow-x: auto;
  border-radius: 4px;
  background: var(--term-bg);
  color: var(--term-text);
  font: 13px/1.7 var(--mono);
}
.code .l {
  display: block;
  padding: 0 16px 0 0;
  white-space: pre;
}
.code .ln {
  display: inline-block;
  width: 3.2em;
  padding-right: 1em;
  text-align: right;
  color: var(--term-dim);
  user-select: none;
}
.code .hit {
  background: rgba(245, 165, 36, 0.16);
  box-shadow: inset 3px 0 0 #f5a524;
}
.code .kw {
  color: #f7c164;
}
.code .cm {
  color: var(--term-dim);
}
.fig-stack {
  display: grid;
  gap: 12px;
  align-content: start;
}
.story {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 20px 22px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--bg);
  font-size: 14px;
}
.story-head {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  align-items: center;
  color: var(--muted);
  font: 12px/1.4 var(--mono);
}
.badge {
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--ok-soft);
  color: var(--ok);
  font: 600 11px/1.6 var(--sans);
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.badge.old {
  background: var(--line);
  color: var(--muted);
}
.story h3 {
  margin: 0;
  font-size: 16px;
  line-height: 1.4;
}
.story h4 {
  margin: 4px 0 2px;
  color: var(--muted);
  font: 600 11px/1.4 var(--sans);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.story ul {
  margin: 0;
  padding: 0;
  list-style: none;
}
.story li {
  position: relative;
  margin: 4px 0;
  padding-left: 18px;
  line-height: 1.5;
}
.story li::before {
  position: absolute;
  left: 0;
  font-weight: 700;
}
.story .dec li::before {
  content: "✓";
  color: var(--ok);
}
.story .rej li::before {
  content: "✕";
  color: #c2410c;
}
.story .unk li::before {
  content: "?";
  color: var(--accent);
}
.cite {
  margin-left: 4px;
  color: var(--muted);
  font: 11px var(--mono);
  white-space: nowrap;
}
.fig-caption {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

/* supersession chain */
.chain {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
}
.chain li {
  position: relative;
  padding: 18px 22px 18px 0;
}
.chain li + li {
  padding-left: 22px;
  border-left: 1px dashed var(--line);
}
.chain .tag {
  display: inline-block;
  margin-bottom: 8px;
}
.chain h3 {
  margin: 0 0 6px;
  font-size: 16px;
}
.chain p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}
.chain .now h3 {
  color: var(--accent);
}

@media (max-width: 960px) {
  .storyfig {
    grid-template-columns: minmax(0, 1fr);
  }
}
@media (max-width: 820px) {
  .storyfig {
    margin-top: 36px;
    padding: 14px;
  }
  .chain {
    grid-template-columns: 1fr;
  }
  .chain li,
  .chain li + li {
    padding: 14px 0;
    border-left: 0;
    border-top: 1px dashed var(--line);
  }
}

/* with / without */
.versus {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  margin-top: 28px;
}
.versus article {
  padding: 24px 26px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}
.versus .with {
  border-color: var(--accent);
  background: linear-gradient(135deg, var(--accent-soft), transparent 70%), var(--surface);
}
.versus h3 {
  margin: 0 0 14px;
}
.vs-tag {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(194, 65, 12, 0.12);
  color: #c2410c;
  font: 600 12px/1.6 var(--sans);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.with .vs-tag {
  background: var(--ok-soft);
  color: var(--ok);
}
.versus ol {
  margin: 0;
  padding-left: 22px;
}
.versus li {
  margin: 8px 0;
  line-height: 1.55;
}
.versus li::marker {
  color: var(--muted);
  font-weight: 600;
}
.without li:last-child {
  color: #c2410c;
  font-weight: 600;
}
.with li:last-child {
  color: var(--ok);
  font-weight: 600;
}
#ghf .split {
  margin-bottom: 24px;
}
@media (prefers-color-scheme: dark) {
  .vs-tag,
  .without li:last-child {
    color: #fb923c;
  }
}
@media (max-width: 820px) {
  .versus {
    grid-template-columns: 1fr;
  }
}
#ghf .grid.feat {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
@media (max-width: 820px) {
  #ghf .grid.feat {
    grid-template-columns: 1fr;
  }
}
