/* ============================================================
   Always — signal-timeline documentation
   One hand-written stylesheet. No frameworks, no build step.
   Palette derived from the project's own VU-meter photograph:
   slate black, oxidised steel, amber signal trace.
   ============================================================ */

:root {
  color-scheme: light dark;

  --step--1: clamp(0.78rem, 0.76rem + 0.10vw, 0.84rem);
  --step-0: clamp(0.95rem, 0.92rem + 0.16vw, 1.05rem);
  --step-1: clamp(1.12rem, 1.05rem + 0.34vw, 1.32rem);
  --step-2: clamp(1.34rem, 1.20rem + 0.68vw, 1.78rem);
  --step-3: clamp(1.62rem, 1.34rem + 1.32vw, 2.55rem);
  --step-4: clamp(1.95rem, 1.45rem + 2.35vw, 3.6rem);

  --sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas,
    "Liberation Mono", monospace;

  --rail: 3.25rem;   /* x-offset of the vertical signal spine */
  --maxw: 74rem;

  /* light theme (bone paper / ink / burnt amber) */
  --bg: #f2efe7;
  --bg-2: #e9e5da;
  --surface: #fbf9f3;
  --surface-2: #f0ece1;
  --ink: #1a1c17;
  --ink-2: #3b3f35;
  --muted: #5f6456;
  --faint: #878b7b;
  --line: #d6d0be;
  --line-2: #c0b9a3;
  --amber: #8a5d0b;
  --amber-hi: #b07a15;
  --amber-wash: rgba(176, 122, 21, 0.11);
  --teal: #1f5f66;
  --teal-wash: rgba(31, 95, 102, 0.10);
  --crimson: #8c2f22;
  --crimson-wash: rgba(140, 47, 34, 0.10);
  --term-bg: #191b16;
  --term-ink: #ddd8c8;
  --texture-op: 0.05;
  --shadow: 0 1px 0 rgba(26, 28, 23, 0.05);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0d0e0c;
    --bg-2: #121410;
    --surface: #161813;
    --surface-2: #1c1f18;
    --ink: #e9e6da;
    --ink-2: #cbc8ba;
    --muted: #9a9e8d;
    --faint: #767a6a;
    --line: #2a2d25;
    --line-2: #3b3f33;
    --amber: #e3ae5a;
    --amber-hi: #f0c479;
    --amber-wash: rgba(227, 174, 90, 0.12);
    --teal: #79b8bd;
    --teal-wash: rgba(121, 184, 189, 0.12);
    --crimson: #dd8272;
    --crimson-wash: rgba(221, 130, 114, 0.12);
    --term-bg: #0a0b09;
    --term-ink: #ddd8c8;
    --texture-op: 0.16;
    --shadow: none;
  }
}

/* ---------- reset-ish ---------- */

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: var(--step-0);
  line-height: 1.62;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img, svg { max-width: 100%; }
svg { height: auto; }

h1, h2, h3, h4 {
  line-height: 1.16;
  font-weight: 620;
  letter-spacing: -0.014em;
  margin: 0 0 0.5em;
  text-wrap: balance;
}

h1 { font-size: var(--step-4); letter-spacing: -0.03em; }
h2 { font-size: var(--step-3); letter-spacing: -0.022em; }
h3 { font-size: var(--step-1); }
h4 { font-size: var(--step-0); letter-spacing: 0.01em; }

p { margin: 0 0 1.05em; }
p:last-child { margin-bottom: 0; }

a { color: var(--amber); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { color: var(--amber-hi); }

:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 3px;
  border-radius: 2px;
}

code, kbd, samp, pre { font-family: var(--mono); font-size: 0.88em; }

code {
  background: var(--amber-wash);
  color: var(--ink);
  padding: 0.08em 0.34em;
  border-radius: 3px;
  word-break: break-word;
}

hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 2.5rem 0;
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--amber);
  color: var(--bg);
  padding: 0.6rem 1rem;
  z-index: 99;
}
.skip:focus { left: 0.5rem; top: 0.5rem; }

.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* ============================================================
   TRANSPORT — the horizontal signal chain that carries the
   cross-page navigation. Pages are stations on one line.
   ============================================================ */

.transport {
  position: sticky;
  top: 0;
  z-index: 30;
  background: var(--bg-2);
  border-bottom: 1px solid var(--line);
}

.transport-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 clamp(0.9rem, 3vw, 2rem);
  display: flex;
  align-items: stretch;
  gap: clamp(0.75rem, 2vw, 1.6rem);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: var(--ink);
  padding: 0.7rem 0;
  flex: 0 0 auto;
  border-right: 1px solid var(--line);
  padding-right: clamp(0.75rem, 2vw, 1.4rem);
}
.brand:hover { color: var(--ink); }
.brand-mark { width: 30px; height: 30px; flex: 0 0 auto; display: block; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-name {
  font-weight: 700;
  letter-spacing: 0.02em;
  font-size: var(--step-0);
}
.brand-sub {
  font-family: var(--mono);
  font-size: 0.63rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--faint);
}

.chain {
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: thin;
}

.chain-wave {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  min-width: 44rem;
  pointer-events: none;
  color: var(--line-2);
}

.chain ol {
  position: relative;
  display: flex;
  align-items: center;
  gap: clamp(0.15rem, 1vw, 0.7rem);
  list-style: none;
  margin: 0;
  padding: 0.55rem 0 0.5rem;
  min-width: 44rem;
}

.chain a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.34rem;
  text-decoration: none;
  color: var(--muted);
  font-size: 0.7rem;
  font-family: var(--mono);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 0.3rem 0.5rem 0.2rem;
  white-space: nowrap;
  border-radius: 3px;
}
.chain a .node {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  border: 1.5px solid var(--line-2);
  background: var(--bg-2);
  transition: none;
}
.chain a:hover { color: var(--ink); }
.chain a:hover .node { border-color: var(--amber); }
.chain a[aria-current="page"] { color: var(--amber); }
.chain a[aria-current="page"] .node {
  border-color: var(--amber);
  background: var(--amber);
  box-shadow: 0 0 0 3px var(--amber-wash);
}

/* ============================================================
   MASTHEAD — texture band + page identity
   ============================================================ */

.masthead {
  position: relative;
  border-bottom: 1px solid var(--line);
  overflow: hidden;
  background: var(--bg-2);
}

.masthead::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("waveform.png");
  background-size: cover;
  background-position: center 62%;
  opacity: var(--texture-op);
  filter: grayscale(0.25);
  pointer-events: none;
}

.masthead-inner {
  position: relative;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(2rem, 6vw, 4.2rem) clamp(0.9rem, 3vw, 2rem) clamp(1.6rem, 4vw, 2.8rem);
}

.eyebrow {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.19em;
  text-transform: uppercase;
  color: var(--amber);
  margin: 0 0 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.eyebrow::after {
  content: "";
  flex: 1 1 auto;
  height: 1px;
  background: linear-gradient(to right, var(--line-2), transparent);
  max-width: 14rem;
}

.lede {
  font-size: var(--step-1);
  color: var(--ink-2);
  max-width: 48rem;
  line-height: 1.5;
}
.lede strong { color: var(--ink); font-weight: 600; }

.masthead-meta {
  margin-top: 1.6rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.5rem;
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--faint);
  letter-spacing: 0.03em;
}
.masthead-meta span { display: inline-flex; gap: 0.45rem; }
.masthead-meta b { color: var(--ink-2); font-weight: 500; }

/* ============================================================
   THE SPINE — a continuous signal line running down the page.
   Sections dock off it via patch connectors.
   ============================================================ */

.page {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 clamp(0.9rem, 3vw, 2rem);
}

.timeline {
  position: relative;
  padding-left: calc(var(--rail) + 1.4rem);
  padding-top: 2.6rem;
  padding-bottom: 3rem;
}

/* the line itself */
.timeline::before {
  content: "";
  position: absolute;
  left: var(--rail);
  top: 0;
  bottom: 0;
  width: 1px;
  background: linear-gradient(
    to bottom,
    transparent 0,
    var(--line-2) 3rem,
    var(--line-2) calc(100% - 6rem),
    transparent 100%
  );
}

.spine-wave {
  position: absolute;
  left: calc(var(--rail) - 1.5rem);
  top: 2.5rem;
  bottom: 5rem;
  width: 3rem;
  height: auto;
  color: var(--amber);
  opacity: 0.30;
  pointer-events: none;
}

.dock {
  position: relative;
  margin: 0 0 3.6rem;
  scroll-margin-top: 5.5rem;
}
.dock:last-child { margin-bottom: 0; }

/* station node on the line */
.dock > h2::before,
.dock > h3::before {
  content: "";
  position: absolute;
  left: -1.83rem;
  top: 0.52em;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  border: 1.5px solid var(--amber);
  background: var(--bg);
  z-index: 2;
}
.dock > h3::before {
  width: 7px;
  height: 7px;
  border-color: var(--line-2);
  left: -1.7rem;
}

/* patch connector from the line to the heading */
.dock > h2::after {
  content: "";
  position: absolute;
  left: -1.4rem;
  top: calc(0.52em + 5px);
  width: 1.1rem;
  height: 1px;
  background: var(--line-2);
}

.dock > h2 { position: relative; }
.dock > h3 { position: relative; }

.dock > p,
.dock > ul,
.dock > ol,
.dock > figure,
.dock > table,
.dock > .note,
.dock > .rack { max-width: 52rem; }

.dock .wide { max-width: none; }

/* section index marker, e.g. 03 */
.marker {
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--faint);
  display: block;
  margin-bottom: 0.5rem;
}

/* ============================================================
   RACK — horizontal readout strip (not a card grid)
   ============================================================ */

.rack {
  display: flex;
  flex-wrap: wrap;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 4px;
  margin: 1.6rem 0 2rem;
  overflow: hidden;
}

.rack > div {
  flex: 1 1 9.5rem;
  min-width: 8.5rem;
  padding: 0.85rem 1.05rem;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.rack > div:last-child { border-right: 0; }

.rack dt {
  font-family: var(--mono);
  font-size: 0.63rem;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--faint);
  margin: 0 0 0.3rem;
}
.rack dd {
  margin: 0;
  font-size: var(--step-1);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
  line-height: 1.15;
}
.rack dd small {
  display: block;
  font-size: 0.68rem;
  font-weight: 400;
  letter-spacing: 0;
  color: var(--muted);
  font-family: var(--mono);
  margin-top: 0.25rem;
  line-height: 1.35;
}

/* ============================================================
   FIGURES / DIAGRAMS
   ============================================================ */

figure.diagram {
  margin: 2rem 0 2.2rem;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--surface);
  overflow: hidden;
}

figure.diagram .frame {
  padding: clamp(0.5rem, 2vw, 1.25rem);
  overflow-x: auto;
}

figure.diagram svg {
  display: block;
  width: 100%;
  min-width: 30rem;
  height: auto;
}

figure.diagram.tall svg { min-width: 26rem; }
figure.diagram.narrow svg { min-width: 20rem; }

figcaption {
  border-top: 1px solid var(--line);
  background: var(--surface-2);
  padding: 0.7rem clamp(0.7rem, 2vw, 1.25rem);
  font-size: var(--step--1);
  color: var(--muted);
  line-height: 1.55;
}
figcaption b {
  color: var(--ink-2);
  font-weight: 600;
  font-family: var(--mono);
  font-size: 0.95em;
  letter-spacing: 0.02em;
}

/* SVG semantic classes, themed via currentColor tokens */
.d-line { stroke: var(--line-2); fill: none; }
.d-edge { stroke: var(--muted); fill: none; stroke-width: 1.2; }
.d-edge-amber { stroke: var(--amber); fill: none; stroke-width: 1.4; }
.d-edge-teal { stroke: var(--teal); fill: none; stroke-width: 1.4; }
.d-edge-dash { stroke: var(--faint); fill: none; stroke-width: 1.1; stroke-dasharray: 4 3; }
.d-edge-dead { stroke: var(--crimson); fill: none; stroke-width: 1.3; stroke-dasharray: 5 4; }
.d-box { fill: var(--surface-2); stroke: var(--line-2); stroke-width: 1; }
.d-box-amber { fill: var(--amber-wash); stroke: var(--amber); stroke-width: 1.1; }
.d-box-teal { fill: var(--teal-wash); stroke: var(--teal); stroke-width: 1.1; }
.d-box-dead { fill: var(--crimson-wash); stroke: var(--crimson); stroke-width: 1.1; stroke-dasharray: 4 3; }
.d-fill-bg { fill: var(--bg); }
.d-t { fill: var(--ink); font-family: var(--sans); font-size: 11px; }
.d-t-b { fill: var(--ink); font-family: var(--sans); font-size: 11.5px; font-weight: 620; }
.d-m { fill: var(--muted); font-family: var(--mono); font-size: 9px; letter-spacing: 0.02em; }
.d-m-s { fill: var(--faint); font-family: var(--mono); font-size: 8px; letter-spacing: 0.02em; }
.d-a { fill: var(--amber); font-family: var(--mono); font-size: 9px; letter-spacing: 0.04em; }
.d-teal-t { fill: var(--teal); font-family: var(--mono); font-size: 9px; letter-spacing: 0.04em; }
.d-ok-t { fill: var(--teal); font-family: var(--mono); font-size: 9px; letter-spacing: 0.02em; }
.d-red-t { fill: var(--crimson); font-family: var(--mono); font-size: 9px; letter-spacing: 0.04em; }
.d-cap { fill: var(--faint); font-family: var(--mono); font-size: 8.5px; letter-spacing: 0.12em; text-transform: uppercase; }
.d-band { fill: var(--surface-2); }
.d-band-2 { fill: var(--amber-wash); }
.d-wave { stroke: var(--amber); fill: none; stroke-width: 1.1; }

/* ============================================================
   TERMINAL RENDERINGS
   ============================================================ */

.term {
  margin: 1.8rem 0 2rem;
  border-radius: 5px;
  overflow: hidden;
  border: 1px solid var(--line-2);
  background: var(--term-bg);
  box-shadow: var(--shadow);
}

.term-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  background: #23261f;
  border-bottom: 1px solid #33372c;
}
.term-dot {
  width: 9px; height: 9px; border-radius: 50%;
  background: #4a4e40; flex: 0 0 auto;
}
.term-dot:nth-child(1) { background: #7d5a3a; }
.term-dot:nth-child(2) { background: #6d6a3c; }
.term-dot:nth-child(3) { background: #4b6349; }
.term-title {
  margin-left: 0.4rem;
  font-family: var(--mono);
  font-size: 0.68rem;
  color: #9ba08c;
  letter-spacing: 0.05em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.term pre {
  margin: 0;
  padding: 0.9rem 1rem 1.05rem;
  overflow-x: auto;
  font-size: 0.78rem;
  line-height: 1.65;
  color: var(--term-ink);
  tab-size: 2;
}
.term .pr { color: #c9963f; }          /* prompt */
.term .cm { color: #e6e0cc; }          /* command */
.term .fl { color: #8fb4bd; }          /* flag */
.term .ou { color: #98a08b; }          /* output */
.term .ok { color: #8fae72; }
.term .er { color: #cf7c68; }
.term .di { color: #6c7160; }          /* dim / comment */

.term-note {
  border-top: 1px solid #33372c;
  padding: 0.55rem 1rem;
  font-family: var(--mono);
  font-size: 0.68rem;
  color: #8b907d;
  line-height: 1.55;
}

/* ============================================================
   CODE BLOCKS with real line references
   ============================================================ */

.src {
  margin: 1.5rem 0 1.8rem;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--surface);
  overflow: hidden;
}

.src-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem 0.9rem;
  padding: 0.5rem 0.85rem;
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--muted);
}
.src-head .path { color: var(--ink-2); font-weight: 600; }
.src-head .ln { color: var(--amber); }

.src pre {
  margin: 0;
  padding: 0.85rem 0.95rem;
  overflow-x: auto;
  font-size: 0.78rem;
  line-height: 1.7;
  color: var(--ink-2);
}
.src pre .c { color: var(--faint); font-style: italic; }
.src pre .k { color: var(--amber); }
.src pre .s { color: var(--teal); }
.src pre mark {
  background: var(--amber-wash);
  color: var(--ink);
  padding: 0 0.15em;
  border-radius: 2px;
}

.src-note {
  border-top: 1px solid var(--line);
  padding: 0.6rem 0.95rem;
  font-size: var(--step--1);
  color: var(--muted);
}

/* ============================================================
   CALLOUTS
   ============================================================ */

.note {
  margin: 1.5rem 0;
  padding: 0.9rem 1.1rem;
  border-left: 2px solid var(--teal);
  background: var(--teal-wash);
  border-radius: 0 3px 3px 0;
  font-size: var(--step--1);
  line-height: 1.6;
}
.note.warn { border-left-color: var(--crimson); background: var(--crimson-wash); }
.note.amber { border-left-color: var(--amber); background: var(--amber-wash); }
.note h4 {
  margin: 0 0 0.35rem;
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--teal);
}
.note.warn h4 { color: var(--crimson); }
.note.amber h4 { color: var(--amber); }
.note p:last-child { margin-bottom: 0; }

/* pull quote — verbatim source comments */
.pull {
  margin: 2.2rem 0;
  padding: 0 0 0 1.5rem;
  border-left: 2px solid var(--amber);
  max-width: 46rem;
}
.pull blockquote {
  margin: 0 0 0.7rem;
  font-size: var(--step-1);
  line-height: 1.45;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.pull cite {
  font-style: normal;
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--faint);
  letter-spacing: 0.04em;
}

/* ============================================================
   TABLES
   ============================================================ */

.tablewrap {
  margin: 1.6rem 0 2rem;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--surface);
}

table {
  border-collapse: collapse;
  width: 100%;
  min-width: 34rem;
  font-size: var(--step--1);
}

caption {
  caption-side: top;
  text-align: left;
  padding: 0.6rem 0.9rem;
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--muted);
}

th, td {
  text-align: left;
  padding: 0.52rem 0.9rem;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
thead th {
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--faint);
  font-weight: 500;
  white-space: nowrap;
}
tbody tr:last-child td { border-bottom: 0; }
tbody th { font-weight: 600; white-space: nowrap; }
td code, th code { background: transparent; padding: 0; color: var(--ink-2); }

.num { font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.ok-c { color: var(--teal); font-family: var(--mono); font-size: 0.92em; }
.no-c { color: var(--crimson); font-family: var(--mono); font-size: 0.92em; }
.part-c { color: var(--amber); font-family: var(--mono); font-size: 0.92em; }

/* ============================================================
   LISTS / MISC
   ============================================================ */

.dock ul, .dock ol { padding-left: 1.15rem; margin: 0 0 1.1rem; }
.dock li { margin-bottom: 0.42rem; }
.dock li::marker { color: var(--faint); }

ul.plain { list-style: none; padding-left: 0; }
ul.plain li {
  padding-left: 1.15rem;
  position: relative;
}
ul.plain li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.68em;
  width: 6px;
  height: 1px;
  background: var(--amber);
}

dl.kv { margin: 1.4rem 0; }
dl.kv > div {
  display: flex;
  flex-wrap: wrap;
  gap: 0 1rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--line);
}
dl.kv dt {
  flex: 0 0 13rem;
  font-family: var(--mono);
  font-size: 0.76rem;
  color: var(--amber);
  line-height: 1.7;
}
dl.kv dd { flex: 1 1 16rem; margin: 0; font-size: var(--step--1); color: var(--ink-2); }

.tag {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.63rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  padding: 0.12rem 0.45rem;
  border: 1px solid var(--line-2);
  border-radius: 2px;
  color: var(--muted);
  vertical-align: 0.12em;
}
.tag.live { color: var(--teal); border-color: var(--teal); }
.tag.dead { color: var(--crimson); border-color: var(--crimson); }
.tag.part { color: var(--amber); border-color: var(--amber); }

/* next / prev along the signal chain */
.onward {
  margin-top: 3.5rem;
  border-top: 1px solid var(--line);
  padding-top: 1.4rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2rem;
  justify-content: space-between;
}
.onward a {
  display: block;
  text-decoration: none;
  max-width: 24rem;
}
.onward span {
  display: block;
  font-family: var(--mono);
  font-size: 0.65rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--faint);
  margin-bottom: 0.25rem;
}
.onward b { font-size: var(--step-1); font-weight: 600; letter-spacing: -0.015em; }
.onward a:hover b { text-decoration: underline; text-underline-offset: 0.2em; }
.onward .prev { text-align: left; }
.onward .next { text-align: right; margin-left: auto; }

/* ============================================================
   FOOTER
   ============================================================ */

.foot {
  position: relative;
  border-top: 1px solid var(--line);
  background: var(--bg-2);
  margin-top: 2rem;
  overflow: hidden;
}
.foot::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("waveform.png");
  background-size: cover;
  background-position: center 40%;
  opacity: calc(var(--texture-op) * 0.65);
  pointer-events: none;
}
.foot-inner {
  position: relative;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 2rem clamp(0.9rem, 3vw, 2rem) 2.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1.2rem 2.5rem;
  align-items: flex-start;
  font-size: var(--step--1);
  color: var(--muted);
}
.foot-inner p { max-width: 34rem; }
.foot nav ul { list-style: none; margin: 0; padding: 0; columns: 2; column-gap: 2rem; }
.foot nav li { margin-bottom: 0.3rem; }
.foot nav a { color: var(--muted); text-decoration: none; font-family: var(--mono); font-size: 0.72rem; }
.foot nav a:hover { color: var(--amber); text-decoration: underline; }

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 62rem) {
  :root { --rail: 1.6rem; }
  .timeline { padding-left: 2.6rem; }
  .dock > h2::before { left: -1.42rem; }
  .dock > h3::before { left: -1.32rem; }
  .dock > h2::after { left: -1rem; width: 0.68rem; }
  .spine-wave { left: 0.1rem; width: 2.2rem; opacity: 0.22; }
}

@media (max-width: 42rem) {
  body { line-height: 1.58; }
  .transport-inner { flex-direction: column; gap: 0; padding-bottom: 0; }
  .brand { border-right: 0; border-bottom: 1px solid var(--line); padding-right: 0; }
  .chain ol { min-width: 40rem; }
  .chain-wave { min-width: 40rem; }
  .rack > div { flex: 1 1 50%; min-width: 7.5rem; }
  dl.kv dt { flex: 1 1 100%; }
  .onward { flex-direction: column; }
  .onward .next { text-align: left; margin-left: 0; }
  .foot nav ul { columns: 1; }
  figure.diagram svg { min-width: 27rem; }
}

@media print {
  .transport, .onward, .spine-wave { display: none; }
  body { background: #fff; color: #000; }
}
