/* Transit Pulse — gillu.me design system, token-for-token with SkyNYC's
   globals.css (light = Cursor Light, dark = the owner's editor palette).
   Container discipline matches sky: max-w 1400px, px-16, cards on surface. */

:root {
  --background: #ffffff;
  --foreground: #1a1a1a;
  --foreground-2: #333333;
  --muted-foreground: #666666;
  --faint-foreground: #999999;
  --secondary: #f0f0f0;
  --surface: #ffffff;
  --surface-2: #f5f5f5;
  --border: #e0e0e0;
  --border-2: #d0d0d0;
  --sidebar: #f5f5f5;
  --accent: #0066cc;
  --heat: #0066cc;
  --good: #059669;
  --warn: #d97700;
  --bad: #cc0000;
  --panel: rgba(255, 255, 255, 0.96);
  --shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --background: #1a1a1a;
    --foreground: #d8dee9;
    --foreground-2: #b0b7c3;
    --muted-foreground: #8e959e;
    --faint-foreground: #505050;
    --secondary: #2a2a2a;
    --surface: #1f1f1f;
    --surface-2: #2a2a2a;
    --border: #2e2e2e;
    --border-2: #3a3a3a;
    --sidebar: #1f1f1f;
    --accent: #85c1fc;
  --heat: #4a90e2;
    --good: #a3be8c;
    --warn: #ebc88d;
    --bad: #bf616a;
    --panel: rgba(31, 31, 31, 0.94);
    --shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.5), 0 4px 6px -4px rgba(0, 0, 0, 0.5);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --background: #1a1a1a;
  --foreground: #d8dee9;
  --foreground-2: #b0b7c3;
  --muted-foreground: #8e959e;
  --faint-foreground: #505050;
  --secondary: #2a2a2a;
  --surface: #1f1f1f;
  --surface-2: #2a2a2a;
  --border: #2e2e2e;
  --border-2: #3a3a3a;
  --sidebar: #1f1f1f;
  --accent: #85c1fc;
  --heat: #4a90e2;
  --good: #a3be8c;
  --warn: #ebc88d;
  --bad: #bf616a;
  --panel: rgba(31, 31, 31, 0.94);
  --shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.5), 0 4px 6px -4px rgba(0, 0, 0, 0.5);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--background); }

body {
  margin: 0;
  background: var(--background);
  color: var(--foreground);
  font-family: "Geist", system-ui, sans-serif;
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.mono {
  font-family: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;
  font-variant-numeric: tabular-nums;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
:where(a, button):focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 2px;
}

/* ---------- corner theme toggle (sky §7c clone) ----------
   The sliver IS the hit area; fill is the TARGET theme's sidebar. */
.corner-toggle {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 60;
  width: 32px;
  height: 32px;
  transform: translate(-50%, -50%);
  border-radius: 9999px;
  border: none;
  padding: 0;
  background: none;
}
.corner-fill {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 9999px;
  border: 1px solid var(--border);
  background: var(--toggle-fill, var(--sidebar));
  transition: transform 300ms cubic-bezier(0, 0, 0.2, 1);
}
.corner-toggle:hover .corner-fill { transform: scale(1.5); }

/* view-transition sweep companion — required or the default crossfade fights
   the radial clip animation */
::view-transition-old(root),
::view-transition-new(root) { animation: none; mix-blend-mode: normal; }
::view-transition-old(root) { z-index: 1; }
::view-transition-new(root) { z-index: 2; }

/* ---------- status bar (sky §8 clone) ---------- */
.statusbar {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, var(--sidebar) 90%, transparent);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  line-height: 1.5; /* sky preflight: 11.5px → 17.25px, 12px → 18px */
}
.statusbar-inner {
  margin: 0 auto;
  max-width: 1400px;
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 12px 24px;
}
.wordmark {
  font-size: 14px;
  line-height: 20px;
  font-weight: 500;
  letter-spacing: -0.025em;
  color: var(--foreground);
}
.wordmark:hover { text-decoration: none; }
.portfolio-link {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  line-height: 20px;
  text-transform: lowercase;
  color: var(--muted-foreground);
  transition: color 150ms cubic-bezier(0.4, 0, 0.2, 1);
}
.portfolio-link:hover { color: var(--foreground); text-decoration: none; }
.arrow-swap { position: relative; width: 14px; height: 14px; overflow: hidden; flex-shrink: 0; }
.arrow-swap svg {
  position: absolute; inset: 0; width: 14px; height: 14px;
  transition: transform 300ms cubic-bezier(0, 0, 0.2, 1); /* tailwind ease-out */
}
.arrow-swap .a2 { transform: translateX(150%); }
.portfolio-link:hover .a1 { transform: translateX(-150%); }
.portfolio-link:hover .a2 { transform: translateX(0); }
.sitename { font-size: 14px; line-height: 20px; color: var(--muted-foreground); }
@media (max-width: 767px) { .sitename { display: none; } }
@media (max-width: 639px) { .gh-link { display: none; } }
.header-banner {
  border-top: 1px solid var(--border);
  background: color-mix(in srgb, var(--secondary) 50%, transparent);
  padding: 6px 16px;
  text-align: center;
  font-size: 12px;
  color: var(--foreground-2);
}
.header-banner .mono { font-size: 11.5px; }
.header-banner .mono, .hero-note .mono, .nw { white-space: nowrap; }
.statusbar-right { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.status {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11.5px;
  color: var(--foreground-2);
}
.status-pulse {
  position: relative;
  display: flex;
  width: 10px;
  height: 10px;
  animation: pulse-breathe 0.9s ease-out 1;
}
.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 9999px;
  background: var(--muted-foreground);
}
@keyframes pulse-breathe {
  0%   { transform: scale(1);   opacity: 1; }
  35%  { transform: scale(1.6); opacity: 0.45; }
  100% { transform: scale(1);   opacity: 1; }
}
.status .sep { color: var(--faint-foreground); }
.status-when { color: var(--muted-foreground); font-weight: 400; }
.icon-btn {
  display: block;
  padding: 6px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: transparent;
  color: var(--foreground-2);
  font: inherit; /* sky's real button keeps the default cursor — no pointer */
  transition: color 150ms cubic-bezier(0.4, 0, 0.2, 1),
              background-color 150ms cubic-bezier(0.4, 0, 0.2, 1);
}
.icon-btn:hover { background: var(--secondary); text-decoration: none; }
.icon-btn svg, .gh-mark { display: block; width: 14px; height: 14px; }
.gh-mark {
  background: currentColor;
  -webkit-mask: var(--gh-svg) center / contain no-repeat;
          mask: var(--gh-svg) center / contain no-repeat;
  --gh-svg: url("data:image/svg+xml,%3Csvg width='98' height='96' viewBox='0 0 98 96' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cg clip-path='url(%23c0)'%3E%3Cpath d='M41.4395 69.3848C28.8066 67.8535 19.9062 58.7617 19.9062 46.9902C19.9062 42.2051 21.6289 37.0371 24.5 33.5918C23.2559 30.4336 23.4473 23.7344 24.8828 20.959C28.7109 20.4805 33.8789 22.4902 36.9414 25.2656C40.5781 24.1172 44.4062 23.543 49.0957 23.543C53.7852 23.543 57.6133 24.1172 61.0586 25.1699C64.0254 22.4902 69.2891 20.4805 73.1172 20.959C74.457 23.543 74.6484 30.2422 73.4043 33.4961C76.4668 37.1328 78.0937 42.0137 78.0937 46.9902C78.0937 58.7617 69.1934 67.6621 56.3691 69.2891C59.623 71.3945 61.8242 75.9883 61.8242 81.252L61.8242 91.2051C61.8242 94.0762 64.2168 95.7031 67.0879 94.5547C84.4102 87.9512 98 70.6289 98 49.1914C98 22.1074 75.9883 6.69539e-07 48.9043 4.309e-07C21.8203 1.92261e-07 -1.9479e-07 22.1074 -4.3343e-07 49.1914C-6.20631e-07 70.4375 13.4941 88.0469 31.6777 94.6504C34.2617 95.6074 36.75 93.8848 36.75 91.3008L36.75 83.6445C35.4102 84.2188 33.6875 84.6016 32.1562 84.6016C25.8398 84.6016 22.1074 81.1563 19.4277 74.7441C18.375 72.1602 17.2266 70.6289 15.0254 70.3418C13.877 70.2461 13.4941 69.7676 13.4941 69.1934C13.4941 68.0449 15.4082 67.1836 17.3223 67.1836C20.0977 67.1836 22.4902 68.9063 24.9785 72.4473C26.8926 75.2227 28.9023 76.4668 31.2949 76.4668C33.6875 76.4668 35.2187 75.6055 37.4199 73.4043C39.0469 71.7773 40.291 70.3418 41.4395 69.3848Z' fill='black'/%3E%3C/g%3E%3Cdefs%3E%3CclipPath id='c0'%3E%3Crect width='98' height='96' fill='white'/%3E%3C/clipPath%3E%3C/defs%3E%3C/svg%3E");
}

/* ---------- section chrome (sky Section clone) ---------- */
.eyebrow {
  font-family: "Geist Mono", ui-monospace, monospace;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  color: var(--muted-foreground);
  text-wrap: balance;
}
h1 {
  font-size: 34px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin: 8px 0 10px;
}
h2 {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.2;
  margin: 10.4px 0 8.4px; /* same single-line position as 1.6 leading with 6px/4px */
  text-wrap: balance;
}
.card h3 { font-size: 14px; font-weight: 600; margin: 0; }

.section {
  max-width: 1400px;
  margin: 0 auto;
  padding: 40px 16px;
}
.section-head { margin-bottom: 20px; }
.section-head.split {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
  flex-wrap: wrap;
}
.section-note {
  color: var(--foreground-2);
  font-size: 13px;
  line-height: 1.55;
  max-width: 90ch;
  margin: 4px 0 0;
}
.footnote { color: var(--muted-foreground); font-size: 11.5px; margin: 14px 0 0; }
.band { border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, var(--surface-2) 40%, transparent); }

/* ---------- cards ---------- */
.card {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  padding: 16px;
}
.card .sub { margin-top: 2px; font-size: 11.5px; color: var(--muted-foreground); text-wrap: pretty; }
.card-grid { display: grid; gap: 16px; }
.card-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.finding-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 20px;
}
.finding p { margin: 6px 0 0; font-size: 12.5px; line-height: 1.55; color: var(--muted-foreground); }

/* ---------- stat tiles ---------- */
.tile-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px 24px;
  margin: 20px 0 0;
}
.wide-tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 0; }
.tile b {
  display: block;
  font-family: "Geist Mono", ui-monospace, monospace;
  font-variant-numeric: tabular-nums;
  font-size: 21px;
  font-weight: 500;
  line-height: 1.2;
}
.tile span {
  display: block;
  margin-top: 2px;
  line-height: 1.35;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted-foreground);
}

/* ---------- hero ---------- */
.hero { position: relative; height: min(74vh, 680px); min-height: 500px; }
#hero-map { position: absolute; inset: 0; }
/* overlays ride the same centered 1400px track as every section, so the
   panel's left edge lines up with the cards at every viewport width */
.hero-track {
  position: absolute;
  inset: 0;
  max-width: 1400px;
  margin: 0 auto;
  pointer-events: none;
}
.hero-track > * { pointer-events: auto; }
.hero-panel {
  position: absolute;
  top: 24px;
  left: 16px;
  z-index: 10;
  max-width: 460px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px 26px;
  box-shadow: var(--shadow);
}
.hero-sub { color: var(--muted-foreground); font-size: 14px; margin: 0; }
.hero-note {
  color: var(--muted-foreground);
  font-size: 12px;
  margin: 18px 0 0;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}
.hero-legend {
  position: absolute;
  bottom: 22px;
  left: 16px;
  z-index: 10;
  display: flex;
  gap: 14px;
  align-items: center;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 13px;
  font-size: 11.5px;
  color: var(--muted-foreground);
  box-shadow: var(--shadow);
}
.dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  margin-right: 6px;
  vertical-align: -1px;
}
.maplibregl-ctrl-attrib {
  background: color-mix(in srgb, var(--background) 75%, transparent) !important;
  color: var(--muted-foreground) !important;
  font: 10px/1.4 "Geist", sans-serif !important;
}
.maplibregl-ctrl-attrib a { color: var(--foreground) !important; }

/* ---------- standings ---------- */
.standing-row {
  display: grid;
  grid-template-columns: 26px minmax(120px, 1.2fr) 150px repeat(6, minmax(66px, 1fr));
  gap: 16px;
  align-items: center;
  padding: 11px 4px;
  border-bottom: 1px solid var(--border);
}
.standing-row:last-child { border-bottom: none; }
.standing-row.head {
  padding: 4px 4px 8px;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted-foreground);
}
.standing-row .rank { color: var(--muted-foreground); font-size: 12px; }
.standing-row .city { display: flex; align-items: center; gap: 9px; font-weight: 500; font-size: 13.5px; }
.standing-row .num { text-align: right; font-size: 13px; }
.standing-row .otp { font-size: 17px; font-weight: 500; }
.standing-row .unscored { font-size: 15px; color: var(--muted-foreground); }
.standing-row.head .num { font-size: inherit; }
.na-dash { color: var(--muted-foreground); opacity: 0.6; }
.spark { display: block; }
.spark-empty { color: var(--muted-foreground); font-size: 11px; }

/* ---------- charts ---------- */
.chart-legend { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: none;
  color: var(--foreground);
  font-family: inherit;
  font-size: 12px;
  padding: 3px 11px;
  cursor: pointer;
  transition: border-color 0.2s, opacity 0.2s;
}
.chip[aria-pressed="false"] { opacity: 0.38; }
.chip:hover { border-color: var(--border-2); }
.chart-wrap { position: relative; margin-top: 12px; }
.linechart { display: block; width: 100%; height: 280px; }
.tooltip {
  position: absolute;
  z-index: 20;
  pointer-events: none;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 8px 12px;
  font-size: 12px;
  line-height: 1.5;
  white-space: nowrap;
}
.tooltip .t-title { color: var(--muted-foreground); margin-bottom: 2px; }
.tooltip .t-row { display: flex; align-items: center; gap: 7px; }
.tooltip .t-row b { margin-left: auto; padding-left: 14px; font-weight: 500; }
/* the page-wide hover card for tables, donuts and bars; follows the pointer */
.float-tip { position: fixed; z-index: 70; min-width: 150px; }
.sw { display: inline-block; width: 9px; height: 9px; border-radius: 2px; flex: none; }
.sw.solid { background: var(--c); }
.sw.hollow { border: 1.2px solid var(--c); }

/* delay-distribution small multiples */
.dist-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 18px;
  margin-top: 12px;
}
.dist-cell .dist-label {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-size: 11.5px;
  margin-bottom: 2px;
}
.dist-cell .dist-label .mono { color: var(--muted-foreground); font-size: 10.5px; }
.dist-cell svg { display: block; width: 100%; height: 46px; }
.dist-cell .hit, .daybars .hit { fill: transparent; }
.dist-cell .bin.is-hot .hit { fill: color-mix(in srgb, var(--foreground) 8%, transparent); }
.dist-cell svg:has(.is-hot) .bin:not(.is-hot) rect:not(.hit) { opacity: 0.45; }

/* on-time by mode: one hue, light → dark with the share */
.table-scroll { overflow-x: auto; }
.data-table.heat-table { border-collapse: separate; border-spacing: 0 3px; margin-top: 8px; }
.data-table.heat-table td { border-bottom: none; padding: 0 0 0 6px; }
.data-table.heat-table td:first-child { padding: 0 10px 0 0; }
.data-table.heat-table th { border-bottom: none; padding: 0 0 4px 6px; }
.data-table.heat-table th.num { text-align: center; }
.data-table.heat-table th:first-child { padding-left: 0; }
.heat {
  display: block;
  min-width: 56px;
  padding: 5px 8px;
  border-radius: 6px;
  font-size: 12.5px;
  text-align: center;
  background: color-mix(in srgb, var(--heat) var(--shade), transparent);
  cursor: default;
  transition: box-shadow 120ms ease;
}
.heat.empty { background: none; color: var(--faint-foreground); text-align: center; }
.heat.is-hot { box-shadow: inset 0 0 0 1.5px var(--foreground); }
.heat-key {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
  font-size: 11px;
  color: var(--muted-foreground);
}
.heat-ramp {
  width: 96px;
  height: 8px;
  border-radius: 4px;
  background: linear-gradient(90deg,
    color-mix(in srgb, var(--heat) 6%, transparent),
    color-mix(in srgb, var(--heat) 48%, transparent));
}
.heat-hint { margin-left: 6px; }

/* mode + route tables */
.data-table { width: 100%; border-collapse: collapse; margin-top: 12px; font-size: 12.5px; }
.data-table th {
  text-align: left;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted-foreground);
  padding: 4px 10px 8px 0;
  border-bottom: 1px solid var(--border);
}
.data-table td { padding: 7px 10px 7px 0; border-bottom: 1px solid var(--border); }
.data-table tr:last-child td { border-bottom: none; }
.data-table td.num, .data-table th.num { text-align: right; padding-right: 0; }
.data-table .city-cell { display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.data-table .route-name { color: var(--muted-foreground); font-size: 11.5px; }
.data-table .na { color: var(--muted-foreground); font-size: 11.5px; }
.data-table .mode-split { display: block; color: var(--muted-foreground); font-size: 10.5px; font-family: "Geist Mono", ui-monospace, monospace; }

/* ---------- storage cards ---------- */
.storage-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.storage-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.storage-head b { font-size: 15px; }
.storage-body { display: grid; grid-template-columns: 92px minmax(96px, 130px) 1fr; gap: 14px 18px; align-items: center; margin-top: 12px; }
.donut { display: block; overflow: visible; }
.donut .seg { stroke: var(--surface); stroke-width: 2; stroke-linejoin: round; transition: opacity 120ms ease; }
.donut:has(.is-hot) .seg:not(.is-hot) { opacity: 0.35; }
.donut-val { fill: var(--foreground); font-size: 14px; font-weight: 500; pointer-events: none; }
.donut-lbl { fill: var(--muted-foreground); font-size: 9.5px; letter-spacing: 0.04em; pointer-events: none; }
.mode-legend { list-style: none; margin: 0; padding: 0; font-size: 11.5px; display: grid; gap: 3px; }
.mode-legend li { display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.mode-legend .dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.mode-legend .mono { color: var(--muted-foreground); }
.storage-tiles { margin: 0; gap: 8px 14px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.storage-tiles .tile b { font-size: 17px; }
.storage-fleet { margin-top: 10px; font-size: 11.5px; color: var(--muted-foreground); line-height: 1.5; text-wrap: pretty; }
.storage-fleet b { color: var(--foreground); font-weight: 500; }
.daybars { display: block; width: 100%; height: 44px; margin-top: 12px; }
.daybars .bar { opacity: 0.9; transition: opacity 120ms ease; }
.daybars .bar.hollow { opacity: 0.75; }
.daybars .day.is-hot .hit { fill: color-mix(in srgb, var(--foreground) 7%, transparent); }
.daybars .day.is-hot .bar { opacity: 1; }
.daybars:has(.is-hot) .day:not(.is-hot) .bar { opacity: 0.4; }
.daybars-label { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 10.5px; color: var(--muted-foreground); font-family: "Geist Mono", ui-monospace, monospace; margin-top: 4px; }
.db-key { display: inline-flex; align-items: center; gap: 5px; font-family: "Geist", system-ui, sans-serif; }
.db-key .sw { width: 8px; height: 8px; }
.db-key .sw + .sw, .db-key .sw.hollow { margin-left: 6px; }
@media (max-width: 760px) {
  .storage-grid { grid-template-columns: 1fr; }
  .storage-body { grid-template-columns: 92px 1fr; }
  .storage-tiles { grid-column: 1 / -1; }
  .storage-head { flex-direction: column; align-items: flex-start; gap: 2px; }
}

/* ---------- network maps ---------- */
.city-tabs { display: flex; flex-wrap: wrap; gap: 6px; }
.map-mode {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 10;
  display: flex;
  gap: 2px;
  padding: 3px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: var(--shadow);
}
.map-mode button {
  display: flex;
  align-items: center;
  gap: 6px;
  border: none;
  border-radius: 6px;
  background: none;
  font: inherit;
  font-size: 12px;
  text-transform: lowercase;
  color: var(--muted-foreground);
  padding: 4px 10px;
  transition: color 150ms cubic-bezier(0.4, 0, 0.2, 1),
              background-color 150ms cubic-bezier(0.4, 0, 0.2, 1);
}
.map-mode button:hover { color: var(--foreground); }
.map-mode button[aria-selected="true"] {
  background: var(--secondary);
  color: var(--foreground);
  font-weight: 500;
}
.map-mode svg { width: 13px; height: 13px; }
.city-tabs button {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: none;
  color: var(--muted-foreground);
  font-family: inherit;
  font-size: 13px;
  text-transform: lowercase;
  padding: 5px 12px;
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s;
}
.city-tabs button:hover { color: var(--foreground); border-color: var(--border-2); }
.city-tabs button[aria-selected="true"] {
  color: var(--foreground);
  border-color: var(--foreground);
  font-weight: 500;
}
.map-frame {
  position: relative;
  height: 600px;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  background: var(--surface);
}
#city-map { position: absolute; inset: 0; }
.map-panel {
  position: absolute;
  top: 16px;
  left: 16px;
  z-index: 10;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 18px;
  box-shadow: var(--shadow);
  min-width: 240px;
}
.map-panel h3 { font-size: 16px; font-weight: 600; margin: 0; }
.map-panel .src { font-size: 11.5px; color: var(--muted-foreground); margin: 2px 0 10px; }
.map-panel .tile-grid { grid-template-columns: 1fr 1fr; gap: 10px 20px; margin: 0; }
.map-panel .tile b { font-size: 17px; }
.map-legend {
  position: absolute;
  bottom: 14px;
  left: 16px;
  z-index: 10;
  display: flex;
  gap: 13px;
  align-items: center;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 7px 12px;
  font-size: 11.5px;
  color: var(--muted-foreground);
}
.map-loading {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  z-index: 5;
  color: var(--faint-foreground);
  font-family: "Geist Mono", monospace;
  font-size: 11px;
  background: var(--surface-2);
}

/* ---------- method: four fixed rules, then the score's recipe ---------- */
.rule-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.rule { padding: 20px 22px 22px; }
.rule + .rule { border-left: 1px solid var(--border); }
.rule:first-child { padding-left: 0; }
.rule h3 { margin: 6px 0 0; font-size: 13.5px; font-weight: 600; }
.rule p { margin: 6px 0 0; font-size: 12.5px; line-height: 1.55; color: var(--muted-foreground); max-width: 38ch; }
.rule-fig {
  font-size: 30px;
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.1;
  color: var(--foreground);
}
.rule-fig small, .stack-fig small {
  margin-left: 6px;
  font-family: "Geist", system-ui, sans-serif;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted-foreground);
}
/* a ruler from −5 to +15 min; the band is the on-time window */
.ontime-line {
  position: relative;
  height: 30px;
  margin: 12px 0 2px;
  border-bottom: 1px solid var(--border-2);
}
.ot-band {
  position: absolute;
  left: 20%;
  width: 30%;
  bottom: 0;
  height: 12px;
  border-radius: 3px 3px 0 0;
  background: color-mix(in srgb, var(--good) 80%, transparent);
}
.ot-zero { position: absolute; left: 25%; bottom: 0; height: 17px; border-left: 1px dashed var(--foreground-2); }
.ot-tick {
  position: absolute;
  top: 0;
  transform: translateX(-50%);
  font-family: "Geist Mono", ui-monospace, monospace;
  font-size: 9.5px;
  color: var(--muted-foreground);
}

.weights { margin-top: 20px; padding: 18px 20px 20px; }
.weights-head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.weights-head .sub { margin: 0; }
.weight-bar { display: flex; gap: 2px; height: 12px; margin-top: 14px; }
.weight-bar span {
  min-width: 3px;
  background: color-mix(in srgb, var(--foreground) calc(var(--w) * 78%), var(--surface));
}
.weight-bar span:first-child { border-radius: 4px 0 0 4px; }
.weight-bar span:last-child { border-radius: 0 4px 4px 0; }
/* legend columns sit under their own segment: widths mirror the weights */
.weight-legend { display: grid; grid-template-columns: 35fr 30fr 20fr 15fr; gap: 2px; margin-top: 12px; }
.weight-legend > div { display: flex; flex-direction: column; gap: 2px; padding-right: 14px; }
.weight-legend > div::before {
  content: "";
  width: 18px;
  height: 3px;
  border-radius: 2px;
  margin-bottom: 6px;
  background: color-mix(in srgb, var(--foreground) calc(var(--w) * 78%), var(--surface));
}
.weight-legend b { font-size: 18px; font-weight: 500; line-height: 1.2; }
.wl-name { font-size: 12.5px; font-weight: 600; }
.wl-how { font-size: 11.5px; line-height: 1.45; color: var(--muted-foreground); }
.section-note, .rule p, .wl-how { text-wrap: pretty; }

/* ---------- footer (sky clone) ---------- */
.site-footer { border-top: 1px solid var(--border); }
.footer-inner {
  margin: 0 auto;
  max-width: 1400px;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding: 32px 16px;
  font-size: 11.5px;
  color: var(--muted-foreground);
}
.footer-left { max-width: 64ch; line-height: 1.6; }
.footer-mark {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  color: var(--foreground-2);
}
.footer-left p { margin: 8px 0 0; }
.footer-left a {
  color: var(--foreground-2);
  text-decoration: underline;
  text-decoration-color: var(--border);
  text-underline-offset: 2px;
}
.footer-right { display: flex; flex-direction: column; gap: 6px; font-size: 11px; }
.footer-right a { color: var(--foreground-2); transition: color 0.2s; }
.footer-right a:hover { color: var(--accent); text-decoration: none; }
.footer-stamp { color: color-mix(in srgb, var(--muted-foreground) 70%, transparent); }

/* ---------- reveal on scroll (sky §6) ---------- */
.reveal { opacity: 0; transform: translateY(12px); transition: opacity 0.5s ease-out, transform 0.5s ease-out; }
.reveal.is-visible { opacity: 1; transform: translateY(0); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; }
}

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .standing-row { grid-template-columns: 22px 1.4fr repeat(3, 1fr); }
  .standing-row .optional { display: none; }
  .card-grid.two, .finding-grid, .dist-grid { grid-template-columns: minmax(0, 1fr); }
  .wide-tiles { grid-template-columns: 1fr 1fr; }
  .hero-panel { left: 12px; right: 12px; top: 12px; padding: 18px 20px; }
  h1 { font-size: 26px; }
  .map-frame { height: 460px; }
}

/* ---------- pipeline: per-city journeys + spec fine print ---------- */
.journey-list { display: grid; gap: 8px; }
details.journey {
  border: 1px solid var(--border); border-radius: 10px;
  background: var(--surface); overflow: hidden;
}
details.journey > summary {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 12px;
  cursor: pointer; padding: 14px 18px; list-style: none; user-select: none;
}
details.journey > summary::-webkit-details-marker { display: none; }
details.journey > summary::before {
  content: "\25B8"; color: var(--muted-foreground); font-size: 12px;
  display: inline-block; transition: transform .12s ease;
}
details.journey[open] > summary::before { transform: rotate(90deg); }
details.journey > summary:hover { background: var(--surface-2); }
details.journey > summary:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.jcity { font-weight: 600; font-size: 15px; color: var(--foreground); }
.jmeta { color: var(--muted-foreground); font-size: 13px; }
.hops {
  margin: 0; padding: 14px 18px 18px; list-style: none;
  display: grid; gap: 11px; border-top: 1px solid var(--border);
}
.hops li {
  display: grid; grid-template-columns: 84px 1fr; gap: 14px;
  align-items: baseline; font-size: 14px; line-height: 1.55;
}
.hops li > b {
  font-size: 11px; text-transform: uppercase; letter-spacing: .08em;
  color: var(--muted-foreground); font-weight: 600;
}
.hops li span { color: var(--foreground-2); }
/* ---------- specs: the five stages in order, then the clock and the bill ---------- */
.stack {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
}
.stack-card {
  position: relative;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  padding: 16px 16px 14px;
}
/* a chevron in the gutter says the stages hand off left to right */
.stack-card:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 24px;
  right: -11px;
  width: 6px;
  height: 6px;
  border-top: 1.5px solid var(--border-2);
  border-right: 1.5px solid var(--border-2);
  transform: rotate(45deg);
}
.stack-top { display: flex; align-items: baseline; gap: 8px; }
.stack-n { font-size: 11px; color: var(--faint-foreground); }
.stack-role {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted-foreground);
}
.stack-tech { margin-top: 4px; font-size: 13.5px; font-weight: 600; color: var(--foreground); }
.stack-fig { margin: 14px 0 12px; font-size: 24px; font-weight: 500; letter-spacing: -0.02em; line-height: 1.1; }
.stack-fig small { display: block; margin: 4px 0 0; }
.stack dl { margin: 0; display: grid; gap: 0; border-top: 1px solid var(--border); }
.stack dl > div {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  padding: 6px 0;
  border-bottom: 1px solid var(--border);
  font-size: 11.5px;
}
.stack dl > div:last-child { border-bottom: none; padding-bottom: 0; }
.stack dt { color: var(--muted-foreground); white-space: nowrap; }
.stack dd { margin: 0; text-align: right; color: var(--foreground-2); }

.orch {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px 28px;
  margin-top: 14px;
  padding: 14px 16px;
  border: 1px dashed var(--border-2);
  border-radius: 12px;
}
.orch-name { display: flex; flex-direction: column; gap: 0; }
.orch-name .stack-tech { margin-top: 2px; }
.orch-beats { list-style: none; margin: 0 0 0 auto; padding: 0; display: flex; flex-wrap: wrap; gap: 10px 26px; }
.orch-beats li { display: flex; flex-direction: column; font-size: 11.5px; color: var(--muted-foreground); }
.orch-beats b { font-size: 15px; font-weight: 500; color: var(--foreground); }


@media (max-width: 1180px) {
  .stack { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stack-card:last-child { grid-column: 1 / -1; }
  .stack-card::after { display: none; }
}
@media (max-width: 900px) {
  .rule-grid { grid-template-columns: 1fr 1fr; }
  .rule:nth-child(3) { border-left: none; padding-left: 0; }
  .rule:nth-child(n + 3) { border-top: 1px solid var(--border); }
}
@media (max-width: 640px) {
  .stack { grid-template-columns: 1fr; }
  .rule-grid { grid-template-columns: 1fr; }
  .rule { padding-left: 0; padding-right: 0; }
  .rule + .rule { border-left: none; border-top: 1px solid var(--border); }
  .weight-legend { grid-template-columns: 1fr 1fr; gap: 14px 2px; }
  .orch-beats { margin-left: 0; }
}
@media (max-width: 479px) {
  .orch-beats { display: grid; grid-template-columns: repeat(2, max-content); gap: 10px 32px; }
}
@media (max-width: 640px) {
  .hops li { grid-template-columns: 1fr; gap: 2px; }
}

/* mid-table .num columns need a gutter: the base rule zeroes padding-right,
   which only works when .num is the last column (standings, routes). */
#pipeline .data-table td.num, #pipeline .data-table th.num,
#feeds .data-table td.num, #feeds .data-table th.num {
  padding-right: 30px; white-space: nowrap;
}
#pipeline .data-table td, #feeds .data-table td { vertical-align: top; }
#pipeline .data-table td:first-child, #feeds .data-table td:first-child { padding-right: 20px; }
#pipeline .data-table .sub, #feeds .data-table .sub {
  margin-top: 2px; font-size: 11px; line-height: 1.4;
  color: var(--muted-foreground); font-weight: 400;
}

/* wide tables scroll inside their own frame; the page never scrolls sideways */
#pipeline .chart-wrap, #feeds .chart-wrap, #routes .card { overflow-x: auto; }
@media (max-width: 640px) {
  .heat { min-width: 0; padding: 4px 3px; font-size: 10.5px; letter-spacing: -0.02em; }
  .data-table.heat-table td:first-child { padding-right: 6px; }
  .data-table.heat-table td { padding-left: 3px; }
  .data-table.heat-table th { padding-left: 3px; font-size: 9px; letter-spacing: 0.06em; }
  .data-table.heat-table td.num + td.num, .data-table.heat-table th.num + th.num { padding-left: 3px; }
  .heat-table .city-cell { font-size: 11.5px; gap: 5px; white-space: normal; line-height: 1.25; }
  .heat-hint { margin-left: 0; }
}

/* ---------- deeper: range bars, dumbbells, route strips ----------
   One grid for every row: city | track | value. Tracks position marks in % so
   they stay exact at any card width. */
.rb { margin-top: 12px; }
.rb-row {
  display: grid;
  grid-template-columns: minmax(96px, 128px) minmax(0, 1fr) 76px;
  align-items: center;
  gap: 12px;
  padding: 5px 0;
  font-size: 12.5px;
}
.rb-row[data-tip]:hover, .rb-row.is-hot { background: color-mix(in srgb, var(--foreground) 4%, transparent); }
.rb-row .city-cell { display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.rb-track { position: relative; height: 14px; }
.rb-track::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  border-top: 1px solid var(--border);
}
.rb-axis { padding: 0 0 4px; }
.rb-axis .rb-track::before { display: none; }
.rb-tick {
  position: absolute;
  top: 0;
  transform: translateX(-50%);
  font-family: "Geist Mono", ui-monospace, monospace;
  font-size: 10px;
  color: var(--muted-foreground);
  white-space: nowrap;
}
.rb-range {
  position: absolute;
  top: 3px;
  height: 8px;
  border-radius: 0 4px 4px 0;
  background: color-mix(in srgb, var(--c) 45%, transparent);
}
.rb-tick75 { position: absolute; top: 1px; height: 12px; border-left: 1.5px solid var(--surface); }
.rb-dot, .db-dry {
  position: absolute;
  top: 50%;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  background: var(--c);
  box-shadow: 0 0 0 2px var(--surface);
}
.db-dry { background: var(--surface); border: 2px solid var(--c); box-shadow: none; }
.db-line {
  position: absolute;
  top: 50%;
  height: 2px;
  transform: translateY(-50%);
  background: var(--muted-foreground);
  opacity: 0.6;
}
.rb-val { text-align: right; font-size: 12px; white-space: nowrap; }
.rb-val i { font-style: normal; color: var(--muted-foreground); margin: 0 3px; font-size: 10.5px; }
.rb-key {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  margin-top: 10px;
  font-size: 11px;
  color: var(--muted-foreground);
}
.rb-key span { display: inline-flex; align-items: center; gap: 6px; }
.rb-key i { display: inline-block; flex: none; }
.k-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--foreground-2); }
.k-ring { width: 9px; height: 9px; border-radius: 50%; border: 2px solid var(--foreground-2); }
.k-bar { width: 18px; height: 6px; border-radius: 3px; background: color-mix(in srgb, var(--foreground-2) 40%, transparent); }
.k-band { width: 18px; height: 10px; border-radius: 3px; background: color-mix(in srgb, var(--foreground-2) 18%, transparent); }
.k-med { width: 2px; height: 12px; background: var(--foreground); }

.sp-row { padding: 3px 0; }
.sp-track { height: 26px; }
.sp-band {
  position: absolute;
  top: 1px;
  bottom: 1px;
  border-radius: 4px;
  background: color-mix(in srgb, var(--c) 14%, transparent);
}
.sp-80 { position: absolute; left: 80%; top: 0; bottom: 0; border-left: 1px dashed var(--border-2); }
.sp-med { position: absolute; top: 0; bottom: 0; border-left: 2px solid var(--foreground); pointer-events: none; }
.sd {
  position: absolute;
  width: 6px;
  height: 6px;
  margin-left: -3px;
  border-radius: 50%;
  background: var(--c);
  opacity: 0.55;
  transition: transform 100ms ease, opacity 100ms ease;
}
/* a transparent halo makes the hit target 14px without changing the mark */
.sd::after { content: ""; position: absolute; inset: -4px; border-radius: 50%; }
.sd.is-hot { opacity: 1; transform: scale(1.8); z-index: 2; box-shadow: 0 0 0 1px var(--surface); }
.sp-row .rb-val[data-tip] { cursor: default; }

.mini-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
  margin-top: 8px;
  font-size: 11px;
  color: var(--muted-foreground);
}
.mini-legend .dot { width: 7px; height: 7px; margin-right: 5px; }

@media (max-width: 640px) {
  .rb-row { grid-template-columns: 74px minmax(0, 1fr) 78px; gap: 8px; font-size: 11.5px; }
  .rb-row .city-cell { white-space: normal; line-height: 1.2; gap: 6px; }
  .rb-val { font-size: 11px; }
  .rb-val i { margin: 0 2px; }
  .rb-tick { font-size: 9px; }
  .rb-tick.odd { display: none; }
}
@media (max-width: 380px) {
  #deeper-spread .rb-axis .rb-tick:last-child { display: none; }
}

/* ---------- phone chrome ----------
   The status bar's own ≤639px rule loses to .icon-btn declared after it, and the
   capture date wrapped to four lines; the hero legend sat on the map attribution. */
@media (max-width: 639px) {
  .statusbar-inner { gap: 12px; padding: 10px 16px; }
  .wordmark, .portfolio-link { white-space: nowrap; }
  .statusbar .gh-link { display: none; }
  .status .sep, .status-when { display: none; }
  .hero-legend { bottom: 38px; flex-wrap: wrap; gap: 6px 12px; }
  /* the panel sets the hero's height, so it can never run into #standings; the
     legend and attribution keep a 112px band under it */
  .hero { height: auto; min-height: max(500px, min(74vh, 680px)); display: grid; }
  .hero-track { position: relative; inset: auto; width: 100%; padding: 12px 12px 112px; }
  .hero-panel { position: relative; top: 0; left: 0; right: 0; }
  /* a 3-4 line banner pinned for the whole page took a fifth of a small screen */
  .statusbar { position: relative; }
  /* the city panel covered the routes/delay toggle; stack them */
  .map-frame { height: 560px; }
  .map-mode { top: 12px; left: 12px; right: auto; }
  .map-mode button { padding: 7px 12px; }
  .map-panel { top: 58px; left: 12px; right: 12px; min-width: 0; padding: 12px 14px; }
  .map-legend { left: 12px; right: 12px; bottom: 46px; flex-wrap: wrap; gap: 4px 12px; }
  .map-legend > span { white-space: nowrap; }
  /* route names wrap instead of pushing the figures out of the card */
  #routes .data-table th.num { white-space: nowrap; }
  #routes .data-table .city-cell { white-space: normal; align-items: flex-start; line-height: 1.35; }
  #routes .data-table .city-cell .dot { margin-top: 5px; }
  /* a wrapped journey meta line sits under the city, not under the marker */
  details.journey > summary { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 12px; row-gap: 2px; }
  details.journey > summary .jmeta { grid-column: 2; text-wrap: pretty; }
}

/* standings on narrow screens: six visible cells (rank, city, score, on-time,
   excess wait, judged) need six tracks, or "judged" wraps under each row */
@media (max-width: 900px) {
  .standing-row { grid-template-columns: 22px minmax(0, 1.4fr) repeat(4, minmax(0, 1fr)); }
}
.standing-row .city .dot, .city-cell .dot { flex: none; }
@media (max-width: 480px) {
  /* five tracks on a phone: excess wait steps out, as bunching and cancels already do */
  .standing-row { grid-template-columns: 18px minmax(0, 1.7fr) repeat(3, minmax(0, 1fr)); gap: 8px; padding: 10px 2px; }
  .standing-row .ewt { display: none; }
  .standing-row .num { font-size: 12px; white-space: nowrap; }
  .standing-row .otp { font-size: 15px; }
  .standing-row .city { font-size: 13px; gap: 6px; }
  .standing-row.head { font-size: 9px; letter-spacing: 0.06em; }
}
@media (max-width: 380px) {
  .standing-row { grid-template-columns: 14px minmax(0, 1fr) 36px 42px 40px; gap: 6px; }
}

/* adjacent numeric columns share no padding (num cells zero their right edge), so
   on a phone "57.4%53.4%" touched; give every num after a num a left gutter */
.data-table td.num + td.num, .data-table th.num + th.num { padding-left: 10px; }

/* the feeds and pipeline tables carry prose columns; squeezed to phone width each
   row grew to hundreds of pixels of one-word lines. Hold a readable width and let
   the frame scroll sideways instead. */
@media (max-width: 900px) {
  #feeds .data-table { min-width: 980px; }
  #feeds .chart-wrap, #pipeline .chart-wrap { -webkit-overflow-scrolling: touch; }
  /* a hard cut through "531,745 objec" read as a wrong number; fade the edge
     until the frame is scrolled to its end (app.js toggles .at-end) */
  #feeds .chart-wrap:not(.at-end), #pipeline .chart-wrap:not(.at-end) {
    -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 48px), transparent);
    mask-image: linear-gradient(90deg, #000 calc(100% - 48px), transparent);
  }
}
@media (max-width: 739px) {
  #pipeline .data-table { min-width: 760px; }
}
/* at 320 the feeds frame ended right at the 4th column's glyphs, where the fade
   is already transparent; pull them into the visible part of the fade */
@media (max-width: 359px) {
  #feeds .data-table td.num, #feeds .data-table th.num { padding-right: 14px; }
}

/* the four findings tables hold a city and up to four figures; at 320px the peak
   table ran 57px past its card and widened the whole page. Tighten below 380px and
   let the card scroll its own table if a longer name still does not fit. */
[id^="answers-"] { overflow-x: auto; }
@media (max-width: 380px) {
  [id^="answers-"] .data-table { font-size: 11.5px; }
  [id^="answers-"] .data-table th { letter-spacing: 0.06em; }
  [id^="answers-"] .data-table .city-cell { white-space: normal; line-height: 1.2; gap: 6px; }
  [id^="answers-"] .data-table td.num + td.num, [id^="answers-"] .data-table th.num + th.num { padding-left: 6px; }
  [id^="answers-"] .data-table td:first-child, [id^="answers-"] .data-table th:first-child { padding-right: 6px; }
  /* only the peak and weekend tables need wrapping names; in the early table the
     mode column takes the slack and would split "Washington DC" for nothing */
  #answers-early .data-table .city-cell { white-space: nowrap; }
}

/* two storage cards side by side need ~560px each: below that the stat tiles
   collapsed to 13px and the day-bar key ran off the card (seen at 768px) */
@media (max-width: 1100px) {
  .storage-grid { grid-template-columns: minmax(0, 1fr); }
}
.daybars-label { flex-wrap: wrap; }
@media (max-width: 359px) {
  .daybars-label .db-key { order: 3; flex-basis: 100%; }
}
