:root {
  --bg: #080e12;
  --surface: #10191e;
  --raised: #17242a;
  --inset: #0b1419;
  --line: #25363c;
  --line-strong: #3e5559;
  --main: #eef4ef;
  --weak: #a7b9b8;
  --frame: min(100% - var(--gutter) * 2, 82rem);
  --panel-radius: 12px;
}

.topbar { background: #0b1318; border-color: var(--line); }
.topinner { min-height: 72px; gap: clamp(25px, 4.2vw, 62px); }
.brand { min-height: 44px; }
.brand-type { color: var(--main); }
.brand-light { color: #c4d7d4; }
.nav { gap: clamp(18px, 2.3vw, 38px); }
.nav a { min-height: 44px; padding-inline: 2px; }
.nav a[aria-current="page"]::after { height: 2px; }
.head-actions { gap: 8px; }
.head-actions button { min-height: 44px; border-radius: 7px; }
.head-actions .icon-button { min-width: 44px; }

#home-view { padding-top: clamp(20px, 3.4vw, 47px); }
.city-hero {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  min-height: clamp(365px, 37vw, 492px);
  overflow: hidden;
  border: 1px solid #31464b;
  border-radius: var(--panel-radius);
  background: #0a161a;
}
.city-hero-art {
  position: absolute;
  z-index: -2;
  inset: 0 0 0 auto;
  width: 81%;
  height: 100%;
  object-fit: cover;
  object-position: 57% 55%;
}
.city-hero::before {
  position: absolute;
  z-index: -1;
  content: "";
  inset: 0;
  background:
    linear-gradient(90deg, #0a161a 0%, #0a161a 22%, #0a161af5 31%, #0a161ab0 45%, #0a161a32 63%, transparent 82%),
    linear-gradient(0deg, #08121766, transparent 40%);
}
.city-hero-copy { padding: clamp(28px, 5vw, 72px); }
.hub-kicker {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--bright);
  font: 560 .8125rem/1.5 var(--sans);
  letter-spacing: .012em;
}
.hub-kicker .ui-icon { width: 15px; height: 15px; }
.city-hero h1 {
  margin: 12px 0 15px;
  font-size: clamp(3rem, 6.2vw, 6.4rem);
  font-weight: 650;
  line-height: 1;
  letter-spacing: var(--tracking-display);
}
.city-hero-description {
  max-width: 31rem;
  color: #c2d3d0;
  font-size: clamp(1rem, 1.45vw, 1.22rem);
  line-height: 1.55;
  text-wrap: pretty;
}
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 28px; }
.hub-button {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 15px;
  border: 1px solid #587779;
  border-radius: 7px;
  color: var(--main);
  background: #101d23e8;
  font-size: .9rem;
  font-weight: 620;
}
.hub-button .ui-icon { width: 17px; height: 17px; }
.hub-button:hover { border-color: var(--bright); background: #1a3339; }
.hub-primary { border-color: var(--teal); color: #082322; background: #89d7c9; }
.hub-primary:hover { color: #082322; background: #a2e5d7; }

.hub-readout {
  margin-top: 16px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--panel-radius);
  background: var(--surface);
}
.hub-readout-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  column-gap: 16px;
  padding: 5px clamp(14px, 2vw, 26px);
  border-bottom: 1px solid var(--line);
}
.hub-network-label { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 14px; }
.hub-network-label h2 { font-size: 1rem; }
.hub-state {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--weak);
  font: 550 .8rem/1.4 var(--sans);
}
.hub-state[data-status="live"] { color: #a5e1ba; }
.hub-state[data-status="live"] .state-dot { background: #99db9c; }
.hub-state:is([data-status="paused"], [data-status="archived"]) { color: #e4c794; }
.hub-state:is([data-status="paused"], [data-status="archived"]) .state-dot { background: #d7b779; }
.hub-text-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--bright);
  font-size: .86rem;
  text-underline-offset: 4px;
}
.hub-text-link:hover { text-decoration: underline; }
.hub-readout .metrics { margin: 0; padding: 0; border: 0; border-radius: 0; background: transparent; }
.hub-readout .metric { min-height: 84px; padding-inline: clamp(14px, 2vw, 26px); }
.hub-readout .metric-val { margin-top: 7px; }
.hub-readout .spark { opacity: .75; }

#districts { scroll-margin-top: 20px; }
.hub-resources {
  display: grid;
  grid-template-columns: minmax(195px, .95fr) minmax(0, 1.7fr);
  align-items: start;
  gap: clamp(18px, 4vw, 60px);
  padding: clamp(22px, 3vw, 40px) 0;
  margin-top: clamp(28px, 4vw, 58px);
  border-block: 1px solid var(--line);
}
.hub-resources h2 { font-size: clamp(1.75rem, 3vw, 2.75rem); line-height: 1.12; letter-spacing: var(--tracking-title); }
.hub-resources-intro p { max-width: 30ch; margin-top: 9px; color: var(--weak); font-size: .94rem; line-height: 1.55; }
.hub-resource-list { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; }
.hub-resource-list li + li { border-top: 1px solid var(--line); }
.hub-resource-list :is(button, a) {
  display: flex;
  width: 100%;
  min-height: 64px;
  align-items: center;
  gap: 13px;
  padding: 9px 10px;
  text-align: start;
}
.hub-resource-list :is(button, a):hover { background: var(--surface); border-radius: 5px; }
.resource-icon {
  display: grid;
  width: 34px;
  height: 34px;
  flex: none;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  color: var(--teal);
  background: var(--inset);
}
.hub-resource-list strong { display: block; color: var(--main); font-size: .95rem; font-weight: 650; }
.hub-resource-list small { display: block; margin-top: 2px; color: var(--weak); font-size: .85rem; line-height: 1.45; }

.page-head { padding-block: clamp(24px, 3.2vw, 44px) clamp(16px, 2.3vw, 28px); }
.viz-panel, .table-card, .metrics { border: 1px solid var(--line); border-radius: var(--panel-radius); background: var(--surface); }
.viewer-bar, .card-heading { border-color: var(--line); background: #142026; }
.viewer-bar { min-height: 60px; }
.switcher { gap: 4px; padding: 3px; border: 1px solid var(--line); border-radius: 8px; background: var(--inset); }
.switcher button { min-height: 38px; border-radius: 5px; padding-inline: 11px; }
.switcher button[aria-pressed="true"] { color: var(--bright); background: #203d3c; box-shadow: inset 0 0 0 1px #476d67; }
.district-control select { min-height: 39px; border-radius: 6px; }
.viz-foot { border-color: var(--line); }
.viz-foot .action { min-height: 44px; }
.legend, .zoom-tools { border-color: #5a787b; border-radius: 7px; background: #0b171bee; }
.footer { margin-top: clamp(24px, 4vw, 48px); }

@media (max-width: 1040px) {
  .topinner { display: flex; flex-wrap: wrap; min-height: 53px; gap: 0 10px; }
  .brand { min-height: 54px; gap: 7px; }
  .head-actions { gap: 5px; }
  .head-actions :is(.search-launch, .icon-button) { width: 44px; height: 44px; min-height: 44px; padding: 0; justify-content: center; }
  .head-actions .search-launch span, .head-actions .search-launch kbd { display: none; }
  .nav { order: 3; flex: 0 0 100%; justify-content: space-between; gap: 0; border-top: 1px solid var(--line); }
  .nav a { min-height: 44px; font-size: .85rem; padding-inline: 3px; }
  .nav a:first-child { padding-left: 0; }
  .nav a:last-child { padding-right: 0; }
}

@media (max-width: 760px) {
  .hub-readout .metrics { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .hub-readout .metric:nth-child(3) { border-left: 0; }
  .hub-readout .metric:nth-child(n+3) { border-top: 1px solid var(--line); }
}

@media (max-width: 570px) {
  .city-hero { min-height: 410px; align-items: end; }
  .city-hero-art { width: 100%; height: 74%; object-position: 53% 58%; }
  .city-hero::before { background: linear-gradient(0deg, #0a161a 10%, #0a161af5 34%, #0a161aaa 52%, #0a161a15 82%); }
  .city-hero-copy { padding: 22px 18px; }
  .city-hero h1 { font-size: clamp(2.25rem, 11vw, 4rem); margin: 8px 0 11px; }
  .city-hero-description { max-width: 34ch; font-size: .95rem; }
  .hero-actions { gap: 7px; margin-top: 20px; }
  .hub-button { min-height: 44px; padding-inline: 10px; gap: 6px; font-size: .8rem; }
  .hub-button .ui-icon { width: 15px; height: 15px; }
  .hub-network-label { align-items: flex-start; flex-direction: column; }
  .hub-readout-heading { padding-block: 7px; }
  .hub-readout .metric { min-height: 74px; }
  .hub-resources { grid-template-columns: 1fr; gap: 12px; }
  .hub-resource-list :is(button, a) { padding-inline: 0; }
  .switcher button { min-height: 37px; padding-inline: 7px; }
  .viz-foot .expand { min-height: 44px; }
}

@media (max-width: 350px) {
  .city-hero-copy { padding-inline: 13px; }
  .hero-actions .ui-icon { display: none; }
  .hub-readout .metric-label { font-size: .74rem; }
  .hub-readout .spark { display: none; }
  .hub-readout .metric:nth-child(2) { padding-inline-end: 4px; }
}
