/* US 311 Tracker, UX1 stop 2: Field Report. Tokens, base type, shared parts.
   The look: the company's warm paper and navy ink, serif headlines, navy bands for structure.
   Navy and a brand-green line are on every screen: the header, a navy band under it, navy section
   bars, navy panel heads, the footer.
   Two color sets. The paper set is the default. The navy set (.t-navy) is for bands and bars; a
   card placed on a band asks for the paper set again with .t-paper.
   Status colors never change: the same five meanings on every surface, always with their words.
   Brand green is a line, a button fill or a focus ring. It is never a dot, a pin or a bar. */
@font-face {
  font-family: "Fraunces";
  src: url("../fonts/fraunces-vf.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
:root {
  color-scheme: light;
  /* ---- brand: Manico Robotics ---- */
  --brand-navy: #0a2540;
  --brand-navy-2: #0e2e4e;          /* a raised part on navy */
  --brand-navy-3: #163b61;          /* hover on navy */
  --brand-green: #00c853;           /* lines, button fills and focus rings only */
  --brand-green-hover: #1fd96d;
  --on-navy: #ffffff;
  --on-navy-2: #c9d4e0;
  --on-navy-3: #9fb0c3;
  --navy-line: rgba(255, 255, 255, 0.16);
  /* ---- paper: the company's three warm whites, and navy laid thin over paper ---- */
  --paper: #f2f1ee;                 /* warm white */
  --paper-raised: #fbfaf8;          /* cards and sheets */
  --paper-sink: #ebe9e4;            /* the page */
  --tint: #e3e7ed;                  /* navy tint: panel heads, table heads, chips */
  --tint-2: #d5dce6;                /* a stronger navy tint: chip icons, hover */
  /* ---- status: fills (pins, chart marks), inks (text), washes (chip backgrounds) ---- */
  --st-green: #0599a6;              /* on track: moved toward blue, away from brand green (UX1 stop 2) */
  --st-yellow: #eda100;
  --st-red: #e34948;
  --st-dark-red: #9a1b3d;
  --st-gray: #b0b4bc;               /* closed or no deadline: light, so it stays apart from on track for colorblind readers */
  --tl-window: #8a8f98;             /* the detail timeline's "time the city gave itself" bar (never beside on track) */
  --pin-outline: #1d2025;
  --ink-green: #00646d;
  --ink-yellow: #7a5200;
  --ink-red: #b3261e;
  --ink-dark-red: #8a1538;
  --ink-gray: #5c6068;
  --wash-green: #e0f5f7;
  --wash-yellow: #fdf3d7;
  --wash-red: #fde8e6;
  --wash-dark-red: #f6e1e8;
  --wash-gray: #eeeff1;
  --warn-bg: #fff4d6;
  --warn-ink: #6b4a00;
  /* ---- district map: one hue, light to dark ---- */
  --ramp-1: #95b4d7;
  --ramp-2: #658ebb;
  --ramp-3: #3f6995;
  --ramp-4: #1f456e;
  --ramp-5: #0a2540;
  /* ---- shape, rhythm (4px grid), type ---- */
  --radius: 6px;
  --radius-s: 5px;
  --shadow: 0 8px 28px rgba(10, 37, 64, 0.18);
  --control-h: 40px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-label: ui-monospace, "SFMono-Regular", Menlo, Consolas, "Liberation Mono", monospace;
  --display-weight: 520;
  --display-tracking: -0.012em;
  --map-bg: #f4f2ec;
}
@media (pointer: coarse), (max-width: 1023px) {
  :root { --control-h: 44px; }
}
/* The paper set: the page, cards, sheets, everything floating on the map. */
:root, .t-paper {
  --page: var(--paper-sink);
  --surface: var(--paper-raised);
  --surface-2: var(--paper-sink);
  --ink: #0a2540;
  --ink-2: #3a4e66;
  --muted: #566170;
  --hairline: #d8d5cd;
  --axis: #b9b5ab;
  --control-border: #7a7468;
  --control-bg: var(--paper-raised);
  --accent: var(--brand-navy);
  --accent-hover: var(--brand-navy-3);
  --accent-wash: var(--tint);
  --accent-ink: #ffffff;
  --focus: var(--brand-navy);
  --select: var(--brand-navy);
  --select-wash: rgba(10, 37, 64, 0.16);
  --link: #1a55a0;
  --chip-bg: var(--tint);
  --chip-border: #b9c3d0;
  --chip-ink: var(--brand-navy);
  --chip-icon-bg: var(--brand-navy);
  --chip-icon: #ffffff;
  --chip-on-bg: var(--brand-navy);
  --chip-on-ink: #ffffff;
  --series: var(--brand-navy);
  --series-dim: #93a3b6;
  --spark: #56667a;
  --spark-end: var(--brand-navy);
  --dot-ring: var(--pin-outline);
  --hollow-center: #ffffff;
  --tooltip-bg: var(--brand-navy);
  --skel: rgba(10, 37, 64, 0.09);
  --skel-shine: rgba(10, 37, 64, 0.04);
}
.t-paper { color: var(--ink); }
/* The navy set: the header, the bands under it, section bars, panel heads, the footer. */
.t-navy {
  --page: var(--brand-navy);
  --surface: var(--brand-navy-2);
  --surface-2: var(--brand-navy-3);
  --ink: var(--on-navy);
  --ink-2: var(--on-navy-2);
  --muted: var(--on-navy-3);
  --hairline: var(--navy-line);
  --axis: rgba(255, 255, 255, 0.3);
  --control-border: rgba(255, 255, 255, 0.42);
  --control-bg: rgba(255, 255, 255, 0.07);
  --accent: var(--brand-green);
  --accent-hover: var(--brand-green-hover);
  --accent-wash: rgba(255, 255, 255, 0.1);
  --accent-ink: var(--brand-navy);
  --focus: var(--brand-green);
  --link: #a9cdf7;
  --chip-bg: rgba(255, 255, 255, 0.08);
  --chip-border: rgba(255, 255, 255, 0.26);
  --chip-ink: #ffffff;
  --chip-icon-bg: rgba(255, 255, 255, 0.12);
  --chip-icon: #ffffff;
  --chip-on-bg: #ffffff;
  --chip-on-ink: var(--brand-navy);
  --series: #8db8ee;
  --series-dim: #4f7fb8;
  --spark: #8db8ee;
  --spark-end: #ffffff;
  --dot-ring: #ffffff;
  --tooltip-bg: #ffffff;
  --skel: rgba(255, 255, 255, 0.14);
  --skel-shine: rgba(255, 255, 255, 0.06);
  color: var(--ink);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font: 16px/1.5 var(--font);
}
/* A short page (an error, an empty state) keeps its footer at the bottom of the window, not mid-screen. */
@media screen {
  body:not(.map-page) { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
  body:not(.map-page) > main { flex: 1 0 auto; }
}
h1, h2, h3, p, figure { margin: 0; }
[hidden] { display: none !important; }
a { color: var(--link); text-underline-offset: 2px; }
a:hover { color: var(--ink); }
button, input, select { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}
.skip-link {
  position: absolute; left: 8px; top: -60px; z-index: 100; background: #fff; color: var(--brand-navy);
  padding: 10px 14px; border-radius: var(--radius-s); box-shadow: var(--shadow); font-weight: 600;
}
.skip-link:focus { top: 8px; }
.icon { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.icon.s { width: 16px; height: 16px; }
.icon.l { width: 24px; height: 24px; }
/* small capital labels: section numbers, band labels, table kickers */
.kicker { font: 600 12px/1.3 var(--font-label); letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.figure { font-family: var(--font-display); font-weight: var(--display-weight); letter-spacing: -0.015em; font-variant-numeric: lining-nums; }

/* ---------- header: brand navy, the Manico mark, the city, the pages, a brand-green line ---------- */
.site-header {
  --focus: var(--brand-green);
  position: relative; z-index: 60; display: flex; align-items: center; gap: 6px 18px; flex-wrap: wrap; min-height: 60px; padding: 6px 20px 8px;
  background: var(--brand-navy); color: var(--on-navy); border-bottom: 2px solid var(--brand-green);
}
.brand { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; font-weight: 700; font-size: 18px; color: var(--on-navy); text-decoration: none; letter-spacing: -0.01em; white-space: nowrap; }
.brand:hover { color: var(--on-navy); }
.brand-mark { height: 28px; width: auto; flex: none; display: block; }
.city-picker { display: inline-flex; }
.city-picker select {
  appearance: none; -webkit-appearance: none; width: auto; min-height: 36px; padding: 0 34px 0 14px; border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, 0.34); background-color: rgba(255, 255, 255, 0.08); color: var(--on-navy); font-size: 14.5px; font-weight: 600; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9.500l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center; background-size: 16px;
}
.city-picker select:hover { background-color: rgba(255, 255, 255, 0.16); }
.city-picker option { color: #1a1a1a; background: #ffffff; }
.site-nav { display: flex; gap: 2px; margin-left: auto; }
.site-nav a {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px; border-radius: var(--radius-s);
  color: var(--on-navy-2); text-decoration: none; font-size: 15px; white-space: nowrap;
}
.site-nav a:hover { background: rgba(255, 255, 255, 0.1); color: var(--on-navy); }
.site-nav a[aria-current="page"] { color: var(--on-navy); font-weight: 650; background: rgba(255, 255, 255, 0.1); }
/* "Menu" shows only where the header folds its pages away: the map page on phones (map.css) */
.menu-btn { display: none; }

/* ---------- footer: navy, the Manico lockup, the data credit ---------- */
.site-footer {
  --focus: var(--brand-green);
  display: flex; flex-wrap: wrap; gap: 8px 24px; align-items: center; justify-content: space-between; padding: 14px 20px;
  background: var(--brand-navy); color: var(--on-navy-2); font-size: 13px; border-top: 2px solid var(--brand-green);
}
.site-footer a { color: var(--on-navy-2); }
.site-footer a:hover { color: var(--on-navy); }
.foot-brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; min-height: 44px; }
.foot-by { font-size: 12.5px; color: var(--on-navy-3); }
.lockup { display: inline-flex; align-items: center; gap: 9px; }
.lockup-mark { height: 22px; width: auto; display: block; }
.lockup-name { display: flex; flex-direction: column; line-height: 1.1; color: var(--on-navy); }
.lockup-name span:first-child { font-size: 12.5px; letter-spacing: 0.34em; }
.lockup-name span:last-child { font-size: 7.5px; letter-spacing: 0.3em; margin-top: 3px; color: var(--on-navy-2); }
@media screen and (max-width: 899px) {
  .site-header { gap: 2px 10px; padding: 4px 12px 4px; }
  .brand { font-size: 16.5px; gap: 8px; }
  .brand-mark { height: 24px; }
  .city-picker { margin-left: auto; }
  .city-picker select { min-height: 44px; max-width: 46vw; text-overflow: ellipsis; }
  .site-nav { order: 3; width: 100%; margin: 0 -4px; overflow-x: auto; scrollbar-width: none; }
  .site-nav::-webkit-scrollbar { display: none; }
  .site-nav a { padding: 0 11px; }
  .site-footer { padding: 10px 12px; }
}
/* Tablets: the brand, the city and the pages share one row where they fit (from 760px; Milestone 1D) */
@media screen and (min-width: 760px) and (max-width: 899px) {
  .city-picker { margin-left: 0; }
  .city-picker select { max-width: 190px; }
  .site-nav { order: 0; width: auto; margin: 0 -4px 0 auto; }
}

/* ---------- content pages ---------- */
.page { max-width: 1128px; margin: 0 auto; padding: 28px 20px 64px; }
.page-title { font-family: var(--font-display); font-size: 30px; line-height: 1.15; font-weight: var(--display-weight); letter-spacing: var(--display-tracking); font-optical-sizing: auto; }
.lede { font-size: 18px; color: var(--ink-2); max-width: 70ch; margin-top: 8px; }
.lede strong, .lede b { color: var(--ink); font-weight: 650; }
.updated { color: var(--muted); font-size: 14px; margin-top: 6px; }
.updated.is-stale, .upd.is-stale, .foot-upd.is-stale { color: var(--warn-ink); background: var(--warn-bg); padding: 2px 8px; border-radius: 4px; }
.updated.is-stale, .upd.is-stale { display: inline-block; }
.section { margin-top: 40px; }
/* A section opens with a navy bar with a brand-green edge: its number, a short green rule, the question in serif. */
.sec-head {
  position: relative; overflow: hidden; display: flex; align-items: center; gap: 6px 16px; flex-wrap: wrap; background: var(--brand-navy); color: var(--on-navy);
  padding: 11px 18px 12px 26px; border-radius: var(--radius); --focus: var(--brand-green);
}
.sec-head::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 6px; background: var(--brand-green); }
.sec-head .kicker { color: var(--on-navy-3); display: inline-flex; align-items: center; gap: 9px; white-space: nowrap; }
.sec-head .kicker::after { content: ""; width: 22px; height: 2px; background: var(--brand-green); }
.page.figs { counter-reset: fig; }
.page.figs .sec-head .kicker::before { counter-increment: fig; content: "No. " counter(fig); }
.section-title { font-family: var(--font-display); font-size: 23px; line-height: 1.25; font-weight: var(--display-weight); letter-spacing: var(--display-tracking); font-optical-sizing: auto; }
.sec-head .section-title { color: var(--on-navy); }
.section-answer { color: var(--ink-2); max-width: 78ch; margin-top: 12px; font-size: 17px; padding: 0 2px; }
.section-answer strong { color: var(--ink); font-weight: 650; }
.card { background: var(--surface); border: 1px solid var(--hairline); border-top: 3px solid var(--brand-navy); border-radius: var(--radius); padding: 18px 20px 20px; color: var(--ink); }
.card + .card { margin-top: 16px; }
.section > .card:first-of-type, .section > .grid:first-of-type { margin-top: 14px; }
/* a card's head: its title and what it shows, on a thin navy tint */
.card-head { margin: -18px -20px 16px; padding: 13px 20px 12px; background: var(--tint); border-bottom: 1px solid var(--hairline); }
.card-title { font-size: 16px; font-weight: 650; color: var(--ink); }
.card-sub { color: var(--ink-2); font-size: 14px; margin-top: 2px; max-width: 96ch; }
.grid { display: grid; gap: 16px; }
.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid > .card + .card { margin-top: 0; }
.note { color: var(--muted); font-size: 14px; }
.callout { background: var(--warn-bg); color: var(--warn-ink); border-radius: var(--radius-s); padding: 10px 14px; font-size: 14px; }
.notice { display: flex; gap: 10px; align-items: flex-start; padding: 10px 14px; border-radius: var(--radius-s); font-size: 14.5px; }
.notice .icon { margin-top: 3px; }
.notice.warn { background: var(--warn-bg); color: var(--warn-ink); border: 1px solid #e6cf8f; }
@media screen and (max-width: 719px) {
  .page { padding: 20px 12px 48px; }
  .page-title { font-size: 26px; }
  .lede { font-size: 16px; }
  .card { padding: 14px; }
  .card-head { margin: -14px -14px 14px; padding: 11px 14px 10px; }
  .grid.two { grid-template-columns: 1fr; }
  .section { margin-top: 30px; }
  .section-title { font-size: 20.5px; }
  .sec-head { padding: 10px 14px 11px 22px; }
  .section-answer { font-size: 16px; }
}

/* ---------- hero band: navy, the headline numbers ---------- */
.hero { background: var(--brand-navy); position: relative; overflow: hidden; }
.hero-inner { position: relative; max-width: 1128px; margin: 0 auto; padding: 30px 20px 30px; }
.hero .eyebrow { font: 600 12px/1.3 var(--font-label); letter-spacing: 0.14em; text-transform: uppercase; color: var(--on-navy-3); display: inline-flex; align-items: center; gap: 10px; }
.hero .eyebrow::before { content: ""; width: 26px; height: 2px; background: var(--brand-green); }
.hero .page-title { font-size: 46px; font-weight: 480; line-height: 1.08; margin-top: 6px; }
.hero .lede { font-family: var(--font-display); font-size: 22px; line-height: 1.42; font-weight: 400; color: var(--on-navy); max-width: 31em; font-variant-numeric: lining-nums; margin-top: 10px; }
.hero .lede strong { font-weight: 640; }
.hero .updated { margin-top: 10px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
/* The city's own outline, faint, behind the words: drawn from the city's boundary file. */
.hero-shape { position: absolute; right: max(16px, calc((100% - 1128px) / 2 - 60px)); top: 50%; height: 112%; width: auto; transform: translateY(-50%); opacity: 0.13; pointer-events: none; }
.hero-shape path { fill: rgba(255, 255, 255, 0.16); stroke: #ffffff; stroke-width: 2; vector-effect: non-scaling-stroke; }
/* a plain hero: a title and one sentence in the body face (How it works, the visual system) */
.hero-how .page-title { font-size: 42px; }
.hero-how .lede { font-family: var(--font); font-size: 18px; color: var(--on-navy-2); max-width: 62ch; }
@media screen and (max-width: 719px) {
  .hero-inner { padding: 20px 12px 22px; }
  .hero .page-title { font-size: 33px; }
  .hero .lede { font-size: 18.5px; }
  .hero-how .lede { font-size: 16.5px; }
  .hero-shape { right: -70px; top: 34%; height: 62%; opacity: 0.1; }
}

/* ---------- controls ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: var(--control-h); padding: 0 14px;
  border: 1px solid var(--control-border); border-radius: var(--radius-s); background: var(--control-bg); color: var(--ink);
  font-weight: 550; font-size: 15px; cursor: pointer; text-decoration: none; white-space: nowrap;
}
.btn:hover { background: var(--surface-2); color: var(--ink); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 650; }
.btn.primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: var(--accent-ink); }
/* the one brand-green button on paper: a green fill with a navy edge and navy words */
.btn.go { background: var(--brand-green); border: 1.5px solid var(--brand-navy); color: var(--brand-navy); font-weight: 650; }
.btn.go:hover { background: var(--brand-green-hover); color: var(--brand-navy); }
.btn.ghost { border-color: transparent; background: none; color: var(--link); }
.btn.ghost:hover { background: var(--accent-wash); }
.btn.icon-only { padding: 0; width: var(--control-h); }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; }
.field { display: grid; gap: 4px; font-size: 14px; color: var(--ink-2); }
.field > span { font-weight: 550; }
select, input[type="text"], input[type="search"], input[type="date"], input[type="number"] {
  min-height: var(--control-h); padding: 0 10px; border: 1px solid var(--control-border); border-radius: var(--radius-s);
  background-color: var(--control-bg); color: var(--ink); font-size: 15px; width: 100%;
}
select { padding-right: 28px; }
.t-navy select option { color: #1a1a1a; background: #ffffff; }
.seg { display: inline-flex; border: 1px solid var(--control-border); border-radius: var(--radius-s); background: var(--control-bg); padding: 2px; gap: 2px; }
.seg button {
  border: 0; background: none; min-height: calc(var(--control-h) - 6px); padding: 0 12px; border-radius: 4px; cursor: pointer;
  color: var(--ink-2); font-size: 15px; white-space: nowrap;
}
.seg button:hover { background: var(--surface-2); }
.seg button[aria-pressed="true"] { background: var(--chip-on-bg); color: var(--chip-on-ink); font-weight: 600; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 8px; min-height: var(--control-h); padding: 0 13px 0 11px;
  border: 1px solid var(--chip-border); border-radius: var(--radius); background: var(--chip-bg); color: var(--chip-ink);
  font-size: 14px; font-weight: 600; cursor: pointer; white-space: nowrap;
}
.chip:hover { background: var(--tint-2); border-color: var(--brand-navy); }
.chip .chip-icon { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; margin-left: -5px; border-radius: 50%; background: var(--chip-icon-bg); color: var(--chip-icon); flex: none; }
.chip[aria-pressed="true"] { background: var(--chip-on-bg); border-color: var(--chip-on-bg); color: var(--chip-on-ink); font-weight: 650; box-shadow: inset 0 -3px 0 var(--brand-green); }
.chip[aria-pressed="true"] .chip-icon { background: #ffffff; color: var(--brand-navy); }
.check-row { display: flex; align-items: center; gap: 10px; min-height: var(--control-h); font-size: 15px; cursor: pointer; }
.check-row input { width: 20px; height: 20px; margin: 0; accent-color: var(--brand-navy); flex: none; }
.filter-row { display: flex; flex-wrap: wrap; gap: 12px 16px; align-items: end; }
.filter-row .field { min-width: 180px; }

/* ---------- status vocabulary ---------- */
.dot { display: inline-block; width: 12px; height: 12px; border-radius: 50%; flex: none; background: var(--st-gray); box-shadow: 0 0 0 1.5px var(--dot-ring); }
.dot.green { background: var(--st-green); }
.dot.yellow { background: var(--st-yellow); }
.dot.red { background: var(--st-red); }
.dot.dark_red { background: var(--st-dark-red); }
.dot.gray { background: var(--st-gray); }
.dot.hollow { background: radial-gradient(circle, var(--hollow-center) 0 32%, var(--st-dark-red) 36%); }
.sw { display: inline-block; width: 12px; height: 12px; border-radius: 3px; flex: none; }
.status {
  display: inline-flex; align-items: center; gap: 7px; padding: 2px 10px 2px 8px; border-radius: 999px; font-size: 14px;
  font-weight: 600; white-space: nowrap; background: var(--wash-gray); color: var(--ink-gray);
}
.status .dot { width: 10px; height: 10px; box-shadow: 0 0 0 1px var(--pin-outline); }
.status.green { background: var(--wash-green); color: var(--ink-green); }
.status.yellow { background: var(--wash-yellow); color: var(--ink-yellow); }
.status.red { background: var(--wash-red); color: var(--ink-red); }
.status.dark_red { background: var(--wash-dark-red); color: var(--ink-dark-red); }
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px; border-radius: 999px; font-size: 13px; font-weight: 600; background: var(--warn-bg); color: var(--warn-ink); white-space: nowrap; }
.cat { display: inline-flex; align-items: center; gap: 8px; }
.cat .icon { color: var(--ink-2); }

/* ---------- stat tiles: a color accent, the number in serif, a small trend line ---------- */
.tiles { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; }
.tile {
  position: relative; display: flex; flex-direction: column; background: var(--surface); border: 1px solid #e3e0d9; border-radius: var(--radius);
  padding: 15px 16px 12px; color: var(--ink); min-width: 0; overflow: hidden; box-shadow: 0 10px 30px rgba(10, 37, 64, 0.16);
}
.tile::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 4px; background: var(--tile-accent, var(--brand-navy)); }
.tile.a-red { --tile-accent: var(--st-red); }
.tile.a-unc { --tile-accent: repeating-linear-gradient(135deg, var(--st-dark-red) 0 5px, transparent 5px 9px); }
.tile .label { display: flex; align-items: center; gap: 7px; font-size: 14px; color: var(--ink-2); font-weight: 600; line-height: 1.3; min-height: 2.6em; }
.tile .value { font-family: var(--font-display); font-variant-numeric: lining-nums; font-size: 36px; line-height: 1.1; font-weight: 520; letter-spacing: -0.02em; margin-top: 2px; }
.tile .value.small { font-size: 21px; line-height: 1.25; letter-spacing: -0.01em; color: var(--ink-2); padding: 8px 0 7px; font-weight: 480; }
.tile .sub { font-size: 13.5px; color: var(--muted); margin-top: 2px; line-height: 1.4; flex: 1; }
.tile .spark { margin-top: 10px; }
.spark { position: relative; }
.spark svg { display: block; width: 100%; height: 40px; overflow: visible; }
.spark .line { fill: none; stroke: var(--spark); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.spark .area { fill: var(--spark); opacity: 0.14; }
.spark .end { fill: var(--spark-end); stroke: var(--surface); stroke-width: 2; }
.spark .cross { stroke: var(--axis); stroke-width: 1; visibility: hidden; }
.spark .cross.on { visibility: visible; }
.spark .hit { fill: transparent; }
.spark-ends { display: flex; justify-content: space-between; gap: 8px; font-size: 12.5px; color: var(--muted); margin-top: 3px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.spark-ends b { color: var(--ink-2); font-weight: 600; }
/* a number that has just changed with a new sync: a quiet wash behind it for a few seconds. No movement,
   and not brand green: beside a status count a green mark would read as "good". */
.is-fresh { background: var(--fresh, rgba(10, 37, 64, 0.13)); box-shadow: 0 0 0 4px var(--fresh, rgba(10, 37, 64, 0.13)); border-radius: 3px; }
.t-navy .is-fresh { --fresh: rgba(255, 255, 255, 0.24); }
@media screen and (max-width: 1023px) { .tiles { grid-template-columns: repeat(6, minmax(0, 1fr)); } .tile { grid-column: span 2; } .tile:nth-child(n+4) { grid-column: span 3; } }
@media screen and (max-width: 719px) {
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .tile, .tile:nth-child(n+4) { grid-column: span 1; padding: 12px 12px 10px; }
  .tile:first-child { grid-column: 1 / -1; }
  .tile .value { font-size: 31px; }
  .tile .label { min-height: 0; }
}

/* ---------- tables ---------- */
.table-wrap { overflow-x: auto; }
table.data { border-collapse: collapse; width: 100%; font-size: 14px; }
table.data th, table.data td { padding: 9px 12px; border-bottom: 1px solid var(--hairline); text-align: left; vertical-align: middle; }
/* a table's head is a navy bar, like every other head on the site (the report's tables stay light: section "report") */
table.data thead th { color: #ffffff; background: var(--brand-navy); font-weight: 650; font-size: 13px; vertical-align: bottom; white-space: nowrap; border-bottom: 0; }
table.data thead { --focus: var(--brand-green); }
table.data thead th:first-child { border-radius: 4px 0 0 4px; }
table.data thead th:last-child { border-radius: 0 4px 4px 0; }
table.data tbody th { font-weight: 600; white-space: nowrap; }
table.data .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
table.data tbody tr:last-child th, table.data tbody tr:last-child td { border-bottom: 0; }
table.data tr.is-selected th, table.data tr.is-selected td { background: var(--accent-wash); }
table.data th button.sort { all: unset; cursor: pointer; display: inline-flex; align-items: center; gap: 4px; font: inherit; color: inherit; }
table.data th button.sort:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
/* May wrap in a narrow column, to two lines at most; the words stay whole. */
.too-early { color: var(--muted); font-style: italic; white-space: normal; display: inline-block; min-width: 10ch; }
.barcell { display: flex; align-items: center; gap: 10px; justify-content: flex-end; }
.barcell .track { flex: 1; min-width: 60px; max-width: 260px; height: 12px; display: flex; }
.barcell .bar { height: 12px; background: var(--series); border-radius: 0 4px 4px 0; min-width: 2px; }
.barcell .val { min-width: 62px; text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
/* phones: narrow tables of numbers stay tables, tightened; wide ones turn each row into a small card,
   so no column is ever cut off */
@media screen and (max-width: 719px) {
  table.data:not(.stack):not(.stack-md) { font-size: 13px; }
  table.data:not(.stack):not(.stack-md) th, table.data:not(.stack):not(.stack-md) td { padding: 7px 5px; }
  table.data:not(.stack):not(.stack-md) thead th { white-space: normal; font-size: 12.5px; }
  table.data.stack thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  table.data.stack, table.data.stack tbody, table.data.stack tr, table.data.stack th, table.data.stack td { display: block; width: 100%; }
  table.data.stack tr { padding: 10px 0; border-bottom: 1px solid var(--hairline); }
  table.data.stack tbody tr:last-child { border-bottom: 0; }
  table.data.stack th, table.data.stack td { border: 0; padding: 2px 0; }
  /* each record opens with a navy strip that names it */
  table.data.stack tbody th { font-size: 15px; padding: 6px 10px; margin-bottom: 4px; background: var(--brand-navy); color: #ffffff; border-radius: 4px; --dot-ring: #ffffff; }
  table.data.stack tbody th .icon { color: #ffffff; }
  table.data.stack tr.is-selected th { box-shadow: inset 5px 0 0 var(--brand-green); background: var(--brand-navy); }
  table.data.stack tr.is-selected td { background: none; }
  table.data.stack td { display: flex; justify-content: space-between; gap: 12px; align-items: center; text-align: right; }
  table.data.stack td::before { content: attr(data-label); color: var(--ink-2); text-align: left; flex: none; max-width: 55%; }
  table.data.stack .barcell { flex: 1; }
  table.data.stack .barcell .track { max-width: none; }
}

@media screen and (max-width: 359px) {
  table.data.stack .barcell .val { min-width: 0; }
  table.data.stack .barcell .track { min-width: 36px; }
}
.table-wrap[role="region"]:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }

/* ---------- charts ---------- */
.chart { position: relative; }
.chart > svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart .grid-line { stroke: var(--hairline); stroke-width: 1; }
.chart .axis-line { stroke: var(--axis); stroke-width: 1; }
.chart .tick { fill: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.chart .lbl { fill: var(--ink); font-size: 13px; }
.chart .val { fill: var(--ink); font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; paint-order: stroke; stroke: var(--surface); stroke-width: 3px; stroke-linejoin: round; }
.chart .mark { fill: var(--series); }
.chart .mark.dim { fill: var(--series-dim); }
.chart .mark.green { fill: var(--st-green); }
.chart .mark.yellow { fill: var(--st-yellow); }
.chart .mark.red { fill: var(--st-red); }
.chart .mark.dark_red { fill: var(--st-dark-red); }
.chart .mark.gray { fill: var(--st-gray); }
.chart .mark.unc { fill: var(--wash-dark-red); }
.hatch-dark { fill: var(--st-dark-red); }
.chart .early-band { fill: var(--surface-2); }
.chart .early-text { fill: var(--muted); font-size: 12px; font-style: italic; }
.chart .hit { fill: transparent; }
.chart .hit:hover ~ .hover-line, .chart .is-hover { opacity: 0.82; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 14px; color: var(--ink-2); margin: 8px 0 10px; }
.legend .key { display: inline-flex; align-items: center; gap: 7px; }
.legend .sw.green { background: var(--st-green); }
.legend .sw.yellow { background: var(--st-yellow); }
.legend .sw.red { background: var(--st-red); }
.legend .sw.dark_red { background: var(--st-dark-red); }
.legend .sw.gray { background: var(--st-gray); box-shadow: inset 0 0 0 1px var(--tl-window); }
.legend .sw.hatch { background-image: repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.62) 0 1.6px, transparent 1.6px 5px); }
.legend .sw.series { background: var(--series); }
.legend .sw.volume { background: var(--series); }
.legend .sw.early { background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--axis); }
/* Status unconfirmed in charts: a pale fill with dark diagonal lines. It reads as "less certain" and
   still differs from the solid bands on a black-and-white print. */
.unc-fill, .legend .sw.unc {
  background-color: var(--wash-dark-red);
  background-image: repeating-linear-gradient(135deg, var(--st-dark-red) 0 1.5px, transparent 1.5px 5px);
}
.legend .sw.unc { box-shadow: inset 0 0 0 1px var(--st-dark-red); }
.tooltip {
  position: absolute; z-index: 20; pointer-events: none; background: var(--brand-navy); color: #fff; border-radius: var(--radius-s);
  padding: 8px 10px; font-size: 13px; line-height: 1.4; white-space: nowrap; transform: translate(-50%, calc(-100% - 10px));
  box-shadow: var(--shadow);
}
.tooltip .t-title { color: #c9d4e0; font-size: 12px; }
.tooltip .t-row { display: flex; align-items: center; gap: 8px; justify-content: space-between; }
.tooltip .t-row b { font-weight: 650; font-variant-numeric: tabular-nums; }
.tooltip .t-key { display: inline-block; width: 10px; height: 3px; border-radius: 2px; background: #fff; margin-right: 6px; vertical-align: middle; }
.tooltip .t-key.green { background: #47c5d3; }
.tooltip .t-key.yellow { background: var(--st-yellow); }
.tooltip .t-key.red { background: #ff7a73; }
.tooltip .t-key.dark_red { background: #e0688f; }
.tooltip .t-key.unc { background: repeating-linear-gradient(90deg, #e0688f 0 2px, transparent 2px 4px); }
.tooltip .t-key.series { background: #8db8ee; }
details.table-view { margin-top: 12px; border-top: 1px solid var(--hairline); padding-top: 4px; }
details.table-view > summary {
  cursor: pointer; color: var(--link); font-size: 14px; font-weight: 550; min-height: var(--control-h); display: inline-flex; align-items: center; gap: 6px;
  list-style: none;
}
details.table-view > summary::-webkit-details-marker { display: none; }
details.table-view > summary::before { content: "▸"; display: inline-block; width: 12px; }
details.table-view[open] > summary::before { content: "▾"; }
.stat-pair { display: flex; flex-wrap: wrap; gap: 8px 28px; margin: 10px 0 12px; }
.stat-pair > div { font-size: 14px; color: var(--ink-2); }
.stat-pair b { display: block; font-family: var(--font-display); font-variant-numeric: lining-nums; font-size: 25px; line-height: 1.2; color: var(--ink); letter-spacing: -0.015em; font-weight: 520; }

/* Open now, by repair type: how many (bar length on one shared scale) and how they stand (the mix). */
.open-rows { display: grid; gap: 0; margin-top: 6px; }
.open-head, .open-row { display: grid; grid-template-columns: 168px minmax(120px, 0.9fr) minmax(160px, 1.5fr) 132px 132px; gap: 16px; align-items: center; }
.open-head { font-size: 13px; font-weight: 650; color: #ffffff; background: var(--brand-navy); padding: 8px 10px; margin: 0 -10px; border-radius: 4px; align-items: end; }
.open-head .num { text-align: right; }
.open-row { padding: 11px 0; border-bottom: 1px solid var(--hairline); font-size: 14px; }
.open-row:last-child { border-bottom: 0; }
.open-row.is-dim, .open-row.is-dim .cat .icon, .open-row.is-dim .num small { color: var(--muted); }   /* the other repair types step back: quieter words, still 4.5:1 or more */
.open-row.is-dim .vol b { font-weight: 500; }
.open-row.is-dim .vol .track, .open-row.is-dim .mix { opacity: 0.5; }
.open-row .vol { display: flex; align-items: center; gap: 10px; }
.open-row .vol .track { flex: 1; height: 16px; display: flex; min-width: 0; }
.open-row .vol .bar { height: 16px; background: var(--series); border-radius: 0 4px 4px 0; min-width: 2px; }
.open-row .vol b { min-width: 46px; text-align: right; font-variant-numeric: tabular-nums; font-weight: 650; }
.mix { display: flex; gap: 2px; height: 16px; min-width: 0; }
.mix .seg-part { height: 16px; min-width: 2px; }
.mix .seg-part:first-child { border-radius: 4px 0 0 4px; }
.mix .seg-part:last-child { border-radius: 0 4px 4px 0; }
.mix .seg-part:only-child { border-radius: 4px; }
.seg-part.green { background: var(--st-green); }
.seg-part.yellow { background: var(--st-yellow); }
.seg-part.red { background: var(--st-red); }
.seg-part.dark_red { background: var(--st-dark-red); }
.seg-part.gray { background: var(--st-gray); }
.seg-part.unc { box-shadow: inset 0 0 0 1px var(--st-dark-red); }
.open-row .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.open-row .num small { display: none; color: var(--ink-2); font-size: 13px; }
@media screen and (max-width: 899px) {
  .open-head { display: none; }
  .open-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 6px 14px; padding: 13px 0; }
  .open-row .name, .open-row .mix { grid-column: 1 / -1; }
  .open-row .vol { grid-column: 1 / -1; }
  .open-row .num { text-align: left; white-space: normal; }
  .open-row .num small { display: block; }
}

/* horizontal bar list (time to close on narrow screens) */
.hbars { display: grid; gap: 8px; margin-top: 4px; font-size: 14px; }
.hbars .row { display: grid; grid-template-columns: 112px minmax(0, 1fr) auto; gap: 10px; align-items: center; }
.hbars .track { height: 12px; display: flex; }
.hbars .bar { height: 12px; background: var(--series); border-radius: 0 4px 4px 0; min-width: 2px; }
.hbars .v { font-variant-numeric: tabular-nums; color: var(--ink-2); white-space: nowrap; }
.hbars .v b { color: var(--ink); font-weight: 650; }

/* district map: the city's districts shaded by one number */
.dmap > svg { display: block; width: 100%; height: auto; max-width: 440px; margin: 0 auto; }
.dmap .shape { stroke: var(--surface); stroke-width: 2; stroke-linejoin: round; }
.dmap .shape.b1 { fill: var(--ramp-1); }
.dmap .shape.b2 { fill: var(--ramp-2); }
.dmap .shape.b3 { fill: var(--ramp-3); }
.dmap .shape.b4 { fill: var(--ramp-4); }
.dmap .shape.b5 { fill: var(--ramp-5); }
.dmap .shape.none { fill: var(--surface-2); stroke: var(--axis); stroke-width: 1; }
.dmap .outline-under { fill: none; stroke: var(--brand-navy); stroke-width: 7; stroke-linejoin: round; pointer-events: none; }
.dmap .outline-over { fill: none; stroke: var(--brand-green); stroke-width: 3; stroke-linejoin: round; pointer-events: none; }
.dmap text { text-anchor: middle; pointer-events: none; paint-order: stroke; stroke-linejoin: round; }      /* size is set per map so labels stay 12.5px on screen */
/* Each name carries a halo in its district's own shade, so it stays readable where it crosses a boundary or the chosen district's outline. */
.dmap text.h-b1 { stroke: var(--ramp-1); }
.dmap text.h-b2 { stroke: var(--ramp-2); }
.dmap text.h-b3 { stroke: var(--ramp-3); }
.dmap text.h-b4 { stroke: var(--ramp-4); }
.dmap text.h-b5 { stroke: var(--ramp-5); }
.dmap text.h-none { stroke: var(--surface-2); }
.dmap text .d-name { font-weight: 600; }
.dmap text.on-dark { fill: #fff; }
.dmap text.on-light { fill: var(--brand-navy); }
.ramp-legend { display: flex; flex-wrap: wrap; gap: 4px 14px; justify-content: center; font-size: 13px; color: var(--ink-2); margin-top: 10px; }
.ramp-legend .key { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.ramp-legend .sw { width: 18px; height: 12px; border-radius: 3px; }
.ramp-legend .sw.b1 { background: var(--ramp-1); }
.ramp-legend .sw.b2 { background: var(--ramp-2); }
.ramp-legend .sw.b3 { background: var(--ramp-3); }
.ramp-legend .sw.b4 { background: var(--ramp-4); }
.ramp-legend .sw.b5 { background: var(--ramp-5); }
.ramp-legend .sw.none { background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--axis); }
.district-layout { display: grid; grid-template-columns: minmax(0, 370px) minmax(0, 1fr); gap: 28px; align-items: start; }
.district-layout table.data thead th { white-space: normal; }
.district-layout table.data th, .district-layout table.data td { padding-left: 8px; padding-right: 8px; }
.district-layout .barcell .track { min-width: 36px; }
@media screen and (max-width: 899px) { .district-layout { grid-template-columns: 1fr; } }
/* phones show each district as a small card with no column headings, so sorting moves to a menu */
.sort-phone { display: none; }
@media screen and (max-width: 719px) {
  .sort-hint { display: none; }
  .sort-phone { display: grid; max-width: 280px; margin-top: 8px; }
}

/* ---------- loading, empty and error states ---------- */
/* Placeholders are shaped like what is coming, so nothing jumps when it arrives. */
.skel { display: grid; gap: 10px; align-content: start; }
.skel-line { display: block; height: 14px; border-radius: 4px; background: var(--skel); }
.skel.block { border-radius: var(--radius); background: var(--skel); }
@keyframes shimmer { 0% { opacity: 1; } 50% { opacity: 0.55; } 100% { opacity: 1; } }
@media (prefers-reduced-motion: no-preference) { .skel-line, .skel.block { animation: shimmer 1.6s ease-in-out infinite; } }
.skel.tile-skel { height: 172px; background: var(--paper-raised); border: 1px solid #e3e0d9; border-radius: var(--radius); padding: 18px 16px; box-shadow: 0 10px 30px rgba(10, 37, 64, 0.16); --skel: rgba(10, 37, 64, 0.09); }
.skel.tile-skel .skel-line:nth-child(2) { height: 34px; margin-top: 6px; }
.skel.chart-skel { height: 240px; border-radius: var(--radius-s); background: linear-gradient(180deg, transparent 0 calc(100% - 1px), var(--axis) 0), repeating-linear-gradient(90deg, var(--skel) 0 18px, transparent 18px 34px); background-position: 0 0, 44px 100%; background-size: auto, calc(100% - 44px) 62%; background-repeat: no-repeat; }
.skel.rows-skel .skel-line { height: 18px; }
/* While new numbers load, the last ones stay in place, dimmed. */
[aria-busy="true"]:not(.first-load) .holds { opacity: 0.45; transition: opacity 0.15s; }
.busy-note { display: none; align-items: center; gap: 8px; font-size: 14px; color: var(--muted); }
[aria-busy="true"] .busy-note { display: inline-flex; }
.state-card { display: flex; gap: 14px; align-items: flex-start; background: var(--surface); border: 1px solid var(--hairline); border-left: 4px solid var(--brand-navy); border-radius: var(--radius); padding: 16px 18px; color: var(--ink); }
.state-card.error { border-left-color: var(--st-red); }
.state-icon { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 50%; background: var(--tint); color: var(--brand-navy); flex: none; }
.state-card.error .state-icon { background: var(--wash-red); color: var(--ink-red); }
.state-title { font-family: var(--font-display); font-size: 19px; font-weight: var(--display-weight); line-height: 1.3; }
.state-text { color: var(--ink-2); font-size: 15px; margin-top: 2px; max-width: 62ch; }
.state-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.state-actions .btn { min-height: 44px; }

/* ---------- share ---------- */
.share { position: relative; display: inline-flex; align-items: center; gap: 10px; }
.share-status { display: none; align-items: center; gap: 6px; font-size: 14px; color: var(--ink); font-weight: 600; overflow-wrap: anywhere; }
.share-status.on { display: inline-flex; }

/* ---------- touch: every control a finger can reach is at least 44 x 44 px ---------- */
@media (pointer: coarse), (max-width: 1023px) {
  .seg { padding: 0; gap: 0; }
  .seg button { min-height: 44px; border-radius: 4px; }
  .city-picker select { min-height: 44px; }
  table.data th button.sort { min-height: 44px; min-width: 44px; justify-content: flex-end; }
  table.data th:first-child button.sort { justify-content: flex-start; }
  .foot-brand { min-height: 44px; }
}

/* ---------- motion: only small fades, and none when the reader asks for less ---------- */
@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; }
}
