/* Map page styles on top of brand.css (Hayden Terjeson brand guide). Tokens only; the map uses
   tints of Radar blue (buyer), sand (service area), sage and rust (coverage). */
:root {
  --fill-none: var(--surface-2);
  --buyer-1: rgba(74, 91, 150, .28);
  --buyer-2: rgba(74, 91, 150, .58);
  --buyer-3: var(--now);
  --cov-reviewed: var(--up);
  --cov-partial: rgba(92, 138, 105, .32);
  --cov-blocked: rgba(180, 87, 63, .35);
  --village: rgba(254, 253, 250, .45);
}
main { max-width: 1240px; }
.view[hidden], #view-map[hidden] { display: none; }
#band { margin-bottom: 1.6rem; }
#view-map { display: grid; grid-template-columns: minmax(0, 3fr) minmax(320px, 2fr); gap: 1.4rem; align-items: start; }
@media (max-width: 900px) { #view-map { grid-template-columns: 1fr; } }
.nav a[aria-selected=true] { color: var(--ink); border-bottom-color: var(--now); }
.nav a[aria-selected=true] .pill { background: var(--now-wash); color: var(--now); }

/* controls */
.controls { display: flex; flex-wrap: wrap; gap: .7rem 1rem; align-items: center; margin-bottom: .8rem; }
.controls select { font: inherit; font-size: 13.5px; padding: 5px 8px; border: 1px solid var(--rule-strong); border-radius: 8px; background: var(--surface); color: var(--ink); }
fieldset { border: 1px solid var(--rule-strong); border-radius: 8px; padding: 2px 10px 5px; display: flex; gap: .8rem; font-size: 13.5px; }
fieldset legend { padding: 0 4px; }
fieldset input { accent-color: var(--now); }

/* map */
#map { width: 100%; height: 62vh; min-height: 380px; background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); box-shadow: var(--shadow); }
#map path { stroke: var(--surface); stroke-width: .8; vector-effect: non-scaling-stroke; cursor: pointer; transition: fill .2s; }
#map path:hover { stroke: var(--ink-2); stroke-width: 1.4; }
#map path:focus { outline: none; stroke: var(--now); stroke-width: 2.5; }
#map path.dim { opacity: .4; }
#map path.muni { stroke: var(--rule-strong); stroke-width: 1; }
#map path.village { stroke: var(--ink-2); stroke-dasharray: 3 2; stroke-width: .9; }
#map path.ctx { pointer-events: none; fill: none !important; stroke: var(--ink-2); stroke-width: 1.6; }
#map path.selected.selected { stroke: var(--ink); stroke-width: 3; }
.hatch-bg { fill: var(--surface-2); }
.hatch-line { stroke: var(--then); }
.legend { margin: .9rem 0 0; }
.legend .swatch { border: 1px solid var(--rule-strong); }

/* panel */
#panel { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.1rem 1.2rem; max-height: calc(62vh + 140px); overflow: auto; font-size: 14px; color: var(--ink-2); }
#panel h2 { font-size: 1.35rem; color: var(--ink); letter-spacing: -.01em; }
#panel h3 { font-size: 1rem; color: var(--ink); margin: 1.3rem 0 .5rem; padding-top: .7rem; border-top: 1px solid var(--rule-strong); }
#panel p + p { margin-top: .5rem; }
.kind { font-family: var(--mono); font-size: .66rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin: .25rem 0 .7rem; }
.card { border: 1px solid var(--rule); border-radius: var(--radius); padding: .8rem .9rem; margin: .6rem 0; background: var(--ground); }
.card h4 { font-family: var(--display); font-weight: 500; font-size: 1rem; color: var(--ink); line-height: 1.3; margin-bottom: .3rem; }
.meta { color: var(--muted); font-size: 12.5px; margin: .2rem 0; line-height: 1.5; }
.meta b { color: var(--ink-2); font-weight: 500; }
.note { color: var(--muted); font-size: 12.5px; }
.empty { background: var(--surface-2); border: 1px dashed var(--rule-strong); border-radius: var(--radius); padding: .7rem .85rem; font-size: 13px; color: var(--ink-2); }
.empty p + p { margin-top: .45rem; }
.empty b { color: var(--ink); font-weight: 500; }
.gap { color: var(--down); }
.linklike { background: none; border: none; padding: 0; color: var(--now); text-decoration: underline; text-underline-offset: 2px; cursor: pointer; font: inherit; text-align: left; }
#panel a, .view a { color: var(--now); }
ul.munis { padding-left: 1.1rem; margin: .3rem 0; display: flex; flex-direction: column; gap: .15rem; }
ul.munis ul { padding-left: 1rem; }
details { margin: .2rem 0; }
summary { cursor: pointer; color: var(--muted); font-family: var(--mono); font-size: .62rem; letter-spacing: .08em; text-transform: uppercase; }
blockquote { margin: .35rem 0 .35rem .2rem; padding-left: .6rem; border-left: 2px solid var(--rule-strong); font-size: 12.5px; color: var(--ink-2); }
.badge { font-family: var(--mono); font-size: .62rem; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; padding: 2px 7px; border-radius: 20px; white-space: nowrap; display: inline-block; background: var(--surface-2); color: var(--muted); }
.badge.reviewed, .badge.partial { background: var(--up-wash); color: var(--up); }
.badge.blocked { background: var(--down-wash); color: var(--down); }

/* tables in the panel and views follow the brand .tbl look */
#panel table, .view table { width: 100%; border-collapse: collapse; font-size: 12.5px; background: var(--surface); }
#panel th, .view th { font-family: var(--mono); font-size: .58rem; font-weight: 500; letter-spacing: .09em; text-transform: uppercase; color: var(--muted); text-align: left; padding: .45rem .5rem; border-bottom: 1px solid var(--rule-strong); background: var(--surface-2); }
#panel td, .view td { padding: .45rem .5rem; border-bottom: 1px solid var(--rule); vertical-align: top; color: var(--ink-2); line-height: 1.45; }
td.num, th.num { text-align: right; font-family: var(--mono); font-variant-numeric: tabular-nums; white-space: nowrap; }
caption { text-align: left; padding: .5rem 0; font-family: var(--display); font-weight: 500; font-size: 1.05rem; color: var(--ink); }
caption .note { display: block; font-family: var(--ui); font-size: 12.5px; font-weight: 400; margin-top: .15rem; }
.view h2 { font-size: clamp(1.25rem, 2.4vw, 1.7rem); margin-bottom: .5rem; }
.view > div { display: flex; flex-direction: column; gap: 1rem; }
#view-table label { font-size: 13px; }

[hidden] { display: none !important; }
