/* Baldwin Watch — one stylesheet. Tokens first; every colour comes from them so both themes hold. */
:root {
  --paper: #f6f4ef; --surface: #ffffff; --raised: #fbfaf7; --ink: #14202b; --ink-2: #4b5966; --ink-3: #8a96a1;
  --line: #e4e0d6; --line-2: #d6d1c5; --accent: #1d5c8c; --accent-2: #174a71; --accent-soft: #e6eff6; --on-accent: #ffffff;
  --c-commercial: #c2552d; --c-residential: #c58a12; --c-rural: #5e8b4e; --c-industrial: #5b6b7a;
  --c-development: #6c55b5; --c-roads: #2f7bb5; --c-rules: #9b4d86; --c-other: #8a96a1; --c-variance: #b0723a; --c-site_work: #2f8f6b;
  --ok: #2e7d4f; --ok-soft: #e5f2ea; --bad: #b4412e; --bad-soft: #f8e7e3; --warn: #8a6a12; --warn-soft: #f6efdc; --mute-soft: #eef0f2;
  --shadow: 0 1px 2px rgba(20, 32, 43, .06), 0 8px 24px rgba(20, 32, 43, .08);
  --shadow-lg: 0 2px 6px rgba(20, 32, 43, .08), 0 24px 60px rgba(20, 32, 43, .16);
  --serif: "Newsreader", "Iowan Old Style", Georgia, serif;
  --sans: "Public Sans", "Segoe UI", system-ui, -apple-system, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
  --r: 10px; --r-lg: 16px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #0e1418; --surface: #151d23; --raised: #19232a; --ink: #e6ebee; --ink-2: #a7b3bc; --ink-3: #75838e;
    --line: #25303a; --line-2: #31404c; --accent: #6fb0e2; --accent-2: #8fc3ea; --accent-soft: #16293a; --on-accent: #0b1620;
    --c-commercial: #e07a54; --c-residential: #e0aa3e; --c-rural: #8bb874; --c-industrial: #98a8b6;
    --c-development: #a08cec; --c-roads: #62a9e0; --c-rules: #d07fb8; --c-other: #75838e; --c-variance: #d89a5e; --c-site_work: #5cc39a;
    --ok: #6cc795; --ok-soft: #13291e; --bad: #ec8a75; --bad-soft: #2d1813; --warn: #e2b95a; --warn-soft: #2b2312; --mute-soft: #1d262d;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .35);
    --shadow-lg: 0 2px 6px rgba(0, 0, 0, .35), 0 24px 60px rgba(0, 0, 0, .5);
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--paper); color: var(--ink); font: 400 15px/1.55 var(--sans); -webkit-font-smoothing: antialiased; }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--accent-2); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3 { margin: 0; text-wrap: balance; }
.serif { font-family: var(--serif); }
.mono { font-family: var(--mono); }
.muted { color: var(--ink-2); }
.faint { color: var(--ink-3); }
.wrap { max-width: 1120px; margin: 0 auto; padding-left: max(20px, env(safe-area-inset-left)); padding-right: max(20px, env(safe-area-inset-right)); }
.narrow { max-width: 720px; }
.eyebrow { font: 600 12px/1.3 var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); }
[hidden] { display: none !important; }

/* ---------- header ---------- */
.top { position: sticky; top: 0; z-index: 1000; background: color-mix(in srgb, var(--paper) 88%, transparent); backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line); }
.top .wrap, .top .bar { display: flex; align-items: center; gap: 24px; height: 60px; }
.top .bar { padding: 0 max(18px, env(safe-area-inset-left)); }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font: 600 19px/1 var(--serif); letter-spacing: -.01em; }
.brand svg { width: 26px; height: 26px; flex: none; }
.brand:hover { color: var(--ink); }
.nav { display: flex; gap: 4px; margin-left: 8px; }
.nav a { padding: 8px 12px; border-radius: 8px; color: var(--ink-2); text-decoration: none; font-weight: 500; font-size: 14.5px; }
.nav a:hover { color: var(--ink); background: var(--raised); }
.nav a[aria-current="page"] { color: var(--ink); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
.spacer { flex: 1; }
.top .who { display: flex; align-items: center; gap: 10px; }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center;
  font: 600 13px/1 var(--sans); text-decoration: none; }
@media (max-width: 720px) { .nav a { padding: 8px 9px; } .nav { margin-left: 0; } .top .who .email { display: none; } .brand span { display: none; }
  .top .wrap, .top .bar { gap: 12px; } }

/* ---------- buttons, inputs, chips ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 42px; padding: 0 18px; border-radius: 10px; border: 1px solid transparent;
  font: 600 15px/1 var(--sans); text-decoration: none; cursor: pointer; transition: background .15s, box-shadow .15s, transform .05s; white-space: nowrap; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover { background: var(--accent-2); color: var(--on-accent); }
.btn-quiet { background: var(--surface); color: var(--ink); border-color: var(--line-2); }
.btn-quiet:hover { color: var(--ink); background: var(--raised); }
.btn-text { background: none; color: var(--ink-2); padding: 0 10px; }
.btn-text:hover { color: var(--ink); }
.btn-lg { height: 50px; padding: 0 24px; font-size: 16px; border-radius: 12px; }
.btn-sm { height: 34px; padding: 0 12px; font-size: 14px; border-radius: 8px; }
.btn[disabled] { opacity: .55; cursor: default; }
.btn-block { width: 100%; }
.field { display: grid; gap: 6px; }
.field label { font-weight: 600; font-size: 14px; }
input[type=text], input[type=email], input[type=password], input[type=search], textarea, select {
  width: 100%; font: 400 15.5px/1.4 var(--sans); color: var(--ink); background: var(--surface); border: 1px solid var(--line-2);
  border-radius: 10px; padding: 11px 13px; transition: border-color .15s, box-shadow .15s; }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
/* iOS zooms the whole page into any field set under 16px and leaves it zoomed, so touch screens get 16px everywhere */
@media (hover: none) and (pointer: coarse) { input, textarea, select { font-size: 16px !important; } }
textarea { resize: vertical; min-height: 110px; line-height: 1.5; }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 9px; border-radius: 999px; background: var(--raised);
  border: 1px solid var(--line); color: var(--ink-2); font: 500 12.5px/1 var(--sans); white-space: nowrap; }
.chip .dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.chip.mono { font-family: var(--mono); font-size: 12px; }
.seg { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.seg button { height: 32px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--surface); color: var(--ink-2);
  font: 500 13.5px/1 var(--sans); cursor: pointer; display: inline-flex; align-items: center; gap: 7px; }
.seg button .dot { width: 8px; height: 8px; border-radius: 50%; }
.seg button[aria-pressed="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.pill { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border-radius: 999px; font: 600 12px/1 var(--sans); white-space: nowrap; }
.pill.Approved { background: var(--ok-soft); color: var(--ok); }
.pill.Denied, .pill.Failed { background: var(--bad-soft); color: var(--bad); }
.pill.Tabled, .pill.Upcoming, .pill.Awaiting { background: var(--warn-soft); color: var(--warn); }
.pill.Withdrawn, .pill.None, .pill.Outcome, .pill.No, .pill.First, .pill.Hearing { background: var(--mute-soft); color: var(--ink-2); }
.pill.Recommended { background: var(--accent-soft); color: var(--accent); }
.cat-rezoning, .tone-residential { color: var(--c-residential); } .tone-commercial { color: var(--c-commercial); }
.tone-rural { color: var(--c-rural); } .tone-industrial { color: var(--c-industrial); }
.cat-development { color: var(--c-development); } .cat-roads { color: var(--c-roads); } .cat-rules { color: var(--c-rules); } .cat-other { color: var(--c-other); }

/* ---------- flash messages ---------- */
.flashes { position: fixed; top: 72px; left: 50%; transform: translateX(-50%); z-index: 2000; display: grid; gap: 8px; width: min(560px, calc(100% - 32px)); }
.flash { padding: 12px 16px; border-radius: 12px; background: var(--surface); box-shadow: var(--shadow-lg); border: 1px solid var(--line); font-weight: 500;
  animation: drop .25s ease-out; }
.flash.error { border-color: color-mix(in srgb, var(--bad) 40%, var(--line)); color: var(--bad); }
.flash.ok { border-color: color-mix(in srgb, var(--ok) 40%, var(--line)); color: var(--ok); }
@keyframes drop { from { opacity: 0; transform: translateY(-6px); } }

/* ---------- cards ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow); }
.pad { padding: 24px; }
.stack { display: grid; gap: 16px; }
.row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }

/* ---------- landing ---------- */
.hero { padding: 72px 0 56px; }
.hero .grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: 48px; align-items: center; }
.hero h1 { font: 500 clamp(40px, 5vw, 60px)/1.04 var(--serif); letter-spacing: -.02em; margin: 14px 0 20px; }
.hero h1 em { font-style: italic; color: var(--accent); }
.hero .lede { font-size: 19px; line-height: 1.55; color: var(--ink-2); max-width: 34em; margin: 0 0 28px; }
.hero .cta { display: flex; gap: 12px; flex-wrap: wrap; }
.hero .fine { margin-top: 14px; font-size: 13.5px; color: var(--ink-3); }
.preview { position: relative; aspect-ratio: 1 / 1.08; max-width: 520px; justify-self: center; width: 100%; }
.preview svg.county-map { width: 100%; height: 100%; display: block; overflow: visible; }
.preview .county { fill: var(--surface); stroke: var(--line-2); stroke-width: 1.2; filter: drop-shadow(0 18px 40px rgba(20, 32, 43, .10)); }
.preview .pt { opacity: 0; animation: pop .5s ease-out forwards; }
@keyframes pop { from { opacity: 0; transform: scale(.4); } to { opacity: .9; transform: scale(1); } }
.preview .note { position: absolute; right: -6px; top: 16%; width: min(300px, 74%); padding: 14px 16px; border-radius: 14px; background: var(--surface);
  box-shadow: var(--shadow-lg); border: 1px solid var(--line); font-size: 13.5px; }
.preview .note b { display: block; font-size: 15px; line-height: 1.35; margin: 6px 0 4px; }
.preview .note .note-head { display: flex; align-items: center; gap: 6px; flex: none; font-size: 12.5px; font-weight: 600; color: var(--accent); }

/* outcomes: three cards under the hero */
.outcomes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.outcomes .card { padding: 26px; }
.outcomes .ic { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--accent-soft); color: var(--accent); }
.outcomes h3 { font: 600 18px/1.3 var(--sans); margin: 16px 0 8px; }
.outcomes p { margin: 0; color: var(--ink-2); }
@media (max-width: 880px) { .outcomes { grid-template-columns: 1fr; } }

/* the tour: copy beside a real piece of the product */
.tour { display: grid; grid-template-columns: minmax(0, 1fr); gap: 72px; }
.tour-row { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: 56px; align-items: center; }
.tour-row.flip { grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); }
.tour-row.flip > .copy { order: 2; }
.tour .step { font: 500 13px/1 var(--mono); color: var(--accent); }
.tour h3 { font: 500 clamp(24px, 2.6vw, 30px)/1.15 var(--serif); letter-spacing: -.01em; margin: 12px 0 12px; }
.tour .copy p { color: var(--ink-2); font-size: 16px; margin: 0 0 12px; max-width: 34em; }
.tour .proofline { font-size: 14.5px !important; padding: 12px 14px; border-radius: 12px; background: var(--ok-soft); color: var(--ink) !important; }
@media (max-width: 880px) { .tour-row, .tour-row.flip { grid-template-columns: minmax(0, 1fr); gap: 24px; } .tour-row.flip > .copy { order: 0; } .tour { gap: 56px; } }
.mock { padding: 22px; }
.mock-label { font: 600 12px/1.3 var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 10px; }
.watch-mock .typed { padding: 14px 16px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--raised); font-size: 15px; line-height: 1.55; }
.watch-mock .understood { display: flex; gap: 10px; align-items: flex-start; margin-top: 14px; padding: 14px 16px; border-radius: 12px; background: var(--accent-soft); font-size: 14.5px; }
.watch-mock .understood svg { flex: none; color: var(--accent); margin-top: 2px; }
.matches { display: grid; gap: 12px; }
.match { padding: 16px 18px; }
.match .meta { display: flex; gap: 8px; align-items: center; font-size: 12.5px; color: var(--ink-3); }
.match .meta .spacer { flex: 1; }
.match .meta .dot { width: 9px; height: 9px; border-radius: 50%; background: currentColor; }
.match h4 { font: 600 16px/1.35 var(--sans); margin: 8px 0 8px; }
.match .facts { display: flex; gap: 6px; flex-wrap: wrap; }
.match .lead { display: flex; gap: 6px; align-items: center; margin-top: 10px; font-size: 13.5px; font-weight: 600; color: var(--accent); }
.match .finding { margin: 10px 0 0; padding-left: 12px; border-left: 2px solid var(--line-2); color: var(--ink-2); font-size: 14px; }
.match .record { display: inline-flex; gap: 5px; align-items: center; margin-top: 10px; font-size: 13.5px; }
.frame { overflow: hidden; }
.frame-bar { display: flex; gap: 6px; padding: 10px 12px; border-bottom: 1px solid var(--line); background: var(--raised); }
.frame-bar i { width: 9px; height: 9px; border-radius: 50%; background: var(--line-2); }
.frame-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); min-height: 340px; }
.frame-list { border-right: 1px solid var(--line); padding: 12px; display: grid; gap: 4px; align-content: start; }
.frame-chips { display: flex; gap: 5px; flex-wrap: wrap; margin-bottom: 8px; }
.frame-chips span { display: inline-flex; align-items: center; gap: 5px; padding: 4px 9px; border-radius: 999px; font-size: 11.5px; background: var(--ink); color: var(--paper); }
.frame-chips i { width: 6px; height: 6px; border-radius: 50%; }
.frame-item { display: grid; grid-template-columns: 4px minmax(0, 1fr); gap: 10px; padding: 8px 6px; border-radius: 8px; }
.frame-item:first-of-type { background: var(--raised); }
.frame-item .bar { border-radius: 4px; background: currentColor; }
.frame-item b { display: block; font-size: 12.5px; font-weight: 600; line-height: 1.3; }
.frame-item span { font-size: 11.5px; color: var(--ink-3); }
.frame-map { padding: 14px; background: var(--paper); display: grid; place-items: center; }
.frame-map svg { width: 100%; max-height: 320px; overflow: visible; }
.frame-map .county { fill: var(--surface); stroke: var(--line-2); stroke-width: 1.2; }
.frame-map .pt { opacity: .9; }
@media (max-width: 520px) { .frame-body { grid-template-columns: 1fr; } .frame-list { border-right: 0; border-bottom: 1px solid var(--line); } }
.ask-mock .ask-q { justify-self: end; margin-left: auto; width: fit-content; max-width: 88%; padding: 12px 16px; border-radius: 16px 16px 4px 16px; background: var(--accent); color: var(--on-accent); font-size: 14.5px; }
.ask-mock .ask-a { margin: 16px 0 12px; font-size: 15px; }
.ask-mock .table-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; }
.ask-mock table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.ask-mock th { text-align: left; font-weight: 600; font-size: 12px; color: var(--ink-3); background: var(--raised); padding: 8px 10px; white-space: nowrap; }
.ask-mock td { padding: 8px 10px; border-top: 1px solid var(--line); white-space: nowrap; }
.ask-mock .ask-foot { display: flex; gap: 6px; align-items: center; margin-top: 12px; font-size: 13px; color: var(--ink-3); }
.price .for { list-style: none; padding: 0; margin: 8px 0 0; display: grid; gap: 14px; color: var(--ink-2); font-size: 16.5px; max-width: 32em; }
.price .for b { color: var(--ink); }
@media (max-width: 880px) { .hero .grid { grid-template-columns: 1fr; } .hero { padding-top: 40px; } .preview { max-width: 420px; } }
.proof { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
.proof > div { background: var(--surface); padding: 26px 24px; }
.proof b { display: block; font: 500 40px/1 var(--serif); letter-spacing: -.02em; margin-bottom: 8px; }
.proof span { color: var(--ink-2); font-size: 14.5px; }
@media (max-width: 720px) { .proof { grid-template-columns: 1fr; } }
.section { padding: 72px 0; }
.section h2 { font: 500 clamp(30px, 3.6vw, 42px)/1.1 var(--serif); letter-spacing: -.015em; margin-bottom: 14px; }
.section .sub { color: var(--ink-2); font-size: 17px; max-width: 40em; margin: 0 0 36px; }
.price { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 40px; align-items: center; }
.plan { padding: 32px; }
.plan .amt { font: 500 56px/1 var(--serif); letter-spacing: -.02em; }
.plan .amt small { font: 400 17px var(--sans); color: var(--ink-2); letter-spacing: 0; }
.plan ul { list-style: none; padding: 0; margin: 22px 0 26px; display: grid; gap: 10px; }
.plan li { display: flex; gap: 10px; align-items: flex-start; }
.plan li svg { flex: none; margin-top: 3px; color: var(--ok); }
@media (max-width: 880px) { .price { grid-template-columns: 1fr; } }
.faq { display: grid; gap: 12px; }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 16px 20px; }
.faq summary { cursor: pointer; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::after { content: "+"; color: var(--ink-3); font-weight: 400; font-size: 20px; line-height: 1; }
.faq details[open] summary::after { content: "–"; }
.faq p { margin: 10px 0 0; color: var(--ink-2); }
.foot { border-top: 1px solid var(--line); padding: 32px 0 48px; color: var(--ink-3); font-size: 13.5px; }
.foot .wrap { display: flex; gap: 18px; flex-wrap: wrap; justify-content: space-between; }


/* ---------- auth & simple pages ---------- */
.center-page { min-height: calc(100vh - 60px); display: grid; place-items: center; padding: 40px 16px 64px;
  background: radial-gradient(1200px 600px at 50% -10%, var(--accent-soft), transparent 60%), var(--paper); }
.auth { width: min(420px, 100%); padding: 34px 32px 28px; }
.auth h1 { font: 500 32px/1.1 var(--serif); letter-spacing: -.015em; margin-bottom: 6px; text-align: center; }
.auth .sub { text-align: center; color: var(--ink-2); margin: 0 0 24px; }
.btn-google { background: var(--surface); color: var(--ink); border: 1px solid var(--line-2); height: 46px; width: 100%; font-weight: 600; }
.btn-google:hover { background: var(--raised); color: var(--ink); }
.or { display: flex; align-items: center; gap: 12px; color: var(--ink-3); font-size: 13px; margin: 20px 0; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.auth form { display: grid; gap: 14px; }
.auth .switch { text-align: center; margin: 18px 0 0; color: var(--ink-2); font-size: 14.5px; }
.auth .legal { text-align: center; margin: 16px 0 0; color: var(--ink-3); font-size: 12.5px; }
.subscribe { width: min(520px, 100%); padding: 36px; }
.subscribe h1 { font: 500 34px/1.1 var(--serif); letter-spacing: -.015em; margin: 8px 0 10px; }
.devnote { margin-top: 18px; padding: 14px 16px; border-radius: 12px; border: 1px dashed var(--line-2); background: var(--raised); font-size: 14px; color: var(--ink-2); }

/* ---------- explore (map) ---------- */
.explore { position: relative; height: calc(100vh - 61px); height: calc(100dvh - 61px); overflow: hidden; }
#map { position: absolute; inset: 0; background: var(--paper); }
.panel { position: absolute; z-index: 500; top: 16px; left: 16px; bottom: 16px; width: 380px; display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-lg); overflow: hidden; }
.panel .head { padding: 16px 16px 12px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; border-bottom: 1px solid var(--line); }
.search { position: relative; }
.search svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--ink-3); pointer-events: none; }
.search input { padding-left: 38px; height: 42px; }
.filters { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
.filters .line { display: flex; gap: 8px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.filters select { width: auto; height: 32px; padding: 0 30px 0 10px; font-size: 13.5px; border-radius: 999px; }
.count { font-size: 13px; color: var(--ink-3); }
.asof { font-size: 12px; color: var(--ink-3); margin-top: -4px; }
.viewbar { display: flex; align-items: center; gap: 10px; }
.viewbar .count { flex: 1; min-width: 0; text-align: right; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.viewbar select { width: auto; height: 30px; padding: 0 28px 0 10px; font-size: 13px; border-radius: 999px; }
.tabs { display: inline-flex; padding: 3px; border-radius: 999px; background: var(--raised); border: 1px solid var(--line); flex: none; }
.tabs button { height: 26px; padding: 0 12px; border: 0; border-radius: 999px; background: none; color: var(--ink-2); font: 600 13px var(--sans); cursor: pointer; }
.tabs button[aria-selected="true"] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
.chip.money { background: var(--ok-soft); color: var(--ok); border-color: transparent; font-weight: 600; }
.chip.src { background: var(--accent-soft); color: var(--accent); border-color: transparent; font-weight: 600; }
.chip.flood { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.chip.work { background: var(--ok-soft); color: var(--ok); border-color: transparent; }
.pill.Site { background: var(--ok-soft); color: var(--ok); }
.pill.Permit { background: var(--mute-soft); color: var(--ink-2); }
.verify-step { display: grid; gap: 12px; justify-items: start; padding: 14px 16px; border-radius: 12px; background: var(--accent-soft); font-size: 14.5px; line-height: 1.5; }
.verify-step .devnote { margin: 0; }
.moratorium { padding: 10px 12px; border-radius: 10px; background: var(--warn-soft); color: var(--ink); font-size: 13.5px; line-height: 1.45; }
.moratorium a { white-space: nowrap; }
.page .moratorium { margin: -10px 0 22px; }
.nearby { display: grid; gap: 2px; margin-bottom: 18px; }
.nearby a { display: flex; justify-content: space-between; gap: 12px; padding: 8px 10px; border-radius: 8px; color: inherit; text-decoration: none; font-size: 14px; }
.nearby a:hover { background: var(--raised); }
.nearby .faint { flex: none; font-size: 12.5px; }

/* totals: what the current view adds up to */
.totals { padding: 14px 12px 22px; display: grid; gap: 10px; }
.tot-head { padding: 4px 4px 2px; }
.tot-num { font: 500 40px/1 var(--serif); letter-spacing: -.02em; }
.tot-sub { color: var(--ink-2); font-size: 14px; margin-top: 6px; }
.tot-line { padding: 0 4px; color: var(--ink-2); font-size: 13.5px; }
.tot-hint { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding: 10px 12px; border-radius: 10px; background: var(--warn-soft); color: var(--ink); font-size: 13.5px; }
.tot-hint button { border: 0; background: none; padding: 0; color: var(--accent); font: 600 13.5px var(--sans); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.tot-sec { margin-top: 10px; padding: 0 4px; font: 600 12px/1.3 var(--sans); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.tot-sec .faint { text-transform: none; letter-spacing: 0; font-weight: 400; }
.tot-p { margin: 0; padding: 0 4px; color: var(--ink-2); font-size: 13.5px; }
.bars { display: grid; gap: 7px; padding: 0 4px; }
.bar-row { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) auto; gap: 10px; align-items: center; font-size: 13.5px; }
.bar-row .k { color: var(--ink-2); line-height: 1.3; }
.bar-row .track { height: 8px; border-radius: 99px; background: var(--raised); border: 1px solid var(--line); overflow: hidden; }
.bar-row .track i { display: block; height: 100%; border-radius: 99px; background: var(--accent); }
.bar-row .v { font: 500 13px var(--mono); color: var(--ink); min-width: 56px; text-align: right; }
.tot-list { display: grid; }
.tot-row { display: flex; gap: 12px; align-items: baseline; justify-content: space-between; width: 100%; padding: 9px 6px; border: 0; border-bottom: 1px solid var(--line);
  background: none; color: inherit; font: inherit; font-size: 13.5px; text-align: left; cursor: pointer; border-radius: 0; }
.tot-row:hover { background: var(--raised); }
.tot-row.static { cursor: default; }
.tot-row.static:hover { background: none; }
.tot-row .t { min-width: 0; color: var(--ink); line-height: 1.35; }
.tot-row .v { flex: none; font: 500 13px var(--mono); }
.tot-note { margin: 10px 0 0; padding: 0 4px; color: var(--ink-3); font-size: 12.5px; line-height: 1.5; }
.list { overflow-y: auto; flex: 1; padding: 6px; overscroll-behavior: contain; }
.item { display: grid; grid-template-columns: 10px minmax(0, 1fr); gap: 12px; padding: 12px 12px; border-radius: 12px; cursor: pointer; text-align: left;
  background: none; border: 0; width: 100%; color: inherit; font: inherit; }
.item:hover, .item.active { background: var(--raised); }
:is(.item, .res) .bar { width: 4px; border-radius: 4px; background: currentColor; justify-self: center; height: 100%; min-height: 34px; }
:is(.item, .res) .t { font-weight: 600; font-size: 14.5px; line-height: 1.35; margin: 2px 0 6px; color: var(--ink); }
:is(.item, .res) .m { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; font-size: 12.5px; color: var(--ink-3); }
:is(.item, .res) .m .mono { color: var(--ink-2); }
.empty { padding: 28px 18px; text-align: center; color: var(--ink-3); }
.legend { position: absolute; z-index: 500; right: 16px; bottom: 26px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px;
  box-shadow: var(--shadow); padding: 10px 12px; display: grid; gap: 6px; font-size: 12.5px; color: var(--ink-2); }
.legend span { display: flex; align-items: center; gap: 8px; }
.legend i { width: 10px; height: 10px; border-radius: 50%; background: currentColor; border: 2px solid var(--surface); box-shadow: 0 0 0 1px currentColor; }
.drawer { position: absolute; z-index: 1100; top: 16px; right: 16px; bottom: 16px; width: 460px; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-lg); box-shadow: var(--shadow-lg); display: flex; flex-direction: column; transform: translateX(calc(100% + 32px));
  visibility: hidden; transition: transform .28s cubic-bezier(.2, .8, .2, 1), visibility 0s .28s; }
.drawer.open { transform: none; visibility: visible; transition: transform .28s cubic-bezier(.2, .8, .2, 1); }
.drawer .dhead { display: flex; align-items: center; gap: 8px; padding: 12px 12px 12px 20px; border-bottom: 1px solid var(--line); }
.drawer .body { overflow-y: auto; padding: 20px 22px 28px; overscroll-behavior: contain; }
.icon-btn { width: 36px; height: 36px; border-radius: 10px; border: 0; background: none; color: var(--ink-2); cursor: pointer; display: grid; place-items: center; }
.icon-btn:hover { background: var(--raised); color: var(--ink); }
@media (max-width: 860px) {
  /* phones: one scrolling page, the map on top and the filters and list under it, so a swipe anywhere scrolls */
  .explore { height: auto; overflow: visible; }
  #map { position: relative; inset: auto; height: 46vh; height: 46svh; min-height: 240px; }
  #map .leaflet-bottom { bottom: 16px; }  /* clear of the panel's rounded top */
  .panel { position: relative; top: auto; left: auto; bottom: auto; width: auto; margin-top: -16px; border-radius: 18px 18px 0 0; border: 0;
    border-top: 1px solid var(--line); overflow: visible; }
  .list { overflow: visible; flex: none; padding-bottom: max(12px, env(safe-area-inset-bottom)); }
  .panel .head { padding: 12px 12px 10px; gap: 10px; }
  .filters .seg { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 -12px; padding: 0 12px; }
  .filters .seg button { flex: none; }
  .filters .line { display: block; }
  .filters .line .row { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 -12px; padding: 0 12px; }
  .filters .line select { height: 30px; font-size: 13px; padding-right: 26px; flex: none; }
  .seg button, .filters .line select, .viewbar select { height: 36px; }  /* easier to hit with a thumb */
  .tabs button { height: 30px; }
  .drawer { position: fixed; inset: 0; width: auto; border-radius: 0; border: 0; }
  .drawer .dhead { padding-top: max(12px, env(safe-area-inset-top)); }
  .drawer .body { padding-bottom: max(28px, env(safe-area-inset-bottom)); }
  body.drawer-open { overflow: hidden; }
  .legend { display: none; }
}

/* ---------- item detail ---------- */
.detail .kind { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 13px; color: var(--ink-3); }
.detail h2 { font: 500 26px/1.18 var(--serif); letter-spacing: -.01em; margin: 10px 0 14px; }
.detail .status { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 18px; color: var(--ink-2); font-size: 14px; }
.detail .actions { display: flex; gap: 8px; flex-wrap: wrap; margin: 4px 0 22px; }
.facts-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; margin-bottom: 22px; }
.facts-grid > div { background: var(--surface); padding: 12px 14px; min-width: 0; }
.facts-grid dt { font-size: 12px; color: var(--ink-3); margin-bottom: 3px; }
.facts-grid dd { margin: 0; font-weight: 600; font-size: 14.5px; overflow-wrap: anywhere; }
.facts-grid .wide { grid-column: 1 / -1; }
.finding { margin: 0 0 22px; padding: 14px 16px; border-radius: 12px; background: var(--raised); border: 1px solid var(--line); }
.finding .label { font-size: 12px; color: var(--ink-3); margin-bottom: 6px; }
.finding p { margin: 0; font-family: var(--serif); font-size: 17px; line-height: 1.45; }
.sec-title { font: 600 12.5px/1 var(--sans); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); margin: 24px 0 12px; }
.timeline { list-style: none; padding: 0; margin: 0; display: grid; gap: 0; }
.timeline li { position: relative; padding: 0 0 16px 22px; }
.timeline li::before { content: ""; position: absolute; left: 4px; top: 7px; width: 9px; height: 9px; border-radius: 50%; background: var(--accent); }
.timeline li::after { content: ""; position: absolute; left: 8px; top: 18px; bottom: 0; width: 1px; background: var(--line-2); }
.timeline li:last-child::after { display: none; }
.timeline .when { font-size: 12.5px; color: var(--ink-3); }
.timeline .what { font-weight: 600; font-size: 14.5px; }
.timeline .motion { font-size: 13.5px; color: var(--ink-2); margin-top: 4px; }
.votes { display: flex; flex-wrap: wrap; gap: 6px; }
.docs { display: grid; gap: 6px; }
.docs a { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); text-decoration: none; color: var(--ink); font-size: 14px; }
.docs a:hover { background: var(--raised); }
.docs svg { color: var(--ink-3); flex: none; }

/* ---------- pages inside the app ---------- */
.page { padding: 40px 0 72px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 28px; }
.page-head h1 { font: 500 38px/1.05 var(--serif); letter-spacing: -.015em; }
.page-head p { margin: 8px 0 0; color: var(--ink-2); }

/* ---------- terms ---------- */
.terms { display: grid; gap: 30px; }
.terms .page-head { margin-bottom: 0; }
.terms h2 { font: 500 22px/1.25 var(--serif); letter-spacing: -.01em; margin: 0 0 10px; }
.terms p, .terms li { color: var(--ink-2); line-height: 1.65; max-width: 65ch; }
.terms p { margin: 0 0 10px; }
.terms ul { margin: 0; padding-left: 20px; display: grid; gap: 6px; }
.terms .short { background: var(--raised); }
.terms .short ul { margin-top: 12px; }
.terms .short li { color: var(--ink); }
.devnote-inline { padding: 1px 6px; border-radius: 6px; border: 1px dashed var(--line-2); font-size: .92em; }
.watch-card { display: grid; gap: 12px; padding: 22px 24px; text-decoration: none; color: inherit; transition: box-shadow .15s, transform .15s; }
.watch-card:hover { box-shadow: var(--shadow-lg); color: inherit; transform: translateY(-1px); }
.watch-card .q { font: 400 19px/1.4 var(--serif); }
.watch-card .q::before { content: "“"; } .watch-card .q::after { content: "”"; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
@media (max-width: 820px) { .grid-2 { grid-template-columns: 1fr; } }
.blank { padding: 48px 24px; text-align: center; }
.blank h3 { font: 500 24px/1.2 var(--serif); margin-bottom: 8px; }
.progress { height: 6px; border-radius: 6px; background: var(--mute-soft); overflow: hidden; }
.progress i { display: block; height: 100%; background: var(--accent); width: 0; transition: width .4s; }
.clauses { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; counter-reset: c; }
.clauses li { counter-increment: c; display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 10px; font-size: 14.5px; color: var(--ink-2); }
.clauses li::before { content: counter(c); width: 24px; height: 24px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; font: 600 12.5px/1 var(--sans); }
.compose { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; align-items: start; }
@media (max-width: 900px) { .compose { grid-template-columns: 1fr; } }
.mini-map { height: 420px; border-radius: var(--r-lg); overflow: hidden; border: 1px solid var(--line); position: relative; }
.map-caption { font-size: 13px; margin: 10px 2px 0; }

/* ---------- drawing an area (Map tab and new watch) ---------- */
.area-tool { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); padding: 6px; max-width: 270px; }
.area-tool .area-hint { font-size: 12.5px; color: var(--ink-2); padding: 4px 6px 8px; }
.area-tool .area-btns { display: flex; gap: 6px; flex-wrap: wrap; }
.area-tool .btn svg { margin-right: 2px; }
.leaflet-container.area-drawing, .leaflet-container.area-drawing .leaflet-interactive { cursor: crosshair; }
@media (max-width: 520px) {  /* phones: one compact row, so the control covers as little of a small map as possible */
  .area-tool { padding: 4px; }
  .area-tool .area-hint { display: none; }
  .area-tool .btn-sm { height: 30px; padding: 0 10px; font-size: 13px; }
}
.areabar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 8px 10px; border-radius: 10px; background: var(--accent-soft); font-size: 13.5px; color: var(--ink); }
.areabar svg { color: var(--accent); flex: none; }
.areabar span { flex: 1; min-width: 140px; }
.examples { display: flex; flex-wrap: wrap; gap: 8px; }
.examples button { border: 1px solid var(--line-2); background: var(--surface); color: var(--ink-2); border-radius: 16px; padding: 7px 12px; font: 500 13.5px/1.35 var(--sans);
  text-align: left; cursor: pointer; }
.examples button:hover { color: var(--ink); border-color: var(--ink-3); }
.understood { padding: 22px 24px; display: grid; gap: 14px; }
.understood .says { font: 400 18px/1.45 var(--serif); }
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 24px; align-items: start; }
/* top: auto too: Leaflet makes a static map position: relative, and the sticky offset would then push it down over the card below */
@media (max-width: 960px) { .split { grid-template-columns: minmax(0, 1fr); } .split > :last-child { order: -1; } .split .result-map { height: 320px; position: relative; top: auto; } }
.result-map { height: 520px; border-radius: var(--r-lg); overflow: hidden; border: 1px solid var(--line); position: sticky; top: 80px; }
.results { display: grid; gap: 10px; }
.results a.res { display: grid; grid-template-columns: 10px minmax(0, 1fr); gap: 12px; padding: 14px 16px; border-radius: 14px; background: var(--surface);
  border: 1px solid var(--line); text-decoration: none; color: inherit; }
.results a.res:hover { box-shadow: var(--shadow); color: inherit; }
.results .bar { width: 4px; border-radius: 4px; background: currentColor; justify-self: center; }

/* ---------- ask ---------- */
.ask-box { position: relative; }
.ask-box textarea { min-height: 64px; padding: 16px 130px 16px 18px; font-size: 17px; border-radius: 16px; box-shadow: var(--shadow); }
.ask-box .btn { position: absolute; right: 10px; bottom: 10px; }
@media (max-width: 520px) { .ask-box textarea { min-height: 120px; padding: 14px 16px 60px; } }  /* the button sits under the text, not beside it */
.answer { padding: 26px 28px; }
.answer .q { font: 500 22px/1.3 var(--serif); margin-bottom: 14px; }
.answer .text { font-size: 15.5px; line-height: 1.65; overflow-wrap: anywhere; }
.answer .text p { margin: 0 0 12px; }
.answer .text table { border-collapse: collapse; font-size: 14px; margin: 10px 0; display: block; overflow-x: auto; }
.answer .text th, .answer .text td { text-align: left; padding: 6px 12px 6px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.answer .text th { font-size: 12px; color: var(--ink-3); text-transform: uppercase; letter-spacing: .05em; }
.answer .text ul { margin: 0 0 12px; padding-left: 20px; }
.cite { font: 500 12.5px/1 var(--mono); padding: 2px 6px; border-radius: 6px; background: var(--accent-soft); color: var(--accent); text-decoration: none; white-space: nowrap; }
.cite:hover { background: var(--accent); color: var(--on-accent); }
.steps-live { display: grid; gap: 8px; font-size: 14px; color: var(--ink-2); }
.steps-live div { display: flex; gap: 10px; align-items: center; }
.steps-live div::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--ink-3); }
.steps-live div:last-child::before { background: var(--accent); animation: pulse 1s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .3; } }
.cited { display: grid; gap: 8px; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }

/* ---------- Leaflet polish ---------- */
/* isolate: Leaflet's controls sit at z-index 1000, which would otherwise slide over the sticky header as the page scrolls */
.leaflet-container { font: 400 13px/1.4 var(--sans); background: var(--paper); isolation: isolate; }
.map-hint { position: absolute; inset: 0; z-index: 1001; display: grid; place-items: center; padding: 24px; text-align: center; pointer-events: none;
  background: color-mix(in srgb, var(--ink) 55%, transparent); color: var(--paper); font: 600 16px/1.4 var(--sans); opacity: 0; transition: opacity .2s; }
.map-hint.show { opacity: 1; }
@media (max-width: 520px) { .leaflet-control-attribution { font-size: 10.5px; } }
.leaflet-control-zoom a { background: var(--surface) !important; color: var(--ink) !important; border-color: var(--line) !important; }
.leaflet-bar { border: 1px solid var(--line) !important; box-shadow: var(--shadow) !important; border-radius: 10px !important; overflow: hidden; }
.leaflet-control-attribution { background: color-mix(in srgb, var(--surface) 80%, transparent) !important; color: var(--ink-3) !important; }
.leaflet-control-attribution a { color: var(--ink-2) !important; }
.leaflet-tooltip.tip { background: var(--surface); color: var(--ink); border: 1px solid var(--line); box-shadow: var(--shadow); border-radius: 10px; padding: 8px 10px; font-size: 13px; width: max-content; max-width: 280px; white-space: normal; }
.leaflet-tooltip.tip::before { display: none; }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* the watch page: a long watch shouldn't fill a phone's first screen */
.page-head .watch-text { font-size: 30px; line-height: 1.25; margin-top: 8px; }
@media (max-width: 720px) { .page-head .watch-text { font-size: 20px; line-height: 1.35; } }
