/* Kūlana Construction Management: large-parcel screen. Shared by login.html and index.html. No build step. */
:root {
  color-scheme: light;
  --blue-deep: #1F4E78; --blue: #4472C4; --sky: #dbe5f1; --sky-2: #eef3fa; --light: #f8f9fa; --white: #ffffff; --ink: #1a1a2e;
  --muted: #4f5b6b; --line: #d6dee8; --line-strong: #b8c6d8; --hover: #eef3f9; --sel: #e3ecf7;
  --err: #a4262c; --err-bg: #fdf1f1;
  /* map series colors (validated; for fills and swatches only, never for text or status) */
  --s-open: #2a78d6; --s-golf: #eb6834; --s-ag: #1baf7a; --s-out: #9aa5b1;
  --head: "Montserrat", "Segoe UI", system-ui, sans-serif;
  --body: "Open Sans", "Segoe UI", Calibri, system-ui, sans-serif;
  --mono: "Roboto Mono", Consolas, "Courier New", monospace;
  --radius: 10px; --shadow: 0 1px 2px rgba(26,26,46,.06), 0 4px 16px rgba(26,26,46,.08);
  --panel-w: 640px; --gutter: 24px; --bar-h: 0px; --explore-top: 260px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--light); color: var(--ink); font: 15px/1.55 var(--body); }
img { max-width: 100%; }
a { color: var(--blue-deep); text-underline-offset: 2px; }
a:hover { color: var(--ink); }
button, input, select, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
h1, h2, h3, h4 { font-family: var(--head); color: var(--blue-deep); }
/* TMKs only are set in mono; money, acres, counts and shares use Open Sans lining tabular figures */
.mono { font-family: var(--mono); }
.num, .n, .pct, .count, .p-facts b { font-family: var(--body); font-variant-numeric: tabular-nums lining-nums; }
.muted { color: var(--muted); }
.nowrap { white-space: nowrap; }

/* focus: always visible for keyboard users */
:focus { outline: none; }
:focus-visible { outline: 3px solid var(--blue-deep); outline-offset: 2px; border-radius: 4px; }
.bar :focus-visible, .p-head :focus-visible, .login-head :focus-visible { outline-color: var(--white); }
.leaflet-container :focus-visible { outline: 3px solid var(--white); outline-offset: -3px; box-shadow: inset 0 0 0 6px var(--blue-deep); }

.skip { position: absolute; left: 12px; top: -60px; z-index: 3000; background: var(--white); color: var(--ink); padding: 10px 14px; border-radius: 6px; font-weight: 600; box-shadow: var(--shadow); }
.skip:focus { top: 12px; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 8px 16px; border-radius: 8px;
  border: 1px solid var(--line-strong); background: var(--white); color: var(--ink); font: 600 14px/1.2 var(--head); letter-spacing: .01em;
  cursor: pointer; text-decoration: none; white-space: nowrap; }
.btn:hover { background: var(--hover); color: var(--ink); }
.btn.primary { background: var(--blue-deep); border-color: var(--blue-deep); color: var(--white); }
.btn.primary:hover { background: #18405f; color: var(--white); }
.btn.small { min-height: 32px; padding: 5px 11px; font-size: 13px; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .55; cursor: not-allowed; }
.linkbtn { background: none; border: 0; padding: 2px 0; color: var(--blue-deep); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
.linkbtn:hover { color: var(--ink); }
.iconbtn { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 8px; border: 1px solid transparent; background: transparent; cursor: pointer; color: inherit; padding: 0; flex: none; }
.iconbtn svg { width: 22px; height: 22px; }
.iconbtn:hover { background: rgba(255,255,255,.14); }
.starbtn { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 6px; border: 0; background: transparent; cursor: pointer; padding: 0; color: var(--muted); }
.starbtn svg { width: 19px; height: 19px; }
.starbtn:hover { background: var(--hover); color: var(--ink); }
.starbtn[aria-pressed="true"] { color: var(--blue-deep); }
.starbtn[aria-pressed="true"] svg path { fill: currentColor; }

/* ---------- header bar (white logo on blue, 300 px wide per the brand rule) ---------- */
.bar { background: linear-gradient(90deg, var(--blue-deep), var(--blue)); color: var(--white); }
.bar .in { max-width: 1600px; margin: 0 auto; padding: 7px var(--gutter); display: flex; align-items: center; justify-content: space-between; gap: 8px 24px; flex-wrap: wrap; }
.bar .logo { display: block; flex: none; line-height: 0; }
.bar .logo img { width: 300px; height: auto; display: block; }
.nav { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.nav a, .nav button { color: var(--white); text-decoration: none; font: 600 14px/1 var(--head); padding: 10px 14px; border-radius: 8px; border: 1px solid transparent; background: transparent; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; min-height: 40px; }
.nav a:hover, .nav button:hover { background: rgba(255,255,255,.14); color: var(--white); }
.nav a[aria-current="page"] { background: rgba(255,255,255,.18); border-color: rgba(255,255,255,.45); }
.nav .count { background: var(--white); color: var(--blue-deep); border-radius: 10px; padding: 2px 7px; font: 700 12px/1.2 var(--body); min-width: 20px; text-align: center; }
.nav .logout { border-color: rgba(255,255,255,.55); margin-left: 6px; }
.nav svg { width: 18px; height: 18px; }

/* ---------- main view: title, funnel, lede ---------- */
.view { max-width: 1600px; margin: 0 auto; padding: 0 var(--gutter); }
.intro { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "t f" "l l"; gap: 8px 24px; align-items: center; padding: 12px 0 10px; }
.intro-t { grid-area: t; min-width: 0; }
.intro h1 { font: 700 22px/1.2 var(--head); margin: 0 0 3px; }
.meta-line { margin: 0; font-size: 13px; color: var(--muted); line-height: 1.45; }
.meta-line .prepared { color: var(--ink); }
.meta-line .sep { color: var(--muted); padding: 0 4px; }
.tag { display: inline-block; font: 600 11px/1.5 var(--body); padding: 0 7px; border-radius: 999px; background: var(--sky); color: var(--ink); white-space: nowrap; vertical-align: 1px; }
.meta-line .prepared strong { font-weight: 600; }
.lede { grid-area: l; margin: 0; font-size: 13.5px; line-height: 1.45; color: var(--ink); }
.lede strong { font-weight: 700; }
.lede a { font-weight: 600; white-space: nowrap; }

.funnel { grid-area: f; display: flex; align-items: stretch; gap: 8px; }
.funnel .arrow { align-self: center; color: var(--muted); font: 600 18px/1 var(--body); }
.passgrp { display: flex; align-items: stretch; gap: 6px; padding: 4px; border-radius: 12px; background: var(--sky-2); border: 1px solid #d3deec; }
.passgrp .eq { align-self: center; color: var(--muted); font: 600 17px/1 var(--body); padding: 0 1px; }
.tile { position: relative; display: flex; flex-direction: column; justify-content: flex-start; text-align: left; background: var(--white); border: 1px solid var(--line); border-radius: 9px;
  padding: 7px 12px 7px 14px; cursor: pointer; min-width: 104px; height: 60px; overflow: hidden; color: var(--ink); font: inherit; }
.tile::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--tile-c, var(--blue-deep)); }
.tile .n { display: block; font: 700 22px/1.1 var(--head); color: var(--blue-deep); font-variant-numeric: tabular-nums lining-nums; }
.tile .l { display: block; color: var(--muted); font-size: 12px; line-height: 1.25; margin-top: 2px; white-space: nowrap; }
.tile .x { position: absolute; right: 9px; top: 11px; color: var(--muted); font-size: 11px; line-height: 1.2; white-space: nowrap; }
.tile.cat { min-width: 112px; }
.tile.cat:has(.x) { min-width: 138px; }
.tile:hover { border-color: var(--line-strong); background: #fbfcfe; }
.tile[aria-pressed="true"] { background: var(--sky); border: 2px solid var(--blue-deep); padding: 6px 11px 6px 13px; }
.tile[aria-pressed="true"] .l { color: var(--ink); }
.tile.loading { cursor: default; min-width: 110px; }
.tile.loading .n, .tile.loading .l { color: transparent; }

/* ---------- map + list ---------- */
.explore { display: grid; grid-template-columns: 420px minmax(0, 1fr); height: max(420px, calc(100vh - var(--explore-top) - 14px)); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--white); box-shadow: var(--shadow); margin-bottom: 18px; }
.side { display: flex; flex-direction: column; min-width: 0; min-height: 0; border-right: 1px solid var(--line); background: var(--white); }
.filters { padding: 12px 14px 10px; border-bottom: 1px solid var(--line); display: grid; gap: 9px; }
.search { position: relative; margin: 0; }
.search svg { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--muted); pointer-events: none; }
.search input { width: 100%; height: 42px; padding: 8px 12px 8px 38px; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--white); font-size: 14.5px; }
.search input::placeholder { color: #66717f; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { border: 1px solid var(--line-strong); border-radius: 999px; padding: 4px 10px 4px 8px; cursor: pointer; font-size: 12.5px; display: inline-flex; align-items: center; gap: 6px; background: var(--white); color: var(--ink); line-height: 1.2; min-height: 32px; }
.chip .c { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums lining-nums; }
.chip[aria-pressed="true"] { background: var(--sky-2); border-color: #9fb6d3; }
.chip[aria-pressed="true"]::before { content: "\2713"; font: 700 11px/1 var(--body); color: var(--blue-deep); }
.chip[aria-pressed="false"] { background: var(--white); color: var(--muted); border-style: dashed; }
.chip[aria-pressed="false"] .sw { opacity: .35; }
.chip.star svg { width: 14px; height: 14px; }
.chip.star[aria-pressed="true"]::before { content: none; }
.chip.star[aria-pressed="true"] svg path { fill: var(--blue-deep); stroke: var(--blue-deep); }
.sw { width: 12px; height: 12px; border-radius: 3px; display: inline-block; flex: none; background: var(--sw, var(--s-out)); }
.sw.out { height: 3px; border: 0; background: var(--s-out); border-radius: 2px; }
.frow { display: flex; flex-wrap: wrap; gap: 6px 8px; align-items: center; }
.frow .lbl { font-size: 13px; color: var(--muted); }
.frow input[type=number] { width: 70px; height: 34px; padding: 4px 8px; border: 1px solid var(--line-strong); border-radius: 6px; font-size: 13px; font-variant-numeric: tabular-nums; }
.frow select { flex: 1; min-width: 0; height: 34px; padding: 4px 8px; border: 1px solid var(--line-strong); border-radius: 6px; background: var(--white); font-size: 13px; }
.countline { display: flex; align-items: center; gap: 10px; padding: 6px 14px; font-size: 13px; color: var(--muted); border-bottom: 1px solid var(--line); background: var(--light); min-height: 40px; }
.countline #count { flex: 1; min-width: 0; }
.countline strong { color: var(--ink); }
.sortl { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; }
.sortl select { height: 30px; padding: 2px 6px; border: 1px solid var(--line-strong); border-radius: 6px; background: var(--white); font-size: 12.5px; color: var(--ink); }
.list { overflow: auto; flex: 1; min-height: 0; }
table { border-collapse: collapse; width: 100%; }
.ptable { table-layout: fixed; }
.ptable th, .ptable td { text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--line); vertical-align: top; font-size: 13.5px; }
.ptable thead th { position: sticky; top: 0; z-index: 1; background: var(--white); font: 600 11.5px/1.3 var(--head); color: var(--muted); padding: 6px 8px; letter-spacing: .02em; }
.ptable th.st, .ptable td.st { width: 38px; padding: 6px 0 6px 4px; }
.ptable th.n, .ptable td.n { width: 64px; text-align: right; padding-right: 14px; }
.ptable td.n { font-weight: 600; white-space: nowrap; padding-top: 8px; }
.ptable td.pc { min-width: 0; padding-top: 7px; }
.ptable .own { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.35; }
.ptable .facts { font-size: 12.5px; color: var(--muted); line-height: 1.4; margin-top: 1px; }
.ptable .facts .tmk { font: 400 12px/1.4 var(--mono); color: var(--blue-deep); }
.ptable .facts .grp { white-space: nowrap; display: inline-flex; align-items: center; gap: 4px; color: var(--ink); }
.ptable .facts .dot { color: #9aa5b1; }
.ptable tbody tr { cursor: pointer; }
.ptable tbody tr:hover td, .ptable tbody tr.hl td { background: var(--hover); }
.ptable tbody tr[aria-current="true"] td { background: var(--sel); }
.ptable tbody tr[aria-current="true"] td.st { box-shadow: inset 3px 0 0 var(--blue-deep); }
.sub { color: var(--muted); font-size: 12px; line-height: 1.35; }
.scr { display: inline-flex; align-items: center; gap: 6px; }
.empty { padding: 22px 16px !important; text-align: center; color: var(--muted); cursor: default; }
.empty .msg { margin: 8px 0 0; font-size: 12.5px; }
.empty .msg.err { color: var(--err); }
.more { padding: 0 14px; }
.more .btn { width: 100%; margin: 12px 0; }
.more:empty { display: none; }
.mapwrap { position: relative; min-width: 0; min-height: 0; }
#map { position: absolute; inset: 0; background: #dfe6ee; }
.map-hint { position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); z-index: 500; background: rgba(26,26,46,.84); color: var(--white); font-size: 12.5px; padding: 6px 12px; border-radius: 999px; pointer-events: none; transition: opacity .3s; white-space: nowrap; }
.legend { background: var(--white); color: var(--ink); border-radius: 8px; padding: 8px 11px; box-shadow: var(--shadow); font-size: 12.5px; line-height: 1.55; border: 1px solid var(--line); }
.legend strong { display: block; font: 700 10.5px/1.3 var(--head); letter-spacing: .08em; text-transform: uppercase; color: var(--blue-deep); margin-bottom: 3px; }
.legend .lg-body div { display: flex; align-items: center; gap: 7px; }
.legend .dash { width: 14px; height: 0; border-top: 2px dashed var(--ink); display: inline-block; }
.legend .lg-btn { display: none; }
.fitctl a { display: grid !important; place-items: center; }
.fitctl svg { width: 16px; height: 16px; color: var(--ink); }
.kcm-tip { font: 13px/1.45 var(--body); color: var(--ink); border-radius: 6px; border: 1px solid var(--line-strong); box-shadow: var(--shadow); padding: 6px 9px; }
.kcm-tip b { font-family: var(--mono); font-weight: 500; }
.leaflet-container { font-family: var(--body); }
.leaflet-control-layers { border-radius: 8px !important; }
.leaflet-control-layers-list { font-size: 13px; color: var(--ink); }
.star-marker { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--white); color: var(--blue-deep); box-shadow: 0 1px 4px rgba(0,0,0,.4); border: 2px solid var(--blue-deep); }
.star-marker svg { width: 14px; height: 14px; }
.star-marker svg path { fill: currentColor; }
.maptop { position: fixed; left: 50%; bottom: 16px; transform: translateX(-50%); z-index: 900; display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 18px; border-radius: 999px; border: 0; background: var(--blue-deep); color: var(--white); font: 600 14px/1 var(--head); box-shadow: 0 4px 14px rgba(26,26,46,.3); cursor: pointer; }
.maptop svg { width: 18px; height: 18px; }

/* ---------- parcel slide-over ---------- */
.panel { position: fixed; top: var(--bar-h); right: 0; bottom: 0; width: min(var(--panel-w), 100vw); z-index: 1100; background: var(--white); box-shadow: -8px 0 32px rgba(26,26,46,.22); display: flex; flex-direction: column; }
.panel-scroll { overflow-y: auto; flex: 1; min-height: 0; overscroll-behavior: contain; }
.p-head { background: linear-gradient(100deg, var(--blue-deep), var(--blue)); color: var(--white); padding: 10px 16px 12px 18px; }
.p-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: nowrap; }
.p-id { display: flex; align-items: baseline; gap: 10px; min-width: 0; }
.p-head .eyebrow { font: 700 11.5px/1.3 var(--head); letter-spacing: .1em; text-transform: uppercase; color: var(--white); opacity: .9; margin: 0; }
.p-head h2 { color: var(--white); font: 700 24px/1.15 var(--mono); margin: 0; letter-spacing: .01em; white-space: nowrap; }
.p-head h2:focus-visible, h1[tabindex="-1"]:focus-visible { outline: none; }
.p-top .acts { display: flex; gap: 6px; align-items: center; flex-wrap: nowrap; flex: none; }
.p-facts { display: flex; flex-wrap: wrap; gap: 2px 16px; margin: 6px 0 0; font-size: 14px; }
.p-facts b { font-weight: 700; }
.p-result { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 6px; }
.p-links { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 4px 18px; font-size: 13.5px; }
.p-links a { color: var(--white); font-weight: 600; display: inline-flex; align-items: center; gap: 4px; }
.p-links a:hover { color: var(--white); text-decoration-thickness: 2px; }
.p-links svg { width: 14px; height: 14px; }
.pill { display: inline-flex; align-items: center; gap: 7px; background: var(--white); color: var(--ink); border-radius: 999px; padding: 4px 12px 4px 9px; font-size: 13px; font-weight: 600; line-height: 1.3; }
.pill.flag { background: var(--sky); }
.pill.ghost { background: transparent; color: var(--white); border: 1px solid rgba(255,255,255,.6); }
.hbtn { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 6px 11px; border-radius: 8px; border: 1px solid rgba(255,255,255,.55); background: rgba(255,255,255,.08); color: var(--white); font: 600 13px/1.2 var(--head); cursor: pointer; text-decoration: none; white-space: nowrap; }
.hbtn:hover { background: rgba(255,255,255,.2); color: var(--white); }
.hbtn svg { width: 18px; height: 18px; flex: none; }
.hbtn[aria-pressed="true"] { background: var(--white); color: var(--blue-deep); border-color: var(--white); }
.hbtn[aria-pressed="true"] svg path { fill: currentColor; }
.hbtn[disabled] { opacity: .55; cursor: not-allowed; }
.minimap { height: 140px; background: #c9d3de; border-bottom: 1px solid var(--line); }
.minimap .leaflet-control-attribution { font-size: 10px; }
.tabs { position: sticky; top: 0; z-index: 5; background: var(--white); border-bottom: 1px solid var(--line); display: flex; flex-wrap: nowrap; gap: 2px; padding: 7px 10px; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs.more-r { -webkit-mask-image: linear-gradient(90deg, #000 82%, transparent); mask-image: linear-gradient(90deg, #000 82%, transparent); }
.tabs.more-l.more-r { -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 82%, transparent); mask-image: linear-gradient(90deg, transparent, #000 12%, #000 82%, transparent); }
.tabs.more-l:not(.more-r) { -webkit-mask-image: linear-gradient(90deg, transparent, #000 18%); mask-image: linear-gradient(90deg, transparent, #000 18%); }
.tab { flex: none; border: 1px solid transparent; background: transparent; border-radius: 8px; padding: 7px 9px; font: 600 13px/1.2 var(--head); color: var(--muted); cursor: pointer; white-space: nowrap; min-height: 34px; }
.tab:hover { background: var(--hover); color: var(--ink); }
.tab[aria-selected="true"] { background: var(--sky); color: var(--blue-deep); border-color: #b8cbe4; }
.tabpanel { padding: 14px 18px 28px; }
.tabpanel h3 { font: 700 15.5px/1.3 var(--head); margin: 20px 0 8px; }
.tabpanel h3:first-child { margin-top: 0; }
.tabnote { color: var(--muted); font-size: 13px; margin: 0 0 12px; }
dl.kv { display: grid; grid-template-columns: minmax(120px, 30%) 1fr; gap: 0; margin: 0; border-top: 1px solid var(--line); }
dl.kv dt, dl.kv dd { margin: 0; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
dl.kv dt { color: var(--muted); padding-right: 12px; font-size: 13px; }
dl.kv dd { overflow-wrap: anywhere; }
ul.plain { margin: 0; padding-left: 18px; }
ul.plain li { margin: 2px 0; }
.callout { background: var(--sky); border-radius: 8px; padding: 10px 12px; font-size: 13.5px; margin: 10px 0 0; }
.callout.warn { background: #fff4e5; border: 1px solid #f2d4a7; }
ul.rows { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 8px; }
ul.rows li { padding-top: 8px; border-top: 1px solid var(--line); font-size: 14px; }
ul.rows li:first-child { border-top: 0; padding-top: 0; }
ul.linklist { margin: 0 0 12px; padding-left: 18px; font-size: 14px; }
ul.linklist li { margin: 4px 0; }
ul.linklist svg, .tabpanel a svg { width: 14px; height: 14px; vertical-align: -2px; }

/* at a glance */
.g-h { font: 700 11.5px/1.3 var(--head) !important; letter-spacing: .09em; text-transform: uppercase; color: var(--blue-deep); margin: 0 0 6px !important; }
.glance { border-top: 1px solid var(--line); margin-bottom: 18px; }
.g-row { position: relative; border-bottom: 1px solid var(--line); }
.g-main { display: grid; grid-template-columns: 136px minmax(0, 1fr) 18px; gap: 4px 10px; align-items: start; width: 100%; min-height: 50px; padding: 9px 4px 9px 2px; border: 0; background: transparent; text-align: left; cursor: pointer; color: var(--ink); }
.g-main:hover { background: var(--hover); }
.g-l { display: flex; align-items: center; gap: 8px; font: 600 12.5px/1.3 var(--head); color: var(--muted); padding-top: 1px; }
.g-v { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.g-v .skel { margin: 3px 0; }
.g-a { font: 600 15px/1.35 var(--body); color: var(--ink); overflow-wrap: anywhere; }
.g-b { font-size: 13px; line-height: 1.4; color: var(--muted); overflow-wrap: anywhere; }
.g-c { color: var(--muted); padding-top: 2px; }
.g-c svg { width: 16px; height: 16px; }
.g-main:hover .g-c { color: var(--blue-deep); }
.g-retry { position: absolute; right: 30px; top: 10px; }
.gl { display: inline-grid; place-items: center; flex: none; width: 19px; height: 19px; border-radius: 50%; border: 1.6px solid var(--ink); color: var(--ink); font: 700 11px/1 var(--body); }
.gl-ok { background: var(--white); }
.gl-chk { background: var(--ink); color: var(--white); }
.gl-na { border-style: dashed; color: var(--muted); border-color: var(--muted); }
.gl-fail { border-color: var(--err); color: var(--err); }
.gl-wait { border-color: var(--line-strong); border-style: dotted; }
.ov-rest dl.kv { border-top: 1px solid var(--line); }
.gl-pass { background: var(--white); }
.gl-no { background: var(--ink); color: var(--white); }
.gl-nd { border-style: dashed; color: var(--muted); border-color: var(--muted); }
.ck-n { font: 600 12.5px/1.3 var(--body); letter-spacing: 0; text-transform: none; color: var(--ink); margin-left: 8px; }
ul.checks { list-style: none; margin: 0 0 4px; padding: 0; border-top: 1px solid var(--line); }
ul.checks li { display: flex; gap: 10px; align-items: flex-start; padding: 7px 2px; border-bottom: 1px solid var(--line); font-size: 13.5px; line-height: 1.4; }
ul.checks li .gl { margin-top: 1px; }
ul.checks b { font-weight: 700; }
.ck-src { margin: 4px 0 16px !important; }
.ckstrip { display: flex; flex-wrap: wrap; gap: 4px 10px; margin-top: 2px; }
.ck { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: var(--ink); white-space: nowrap; }
.ck .gl { width: 16px; height: 16px; font-size: 9.5px; }
.t10 { min-width: 760px; }
.t10 th, .t10 td { text-align: left; vertical-align: top; padding: 10px 10px; border-bottom: 1px solid var(--line); font-size: 13.5px; }
.t10 thead th { background: var(--light); font: 600 12px/1.3 var(--head); color: var(--muted); white-space: nowrap; }
.t10 tbody tr { cursor: pointer; }
.t10 tbody tr:hover td { background: var(--hover); }
.t10 .rk { width: 40px; font: 700 18px/1.2 var(--head); color: var(--blue-deep); text-align: center; }
.t10 thead .rk { font: 600 12px/1.3 var(--head); }
.t10 .own { font-weight: 600; margin-top: 2px; }
.t10 .sub { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; }
.t10 td.n, .t10 th.n { text-align: right; white-space: nowrap; }
.t10 .ckc { width: 58px; text-align: center; }
.t10 .ck-ph { display: none; }
.t10 a.mono { font-weight: 500; }

/* live items */
.items { display: grid; gap: 10px; grid-template-columns: minmax(0, 1fr); }
.items > *, .tabpanel { min-width: 0; }
.item { min-width: 0; border: 1px solid var(--line); border-radius: var(--radius); padding: 11px 13px 10px; background: var(--white); }
.item.is-clear { background: #fbfcfd; }
.item-h { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 4px; }
.item-h h4 { margin: 0; font: 700 13.5px/1.3 var(--head); color: var(--blue-deep); }
.badge { display: inline-flex; align-items: center; border-radius: 999px; padding: 2px 9px; font: 600 11px/1.4 var(--body); white-space: nowrap; background: var(--light); color: var(--ink); border: 1px solid var(--line); }
.znotes ul.callout.notes { margin: 0 0 12px; padding: 9px 12px 9px 28px; }
.znotes ul.callout.notes li { margin: 2px 0; }
.ptable .own.wrap { white-space: normal; }
.stat { display: inline-flex; align-items: center; gap: 6px; font: 600 12.5px/1.3 var(--body); color: var(--ink); white-space: nowrap; }
.item-v { font-size: 14.5px; }
.item-v .big { font: 600 15.5px/1.35 var(--body); }
.shares { list-style: none; margin: 2px 0 0; padding: 0; display: grid; gap: 5px; }
.shares li { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; align-items: center; font-size: 14px; }
.shares .bar-t { grid-column: 1 / -1; height: 6px; border-radius: 3px; background: var(--light); overflow: hidden; border: 1px solid var(--line); }
.shares .bar-t i { display: block; height: 100%; background: var(--blue-deep); }
.shares .pct { font-size: 13.5px; font-weight: 600; color: var(--ink); }
.src { margin: 7px 0 0; font-size: 12px; color: var(--muted); }
.src a { color: var(--muted); }
.fail { color: var(--err); background: var(--err-bg); border-radius: 6px; padding: 7px 10px; font-size: 13.5px; display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; }
.fail .linkbtn { color: var(--err); }
details.minor { margin-top: 8px; font-size: 13px; }
details.minor summary { cursor: pointer; color: var(--blue-deep); font-weight: 600; padding: 4px 0; }
details.minor .tablewrap { margin-top: 6px; }

/* skeletons */
.skel { display: block; height: 12px; border-radius: 4px; background: linear-gradient(90deg, #e7edf4 25%, #f3f6fa 50%, #e7edf4 75%); background-size: 200% 100%; animation: shimmer 1.2s ease-in-out infinite; margin: 6px 0; }
.skel.w40 { width: 40%; } .skel.w60 { width: 60%; } .skel.w80 { width: 80%; } .skel.h28 { height: 28px; }
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { .skel { animation: none; } * { scroll-behavior: auto !important; } }

/* data tables in panels / compare */
.tablewrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 8px; }
.tablewrap.more-r { -webkit-mask-image: linear-gradient(90deg, #000 88%, rgba(0,0,0,.25)); mask-image: linear-gradient(90deg, #000 88%, rgba(0,0,0,.25)); }
.dtable th, .dtable td { text-align: left; padding: 7px 9px; border-bottom: 1px solid var(--line); vertical-align: top; font-size: 13px; }
.dtable thead th { background: var(--light); font: 600 12px/1.3 var(--head); color: var(--muted); white-space: nowrap; }
.dtable td.n, .dtable th.n { text-align: right; white-space: nowrap; }
.dtable td.nowrap { white-space: nowrap; }
.dtable tbody tr:last-child td { border-bottom: 0; }
.permits { min-width: 720px; }

/* notes */
.notes-list { list-style: none; margin: 0 0 14px; padding: 0; display: grid; gap: 10px; }
.notes-list li { border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; }
.notes-list .meta { display: flex; justify-content: space-between; gap: 8px; font-size: 12.5px; color: var(--muted); margin-bottom: 4px; }
.notes-list .text { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 14px; }
.note-form label { display: block; font: 600 13px/1.3 var(--head); color: var(--blue-deep); margin-bottom: 6px; }
.note-form textarea { width: 100%; min-height: 110px; padding: 9px 11px; border: 1px solid var(--line-strong); border-radius: 8px; resize: vertical; font-size: 14px; }
.note-form .row { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 8px; }
.note-form .ctr { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }

/* ---------- compare + about ---------- */
.page { padding: 22px 0 32px; }
.page h1 { font: 700 26px/1.2 var(--head); margin: 0 0 6px; }
.page h2 { font: 700 19px/1.3 var(--head); margin: 0 0 10px; }
.page .lead { margin: 0 0 18px; max-width: 820px; }
.card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; margin-bottom: 18px; box-shadow: var(--shadow); }
.picker { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 340px); gap: 18px; align-items: start; }
.picker fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.picker legend { font: 700 14px/1.3 var(--head); color: var(--blue-deep); margin-bottom: 8px; padding: 0; }
.picks { display: flex; flex-wrap: wrap; gap: 8px; }
.pick { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line-strong); border-radius: 8px; padding: 7px 11px; font-size: 13.5px; cursor: pointer; background: var(--white); min-height: 40px; }
.pick.on { background: var(--sky-2); border-color: #9fb6d3; }
.pick input { width: 17px; height: 17px; accent-color: var(--blue-deep); margin: 0; }
.pick.disabled { opacity: .5; cursor: not-allowed; }
.pick .mono { font-size: 12.5px; white-space: nowrap; }
.addform label { display: block; font: 700 14px/1.3 var(--head); color: var(--blue-deep); margin-bottom: 8px; }
.addform .row { display: flex; gap: 8px; }
.addform input { flex: 1; min-width: 0; height: 40px; padding: 6px 10px; border: 1px solid var(--line-strong); border-radius: 8px; font-size: 14px; }
.addform .msg { font-size: 12.5px; margin: 6px 0 0; min-height: 1em; }
.addform .msg.err { color: var(--err); }
.cmpwrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); box-shadow: var(--shadow); }
.cmp { table-layout: fixed; }
.cmp th, .cmp td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid var(--line); font-size: 13.5px; overflow-wrap: anywhere; }
.cmp tbody th { position: sticky; left: 0; background: var(--light); font: 600 12.5px/1.35 var(--head); color: var(--muted); width: 150px; z-index: 1; }
.cmp thead th { background: var(--white); border-bottom: 2px solid var(--blue-deep); }
.cmp thead th:first-child { position: sticky; left: 0; z-index: 2; background: var(--white); width: 150px; }
.cmp tr.g-tr td { background: #fcfdfe; }
.cmp tr.g-tr:nth-child(6) td, .cmp tr.g-tr:nth-child(6) th { border-bottom: 2px solid var(--line-strong); }
.cmp .colhead { display: flex; justify-content: space-between; align-items: flex-start; gap: 6px; }
.cmp .colhead a { font: 600 15px/1.25 var(--mono); }
.cmp .colhead .sub { display: flex; align-items: center; gap: 5px; margin-top: 3px; font-family: var(--body); font-weight: 400; }
.cmp .rm { border: 1px solid var(--line-strong); background: var(--white); border-radius: 6px; width: 32px; height: 32px; cursor: pointer; display: grid; place-items: center; padding: 0; flex: none; }
.cmp .rm:hover { background: var(--hover); }
.cmp .rm svg { width: 14px; height: 14px; }
.cmp .cg { display: flex; gap: 8px; align-items: flex-start; }
.cmp .cg > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.cmp .cg .g-a { font-size: 14px; }
.cmp .cg .g-b { font-size: 12.5px; }
.about-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.about-grid .card { margin: 0; }
ol.steps { margin: 0; padding-left: 20px; } ol.steps li { margin: 0 0 9px; }
ul.limits { margin: 0; padding-left: 20px; } ul.limits li { margin: 0 0 7px; }
.srcs { margin: 0; padding-left: 20px; font-size: 14px; } .srcs li { margin: 0 0 7px; }

/* ---------- footer ---------- */
.foot { max-width: 1600px; margin: 0 auto; padding: 14px var(--gutter) 28px; color: var(--muted); font-size: 12.5px; border-top: 3px solid var(--blue-deep); }
.foot strong { color: var(--ink); font-family: var(--head); }
.foot p { margin: 4px 0; }

/* ---------- toast ---------- */
.toast { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 2000; background: var(--ink); color: var(--white); padding: 10px 16px; border-radius: 8px; font-size: 14px; box-shadow: var(--shadow); max-width: calc(100vw - 32px); }

/* ---------- login ---------- */
.login-body { min-height: 100vh; display: flex; flex-direction: column; background: var(--light); }
.login-head { background: linear-gradient(90deg, var(--blue-deep), var(--blue)); color: var(--white); }
.login-head .in { max-width: 1100px; margin: 0 auto; padding: 14px var(--gutter); display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.login-head img { width: 300px; height: auto; display: block; }
.login-head .tag { font: 600 12px/1.35 var(--head); letter-spacing: .08em; text-transform: uppercase; text-align: right; }
.login-main { flex: 1; display: grid; place-items: start center; padding: 48px 16px 32px; }
.login-card { width: 100%; max-width: 440px; background: var(--white); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); padding: 28px 28px 24px; }
.login-card h1 { font: 700 23px/1.25 var(--head); margin: 0 0 6px; }
.login-card p { margin: 0 0 18px; color: var(--muted); font-size: 14.5px; }
.login-card label { display: block; font: 600 14px/1.3 var(--head); color: var(--blue-deep); margin-bottom: 7px; }
.login-card input { width: 100%; height: 50px; padding: 8px 14px; border: 1px solid var(--line-strong); border-radius: 8px; font: 500 19px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; background: var(--white); }
.login-card input[aria-invalid="true"] { border-color: var(--err); }
.login-card .btn { width: 100%; margin-top: 14px; min-height: 48px; font-size: 15px; }
.login-msg { margin: 12px 0 0; min-height: 1.4em; font-size: 14px; }
.login-msg.err { color: var(--err); }
.login-help { margin: 18px 0 0 !important; font-size: 13px !important; }

/* ---------- responsive ---------- */
@media (max-width: 1240px) {
  .intro { grid-template-columns: minmax(0, 1fr); grid-template-areas: "t" "f" "l"; }
  .funnel { flex-wrap: wrap; }
}
@media (max-width: 1100px) {
  .explore { grid-template-columns: 360px minmax(0, 1fr); }
  .about-grid { grid-template-columns: 1fr; }
  .picker { grid-template-columns: 1fr; }
}
@media (min-width: 861px) {
  .minimap { display: none; }   /* the main map already frames the parcel */
}
@media (max-width: 860px) {
  :root { --gutter: 16px; }
  .bar .in { padding: 8px var(--gutter); }
  .bar .logo img { width: 190px; }
  .nav a, .nav button { min-height: 44px; }
  .intro { padding: 10px 0 10px; gap: 8px; }
  .intro h1 { font-size: 19px; }
  .meta-line { font-size: 12.5px; }
  .meta-line .prepared { display: block; margin: 0; }
  .meta-line .sep { display: none; }
  .lede { font-size: 13px; }
  /* phone funnel: screened / pass / out on top, the three groups under it */
  .funnel { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
  .funnel .arrow, .passgrp .eq { display: none; }
  .passgrp { display: contents; }
  .tile { min-width: 0; height: 54px; padding: 6px 8px 6px 11px; }
  .tile[aria-pressed="true"] { padding: 5px 7px 5px 10px; }
  .tile .n { font-size: 19px; }
  .tile .l { font-size: 11.5px; white-space: normal; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; }
  .tile .x { display: none; }
  .tile.cat { height: auto; min-height: 54px; }
  .tile.cat .l { -webkit-line-clamp: 3; line-height: 1.2; }
  .tile.all { order: 1; } .tile.pass { order: 2; } .tile.outt { order: 3; } .tile.cat { order: 4; background: var(--sky-2); }
  .explore { display: flex; flex-direction: column; height: auto; overflow: visible; }
  .mapwrap { order: -1; height: 58vh; min-height: 320px; border-bottom: 1px solid var(--line); }
  .side { border-right: 0; }
  .list { overflow: visible; }
  .panel { top: 0; width: 100vw; box-shadow: none; }
  .p-head { padding: 8px 12px 12px 16px; }
  .p-head h2 { font-size: 21px; }
  .hbtn { min-height: 44px; min-width: 44px; justify-content: center; }
  .iconbtn { width: 44px; height: 44px; }
  .g-main { grid-template-columns: 112px minmax(0, 1fr) 16px; }
  .tabpanel { padding: 12px 16px 24px; }
  /* tap targets: 44 px */
  .starbtn { width: 44px; height: 44px; }
  .ptable th.st, .ptable td.st { width: 46px; padding: 2px 0 2px 2px; }
  .chip { min-height: 44px; padding: 4px 12px 4px 10px; }
  .tab { min-height: 44px; }
  .frow input[type=number], .frow select, .sortl select { height: 44px; }
  .cmp .rm { width: 44px; height: 44px; }
  .pick { min-height: 44px; }
  .leaflet-touch .leaflet-control-zoom a, .leaflet-touch .fitctl a { width: 44px; height: 44px; line-height: 44px; }
  .leaflet-touch .leaflet-control-layers-toggle { width: 44px; height: 44px; }
  .leaflet-control-attribution { font-size: 10px; max-width: 60%; line-height: 1.3; }
  .legend { margin-bottom: 28px !important; padding: 0; }
  .legend .lg-btn { display: block; min-height: 44px; padding: 0 14px; border: 0; background: transparent; font: 700 12px/1 var(--head); letter-spacing: .06em; text-transform: uppercase; color: var(--blue-deep); cursor: pointer; }
  .legend:not(.open) .lg-body { display: none; }
  .legend.open .lg-body { padding: 0 11px 9px; }
  .legend.open .lg-body strong { display: none; }
  .ptable .own { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
  .ptable .own.wrap { display: block; -webkit-line-clamp: unset; }
  .ptable th.n, .ptable td.n { width: 58px; padding-right: 10px; }
  .plat-view object { height: 460px; }
  .about-grid { grid-template-columns: 1fr; }
}
@media (max-width: 700px) {
  /* Top 10 on a phone: checks move under the owner, no sideways scroll */
  .t10 { min-width: 0; }
  .t10 .ckc { display: none; }
  .t10 .ck-ph { display: flex; margin-top: 6px; }
  .t10 th, .t10 td { padding: 10px 8px; }
}
@media (max-width: 600px) {
  body { font-size: 14.5px; }
  .bar .in { padding: 6px var(--gutter) 4px; gap: 2px 10px; }
  .bar .logo img { width: 170px; }
  .nav { width: 100%; justify-content: space-between; gap: 2px; margin: 0 -8px; width: calc(100% + 16px); }
  .nav a, .nav button { padding: 8px 10px; font-size: 13.5px; }
  .nav .logout { margin-left: 0; }
  .nav .lo-t, .nav .nav-x { display: none; }
  .nav .logout { width: 44px; justify-content: center; padding: 8px; }
  dl.kv { grid-template-columns: 1fr; }
  dl.kv dt { border-bottom: 0; padding: 8px 0 0; }
  dl.kv dd { padding: 2px 0 8px; }
  .card { padding: 14px 16px; }
  .page h1 { font-size: 22px; }
  .login-head img { width: 220px; }
  .login-head .tag { text-align: left; }
  .login-main { padding: 28px 16px; }
  .login-card { padding: 22px 18px 20px; }
}
@media (max-width: 400px) {
  /* phone parcel header: Star, Compare and close on one row as icons (the label stays for screen readers) */
  .hbtn .hb-t { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
  .hbtn { padding: 6px; }
  .g-main { grid-template-columns: 100px minmax(0, 1fr) 14px; gap: 4px 8px; }
}
@media print {
  .bar, .nav, .filters, .panel, .toast, .skip, .maptop { display: none !important; }
}

/* panel entrance + phone scroll lock */
.panel:not([hidden]) { animation: kcm-slide .2s ease-out; }
@keyframes kcm-slide { from { transform: translateX(28px); opacity: .4; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .panel:not([hidden]) { animation: none; } }
@media (max-width: 860px) { body.panel-open { overflow: hidden; } }
