/* Landbase: one stylesheet. Colours are tokens on :root, with their own dark steps (not an automatic flip).
   Gate colours come from export.FILL (set inline as --fill); score-part colours are a fixed categorical order. */
:root {
  color-scheme: light;
  --bg: #f5f6f4;
  --surface: #ffffff;
  --surface-2: #f0f2ef;
  --ink: #15191c;
  --ink-2: #454e53;
  --muted: #6a7277;
  --line: #e1e4e0;
  --line-strong: #cbd0cc;
  --accent: #2b6a4b;
  --accent-strong: #1f513a;
  --accent-soft: #e2efe7;
  --on-accent: #ffffff;
  --hover: #f3f7f4;
  --focus: #2a78d6;
  --up: #1d7a3a;
  --down: #b3372f;
  --new: #2a64b8;
  --flag-bg: #fbe3e0;
  --flag-ink: #7a1f18;
  --pill-ink: #1d2327;
  --pass-bg: #e8f2ec;
  --concern: #b4741c;
  /* score parts: land, path, infrastructure, market, attainability */
  --p1: #2a78d6; --p2: #eb6834; --p3: #1baf7a; --p4: #eda100; --p5: #e87ba4; --p6: #2c8f8a;
  --shadow: 0 1px 2px rgba(16, 24, 20, 0.06), 0 1px 1px rgba(16, 24, 20, 0.04);
  --radius: 10px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0e1110; --surface: #161a18; --surface-2: #1d2220; --ink: #ecefed; --ink-2: #c1c8c4; --muted: #8e9793;
    --line: #29302c; --line-strong: #3a423e; --accent: #62c08e; --accent-strong: #86d4aa; --accent-soft: #1b3326;
    --on-accent: #0b1a12; --hover: #1b2420; --focus: #5ea0ec; --up: #4cc275; --down: #f07a70; --new: #7fb0f0;
    --flag-bg: #3a1d1a; --flag-ink: #ffc9c2; --pass-bg: #1f3328; --concern: #e0a24a;
    --p1: #3987e5; --p2: #d95926; --p3: #199e70; --p4: #c98500; --p5: #d55181; --p6: #2a9d97;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0e1110; --surface: #161a18; --surface-2: #1d2220; --ink: #ecefed; --ink-2: #c1c8c4; --muted: #8e9793;
  --line: #29302c; --line-strong: #3a423e; --accent: #62c08e; --accent-strong: #86d4aa; --accent-soft: #1b3326;
  --on-accent: #0b1a12; --hover: #1b2420; --focus: #5ea0ec; --up: #4cc275; --down: #f07a70; --new: #7fb0f0;
  --flag-bg: #3a1d1a; --flag-ink: #ffc9c2; --pass-bg: #1f3328; --concern: #e0a24a;
  --p1: #3987e5; --p2: #d95926; --p3: #199e70; --p4: #c98500; --p5: #d55181; --p6: #2a9d97;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
}

/* ---------- base ---------- */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 14px/1.5 var(--font); color: var(--ink); background: var(--bg); }
a { color: var(--accent); text-underline-offset: 2px; }
a:hover { color: var(--accent-strong); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
h1 { font-size: 22px; line-height: 1.25; margin: 0 0 4px; letter-spacing: -0.01em; }
h2 { font-size: 15px; margin: 0 0 12px; }
h3 { font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); margin: 16px 0 6px; }
code, kbd { font: 12px ui-monospace, SFMono-Regular, Menlo, monospace; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.num { text-align: right; font-variant-numeric: tabular-nums; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 12px; top: 8px; z-index: 2000; background: var(--surface); padding: 6px 10px; }
.empty { color: var(--muted); padding: 24px 0; }
.empty-state { max-width: 560px; margin: 64px auto; text-align: center; color: var(--ink-2); }
[hidden] { display: none !important; }

/* ---------- header ---------- */
.top { display: flex; align-items: center; gap: 16px; padding: 0 20px; min-height: 52px; background: var(--surface);
       border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 1000; }
.brand { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: 16px; color: var(--ink); text-decoration: none; }
.brand svg { color: var(--accent); }
.market-menu > summary { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 8px; cursor: pointer;
                         background: var(--surface-2); color: var(--ink); font-size: 13px; white-space: nowrap; }
.market-menu > summary:hover, .market-menu[open] > summary { box-shadow: inset 0 0 0 1px var(--line-strong); }
.market-menu > summary b { font-weight: 600; max-width: 16em; overflow: hidden; text-overflow: ellipsis; }
.market-menu .nav-panel { left: 0; min-width: 240px; max-height: 70vh; overflow-y: auto; }
.market-search { width: 100%; margin: 0 0 6px; padding: 6px 9px; border: 1px solid var(--line-strong); border-radius: 6px;
                 background: var(--surface); color: var(--ink); font: inherit; }
.pages { display: flex; align-items: stretch; align-self: stretch; gap: 2px; }
.pages > a, .more-menu > summary { display: inline-flex; align-items: center; gap: 5px; padding: 0 10px; color: var(--ink-2);
       text-decoration: none; border-bottom: 2px solid transparent; white-space: nowrap; cursor: pointer; }
.pages > a.on, .more-menu > summary.on { color: var(--accent); border-bottom-color: var(--accent); font-weight: 600; }
.pages > a:hover, .more-menu > summary:hover { color: var(--ink); }
.more-menu { display: flex; align-self: stretch; margin-left: -14px; }   /* reads as the last page link */

/* header drop-down menus: More and the account menu */
.nav-menu { position: relative; margin: 0; }
.nav-menu > summary { list-style: none; user-select: none; }
.nav-menu > summary::-webkit-details-marker { display: none; }
.nav-menu[open] > summary svg { transform: rotate(180deg); }
.nav-panel { position: absolute; top: calc(100% + 6px); background: var(--surface); border: 1px solid var(--line);
              border-radius: var(--radius); box-shadow: 0 8px 24px rgba(16, 24, 20, 0.14); padding: 8px; z-index: 1001; }
.more-menu .nav-panel { left: 0; display: grid; grid-template-columns: repeat(3, minmax(120px, auto)); gap: 4px 12px; top: 100%; }
.nav-group { display: grid; align-content: start; }
.nav-head { margin: 4px 10px 4px; color: var(--muted); font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.nav-panel a, .nav-item { display: flex; align-items: center; gap: 8px; padding: 6px 10px; border-radius: 6px; color: var(--ink);
                            text-decoration: none; white-space: nowrap; font: inherit; background: none; border: 0; cursor: pointer; text-align: left; width: 100%; }
.nav-panel a:hover, .nav-item:hover { background: var(--surface-2); }
.nav-panel a.on { color: var(--accent); font-weight: 600; }
.top .who { margin-left: auto; }
.who > summary { cursor: pointer; border-radius: 50%; }
.who .nav-panel { right: 0; min-width: 220px; }
.who .nav-head { text-transform: none; letter-spacing: 0; font-size: 12px; font-weight: 400; margin-bottom: 8px; overflow: hidden; text-overflow: ellipsis; }
.who .nav-head b { color: var(--ink); font-weight: 600; }
.avatar { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--surface-2);
          border: 1px solid var(--line); color: var(--ink-2); font-weight: 600; font-size: 13px; }
.who > summary:hover .avatar, .who[open] .avatar { border-color: var(--accent); color: var(--accent); }
.signin { max-width: 420px; margin: 15vh auto; padding: 0 16px; }
.signin p { margin: 12px 0; }
.password-signin { display: grid; gap: 10px; margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--line); }
.password-signin label, .person-add label { display: grid; gap: 4px; font-size: 13px; color: var(--ink-2); }
.password-signin .btn { justify-self: start; }
.person-add { display: flex; flex-wrap: wrap; align-items: end; gap: 12px; }
.person-add label:has(input[type=checkbox]) { display: flex; align-items: center; gap: 6px; }
.person-edit { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.saved.problem { background: var(--surface-2); color: var(--ink); border-left: 3px solid var(--accent-strong); }
.new-password .password { font-size: 20px; letter-spacing: 1px; user-select: all; }
.page-people .card { margin-bottom: 16px; }
main { padding: 20px 24px 48px; max-width: 1480px; margin: 0 auto; }
.page-map main { max-width: none; }

/* ---------- common pieces ---------- */
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 14px; }
.meta { color: var(--muted); margin: 0; }
.head-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.btn { display: inline-flex; align-items: center; gap: 6px; font: inherit; font-weight: 600; padding: 7px 14px; border-radius: 8px;
       border: 1px solid var(--accent); background: var(--accent); color: var(--on-accent); text-decoration: none; cursor: pointer; white-space: nowrap; }
.btn:hover { background: var(--accent-strong); border-color: var(--accent-strong); color: var(--on-accent); }
.btn.ghost { background: var(--surface); color: var(--ink); border-color: var(--line-strong); font-weight: 500; }
.btn.ghost:hover { background: var(--surface-2); color: var(--ink); }
.btn.small { padding: 4px 10px; font-size: 13px; }
.card, .panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow); }
.chip { display: inline-flex; align-items: center; gap: 4px; padding: 4px 11px; border-radius: 999px; border: 1px solid var(--line-strong);
        background: var(--surface); color: var(--ink-2); text-decoration: none; font-size: 13px; white-space: nowrap; }
.chip:hover { border-color: var(--accent); color: var(--accent); }
.chip.on { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-strong); font-weight: 600; }

.pill { display: inline-flex; align-items: baseline; gap: 4px; padding: 1px 7px; border-radius: 5px; font-size: 11px; font-weight: 600;
        background: var(--fill, var(--pass-bg)); color: var(--pill-ink); white-space: nowrap; line-height: 1.6; }
.pill b { font-weight: 500; text-transform: capitalize; opacity: 0.75; }
.pill.gate-pass { color: var(--ink); }
.pills { display: inline-flex; flex-wrap: wrap; gap: 4px; }
.evidence-links { display: inline-flex; flex-wrap: wrap; gap: 2px 10px; font-size: .9em; }
.evidence-link { white-space: nowrap; }
.evidence-link .source { color: var(--muted, #666); white-space: normal; }
.more { font-size: 11px; color: var(--muted); align-self: center; }
.all-pass { font-size: 12px; color: var(--up); font-weight: 500; }

.status { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 11.5px; font-weight: 600; vertical-align: middle;
          background: var(--surface-2); color: var(--ink-2); white-space: nowrap; }
.status::first-letter { text-transform: uppercase; }
.status-shortlisted { background: var(--accent-soft); color: var(--accent-strong); }
.status-under-review { background: color-mix(in srgb, var(--p1) 16%, transparent); color: var(--new); }
.status-contacted { background: color-mix(in srgb, var(--p4) 22%, transparent); color: color-mix(in srgb, var(--p4) 45%, var(--ink)); }
.status-rejected, .status-dead { background: var(--surface-2); color: var(--muted); text-decoration: line-through; }

.delta { font-size: 12px; font-weight: 600; white-space: nowrap; font-variant-numeric: tabular-nums; }
.delta.up { color: var(--up); }
.delta.down { color: var(--down); }
.delta.new { color: var(--new); text-transform: uppercase; font-size: 10.5px; letter-spacing: 0.05em; border: 1px solid currentColor; border-radius: 4px; padding: 0 4px; }

.conf { display: inline-flex; align-items: center; gap: 2px; font-size: 12px; color: var(--ink-2); white-space: nowrap; text-transform: capitalize; }
.conf i { width: 4px; height: 10px; border-radius: 1px; background: var(--line-strong); }
.conf i:first-child { height: 6px; } .conf i:nth-child(2) { height: 8px; }
.conf-low i:nth-child(1), .conf-medium i:nth-child(-n+2), .conf-high i { background: var(--ink-2); }
.conf i:last-of-type { margin-right: 4px; }

/* ---------- the shortlist (/): a work queue, cards left and the map pinned right (Kai, 13 Oct 2026) ---------- */
.rule-line { margin: 6px 0 0; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; font-size: 13px; }
.rule-line .chip { padding: 2px 9px; font-size: 12.5px; }
.notice.warn { background: color-mix(in srgb, var(--concern) 14%, transparent); border-left: 3px solid var(--concern);
               padding: 8px 12px; border-radius: 6px; margin: 0 0 12px; }
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(340px, 42%); gap: 20px; align-items: start; }
.sl-top h1 { margin-bottom: 2px; }
.sl-how { margin: 6px 0 0; font-size: 13px; }
.sl-how > summary { cursor: pointer; color: var(--muted); width: max-content; }
.sl-how > summary:hover { color: var(--ink); }
.sl-how p { margin: 8px 0 0; max-width: 72ch; }
/* The queue: one panel, its lanes as tabs, the sites as aligned rows divided by hairlines */
.sl-queue { min-width: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.sl-tabs { display: flex; gap: 2px; padding: 0 10px; border-bottom: 1px solid var(--line); }
.sl-tabs a { padding: 11px 10px 9px; color: var(--ink-2); text-decoration: none; font-weight: 500; font-size: 13.5px;
             border-bottom: 2px solid transparent; margin-bottom: -1px; }
.sl-tabs a:hover { color: var(--ink); }
.sl-tabs a.on { color: var(--ink); border-bottom-color: var(--accent); font-weight: 600; }
.sl-tabs .n { color: var(--muted); font-weight: 500; font-variant-numeric: tabular-nums; margin-left: 2px; }
.sl-tabs a.none .n { opacity: .6; }
.sl-lane > .lane-head { font-size: 15px; margin: 14px 16px 2px; }
.sl-lane > p, .sl-lane > ul, .sl-lane > details { margin: 6px 16px 12px; }
.sl-lane > .empty { padding: 18px 0; }
.sl-sum, .sl-heads { display: grid; grid-template-columns: 22px 66px minmax(0, 1fr) 52px 74px 62px 38px; gap: 12px; align-items: center; }
.sl-heads { padding: 8px 16px 6px; font-size: 11.5px; color: var(--muted); border-bottom: 1px solid var(--line); }
.sl-row { border-bottom: 1px solid var(--line); scroll-margin-top: 64px; }
.sl-row > details > summary { list-style: none; cursor: pointer; padding: 10px 16px; color: var(--ink); font-weight: 400; }
.sl-row > details > summary::-webkit-details-marker { display: none; }
.sl-row > details > summary:hover { background: var(--hover); }
.sl-row.lit { background: var(--surface-2); box-shadow: inset 3px 0 0 var(--accent); }
.sl-row.lit > details > summary:hover { background: transparent; }
.sl-row.is-flagged { box-shadow: inset 3px 0 0 var(--down); }
.sl-score b { font-size: 18px; font-weight: 600; font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.sl-score .delta { margin-left: 4px; font-size: 11px; }
.sl-score .parts-bar { height: 4px; margin: 3px 0 0; gap: 1px; }
.sl-score .parts-bar .seg { border-radius: 1px; min-width: 2px; }
.sl-site { min-width: 0; display: flex; flex-direction: column; }
.sl-addr { display: flex; gap: 6px; align-items: center; min-width: 0; }
.sl-addr > b { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 9ch; }
.sl-addr .pills { display: inline-flex; gap: 4px; flex-shrink: 0; }
.sl-row > details[open] .sl-addr .pills { display: none; }      /* the open row lists them under its detail */
.sl-addr .pill { font-size: 10.5px; padding: 0 6px; }
.sl-addr .more { font-size: 10.5px; }
.sl-place { font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sl-fig { font-size: 13px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.sl-fig .nc { color: var(--muted); }
.sl-fig .band { font-size: 12px; }
.sl-grade b { font-size: 14px; }
/* The open row: what to know, then what to do */
.sl-body { padding: 0 16px 14px 50px; }
.sl-idline { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin: 0 0 10px; font-size: 12.5px; }
.sl-idline .id { font-weight: 600; }
.sl-idline .verdict-chip { font-size: 11px; padding: 1px 8px; }
.sl-detail { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 24px; }
.sl-kv { margin: 0; display: grid; gap: 6px; align-content: start; }
.sl-kv > div { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 2px 10px; font-size: 13px; }
.sl-kv dt { color: var(--muted); }
.sl-kv dd { margin: 0; min-width: 0; }
.sl-kv dd.sl-wide { grid-column: 1 / -1; }
.sl-kv small { display: block; font-size: 12px; line-height: 1.4; }
.sl-kv .sl-facts a { color: var(--ink); text-decoration: none; }
.sl-kv .sl-facts a:hover { color: var(--accent); text-decoration: underline; }
.sl-body .sl-caution { margin: 10px 0 0; }
.sl-checks { margin: 10px 0 0; }
.sl-next { margin: 12px 0 0; padding: 8px 12px; border-radius: 8px; background: var(--accent-soft); color: var(--ink); font-size: 13px; }
.sl-next b { color: var(--accent-strong); }
.sl-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 12px; }
.sl-actions form { margin: 0; }
.sl-actions details.pass { margin: 0; }
.sl-actions details.pass > summary { list-style: none; cursor: pointer; margin: 0; }
.sl-actions details.pass > summary::-webkit-details-marker { display: none; }
.sl-actions details.pass[open] { flex-basis: 100%; order: 3; }
.sl-links { margin-left: auto; display: flex; gap: 4px 14px; align-items: center; flex-wrap: wrap; font-size: 12.5px; }
.sl-links .evidence-links { display: inline-flex; gap: 10px; flex-wrap: wrap; }
.sl-links .directions { margin: 0; display: inline-flex; gap: 8px; align-items: center; }
.sl-links .directions > span:first-child { color: var(--muted); }
.sl-lane > .legend { margin: 10px 16px; }
.sl-changes > summary { cursor: pointer; font-size: 13px; }
.split-map.mapband { position: sticky; top: calc(var(--top-h, 0px) + 12px); margin: 0; }
.split-map .lbmap { height: calc(100vh - var(--top-h, 0px) - 24px); min-height: 420px; border-radius: 12px; border: 1px solid var(--line); overflow: hidden; }
.change-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin-top: 10px; }
.change-cols h3 { font-size: 13px; margin: 0 0 4px; }
.change-cols .why { flex-basis: 100%; font-size: 12px; color: var(--ink-2); }
.pass-form { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 8px; }
.pass-form label { display: flex; flex-direction: column; gap: 3px; font-size: 12.5px; }
.pass-form .note-field { grid-column: 1 / -1; }
.pass-form button { justify-self: start; }
.pass-form input, .pass-form select, .pass-form textarea { font: inherit; padding: 5px 8px; border: 1px solid var(--line-strong);
                                                           border-radius: 6px; background: var(--surface); color: var(--ink); }
/* The ten's numbers, the same on the cards, the map's pins and its legend; hollow: the sites missing checks */
.map-num.pin { width: 26px; height: 26px; font-size: 12px; border-color: #1f513a; background: #1f513a; color: #fff; }
.map-num.pin.static { width: 22px; height: 22px; font-size: 11px; }
.map-num.pin.hollow { background: #fff; color: #1f513a; box-shadow: inset 0 0 0 2px #fff, inset 0 0 0 3px #1f513a; }
.map-num.pin.lit { background: #ffd400; border-color: #15191c; color: #15191c; z-index: 2; }
.more-link { margin: 6px 0 0; }
.panel h2 { margin-bottom: 8px; }
ul.mini, ul.plain { list-style: none; padding: 0; margin: 0 0 10px; }
ul.mini li { display: flex; gap: 6px; align-items: baseline; padding: 5px 0; border-bottom: 1px solid var(--line); font-size: 13px; flex-wrap: wrap; }
ul.mini li:last-child { border-bottom: 0; }
ul.mini li a { font-weight: 600; }
ul.mini li .muted { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
ul.mini li .num { margin-left: auto; font-weight: 600; }
ul.mini.team li .by { flex: 0 0 auto; margin-left: auto; }
ul.mini.team li .sl-where { flex-basis: 100%; order: 3; }
ul.plain li { padding: 4px 0; }

/* ---------- list ---------- */
.views { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
/* The filter bar: every control the same height, its label inside it; More filters opens a drawer under the bar */
.filters { position: relative; margin-bottom: 10px; z-index: 600; }
.filters .bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 8px; background: var(--surface);
                border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); }
.filters .field, .filters .toggle span, .filters .search input {
  display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 10px; border: 1px solid var(--line-strong);
  border-radius: 8px; background: var(--surface); color: var(--ink); font-size: 13.5px; }
.filters .field:hover, .filters .toggle span:hover { border-color: var(--muted); }
.filters .field:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.field-label { color: var(--muted); font-size: 12.5px; font-weight: 500; white-space: nowrap; }
.filters .field select, .filters .field input { font: inherit; font-weight: 500; color: var(--ink); background: transparent; border: 0; padding: 0;
  outline: none; min-width: 0; }
.filters .field select { appearance: none; -webkit-appearance: none; padding-right: 16px; cursor: pointer;
  background: no-repeat right center / 10px url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%236a7277' stroke-width='1.6'/%3E%3C/svg%3E"); }
.filters .field select option { color: #15191c; }
.filters .range input { width: 4.2em; text-align: right; font-variant-numeric: tabular-nums; }
.filters .range .to { color: var(--muted); font-size: 12.5px; }
.filters input::placeholder { color: var(--muted); font-weight: 400; }
.filters .search { position: relative; display: inline-flex; align-items: center; flex: 1 1 260px; max-width: 340px; }
.filters .search svg { position: absolute; left: 11px; color: var(--muted); pointer-events: none; }
.filters .search input { width: 100%; padding-left: 34px; padding-right: 30px; font: inherit; font-size: 13.5px; }
.filters .search input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.filters .search kbd { position: absolute; right: 9px; color: var(--muted); border: 1px solid var(--line-strong); border-radius: 4px; padding: 0 5px; font-size: 11px; }
.filters .toggle { position: relative; cursor: pointer; }
.filters .toggle input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.filters .toggle span { font-weight: 500; }
.filters .toggle span::before { content: ""; width: 14px; height: 14px; border-radius: 4px; border: 1.5px solid var(--line-strong); }
.filters .toggle input:checked + span { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-strong); }
.filters .toggle input:checked + span::before { border-color: var(--accent); background: var(--accent) no-repeat center / 10px
  url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 8'%3E%3Cpath d='M1 4l3 3 5-6' fill='none' stroke='white' stroke-width='1.8'/%3E%3C/svg%3E"); }
.filters .toggle input:focus-visible + span { outline: 2px solid var(--focus); outline-offset: 2px; }
.filters summary { list-style: none; cursor: pointer; }
.filters summary::-webkit-details-marker { display: none; }
.filters summary.field::after { content: ""; width: 10px; height: 6px; margin-left: 2px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%236a7277' stroke-width='1.6'/%3E%3C/svg%3E"); }
.filters details[open] > summary.field { border-color: var(--accent); }
.filters summary b { font-weight: 600; max-width: 18em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.more-filters { margin-left: auto; }
.more-btn svg { color: var(--ink-2); }
.more-btn .count { display: inline-grid; place-items: center; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 999px;
                   background: var(--accent); color: var(--on-accent); font-size: 11.5px; font-weight: 700; }
.bar-apply { height: 36px; }
/* The View menu: the quick views grouped, each with what it hides */
.views-menu { position: relative; }
.menu-panel { position: absolute; top: calc(100% + 6px); left: 0; width: min(760px, calc(100vw - 48px)); max-height: 70vh; overflow: auto;
              background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 12px 32px rgba(16,24,20,.18);
              padding: 8px; columns: 2 300px; column-gap: 8px; }
.menu-group { break-inside: avoid; padding: 4px 0 8px; }
.menu-group h3 { margin: 6px 10px 4px; font-size: 12px; font-weight: 600; color: var(--muted); text-transform: none; letter-spacing: 0; }
.menu-item { display: block; padding: 6px 10px; border-radius: 8px; color: var(--ink); text-decoration: none; break-inside: avoid; }
.menu-item b { display: block; font-size: 13.5px; font-weight: 600; }
.menu-item span { display: block; font-size: 12px; color: var(--muted); line-height: 1.35; }
.menu-item:hover { background: var(--hover); }
.menu-item.on { background: var(--accent-soft); }
.menu-item.on b { color: var(--accent-strong); }
/* More filters: four groups side by side, applied together */
.drawer { position: absolute; left: 0; right: 0; top: calc(100% + 6px); background: var(--surface); border: 1px solid var(--line);
          border-radius: 12px; box-shadow: 0 12px 32px rgba(16,24,20,.18); padding: 16px 18px; max-height: 75vh; overflow: auto;
          display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) minmax(0, 1.3fr); gap: 4px 24px; }
.drawer fieldset { border: 0; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.drawer legend { font-weight: 600; font-size: 13.5px; color: var(--ink); padding: 0; margin-bottom: 8px; }
.drawer .field { width: 100%; justify-content: space-between; }
.drawer .field select { flex: 1; text-align: right; text-align-last: right; }
.drawer .field > input { width: 6em; text-align: right; }
.drawer .check { display: grid; grid-template-columns: auto 1fr; column-gap: 8px; font-size: 13.5px; cursor: pointer; padding: 4px 0; }
.drawer .check input { accent-color: var(--accent); margin: 2px 0 0; }
.drawer .check em { grid-column: 2; font-style: normal; font-size: 12px; color: var(--muted); }
.drawer .presets { margin: 0 0 4px; }
.drawer .slider { font-size: 12.5px; }
.drawer .ranking .flags { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 13px; align-items: center; }
.drawer .ranking .flags .field-label { flex-basis: 100%; }
.drawer .ranking .flags label { display: inline-flex; gap: 5px; align-items: center; cursor: pointer; }
.drawer .ranking .flags input { accent-color: var(--accent); }
.drawer .note { font-size: 12px; color: var(--muted); margin: 2px 0 0; }
.drawer-foot { grid-column: 1 / -1; display: flex; gap: 8px; padding-top: 14px; margin-top: 6px; border-top: 1px solid var(--line); }
.active { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 10px; }
.chip.removable { background: var(--accent-soft); border-color: transparent; color: var(--accent-strong); }
.chip.removable:hover { border-color: var(--accent); }
.active .clear { font-size: 13px; margin-left: 4px; }

.scroll { overflow: auto; max-height: calc(100vh - 250px); min-height: 240px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
table.list { border-collapse: separate; border-spacing: 0; font-size: 13px; width: 100%; }
table.list th, table.list td { padding: 7px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; max-width: 280px; overflow: hidden;
                              text-overflow: ellipsis; background: var(--surface); text-align: left; }
table.list thead th { position: sticky; top: 0; z-index: 2; background: var(--surface-2); font-weight: 600; font-size: 12px; color: var(--ink-2); }
table.list thead th a { color: inherit; text-decoration: none; }
table.list thead th a:hover { color: var(--accent); }
table.list thead th.on, table.list thead th.on a { color: var(--accent); }
table.list th.col-score, table.list th.col-rank, table.list th.col-acres, table.list th.col-change { text-align: right; }
.arrow { margin-left: 4px; font-size: 10px; }
/* Rank and Site stay in view while scrolling sideways, like a spreadsheet's frozen panes */
table.list th:nth-child(1), table.list td:nth-child(1) { position: sticky; left: 0; z-index: 1; width: 56px; min-width: 56px; }
table.list th:nth-child(2), table.list td:nth-child(2) { position: sticky; left: 56px; z-index: 1; min-width: 92px; border-right: 1px solid var(--line); }
table.list thead th:nth-child(1), table.list thead th:nth-child(2) { z-index: 3; }
table.list tbody tr { cursor: pointer; }
table.list tbody tr:hover td:not(.gate) { background: var(--hover); }
table.list tr.flagged td.rank { box-shadow: inset 3px 0 0 var(--down); }
table.list td.rank { color: var(--muted); }
table.list td.site a { font-weight: 600; text-decoration: none; }
table.list td.score b { font-size: 14px; }
table.list td.gates-cell { max-width: 420px; white-space: normal; }
td.gate { font-size: 11px; font-weight: 600; color: var(--pill-ink); }
/* The list's two tabs (list.html) */
.list-tabs { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 6px; margin: 6px 2px 12px; border-bottom: 1px solid var(--line); }
.list-tabs .tab { padding: 8px 12px; margin-bottom: -1px; border-bottom: 2px solid transparent; color: var(--ink-2); font-weight: 600;
                  font-size: 14px; text-decoration: none; }
.list-tabs .tab:hover { color: var(--accent); }
.list-tabs .tab.on { color: var(--accent-strong); border-bottom-color: var(--accent); }
.list-tabs .tab .n { margin-left: 4px; font-size: 12px; font-weight: 500; color: var(--muted); font-variant-numeric: tabular-nums; }
.cols-toggle { font-size: 13px; white-space: nowrap; }
table.list .nc { color: var(--muted); font-size: 12px; }
/* The score in the map's own colours: the same ramp as the dots, grey when flagged */
td.score { white-space: nowrap; }
.score-chip { display: inline-block; min-width: 40px; padding: 2px 7px; border-radius: 6px; text-align: center; font-weight: 700;
              font-size: 14px; font-variant-numeric: tabular-nums; }
.score-chip.s0 { background: #d9d0f7; color: #2e2470; } .score-chip.s1 { background: #b3a1ef; color: #241c5c; }
.score-chip.s2 { background: #8c73e4; color: #fff; } .score-chip.s3 { background: #6b4fd8; color: #fff; }
.score-chip.s4 { background: #4a3aa7; color: #fff; } .score-chip.s5 { background: #2e2470; color: #fff; }
.score-chip.sf { background: #9a9892; color: #fff; }
td.score .sub { display: flex; justify-content: flex-end; align-items: center; gap: 6px; margin-top: 3px; font-size: 11px; min-height: 12px; }
.conf-mini { display: inline-flex; align-items: flex-end; gap: 1.5px; height: 10px; }
.conf-mini i { width: 3px; border-radius: 1px; background: var(--line-strong); }
.conf-mini i:nth-child(1) { height: 5px; } .conf-mini i:nth-child(2) { height: 7.5px; } .conf-mini i:nth-child(3) { height: 10px; }
.conf-mini.conf-low i:nth-child(1), .conf-mini.conf-medium i:nth-child(-n+2), .conf-mini.conf-high i { background: var(--ink-2); }
td.gates-cell .all-pass, .pills .pill { white-space: nowrap; }
td.sell { white-space: nowrap; }
.band { font-size: 12.5px; text-transform: capitalize; color: var(--muted); }
.band-high { color: var(--accent-strong); font-weight: 650; } .band-medium { color: var(--ink-2); font-weight: 500; }
.tag { display: inline-block; margin-left: 6px; font-size: 11px; font-weight: 600; padding: 1px 7px; border-radius: 999px;
       background: var(--surface-2); color: var(--ink-2); text-transform: capitalize; }
.tag.forsale { background: var(--accent); color: var(--on-accent); }
.scroll.wide { max-height: 80vh; }
/* ---------- the full list (/list): the list left, the map pinned right (Kai, 27 Oct 2026) ---------- */
.page-list main { max-width: none; }
.list-head { align-items: center; gap: 12px 28px; margin-bottom: 12px; }
.list-title h1 { margin: 0; line-height: 1.2; }
.list-title .meta { font-size: 13px; }
.list-head .list-tabs { margin: 0 auto 0 0; border-bottom: 0; }
.list-head .head-actions { margin-left: auto; }
/* the bar sits on the page, not in a card; the Area names are long, so its box is capped */
.page-list .filters .bar { padding: 0; background: none; border: 0; box-shadow: none; }
@media (min-width: 761px) {
  .page-list .filters .field select { max-width: 9.5em; text-overflow: ellipsis; }
  .page-list .filters .field select[name=area] { max-width: 12em; }
  .page-list .filters .search { max-width: 280px; }
}
.page-list .active { margin: 0 0 10px; }
.list-split { grid-template-columns: minmax(0, 1fr) minmax(340px, 38%); margin-top: 6px; }
.list-pane { min-width: 0; }
.pane-head { display: flex; align-items: center; justify-content: space-between; gap: 8px 16px; flex-wrap: wrap; margin: 0 0 8px; }
.pane-head .showing { margin: 0; font-size: 13px; color: var(--muted); }
.pane-head .showing b { color: var(--ink); font-variant-numeric: tabular-nums; }
.sort-menu { position: relative; }
.sort-menu summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 10px;
                     border: 1px solid var(--line-strong); border-radius: 8px; background: var(--surface); font-size: 13px; }
.sort-menu summary:hover, .sort-menu[open] summary { border-color: var(--accent); }
.sort-menu summary b { font-weight: 600; }
.sort-menu summary::after { content: ""; width: 10px; height: 6px; margin-left: 2px; background: no-repeat center / 10px url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%236a7277' stroke-width='1.6'/%3E%3C/svg%3E"); }
.sort-menu summary::-webkit-details-marker { display: none; }
.sort-menu .menu-panel { left: auto; right: 0; width: 240px; columns: auto; z-index: 700; }
.sites-table { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); overflow: clip; }
/* one row per site: the Site cell stacks the address, where it is, and its money, gates and team */
table.list.stack { font-size: 13.5px; }
table.list.stack td { position: static; max-width: none; padding: 10px 12px; vertical-align: top; white-space: normal; overflow: visible; }
table.list.stack td:nth-child(2) { border-right: 0; }
table.list.stack td.num { text-align: right; font-variant-numeric: tabular-nums; }
table.list.stack td.rank { width: 1%; padding-right: 4px; color: var(--muted); }
table.list.stack td.site { width: 100%; max-width: 0; }
table.list.stack td.acres { width: 1%; white-space: nowrap; }
table.list.stack td.acres small { color: var(--muted); }
table.list.stack td.ask { width: 1%; white-space: nowrap; }
table.list.stack td.sell { width: 1%; white-space: nowrap; }
table.list.stack td.score { width: 1%; }
table.list.stack td .sub { display: flex; justify-content: flex-end; align-items: center; gap: 6px; margin-top: 4px; font-size: 11.5px; color: var(--muted); }
table.list.stack td.sell .sub { justify-content: flex-start; }
table.list.stack .tag { margin-left: 0; }
td.site .addr { display: block; font-weight: 600; font-size: 14px; color: var(--ink); text-decoration: none; overflow: hidden;
                text-overflow: ellipsis; white-space: nowrap; }
td.site .addr:hover { color: var(--accent); }
td.site .addr.none { color: var(--muted); font-weight: 500; }
td.site .where, td.site .facts { display: flex; align-items: center; gap: 2px 10px; flex-wrap: wrap; margin-top: 3px; font-size: 12.5px; min-width: 0; }
td.site .where { color: var(--muted); }
td.site .where input.pick { margin: 0 -4px 0 0; }
td.site .where .sid { color: var(--ink-2); font-variant-numeric: tabular-nums; }
td.site .where .place, td.site .where .county { max-width: 16em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
td.site .where .area { color: var(--ink-2); text-decoration: none; }
td.site .where .area:hover { color: var(--accent); text-decoration: underline; }
td.site .kind { font-size: 11px; color: var(--ink-2); border: 1px solid var(--line-strong); border-radius: 4px; padding: 0 5px; }
td.site .ev { font-size: 12px; opacity: .75; }
td.site .ev .evidence-links { gap: 2px 8px; }
tr:hover td.site .ev { opacity: 1; }
td.site .facts { color: var(--ink-2); }
td.site .facts .rent small.rent-share { margin-left: 4px; color: var(--muted); }
td.site .facts .econ b { color: var(--ink); }
td.site .facts .gates-cell .all-pass { color: var(--muted); }
td.site .facts .team:empty { display: none; }
table.list.stack tbody tr:last-child td { border-bottom: 0; }
table.list.stack tbody tr.lit td { background: var(--accent-soft); }
table.list.stack tbody tr.lit td.rank { box-shadow: inset 3px 0 0 var(--accent); }
.list-pane .pager { justify-content: flex-start; font-variant-numeric: tabular-nums; }
.list-pane .pager .cols-toggle { margin-left: auto; }
.page-list .scroll.wide + .pickbar + .pager .cols-toggle { margin-left: auto; }
/* the map hidden: the list takes the width, the Show map button stays at the top right */
@media (min-width: 1101px) {
  .list-split:has(> .mapband.closed) { grid-template-columns: minmax(0, 1fr) auto; }
  .list-split > .mapband.closed { position: sticky; border: 0; padding: 0; }
  .list-split > .mapband.closed .map-toggle { position: static; box-shadow: var(--shadow); }
}
.legend { color: var(--muted); font-size: 12px; margin: 10px 0 0; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.legend .pill b { display: none; }
.pager { display: flex; gap: 8px; align-items: center; padding: 14px 0; color: var(--muted); }
.pager span { padding: 0 6px; }

/* ---------- compare picks, board, compare ---------- */
input.pick { margin: 0 6px 0 0; vertical-align: -2px; accent-color: var(--accent); }
.pickbar { position: sticky; bottom: 12px; z-index: 20; display: flex; gap: 10px; align-items: center; width: max-content; margin: 10px auto 0;
           background: var(--surface); border: 1px solid var(--line-strong); border-radius: 999px; padding: 6px 8px 6px 16px; box-shadow: 0 4px 16px rgba(0,0,0,.18); }
.add-site { display: flex; gap: 6px; }
.add-site input { font: inherit; padding: 6px 9px; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--surface); color: var(--ink); width: 230px; }
.cmp-map { height: 320px; border-radius: var(--radius); overflow: hidden; margin-bottom: 14px; border: 1px solid var(--line); }
.cmp-scroll { max-height: none; }
table.compare { border-collapse: separate; border-spacing: 0; width: 100%; font-size: 13px; }
table.compare th, table.compare td { padding: 7px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; min-width: 190px; }
table.compare tbody th { color: var(--ink-2); font-weight: 500; min-width: 150px; position: sticky; left: 0; background: var(--surface); }
table.compare thead th { background: var(--surface-2); position: sticky; top: 0; }
table.compare tr.big td { font-size: 22px; }
table.compare td.best b { color: var(--accent); }
table.compare tr.sep th, table.compare tr.sep td { border-top: 2px solid var(--line-strong); }
.meter-inline { display: inline-block; width: 70px; vertical-align: middle; margin-right: 6px; }
table.compare .verdict-reasons { margin: 4px 0 0; padding-left: 16px; color: var(--ink-2); }

/* ---------- weights ---------- */
.small-chip { padding: 1px 8px; font-size: 11.5px; }
.presets { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 10px 0 6px; }
.home-presets { margin: -4px 0 14px; }
.slider { display: grid; grid-template-columns: 1fr auto; gap: 2px 8px; font-size: 13px; }
.slider span { grid-column: 1 / 3; }
.slider em { font-style: normal; font-size: 11.5px; }
.slider input { accent-color: var(--accent); width: 100%; }
.slider output { font-variant-numeric: tabular-nums; font-weight: 600; min-width: 3.2em; text-align: right; }
.slider.off { opacity: .55; }
.inactive-note { color: var(--muted); margin: -2px 0 10px; }

/* ---------- map page ---------- */
.map-wrap { position: relative; }
/* The map above the list: the matching sites, collapsible (remembered in this browser) */
.mapband { position: relative; margin: 12px 0 0; }
.map-toggle { position: absolute; left: 50px; top: 10px; z-index: 6; font: inherit; font-size: 12.5px; font-weight: 600; padding: 6px 11px;
              border-radius: 8px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink); box-shadow: var(--shadow); cursor: pointer; }
.map-toggle:hover { background: var(--surface-2); }
.mapband.closed .map-wrap { display: none; }
.mapband.closed { border: 1px dashed var(--line-strong); border-radius: 12px; padding: 8px; }
.mapband.closed .map-toggle { position: static; box-shadow: none; }
.map-legend { position: absolute; left: 12px; bottom: 26px; z-index: 500; background: var(--surface); color: var(--ink-2); border: 1px solid var(--line);
              border-radius: 8px; padding: 8px 10px; font-size: 12px; box-shadow: var(--shadow); display: grid; gap: 6px; }
.map-legend .ramp { display: flex; align-items: center; gap: 6px; }
.map-legend .ramp i { width: 110px; height: 10px; border-radius: 3px; background: linear-gradient(90deg, #d9d0f7, #b3a1ef, #8c73e4, #6b4fd8, #4a3aa7, #2e2470); }
.map-legend .dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; vertical-align: -1px; margin-right: 4px; }
.map-legend .dot.flagged { background: #9a9892; }
.map-legend { bottom: 34px; }
.map-legend .picked-only { font-weight: 600; color: var(--ink); }

/* ---------- the map (MapLibre) and its layer panel ---------- */
.lbmap { position: relative; }
.map-note { position: absolute; left: 50%; top: 10px; transform: translateX(-50%); z-index: 4; background: var(--surface); color: var(--muted);
            border: 1px solid var(--line); border-radius: 8px; padding: 5px 10px; font-size: 12.5px; box-shadow: var(--shadow); pointer-events: none; }
.maplibregl-popup-content { font: 13px/1.45 var(--font); color: #15191c; padding: 10px 12px; max-height: 320px; overflow: auto; }
.maplibregl-popup-content hr { border: 0; border-top: 1px solid #e1e4e0; margin: 8px 0; }
.pop table { border-collapse: collapse; margin-top: 4px; font-size: 12px; }
.pop th { text-align: left; color: #6a7277; font-weight: 500; padding: 1px 8px 1px 0; vertical-align: top; text-transform: capitalize; }
.pop td { padding: 1px 0; word-break: break-word; }
.pop-src { color: #8e9793; font-size: 11px; margin-top: 4px; }
.pop-id { font-weight: 700; color: #2b6a4b; } .pop-rank { color: #6a7277; } .pop-flag { color: #b3372f; font-weight: 600; }
.layer-panel { position: absolute; top: 10px; right: 10px; z-index: 5; max-width: min(300px, calc(100% - 70px)); font-size: 12.5px; }
.layer-toggle { display: block; margin-left: auto; font: inherit; font-weight: 600; padding: 7px 12px; border-radius: 8px; border: 1px solid var(--line-strong);
                background: var(--surface); color: var(--ink); box-shadow: var(--shadow); cursor: pointer; }
.layer-toggle::before { content: "▦ "; color: var(--accent); }
.layer-body { margin-top: 6px; background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 4px 16px rgba(0,0,0,.15);
              padding: 6px 10px 10px; max-height: min(70vh, 560px); overflow: auto; }
.layer-body fieldset { border: 0; margin: 0; padding: 6px 0 2px; border-bottom: 1px solid var(--line); }
.layer-body fieldset:last-child { border-bottom: 0; }
.layer-body legend { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding: 4px 0 2px; }
.layer-body label { display: flex; align-items: center; gap: 7px; padding: 3px 0; cursor: pointer; line-height: 1.3; }
.layer-body label em { font-style: normal; color: var(--muted); font-size: 11px; }
.layer-body .sw { flex: 0 0 auto; width: 14px; height: 10px; border-radius: 2px; background: color-mix(in srgb, var(--c) 35%, transparent); border: 2px solid var(--c); }
.layer-body .sw.raster { background: linear-gradient(135deg, #cfd6c4, #8a9a7a); border: 0; }
.layer-row.none { opacity: .55; cursor: default; }
.layer-row .zoomhint { display: none; margin-left: auto; }
.layer-row.far:not(.none) .zoomhint { display: inline; }
.demo-pick { padding: 2px 0 6px 21px; }
.demo-pick select { font: inherit; font-size: 12px; padding: 2px 4px; border: 1px solid var(--line-strong); border-radius: 6px; background: var(--surface); color: var(--ink); }
.demo-legend { display: grid; grid-template-columns: repeat(6, 1fr); gap: 2px; margin-top: 4px; font-size: 10px; color: var(--muted); line-height: 1.2; }
.demo-legend i { display: block; height: 8px; border-radius: 2px; margin-bottom: 2px; }
.map-num { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; border: 2px solid #e0452f; background: #fff; color: #b3372f;
           font: 700 11px/1 var(--font); cursor: pointer; padding: 0; box-shadow: 0 1px 3px rgba(0,0,0,.35); }
.map-num.counts { background: #e0452f; color: #fff; }
.map-num.static { display: inline-grid; width: 20px; height: 20px; cursor: default; box-shadow: none; vertical-align: middle; }
.map-tag { background: #fff; color: #5c2f10; border: 1px solid #8c4a1c; border-radius: 5px; padding: 1px 6px; font: 600 11px/1.5 var(--font); white-space: nowrap; box-shadow: 0 1px 3px rgba(0,0,0,.3); }

/* ---------- site page ---------- */
.crumbs { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin: 0 0 12px; }
.crumbs .step { display: flex; gap: 6px; flex-wrap: wrap; }
.site-head { display: flex; justify-content: space-between; gap: 24px; align-items: center; flex-wrap: wrap; background: var(--surface);
             border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--shadow); }
.site-head h1 { display: flex; gap: 10px; align-items: center; font-size: 26px; }
.site-head .addr { margin: 0 0 4px; font-size: 16px; font-weight: 500; }
.stats { display: flex; gap: 8px; margin: 0; flex-wrap: wrap; }
.stat { background: var(--surface-2); border-radius: 8px; padding: 8px 14px; min-width: 104px; }
.stat dt { font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.stat dd { margin: 2px 0 0; font-size: 18px; font-weight: 700; display: flex; gap: 6px; align-items: baseline; }
.stat dd small { font-size: 12px; font-weight: 400; color: var(--muted); }
.stat.hero { background: var(--accent-soft); }
.stat.hero dd { font-size: 30px; line-height: 1.1; color: var(--accent-strong); }
.flag { background: var(--flag-bg); color: var(--flag-ink); border-radius: 8px; padding: 10px 14px; margin: 12px 0 0; }
.card-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.card-head .links { display: flex; gap: 12px; font-size: 13px; }
#map { height: 480px; border-radius: 8px; overflow: hidden; }
.key { display: inline-block; width: 14px; height: 10px; vertical-align: middle; margin: 0 4px 0 8px; }
.key.outline { border: 3px solid #ffd400; }
.key.block { background: rgba(39, 224, 255, 0.35); border: 2px dashed #27e0ff; }
.key.sewer { height: 0; border-top: 3px dashed #8c4a1c; }
.key.water { height: 0; border-top: 3px dashed #1f8fd6; }
.note { color: var(--muted); font-size: 13px; margin: 8px 0 0; }

.parts-bar { display: flex; gap: 2px; height: 14px; margin: 4px 0 12px; }
.parts-bar .seg { border-radius: 3px; min-width: 4px; }
.p1 { background: var(--p1); } .p2 { background: var(--p2); } .p3 { background: var(--p3); } .p4 { background: var(--p4); } .p5 { background: var(--p5); } .p6 { background: var(--p6); }
.swatch { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 8px; vertical-align: -1px; }
.card table, .page-site main table { border-collapse: collapse; width: 100%; font-size: 13px; }
.card th, .card td, .page-site main th, .page-site main td { text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.card th, .page-site main th { font-weight: 500; color: var(--ink-2); white-space: nowrap; }
.card thead th, .page-site main thead th { color: var(--muted); font-size: 12px; }
.card td.num, .card th.num, .page-site main td.num, .page-site main th.num { text-align: right; }
.meter { display: block; height: 8px; border-radius: 4px; background: var(--surface-2); overflow: hidden; }
.meter i { display: block; height: 100%; border-radius: 4px; }
.card table.kv th { width: 38%; font-weight: 500; white-space: normal; }
.card table.kv td.num { width: 22%; }
.src { color: var(--muted); font-size: 11.5px; margin: 4px 0 10px; }
.card h3 { margin-top: 14px; }
table.cases tr.counts td { background: color-mix(in srgb, #e0452f 7%, transparent); }
.parcels { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; }
.parcel { border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; }
.parcel-head { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; margin-bottom: 6px; }
.parcel-head a { margin-left: auto; }
.history-list { margin: 6px 0 0; padding-left: 18px; font-size: 12.5px; }
.history-list time { color: var(--muted); }
details.all-fields summary { font-weight: 600; color: var(--ink); font-size: 15px; }
table.facts th { width: 40%; }
.table-scroll { overflow-x: auto; }
details { margin: 12px 0 0; }
summary { cursor: pointer; color: var(--accent); font-weight: 500; }
pre { white-space: pre-wrap; font-size: 12px; background: var(--surface-2); padding: 12px; border-radius: 8px; color: var(--ink-2); }
.spark { display: block; max-width: 100%; height: auto; overflow: visible; }
.spark polyline { fill: none; stroke: var(--p1); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.spark circle { fill: var(--p1); stroke: var(--surface); stroke-width: 1.5; }
.spark circle.last { stroke-width: 2; }

.team .mark-form { display: grid; gap: 10px; }
.team label { display: grid; gap: 4px; font-weight: 500; font-size: 13px; }
.team select, .team textarea { font: inherit; padding: 7px 9px; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--surface); color: var(--ink); }
.team select { max-width: 260px; }
.team textarea { resize: vertical; min-height: 70px; }
.team .btn { justify-self: start; }
.saved { background: var(--accent-soft); color: var(--accent-strong); padding: 6px 10px; border-radius: 6px; margin: 0 0 10px; font-weight: 600; }
.log { list-style: none; padding: 0; margin: 16px 0 0; border-top: 1px solid var(--line); }
.log li { padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.log .by { display: flex; gap: 8px; align-items: baseline; }
.log time { color: var(--muted); font-size: 12px; }
.note-text { margin: 4px 0 0; white-space: pre-wrap; }
/* what the utility says: the sewer answer someone recorded (seller_fact key sewer) */
.told { margin: 12px 0; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; }
.told h3 { margin: 0 0 6px; }
.told-form { display: grid; gap: 8px; }
.told-form fieldset { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 13px; }
.told-form legend { font-weight: 500; padding: 0; margin-bottom: 4px; }
.told-form > label { display: grid; gap: 4px; font-weight: 500; font-size: 13px; }
.told-form select, .told-form input[name=note], .told-form input[name=source_url], .told-form textarea { font: inherit; padding: 7px 9px; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--surface); color: var(--ink); max-width: 100%; }
.told-form .btn { justify-self: start; }

/* ---------- site page: verdict, factors, record; the map and team beside them ---------- */
.site-cols { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); grid-template-areas: "main aside"; gap: 16px;
             margin-top: 16px; align-items: start; }
.main-col { grid-area: main; display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.aside { grid-area: aside; position: sticky; top: 60px; align-self: start; max-height: calc(100vh - 72px); overflow: auto;
         display: flex; flex-direction: column; gap: 16px; }
.aside #map { height: min(480px, calc(100vh - 240px)); min-height: 280px; }
.verdict-top { display: flex; gap: 12px; align-items: flex-start; flex-wrap: wrap; }
.verdict-chip { display: inline-block; padding: 4px 12px; border-radius: 999px; font-weight: 700; font-size: 14px; white-space: nowrap;
                background: var(--fill, var(--pass-bg)); color: var(--pill-ink); }
.verdict-pass { color: var(--ink); }
.verdict-reasons { margin: 3px 0 0; padding-left: 18px; flex: 1 1 260px; }
.headline { font-size: 15.5px; line-height: 1.55; margin: 12px 0 4px; color: var(--ink); }
.verdict-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 0 24px; }
ul.lines { margin: 0; padding-left: 18px; }
ul.lines li { padding: 2px 0; }
.verdict-actions { margin: 14px 0 0; }
.couldnt ul { margin: 0 0 6px; padding-left: 18px; }
.couldnt li { padding: 2px 0; }
.couldnt .effect { color: var(--ink-2); }
.conf-item.missing { color: var(--down); }
.factor { scroll-margin-top: 64px; }
.part-name { font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.factor-status { margin: 0; color: var(--ink-2); }
.factor-pts { display: grid; gap: 6px; text-align: right; }
.factor-pts b { font-size: 24px; line-height: 1; }
.price-line { margin: 6px 0 0; font-size: 13.5px; color: var(--ink-2); }
.oz-line { margin: 6px 0 0; font-size: 13px; color: var(--muted); }
.cauv-line, .stale-line { margin: 6px 0 0; font-size: 13px; padding: 6px 9px; border-radius: 8px; background: var(--flag-bg); color: var(--flag-ink); }
.pass-fields { display: grid; grid-template-columns: minmax(0, 1fr); gap: 4px; min-width: 0; }
.pass-fields select { max-width: 100%; }
.pass-fields select { font: inherit; font-size: 12.5px; padding: 4px 6px; border: 1px solid var(--line-strong); border-radius: 6px; background: var(--surface); color: var(--ink); }
.pass-reason { font-weight: 600; }
.fact-tag { display: inline-block; font-size: 10.5px; color: var(--muted); border: 1px solid var(--line-strong); border-radius: 4px;
            padding: 0 4px; line-height: 1.5; vertical-align: 1px; }
.factor-body { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 0 24px; align-items: start; }
.factor-map { padding-top: 16px; }
/* site page tables: checks, the points ledger, the fit measurements. One look: a quiet header, the row's name in the
   first column, figures right-aligned in tabular digits, not-checked rows greyed and last */
.page-site table.checks th[scope="row"], .page-site table.ledger th[scope="row"], .page-site table.measures th[scope="row"] { color: var(--ink); white-space: normal; }
.page-site table.checks td:nth-child(2) { color: var(--ink-2); }
.page-site table.checks td:nth-child(2) a { color: inherit; text-decoration-color: var(--line-strong); text-underline-offset: 2px; }
.page-site table.checks td:nth-child(2) a:hover { color: var(--accent); }
.page-site table.checks .num, .page-site table.ledger .num, .page-site table.measures b { font-variant-numeric: tabular-nums; }
.page-site table.checks tr:not(.check-pass) th[scope="row"] { box-shadow: inset 3px 0 0 var(--fill, var(--concern)); }
.page-site table.checks tr.check-reject th[scope="row"] { --fill: var(--down); }
.page-site table.checks tr.check-unknown th[scope="row"], .page-site table.checks tr.check-missing th[scope="row"] { --fill: var(--line-strong); }
.pill.result { font-size: 11.5px; }
.page-site table.parts { max-width: 640px; }
.page-site table.parts td.bar-cell { width: 30%; vertical-align: middle; }
.page-site table.how td.small { white-space: normal; line-height: 1.45; }
.page-site table.ledger th:first-child, .page-site table.checks th:first-child, .page-site table.measures th:first-child { width: 28%; }
.page-site table.ledger td.num { white-space: nowrap; width: 64px; }
.page-site table.ledger td.pts { font-weight: 600; color: var(--ink); }
.page-site table.ledger tfoot th, .page-site table.ledger tfoot td { font-weight: 700; color: var(--ink); border-bottom: 0; border-top: 2px solid var(--line-strong); }
.page-site table.ledger tfoot td.small { font-weight: 400; }
.page-site table tr.nc th, .page-site table tr.nc td { color: var(--muted); }
.page-site table tr.nc th[scope="row"] { color: var(--muted); font-weight: 400; }
.page-site table.measures tr.group th { background: var(--surface-2); color: var(--ink-2); font-size: 12px; font-weight: 600; padding: 5px 8px; }
.page-site table.measures tbody + tbody tr.group th { border-top: 8px solid var(--surface); }
.sources { display: inline-flex; flex-wrap: wrap; gap: 2px 8px; }
.sources a { white-space: nowrap; }
.page-site table.summary { max-width: 520px; }
.page-site table.summary th { width: 30%; }

/* ---------- shared page pieces (AGENTS.md "Shared page pieces"; macros kv, src, not_checked, state in _macros.html) ----------
   table.data: any page's table of records, the site page's checks/ledger look for every page. Put it in a
   <div class="table-scroll"> so a wide table scrolls sideways on a phone instead of the page. Figures go in td.num;
   a row with nothing checked is tr.nc (grey); a muted cell or word is .nc */
table.data { border-collapse: collapse; width: 100%; font-size: 13px; }
table.data th, table.data td { text-align: left; padding: 7px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.data thead th { position: sticky; top: var(--top-h, 0); z-index: 1; background: var(--surface-2); color: var(--ink-2);
                      font-size: 12px; font-weight: 600; white-space: nowrap; border-bottom-color: var(--line-strong); }
table.data tbody th[scope="row"] { font-weight: 500; color: var(--ink); }
table.data td.num, table.data th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
table.data tbody tr:hover td, table.data tbody tr:hover th { background: var(--hover); }
table.data tr.nc td, table.data tr.nc th, table.data .nc { color: var(--muted); }
table.data tbody tr:last-child td, table.data tbody tr:last-child th { border-bottom: 0; }
.table-scroll > table.data thead th { top: 0; }
/* kv-grid: label and value pairs, two to a row on a wide screen, one on a phone */
.kv-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 28px; margin: 0; font-size: 13.5px; }
.kv-grid > div { display: grid; grid-template-columns: minmax(7em, 40%) minmax(0, 1fr); gap: 10px; padding: 6px 0;
                 border-bottom: 1px solid var(--line); }
.kv-grid dt { color: var(--ink-2); }
.kv-grid dd { margin: 0; color: var(--ink); overflow-wrap: anywhere; }
/* the state chip: lifecycle's .status pill in four tones */
.status.tone-ok { background: var(--accent-soft); color: var(--accent-strong); }
.status.tone-warn { background: color-mix(in srgb, var(--concern) 18%, transparent); color: color-mix(in srgb, var(--concern) 60%, var(--ink)); }
.status.tone-bad { background: var(--flag-bg); color: var(--flag-ink); }
.status.tone-muted { background: var(--surface-2); color: var(--muted); font-weight: 500; }
/* details.tuck: a form or long detail folded away, its summary a ghost button (.drawer is the filter bar's panel) */
details.tuck > summary { display: inline-flex; align-items: center; gap: 6px; list-style: none; padding: 6px 12px; border-radius: 8px;
                         border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink); font-weight: 500; }
details.tuck > summary::-webkit-details-marker { display: none; }
details.tuck > summary::after { content: "▾"; font-size: 11px; color: var(--muted); }
details.tuck > summary:hover { background: var(--surface-2); }
details.tuck[open] > summary { margin-bottom: 12px; }
details.tuck[open] > summary::after { content: "▴"; }
@media (max-width: 760px) {
  .kv-grid { grid-template-columns: minmax(0, 1fr); }
}

/* the fit's capacity, as the sum it is: block × density × usable shape = homes */
.equation { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: 12px 0 4px; }
.equation .term { display: grid; padding: 6px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.equation .term b { font-size: 17px; font-variant-numeric: tabular-nums; color: var(--ink); }
.equation .term small { font-size: 11.5px; color: var(--muted); }
.equation .term.result { background: var(--accent-soft); border-color: transparent; }
.equation .term.result b { color: var(--accent-strong); }
.equation .op { color: var(--muted); font-size: 16px; }
details.evidence { border-top: 1px solid var(--line); margin: 14px 0 0; padding-top: 10px; }
details.evidence > summary { list-style: none; font-weight: 600; }
details.evidence > summary::-webkit-details-marker { display: none; }
details.evidence > summary::before { content: "▸ "; color: var(--muted); }
details.evidence[open] > summary::before { content: "▾ "; }
.record details.evidence:first-of-type { border-top: 0; padding-top: 0; }
.evidence-pair { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }

/* ---------- site page: the call sheet first, then the five questions as one ledger, research and record folded ----------
   Everything here is under .page-site so the shared cards, headings and stats on other pages keep their look. */
.page-site .site-cols { margin-top: 12px; }
.page-site main [id] { scroll-margin-top: 72px; }   /* a jump to a section lands below the sticky top bar */
.page-site .main-col { gap: 14px; }
.page-site h3 { text-transform: none; letter-spacing: 0; font-size: 13px; color: var(--ink-2); font-weight: 600; margin: 16px 0 6px; }
.page-site .part-name { text-transform: none; letter-spacing: 0; font-size: 12.5px; font-weight: 500; }

/* the call sheet: who, the verdict, four figures, the owner and the two things to do next */
.call { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); padding: 20px 24px 22px;
        scroll-margin-top: 64px; }
.call h1 { display: flex; gap: 10px; align-items: center; font-size: 15px; font-weight: 600; color: var(--muted); margin: 0; letter-spacing: 0; }
.call .addr { margin: 2px 0 0; font-size: 24px; font-weight: 700; letter-spacing: -0.015em; line-height: 1.2; }
.call .place { margin: 4px 0 0; color: var(--ink-2); display: flex; flex-wrap: wrap; gap: 4px 14px; align-items: baseline; }
.call .proof-line { font-size: 13px; }
/* Directions (links.directions): two buttons big enough to tap on a phone */
.directions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 8px 0 0; font-size: 13px; }
.directions > span { color: var(--ink-2); font-weight: 600; }
.directions .evidence-links { gap: 8px; font-size: 14px; }
.directions .evidence-link a { display: inline-flex; align-items: center; min-height: 36px; padding: 0 14px; border: 1px solid var(--line);
  border-radius: 999px; background: var(--surface); color: var(--ink); text-decoration: none; font-weight: 600; }
.directions .evidence-link a:hover { border-color: var(--accent); }
.verdict-band { --edge: var(--accent); margin: 18px 0 0; padding: 12px 16px 14px; border-left: 5px solid var(--edge); border-radius: 0 10px 10px 0;
                background: color-mix(in srgb, var(--fill, var(--pass-bg)) 75%, var(--surface)); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .verdict-band { background: color-mix(in srgb, var(--edge) 16%, var(--surface)); } }
:root[data-theme="dark"] .verdict-band { background: color-mix(in srgb, var(--edge) 16%, var(--surface)); }
.verdict-band.verdict-reject { --edge: var(--down); }
.verdict-band.verdict-markdown { --edge: var(--concern); }
.verdict-band.verdict-unknown { --edge: var(--line-strong); }
.verdict-label { margin: 0; font-size: 22px; font-weight: 700; letter-spacing: -0.01em; line-height: 1.25; color: var(--ink); }
.verdict-band .verdict-reasons { list-style: none; padding: 0; margin: 4px 0 0; font-size: 15px; font-weight: 500; color: var(--ink); }
.verdict-band .verdict-reasons li { padding: 1px 0; }
.verdict-band .headline { margin: 8px 0 0; font-size: 14px; color: var(--ink-2); max-width: 75ch; }
.call-figs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 18px 0 0; }
.call-figs > div { padding: 2px 16px; border-left: 1px solid var(--line); min-width: 0; }
.call-figs > div:first-child { border-left: 0; padding-left: 0; }
.call-figs dd { margin: 0; order: 1; font-size: 28px; font-weight: 700; line-height: 1.15; letter-spacing: -0.02em; font-variant-numeric: tabular-nums;
                display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.call-figs dd small { font-size: 15px; font-weight: 500; color: var(--muted); letter-spacing: 0; }
.call-figs dd .none { font-size: 16px; font-weight: 500; color: var(--muted); letter-spacing: 0; }
.call-figs dd .delta { font-size: 13px; letter-spacing: 0; }
.call-figs > div { display: flex; flex-direction: column; }
.call-figs dt { order: 2; font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.call-figs dt .from { white-space: nowrap; }
.call .price-line { margin: 10px 0 0; font-size: 13px; color: var(--muted); }

/* the owner, set like the address on an envelope: the off-market play is a letter to this name at this address */
.call .owner { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 6px 28px; align-items: start; margin: 18px 0 0;
               padding: 16px 18px; border-radius: 10px; background: var(--surface-2); }
.call .owner h2 { grid-column: 1 / -1; margin: 0; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.call .owner address { font-style: normal; display: grid; gap: 2px; font-size: 14px; color: var(--ink-2); letter-spacing: 0.01em; }
.call .owner address b { font-size: 16px; color: var(--ink); letter-spacing: 0; }
.owner-facts { list-style: none; margin: 0; padding: 0; display: grid; gap: 3px; font-size: 13.5px; color: var(--ink-2); }
.owner-facts b { color: var(--ink); font-weight: 600; }
.owner-actions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 0; }

/* before you call: the gates' own suggestions, as a short checklist */
.before { background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: 0 12px 12px 0; padding: 14px 20px; }
.before h2 { margin: 0 0 6px; font-size: 15px; }
.before ul { margin: 0; padding-left: 18px; }
.before li { padding: 3px 0; }
.before li a { margin-left: 4px; white-space: nowrap; }

/* the five questions: one surface, one row per question; a row opens in place */
.questions { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); overflow: hidden; }
.q-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 16px; padding: 16px 20px 12px; }
.q-head h2 { margin: 0; font-size: 17px; }
.q-score { margin: 0; color: var(--ink-2); font-size: 13.5px; flex: 1 1 auto; }
.q-score > b { color: var(--ink); font-size: 15px; }
.q-head [data-expand-all] { margin-left: auto; }
.page-site .questions .factor { margin: 0; padding: 0; border: 0; border-top: 1px solid var(--line); border-radius: 0; box-shadow: none; }
.factor-row { list-style: none; display: grid; grid-template-columns: 104px minmax(0, 1fr) 132px 16px; gap: 16px; align-items: center;
              padding: 14px 20px; color: var(--ink); font-weight: 400; }
.factor-row::-webkit-details-marker { display: none; }
.factor-row:hover { background: var(--hover); }
.factor-row::after { content: ""; width: 8px; height: 8px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted);
                     transform: rotate(-45deg); justify-self: center; transition: transform .15s ease; }
.factor[open] > .factor-row::after { transform: rotate(45deg); }
.factor[open] > .factor-row { background: var(--surface-2); }
.factor-q { display: grid; gap: 1px; min-width: 0; }
.factor-q .factor-qtext { font-size: 16px; font-weight: 700; line-height: 1.3; }
.factor-q .factor-status { font-size: 13.5px; color: var(--ink-2); }
.page-site .factor-pts { display: grid; gap: 6px; text-align: right; }
.page-site .factor-pts b { font-size: 20px; line-height: 1; }
.mark { justify-self: start; padding: 3px 9px; border-radius: 6px; font-size: 12px; font-weight: 600; line-height: 1.4; white-space: nowrap;
        background: var(--fill, var(--surface-2)); color: var(--pill-ink); }
.mark-pass { background: var(--pass-bg); color: var(--accent-strong); }
.mark-none { background: none; color: var(--muted); font-weight: 500; padding-left: 0; }
.factor-open { padding: 4px 20px 20px; border-top: 1px solid var(--line); }
.factor-open .told { background: var(--surface); }

/* folds inside a section: a quiet row with a caret, a one-line summary beside the name */
.page-site details.sub { margin: 0; border-top: 1px solid var(--line); }
.page-site details.sub > summary { list-style: none; color: var(--ink); font-weight: 400; padding: 11px 0; }
.page-site details.sub > summary::-webkit-details-marker { display: none; }
.page-site details.sub > summary::before { content: "▸"; display: inline-block; width: 16px; color: var(--muted); }
.page-site details.sub[open] > summary::before { content: "▾"; }
.page-site details.sub > summary b { font-weight: 600; }
.page-site details.sub[open] { padding-bottom: 12px; }
.factor-open details.sub { margin-top: 14px; }
.factor-open details.sub details.sub { margin-top: 8px; }
.questions > details.sub { padding-left: 20px; padding-right: 20px; }
.questions > details.couldnt ul { margin: 0 0 6px; padding-left: 18px; }
.couldnt li { padding: 2px 0; }
.couldnt .effect { color: var(--ink-2); }
details.ask-planning { margin: 6px 0 0; }
details.ask-planning .told-form { margin: 8px 0 12px; max-width: 520px; }

.page-site .research h2, .page-site .record h2 { margin: 0 0 6px; font-size: 15px; }
.page-site .research > details.sub:first-of-type { border-top: 0; }
.page-site .team h2 { margin-bottom: 10px; }
.page-site .team details.sub { margin-top: 14px; }
.page-site .team .log { margin-top: 0; }
.page-site .team .told-form { margin-top: 6px; }
.page-site .team .needs { margin: 0 0 12px; padding: 10px 12px; border-radius: 8px; background: var(--flag-bg); color: var(--flag-ink); }

@media (max-width: 1100px) {
  /* one column: the call sheet and questions first, the map after them, the team form last */
  .page-site .site-cols { grid-template-areas: "main" "map" "team"; }
}
@media (max-width: 760px) {
  .call { padding: 16px; }
  .call .addr { font-size: 20px; }
  .call-figs { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 14px; }
  .call-figs > div:nth-child(3) { border-left: 0; padding-left: 0; }
  .call-figs dd { font-size: 24px; }
  .call .owner { grid-template-columns: minmax(0, 1fr); padding: 14px; }
  .factor-row { grid-template-columns: minmax(0, 1fr) auto 12px; gap: 6px 12px; padding: 12px 16px; }
  .factor-row .mark { grid-column: 1 / -1; grid-row: 1; }
  .factor-row .factor-pts { min-width: 64px; }
  .factor-open { padding: 4px 16px 16px; }
  .q-head { padding: 14px 16px 10px; }
  .questions > details.sub { padding-left: 16px; padding-right: 16px; }
}
@media print {
  .page-site .owner-actions, .page-site .factor-row::after { display: none; }
  .factor-open { padding-left: 20px; }
}

/* ---------- smaller screens ---------- */
@media (max-width: 1100px) {
  .split, .list-split { grid-template-columns: minmax(0, 1fr); }
  .split-map.mapband { position: relative; top: 0; order: -1; }
  .split-map .lbmap { height: 360px; min-height: 0; }
  /* one column: the map follows the header, the team form comes last */
  .site-cols { grid-template-columns: minmax(0, 1fr); grid-template-areas: "map" "main" "team"; }
  .aside { display: contents; }
  .map-card { grid-area: map; }
  .aside .team { grid-area: team; }
  .aside #map { height: 380px; }
}
@media (max-width: 760px) {
  main { padding: 14px 16px 36px; }
  .top { flex-wrap: wrap; gap: 8px 12px; padding: 8px 16px 0; position: relative; }
  .top .who { order: 2; }
  .market-menu { order: 3; width: 100%; }
  .market-menu > summary { width: 100%; justify-content: space-between; padding: 7px 12px; }
  .market-menu .nav-panel { right: 0; }
  .pages { order: 4; width: 100%; min-height: 40px; justify-content: space-between; }
  .pages > a { padding: 0 6px; }
  .more-menu { order: 1; margin-left: auto; }
  .more-menu > summary { border-bottom: 0; }
  .top .who { margin-left: 0; }
  .more-menu .nav-panel { left: auto; right: -40px; grid-template-columns: 1fr 1fr; }
  h1 { font-size: 20px; }
  .filters .search { max-width: none; flex-basis: 100%; }
  .pass-form { grid-template-columns: minmax(0, 1fr); }
  .split-map .lbmap { height: 280px; }
  /* a phone: the site beside its score, then the four figures two by two under it */
  .sl-sum { grid-template-columns: 22px 60px minmax(0, 1fr) minmax(0, 1fr); gap: 6px 10px; align-items: start; }
  .sl-sum .sl-site { grid-column: 3 / -1; }
  .sl-sum .sl-fig { text-align: left; white-space: normal; }
  .sl-addr { flex-wrap: wrap; }
  .sl-addr > b { white-space: normal; }
  .sl-sum .sl-fig:nth-child(even) { grid-column: 2 / 4; }       /* the 4th and 6th children: homes, likely to sell */
  .sl-sum .sl-fig:nth-child(odd) { grid-column: 4 / 5; }
  .sl-heads { display: none; }
  .sl-tabs { overflow-x: auto; }
  .sl-tabs a { white-space: nowrap; padding-left: 8px; padding-right: 8px; }
  .sl-sum .sl-fig .sr { position: static; width: auto; height: auto; clip: auto; color: var(--muted); font-size: 11.5px; }
  .sl-body { padding-left: 16px; }
  .sl-detail { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .sl-links { margin-left: 0; flex-basis: 100%; }
  .filters select { flex: 1 1 45%; }
  .views { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; }
  .site-head { padding: 14px; }
  .stats { width: 100%; }
  .stat { flex: 1 1 40%; min-width: 0; }
  #map, .aside #map { height: 320px; }
  .filters .bar { padding: 6px; }
  .filters .field, .filters .toggle { flex: 1 1 auto; }
  .filters .field select { flex: 1; }
  .more-filters { margin-left: 0; flex: 1 1 100%; }
  .more-filters summary { justify-content: center; }
  .menu-panel { position: fixed; left: 12px; right: 12px; top: 72px; width: auto; columns: 1; }
  .drawer { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  /* the full list on a phone: rank, site and score on top, acres and the price or likely to sell under the site */
  .list-head .head-actions { margin-left: 0; }
  table.list.stack, table.list.stack tbody { display: block; }
  table.list.stack tr { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 6px 10px; padding: 12px;
                        border-bottom: 1px solid var(--line); }
  table.list.stack tbody tr:last-child { border-bottom: 0; }
  table.list.stack td { display: block; width: auto; max-width: none; min-width: 0; padding: 0; border: 0; text-align: left; }
  table.list.stack td.rank { grid-row: 1 / 3; width: auto; }
  table.list.stack td.site { grid-column: 2; grid-row: 1; width: auto; max-width: none; }
  table.list.stack td.score { grid-column: 3; grid-row: 1; width: auto; text-align: right; }
  table.list.stack td.acres { grid-column: 2; grid-row: 2; width: auto; }
  table.list.stack td.ask, table.list.stack td.sell { grid-column: 3; grid-row: 2; width: auto; text-align: right; }
  table.list.stack td .sub, table.list.stack td.sell .sub { justify-content: flex-end; }
  table.list.stack tr.flagged { box-shadow: inset 3px 0 0 var(--down); }
  table.list.stack tr.flagged td.rank { box-shadow: none; }
  td.site .ev { display: none; }
  /* The key-columns list becomes one card per site; "All columns" keeps the sideways-scrolling table */
  .scroll:not(.wide) { max-height: none; overflow: visible; border: 0; background: none; box-shadow: none; }
  .scroll:not(.wide) table.list, .scroll:not(.wide) tbody { display: block; }
  .scroll:not(.wide) thead { display: none; }
  .scroll:not(.wide) tr { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 2px 10px; background: var(--surface);
                           border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 12px; margin-bottom: 8px; }
  .scroll:not(.wide) td { position: static; display: block; border: 0; padding: 0; max-width: none; background: none; white-space: normal; text-align: left; }
  .scroll:not(.wide) td:empty { display: none; }
  .scroll:not(.wide) td.rank { grid-row: 1; grid-column: 1; width: auto; min-width: 0; }
  .scroll:not(.wide) td.site { grid-row: 1; grid-column: 2; border: 0; min-width: 0; }
  .scroll:not(.wide) td.score { grid-row: 1; grid-column: 3; text-align: right; }
  .scroll:not(.wide) td:not(.rank):not(.site):not(.score) { grid-column: 2 / 4; font-size: 12.5px; color: var(--ink-2); }
  .scroll:not(.wide) td[data-label="County"]::before, .scroll:not(.wide) td[data-label="Owner type"]::before,
  .scroll:not(.wide) td[data-label="Acres"]::before { content: attr(data-label) ": "; color: var(--muted); }
  .scroll:not(.wide) td[data-label="Acres"] { text-align: left; }
  .scroll:not(.wide) tr.flagged { border-left: 3px solid var(--down); }
  .scroll:not(.wide) tr.flagged td.rank { box-shadow: none; }
}

/* ---------- print: the site page as a fact sheet ---------- */
@media print {
  :root { color-scheme: light; }
  body { background: #fff; font-size: 12px; }
  .top, .crumbs .step, .team form, .skip, .layer-panel, .maplibregl-ctrl, .card-head .links, .show-on-map, [data-expand-all],
  .weights { display: none !important; }
  main { padding: 0; max-width: none; }
  .card, .site-head, .panel { box-shadow: none; }
  .site-head, .call, .couldnt { break-inside: avoid; }
  .site-cols { grid-template-columns: minmax(0, 1fr); grid-template-areas: "map" "main" "team"; }
  .aside { display: contents; position: static; max-height: none; overflow: visible; }
  .map-card { grid-area: map; } .aside .team { grid-area: team; }
  #map, .aside #map { height: 320px; }
  details.evidence > summary::before { content: ""; }
  a { color: inherit; text-decoration: none; }
}

/* ---------- settings page ---------- */
.settings-callout { max-width: 980px; margin: 0 0 16px; padding: 10px 14px; border-radius: 8px; border-left: 3px solid var(--new);
                    background: color-mix(in srgb, var(--new) 10%, var(--surface)); color: var(--ink); }
.settings-card { max-width: 980px; margin-bottom: 16px; scroll-margin-top: 64px; }
.settings-card h2 { font-size: 17px; margin-bottom: 4px; }
.settings-card > .note { margin: 0 0 12px; }
.settings-card form > .note { margin: 8px 0 0; }
.settings-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.card table.settings-table { width: auto; min-width: 100%; }
.card .settings-table th, .card .settings-table td { vertical-align: middle; }
.card .settings-table thead th { white-space: nowrap; }
.card .settings-table tbody th { color: var(--ink); min-width: 170px; }
.settings-table .what { display: block; font-weight: 400; color: var(--muted); font-size: 12px; white-space: normal; max-width: 280px; }
.settings-table tr.explain td { color: var(--ink-2); font-size: 12.5px; padding-top: 0; }
.settings-table tr:has(+ tr.explain) th, .settings-table tr:has(+ tr.explain) td { border-bottom: 0; }
.card .settings-table.history td { vertical-align: top; }
.settings-table td.when { white-space: nowrap; color: var(--ink-2); }
.unit-input { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.unit-input i { font-style: normal; color: var(--muted); font-size: 12px; }
.unit-input input { font: inherit; width: 76px; padding: 5px 7px; border: 1px solid var(--line-strong); border-radius: 7px;
                    background: var(--surface); color: var(--ink); text-align: right; font-variant-numeric: tabular-nums; }
.unit-input input.wide { width: 104px; }
.unit-input input::placeholder { color: var(--muted); opacity: 0.8; }
.unit-input input:invalid { border-color: var(--down); }
.link-btn { font: inherit; font-size: 12px; font-weight: 400; background: none; border: 0; padding: 0 0 0 6px; color: var(--down);
            text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
.link-btn:hover { color: var(--ink); }
.settings-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 14px; }
.settings-actions .save-btn { margin-left: auto; }
.add-county { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; color: var(--ink-2); }
.add-county select { font: inherit; padding: 6px 9px; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--surface);
                     color: var(--ink); max-width: 100%; }
.settings-actions .total { margin: 0; color: var(--ink-2); }
.settings-actions .total b { color: var(--ink); font-size: 16px; font-variant-numeric: tabular-nums; }
.settings-actions .total.over, .settings-actions .total.over b { color: var(--down); }
.form-errors { background: var(--flag-bg); color: var(--flag-ink); border-radius: 8px; padding: 8px 12px; margin: 0 0 12px; }
.form-errors ul { margin: 4px 0 0; padding-left: 18px; }
.form-note { background: var(--surface-2); color: var(--ink-2); padding: 6px 10px; border-radius: 6px; margin: 0 0 10px; }
@media (max-width: 760px) {
  .settings-card { padding: 14px 12px; }
  .card .settings-table tbody th { min-width: 130px; }
  .settings-actions .save-btn { margin-left: 0; width: 100%; justify-content: center; }
  .add-county select { flex: 1 1 100%; }
}

/* Settings page layout: a sticky section index on the left, the cards on the right; on a phone the index folds
   into a "Sections" list above the cards. Input tables are table.data with the input in td.num */
.page-settings .settings-layout { display: grid; grid-template-columns: 210px minmax(0, 980px); gap: 24px; align-items: start; }
.page-settings .settings-index { position: sticky; top: 76px; max-height: calc(100vh - 92px); overflow-y: auto; font-size: 13px; }
.page-settings .settings-index .index-h { color: var(--muted); font-size: 12px; font-weight: 600; margin: 0; padding: 0 10px 6px; }
.page-settings .settings-index ul { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--line); }
.page-settings .settings-index a { display: block; padding: 4px 10px; margin-left: -1px; border-left: 2px solid transparent;
                                   color: var(--ink-2); text-decoration: none; line-height: 1.35; }
.page-settings .settings-index a:hover { color: var(--accent); border-left-color: var(--accent); }
.page-settings .settings-sections { min-width: 0; }
.page-settings .settings-index a.on { color: var(--accent); border-left-color: var(--accent); font-weight: 600; }
.page-settings .takes { margin: 0 0 10px; font-size: 12.5px; font-weight: 600; color: var(--ink-2); }
.page-settings .takes-now { color: var(--ok, #2f7d4a); }
.page-settings #split-total.off { color: var(--bad, #b3261e); font-weight: 700; }
.page-settings .settings-card { max-width: none; }
.page-settings [id] { scroll-margin-top: 72px; }
.page-settings .settings-card > .lead { margin: 0 0 8px; color: var(--ink-2); max-width: 72ch; }
.page-settings .lead-note { margin: 0 0 10px; color: var(--ink-2); font-size: 13px; }
.page-settings details.more { margin: 0 0 14px; }
.page-settings details.more > summary { padding: 3px 10px; font-size: 12.5px; }
.page-settings details.more .more-body { max-width: 72ch; color: var(--ink-2); font-size: 13px; }
.page-settings details.more .more-body p { margin: 0 0 8px; }
.page-settings .settings-card h3 { margin: 18px 0 6px; }
.page-settings .settings-card .note { color: var(--muted); font-size: 12.5px; margin: 8px 0; max-width: 80ch; }
.page-settings table.data.inputs { width: 100%; }
.page-settings table.data.inputs td, .page-settings table.data.inputs th { vertical-align: middle; }
.page-settings table.data.inputs tbody th[scope="row"] { width: 60%; white-space: normal; }
.page-settings table.data.inputs thead + tbody th[scope="row"] { width: auto; }
.page-settings table.data.inputs .field-hint { display: block; margin-top: 2px; color: var(--muted); font-size: 12.5px; font-weight: 400; line-height: 1.4; }
.page-settings table.data.inputs input:not([type=checkbox]), .page-settings table.data.inputs select,
.page-settings .f6-form textarea, .page-settings .settings-actions input {
  font: inherit; padding: 5px 8px; border: 1px solid var(--line-strong); border-radius: 7px; background: var(--surface); color: var(--ink); }
.page-settings table.data.inputs td.num input { width: 110px; text-align: right; font-variant-numeric: tabular-nums; }
.page-settings table.data.inputs td.num input.wide, .page-settings table.data.inputs td.num input:not([type]) { width: 180px; text-align: left; }
.page-settings table.data.inputs td.num .unit-input input { width: 92px; }
.page-settings table.data.inputs .unit-input i { min-width: 3.2em; text-align: left; }
.page-settings table.data.origins td input { width: 100%; min-width: 90px; }
.page-settings .f6-form { display: block; margin: 0; }
.page-settings .f6-form .wide-field { display: grid; gap: 6px; margin: 14px 0 0; color: var(--ink-2); font-size: 13px; }
.page-settings .f6-form textarea { width: 100%; min-height: 5rem; font: 12px ui-monospace, SFMono-Regular, Menlo, monospace; }
.page-settings .feed-pages details { margin: 4px 0; }
.page-settings .feed-pages ol { font-size: 12.5px; overflow-wrap: anywhere; }
.page-settings .profile-h { text-transform: none; letter-spacing: 0; font-size: 14px; color: var(--ink); }
.page-settings table.history td.when { white-space: nowrap; color: var(--ink-2); }
.page-settings table.history td b { font-weight: 600; }
.page-settings table.history { min-width: 560px; }
@media (max-width: 900px) {
  .page-settings .settings-layout { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .page-settings .settings-index { position: static; max-height: none; overflow-x: auto; overflow-y: hidden; margin: 0 -16px;
                                   padding: 0 16px 4px; -webkit-overflow-scrolling: touch; }
  .page-settings .settings-index .index-h { display: none; }
  .page-settings .settings-index ul { display: flex; gap: 6px; border-left: 0; width: max-content; }
  .page-settings .settings-index a { padding: 4px 11px; margin: 0; border: 1px solid var(--line-strong); border-radius: 999px;
                                     background: var(--surface); white-space: nowrap; font-size: 12.5px; }
  .page-settings .settings-index a:hover { border-color: var(--accent); }
  .page-settings table.data.inputs tbody th[scope="row"] { width: auto; }
  .page-settings table.data.inputs thead + tbody th[scope="row"] { width: 9.5em; }
  .page-settings table.data.inputs td.num input { width: 84px; }
  .page-settings table.data.inputs td.num input.wide, .page-settings table.data.inputs td.num input:not([type]) { width: 130px; }
  .page-settings table.data.inputs td.num .unit-input input { width: 72px; }
  .page-settings table.data.inputs th, .page-settings table.data.inputs td { padding: 6px 5px; }
  .page-settings table.data.inputs .unit-input i { min-width: 1.2em; }
}

/* People page: one-line add form, then one row per person with its controls in their own columns */
.page-people .add-card .person-add { align-items: end; }
.page-people .person-add label.grow { flex: 1 1 240px; }
.page-people .person-add input[type=email], .page-people select {
  font: inherit; padding: 5px 8px; border: 1px solid var(--line-strong); border-radius: 7px; background: var(--surface); color: var(--ink); }
.page-people .person-add input[type=email] { width: 100%; }
.page-people .person-add .tick { padding-bottom: 7px; }
.page-people table.people td, .page-people table.people th { vertical-align: middle; }
.page-people table.people .person-edit { display: none; }
.page-people .signs-in { display: inline-flex; align-items: center; gap: 8px; }
.page-people .signs-in select { padding: 3px 6px; font-size: 12.5px; }
.page-people table.people label.tick { display: inline-flex; align-items: center; gap: 6px; color: var(--accent-strong); font-weight: 600; }
.page-people .row-actions { display: inline-flex; gap: 6px; justify-content: flex-end; flex-wrap: nowrap; }
.page-people table.people { min-width: 720px; }
.page-people table.people .changed { white-space: nowrap; }
.page-people .row-actions form { display: inline; margin: 0; }
.page-people .btn.danger { color: var(--down); }
.page-people details.how { margin-top: 14px; }
.page-people details.how p { margin: 0; max-width: 72ch; color: var(--ink-2); }

/* Coverage, Rulebook, Markets, Learning: wave-2 records pages, built from the shared pieces (table.data, .kv-grid,
   .status.tone-*, details.tuck). Rulebook and Markets rules hang on the templates' own
   .rulebook / .discovery wrappers, since page-rulebook and page-markets also name the jurisdiction and one-metro pages */
:is(.page-coverage, .page-learning, .page-rulebook .rulebook, .page-markets .discovery) .lede { margin: -6px 0 14px; color: var(--ink-2); max-width: 75ch; }
:is(.page-coverage main, .page-learning main, .page-rulebook .rulebook, .page-markets .discovery) > :is(.card, details.tuck) { margin: 0 0 16px; }
:is(.page-coverage, .page-learning, .page-markets .discovery) .card .lead { margin: 0 0 10px; color: var(--ink-2); max-width: 75ch; }
:is(.page-coverage, .page-learning, .page-rulebook .rulebook, .page-markets .discovery) details.tuck > p { max-width: 75ch; color: var(--ink-2); }
:is(.page-coverage, .page-learning, .page-rulebook .rulebook, .page-markets .discovery) .card h2 { margin-top: 0; }
:is(.page-coverage, .page-learning, .page-rulebook .rulebook, .page-markets .discovery) .card h3 { font-size: 14px; margin: 18px 0 6px; }
:is(.page-coverage, .page-learning, .page-rulebook .rulebook, .page-markets .discovery) .card table.data th { white-space: normal; }
:is(.page-coverage, .page-learning, .page-rulebook .rulebook, .page-markets .discovery) .card table.data thead th { white-space: nowrap; }
:is(.page-coverage, .page-learning, .page-rulebook .rulebook, .page-markets .discovery) .status { white-space: nowrap; }
:is(.page-coverage, .page-learning, .page-rulebook .rulebook, .page-markets .discovery) .card > details.tuck { margin: 0 0 12px; }
/* a group heading row inside one table (an authority's districts, a metro's months) */
:is(.page-rulebook .rulebook table.districts, .page-learning table.qualifiers) tr.group th { background: var(--surface-2); color: var(--ink);
  font-size: 13px; font-weight: 650; padding: 8px 10px; border-bottom-color: var(--line-strong); }
:is(.page-rulebook .rulebook table.districts, .page-learning table.qualifiers) tbody + tbody tr.group th { border-top: 10px solid var(--surface); }
:is(.page-rulebook .rulebook table.districts, .page-learning table.qualifiers) tr.group .count { margin-left: 8px; color: var(--muted); font-weight: 500; font-size: 12px; }
:is(.page-rulebook .rulebook table.districts, .page-learning table.qualifiers) tbody tr.group:hover th { background: var(--surface-2); }

.page-coverage .coverage-county { scroll-margin-top: calc(var(--top-h, 0px) + 12px); }
.page-coverage .coverage-county .card-head { flex-wrap: wrap; margin-bottom: 4px; }
.page-coverage .summary { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0 0 12px; }
.page-coverage .summary .status { white-space: normal; }
.page-coverage .chips { display: flex; flex-wrap: wrap; gap: 4px; }
.page-coverage .overview th[scope="row"] { white-space: nowrap; }
.page-coverage table.maps th[scope="row"] { min-width: 14em; }
.page-coverage table.maps td.note { min-width: 14em; max-width: 30em; color: var(--ink-2); }
.page-coverage table.gaps tr.total > * { font-weight: 650; }
.page-coverage details.tuck { margin-top: 10px; }

.page-rulebook .rulebook .filter input { width: min(100%, 360px); padding: 7px 10px; font: inherit; border: 1px solid var(--line-strong);
  border-radius: 8px; background: var(--surface); color: var(--ink); margin: 0 0 12px; }
.page-rulebook .rulebook > .table-scroll { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.page-rulebook .rulebook table.districts th[scope="row"] { min-width: 10em; }
.page-rulebook .rulebook table.districts td[colspan] .status { cursor: help; }
.page-rulebook .rulebook .reading .explanation { max-width: 75ch; }
.page-rulebook .rulebook .reading .kv-grid { margin: 0 0 6px; }
.page-rulebook .rulebook table.citations th[scope="row"] { min-width: 10em; }
.page-rulebook .rulebook table.citations q { color: var(--ink-2); }
.page-rulebook .rulebook pre.source-text { white-space: pre-wrap; max-height: 360px; overflow: auto; font-size: 12px; background: var(--surface-2);
  padding: 10px; border-radius: 8px; }

.page-markets .discovery table.ranking td.rank { color: var(--muted); width: 3em; }
.page-markets .discovery table.ranking td.score { font-weight: 700; font-size: 15px; color: var(--accent-strong); }
.page-markets .discovery table.ranking td.evidence { min-width: 16em; }
.page-markets .discovery table.ranking th[scope="row"] { min-width: 12em; }
.page-markets .discovery table.ranking ul.gaps { margin: 6px 0 0; padding-left: 16px; color: var(--ink-2); font-size: 12.5px; }
.page-markets .discovery table.ranking ul.gaps:empty { display: none; }

.page-learning table.qualifiers th[scope="row"] { min-width: 9em; }
.page-learning table.qualifiers th[scope="row"] .small { max-width: 16em; font-weight: 400; }
.page-learning table.terms th[scope="row"] { width: 11em; vertical-align: top; }
.page-learning table.parts td.gap { font-weight: 700; }
@media (max-width: 600px) {
  :is(.page-coverage, .page-learning, .page-rulebook .rulebook, .page-markets .discovery) .card { padding: 12px 10px; }
  :is(.page-coverage, .page-learning, .page-rulebook .rulebook, .page-markets .discovery) table.data :is(th, td) { padding: 7px 8px; }
  .page-learning table.terms th[scope="row"] { width: 7em; }
}

/* F6 uses the app's existing typography and cards. */
.f6-form { display: flex; flex-wrap: wrap; align-items: end; gap: 1rem; margin: 1rem 0; }
.f6-form label { display: flex; flex-direction: column; gap: .35rem; flex: 1 1 220px; }
.f6-form textarea { width: 100%; min-height: 5rem; padding: .6rem; font: inherit; }
.f6-form label:has(textarea) { flex-basis: 100%; }
.f6-record { padding: 1rem 0; border-bottom: 1px solid var(--line); }
.f6-letter { white-space: pre-wrap; overflow-wrap: anywhere; font: inherit; }
.status-needs-human { background: var(--accent-soft); color: var(--accent-strong); border: 1px solid currentColor; }

.err { color: var(--down); overflow-wrap: anywhere; }
.nowrap { white-space: nowrap; }
/* National discovery reuses the site's tables and map controls. */
.page-markets main { max-width: 1440px; margin: auto; padding: 24px; }
.page-markets .settings-table { width: 100%; }
.page-markets th, .page-markets td { vertical-align: top; }
.page-markets pre { white-space: pre-wrap; max-width: 50ch; overflow-wrap: anywhere; }
.page-markets form { display: flex; flex-wrap: wrap; gap: 16px; margin: 20px 0; align-items: end; }
.page-markets form label { display: grid; gap: 6px; }
.page-markets textarea { min-width: 300px; min-height: 80px; }
.page-markets h2 { margin-top: 32px; }
@media print {
  .page-markets .top, .page-markets button, .page-markets .market-growth,
  .page-markets #evidence, .page-markets details { display: none; }
  .page-markets main { padding: 0; font-size: 10px; }
  .page-markets .settings-table td, .page-markets .settings-table th { padding: 5px; }
}

#growth-map { height: 500px; min-height: 360px; border: 1px solid var(--line); border-radius: var(--radius); }

/* ---------- the team board (team.html): what people set, left to right, and what they passed on below ----------
   Each lane wears its status colour as a top rule; "Needs a person" is the one warm lane, since a card there waits
   on someone. Empty lanes shrink to a quiet column. On a phone the lanes scroll sideways and snap */
.page-team .board { display: flex; gap: 12px; align-items: flex-start; overflow-x: auto; padding-bottom: 10px;
  scroll-snap-type: x proximity; }
.page-team .lane { --tone: var(--line-strong); flex: 1 1 250px; min-width: 250px; background: var(--surface-2);
  border-radius: var(--radius); border-top: 3px solid var(--tone); padding: 10px 10px 4px; scroll-snap-align: start; }
.page-team .lane.is-empty { flex: 0 0 132px; min-width: 132px; background: transparent; border: 1px dashed var(--line);
  border-top: 3px solid color-mix(in srgb, var(--tone) 45%, transparent); }
.page-team .lane-needs-human { --tone: var(--concern); background: color-mix(in srgb, var(--concern) 9%, var(--surface-2)); }
.page-team .lane-shortlisted { --tone: var(--accent); }
.page-team .lane-contacted { --tone: var(--p4); }
.page-team .lane-under-review { --tone: var(--p1); }
.page-team .lane-pursuing { --tone: var(--up); }
.page-team .lane h2 { display: flex; align-items: baseline; gap: 8px; margin: 0 2px 10px; font-size: 14px; font-weight: 650; }
.page-team .lane h2 .count { margin-left: auto; color: var(--muted); font-size: 13px;
  font-weight: 500; font-variant-numeric: tabular-nums; }
.page-team .lane .more { margin: -4px 2px 8px; color: var(--muted); }
.page-team .empty-lane { margin: 0; padding: 2px 2px 8px; color: var(--muted); font-size: 12.5px; }

.page-team .bcard { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px;
  margin-bottom: 8px; box-shadow: var(--shadow); font-size: 12.5px; color: var(--ink-2); }
.page-team .bcard > * + * { margin-top: 5px; }
.page-team .bcard.is-flagged { border-left: 3px solid var(--down); }
.page-team .bcard p { margin-bottom: 0; }
.page-team .bcard-top { display: flex; gap: 8px; align-items: baseline; color: var(--ink); }
.page-team .bcard-top .id { font-weight: 700; font-size: 14px; text-decoration: none; }
.page-team .bcard-top .score { margin-left: auto; font-size: 17px; font-variant-numeric: tabular-nums; }
.page-team .addr-line { color: var(--ink); }
.page-team .facts { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; padding: 6px 0;
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.page-team .facts .fact { font-variant-numeric: tabular-nums; color: var(--ink); }
.page-team .facts .nc { color: var(--muted); }
.page-team .owner { color: var(--muted); }
.page-team .bnote .muted { white-space: nowrap; }
.page-team .ask { padding: 6px 8px; border-radius: 6px; color: var(--ink);
  background: color-mix(in srgb, var(--concern) 16%, var(--surface)); border-left: 3px solid var(--concern); }
.page-team .ev .evidence-links { font-size: 12px; gap: 2px 8px; }
.page-team .bcard-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 10px;
  padding-top: 4px; }
.page-team .bcard-foot .by { color: var(--muted); font-size: 12px; }

.page-team .passed { margin-top: 26px; }
.page-team .passed h2 { display: flex; align-items: baseline; gap: 8px; margin: 0 0 8px; font-size: 16px; }
.page-team .passed h2 .count { color: var(--muted); font-size: 13px; font-weight: 500; font-variant-numeric: tabular-nums; }
.page-team .reasons { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 10px; }
.page-team .reason-count { padding: 2px 10px; border-radius: 999px; background: var(--surface-2); font-size: 12.5px; color: var(--ink-2); }
.page-team .reason-count b { color: var(--ink); font-variant-numeric: tabular-nums; margin-right: 3px; }
.page-team .passed table.data th[scope="row"] a { font-weight: 600; }

@media (max-width: 760px) {
  .page-team .board { margin: 0 -16px; padding: 0 16px 10px; scroll-snap-type: x mandatory; scroll-padding: 0 16px; }
  .page-team .lane { flex: 0 0 84vw; min-width: 0; }
  .page-team .lane.is-empty { flex: 0 0 44vw; }
}
/* ---------- Brokers, Listings, Rivals: one table each, the forms folded (shared pieces: table.data, details.tuck) ---------- */
:is(.page-brokers, .page-listings, .page-rivals, .page-progress, .page-ask) .lede { margin: -6px 0 12px; color: var(--ink-2); max-width: 72ch; }
:is(.page-brokers, .page-listings, .page-rivals, .page-progress, .page-ask) details.tuck { margin: 0 0 14px; }
:is(.page-brokers, .page-listings, .page-rivals, .page-progress, .page-ask) details.tuck > p { max-width: 75ch; }
:is(.page-brokers, .page-listings, .page-rivals) .empty-note { margin: 0 0 14px; }
:is(.page-brokers, .page-listings, .page-rivals) .empty-note ul { margin: 6px 0 0; padding-left: 18px; }
:is(.page-brokers, .page-listings, .page-rivals) .empty-note li { margin: 4px 0; }
:is(.page-brokers, .page-rivals) main > .table-scroll { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
                                                       box-shadow: var(--shadow); margin: 0 0 10px; }

/* Brokers: the ranking first; each broker's evidence opens under its row */
.page-brokers .broker-tools { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-start; }
.page-brokers .broker-tools details[open] { flex-basis: 100%; }
.page-brokers table.points { max-width: 420px; }
.page-brokers table.brokers td.rank { color: var(--muted); width: 2.5em; }
.page-brokers table.brokers td.pts { font-weight: 700; font-size: 15px; color: var(--accent-strong); }
.page-brokers table.brokers td.contact { min-width: 14em; max-width: 26em; }
.page-brokers table.brokers form { margin: 0; }
.page-brokers table.brokers tbody.broker > tr:first-child > * { border-bottom: 0; padding-top: 10px; }
.page-brokers table.brokers tr.evidence-row > td { padding-top: 0; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.page-brokers table.brokers tbody.broker:last-child tr.evidence-row > td { border-bottom: 0; }
.page-brokers table.brokers tr.evidence-row details.tuck { margin: 0; }
.page-brokers table.brokers tr.evidence-row details.tuck > summary { padding: 3px 10px; font-size: 12.5px; }
.page-brokers table.brokers > tbody > tr:hover > * { background: transparent; }
.page-brokers table.brokers tbody.broker:hover > tr > * { background: var(--hover); }
.page-brokers table.evidence { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; }
.page-brokers table.brokers table.data thead th { position: static; }
.page-brokers table.evidence td.detail { min-width: 18em; max-width: 44em; overflow-wrap: anywhere; }
.page-brokers table.evidence tbody tr:hover > * { background: var(--hover); }
.page-brokers details.add-evidence { margin: 10px 0 0; }
@media (max-width: 600px) {
  .page-brokers table.brokers > tbody > tr:first-child > :is(th, td:nth-child(3)) { white-space: nowrap; }
  .page-brokers table.brokers td.contact { min-width: 24em; }
}

/* Listings: the match queue's answer sits in its row */
.page-listings .card { margin: 0 0 14px; }
.page-listings table.matches td.basis { min-width: 12em; color: var(--ink-2); }
.page-listings .match-form { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 0; min-width: 37em; }
.page-listings .match-form input, .page-listings .match-form select { font: inherit; font-size: 13px; padding: 4px 6px; }
.page-listings .match-form input { width: 7.5em; }
.page-listings table.health td.problem { min-width: 14em; max-width: 30em; color: var(--ink-2); }
.page-listings .kv-grid { max-width: 760px; }
@media (max-width: 600px) {
  .page-listings .card { padding: 12px 10px; }
  .page-listings table.data th, .page-listings table.data td { padding: 7px 8px; }
}

/* Rivals: the places as a compact list in columns */
.page-rivals .place-list { columns: 14em auto; column-gap: 24px; margin: 0; padding: 0 0 0 18px; font-size: 13.5px; }
.page-rivals .place-list li { break-inside: avoid; padding: 2px 0; }
.page-rivals table.rivals th[scope="row"] { min-width: 12em; }

/* ---------- Progress and Ask: one table per job, Google's raw words and ids folded per row (shared: table.data,
   ui.state's .status.tone-*, details.tuck, .kv-grid) ---------- */
.page-progress .lede { font-size: 16px; font-weight: 600; color: var(--ink); }
.page-progress .page-note { margin: -6px 0 14px; }
:is(.page-progress, .page-ask) .card { margin: 0 0 16px; }
:is(.page-progress, .page-ask) .card h2 { font-size: 17px; margin: 0 0 10px; }
:is(.page-progress, .page-ask) table.data th[scope="row"] { min-width: 10em; }
:is(.page-progress, .page-ask) details.tuck.row-details { margin: 0; }
:is(.page-progress, .page-ask) details.tuck.row-details > summary { padding: 2px 8px; font-size: 12.5px; }
:is(.page-progress, .page-ask) details.tuck.row-details[open] > summary { margin-bottom: 6px; }
.page-progress details.row-details .kv-grid { grid-template-columns: minmax(0, 1fr); min-width: 20em; max-width: 46em; font-size: 12.5px; }
.page-progress details.row-details .kv-grid dd { overflow-wrap: anywhere; }
.page-progress td.last-word { min-width: 12em; max-width: 30em; color: var(--ink-2); }
.page-progress td.how-far { min-width: 12em; }
.page-progress .meter { max-width: 320px; margin: 5px 0 0; }
.page-progress .meter i { background: var(--accent); }
.page-progress table.data table.data thead th { position: static; }
.page-progress table.runs tbody.run > tr:first-child:not(:last-child) > * { border-bottom: 0; }
.page-progress table.runs tr.steps-row > td { padding-top: 0; }
.page-progress table.runs tr.steps-row .kv-grid { max-width: 760px; }
.page-progress table.runs tbody.run:last-child > tr:last-child > * { border-bottom: 0; }
.page-progress table.runs > tbody.run > tr:hover > * { background: transparent; }
.page-progress table.runs tbody.run:hover > tr > * { background: var(--hover); }
.page-progress table.data table.data { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; margin: 0 0 8px; }

.page-ask .card-head { margin: 0 0 6px; }
.page-ask .card-head h2 { margin: 0; }
.page-ask table.requests td.sites { min-width: 8em; max-width: 18em; }
.page-ask table.requests td.actions { white-space: nowrap; }
.page-ask table.requests td.actions form { display: inline; margin: 0 4px 0 0; }
.page-ask table.requests tr.standing-waiting > * { background: color-mix(in srgb, var(--concern) 6%, transparent); }
.page-ask .one-line { display: flex; flex-wrap: wrap; gap: 10px; align-items: end; margin: 0 0 10px; }
.page-ask .one-line label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--ink-2); }
.page-ask .one-line input[name="sites"] { min-width: 16em; }
.page-ask .one-line input, .page-ask .one-line select { font: inherit; padding: 6px 8px; }
.page-ask .ask-form { margin: 0; }
.page-ask .estimate { border-top: 1px solid var(--line); padding: 12px 0 0; }
.page-ask .estimate h3 { margin: 0 0 8px; font-size: 15px; text-transform: none; letter-spacing: normal; color: var(--ink); }
.page-ask .estimate table.data { max-width: 520px; }
.page-ask #homework > h3 { margin: 16px 0 8px; font-size: 15px; text-transform: none; letter-spacing: normal; color: var(--ink); }
/* An answer card: also on the site page (_answers.html is shared), so these rules aren't page-scoped */
.answer { padding: 14px 0; border-top: 1px solid var(--line); }
.answer:first-of-type { border-top: 0; padding-top: 4px; }
.answer h3 { margin: 0 0 2px; font-size: 15px; text-transform: none; letter-spacing: normal; color: var(--ink); }
.answer .answer-meta { margin: 0 0 8px; }
.answer .answer-text { white-space: pre-line; max-width: 75ch; margin: 0 0 8px; }
.answer .answer-facts { display: grid; gap: 4px; margin: 0; font-size: 13px; }
.answer .answer-facts > div { display: grid; grid-template-columns: 7em minmax(0, 1fr); gap: 10px; }
.answer .answer-facts dt { color: var(--ink-2); }
.answer .answer-facts dd { margin: 0; overflow-wrap: anywhere; }
@media (max-width: 600px) {
  :is(.page-progress, .page-ask) .card { padding: 12px 10px; }
  :is(.page-progress, .page-ask) table.data th, :is(.page-progress, .page-ask) table.data td { padding: 7px 8px; }
  :is(.page-progress, .page-ask) table.data th[scope="row"] { min-width: 7em; max-width: 10em; white-space: normal; overflow-wrap: anywhere; }
  :is(.page-progress, .page-ask) table.data .status { white-space: nowrap; }
  .page-ask .one-line label { flex: 1 1 100%; }
  .page-ask .one-line input[name="sites"] { min-width: 0; width: 100%; }
}
/* Market setup shares the app's forms, tables and status vocabulary. */
.market-setup { max-width: 1080px; }
.setup-fields { display: grid; grid-template-columns: repeat(auto-fit,minmax(220px,1fr)); gap: 14px 22px; }
.setup-connector label, .setup-fields label { display: flex; flex-direction: column; gap: 5px; }
.market-setup input:not([type=checkbox]), .market-setup select, .market-setup textarea { width: 100%; box-sizing: border-box; }
.market-setup form { display: grid; gap: 16px; margin: 16px 0; align-items: start; }
.market-setup .card { margin-bottom: 16px; }
.market-setup form button { justify-self: start; }
.market-setup form label { display: grid; gap: 6px; color: var(--ink-2); font-size: 13px; }
.market-setup input:not([type=checkbox]), .market-setup select, .market-setup textarea,
.setup-search input { font: inherit; padding: 8px 10px; border: 1px solid var(--line-strong); border-radius: 6px; background: var(--surface); color: var(--ink); }
.market-setup button:disabled { opacity: .45; cursor: not-allowed; }
.market-setup textarea { font-family: monospace; }
.setup-search { display: flex; align-items: end; gap: 12px; margin-bottom: 24px; }
.page-markets form.setup-counties { display: block; }

/* Areas (Kai, 15 Oct 2026, ruling 19): the ZIP table beside the map coloured by rank */
.areas-split { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 16px; align-items: start; }
.areas-map { position: sticky; top: 12px; }
.areas-map .lbmap { height: 72vh; min-height: 420px; border-radius: 8px; }
table.areas tr[draggable="true"] { cursor: grab; }
table.areas tr.dragging { opacity: .5; }
table.areas tr.lit td, table.areas tr.lit th { background: color-mix(in srgb, #ffd400 22%, transparent); }
table.areas tr.avoided th a { text-decoration: line-through; }
table.areas .handle { color: var(--muted, #8a918d); margin-right: 4px; letter-spacing: -2px; }
table.areas .actions { white-space: nowrap; }
table.areas .actions form.inline { display: inline-flex; gap: 4px; align-items: center; }
table.areas input.pos { width: 4.5em; }
table.areas .btn.danger { color: var(--down); }
table.areas small.bad { color: var(--bad, #b3261e); }
.area-line, .sl-area { margin: 4px 0; }
.sl-overall { margin-left: 6px; font-size: .85em; }
@media (max-width: 900px) { .areas-split { grid-template-columns: 1fr; } .areas-map { position: static; } }

/* The poor-school caution (ruling 11): a site page and card note, never a flag */
p.caution { margin: 4px 0; padding: 4px 10px; border-left: 3px solid var(--warn, #b7791f); color: var(--ink-2); font-size: 13px; }
