/* EightCount site. Midnight Transit: a routine is a transit line, every 8-count is a station. */
:root {
  --enamel: #0D1636;
  --enamel-deep: #0A1130;
  --plate: #172350;
  --porcelain: #F4F1EA;
  --porcelain-dim: rgba(244, 241, 234, 0.72);
  --porcelain-faint: rgba(244, 241, 234, 0.48);
  --hairline: rgba(244, 241, 234, 0.14);
  --marigold: #FFB627;
  --cobalt-text: #7EA6FF;
  --green-text: #4CC783;
  --sign: "DIN Condensed", "DINCondensed-Bold", "Avenir Next Condensed", "Arial Narrow", "Roboto Condensed", "Helvetica Neue", sans-serif;
  --figure: "DIN Alternate", "DINAlternate-Bold", ui-rounded, system-ui, sans-serif;
  --rounded: "SF Pro Rounded", ui-rounded, system-ui, -apple-system, sans-serif;
  --body: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--enamel);
  color: var(--porcelain);
  font: 17px/1.6 var(--body);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--marigold); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
a:focus-visible { outline: 2px solid var(--marigold); outline-offset: 3px; border-radius: 4px; }

.wrap { max-width: 720px; margin: 0 auto; padding: 0 20px; }
.wrap.wide { max-width: 1040px; }

/* Top bar */
.top { border-bottom: 1px solid var(--hairline); }
.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--porcelain); text-decoration: none; }
.brand img { width: 30px; height: 30px; border-radius: 7px; display: block; }
.brand span, .sign {
  font-family: var(--sign);
  font-weight: 700;
  font-stretch: condensed;
  text-transform: uppercase;
  letter-spacing: 1.4px;
}
.brand span { font-size: 20px; line-height: 1; padding-top: 3px; }
.top nav { display: flex; gap: 20px; }
.top nav a { font-family: var(--sign); font-weight: 700; font-stretch: condensed; text-transform: uppercase; letter-spacing: 1.4px; font-size: 16px; color: var(--porcelain-dim); text-decoration: none; padding: 6px 0 3px; border-bottom: 2px solid transparent; }
.top nav a:hover, .top nav a[aria-current="page"] { color: var(--porcelain); border-bottom-color: var(--marigold); }

/* Text pages */
main.doc { padding-top: 40px; padding-bottom: 64px; }
.doc h1 { font-size: 36px; line-height: 1.15; margin: 0 0 8px; letter-spacing: -0.4px; }
.doc .lede { color: var(--porcelain-dim); margin: 0 0 32px; }
.doc h2 {
  font-family: var(--sign); font-weight: 700; font-stretch: condensed; text-transform: uppercase;
  letter-spacing: 1.4px; font-size: 20px; line-height: 1.2; color: var(--marigold);
  margin: 40px 0 10px; padding-top: 20px; border-top: 1px solid var(--hairline);
}
.doc h3 { font-size: 17px; margin: 22px 0 4px; }
.doc p, .doc li { color: var(--porcelain); }
.doc ul, .doc ol { padding-left: 22px; margin: 8px 0 16px; }
.doc li { margin: 6px 0; }
.doc li::marker { color: var(--porcelain-faint); }
.doc strong { font-weight: 650; }
.muted { color: var(--porcelain-dim); }

/* Station list: numbered steps drawn as stops on a line */
ol.line { list-style: none; padding: 0; margin: 14px 0 20px; position: relative; }
ol.line::before { content: ""; position: absolute; left: 13px; top: 14px; bottom: 14px; width: 4px; border-radius: 2px; background: var(--marigold); }
ol.line li { position: relative; padding-left: 46px; margin: 0 0 14px; counter-increment: stop; }
ol.line li:last-child { margin-bottom: 0; }
ol.line { counter-reset: stop; }
ol.line li::before {
  content: counter(stop); position: absolute; left: 0; top: 0; width: 30px; height: 30px; border-radius: 50%;
  background: var(--enamel); border: 4px solid var(--porcelain); color: var(--porcelain);
  font: 800 12px/22px var(--rounded); text-align: center; font-variant-numeric: tabular-nums;
}
ol.line.cobalt::before { background: var(--cobalt-text); }
ol.line.green::before { background: var(--green-text); }

.plate { background: var(--plate); border-radius: 16px; padding: 18px 20px; margin: 16px 0; }
.plate p:first-child { margin-top: 0; }
.plate p:last-child { margin-bottom: 0; }

.toc { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 8px; padding: 0; list-style: none; }
.toc a { display: inline-block; padding: 6px 12px 4px; border-radius: 9999px; border: 1px solid var(--hairline); color: var(--porcelain); text-decoration: none; font-family: var(--sign); font-weight: 700; font-stretch: condensed; text-transform: uppercase; letter-spacing: 1.2px; font-size: 15px; }
.toc a:hover { border-color: var(--marigold); }

kbd, .path { font: 600 15px/1 var(--body); background: var(--plate); border: 1px solid var(--hairline); border-radius: 6px; padding: 2px 6px; white-space: nowrap; }

/* Footer */
.foot { border-top: 1px solid var(--hairline); padding: 24px 0 40px; color: var(--porcelain-faint); font-size: 14px; }
.foot .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 24px; }
.foot nav { display: flex; flex-wrap: wrap; gap: 16px; }
.foot a { color: var(--porcelain-dim); text-decoration: none; }
.foot a:hover { color: var(--porcelain); text-decoration: underline; }

/* Home */
.hero { padding: 48px 0 24px; }
.hero .eyebrow { font-family: var(--sign); font-weight: 700; font-stretch: condensed; text-transform: uppercase; letter-spacing: 1.6px; color: var(--marigold); font-size: 17px; margin: 0 0 12px; }
.hero h1 { font-family: var(--rounded); font-weight: 900; font-size: clamp(40px, 7.4vw, 76px); line-height: 1.02; letter-spacing: -1px; margin: 0; max-width: 13ch; }
.hero h1 em { font-style: normal; color: var(--marigold); }
.hero .sub { font-size: 19px; color: var(--porcelain-dim); max-width: 36em; margin: 18px 0 0; }
.platform { margin: 18px 0 0; font-family: var(--sign); font-weight: 700; font-stretch: condensed; text-transform: uppercase; letter-spacing: 1.4px; font-size: 16px; color: var(--porcelain-faint); }

.map { margin: 36px 0 8px; }
.map svg { display: block; width: 100%; height: auto; }
.map .lbl { font-family: var(--sign); font-weight: 700; letter-spacing: 1.2px; text-transform: uppercase; }

.stops { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; padding: 16px 0 48px; }
.stop { background: var(--plate); border-radius: 16px; padding: 20px; }
.stop h2 { font-family: var(--sign); font-weight: 700; font-stretch: condensed; text-transform: uppercase; letter-spacing: 1.4px; font-size: 19px; margin: 0 0 6px; display: flex; align-items: center; gap: 10px; }
.stop h2::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--enamel); border: 4px solid var(--porcelain); box-shadow: 0 0 0 4px var(--line, var(--marigold)); flex: none; margin: 0 4px 2px; }
.stop.m { --line: var(--marigold); }
.stop.c { --line: var(--cobalt-text); }
.stop.g { --line: var(--green-text); }
.stop p { margin: 0; color: var(--porcelain-dim); font-size: 16px; line-height: 1.55; }

@media (max-width: 760px) {
  .stops { grid-template-columns: 1fr; gap: 12px; }
  .hero { padding-top: 32px; }
}
@media (max-width: 420px) {
  body { font-size: 16px; }
  .wrap { padding: 0 16px; }
  .top nav { gap: 14px; }
  .brand span { font-size: 18px; }
  .doc h1 { font-size: 30px; }
}
