:root {
  --paper: #ffffff;
  --ink: #16203a;
  --slate: #576074;
  --mist: #dfe3e9;
  --enamel: #16203a;
  --enamel-soft: #b9c3d8;

  --R: #7a2da6;
  --B: #1f56c7;
  --P: #0c7a4a;
  --A: #c98500;
  --F: #d0303d;

  --measure: 64ch;
  --wide: 1480px;
  --gutter: clamp(20px, 4vw, 48px);
}

.l-R { --line: var(--R); --line-ink: #fff; }
.l-B { --line: var(--B); --line-ink: #fff; }
.l-P { --line: var(--P); --line-ink: #fff; }
.l-A { --line: var(--A); --line-ink: #16203a; }
.l-F { --line: var(--F); --line-ink: #fff; }

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

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

html { scroll-padding-top: 120px; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Overpass", "Segoe UI", system-ui, sans-serif;
  font-size: 1.125rem;
  line-height: 1.55;
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 3px; }
code { font-family: inherit; font-weight: 700; }

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

.vh {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip {
  position: absolute; left: 12px; top: -60px; z-index: 20;
  background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 6px;
  font-weight: 700; text-decoration: none;
}
.skip:focus { top: 12px; }

/* ---------- Line bullets ---------- */

.bullet {
  display: inline-flex; align-items: center; justify-content: center;
  flex: none;
  width: 1.75rem; height: 1.75rem; border-radius: 50%;
  background: var(--line); color: var(--line-ink);
  font-weight: 800; font-size: 0.95rem; line-height: 1;
  text-decoration: none;
}
.bullet > span[aria-hidden] { transform: translateY(0.08em); }
.bullet-small { width: 1.25rem; height: 1.25rem; font-size: 0.7rem; }
.bullet-large { width: 4rem; height: 4rem; font-size: 2.1rem; }

/* ---------- Header ---------- */

.top {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 12px 32px;
  max-width: var(--wide); margin: 0 auto; padding: 20px var(--gutter);
}
.top-brand { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
.top-back {
  display: inline-flex; align-items: center; gap: 6px;
  border: 2px solid var(--mist); border-radius: 999px;
  padding: 5px 12px 4px;
  font-size: 0.88rem; font-weight: 700; line-height: 1.1;
  color: var(--ink); text-decoration: none; white-space: nowrap;
}
.top-back:hover { border-color: var(--ink); text-decoration: none; }
.top-name { font-weight: 800; text-decoration: none; font-size: 1.05rem; }
.top-name:hover { text-decoration: underline; }
.top-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 28px; max-width: 100%; }
.top-nav ul { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0; padding: 0; list-style: none; }
.top-links { gap: 10px 20px; font-weight: 600; font-size: 1rem; }
.top-links a { text-decoration: none; white-space: nowrap; }
.top-links a:hover { text-decoration: underline; }
.top-lines .bullet { width: 2rem; height: 2rem; }

/* ---------- Hero ---------- */

.hero {
  display: grid; gap: 16px 64px; align-items: end;
  max-width: var(--wide); margin: 0 auto;
  padding: clamp(28px, 5vw, 64px) var(--gutter) 32px;
}
.hero h1 {
  margin: 0;
  font-size: clamp(3rem, 7.4vw, 7rem);
  font-weight: 900; line-height: 0.92; letter-spacing: -0.035em;
}
.hero-lede {
  margin: 12px 0 0; max-width: 36ch;
  font-size: clamp(1.3rem, 2vw, 1.6rem); line-height: 1.35; font-weight: 600;
}
.hero-how { margin: 0; max-width: 50ch; color: var(--slate); }
@media (min-width: 900px) {
  .hero { grid-template-columns: auto minmax(0, 1fr); }
  .hero h1 { grid-column: 1 / -1; }
}

/* ---------- Map ---------- */

.map-section { max-width: var(--wide); margin: 0 auto; padding: 8px var(--gutter) 0; }

.map-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; align-items: start; }
.map-frame { min-width: 0; }
/* Two columns only once the map column stays wider than the map's 760px minimum.
   The notice has no intrinsic height there, so the map alone sets the row and a long notice scrolls inside it. */
@media (min-width: 1280px) {
  .map-grid { grid-template-columns: minmax(0, 1fr) 340px; align-items: stretch; }
  .notice {
    contain: size;
    overflow-y: auto; overscroll-behavior: contain;
    scrollbar-width: thin; scrollbar-color: var(--enamel-soft) transparent;
  }
}

.map-scroll {
  --edge-l: #000; --edge-r: #000;
  overflow-x: auto; overscroll-behavior-x: contain;
}
/* Set by the script while there is map beyond that edge. */
.map-scroll.more-left { --edge-l: transparent; }
.map-scroll.more-right { --edge-r: transparent; }
.map-scroll.more-left, .map-scroll.more-right {
  mask-image: linear-gradient(to right, var(--edge-l), #000 36px, #000 calc(100% - 36px), var(--edge-r));
}
.map-scroll:focus-visible { outline-offset: 6px; }
#network { display: block; width: 100%; min-width: 660px; height: auto; }

.route {
  fill: none; stroke-width: 12; stroke-linejoin: round; stroke-linecap: butt;
  transition: opacity 160ms ease;
}
.route.is-dim,
#network[data-highlight="R"] .route:not([data-line="R"]),
#network[data-highlight="B"] .route:not([data-line="B"]),
#network[data-highlight="P"] .route:not([data-line="P"]),
#network[data-highlight="A"] .route:not([data-line="A"]),
#network[data-highlight="F"] .route:not([data-line="F"]) { opacity: 0.16; }

.station { cursor: pointer; }
.station:focus { outline: none; }
.station .hit { fill: transparent; }
.station .ring { fill: var(--paper); stroke: var(--ink); stroke-width: 4.5; }
.station .tick { stroke-width: 8; stroke-linecap: butt; }
.station .focus-ring { fill: none; stroke: var(--ink); stroke-width: 4; opacity: 0; }
.station:focus .focus-ring { opacity: 1; }
.station:focus .label { text-decoration: underline; text-decoration-thickness: 3px; }
.station:focus:not(:focus-visible) .focus-ring { opacity: 0; }
.station:focus:not(:focus-visible) .label { text-decoration: none; }

.label {
  font-family: "Overpass", system-ui, sans-serif;
  font-size: 22px; font-weight: 700; fill: var(--ink);
  paint-order: stroke; stroke: var(--paper); stroke-width: 6px; stroke-linejoin: round;
}
/* A service note under a station's name, as printed maps mark "opening soon". */
.label .note { font-size: 22px; font-weight: 700; font-style: italic; fill: #333d55; }
.station:hover .label { text-decoration: underline; text-decoration-thickness: 2px; }
.station:hover .label .note { text-decoration: none; }
.station:hover .ring { stroke-width: 5.5; }

.station.is-selected .ring { fill: var(--ink); }
.station.is-selected .tick { stroke-width: 10; }
.station.is-selected .label { fill: var(--paper); stroke: var(--ink); stroke-width: 16px; text-decoration: none; }
.station.is-selected .label .note { fill: var(--enamel-soft); }

.map-noscript { color: var(--slate); }
.map-hint { margin: 8px 0 0; color: var(--slate); font-size: 0.95rem; }

/* ---------- Station notice ---------- */

.notice {
  background: var(--enamel); color: #fff;
  border-radius: 10px; padding: 24px 26px 26px;
  font-size: 1rem; line-height: 1.5;
}
.notice :focus-visible { outline-color: #fff; }
.notice > * { max-width: 72ch; }
.notice-kind { margin: 0; color: var(--enamel-soft); font-weight: 600; font-size: 0.9rem; }
.notice-name { margin: 2px 0 0; font-size: 1.6rem; line-height: 1.15; font-weight: 800; }
.notice-name:focus { outline: none; }
.notice-lines { display: flex; gap: 6px; margin: 12px 0 0; }
.notice-intro { margin: 14px 0 0; color: #e7ebf3; }

.plate {
  display: inline-block; margin: 0;
  border: 2px solid currentColor; border-radius: 4px;
  padding: 3px 10px 1px;
  font-size: 0.95rem; font-weight: 700; line-height: 1.35;
}
.notice .plate { margin-top: 14px; }

.notice-body { margin: 20px 0 0; }
.notice-body dt { color: var(--enamel-soft); font-weight: 600; font-size: 0.9rem; }
.notice-body dd { margin: 2px 0 14px; }
.notice-body ul { margin: 0; padding: 0; list-style: none; }
.notice-body li { position: relative; padding-left: 18px; margin-top: 4px; }
.notice-body li::before {
  content: ""; position: absolute; left: 0; top: 0.55em;
  width: 9px; height: 4px; background: #fff;
}
.notice-parts + p { margin: 8px 0 0; }
.notice-body dd > a { font-weight: 700; }

.notice-links, .notice-rides { margin: 0; padding: 0; list-style: none; }
.notice-links { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-bottom: 16px; font-weight: 700; }
.notice-rides { border-top: 1px solid rgba(255, 255, 255, 0.22); padding-top: 14px; }
.notice-rides li + li { margin-top: 6px; }
.notice-rides a { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 600; }
.notice-rides a:hover span:last-child { text-decoration: underline; }

.notice-close {
  margin-top: 18px;
  font: inherit; font-weight: 700; font-size: 0.95rem;
  color: #fff; background: transparent;
  border: 2px solid rgba(255, 255, 255, 0.6); border-radius: 6px;
  padding: 6px 14px 4px; cursor: pointer;
}
.notice-close:hover { border-color: #fff; }

/* ---------- Key ---------- */

.key {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px 40px;
  margin-top: 20px; padding: 18px 0 0;
  font-size: 1rem; font-weight: 600;
}
.key ul { display: flex; flex-wrap: wrap; gap: 10px 22px; margin: 0; padding: 0; list-style: none; }
.key-lines a { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; }
.key-lines a:hover { text-decoration: underline; }
.key-symbols { color: var(--slate); }
.key-symbols li { display: inline-flex; align-items: center; gap: 8px; }
.key-symbols svg { width: 44px; height: 24px; }
.key-note { font-style: italic; font-weight: 700; white-space: nowrap; }

/* ---------- Line sections ---------- */

.line { margin-top: clamp(80px, 12vw, 160px); }

.line-head {
  display: flex; gap: 20px; align-items: flex-start;
  max-width: var(--wide); margin: 0 auto; padding: 0 var(--gutter) 24px;
}
.line-head h2 {
  margin: 0; font-size: clamp(2rem, 4.4vw, 3.4rem);
  line-height: 1; font-weight: 900; letter-spacing: -0.02em;
}
.line-head p { margin: 10px 0 0; max-width: 52ch; color: var(--slate); font-size: 1.2rem; }

/* The strip map above the doors: sticky for the length of its own line. */
.strip {
  position: sticky; top: 0; z-index: 5;
  background: var(--paper);
  border-bottom: 1px solid var(--mist);
}
.strip-inner { max-width: var(--wide); margin: 0 auto; padding: 10px var(--gutter) 10px; }
.strip-title {
  display: flex; align-items: center; gap: 8px;
  margin: 0 0 2px; font-size: 0.9rem; font-weight: 700;
}
.strip-scroll { overflow-x: auto; scrollbar-width: thin; }
.strip-stops { display: flex; margin: 0; padding: 8px 0 6px; list-style: none; min-width: min-content; }
.strip-stops li { position: relative; flex: 1 1 0; min-width: 112px; }
.strip-stops li::before {
  content: ""; position: absolute; top: 9px; left: 0; right: 0; height: 8px;
  background: var(--line);
}
.strip-stops li:first-child::before { left: 50%; }
.strip-stops li:last-child::before { right: 50%; }
.strip-stops li.is-passed::before { background: var(--mist); }
.strip-stops li.is-current::before { background: linear-gradient(to right, var(--mist) 50%, var(--line) 50%); }
.strip-stops li.is-current:first-child::before { background: var(--line); }
.strip-stops li.is-current:last-child::before { background: var(--mist); }

.strip-stops a {
  position: relative; display: flex; flex-direction: column; align-items: center;
  padding: 0 6px 2px; text-align: center; text-decoration: none;
}
.strip-mark {
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--paper); border: 4px solid var(--line);
}
.is-interchange .strip-mark { border-color: var(--ink); }
.strip-name { margin-top: 5px; font-size: 0.86rem; font-weight: 600; line-height: 1.2; max-width: 15ch; }
.strip-changes { display: flex; gap: 3px; margin-top: 4px; }
.strip-stops a:hover .strip-name { text-decoration: underline; }

.is-passed .strip-mark { border-color: var(--mist); }
.is-passed .strip-name { color: var(--slate); }
.is-current .strip-mark { background: var(--line); border-color: var(--ink); box-shadow: 0 0 0 3px var(--paper), 0 0 0 5px var(--ink); }
.is-current .strip-name { font-weight: 800; }

/* ---------- Stops ---------- */

.stops { max-width: var(--wide); margin: 0 auto; padding: 0 var(--gutter); }

.stop {
  display: grid; gap: 14px 56px;
  padding: 52px 0 8px;
}
@media (min-width: 900px) {
  .stop { grid-template-columns: minmax(240px, 340px) minmax(0, 1fr); }
}

.stop-name {
  display: flex; gap: 14px; align-items: flex-start;
  margin: 0; font-size: 1.6rem; line-height: 1.15; font-weight: 800; letter-spacing: -0.01em;
}
.stop-mark { flex: none; margin-top: 2px; }
.stop-mark.is-tick { position: relative; width: 30px; height: 26px; }
.stop-mark.is-tick::before,
.stop-mark.is-tick::after { content: ""; position: absolute; background: var(--line); }
.stop-mark.is-tick::before { left: 0; right: 0; top: 14px; height: 8px; }
.stop-mark.is-tick::after { left: 11px; width: 8px; top: 2px; height: 12px; }
.stop-mark.is-ring { width: 24px; height: 24px; border-radius: 50%; border: 4px solid var(--ink); background: var(--paper); box-shadow: 0 0 0 4px var(--line); margin: 3px 4px 0; }

.stop-meta .plate { margin-top: 14px; }
.change {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px;
  margin: 14px 0 0; color: var(--slate); font-size: 0.95rem; font-weight: 600;
}
.change .bullet { width: 1.6rem; height: 1.6rem; font-size: 0.85rem; }

.stop-body > p { margin: 0 0 14px; max-width: var(--measure); }
.figures { margin: 6px 0 0; padding: 0; list-style: none; max-width: var(--measure); }
.figures li { position: relative; padding-left: 26px; margin-top: 6px; font-weight: 600; }
.figures li::before {
  content: ""; position: absolute; left: 0; top: 0.6em;
  width: 14px; height: 5px; background: var(--line);
}
.stop-links { display: flex; flex-wrap: wrap; gap: 8px 22px; font-weight: 700; }

/* ---------- Upstream status ---------- */

/* Each state has its own marker shape and border, so the word is never the only cue besides colour. */
.status {
  --fg: var(--ink); --bg: var(--paper);
  display: inline-flex; align-items: center; gap: 7px;
  border: 2px solid var(--fg); border-radius: 999px;
  padding: 3px 11px 1px 9px;
  color: var(--fg); background: var(--bg);
  font-size: 0.85rem; font-weight: 700; line-height: 1.35; white-space: nowrap;
}
.status::before {
  content: ""; flex: none; box-sizing: border-box;
  width: 10px; height: 10px; margin-top: -2px;
}
.status[data-state="drafted"] { border-style: dashed; }
.status[data-state="drafted"]::before { width: 8px; height: 8px; border: 2px solid var(--fg); transform: rotate(45deg); }
.status[data-state="planned"] { border-style: dashed; }
.status[data-state="planned"]::before { border: 2px solid var(--fg); border-radius: 50%; }
.status[data-state="open"]::before { background: var(--fg); border-radius: 50%; }
.status[data-state="changes requested"] { background: var(--A); color: #16203a; border-color: var(--A); }
.status[data-state="changes requested"]::before { width: 8px; height: 8px; background: #16203a; transform: rotate(45deg); }
.status[data-state="merged"] { background: var(--fg); color: var(--bg); }
.status[data-state="merged"]::before {
  width: 5px; height: 10px; margin: -4px 2px 0;
  border: solid var(--bg); border-width: 0 2.5px 2.5px 0; transform: rotate(45deg);
}
.status[data-state="closed"] { border-style: dotted; }
.status[data-state="closed"]::before { height: 3px; margin-top: -1px; background: var(--fg); }
.status[data-state="on hold"]::before { width: 9px; border: solid var(--fg); border-width: 0 3px; }
.status[data-state="posted"]::before { border: 2px solid var(--fg); }
.status[data-state="comment posted"]::before { border: 2px solid var(--fg); border-radius: 50% 50% 50% 0; }
.status[data-state="public repo"]::before { background: var(--fg); }
.status[data-state="in progress"] {
  background: repeating-linear-gradient(135deg, var(--bg) 0 4px, color-mix(in srgb, var(--fg) 22%, var(--bg)) 4px 7px);
}
.status[data-state="in progress"]::before {
  border: 2px solid var(--fg); border-radius: 50%;
  background: linear-gradient(90deg, var(--fg) 50%, transparent 50%);
}

.service-list { margin: 0; padding: 0; list-style: none; }
.service-list li {
  display: flex; flex-wrap: wrap; align-items: center; align-content: flex-start;
  gap: 4px 12px; padding: 10px 0;
}
.service-list li + li { border-top: 1px solid var(--mist); }
.service-name { flex: 1 0 100%; font-weight: 700; line-height: 1.3; }
.service-ref { flex: 1 1 0; min-width: 0; font-size: 0.9rem; line-height: 1.35; color: var(--slate); overflow-wrap: anywhere; }
.service-ref a { display: block; width: fit-content; }
.service-ref a + a { margin-top: 2px; }
.service-list .status { margin-left: auto; }
.service-issue {
  flex: 1 0 100%; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px;
  font-size: 0.9rem; line-height: 1.35;
}
.service-list .service-issue .status { margin-left: 0; }
.status-small { padding: 1px 8px 0 7px; font-size: 0.78rem; gap: 6px; }
.status-small::before { width: 8px; height: 8px; }
@media (max-width: 600px) {
  /* Narrow rows: name, then the pill, then links at full width so repo names do not break. */
  .service-list .status:not(.status-small) { order: -1; margin: 0 0 2px; }
  .service-list .service-name { order: -2; }
  .service-ref { flex-basis: 100%; }
}

/* The one place every upstream item is listed, inside the Waydroid stop. */
.service {
  margin: 18px 0 8px;
  border-top: 4px solid var(--ink); border-bottom: 1px solid var(--mist);
  font-size: 1rem; line-height: 1.5;
}
.service summary {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 12px;
  min-height: 48px; padding: 12px 0 10px 28px; position: relative;
  cursor: pointer; list-style: none;
}
.service summary::-webkit-details-marker { display: none; }
.service summary::before {
  content: ""; position: absolute; left: 4px; top: 19px;
  border: solid var(--ink); border-width: 0 3px 3px 0; width: 8px; height: 8px;
  transform: rotate(-45deg); transition: transform 160ms ease;
}
.service[open] summary::before { transform: rotate(45deg); top: 16px; }
.service-title { font-size: 1.15rem; line-height: 1.2; font-weight: 800; }
.service summary:hover .service-title { text-decoration: underline; text-decoration-thickness: 2px; }
.service-count { font-style: italic; font-weight: 700; color: #333d55; }
.service-note { margin: 0 0 4px; color: var(--slate); font-size: 0.95rem; }
@media (min-width: 1100px) {
  .service .service-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 40px; }
  .service .service-list li + li { border-top: 0; }
  .service .service-list li:nth-child(n + 3) { border-top: 1px solid var(--mist); }
}

/* ---------- About, certifications, open source, contact ---------- */

.info {
  display: grid; gap: 56px 72px;
  max-width: var(--wide); margin: clamp(96px, 14vw, 180px) auto 0;
  padding: 56px var(--gutter) 0;
  border-top: 10px solid var(--ink);
}
@media (min-width: 900px) { .info { grid-template-columns: 1fr 1fr; } }

.info h2 { margin: 0 0 16px; font-size: 2rem; line-height: 1.1; font-weight: 900; letter-spacing: -0.01em; }
.info p { margin: 0 0 14px; max-width: var(--measure); }

.facts { display: grid; grid-template-columns: max-content 1fr; gap: 6px 20px; margin: 22px 0 0; }
.facts dt { font-weight: 700; }
.facts dd { margin: 0; }

.cert-list { margin: 0; padding: 0; list-style: none; }
.cert-list li { display: flex; flex-direction: column; padding: 10px 0; }
.cert-list li + li { border-top: 1px solid var(--mist); }
.cert-list span { color: var(--slate); font-size: 1rem; }

.link-list { display: flex; flex-wrap: wrap; gap: 8px 24px; margin: 0 0 16px; padding: 0; list-style: none; font-weight: 700; }

.foot {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 32px;
  max-width: var(--wide); margin: 96px auto 0; padding: 24px var(--gutter) 40px;
  color: var(--slate); font-size: 0.95rem;
}
.foot p { margin: 0; max-width: 70ch; }
.foot-back { font-weight: 700; color: var(--ink); text-decoration: none; }
.foot-back:hover { text-decoration: underline; }

@media (max-width: 600px) {
  body { font-size: 1.0625rem; }
  .top { gap: 10px 16px; padding-block: 16px; }
  .top-nav { gap: 10px 14px; }
  .top-links { gap: 8px 14px; font-size: 0.95rem; }
  .bullet-large { width: 3rem; height: 3rem; font-size: 1.6rem; }
  .stop-name { font-size: 1.4rem; }
  .strip-stops li { min-width: 98px; }
  /* Fade the edges so a cut-off station reads as more to scroll to. */
  .strip-scroll { mask-image: linear-gradient(to right, transparent, #000 18px, #000 calc(100% - 18px), transparent); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* ---------- Hero actions, KPI strip & Dark mode ---------- */
.theme-btn {
  border: 2px solid var(--mist); background: transparent; color: var(--ink);
  font: 700 0.85rem/1 inherit; padding: 6px 11px; border-radius: 999px; cursor: pointer;
}
.theme-btn:hover { border-color: var(--ink); }

.hero-actions {
  grid-column: 1 / -1;
  display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px;
}
.hero-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 18px; border-radius: 8px;
  font: 700 0.95rem/1.1 inherit; cursor: pointer; text-decoration: none;
  border: 2px solid var(--ink); background: transparent; color: var(--ink);
}
.hero-btn:hover { background: var(--mist); text-decoration: none; }
.hero-btn-primary { background: var(--ink); color: var(--paper); }
.hero-btn-primary:hover { opacity: 0.9; background: var(--ink); }

.hero-kpis {
  grid-column: 1 / -1;
  display: grid; grid-template-columns: 1fr; gap: 12px;
  list-style: none; margin: 12px 0 0; padding: 0;
}
@media (min-width: 560px) {
  .hero-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1024px) {
  .hero-kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
.hero-kpis li {
  border: 2px solid var(--mist); border-radius: 8px; padding: 12px 14px;
  display: flex; flex-direction: column; gap: 3px;
}
.hero-kpis strong { font-size: 1.05rem; font-weight: 800; color: var(--ink); }
.hero-kpis span { font-size: 0.88rem; color: var(--slate); line-height: 1.35; }

:root[data-theme="dark"] {
  color-scheme: dark;
  --paper: #0E131F;
  --ink: #EEF2FA;
  --slate: #9BA7BE;
  --mist: #243047;
  --enamel: #172136;
  --enamel-soft: #9FB0CE;
  --R: #A855F7;
  --B: #4F83F1;
  --P: #10B981;
  --A: #F59E0B;
  --F: #F43F5E;
}
:root[data-theme="dark"] .station .ring { fill: var(--paper); stroke: var(--ink); }
:root[data-theme="dark"] .label { fill: var(--ink); stroke: var(--paper); }
:root[data-theme="dark"] .label .note { fill: var(--enamel-soft); }
:root[data-theme="dark"] .station.is-selected .label { fill: var(--paper); stroke: var(--ink); }
:root[data-theme="dark"] .service-count { color: var(--enamel-soft); }

@media print {
  .top-back, .top-nav, .hero-actions, .map-hint, .foot-back, .foot-sep { display: none !important; }
  body { background: #fff; color: #000; }
}
