/* Regional Futures Simulator. Styled to match the Consul Parking demo (gov_software_demos/parking-permits):
   Inter throughout; ink on white, soft gray cards, one navy accent, pill buttons, a full-bleed photo hero
   with frosted stat chips, a gray band section and a big wordmark footer. Tokens copied from its app.css. */
:root {
  color-scheme: light;
  --bg: #ffffff; --gray: #f4f4f2; --gray2: #eeeeec;
  --ink: #0b1222; --muted: rgba(0, 12, 31, .65); --faint: rgba(0, 12, 31, .08);
  --line: rgba(0, 12, 31, .1); --line-faint: rgba(0, 12, 31, .07); --border-strong: rgba(0, 12, 31, .2);
  --navy: #0b2463; --navy-hover: #142f78; --accent-soft: #e7ebf4;
  --ok: #1f5c3a; --ok-soft: #e3efe7; --warn: #8a5300; --warn-soft: #fbf0dc; --bad: #9b2c1f; --bad-soft: #f6e6e2;
  --font: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, monospace;
  /* Chart roles (dataviz reference palette, light). Scenario identity: fixed order, never cycled. */
  --s-base: #6b6f76; --s-a: #2a78d6; --s-b: #eb6834; --s-c: #1baf7a; --obs: #0b1222; --grid: #ebebed;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--ink); font: 15px/1.5 var(--font); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
a { color: var(--navy); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }
h1, h2, h3, p { margin: 0; }
:focus-visible { outline: 2px solid var(--navy); outline-offset: 3px; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -9999px; top: 8px; background: #fff; padding: 8px 12px; border-radius: 999px; z-index: 50; }
.skip:focus { left: 8px; }
code { font-family: var(--mono); font-size: 12.5px; background: #fff; padding: 2px 6px; border-radius: 6px; }

/* ---------- Hero (parking home) ---------- */
.hero { margin: 16px 16px 0; border-radius: 48px; min-height: min(860px, calc(100svh - 32px)); padding: 28px 40px 40px; color: #fff; position: relative; overflow: hidden; display: flex; flex-direction: column; background: #1b1d22; }
.hero > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(4,10,28,.5) 0%, rgba(4,10,28,.05) 28%, rgba(4,10,28,.25) 50%, rgba(4,10,28,.86) 100%); }
.hero > :not(img) { position: relative; z-index: 1; }
.hero > .top { z-index: 2; } /* keep the open menu above the hero copy */
.hero a { color: inherit; }
.top { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; font-size: 26px; letter-spacing: -0.03em; }
.brand:hover { text-decoration: none; }
.brand svg { width: 28px; height: 28px; flex: none; }
.brand small { font-size: 15px; font-weight: 500; letter-spacing: 0; opacity: .82; margin-left: 4px; }
.menu { position: relative; }
.menu-btn { background: #fff; color: var(--navy); border: 0; border-radius: 999px; padding: 13px 24px; font: 600 16px/1 var(--font); letter-spacing: -0.01em; cursor: pointer; }
.menu-list { position: absolute; right: 0; top: calc(100% + 10px); z-index: 30; min-width: 240px; display: none; flex-direction: column; padding: 10px; background: #fff; border-radius: 24px; box-shadow: 0 24px 48px -16px rgba(11, 18, 34, .28), 0 0 0 1px var(--faint); }
.menu.open .menu-list { display: flex; }
.menu-list a { padding: 12px 16px; border-radius: 14px; color: var(--ink) !important; }
.menu-list a:hover { background: #f1f0ee; text-decoration: none; }
.hero .copy { margin-top: auto; padding-top: 96px; display: flex; justify-content: space-between; align-items: end; gap: 32px; flex-wrap: wrap; }
.tag { display: inline-block; font-size: 14px; font-weight: 600; background: rgba(255,255,255,.16); box-shadow: inset 0 0 0 1px rgba(255,255,255,.4); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border-radius: 999px; padding: 7px 14px; margin-bottom: 18px; }
.display { font-weight: 650; font-size: clamp(42px, 5.6vw, 84px); line-height: 1; letter-spacing: -0.035em; text-wrap: balance; max-width: 11em; }
.sub { font-size: clamp(17px, 1.6vw, 21px); line-height: 1.4; color: var(--muted); }
.hero .sub { color: rgba(255,255,255,.86); margin-top: 16px; max-width: 30em; }
.actions { display: flex; gap: 12px; flex-wrap: wrap; }
.pill { display: inline-flex; align-items: center; gap: 8px; background: var(--navy); color: #fff; border-radius: 999px; padding: 15px 24px; font: 600 16px/1 var(--font); letter-spacing: -0.01em; }
.pill:hover { text-decoration: none; }
.pill.light { background: #fff; color: var(--navy) !important; }
.pill.ghost { background: rgba(255,255,255,.16); color: #fff; box-shadow: inset 0 0 0 1px rgba(255,255,255,.4); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.frost { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-top: 28px; }
.chip { background: rgba(255, 255, 255, .14); backdrop-filter: blur(14px) saturate(1.3); -webkit-backdrop-filter: blur(14px) saturate(1.3); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .28); border-radius: 26px; padding: 18px 20px; min-width: 0; }
.chip .k { font-size: 14px; color: rgba(255, 255, 255, .86); }
.chip .v { font-size: clamp(28px, 3vw, 44px); letter-spacing: -.03em; line-height: 1; margin: 10px 0 8px; font-weight: 650; font-variant-numeric: tabular-nums; }
.chip .s { font-size: 13px; color: rgba(255, 255, 255, .82); line-height: 1.4; }

/* ---------- Sections ---------- */
.wrap { max-width: 1200px; margin: 0 auto; padding: 112px 24px 0; }
.wrap.tight { padding-top: 88px; }
.head { display: flex; justify-content: space-between; align-items: end; gap: 24px 48px; margin-bottom: 40px; flex-wrap: wrap; }
.serif-h { font-weight: 650; font-size: clamp(34px, 4.5vw, 60px); line-height: 1.04; letter-spacing: -0.035em; text-wrap: balance; max-width: 12em; }
.head .sub { max-width: 30em; }
.note-card { background: var(--warn-soft); color: #4d3200; border-radius: 22px; padding: 16px 22px; font-size: 15px; margin-bottom: 24px; }
.note-card b { color: var(--warn); }

/* Segmented pill groups (parking filter chips) */
.scen-bar { margin-bottom: 18px; }
.seg { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.seg-label { font-size: 14px; color: var(--muted); margin-right: 4px; }
.seg button { border: 0; cursor: pointer; background: var(--gray); color: var(--ink); border-radius: 999px; padding: 11px 16px; font: 500 14.5px/1 var(--font); }
.seg button:hover { background: var(--gray2); }
.seg button[aria-pressed='true'] { background: var(--navy); color: #fff; }

/* Lever cards (parking .pc cards: photo above, gray body) */
.three { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.pc { border-radius: 36px; overflow: hidden; background: var(--gray); display: flex; flex-direction: column; min-width: 0; }
.pc img { aspect-ratio: 16 / 9; object-fit: cover; width: 100%; }
.pc > div { padding: 22px 26px 26px; display: flex; flex-direction: column; }
.pc h3 { font-weight: 550; font-size: 20px; letter-spacing: -0.02em; line-height: 1.2; min-height: 2.4em; }
@media (max-width: 1000px) { .pc h3 { min-height: 0; } }
.lv-val { display: block; font-size: 48px; font-weight: 650; letter-spacing: -.035em; line-height: 1; margin: 14px 0 6px; font-variant-numeric: tabular-nums; }
.pc input[type=range] { width: 100%; margin: 10px 0 4px; accent-color: var(--navy); height: 28px; }
.scale { display: flex; justify-content: space-between; font-size: 13px; color: var(--muted); }
.pc p { color: var(--muted); font-size: 14px; line-height: 1.5; margin-top: 12px; }

.assume-card { display: flex; justify-content: space-between; align-items: center; gap: 20px 32px; flex-wrap: wrap; background: var(--warn-soft); border-radius: 30px; padding: 22px 26px; margin: 24px 0; }
.assume-card h3 { font-size: 17px; font-weight: 600; letter-spacing: -.01em; max-width: 34em; }
.assume-card p { color: #5b4520; font-size: 14px; margin-top: 4px; }
.assume-card .seg button { background: #fff; }
.assume-card .seg button[aria-pressed='true'] { background: var(--warn); color: #fff; }

/* Cards and tables (parking .card / .card.flush) */
.card { background: var(--gray); border-radius: 26px; padding: 24px 26px; margin-bottom: 18px; min-width: 0; }
.card.flush { padding: 8px; border-radius: 30px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px 20px; flex-wrap: wrap; padding: 14px 14px 12px; }
.card-title { font-size: 21px; font-weight: 650; letter-spacing: -.02em; }
.table-wrap { background: #fff; border-radius: 22px; overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-variant-numeric: tabular-nums; }
th, td { padding: 12px 14px; border-bottom: 1px solid var(--line-faint); text-align: right; font-size: 14.5px; vertical-align: middle; }
th:first-child, td:first-child { text-align: left; }
thead th { font-weight: 500; color: var(--muted); font-size: 13px; vertical-align: bottom; white-space: normal; line-height: 1.3; }
tbody tr:last-child td, tbody tr:last-child th { border-bottom: 0; }
.compare td, .compare th { white-space: nowrap; }
.compare thead th { white-space: normal; min-width: 96px; }
.compare th:first-child, .compare td:first-child { white-space: normal; min-width: 140px; position: sticky; left: 0; background: #fff; z-index: 1; font-weight: 500; }
.compare thead th .key { margin-right: 6px; vertical-align: middle; }
.compare td.now { color: var(--muted); }
.compare .delta { display: block; font-size: 12px; color: var(--muted); }
.compare-hint { display: none; font-size: 13px; color: var(--muted); margin: -6px 0 18px; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 0; padding: 0; list-style: none; font-size: 13.5px; color: var(--muted); }
.legend li { display: inline-flex; align-items: center; gap: 7px; }
.key { width: 18px; height: 3px; border-radius: 2px; display: inline-block; }
.key.dot { width: 9px; height: 9px; border-radius: 50%; }

/* Charts: gray card, white plot inset */
.charts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 18px; }
.chart-card { background: var(--gray); border-radius: 30px; padding: 8px; margin: 0; min-width: 0; }
.chart-card h3, .chart-card h4 { font-size: 17px; font-weight: 600; letter-spacing: -.015em; margin: 14px 14px 2px; }
.chart-card .unit { font-size: 13px; color: var(--muted); margin: 0 14px 12px; }
.chart { position: relative; background: #fff; border-radius: 22px; padding: 14px 12px 6px; }
.chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart text { font: 400 11.5px var(--font); fill: var(--muted); font-variant-numeric: tabular-nums; }
.stat-line { font-size: 13px; color: var(--muted); margin: 10px 14px 6px; }
.tip { position: absolute; pointer-events: none; background: #fff; border-radius: 14px; box-shadow: 0 12px 30px -10px rgba(1, 14, 36, .35), 0 0 0 1px var(--faint); padding: 9px 11px; font-size: 13px; line-height: 1.4; min-width: 160px; z-index: 5; }
.tip b { display: block; margin-bottom: 2px; }
.tip .row { display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.tip .row span:first-child { display: inline-flex; align-items: center; gap: 6px; }

/* Calibration band (parking .facts) */
.band { margin: 112px 16px 0; border-radius: 48px; background: linear-gradient(180deg, #f7f7f6, #eeeeec); padding: 96px 24px 72px; }
.band-inner { max-width: 1152px; margin: 0 auto; }
.band .chart-card, .band .card { background: #fff; }
.band .card.flush { background: #fff; }
.fit-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-bottom: 18px; }
.stats-table td, .stats-table th { white-space: nowrap; }
#fit-notes p { margin: 0 0 10px; max-width: 72ch; color: var(--ink); }
#fit-notes p:last-child { margin: 0; }

/* How it works */
details.part { background: var(--gray); border-radius: 26px; padding: 0 26px; margin-bottom: 12px; }
details.part summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 22px 0; font-size: 19px; font-weight: 600; letter-spacing: -.015em; }
details.part summary::-webkit-details-marker { display: none; }
details.part summary::after { content: '+'; font-size: 26px; font-weight: 400; color: var(--muted); line-height: 1; }
details.part[open] summary::after { content: '−'; }
details.part[open] { padding-bottom: 22px; }
details.part > p, details.part > ul { max-width: 72ch; margin: 0 0 12px; }
details.part li { margin-bottom: 6px; }
.eq { font-family: var(--mono); font-size: 13px; line-height: 1.65; background: #fff; border-radius: 18px; padding: 14px 16px; overflow-x: auto; white-space: pre; margin: 4px 0 14px; }
.eq-note { font-size: 14.5px; color: var(--muted); margin: 0 0 12px; max-width: 72ch; }
details.part .table-wrap { margin: 10px 0 14px; }
.params td, .params th { text-align: left; vertical-align: top; font-size: 13.5px; line-height: 1.45; }
.params td.num { text-align: right; white-space: nowrap; }
.badge { display: inline-block; border-radius: 999px; padding: 3px 10px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.badge.measured { background: var(--ok-soft); color: var(--ok); }
.badge.estimated { background: var(--accent-soft); color: var(--navy); }
.badge.calibrated { background: #efeafa; color: #4a2f8c; }
.badge.assumed { background: var(--warn-soft); color: var(--warn); }
.tests { list-style: none; padding: 0; margin: 10px 0; background: #fff; border-radius: 20px; }
.tests li { display: flex; gap: 12px; padding: 11px 16px; border-bottom: 1px solid var(--line-faint); font-size: 14.5px; }
.tests li:last-child { border-bottom: 0; }
.tests .ok { color: var(--ok); background: var(--ok-soft); border-radius: 999px; padding: 1px 10px; font-size: 12.5px; font-weight: 600; height: fit-content; flex: none; }
.tests .no { color: var(--bad); background: var(--bad-soft); border-radius: 999px; padding: 1px 10px; font-size: 12.5px; font-weight: 600; flex: none; }
.tests small { color: var(--muted); display: block; }
.diagram { background: var(--gray); border-radius: 30px; padding: 8px; margin-bottom: 16px; }
.diagram > div { background: #fff; border-radius: 22px; padding: 12px; overflow-x: auto; }
.diagram svg { display: block; width: 100%; min-width: 640px; height: auto; }
.diagram text { font: 400 13px var(--font); fill: var(--ink); }
.diagram .small { font-size: 11.5px; fill: var(--muted); }
ul.sources { list-style: none; margin: 0; background: var(--gray); border-radius: 26px; padding: 8px 26px; }
ul.sources li { padding: 12px 0; border-bottom: 1px solid var(--line); }
ul.sources li:last-child { border-bottom: 0; }

/* Footer (parking .biglinks) */
.biglinks { background: #fafafa; padding: 140px 24px 40px; text-align: center; overflow: hidden; margin-top: 120px; }
.biglinks nav { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.biglinks nav a { color: var(--ink); font-weight: 650; font-size: clamp(32px, 3.9vw, 56px); line-height: 1.18; letter-spacing: -0.035em; }
.biglinks nav a:hover { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: .12em; }
.foot-meta { margin-top: 56px; display: flex; justify-content: center; gap: 24px; flex-wrap: wrap; font-size: 14px; color: var(--muted); }
.foot-meta a { color: var(--muted); }
.note { max-width: 760px; margin: 24px auto 0; font-size: 13px; line-height: 1.5; color: var(--muted); }
.wordmark { font-weight: 650; font-size: clamp(72px, 17vw, 260px); line-height: .9; letter-spacing: -0.04em; margin-top: 80px; white-space: nowrap; }

@media (max-width: 1000px) {
  .three { grid-template-columns: minmax(0, 1fr); }
  .pc { flex-direction: row; }
  .pc img { width: 34%; aspect-ratio: auto; min-height: 100%; }
  .pc > div { flex: 1; }
  .fit-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .frost { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .brand small { display: none; }
  .brand { white-space: nowrap; }
}
@media (max-width: 680px) {
  .hero { margin: 8px 8px 0; border-radius: 32px; padding: 16px 16px 20px; min-height: calc(100svh - 16px); }
  .brand { font-size: 18px; line-height: 1.15; white-space: normal; gap: 8px; min-width: 0; }
  .menu-btn { flex: none; }
  .brand small { display: none; }
  .menu-btn { padding: 11px 20px; }
  .hero .copy { padding-top: 64px; gap: 20px; }
  .display { font-size: clamp(36px, 10.5vw, 48px); }
  .frost { gap: 8px; margin-top: 20px; }
  .chip { padding: 14px 14px; border-radius: 22px; }
  .chip .v { font-size: 26px; }
  .chip .s { font-size: 12px; }
  .wrap { padding: 80px 16px 0; }
  .head { margin-bottom: 28px; }
  .pc { flex-direction: column; border-radius: 30px; }
  .pc img { width: 100%; aspect-ratio: 16 / 7; min-height: 0; }
  .pc > div { padding: 18px 20px 22px; }
  .lv-val { font-size: 40px; }
  .charts, .fit-grid { grid-template-columns: minmax(0, 1fr); }
  .band { margin: 80px 8px 0; border-radius: 32px; padding: 64px 12px 48px; }
  .compare-hint { display: block; }
  .diagram svg { min-width: 860px; } /* keep diagram text readable on phones; it scrolls sideways */
  th, td { padding: 10px 9px; font-size: 14px; }
  .compare th:first-child, .compare td:first-child { min-width: 116px; box-shadow: 1px 0 0 var(--line-faint); }
  details.part { padding: 0 18px; }
  .biglinks { padding: 96px 20px 32px; margin-top: 80px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* ---------- Multi-city: picker, city cards, mapping table, city switcher ---------- */
[hidden] { display: none !important; }
.city-switch { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: -4px 0 18px; font-size: 14px; }
.city-switch label { font-weight: 600; opacity: .86; }
.city-switch select { font: 600 15px/1 var(--font); color: var(--navy); background: #fff; border: 0; border-radius: 999px; padding: 10px 34px 10px 16px; appearance: none; -webkit-appearance: none; cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, var(--navy) 50%), linear-gradient(135deg, var(--navy) 50%, transparent 50%);
  background-position: calc(100% - 18px) 52%, calc(100% - 13px) 52%; background-size: 5px 5px; background-repeat: no-repeat; max-width: 100%; }
.city-switch a { font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.picker { display: flex; align-items: center; gap: 12px 20px; flex-wrap: wrap; margin-bottom: 20px; }
.picker input { flex: 1 1 320px; max-width: 520px; font: 500 16px/1 var(--font); color: var(--ink); background: var(--gray); border: 1px solid transparent; border-radius: 999px; padding: 15px 22px; }
.picker input:focus { outline: none; border-color: var(--navy); background: #fff; }
.picker-count { color: var(--muted); font-size: 14px; }
.city-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.city-card { display: flex; flex-direction: column; height: 100%; background: var(--gray); border-radius: 30px; padding: 22px 24px 22px; color: var(--ink); transition: background .15s; }
.city-card:hover { text-decoration: none; background: var(--gray2); }
.cc-state { font-size: 12.5px; font-weight: 600; letter-spacing: .04em; color: var(--muted); }
.cc-city { font-size: 28px; font-weight: 650; letter-spacing: -.03em; line-height: 1.1; margin-top: 4px; }
.cc-area { font-size: 14px; color: var(--muted); margin-top: 4px; }
.cc-stats { display: flex; flex-direction: column; gap: 4px; margin: 18px 0 16px; font-size: 14px; color: var(--muted); }
.cc-stats b { color: var(--ink); font-variant-numeric: tabular-nums; font-weight: 600; }
.cc-go { margin-top: auto; font-weight: 600; color: var(--navy); font-size: 14.5px; }
.empty { color: var(--muted); margin-top: 12px; }
.map-table td.wrap-cell { white-space: normal; min-width: 180px; }
.map-table td small { display: block; color: var(--muted); font-size: 12.5px; }
.map-table tr.in-progress td { color: var(--muted); }
.muted-p { color: var(--muted); margin: 6px 0 10px; font-size: 14.5px; }
.progress-list { list-style: none; margin: 0; padding: 0; background: #fff; border-radius: 20px; }
.progress-list li { padding: 12px 16px; border-bottom: 1px solid var(--line-faint); font-size: 14.5px; }
.progress-list li:last-child { border-bottom: 0; }
.progress-list span { color: var(--muted); }
.progress-list small { display: block; color: var(--muted); margin-top: 2px; }
.about .card h3 { font-size: 20px; font-weight: 600; letter-spacing: -.02em; margin-bottom: 8px; }
.about .card p { color: var(--muted); font-size: 15px; }
.about .card { margin-bottom: 0; }
.city-note { background: var(--accent-soft); border-radius: 22px; padding: 16px 22px; margin-bottom: 16px; max-width: 72ch; }
@media (max-width: 1000px) { .city-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 680px) {
  .city-grid { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .city-card { border-radius: 26px; padding: 18px 20px; }
  .cc-city { font-size: 24px; }
  .about { gap: 12px; }
}
.map-table th:nth-child(2), .map-table td:nth-child(2) { text-align: left; }
