/* Roundtable Work site: static styles. System fonts only, no external resources.
   One type scale, one accent, three radii, one spacing scale. */

:root {
  color-scheme: light dark;
  --bg: #fbfaf7;
  --surface: #ffffff;
  --surface-2: #f3f0e9;
  --ink: #1c1b18;
  --muted: #55514a;
  --line: #8a857a;
  --soft-line: #ddd8cc;
  --accent: #b4440a;
  --accent-tint: #fdeee3;
  --on-accent: #ffffff;
  --good: #1b7241;
  --good-tint: #e2f3e9;
  --warn: #8a5600;
  --warn-tint: #fcf0d0;
  --info: #1d5fa8;
  --info-tint: #e2edf9;
  --bad: #ad2b24;
  --bad-tint: #fbe5e2;
  --focus: #0a58ca;
  --t-sm: 0.875rem;
  --t-base: 1rem;
  --t-lg: 1.125rem;
  --t-xl: 1.5rem;
  --t-2xl: clamp(1.875rem, 1.2rem + 2.2vw, 2.75rem);
  --s-1: 0.25rem;
  --s-2: 0.5rem;
  --s-3: 0.75rem;
  --s-4: 1rem;
  --s-5: 1.5rem;
  --s-6: 2.5rem;
  --s-7: 4rem;
  --r-1: 0.5rem;
  --r-2: 0.875rem;
  --r-3: 1.25rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #131210;
    --surface: #1c1b18;
    --surface-2: #26241f;
    --ink: #f3f0e9;
    --muted: #bcb7ab;
    --line: #8a857a;
    --soft-line: #35332d;
    --accent: #f29158;
    --accent-tint: #33221a;
    --on-accent: #1a0e07;
    --good: #72d6a0;
    --good-tint: #16291f;
    --warn: #f1c25c;
    --warn-tint: #2e2510;
    --info: #8fbcf2;
    --info-tint: #14243a;
    --bad: #ff9d96;
    --bad-tint: #3a1d1b;
    --focus: #8ec5ff;
  }
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

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

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 1rem/1.65 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  overflow-wrap: break-word;
}

.wrap { width: 100%; max-width: 76rem; margin-inline: auto; padding-inline: clamp(1rem, 4vw, 2rem); }

h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 var(--s-3); letter-spacing: -0.012em; }
h1 { font-size: var(--t-2xl); line-height: 1.1; letter-spacing: -0.03em; margin: 0; }
h2 { font-size: clamp(1.5rem, 1.2rem + 1.4vw, 2rem); letter-spacing: -0.02em; }
h3 { font-size: var(--t-lg); margin-top: var(--s-5); }
h4 { font-size: var(--t-base); }
p, ul, ol, dl { margin: 0 0 var(--s-4); }
a { color: var(--accent); text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 0.15em; }
code, .contract {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  font-size: 0.9em;
  overflow-wrap: anywhere;
}
code { background: var(--surface-2); padding: 0.05em 0.35em; border-radius: 0.3rem; }
.contract { background: var(--surface-2); padding: 0.05em 0.35em; border-radius: 0.3rem; font-weight: 600; }
.muted { color: var(--muted); }

:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 0.25rem; }
main:focus { outline: none; }

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

.skip-link {
  position: absolute; left: 0.5rem; top: -4rem; z-index: 10;
  background: var(--accent); color: var(--on-accent); padding: 0.6rem 1rem; border-radius: var(--r-1); font-weight: 600;
}
.skip-link:focus { top: 0.5rem; }

/* Header: brand, navigation, then the first sentences */
.topbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s-1) var(--s-5); padding-block: var(--s-3); }
.brand { display: inline-flex; align-items: center; gap: var(--s-2); margin: 0; font-weight: 700; letter-spacing: -0.01em; }
.brand::before { content: ""; width: 0.75rem; height: 0.75rem; border-radius: 50%; background: var(--accent); }
.nav-list { display: flex; flex-wrap: wrap; gap: 0 var(--s-1); list-style: none; padding: 0; margin: 0; }
.nav-list a {
  display: inline-flex; align-items: center; min-height: 2.25rem; padding: 0 var(--s-3); border-radius: 999px;
  color: var(--muted); font-size: var(--t-sm); font-weight: 600; text-decoration: none;
}
.nav-list a:hover { color: var(--ink); background: var(--surface-2); }
.hero { display: grid; gap: var(--s-3) var(--s-6); padding-block: var(--s-3) var(--s-4); align-items: start; }
.hero .lead { margin: 0; }
.lead { font-size: var(--t-base); line-height: 1.55; max-width: 46rem; }
.status-note {
  max-width: 46rem; margin: var(--s-3) 0 0; padding: 0 0 0 var(--s-4); border-left: 3px solid var(--accent);
  color: var(--muted); font-size: var(--t-sm);
}

.banner {
  border: 2px solid var(--warn); background: var(--warn-tint); color: var(--ink);
  border-radius: var(--r-1); padding: var(--s-3) var(--s-4); max-width: 56rem;
}
.banner strong::before { content: "◐ "; content: "◐ " / ""; color: var(--warn); }

main section { padding-block: var(--s-6); border-top: 1px solid var(--soft-line); scroll-margin-top: var(--s-4); }
main section:first-child { border-top: 0; padding-top: var(--s-2); padding-bottom: var(--s-5); }
.section-lead { font-size: var(--t-lg); max-width: 50rem; color: var(--muted); }
.callout {
  max-width: 56rem; padding: var(--s-3) var(--s-4); border: 1px solid var(--soft-line); border-left: 4px solid var(--accent);
  background: var(--surface); border-radius: 0 var(--r-1) var(--r-1) 0;
}
.callout-strong { background: var(--accent-tint); border-color: var(--accent); }

/* Cards */
.cards { list-style: none; padding: 0; display: grid; gap: var(--s-4); grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr)); }
.card { background: var(--surface); border: 1px solid var(--soft-line); border-radius: var(--r-2); padding: var(--s-4) var(--s-5); min-width: 0; }
.card > :last-child { margin-bottom: 0; }
.card h3, .card h4 { margin-top: 0; }
.where { color: var(--muted); font-size: var(--t-sm); }
.compare { display: grid; gap: var(--s-4); grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr)); margin-bottom: var(--s-4); }
.facts-grid { display: grid; gap: var(--s-2); margin-bottom: var(--s-3); }
.facts-grid > div { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0 var(--s-3); border-top: 1px solid var(--soft-line); padding-top: var(--s-2); }
.facts-grid dt { color: var(--muted); font-weight: 600; }
.facts-grid dd { margin: 0; text-align: right; }
.tier-lead { font-weight: 600; }
.tier-when { margin-bottom: 0; }
.rules { max-width: 50rem; padding-left: var(--s-5); }
.rules li { margin-bottom: var(--s-1); }
.journey { list-style: none; counter-reset: journey; display: grid; gap: var(--s-3); grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr)); padding: 0; }
.journey li { counter-increment: journey; position: relative; padding: var(--s-3) var(--s-4) var(--s-3) 3rem; border: 1px solid var(--soft-line); border-radius: var(--r-2); background: var(--surface); }
.journey li::before {
  content: counter(journey); position: absolute; left: var(--s-3); top: var(--s-3); width: 1.75rem; height: 1.75rem;
  display: grid; place-items: center; border-radius: 50%; background: var(--accent); color: var(--on-accent); font-weight: 700; font-size: var(--t-sm);
}
.phases { list-style: none; counter-reset: phase; display: grid; gap: var(--s-4); grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr)); padding: 0; }
.phases li { counter-increment: phase; }
.phases h4::before { content: "Phase " counter(phase) ": "; color: var(--accent); }

/* Status chips: glyph plus text, never colour alone */
.status, .mod-status {
  display: inline-flex; align-items: center; gap: 0.35em; font-size: var(--t-sm); font-weight: 600; line-height: 1.4;
  color: var(--c); background: var(--c-tint); padding: 0.1em 0.65em; border-radius: 999px; width: fit-content; max-width: 100%;
}
.mod-status { background: none; padding: 0; border-radius: 0; }
.st-implemented { --c: var(--good); --c-tint: var(--good-tint); }
.st-partial { --c: var(--warn); --c-tint: var(--warn-tint); }
.st-library-only { --c: var(--info); --c-tint: var(--info-tint); }
.st-missing { --c: var(--bad); --c-tint: var(--bad-tint); }

.key { list-style: none; padding: 0; margin: 0 0 var(--s-4); display: grid; gap: var(--s-2) var(--s-4); grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr)); }
.key-item { display: grid; gap: 0 var(--s-2); grid-template-columns: auto 1fr; align-items: center; }
.key-count { font-weight: 600; font-size: var(--t-sm); }
.key-meaning { grid-column: 1 / -1; color: var(--muted); font-size: var(--t-sm); }

/* Architecture diagram: grey lanes of white module buttons, joined by arrows (composition after the Anthropic architecture figures) */
.arch-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: var(--s-2) var(--s-5); margin-bottom: var(--s-4); }
.arch-head h2 { margin: 0; }
.legend-row { list-style: none; display: flex; flex-wrap: wrap; gap: var(--s-2); padding: 0; margin: 0; }
.legend-row li { display: inline-flex; align-items: center; gap: var(--s-1); font-size: var(--t-sm); font-weight: 600; }
.arch-hint { margin: 0 0 var(--s-3); max-width: 60rem; color: var(--muted); font-size: var(--t-sm); }
.lanes { display: grid; gap: 0; grid-template-columns: minmax(0, 1fr); }
.lane { background: var(--surface-2); border-radius: var(--r-3); padding: var(--s-3); min-width: 0; }
.lane-title { display: flex; align-items: center; gap: var(--s-2); margin: 0 0 var(--s-3); font-size: var(--t-sm); font-weight: 700; line-height: 1.3; }
.lane-no {
  flex: none; display: inline-grid; place-items: center; width: 1.5rem; height: 1.5rem; border-radius: 50%;
  background: var(--accent); color: var(--on-accent); font-size: var(--t-sm); font-weight: 700;
}
.lane-note { margin: var(--s-3) 0 0; color: var(--muted); font-size: var(--t-sm); }
.mods { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--s-2); grid-template-columns: minmax(0, 1fr); }
.mods > li { min-width: 0; }
.mods-ordered { counter-reset: stage; }
.mods-ordered > li { counter-increment: stage; }
.mods-ordered .mod-name { display: flex; gap: 0.35em; }
.mods-ordered .mod-name::before { content: counter(stage) "."; color: var(--accent); flex: none; }
.lane-wide { margin-top: var(--s-3); }
.lane-wide .mods { grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr)); }
.chips { list-style: none; display: flex; flex-wrap: wrap; gap: var(--s-1); padding: 0; margin: var(--s-2) 0 0; }
.chips li { font-size: var(--t-sm); color: var(--c); white-space: nowrap; }
.chips code { background: var(--surface); border: 1px solid var(--soft-line); color: var(--ink); }

.mod {
  display: flex; flex-direction: column; align-items: flex-start; gap: var(--s-1); width: 100%; min-height: 2.75rem;
  padding: var(--s-2) var(--s-3); text-align: left; font: inherit; line-height: 1.3; color: var(--ink); cursor: pointer;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-1);
}
.mod:hover { border-color: var(--accent); }
.mod[aria-expanded="true"] { border-color: var(--accent); background: var(--accent-tint); box-shadow: inset 0 0 0 1px var(--accent); }
.mod-name { font-weight: 600; line-height: 1.3; display: block; }
.mod-label { display: inline-block; }
.mod-label::first-letter { text-transform: uppercase; }

.link { display: flex; flex-direction: column; align-items: center; justify-content: center; padding-block: var(--s-1); color: var(--accent); font-size: var(--t-sm); font-weight: 600; text-align: center; }
.link-arrow { position: relative; display: block; width: 2px; height: 1.5rem; background: var(--accent); }
.link-arrow::after {
  content: ""; position: absolute; left: 50%; bottom: 0; width: 0.6rem; height: 0.6rem;
  border-right: 2px solid var(--accent); border-bottom: 2px solid var(--accent); transform: translate(-50%, 0) rotate(45deg);
}
.return { margin: var(--s-3) 0 0; padding: 0 var(--s-3); color: var(--muted); font-size: var(--t-sm); font-weight: 600; text-align: center; }

.panel-slot { margin-top: var(--s-3); }
.panel {
  background: var(--surface); border: 2px solid var(--accent); border-radius: var(--r-2);
  padding: var(--s-4) var(--s-5); margin-block: var(--s-3);
}
.panel > :last-child { margin-bottom: 0; }
.panel h4 { margin: 0 0 var(--s-2); font-size: var(--t-xl); }
.panel-meaning { color: var(--muted); }
.panel-body { display: grid; gap: var(--s-2) var(--s-5); grid-template-columns: minmax(0, 1fr); }
.panel dl { margin: 0; }
.panel dt, .panel-label { color: var(--muted); font-size: var(--t-sm); font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; }
.panel dd { margin: 0 0 var(--s-3); }
.paths { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--s-1); }
.paths code { display: inline-block; overflow-wrap: break-word; }

.module-index { margin-top: var(--s-5); }
.module-index > summary { cursor: pointer; font-weight: 700; min-height: 2.75rem; display: flex; align-items: center; }

/* Definition lists and flow (walkthrough) */
.defs { display: grid; gap: var(--s-3); grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr)); }
.defs > div { background: var(--surface); border: 1px solid var(--soft-line); border-radius: var(--r-1); padding: var(--s-3) var(--s-4); }
.defs dt { font-weight: 700; margin-bottom: var(--s-1); }
.defs dd { margin: 0; color: var(--muted); }
.defs .is-demo { border: 2px solid var(--warn); background: var(--warn-tint); }
.defs .is-demo dd { color: var(--ink); }

.flow { list-style: none; counter-reset: flow; display: flex; flex-wrap: wrap; gap: var(--s-2); padding: 0; }
.flow li {
  counter-increment: flow; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-1);
  padding: var(--s-1) var(--s-3); min-height: 2.75rem; display: inline-flex; align-items: center; gap: var(--s-2);
}
.flow li::before { content: counter(flow); font-weight: 700; color: var(--accent); }
.flow li:not(:last-child)::after { content: "→"; content: "→" / ""; color: var(--muted); margin-left: var(--s-1); }
.flow li:last-child { border-style: dashed; }

.roles { list-style: none; padding: 0; display: grid; gap: var(--s-4); grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr)); }
.role { background: var(--surface); border: 1px solid var(--soft-line); border-top: 4px solid var(--accent); border-radius: var(--r-2); padding: var(--s-4); }
.role h4 { margin-top: 0; font-size: var(--t-lg); }
.role p { margin-bottom: var(--s-2); }
.role-tag { color: var(--muted); }

/* Badges: symbol plus text, never colour alone */
.badge {
  display: inline-flex; align-items: center; gap: 0.35em; padding: 0.1em 0.65em; border-radius: 999px;
  border: 1.5px solid currentColor; font-size: var(--t-sm); font-weight: 600; line-height: 1.5; white-space: nowrap;
}
.badge-flow, .badge-ok { color: var(--good); background: var(--good-tint); }
.badge-wait { color: var(--warn); background: var(--warn-tint); }
.badge-reject { color: var(--bad); background: var(--bad-tint); }
.legend { list-style: none; display: flex; flex-wrap: wrap; gap: var(--s-2); padding: 0; margin-bottom: var(--s-2); }
.legend-h { margin-top: var(--s-4); }
.legend-note { color: var(--muted); font-size: var(--t-sm); }

/* Buttons */
.btn {
  font: inherit; font-weight: 600; min-height: 2.75rem; min-width: 2.75rem; padding: var(--s-1) var(--s-4);
  background: var(--surface); color: var(--ink); border: 2px solid var(--line); border-radius: var(--r-1); cursor: pointer;
}
.btn:hover { border-color: var(--accent); }
.btn-primary { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.btn-small { min-height: 2.5rem; font-size: var(--t-sm); }
.btn[aria-disabled="true"], .btn:disabled { opacity: 1; background: var(--surface-2); color: var(--muted); border-style: dashed; cursor: not-allowed; }

/* Stepper */
.stepper { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-3); padding: clamp(0.75rem, 3vw, 1.5rem); }
.stepper-bar { margin-bottom: var(--s-4); }
.step-count { font-weight: 700; font-size: var(--t-lg); margin-bottom: var(--s-2); }
.controls { display: flex; flex-wrap: wrap; gap: var(--s-2); margin-bottom: var(--s-3); }
.note { color: var(--muted); font-size: var(--t-sm); margin-bottom: var(--s-1); }
.note strong { color: var(--ink); }

.walk { display: grid; gap: var(--s-5); grid-template-columns: minmax(0, 1fr); align-items: start; }

/* The walkthrough diagram is the stage (round table, absolutely positioned nodes) plus the "Outside the demo" box.
   The box is a normal-flow sibling BELOW the stage, never positioned over it, so it can never cover a node.
   test/site.test.mjs checks this and the node geometry for 320-480px viewports. */
.diagram { --kc: var(--good); --kt: var(--good-tint); width: 100%; max-width: 30rem; margin-inline: auto; }
.diagram[data-kind="wait"] { --kc: var(--warn); --kt: var(--warn-tint); }
.diagram[data-kind="reject"] { --kc: var(--bad); --kt: var(--bad-tint); }
.stage {
  position: relative; width: 100%; aspect-ratio: 1 / 1.2;
  background: var(--bg); border: 1px solid var(--soft-line); border-radius: var(--r-2);
}
.ring { position: absolute; left: 14%; top: 15%; width: 72%; aspect-ratio: 1; border: 2px dashed var(--line); border-radius: 50%; }
.ticket {
  position: absolute; left: 50%; top: 45%; transform: translate(-50%, -50%); width: 30%; text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 0.15rem; font-size: 0.8rem; color: var(--muted);
}
.ticket code { font-size: 0.85rem; color: var(--ink); }
.ticket-decision { min-height: 1.2em; }
.ticket-decision:not(:empty)::before { content: "decision: "; }

.slot-0 { --x: 50%; --y: 15%; }
.slot-1 { --x: 85%; --y: 30%; }
.slot-2 { --x: 85%; --y: 60%; }
.slot-3 { --x: 50%; --y: 75%; }
.slot-4 { --x: 15%; --y: 60%; }
.slot-5 { --x: 15%; --y: 30%; }
.slot-out { --x: 50%; --y: 100%; }

.node {
  position: absolute; left: var(--x); top: var(--y); transform: translate(-50%, -50%);
  width: 4.6rem; display: flex; flex-direction: column; align-items: center; gap: 0.1rem; text-align: center;
  font-size: 0.78rem; line-height: 1.2; color: var(--muted);
}
.node-shape {
  display: grid; place-items: center; width: 2.75rem; height: 2.75rem; border-radius: 50%;
  background: var(--surface); border: 2px solid var(--line); color: var(--ink); font-size: 1.1rem;
  transition: background-color 0.4s, border-color 0.4s, transform 0.4s;
}
.node-label { font-weight: 600; }
.now { display: none; font-weight: 800; color: var(--kc); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.06em; }
.node.is-active { color: var(--ink); }
.node.is-active .node-shape { border: 4px solid var(--kc); background: var(--kt); transform: scale(1.12); }
.node.is-active .now { display: block; }
.node.is-active .now::before { content: "▶ "; content: "▶ " / ""; }

.outside {
  position: static; margin-top: 0.6rem; display: flex; flex-direction: column; text-align: center;
  padding: 0.35rem 0.75rem; border: 2px dashed var(--line); border-radius: var(--r-1); font-size: 0.8rem; color: var(--muted);
  background: var(--surface);
}
.outside-title { font-weight: 700; color: var(--ink); }
.outside.is-active { border: 3px solid var(--kc); background: var(--kt); color: var(--ink); }
.outside.is-active .outside-title::before { content: "▶ "; content: "▶ " / ""; color: var(--kc); }

.token {
  position: absolute; left: var(--x); top: var(--y); z-index: 2; width: 1.9rem; height: 1.35rem;
  transform: translate(0.6rem, -2rem); background: var(--surface); border: 2px solid var(--kc); border-radius: 0.25rem;
  display: grid; place-items: center; transition: left 0.7s ease, top 0.7s ease;
}
.token.slot-out { transform: translate(-0.95rem, calc(-100% - 0.25rem)); }
.token-lines { width: 55%; height: 0.45rem; border-top: 2px solid var(--kc); border-bottom: 2px solid var(--kc); }

.detail { background: var(--bg); border: 1px solid var(--soft-line); border-radius: var(--r-2); padding: var(--s-4); min-width: 0; }
.detail > :last-child { margin-bottom: 0; }

.jumps { list-style: none; display: flex; flex-wrap: wrap; gap: var(--s-2); padding: 0; margin: var(--s-4) 0 var(--s-2); }
.dots { list-style: none; display: flex; flex-wrap: wrap; gap: 0.35rem; padding: 0; margin: 0; }
.dot {
  font: inherit; font-size: var(--t-sm); font-weight: 700; width: 2.5rem; height: 2.5rem; border-radius: var(--r-1);
  background: var(--surface); color: var(--ink); border: 2px solid var(--line); cursor: pointer;
}
.dot-wait { border-style: dashed; border-color: var(--warn); }
.dot-reject { border-color: var(--bad); border-width: 3px; }
.dot-ok { border-color: var(--good); border-width: 3px; }
.dot[aria-current="step"] { background: var(--accent); color: var(--on-accent); border-color: var(--accent); outline: 2px solid var(--ink); outline-offset: 1px; }
.dot[aria-current="step"]:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }

/* Steps */
.all-steps { margin-bottom: var(--s-4); }
.all-steps > summary { cursor: pointer; font-weight: 700; min-height: 2.75rem; display: flex; align-items: center; padding: var(--s-1) 0; }
.steps { list-style: none; padding: 0; display: grid; gap: var(--s-4); }
.step { background: var(--surface); border: 1px solid var(--soft-line); border-left: 6px solid var(--good); border-radius: var(--r-1); padding: var(--s-4); }
.step[data-kind="wait"] { border-left-color: var(--warn); border-left-style: dashed; }
.step[data-kind="reject"] { border-left-color: var(--bad); }
.detail .step-title, .step-title { margin-bottom: var(--s-2); }
.step-no { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; color: var(--accent); margin-right: 0.35rem; }
.step-meta { display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-4); align-items: center; color: var(--muted); font-size: var(--t-sm); }
.label { margin-bottom: var(--s-1); font-weight: 700; font-size: var(--t-sm); text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); }
.artifacts { padding-left: 1.2rem; }
.facts { display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-5); margin-bottom: 0; }
.facts dt { font-size: var(--t-sm); font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); }
.facts dd { margin: 0; }

.moments { display: grid; gap: var(--s-4); grid-template-columns: repeat(auto-fit, minmax(min(100%, 19rem), 1fr)); }
.moment { background: var(--surface); border: 1px solid var(--soft-line); border-radius: var(--r-2); padding: var(--s-4); }
.moment ul { padding-left: 1.2rem; margin-bottom: 0; }
.moment li { margin-bottom: var(--s-2); }

/* Tables */
.grid { width: 100%; border-collapse: collapse; background: var(--surface); border: 1px solid var(--soft-line); font-size: var(--t-sm); }
.grid caption { text-align: left; font-weight: 700; padding: var(--s-2) 0; }
.grid th, .grid td { text-align: left; vertical-align: top; padding: var(--s-3); border-top: 1px solid var(--soft-line); }
.grid thead th { background: var(--surface-2); border-top: 0; }
.grid tbody th { font-weight: 600; }
.grid tr.planned th { font-style: italic; }
.limits li { margin-bottom: var(--s-2); }

.site-footer { border-top: 1px solid var(--soft-line); padding-block: var(--s-5); color: var(--muted); }
.site-footer a { display: inline-block; min-height: 1.5rem; }

/* Medium screens: two columns of modules inside each stacked lane */
@media (min-width: 40rem) {
  .mods { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .panel-body { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); }
}

/* Wide screens: the five lanes sit side by side with arrows between them */
@media (min-width: 64rem) {
  .hero { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
  .lanes { grid-template-columns: minmax(0, 1.15fr) 3.5rem minmax(0, 1fr) 3.5rem minmax(0, 1.1fr) 3.5rem minmax(0, 1.1fr) 3.5rem minmax(0, 1fr); }
  .lane { padding: var(--s-2); }
  .lane-title { padding-inline: var(--s-1); }
  .mods { grid-template-columns: minmax(0, 1fr); gap: var(--s-1); }
  .mod { padding: var(--s-1) var(--s-2); gap: 0; }
  .lane-wide .mods { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .link { padding-block: 0; }
  .link-label { margin-bottom: var(--s-1); }
  .link-arrow { width: 2rem; height: 2px; }
  .link-arrow::after { left: auto; right: 0; top: 50%; bottom: auto; transform: translate(0, -50%) rotate(-45deg); }
  .return {
    grid-column: 3 / 8; margin: 0 1.5rem; padding: var(--s-3) var(--s-4) 0; position: relative;
    border: 2px solid var(--accent); border-top: 0; border-radius: 0 0 var(--r-2) var(--r-2); height: 3rem;
  }
  .return::before {
    content: ""; position: absolute; left: -2px; top: -0.35rem; width: 0.6rem; height: 0.6rem;
    border-left: 2px solid var(--accent); border-top: 2px solid var(--accent); transform: translate(-0.3rem, 0) rotate(45deg);
  }
}

/* Wide screens: walkthrough diagram beside the details */
@media (min-width: 60rem) {
  .walk { grid-template-columns: minmax(0, 26rem) minmax(0, 1fr); }
  .diagram { margin-inline: 0; }
  .stepper-bar { display: grid; grid-template-columns: auto 1fr; column-gap: var(--s-5); align-items: start; }
  .step-count { grid-column: 1; }
  .controls { grid-column: 2; }
  .stepper-bar .note { grid-column: 1 / -1; }
}

/* Narrow screens: tables become stacked cards (ARIA roles keep the table semantics) */
@media (max-width: 42rem) {
  .grid, .grid thead, .grid tbody, .grid tr, .grid th, .grid td { display: block; width: 100%; }
  .grid thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .grid tr { border-top: 3px solid var(--line); padding: var(--s-2) 0; }
  .grid th, .grid td { border-top: 0; padding: var(--s-1) var(--s-3); }
  .grid td::before, .grid tbody th::before {
    content: attr(data-label); display: block; font-size: var(--t-sm); font-weight: 700; text-transform: uppercase;
    letter-spacing: 0.05em; color: var(--muted);
  }
}

@media (max-width: 40rem) {
  .nav-list a { padding: 0 var(--s-2); }
}

@media (max-width: 24rem) {
  .btn { padding-inline: 0.75rem; }
  .node { width: 4rem; font-size: 0.7rem; }
  .ticket code { font-size: 0.75rem; }
  .panel { padding: var(--s-3); }
}

/* Reduced motion: no movement at all, steps change instantly */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
  .node.is-active .node-shape { transform: none; }
}

@media (forced-colors: active) {
  .node.is-active .node-shape, .outside.is-active, .dot[aria-current="step"], .mod[aria-expanded="true"] { border-color: Highlight; }
}
