/* ServiceLabs — site.css
 *
 * A wayfinding programme for an API. Square sign panels, one family (Archivo) stretched from
 * text width to sign width, Martian Mono only for code and data, pictograms on one 48-unit grid.
 * Route colours mark the three categories: Documents (indigo), Archives (orange), Spreadsheets
 * (green). Light and dark follow the system.
 */

/* ── Tokens ─────────────────────────────────────────────────────────────────────────────────── */
:root {
  color-scheme: light dark;

  --ground: #f4f5f7;
  --panel: #ffffff;
  --sunk: #eceef2;
  --ink: #0d0f1a;
  --ink-2: #3b3f52;
  --ink-3: #5c6075;
  --rule: #d9dbe3;
  --rule-2: #c3c6d2;

  /* Brand anchor */
  --indigo: #5b53d6;
  --blue: #2563c9;
  --field: #463fc0; /* large indigo regions carrying white text */
  --field-ink-2: #dcdaf8;
  --link: #3f37b8;
  --focus: #2563c9;

  /* Route colours: fill (white text on top) / text (on ground) */
  --docs: #5b53d6;
  --docs-text: #3f37b8;
  --arch: #c2410c;
  --arch-text: #b13a0a;
  --sheet: #0b7a55;
  --sheet-text: #0a6b4b;
  --async: #2563c9;

  /* The departure board and code panels are always dark */
  --board: #0d0f1a;
  --board-2: #161927;
  --board-ink: #f1f2f8;
  --board-ink-2: #a9adc4;
  --board-rule: #272b3e;

  --f-sans: 'Archivo', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --f-mono: 'Martian Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --wrap: 1280px;
  --gutter: clamp(18px, 4vw, 48px);
  --gap: clamp(16px, 2vw, 28px);
  --sec: clamp(72px, 9vw, 136px);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

@media (prefers-color-scheme: dark) {
  :root {
    --ground: #0b0c14;
    --panel: #12131f;
    --sunk: #171927;
    --ink: #eceef6;
    --ink-2: #b9bdd0;
    --ink-3: #8e93aa;
    --rule: #262838;
    --rule-2: #353849;

    --field: #3b35a6;
    --field-ink-2: #d6d4f6;
    --link: #a19bf6;
    --focus: #7fb0ff;

    --docs-text: #a19bf6;
    --arch-text: #ff9a5c;
    --sheet-text: #45d49c;

    --board: #07080e;
    --board-2: #10121c;
    --board-rule: #23263a;
  }
}

/* ── Base ───────────────────────────────────────────────────────────────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: 96px;
  scrollbar-color: var(--rule-2) var(--ground);
  accent-color: var(--indigo);
}
body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--f-sans);
  font-size: 17px;
  line-height: 1.6;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
  caret-color: var(--indigo);
}
::selection {
  background: var(--indigo);
  color: #fff;
}
img,
svg {
  display: block;
  max-width: 100%;
}
a {
  color: var(--link);
  text-decoration-line: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.22em;
}
a:hover {
  text-decoration-thickness: 2px;
}
:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}
h1,
h2,
h3,
h4 {
  margin: 0;
  font-weight: 750;
  line-height: 1.08;
  text-wrap: balance;
}
p {
  margin: 0;
  text-wrap: pretty;
}
code,
kbd,
pre,
.mono {
  font-family: var(--f-mono);
  font-stretch: 87.5%;
}
code {
  font-size: 0.8em;
  font-weight: 400;
}
p code,
li code,
td code,
dd code {
  background: var(--sunk);
  padding: 0.12em 0.36em;
  border-radius: 2px;
  color: var(--ink);
  word-break: break-word;
}
.skip {
  position: absolute;
  left: 12px;
  top: -80px;
  z-index: 100;
  background: var(--ink);
  color: var(--ground);
  padding: 10px 14px;
  font-weight: 600;
  text-decoration: none;
}
.skip:focus {
  top: 12px;
}
.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ── Pictograms ─────────────────────────────────────────────────────────────────────────────── */
.pg {
  width: 1em;
  height: 1em;
  flex: none;
}
.tile {
  --s: 44px;
  display: inline-grid;
  place-items: center;
  width: var(--s);
  height: var(--s);
  flex: none;
  background: var(--tile-bg, var(--docs));
  color: var(--tile-ink, #fff);
  font-size: calc(var(--s) * 0.62);
}
.r-docs {
  --route: var(--docs);
  --route-text: var(--docs-text);
}
.r-arch {
  --route: var(--arch);
  --route-text: var(--arch-text);
}
.r-sheet {
  --route: var(--sheet);
  --route-text: var(--sheet-text);
}
.tile.r-docs,
.tile.r-arch,
.tile.r-sheet {
  --tile-bg: var(--route);
}

/* ── Type roles ─────────────────────────────────────────────────────────────────────────────── */
.display {
  font-size: clamp(2.6rem, 7.2vw, 6rem);
  font-stretch: 125%;
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 0.94;
}
.h2 {
  font-size: clamp(2rem, 4.2vw, 3.4rem);
  font-stretch: 118%;
  font-weight: 780;
  letter-spacing: -0.02em;
  line-height: 1;
}
.h3 {
  font-size: 1.3rem;
  font-stretch: 110%;
  font-weight: 700;
  letter-spacing: -0.005em;
  line-height: 1.2;
}
.lede {
  font-size: clamp(1.1rem, 1.6vw, 1.3rem);
  line-height: 1.55;
  color: var(--ink-2);
  max-width: 44ch;
}
.body {
  color: var(--ink-2);
  max-width: 68ch;
}
.body + .body {
  margin-top: 1em;
}
.fine {
  font-size: 0.9rem;
  color: var(--ink-3);
}

/* ── Buttons: a sign with an arrow panel ────────────────────────────────────────────────────── */
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.btn {
  display: inline-flex;
  align-items: stretch;
  min-height: 52px;
  font-family: var(--f-sans);
  font-size: 1rem;
  font-weight: 650;
  font-stretch: 110%;
  line-height: 1.2;
  text-decoration: none;
  border: 2px solid transparent;
  transition:
    background-color 0.18s var(--ease),
    color 0.18s var(--ease),
    border-color 0.18s var(--ease);
}
.btn-label {
  display: flex;
  align-items: center;
  padding: 12px 18px;
}
.btn-arr {
  display: grid;
  place-items: center;
  width: 50px;
  border-left: 2px solid currentColor;
  border-left-color: color-mix(in srgb, currentColor 28%, transparent);
  font-size: 20px;
}
.btn-arr .pg {
  transition: transform 0.28s var(--ease);
}
.btn:hover .btn-arr .pg {
  transform: translateX(3px);
}
.btn:hover .btn-arr .pg.out {
  transform: translate(2px, -2px);
}
.btn--primary {
  background: var(--field);
  color: #fff;
}
.btn--primary:hover {
  background: var(--ink);
  color: var(--ground);
}
.btn--line {
  border-color: var(--ink);
  color: var(--ink);
}
.btn--line:hover {
  background: var(--ink);
  color: var(--ground);
}
.btn--light {
  background: #fff;
  color: #1a1640;
}
.btn--light:hover {
  background: var(--board);
  color: #fff;
}
.btn--ghost-light {
  border-color: rgba(255, 255, 255, 0.72);
  color: #fff;
}
.btn--ghost-light:hover {
  background: #fff;
  color: #1a1640;
}
.on-field :focus-visible,
.board :focus-visible,
.band--ink :focus-visible,
.site-foot :focus-visible,
.code :focus-visible {
  outline-color: #fff;
}

/* ── Header ─────────────────────────────────────────────────────────────────────────────────── */
.site-head {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--ground);
  border-bottom: 1px solid var(--rule);
}
.head-bar {
  display: flex;
  align-items: center;
  gap: 28px;
  min-height: 68px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 760;
  font-stretch: 112%;
  font-size: 1.12rem;
  letter-spacing: -0.01em;
}
.brand img {
  width: 30px;
  height: 30px;
}
.site-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}
.site-nav a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  color: var(--ink-2);
  font-size: 0.95rem;
  font-weight: 560;
  text-decoration: none;
}
.site-nav a:hover {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-thickness: 2px;
}
.site-nav a[aria-current='page'] {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-thickness: 3px;
  text-decoration-color: var(--indigo);
  text-underline-offset: 0.5em;
}
.site-nav .nav-cta {
  margin-left: 10px;
  padding: 10px 14px;
  background: var(--field);
  color: #fff;
  font-weight: 650;
  font-stretch: 108%;
}
.site-nav .nav-cta:hover {
  background: var(--ink);
  color: var(--ground);
  text-decoration: none;
}
.nav-cta .pg,
.site-nav .pg {
  font-size: 15px;
}
.menu-btn {
  display: none;
  margin-left: auto;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 12px;
  background: none;
  border: 2px solid var(--ink);
  color: var(--ink);
  font: 650 0.95rem/1 var(--f-sans);
  font-stretch: 108%;
  cursor: pointer;
}
.menu-btn .pg {
  font-size: 20px;
}

@media (max-width: 880px) {
  .menu-btn {
    display: inline-flex;
  }
  .site-nav {
    display: none;
  }
  .site-head.is-open .site-nav,
  html:not(.js) .site-nav {
    display: flex;
  }
  .site-head.is-open .site-nav,
  html:not(.js) .site-nav {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    margin: 0;
    padding: 8px var(--gutter) 20px;
    background: var(--ground);
    border-bottom: 1px solid var(--rule);
    box-shadow: 0 18px 30px -18px rgba(13, 15, 26, 0.35);
  }
  html:not(.js) .site-nav {
    position: static;
    box-shadow: none;
  }
  html:not(.js) .menu-btn {
    display: none;
  }
  .site-nav a {
    justify-content: space-between;
    padding: 14px 0;
    border-bottom: 1px solid var(--rule);
    font-size: 1.15rem;
    font-stretch: 110%;
    font-weight: 650;
    color: var(--ink);
  }
  .site-nav a[aria-current='page'] {
    text-underline-offset: 0.3em;
  }
  .site-nav .nav-cta {
    margin: 14px 0 0;
    padding: 14px 16px;
    border-bottom: 0;
  }
}

/* ── Sections ───────────────────────────────────────────────────────────────────────────────── */
.sec {
  padding-block: var(--sec);
}
.sec + .sec {
  padding-top: 0;
}
.sec-head {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 20px var(--gap);
  padding-top: 22px;
  border-top: 3px solid var(--ink);
  margin-bottom: clamp(36px, 5vw, 64px);
  align-items: start;
}
.sec-head > .h2 {
  grid-column: 1 / span 6;
}
.sec-head > .sec-note {
  grid-column: 8 / -1;
  padding-top: 0.35rem;
}
.sec-note > * + * {
  margin-top: 1em;
}
@media (max-width: 900px) {
  .sec-head > .h2,
  .sec-head > .sec-note {
    grid-column: 1 / -1;
  }
}

.band {
  padding-block: var(--sec);
}
.band--field {
  background: var(--field);
  color: #fff;
}
.band--field .sec-head {
  border-top-color: #fff;
}
.band--field .body,
.band--field .lede,
.band--field .fine {
  color: var(--field-ink-2);
}
.band--field a:not(.btn) {
  color: #fff;
}
.band--ink {
  background: var(--board);
  color: var(--board-ink);
}
.band--ink .sec-head {
  border-top-color: var(--board-ink);
}
.band--ink .body,
.band--ink .lede,
.band--ink .fine {
  color: var(--board-ink-2);
}
.band--ink a:not(.btn) {
  color: #c9c6ff;
}
@media (prefers-color-scheme: dark) {
  .band--ink {
    border-block: 1px solid var(--board-rule);
  }
}

/* ── Hero ───────────────────────────────────────────────────────────────────────────────────── */
.hero {
  padding-top: clamp(48px, 7vw, 96px);
  padding-bottom: var(--sec);
}
.display .ln {
  display: block;
}
.hero-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 36px var(--gap);
  margin-top: clamp(36px, 5vw, 64px);
  align-items: start;
}
.hero-copy {
  grid-column: 1 / span 5;
  display: grid;
  gap: 28px;
  padding-top: 6px;
}
.hero-grid > .board {
  grid-column: 6 / -1;
}
@media (max-width: 1020px) {
  .hero-copy,
  .hero-grid > .board {
    grid-column: 1 / -1;
  }
}

/* ── The departure board ────────────────────────────────────────────────────────────────────── */
.board {
  container-type: inline-size;
  background: var(--board);
  color: var(--board-ink);
  border: 1px solid var(--board-rule);
}
.board-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  padding: 16px 20px 14px;
  border-bottom: 1px solid var(--board-rule);
}
.board-title {
  margin: 0;
  font-size: 1rem;
  font-stretch: 118%;
  font-weight: 750;
}
.board-host {
  font-size: 0.72rem;
  color: var(--board-ink-2);
}
.board-body {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(0, 1fr);
}
.board-rows {
  list-style: none;
  margin: 0;
  padding: 0;
  border-right: 1px solid var(--board-rule);
}
.board-row {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) 22px;
  align-items: center;
  gap: 14px;
  min-height: 60px;
  padding: 9px 16px 9px 10px;
  color: var(--board-ink);
  text-decoration: none;
  border-bottom: 1px solid var(--board-rule);
  transition:
    background-color 0.2s var(--ease),
    color 0.2s var(--ease);
}
.board-rows li:last-child .board-row {
  border-bottom: 0;
}
.board-row .tile {
  --s: 40px;
  --tile-bg: var(--board-2);
  --tile-ink: var(--board-ink-2);
  transition:
    background-color 0.2s var(--ease),
    color 0.2s var(--ease);
}
.board-row.r-docs .tile {
  --tile-ink: #a19bf6;
}
.board-row.r-arch .tile {
  --tile-ink: #ff9a5c;
}
.board-row.r-sheet .tile {
  --tile-ink: #45d49c;
}
.b-name {
  font-size: 1.08rem;
  font-weight: 680;
  font-stretch: 112%;
  line-height: 1.2;
}
.b-path {
  display: none;
  font-size: 0.7rem;
  color: var(--board-ink-2);
  white-space: nowrap;
  transition: color 0.2s var(--ease);
}
.board-row > .pg {
  font-size: 22px;
  color: var(--board-ink-2);
  transition:
    transform 0.28s var(--ease),
    color 0.2s var(--ease);
}
a.board-row:is(:hover, :focus-visible, .is-lit) {
  background: var(--route);
  color: #fff;
}
a.board-row:is(:hover, :focus-visible, .is-lit) .tile {
  --tile-bg: #fff;
  --tile-ink: var(--route);
}
a.board-row:is(:hover, :focus-visible, .is-lit) .b-path,
a.board-row:is(:hover, :focus-visible, .is-lit) > .pg {
  color: #fff;
}
a.board-row:is(:hover, :focus-visible) > .pg {
  transform: translateX(3px);
}
.board-row:focus-visible {
  outline-offset: -3px;
}
.board-row.is-next {
  grid-template-columns: 40px minmax(0, 1fr) auto;
  color: var(--board-ink-2);
}
.board-row.is-next .tile {
  --tile-bg: transparent;
  --tile-ink: var(--board-ink-2);
  outline: 1px dashed var(--board-rule);
  outline-offset: -1px;
}
.board-row.is-next .b-name {
  font-weight: 560;
  font-size: 1rem;
}
.b-soon {
  justify-self: end;
  font-size: 0.75rem;
  font-weight: 650;
  font-stretch: 110%;
  white-space: nowrap;
  color: var(--board-ink-2);
}
.readout {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.readout-col {
  min-width: 0;
  padding: 14px 18px 16px;
}
.readout-col + .readout-col {
  border-top: 1px solid var(--board-rule);
}
.ro-label {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin: 0 0 8px;
  font-size: 0.8rem;
  font-weight: 650;
  font-stretch: 110%;
  color: var(--board-ink-2);
}
.ro-label .mono {
  font-size: 0.72rem;
  font-weight: 400;
}
.readout pre {
  margin: 0;
  font-size: 0.66rem;
  line-height: 1.72;
  white-space: pre-wrap;
  word-break: break-word;
  color: var(--board-ink);
}
.readout-body.is-swapping {
  animation: wipe 0.5s var(--ease) both;
}
@keyframes wipe {
  from {
    clip-path: inset(0 100% 0 0);
    filter: blur(3px);
  }
  to {
    clip-path: inset(0 0 0 0);
    filter: blur(0);
  }
}
.board-foot {
  padding: 11px 20px;
  border-top: 1px solid var(--board-rule);
  font-size: 0.8rem;
  color: var(--board-ink-2);
}
@container (min-width: 900px) {
  a.board-row {
    grid-template-columns: 40px minmax(0, 1fr) auto 22px;
  }
  .b-path {
    display: inline;
  }
}
@container (max-width: 600px) {
  .board-body {
    grid-template-columns: minmax(0, 1fr);
  }
  .board-rows {
    border-right: 0;
    border-bottom: 1px solid var(--board-rule);
  }
  .board-head,
  .readout-col,
  .board-foot {
    padding-inline: 14px;
  }
}

/* Inline code on coloured and dark regions */
.on-field :is(p, li, dd) code {
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
}
.band--ink :is(p, li, dd, span) code,
.code-cap code {
  background: var(--board-2);
  color: var(--board-ink);
}

.stations code.st-event,
.stations code.st-time,
.board code,
.sign-head .endpoint code {
  background: none;
  padding: 0;
  color: inherit;
}
.stations code.st-time {
  padding: 2px 7px;
}
.board code.b-path {
  color: var(--board-ink-2);
}
a.board-row:is(:hover, :focus-visible, .is-lit) code.b-path {
  color: #fff;
}

/* ── Syntax (code panels) ───────────────────────────────────────────────────────────────────── */
.t-s {
  color: #9fe0bf;
}
.t-k {
  color: #b3aeff;
}
.t-n {
  color: #ffc58f;
}
.t-c {
  color: #8b90a8;
}
.t-m {
  color: #ffffff;
  font-weight: 600;
}

/* ── Job ticket ─────────────────────────────────────────────────────────────────────────────── */
.job-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 40px var(--gap);
  align-items: start;
}
.job-copy {
  grid-column: 1 / span 5;
  display: grid;
  gap: 1em;
}
.ticket {
  grid-column: 7 / -1;
  background: var(--panel);
  color: var(--ink);
  box-shadow: 0 28px 56px -28px rgba(0, 0, 0, 0.45);
}
@media (max-width: 1020px) {
  .job-copy,
  .ticket {
    grid-column: 1 / -1;
  }
}
.ticket-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 22px;
  border-bottom: 2px dashed var(--rule-2);
}
.ticket-id {
  font-size: 0.78rem;
  word-break: break-all;
}
.status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 4px 10px;
  font-size: 0.8rem;
  font-weight: 650;
  font-stretch: 110%;
  background: #0b7a55;
  color: #fff;
  white-space: nowrap;
}
.status::before {
  content: '';
  width: 7px;
  height: 7px;
  background: currentColor;
}
.ticket dl {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  margin: 0;
}
.ticket dt,
.ticket dd {
  margin: 0;
  padding: 12px 22px;
  border-bottom: 1px solid var(--rule);
}
.ticket dt {
  padding-right: 8px;
  font-size: 0.9rem;
  font-weight: 650;
  font-stretch: 108%;
  color: var(--ink-2);
}
.ticket dd {
  font-family: var(--f-mono);
  font-stretch: 87.5%;
  font-size: 0.78rem;
  line-height: 1.7;
  min-width: 0;
  overflow-wrap: anywhere;
}
.ticket dd:last-of-type,
.ticket dt:last-of-type {
  border-bottom: 0;
}
.timing-bar {
  display: flex;
  height: 12px;
  margin: 4px 0 10px;
  background: var(--sunk);
}
.timing-bar span {
  display: block;
  height: 100%;
}
.tb-up {
  background: var(--indigo);
}
.tb-st {
  background: var(--blue);
}
.timing-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
  font-variant-numeric: tabular-nums;
}
.timing-legend i {
  display: inline-block;
  width: 9px;
  height: 9px;
  margin-right: 6px;
  background: var(--sunk);
  border: 1px solid var(--rule-2);
}
.timing-legend .k-up i {
  background: var(--indigo);
  border-color: var(--indigo);
}
.timing-legend .k-st i {
  background: var(--blue);
  border-color: var(--blue);
}
.ticket-foot {
  padding: 12px 22px 16px;
  border-top: 2px dashed var(--rule-2);
  font-size: 0.85rem;
  color: var(--ink-3);
}

/* ── Stations (a job's route) ───────────────────────────────────────────────────────────────── */
.stations {
  --track: 6px;
  --stop: 26px;
  list-style: none;
  margin: clamp(48px, 6vw, 80px) 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(var(--n, 6), minmax(0, 1fr));
  counter-reset: stop;
}
.stations li {
  position: relative;
  padding: calc(var(--stop) + 20px) 18px 0 0;
}
.stations li::before {
  content: '';
  position: absolute;
  top: calc(var(--stop) / 2 - var(--track) / 2);
  left: 0;
  right: 0;
  height: var(--track);
  background: currentColor;
}
.stations li:last-child::before {
  right: auto;
  width: var(--stop);
}
.stations li::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: var(--stop);
  height: var(--stop);
  border-radius: 50%;
  background: var(--stop-fill, var(--field));
  border: 6px solid currentColor;
}
.stations .st-name {
  display: block;
  font-size: 1.05rem;
  font-weight: 720;
  font-stretch: 112%;
  line-height: 1.2;
}
.stations .st-event {
  display: block;
  margin-top: 4px;
  font-size: 0.68rem;
  opacity: 0.9;
}
.stations .st-text {
  display: block;
  margin-top: 10px;
  font-size: 0.92rem;
  line-height: 1.5;
  color: var(--st-text, var(--field-ink-2));
}
.stations .st-time {
  display: inline-block;
  margin-top: 10px;
  padding: 2px 7px;
  font-size: 0.66rem;
  border: 1px solid currentColor;
}
.on-ground .stations,
.stations.on-ground {
  color: var(--ink);
  --stop-fill: var(--ground);
  --st-text: var(--ink-2);
}
@media (max-width: 900px) {
  .stations {
    grid-template-columns: minmax(0, 1fr);
  }
  .stations li {
    padding: 0 0 28px calc(var(--stop) + 18px);
  }
  .stations li::before {
    top: 0;
    bottom: 0;
    left: calc(var(--stop) / 2 - var(--track) / 2);
    right: auto;
    width: var(--track);
    height: auto;
  }
  .stations li:last-child::before {
    width: var(--track);
    height: var(--stop);
  }
}

/* ── Two lines: sync and async ──────────────────────────────────────────────────────────────── */
.lines {
  display: grid;
  gap: clamp(28px, 4vw, 48px);
}
.line {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 9fr);
  gap: 20px var(--gap);
  padding-top: 20px;
  border-top: 1px solid var(--rule);
}
.line-sign {
  display: grid;
  gap: 12px;
  align-content: start;
}
.line-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  justify-self: start;
  padding: 8px 14px 8px 10px;
  background: var(--line);
  color: #fff;
  font-weight: 760;
  font-stretch: 118%;
  font-size: 1.15rem;
}
.line-badge .pg {
  font-size: 22px;
}
.line--sync {
  --line: var(--field);
}
.line--async {
  --line: var(--async);
}
.line .stations {
  margin-top: 4px;
  color: var(--line);
  --stop-fill: var(--ground);
  --st-text: var(--ink-2);
}
.line .stations .st-name {
  color: var(--ink);
}
.line .stations .st-event {
  color: var(--ink-2);
  opacity: 1;
}
.line-branch {
  grid-column: 2;
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 14px 16px;
  background: var(--panel);
  border: 1px solid var(--rule);
  color: var(--ink-2);
  font-size: 0.95rem;
}
.line-branch .pg {
  font-size: 22px;
  color: var(--line);
  margin-top: 2px;
}
@media (max-width: 900px) {
  .line {
    grid-template-columns: minmax(0, 1fr);
  }
  .line-branch {
    grid-column: 1;
  }
}

/* ── Directory (home) ───────────────────────────────────────────────────────────────────────── */
.dir {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--gap);
  align-items: start;
}
@media (max-width: 960px) {
  .dir {
    grid-template-columns: minmax(0, 1fr);
  }
}
.dir-group {
  background: var(--panel);
  border: 1px solid var(--rule);
}
.dir-sign {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  background: var(--route);
  color: #fff;
}
.dir-sign .tile {
  --s: 40px;
  --tile-bg: rgba(255, 255, 255, 0.14);
  --tile-ink: #fff;
}
.dir-sign h3 {
  font-size: 1.25rem;
  font-weight: 760;
  font-stretch: 118%;
}
.dir-count {
  margin-left: auto;
  font-size: 0.85rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
}
.dir-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.dir-item {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) 22px;
  gap: 14px;
  align-items: start;
  padding: 16px;
  color: var(--ink);
  text-decoration: none;
  border-top: 1px solid var(--rule);
  transition: background-color 0.18s var(--ease);
}
.dir-list li:first-child .dir-item {
  border-top: 0;
}
.dir-item > .pg:first-child {
  font-size: 28px;
  color: var(--route-text);
}
.dir-item > .pg:last-child {
  font-size: 20px;
  margin-top: 3px;
  color: var(--ink-3);
  transition:
    transform 0.28s var(--ease),
    color 0.18s var(--ease);
}
.dir-item strong {
  display: block;
  font-size: 1.08rem;
  font-weight: 700;
  font-stretch: 110%;
  line-height: 1.25;
}
.dir-item span {
  display: block;
  margin-top: 4px;
  font-size: 0.93rem;
  line-height: 1.5;
  color: var(--ink-2);
}
.dir-item:hover {
  background: var(--sunk);
}
.dir-item:hover > .pg:last-child {
  transform: translateX(3px);
  color: var(--route-text);
}
.dir-item:hover strong {
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.2em;
}

/* Next up: signs under construction */
.next {
  margin-top: var(--gap);
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 9fr);
  gap: 20px var(--gap);
  align-items: center;
  padding: 18px;
  border: 2px dashed var(--rule-2);
}
.next-title {
  font-size: 1.2rem;
  font-weight: 760;
  font-stretch: 118%;
}
.next-title small {
  display: block;
  margin-top: 4px;
  font-size: 0.9rem;
  font-weight: 450;
  font-stretch: 100%;
  color: var(--ink-3);
}
.next-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.next-list li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  background: repeating-linear-gradient(-45deg, var(--sunk) 0 8px, transparent 8px 16px);
  color: var(--ink-2);
  font-weight: 620;
  font-stretch: 106%;
  line-height: 1.3;
}
.next-list .pg {
  font-size: 26px;
  color: var(--ink-3);
}
.next-list em {
  display: block;
  font-style: normal;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--ink-3);
}
@media (max-width: 900px) {
  .next {
    grid-template-columns: minmax(0, 1fr);
  }
  .next-list {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ── Spec sheet (definition lists) ──────────────────────────────────────────────────────────── */
.split {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 36px var(--gap);
  align-items: start;
}
.split > :first-child {
  grid-column: 1 / span 5;
}
.split > :last-child {
  grid-column: 7 / -1;
}
@media (max-width: 960px) {
  .split > :first-child,
  .split > :last-child {
    grid-column: 1 / -1;
  }
}
.spec {
  margin: 0;
  border-top: 2px solid var(--ink);
}
.spec > div {
  display: grid;
  grid-template-columns: 48px minmax(0, 11rem) minmax(0, 1fr);
  gap: 6px 16px;
  padding: 18px 0;
  border-bottom: 1px solid var(--rule);
}
.spec .pg {
  font-size: 30px;
  color: var(--indigo);
}
.spec dt {
  font-weight: 720;
  font-stretch: 110%;
  line-height: 1.35;
}
.spec dd {
  margin: 0;
  color: var(--ink-2);
  line-height: 1.55;
}
@media (max-width: 640px) {
  .spec > div {
    grid-template-columns: 36px minmax(0, 1fr);
  }
  .spec .pg {
    font-size: 26px;
  }
  .spec dd {
    grid-column: 2;
  }
}
@media (prefers-color-scheme: dark) {
  .spec .pg {
    color: #a19bf6;
  }
}

/* ── Tables ─────────────────────────────────────────────────────────────────────────────────── */
.table-wrap {
  position: relative;
  overflow-x: auto;
  border-top: 2px solid var(--ink);
  -webkit-overflow-scrolling: touch;
}
.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
  font-variant-numeric: tabular-nums;
}
.table caption {
  text-align: left;
  padding: 0 0 10px;
  color: var(--ink-3);
  font-size: 0.9rem;
}
.table th,
.table td {
  padding: 14px 16px 14px 0;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--rule);
}
.table thead th {
  font-size: 0.85rem;
  font-weight: 700;
  font-stretch: 110%;
  color: var(--ink-2);
  white-space: nowrap;
  padding-top: 12px;
  border-bottom: 1px solid var(--ink);
}
.table tbody th {
  font-weight: 700;
  font-stretch: 108%;
}
.table td {
  color: var(--ink-2);
}
.table td code,
.table th code {
  white-space: nowrap;
}
.table .num {
  text-align: right;
  white-space: nowrap;
}
.table .field {
  white-space: nowrap;
}
.table .field code {
  background: none;
  padding: 0;
  font-size: 0.8rem;
  font-weight: 500;
}
.table .field code .sub {
  color: var(--ink-3);
}
.req {
  display: inline-block;
  padding: 1px 7px;
  font-size: 0.78rem;
  font-weight: 650;
  white-space: nowrap;
  background: var(--ink);
  color: var(--ground);
}
.opt {
  display: inline-block;
  padding: 0 6px;
  font-size: 0.78rem;
  font-weight: 600;
  white-space: nowrap;
  border: 1px solid var(--rule-2);
  color: var(--ink-2);
}
.code-badge {
  display: inline-block;
  padding: 1px 7px;
  font-family: var(--f-mono);
  font-stretch: 87.5%;
  font-size: 0.72rem;
  white-space: nowrap;
  color: #fff;
  background: var(--ink-2);
}
.code-badge.c4 {
  background: #a3360a;
}
.code-badge.c5 {
  background: #9b1c3a;
}
.code-badge.c2 {
  background: #0b7a55;
}
.timetable {
  min-width: 640px;
}
.timetable .ut {
  display: flex;
  align-items: center;
  gap: 12px;
  white-space: nowrap;
}
.timetable .ut a {
  color: var(--ink);
  text-decoration: none;
}
.timetable .ut a:hover {
  text-decoration: underline;
}
.timetable .tile {
  --s: 30px;
}
.timetable td.big {
  font-size: 1.2rem;
  font-weight: 720;
  font-stretch: 112%;
  color: var(--ink);
}

/* Narrow screens: product tables become stacked rows */
@media (max-width: 640px) {
  .table--stack thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
  }
  .table--stack tr {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 6px 12px;
    padding: 14px 0;
    border-bottom: 1px solid var(--rule);
  }
  .table--stack :is(th, td) {
    display: block;
    padding: 0;
    border: 0;
  }
  .table--stack tr > :first-child,
  .table--stack tr > :last-child {
    flex-basis: 100%;
  }
  .table--stack.table--errors tr > :last-child {
    flex-basis: auto;
  }
  .table--stack .field {
    white-space: normal;
    overflow-wrap: anywhere;
  }
}

/* ── Code panel with tabs ───────────────────────────────────────────────────────────────────── */
.code {
  background: var(--board);
  color: var(--board-ink);
  border: 1px solid var(--board-rule);
  min-width: 0;
}
.code-bar {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 8px;
  border-bottom: 1px solid var(--board-rule);
}
.tabs {
  display: flex;
  overflow-x: auto;
}
.tab {
  appearance: none;
  background: none;
  border: 0;
  border-right: 1px solid var(--board-rule);
  color: var(--board-ink-2);
  padding: 12px 16px;
  font: 600 0.88rem/1 var(--f-sans);
  font-stretch: 108%;
  cursor: pointer;
  white-space: nowrap;
}
.tab:hover {
  color: #fff;
}
.tab--static {
  cursor: default;
  color: #fff;
}
.tab[aria-selected='true'] {
  background: var(--board-2);
  color: #fff;
  box-shadow: inset 0 -3px 0 var(--indigo);
}
.tab:focus-visible {
  outline-offset: -3px;
}
.copy {
  appearance: none;
  background: none;
  border: 0;
  color: var(--board-ink-2);
  padding: 0 14px;
  font: 600 0.82rem/1 var(--f-sans);
  cursor: pointer;
  white-space: nowrap;
}
.copy:hover {
  color: #fff;
}
.code pre {
  margin: 0;
  padding: 18px 20px 20px;
  overflow-x: auto;
  font-size: 0.74rem;
  line-height: 1.8;
  tab-size: 2;
}
.code pre code {
  font-size: inherit;
}
.code-cap {
  padding: 10px 20px;
  border-top: 1px solid var(--board-rule);
  font-size: 0.82rem;
  color: var(--board-ink-2);
}
[role='tabpanel'][hidden] {
  display: none;
}

/* Resource list (links with arrows) */
.routes {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 2px solid currentColor;
}
.routes a {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 22px;
  gap: 14px;
  align-items: start;
  padding: 16px 0;
  border-bottom: 1px solid var(--rule);
  color: inherit;
  text-decoration: none;
}
.band--ink .routes a {
  color: var(--board-ink);
  border-bottom-color: var(--board-rule);
}
.routes .pg:first-child {
  font-size: 30px;
}
.routes .pg:last-child {
  font-size: 20px;
  margin-top: 3px;
  opacity: 0.8;
  transition: transform 0.28s var(--ease);
}
.routes strong {
  display: block;
  font-weight: 700;
  font-stretch: 110%;
  font-size: 1.05rem;
  line-height: 1.3;
}
.routes span {
  display: block;
  margin-top: 3px;
  font-size: 0.93rem;
  line-height: 1.5;
  opacity: 0.85;
}
.band--ink .routes span {
  color: var(--board-ink-2);
  opacity: 1;
}
.routes a:hover strong {
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.2em;
}
.routes a:hover .pg:last-child {
  transform: translateX(3px);
}
.dev-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 36px var(--gap);
  align-items: start;
}
.dev-grid > .code {
  grid-column: 1 / span 7;
}
.dev-grid > .routes-col {
  grid-column: 9 / -1;
}
@media (max-width: 1020px) {
  .dev-grid > .code,
  .dev-grid > .routes-col {
    grid-column: 1 / -1;
  }
}

/* ── Access ─────────────────────────────────────────────────────────────────────────────────── */
.doors {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--gap);
}
.door {
  display: grid;
  grid-template-rows: auto 1fr auto;
  background: var(--panel);
  border: 1px solid var(--rule);
}
.door--guest {
  --door: var(--async);
}
.door-head {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px clamp(18px, 3vw, 28px);
  background: var(--door, var(--field));
  color: #fff;
}
.door-head .h3 {
  font-size: 1.35rem;
  font-stretch: 118%;
  font-weight: 760;
}
.door-head .pg {
  font-size: 36px;
}
.door > ul {
  padding: 22px clamp(18px, 3vw, 28px) 4px calc(clamp(18px, 3vw, 28px) + 1.1em);
}
.door > .actions {
  padding: 16px clamp(18px, 3vw, 28px) clamp(20px, 3vw, 28px);
}
.door ul {
  margin: 0;
  color: var(--ink-2);
}
.door li + li {
  margin-top: 6px;
}
@media (max-width: 800px) {
  .doors {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ── Closing sign ───────────────────────────────────────────────────────────────────────────── */
.closing {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 32px var(--gap);
  align-items: end;
}
.closing .h2 {
  grid-column: 1 / span 7;
  font-size: clamp(2.2rem, 5vw, 4.4rem);
  font-stretch: 125%;
  font-weight: 800;
}
.closing-side {
  grid-column: 9 / -1;
  display: grid;
  gap: 20px;
}
@media (max-width: 960px) {
  .closing .h2,
  .closing-side {
    grid-column: 1 / -1;
  }
}

/* ── Footer ─────────────────────────────────────────────────────────────────────────────────── */
.site-foot {
  background: var(--board);
  color: var(--board-ink);
  padding-block: 64px 36px;
}
@media (prefers-color-scheme: dark) {
  .site-foot {
    border-top: 1px solid var(--board-rule);
  }
}
.foot-grid {
  display: grid;
  grid-template-columns: minmax(0, 4fr) repeat(3, minmax(0, 2.4fr));
  gap: 36px var(--gap);
}
.foot-brand {
  display: grid;
  gap: 14px;
  align-content: start;
}
.foot-brand .brand {
  color: #fff;
}
.foot-brand p {
  color: var(--board-ink-2);
  max-width: 34ch;
}
.foot-col h2 {
  font-size: 0.95rem;
  font-weight: 720;
  font-stretch: 112%;
  padding-bottom: 10px;
  margin-bottom: 8px;
  border-bottom: 2px solid var(--board-ink);
}
.foot-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.foot-col a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 0;
  color: var(--board-ink-2);
  text-decoration: none;
  font-size: 0.95rem;
}
.foot-col a .pg {
  font-size: 18px;
}
.foot-col a:hover {
  color: #fff;
  text-decoration: underline;
}
.foot-base {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px 24px;
  margin-top: 56px;
  padding-top: 20px;
  border-top: 1px solid var(--board-rule);
  color: var(--board-ink-2);
  font-size: 0.88rem;
}
.foot-base a {
  color: var(--board-ink);
}
@media (max-width: 960px) {
  .foot-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .foot-brand {
    grid-column: 1 / -1;
  }
}
@media (max-width: 460px) {
  .foot-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ── Catalogue ──────────────────────────────────────────────────────────────────────────────── */
.page-head {
  padding-top: clamp(48px, 7vw, 96px);
  padding-bottom: clamp(48px, 6vw, 80px);
}
.page-head .display {
  font-size: clamp(2.6rem, 8vw, 6rem);
}
.page-head-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 28px var(--gap);
  align-items: end;
}
.page-head-grid > .display {
  grid-column: 1 / span 7;
}
.page-head-grid > .lede {
  grid-column: 8 / -1;
}
@media (max-width: 960px) {
  .page-head-grid > .display,
  .page-head-grid > .lede {
    grid-column: 1 / -1;
  }
}
.index-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: clamp(28px, 4vw, 44px);
  padding: 0;
  list-style: none;
}
.index-strip a {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px 8px 8px;
  background: var(--route);
  color: #fff;
  text-decoration: none;
  font-weight: 680;
  font-stretch: 112%;
}
.index-strip .tile {
  --s: 30px;
  --tile-bg: rgba(255, 255, 255, 0.16);
}
.index-strip a:hover {
  background: var(--ink);
  color: var(--ground);
}
.index-strip a:hover .tile {
  --tile-ink: var(--ground);
}
.cat {
  padding-bottom: clamp(56px, 7vw, 96px);
}
.cat-sign {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 22px;
  background: var(--route);
  color: #fff;
}
.cat-sign .tile {
  --s: 52px;
  --tile-bg: rgba(255, 255, 255, 0.14);
  --tile-ink: #fff;
}
.cat-sign h2 {
  font-size: clamp(1.6rem, 3vw, 2.3rem);
  font-weight: 780;
  font-stretch: 122%;
  letter-spacing: -0.015em;
}
.cat-sign p {
  margin-left: auto;
  max-width: 34ch;
  color: rgba(255, 255, 255, 0.92);
  font-size: 0.95rem;
  line-height: 1.45;
  text-align: right;
}
@media (max-width: 720px) {
  .cat-sign {
    flex-wrap: wrap;
  }
  .cat-sign p {
    margin-left: 0;
    text-align: left;
    flex-basis: 100%;
  }
}
.cat-list {
  list-style: none;
  margin: 0;
  padding: 0;
  background: var(--panel);
  border: 1px solid var(--rule);
  border-top: 0;
}
.cat-item {
  display: grid;
  grid-template-columns: 96px minmax(0, 5fr) minmax(0, 4fr) 40px;
  gap: 20px var(--gap);
  align-items: start;
  padding: 26px 24px 26px 22px;
  border-top: 1px solid var(--rule);
  color: var(--ink);
  text-decoration: none;
  transition: background-color 0.18s var(--ease);
}
.cat-list li:first-child .cat-item {
  border-top: 0;
}
.cat-item .tile {
  --s: 96px;
  --tile-bg: var(--route);
}
.cat-item h3 {
  font-size: clamp(1.4rem, 2.4vw, 1.9rem);
  font-weight: 770;
  font-stretch: 118%;
  letter-spacing: -0.015em;
}
.cat-item p {
  margin-top: 8px;
  color: var(--ink-2);
  max-width: 52ch;
}
.cat-facts {
  margin: 0;
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 6px 14px;
  font-size: 0.9rem;
}
.cat-facts dt {
  font-weight: 650;
  color: var(--ink-3);
}
.cat-facts dd {
  margin: 0;
  color: var(--ink);
  min-width: 0;
  overflow-wrap: anywhere;
}
.cat-facts code {
  font-size: 0.74rem;
}
.cat-item > .pg {
  font-size: 30px;
  color: var(--route-text);
  justify-self: end;
  transition: transform 0.28s var(--ease);
}
.cat-item:hover {
  background: var(--sunk);
}
.cat-item:hover h3 {
  text-decoration: underline;
  text-decoration-thickness: 3px;
  text-underline-offset: 0.16em;
}
.cat-item:hover > .pg {
  transform: translateX(4px);
}
@media (max-width: 900px) {
  .cat-item {
    grid-template-columns: 64px minmax(0, 1fr) 28px;
  }
  .cat-item .tile {
    --s: 64px;
  }
  .cat-facts {
    grid-column: 2 / 3;
  }
  .cat-item > .pg {
    grid-row: 1;
    grid-column: 3;
    font-size: 24px;
  }
}
@media (max-width: 520px) {
  .cat-item {
    grid-template-columns: 48px minmax(0, 1fr);
    padding: 20px 16px;
    gap: 14px;
  }
  .cat-item .tile {
    --s: 48px;
  }
  .cat-facts {
    grid-column: 1 / -1;
  }
  .cat-item > .pg {
    display: none;
  }
}
.shared {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 2px solid var(--ink);
}
.shared li {
  padding: 20px 20px 4px 0;
}
.shared li + li {
  padding-left: 20px;
  border-left: 1px solid var(--rule);
}
.shared .pg {
  font-size: 34px;
  color: var(--indigo);
  margin-bottom: 14px;
}
.shared strong {
  display: block;
  font-weight: 720;
  font-stretch: 110%;
  font-size: 1.05rem;
  margin-bottom: 6px;
}
.shared span {
  color: var(--ink-2);
  font-size: 0.95rem;
}
@media (prefers-color-scheme: dark) {
  .shared .pg {
    color: #a19bf6;
  }
}
@media (max-width: 900px) {
  .shared {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .shared li:nth-child(odd) {
    padding-left: 0;
    border-left: 0;
  }
}
@media (max-width: 520px) {
  .shared {
    grid-template-columns: minmax(0, 1fr);
  }
  .shared li,
  .shared li + li {
    padding: 18px 0 8px;
    border-left: 0;
    border-bottom: 1px solid var(--rule);
  }
}

/* ── Product pages ──────────────────────────────────────────────────────────────────────────── */
.crumbs {
  padding-block: 18px 0;
  font-size: 0.9rem;
}
.crumbs ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 10px;
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--ink-3);
}
.crumbs li + li::before {
  content: '/';
  margin-right: 10px;
  color: var(--rule-2);
}
.crumbs a {
  color: var(--ink-2);
}
.sign-head {
  margin-top: 18px;
  background: var(--route);
  color: #fff;
}
.sign-head-grid {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 28px clamp(24px, 4vw, 56px);
  padding: clamp(28px, 5vw, 64px) clamp(20px, 4vw, 56px) clamp(28px, 4vw, 48px);
  align-items: start;
}
.sign-head .tile {
  --s: clamp(88px, 12vw, 168px);
  --tile-bg: #fff;
  --tile-ink: var(--route);
}
.sign-head h1 {
  font-size: clamp(2.5rem, 7vw, 5.6rem);
  font-stretch: 125%;
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 0.95;
}
.sign-head .lede {
  margin-top: 20px;
  color: rgba(255, 255, 255, 0.94);
  max-width: 46ch;
}
.sign-head .actions {
  margin-top: 28px;
}
.endpoints {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid rgba(255, 255, 255, 0.28);
}
.endpoint {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 4px 14px;
  align-items: baseline;
  padding: 16px clamp(20px, 4vw, 56px);
  background: rgba(0, 0, 0, 0.16);
}
.endpoint + .endpoint {
  border-left: 1px solid rgba(255, 255, 255, 0.28);
}
.endpoint b {
  font-weight: 760;
  font-stretch: 118%;
  font-size: 1rem;
}
.endpoint code {
  font-size: 0.74rem;
  overflow-wrap: anywhere;
  background: none;
  padding: 0;
  color: inherit;
}
.endpoint span {
  grid-column: 2;
  font-size: 0.88rem;
  color: rgba(255, 255, 255, 0.9);
}
@media (max-width: 760px) {
  .sign-head-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .endpoints {
    grid-template-columns: minmax(0, 1fr);
  }
  .endpoint + .endpoint {
    border-left: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.28);
  }
}
.prod {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 9fr);
  gap: 40px var(--gap);
  padding-block: clamp(48px, 6vw, 88px) var(--sec);
}
.toc {
  position: sticky;
  top: 96px;
  align-self: start;
}
.toc h2 {
  font-size: 0.95rem;
  font-weight: 720;
  font-stretch: 112%;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--ink);
}
.toc ol {
  margin: 0;
  padding: 0;
  list-style: none;
}
.toc a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 9px 0;
  border-bottom: 1px solid var(--rule);
  color: var(--ink-2);
  font-size: 0.95rem;
  font-weight: 560;
  text-decoration: none;
}
.toc a .pg {
  font-size: 16px;
  color: var(--ink-3);
  transition: transform 0.28s var(--ease);
}
.toc a:hover,
.toc a.is-here {
  color: var(--ink);
}
.toc a.is-here {
  font-weight: 700;
}
.toc a.is-here .pg {
  color: var(--route-text);
}
.toc a:hover .pg {
  transform: translateX(3px);
}
@media (max-width: 960px) {
  .prod {
    grid-template-columns: minmax(0, 1fr);
  }
  .toc {
    position: static;
  }
  .toc ol {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding-top: 12px;
  }
  .toc a {
    border: 1px solid var(--rule-2);
    padding: 6px 10px;
    font-size: 0.9rem;
  }
  .toc a .pg {
    display: none;
  }
  .toc a.is-here {
    border-color: var(--ink);
  }
}
.prod-main {
  min-width: 0;
}
.part {
  padding-top: 20px;
  border-top: 3px solid var(--ink);
}
.part + .part {
  margin-top: clamp(64px, 8vw, 104px);
}
.part > .h2 {
  font-size: clamp(1.7rem, 3.2vw, 2.5rem);
  margin-bottom: 24px;
}
.part > .h2 + .body {
  margin-bottom: 28px;
}
.part h3 {
  margin: 36px 0 14px;
}
.uses {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 var(--gap);
  margin: 0;
  padding: 0;
  list-style: none;
}
.uses li {
  padding: 18px 0;
  border-bottom: 1px solid var(--rule);
}
.uses strong {
  display: block;
  font-size: 1.12rem;
  font-weight: 720;
  font-stretch: 110%;
  margin-bottom: 4px;
}
.uses span {
  color: var(--ink-2);
}
@media (max-width: 700px) {
  .uses {
    grid-template-columns: minmax(0, 1fr);
  }
}
.part .stations {
  margin-top: 8px;
  color: var(--route);
  --stop-fill: var(--ground);
  --st-text: var(--ink-2);
}
.part .stations .st-name {
  color: var(--ink);
}
.note {
  display: flex;
  gap: 14px;
  margin-top: 28px;
  padding: 16px 18px;
  background: var(--panel);
  border: 1px solid var(--rule);
  color: var(--ink-2);
}
.note .pg {
  font-size: 24px;
  color: var(--route-text, var(--link));
  margin-top: 2px;
}
.ex-stack {
  display: grid;
  gap: 20px;
}
.reflinks {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 var(--gap);
  margin: 0;
  padding: 0;
  list-style: none;
}
.reflinks a {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 22px;
  gap: 12px;
  align-items: start;
  padding: 16px 0;
  border-bottom: 1px solid var(--rule);
  color: var(--ink);
  text-decoration: none;
}
.reflinks strong {
  display: block;
  font-weight: 700;
  font-stretch: 110%;
}
.reflinks span {
  display: block;
  font-size: 0.9rem;
  color: var(--ink-2);
  margin-top: 2px;
}
.reflinks code {
  font-size: 0.74rem;
}
.reflinks .pg {
  font-size: 20px;
  color: var(--route-text, var(--link));
  margin-top: 3px;
  transition: transform 0.28s var(--ease);
}
.reflinks a:hover strong {
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.2em;
}
.reflinks a:hover .pg {
  transform: translateX(3px);
}
@media (max-width: 700px) {
  .reflinks {
    grid-template-columns: minmax(0, 1fr);
  }
}
.also {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.also a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px 10px 10px;
  background: var(--route);
  color: #fff;
  text-decoration: none;
  font-weight: 680;
  font-stretch: 110%;
  line-height: 1.2;
  height: 100%;
}
.also .tile {
  --s: 34px;
  --tile-bg: rgba(255, 255, 255, 0.16);
}
.also a:hover {
  background: var(--ink);
  color: var(--ground);
}
.also a:hover .tile {
  --tile-ink: var(--ground);
}
@media (max-width: 1100px) {
  .also {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 460px) {
  .also {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ── Legal ──────────────────────────────────────────────────────────────────────────────────── */
.legal {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 9fr);
  gap: 40px var(--gap);
  padding-block: clamp(48px, 7vw, 96px) var(--sec);
}
.legal-side {
  border-top: 3px solid var(--ink);
  padding-top: 16px;
  align-self: start;
  position: sticky;
  top: 96px;
}
.legal-side p {
  font-size: 0.92rem;
  color: var(--ink-2);
}
.legal-side p + p {
  margin-top: 10px;
}
.legal-side nav a {
  display: flex;
  justify-content: space-between;
  padding: 9px 0;
  border-bottom: 1px solid var(--rule);
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
}
.legal-side nav a[aria-current='page'] {
  color: var(--link);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.3em;
}
.legal-side nav {
  margin-top: 20px;
}
.prose {
  max-width: 70ch;
  color: var(--ink-2);
}
.prose h1 {
  color: var(--ink);
  font-size: clamp(2.4rem, 6vw, 4.6rem);
  font-stretch: 125%;
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 0.96;
}
.prose .updated {
  margin: 18px 0 30px;
  font-size: 0.95rem;
  color: var(--ink-3);
}
.prose .lead {
  font-size: 1.2rem;
  line-height: 1.55;
  color: var(--ink);
  padding-bottom: 28px;
  border-bottom: 1px solid var(--rule);
}
.prose h2 {
  margin: 52px 0 14px;
  padding-top: 14px;
  border-top: 2px solid var(--ink);
  color: var(--ink);
  font-size: 1.45rem;
  font-weight: 750;
  font-stretch: 115%;
}
.prose p,
.prose ul {
  margin: 0 0 14px;
}
.prose ul {
  padding-left: 1.15em;
}
.prose li {
  margin: 8px 0;
}
.prose li::marker {
  color: var(--indigo);
}
.prose strong {
  color: var(--ink);
  font-weight: 680;
}
@media (max-width: 900px) {
  .legal {
    grid-template-columns: minmax(0, 1fr);
  }
  .legal-side {
    position: static;
  }
}

/* ── Reduced motion ─────────────────────────────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}
