/* PropertyList — Malta planning register. Brand: navy #192e4d + teal #097783 (logo).
   One family (Archivo); its width axis carries hierarchy: wide = identity, condensed = dense data. */
:root {
  color-scheme: light;
  --paper: #f5f6f2;      /* drafting film */
  --surface: #ffffff;
  --ink: #192e4d;        /* logo navy */
  --ink-2: #4a5562;
  --ink-3: #7d8792;
  --rule: #dde1da;
  --rule-strong: #c5cbc2;
  --brand: #097783;      /* logo teal: actions, granted */
  --brand-soft: #e1f0f1;
  --notice: #f2b705;     /* site-notice amber: new */
  --notice-soft: #fdf3cf;
  --refused: #a8322a;
  --sea: #d9e6ec;
  --sun: #e08a00;        /* sun panel: the chosen day */
  --sun-2: #f2b705;
  --sky: #eef4f8;
  --hill: rgba(140, 104, 62, .38);
  --hill-solid: #b39672;  /* site analysis: land and sea on the skyline panorama */
  --sea-view: #3f8fc4;

  --s-1: 12px; --s0: 14px; --s1: 16px; --s2: 20px; --s3: 26px; --s4: 34px; --s5: 46px;
  --r-sheet: 18px; --r-input: 10px;
  --masthead-h: 60px;
  --tabbar-h: 0px;
  --wide: "wdth" 118;
  --narrow: "wdth" 80;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 400 var(--s1)/1.5 Archivo, system-ui, sans-serif;
  font-variation-settings: "wdth" 100;
  font-feature-settings: "tnum" 1;
}
a { color: var(--brand); text-decoration-thickness: 1px; text-underline-offset: 3px; }
button, input, select { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--notice); outline-offset: 2px; border-radius: 4px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 8px; top: -60px; background: var(--ink); color: #fff; padding: 8px 12px; z-index: 100; border-radius: 8px; }
.skip:focus { top: 8px; }
h1, h2, h3 { margin: 0; font-weight: 750; letter-spacing: -0.01em; line-height: 1.15; }
.muted { color: var(--ink-2); }
.small { font-size: var(--s-1); }

/* ---- masthead ------------------------------------------------------------ */
.masthead {
  position: sticky; top: 0; z-index: 40; height: var(--masthead-h);
  display: flex; align-items: center; gap: 20px; padding: 0 20px;
  background: var(--surface); border-bottom: 1px solid var(--rule);
}
.wordmark { display: flex; align-items: center; flex: none; }
.wordmark img { display: block; height: 26px; width: auto; }
.masthead-search { flex: 1; max-width: 560px; }
.masthead-search input {
  width: 100%; height: 40px; border: 1px solid var(--rule); border-radius: var(--r-input); padding: 0 14px 0 38px;
  background: var(--paper) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' fill='none' stroke='%237d8792' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='8' cy='8' r='6'/%3E%3Cpath d='m13 13 4 4'/%3E%3C/svg%3E") 12px 50% no-repeat;
}
.masthead-search input:focus { background-color: var(--surface); border-color: var(--brand); outline: none; box-shadow: 0 0 0 3px var(--brand-soft); }
.tabs { display: flex; gap: 4px; margin-left: auto; }
.tabs a { display: flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: 999px; color: var(--ink-2); text-decoration: none; font-weight: 600; font-size: var(--s0); }
.tabs a:hover { color: var(--ink); background: var(--paper); }
.tabs a[aria-current="page"] { color: #fff; background: var(--ink); }
.tabs svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* phone: search gets the masthead, tabs move to a bottom bar */
@media (max-width: 767px) {
  :root { --tabbar-h: calc(62px + env(safe-area-inset-bottom)); }
  .masthead { gap: 10px; padding: 0 12px; }
  .wordmark img { height: 20px; }
  .tabs {
    position: fixed; left: 0; right: 0; bottom: 0; height: var(--tabbar-h); margin: 0; gap: 0;
    padding: 6px 8px env(safe-area-inset-bottom); background: var(--surface); border-top: 1px solid var(--rule);
  }
  .tabs a { flex: 1; flex-direction: column; gap: 2px; border-radius: 12px; color: var(--ink-3); font-size: 11px; padding: 6px 4px; }
  .tabs a:hover { background: none; color: var(--ink); }
  .tabs a[aria-current="page"] { background: var(--brand-soft); color: var(--brand); }
  .tabs svg { width: 22px; height: 22px; }
  main { padding-bottom: var(--tabbar-h); }
}

/* ---- list + detail layout ---------------------------------------------- */
.workspace { display: grid; grid-template-columns: 1fr; min-height: calc(100dvh - var(--masthead-h)); }
.filters-rail { display: none; }
.detail-pane { display: none; }
@media (min-width: 1100px) {
  .workspace { grid-template-columns: minmax(380px, 460px) 1fr; }
  .list-pane { border-right: 1px solid var(--rule); height: calc(100dvh - var(--masthead-h)); overflow-y: auto; }
  .detail-pane { display: block; height: calc(100dvh - var(--masthead-h)); overflow-y: auto; }
  .workspace.reading .list-pane { display: block; }
}
@media (min-width: 1500px) {
  .workspace { grid-template-columns: 280px minmax(400px, 480px) 1fr; }
  .filters-rail { display: block; min-width: 0; height: calc(100dvh - var(--masthead-h)); overflow-y: auto; overflow-x: hidden; border-right: 1px solid var(--rule); background: var(--surface); padding: 20px; }
  .open-filters { display: none !important; }
}
/* phone/tablet: reading a permit replaces the list */
@media (max-width: 1099px) {
  .workspace.reading .list-pane { display: none; }
  .workspace.reading .detail-pane { display: block; }
}

/* ---- list ------------------------------------------------------------------ */
.list-head { padding: 20px 16px 12px; }
.list-head h1 { font-size: var(--s3); font-variation-settings: var(--wide); }
.list-head p { margin: 6px 0 0; color: var(--ink-2); font-size: var(--s0); }
.toolbar { position: sticky; top: 0; z-index: 5; display: flex; gap: 8px; align-items: center; padding: 10px 16px; background: var(--paper); border-bottom: 1px solid var(--rule); overflow-x: auto; scrollbar-width: none; }
@media (max-width: 1099px) { .toolbar { top: var(--masthead-h); } }
.toolbar::-webkit-scrollbar { display: none; }
.chip {
  flex: none; display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px;
  border: 1px solid var(--rule-strong); border-radius: 999px; background: var(--surface);
  font-size: var(--s0); font-weight: 600; cursor: pointer; white-space: nowrap; text-decoration: none; color: var(--ink);
}
.chip:hover { border-color: var(--ink-3); }
.chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.chip.removable::after { content: "×"; font-size: 16px; line-height: 1; opacity: .7; }
.chip .count { font-weight: 500; color: var(--ink-3); }
.chip[aria-pressed="true"] .count { color: rgba(255, 255, 255, .7); }
.chip.ghost { border-style: dashed; }
.result-meta { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 16px 8px; font-size: var(--s0); color: var(--ink-2); }
.result-meta select { border: 0; background: none; font-weight: 600; color: var(--ink); padding: 4px; cursor: pointer; }
.result-meta .feeds { display: flex; gap: 12px; }
.result-meta .feeds a { font-weight: 600; text-decoration: none; font-size: var(--s-1); }

.register { list-style: none; margin: 0; padding: 0; }
.register li + li { border-top: 1px solid var(--rule); }
.row {
  display: grid; grid-template-columns: 26px 1fr; gap: 2px 12px; padding: 14px 16px;
  color: inherit; text-decoration: none; background: var(--paper);
}
.row:hover { background: #eef0ea; }
.row[aria-current="true"] { background: var(--surface); box-shadow: inset 4px 0 0 var(--brand); }
.row .glyph { grid-column: 1; grid-row: 1 / span 4; align-self: start; padding-top: 4px; }
.row > :not(.glyph) { grid-column: 2; min-width: 0; }
.row-top { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.case { font-weight: 750; font-variation-settings: var(--wide); letter-spacing: 0.01em; }
.row .case { font-size: var(--s0); }
.row .place { font-weight: 600; }
.row .desc { color: var(--ink-2); font-size: var(--s0); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.row .facts { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: var(--s-1); color: var(--ink-3); font-variation-settings: var(--narrow); margin-top: 4px; }
.row .facts b { color: var(--ink-2); font-weight: 600; }

.status { display: inline-flex; align-items: center; gap: 6px; font-size: var(--s-1); font-weight: 650; font-variation-settings: var(--narrow); }
.status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.status.pending { color: #9a6a00; }
.status.approved { color: var(--brand); }
.status.refused { color: var(--refused); }
.status.withdrawn, .status.suspended, .status.unknown { color: var(--ink-3); }
.status.appeal { color: #3f4fa8; }
.new-flag { font-size: 11px; font-weight: 700; background: var(--notice); color: var(--ink); border-radius: 4px; padding: 1px 6px; }

.more { display: block; width: calc(100% - 32px); margin: 16px; height: 46px; border-radius: var(--r-input); border: 1px solid var(--rule-strong); background: var(--surface); font-weight: 650; cursor: pointer; }
.more:hover { border-color: var(--ink-3); }
.empty { padding: 48px 24px; text-align: center; color: var(--ink-2); }
.empty h2 { font-size: var(--s2); color: var(--ink); margin-bottom: 8px; }

/* floor-stack glyph */
.glyph svg { display: block; }
.glyph .floor { fill: var(--ink); }
.glyph .floor.rec { fill: var(--ink-3); }
.glyph .ground { stroke: var(--ink-3); stroke-width: 1; }
.glyph.unknown .floor { fill: var(--rule-strong); }

/* ---- filters (rail on wide screens, sheet elsewhere) ---------------------- */
.filter-form { display: grid; gap: 22px; min-width: 0; }
.filter-form > * { min-width: 0; }
.filter-form fieldset { border: 0; margin: 0; padding: 0; display: grid; gap: 8px; }
.filter-form legend, .filter-form .label { font-weight: 700; font-size: var(--s0); margin-bottom: 4px; padding: 0; }
.filter-form .hint { font-size: var(--s-1); color: var(--ink-3); margin-top: -4px; }
.chipset { display: flex; flex-wrap: wrap; gap: 6px; }
.chipset label { position: relative; }
.chipset input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.chipset span { display: inline-flex; gap: 6px; align-items: center; min-height: 32px; padding: 5px 12px; line-height: 1.25; border-radius: 999px; border: 1px solid var(--rule-strong); background: var(--surface); font-size: var(--s0); font-weight: 600; }
.chipset input:checked + span { background: var(--ink); color: #fff; border-color: var(--ink); }
.chipset input:focus-visible + span { outline: 3px solid var(--notice); outline-offset: 2px; }
.dev-types { margin: 12px 0; }
.dev-types-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-bottom: 6px; }
.dev-types-note { margin: 6px 0 0; }
.map-panel .dev-types-note { display: block; margin: 6px 0 0; }
.map-panel .dev-types .chipset { gap: 4px; }
.map-panel .dev-types .chipset span { min-height: 28px; padding: 3px 9px; font-size: var(--s-1); }
.dev-quick { display: flex; gap: 6px; padding: 10px 16px 0; overflow-x: auto; scrollbar-width: none; }
.dev-quick .chip { flex: none; }
@media (min-width: 1500px) { .dev-quick { display: none; } }
@media (max-width: 767px) {
  .map-panel .dev-types .chipset { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
  .map-panel .dev-types .chipset label { flex: none; }
  .map-panel .dev-types-note { display: none; }
}
.chipset .n { color: var(--ink-3); font-weight: 500; font-size: var(--s-1); }
.chipset input:checked + span .n { color: rgba(255, 255, 255, .7); }
.field { display: grid; gap: 6px; }
.field input, .field select { height: 42px; border: 1px solid var(--rule-strong); border-radius: var(--r-input); background: var(--surface); padding: 0 12px; width: 100%; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.months-pick { display: grid; gap: 6px; }
.months-pick .chip { height: 30px; padding: 0 10px; font-size: var(--s-1); }
.stepper { display: flex; align-items: center; gap: 0; border: 1px solid var(--rule-strong); border-radius: var(--r-input); background: var(--surface); width: max-content; }
.stepper button { width: 42px; height: 40px; border: 0; background: none; font-size: 20px; cursor: pointer; }
.stepper output { min-width: 64px; text-align: center; font-weight: 650; }

dialog.sheet { border: 0; padding: 0; width: min(560px, 100%); max-height: min(88dvh, 900px); border-radius: var(--r-sheet); background: var(--surface); color: var(--ink); box-shadow: 0 30px 80px rgba(24, 33, 43, .35); }
dialog.sheet::backdrop { background: rgba(24, 33, 43, .45); }
.sheet-inner { display: flex; flex-direction: column; max-height: inherit; }
.sheet-head { display: flex; justify-content: space-between; align-items: center; padding: 16px 20px; border-bottom: 1px solid var(--rule); }
.sheet-head h2 { font-size: var(--s2); }
.sheet-body { overflow-y: auto; padding: 20px; }
.sheet-foot { display: flex; gap: 10px; padding: 14px 20px calc(14px + env(safe-area-inset-bottom)); border-top: 1px solid var(--rule); }
@media (max-width: 767px) {
  dialog.sheet { margin: auto 0 0; width: 100%; max-width: 100%; border-radius: var(--r-sheet) var(--r-sheet) 0 0; }
  dialog.sheet[open] { animation: sheet-up .22s ease-out; }
}
@keyframes sheet-up { from { transform: translateY(40px); opacity: .6; } }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; padding: 0 18px; border-radius: var(--r-input); border: 1px solid var(--rule-strong); background: var(--surface); font-weight: 650; cursor: pointer; text-decoration: none; color: var(--ink); }
.btn:hover { border-color: var(--ink-3); }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; flex: 1; }
.btn.primary:hover { background: #07636c; }
.icon-btn { width: 40px; height: 40px; border-radius: 50%; border: 0; background: none; cursor: pointer; font-size: 22px; line-height: 1; color: var(--ink-2); }
.icon-btn:hover { background: var(--paper); }

/* ---- detail -------------------------------------------------------------------- */
.detail { max-width: 920px; padding: 20px 16px 48px; }
@media (min-width: 768px) { .detail { padding: 32px 32px 64px; } }
.back { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; text-decoration: none; margin-bottom: 18px; }
@media (min-width: 1100px) { .back { display: none; } }
.detail-head { display: grid; grid-template-columns: 1fr auto; gap: 16px; align-items: end; padding-bottom: 22px; border-bottom: 2px solid var(--ink); }
.detail-head .case { font-size: clamp(30px, 6vw, var(--s5)); line-height: 1; letter-spacing: -0.01em; font-variation-settings: "wdth" 125; display: block; margin: 8px 0 12px; }
.detail-head .address { font-size: var(--s2); font-weight: 600; line-height: 1.3; max-width: 34ch; }
.detail-head .tags { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; }
.category { font-size: var(--s-1); font-weight: 650; color: var(--ink-2); }
.big-glyph { text-align: center; font-size: var(--s-1); color: var(--ink-2); font-variation-settings: var(--narrow); }
.big-glyph svg { display: block; margin: 0 auto 6px; }
.big-glyph .floor { fill: var(--ink); }
.big-glyph .floor.rec { fill: var(--ink-3); }
.big-glyph .ground { stroke: var(--ink); stroke-width: 2; }
.big-glyph .basement { fill: none; stroke: var(--ink-3); stroke-dasharray: 3 2; }
@media (prefers-reduced-motion: no-preference) {
  .big-glyph .floor { animation: build .35s cubic-bezier(.2, .7, .3, 1) both; animation-delay: calc(var(--i) * 70ms + 120ms); transform-box: fill-box; transform-origin: bottom; }
}
@keyframes build { from { transform: scaleY(0); opacity: 0; } }

.works { font-size: var(--s2); line-height: 1.45; margin: 22px 0 0; max-width: 62ch; }
.detail-grid { display: grid; gap: 28px; margin-top: 30px; }
@media (min-width: 1300px) { .detail-grid { grid-template-columns: minmax(0, 1fr) 300px; } }
.block h2 { font-size: var(--s1); font-variation-settings: var(--wide); margin-bottom: 12px; }
.block + .block { margin-top: 30px; }

/* progress through the PA process — a real sequence */
.steps { list-style: none; margin: 0; padding: 0; }
.steps li { position: relative; display: grid; grid-template-columns: 22px 1fr auto; gap: 12px; padding: 0 0 18px; }
.steps li::before { content: ""; position: absolute; left: 10px; top: 14px; bottom: -2px; width: 2px; background: var(--rule-strong); }
.steps li:last-child::before { display: none; }
.steps .dot { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--rule-strong); background: var(--paper); position: relative; z-index: 1; }
.steps li.done .dot { background: var(--brand); border-color: var(--brand); }
.steps li.done::before { background: var(--brand); }
.steps li.next .dot { border-color: var(--notice); background: var(--notice-soft); }
.steps li.refused .dot { background: var(--refused); border-color: var(--refused); }
.steps .what { font-weight: 650; }
.steps .note { display: block; font-size: var(--s-1); color: var(--ink-2); font-weight: 400; }
.steps .when { font-size: var(--s0); color: var(--ink-2); white-space: nowrap; font-variation-settings: var(--narrow); }
.steps li.unknown .what, .steps li.unknown .when { color: var(--ink-3); }

.facts-list { display: grid; grid-template-columns: max-content 1fr; gap: 8px 18px; margin: 0; font-size: var(--s0); }
.facts-list dt { color: var(--ink-2); }
.facts-list dd { margin: 0; font-weight: 550; }
.side-actions { display: grid; gap: 8px; }
.side-actions .btn { justify-content: flex-start; }
.height-context { background: var(--surface); border: 1px solid var(--rule); border-radius: 12px; padding: 14px 16px; font-size: var(--s0); }
.history { list-style: none; margin: 0; padding: 0; font-size: var(--s0); display: grid; gap: 10px; }
.history time { display: block; font-size: var(--s-1); color: var(--ink-3); }
.docs-empty { font-size: var(--s0); color: var(--ink-2); background: var(--surface); border: 1px dashed var(--rule-strong); border-radius: 12px; padding: 14px 16px; }
.eapps-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 0 0 12px; }
.doc-list { list-style: none; margin: 0; padding: 0; }
.doc-list li { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-top: 1px solid var(--rule); font-size: var(--s0); }

/* location image (self-drawn, no map embed) */
.locmap-link { display: block; position: relative; border-radius: 12px; overflow: hidden; border: 1px solid var(--rule); text-decoration: none; }
.locmap-link .open { position: absolute; left: 10px; bottom: 10px; background: var(--surface); color: var(--ink); border-radius: 8px; padding: 6px 10px; font-size: var(--s-1); font-weight: 650; box-shadow: 0 2px 8px rgba(24, 33, 43, .18); }
.locmap { display: block; width: 100%; height: auto; aspect-ratio: 1 / 0.62; }
.locmap .sea { fill: var(--sea); }
.locmap .loc { fill: #fbfbf8; stroke: #b9c0b6; stroke-width: 0.00012; }
.locmap .loc-here { fill: var(--notice-soft); stroke: #9a6a00; stroke-width: 0.0003; }
.locmap .pin { fill: var(--refused); stroke: #fff; stroke-width: 0.0002; }
.locnote { font-size: var(--s-1); color: var(--ink-3); margin: 6px 0 0; }

/* overview shown in the detail pane before a permit is picked */
.overview { padding: 32px; max-width: 920px; }
.overview h2 { font-size: var(--s3); font-variation-settings: var(--wide); margin-bottom: 6px; }
.overview .lede { color: var(--ink-2); margin: 0 0 28px; max-width: 60ch; }
.overview-grid { display: grid; gap: 32px; grid-template-columns: 1fr 1fr; }
.bars { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: var(--s0); }
.bars li a { display: grid; grid-template-columns: 130px 1fr 52px; gap: 10px; align-items: center; color: inherit; text-decoration: none; }
.bars .bar { height: 10px; background: var(--brand); border-radius: 0 3px 3px 0; }
.bars .n { text-align: right; color: var(--ink-2); font-variation-settings: var(--narrow); }
.compact { list-style: none; margin: 0; padding: 0; }
.compact li { border-top: 1px solid var(--rule); }
.compact a { display: block; padding: 10px 0; color: inherit; text-decoration: none; font-size: var(--s0); }
.compact a:hover .case { color: var(--brand); }

/* ---- map ------------------------------------------------------------------------ */
.mapview { position: relative; height: calc(100dvh - var(--masthead-h) - var(--tabbar-h)); }
#map { position: absolute; inset: 0; background: var(--sea); }
.map-panel {
  position: absolute; z-index: 500; top: 12px; left: 12px; width: min(340px, calc(100% - 24px));
  background: var(--surface); border-radius: 14px; box-shadow: 0 8px 30px rgba(24, 33, 43, .2); padding: 14px 16px;
}
.map-panel h1 { font-size: var(--s2); font-variation-settings: var(--wide); }
.map-panel p { margin: 6px 0 12px; font-size: var(--s-1); color: var(--ink-2); }
.map-panel .views { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.map-panel .views button { height: 36px; border: 1px solid var(--rule-strong); border-radius: 8px; background: var(--surface); font-size: var(--s-1); font-weight: 650; cursor: pointer; }
.map-panel .views button[aria-pressed="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }
.map-panel details { margin-top: 12px; }
.map-panel summary { cursor: pointer; font-weight: 650; font-size: var(--s0); }
.map-panel .field { margin-top: 10px; }
.map-panel .field select { height: 38px; }
.map-note { position: absolute; z-index: 500; right: 12px; top: 12px; max-width: 300px; background: rgba(255, 255, 255, .92); border-radius: 10px; padding: 8px 12px; font-size: var(--s-1); color: var(--ink-2); }
@media (max-width: 767px) {
  .map-panel { top: auto; bottom: 12px; padding: 12px 14px; }
  .map-panel p { display: none; }
  .map-note { left: 12px; right: 12px; max-width: none; }
}
.legend { background: var(--surface); padding: 10px 12px; border-radius: 10px; box-shadow: 0 2px 10px rgba(24, 33, 43, .15); font: 500 12px/1.4 Archivo, sans-serif; }
.legend b { display: block; margin-bottom: 6px; font-weight: 700; }
.legend .ramp { display: flex; }
.legend .ramp i { flex: 1; height: 12px; min-width: 18px; }
.legend .ends { display: flex; justify-content: space-between; color: var(--ink-2); margin-top: 3px; }
.legend .sw { display: flex; align-items: center; gap: 6px; }
.legend .sw i { width: 10px; height: 10px; border-radius: 50%; }
@media (max-width: 767px) { .legend { display: none; } }
.leaflet-container { font: 14px/1.45 Archivo, system-ui, sans-serif; }
.leaflet-popup-content { margin: 12px 14px; }
.leaflet-popup-content ul { padding-left: 16px; margin: 6px 0; max-height: 180px; overflow: auto; }
.leaflet-tooltip { font-weight: 650; }

/* ---- updates (status) ------------------------------------------------------------ */
.page { max-width: 980px; margin: 0 auto; padding: 28px 16px 48px; }
.page h1 { font-size: var(--s4); font-variation-settings: var(--wide); }
.page .lede { color: var(--ink-2); margin: 8px 0 28px; max-width: 62ch; }
.update-grid { display: grid; gap: 28px; }
@media (min-width: 900px) { .update-grid { grid-template-columns: 1fr 1fr; } }
.panel { background: var(--surface); border: 1px solid var(--rule); border-radius: 14px; padding: 20px; }
.panel h2 { font-size: var(--s1); font-variation-settings: var(--wide); margin-bottom: 14px; }
.weeks { display: flex; align-items: flex-end; gap: 3px; height: 90px; }
.weeks div { flex: 1; background: var(--brand); border-radius: 2px 2px 0 0; min-height: 2px; }
table.plain { width: 100%; border-collapse: collapse; font-size: var(--s0); }
table.plain th, table.plain td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--rule); }
table.plain th { font-weight: 650; color: var(--ink-2); }
table.plain td.num, table.plain th.num { text-align: right; }

.loading { padding: 40px 16px; color: var(--ink-3); }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* ---- assistant ------------------------------------------------------------------ */
.ask { margin-top: 16px; background: var(--surface); border: 1px solid var(--rule); border-radius: 14px; padding: 12px; }
.ask-label { display: block; font-weight: 700; font-size: var(--s0); margin: 0 0 8px 2px; }
.ask-row { display: flex; gap: 8px; }
.ask-row input { flex: 1; min-width: 0; height: 44px; border: 1px solid var(--rule-strong); border-radius: var(--r-input); padding: 0 12px; background: var(--paper); }
.ask-row input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); background: var(--surface); }
.ask-row .btn.primary { flex: none; }
.ask-examples { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 8px; }
.link-btn { border: 0; background: none; padding: 2px; color: var(--brand); font-size: var(--s-1); font-weight: 600; cursor: pointer; text-align: left; text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.ask-error { color: var(--refused); font-size: var(--s0); margin: 8px 2px 0; }
.ask-view .question { font-size: clamp(22px, 3vw, var(--s3)); font-variation-settings: "wdth" 110; max-width: 34ch; margin: 4px 0 18px; }
.ask-view .question.earlier { font-size: var(--s1); color: var(--ink-2); margin-top: 28px; }
.answer { max-width: 70ch; line-height: 1.6; }
.answer.earlier { color: var(--ink-2); font-size: var(--s0); }
.answer h3 { font-size: var(--s1); margin: 22px 0 8px; font-variation-settings: var(--wide); }
.answer p { margin: 0 0 12px; }
.answer ul, .answer ol { padding-left: 22px; margin: 0 0 12px; }
.answer li { margin-bottom: 4px; }
.answer code { font-size: .9em; background: var(--paper); padding: 1px 5px; border-radius: 4px; }
.table-wrap { overflow-x: auto; margin: 8px 0 16px; }
.ask-state { color: var(--ink-2); font-weight: 600; }
.ask-state.working::before { content: ""; display: inline-block; width: 10px; height: 10px; margin-right: 10px; border-radius: 50%; background: var(--notice); vertical-align: 0; }
@media (prefers-reduced-motion: no-preference) { .ask-state.working::before { animation: pulse 1.2s ease-in-out infinite; } }
@keyframes pulse { 50% { opacity: .25; } }
.ask-steps { color: var(--ink-3); font-size: var(--s-1); padding-left: 20px; margin: 0 0 16px; font-variation-settings: var(--narrow); }

.rail-title { font-size: var(--s1); font-variation-settings: var(--wide); margin-bottom: 18px; }
.block-title { font-size: var(--s1); font-variation-settings: var(--wide); margin-bottom: 12px; }
.wide-panel { grid-column: 1 / -1; }

/* ---- network ------------------------------------------------------------------------ */
.owner-panel { background: var(--surface); border: 1px solid var(--rule); border-radius: 14px; padding: 16px; }
.owner-line { font-size: var(--s0); color: var(--ink-2); margin: 0 0 12px; }
.claim-card { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--rule); font-size: var(--s0); }
.claim-card p { color: var(--ink-2); margin: 4px 0 10px; }
.form-stack { display: grid; gap: 14px; }
.form-stack textarea { width: 100%; border: 1px solid var(--rule-strong); border-radius: var(--r-input); padding: 10px 12px; font: inherit; background: var(--surface); resize: vertical; }
.form-stack fieldset { border: 0; padding: 0; margin: 0; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: var(--s0); line-height: 1.4; }
.check input { margin-top: 3px; width: 18px; height: 18px; accent-color: var(--brand); flex: none; }
.checks-list { display: grid; gap: 8px; margin-top: 6px; }
.form-error { color: var(--refused); font-size: var(--s0); margin: 0; min-height: 1px; }
.form-done h3 { font-size: var(--s2); margin-bottom: 8px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; }

/* ---- admin ---------------------------------------------------------------------------- */
.admin { display: grid; grid-template-columns: 1fr; min-height: calc(100dvh - var(--masthead-h)); }
@media (min-width: 900px) { .admin { grid-template-columns: 240px 1fr; } }
.admin-nav { background: var(--surface); border-right: 1px solid var(--rule); padding: 20px 14px; }
.admin-nav nav { display: grid; gap: 2px; margin: 12px 0 18px; }
.admin-nav a { display: flex; justify-content: space-between; align-items: center; padding: 9px 12px; border-radius: 10px; color: var(--ink); text-decoration: none; font-weight: 600; font-size: var(--s0); }
.admin-nav a:hover { background: var(--paper); }
.admin-nav a[aria-current="page"] { background: var(--ink); color: #fff; }
.admin-nav b { background: var(--notice); color: var(--ink); border-radius: 999px; padding: 0 8px; font-size: 12px; }
.admin-who { font-size: var(--s-1); color: var(--ink-3); margin: 0 12px; word-break: break-all; }
.admin-body { padding: 24px 16px 60px; max-width: 1000px; }
@media (min-width: 900px) { .admin-body { padding: 32px; } }
.admin-body h1 { font-size: var(--s3); font-variation-settings: var(--wide); }
.admin-body .lede { color: var(--ink-2); max-width: 70ch; margin: 6px 0 16px; }
.admin-banner { background: var(--notice-soft); border: 1px solid #ecd27a; border-radius: 10px; padding: 10px 14px; font-size: var(--s0); }
.admin-banner.ok { background: var(--brand-soft); border-color: #a9d3d7; }
.admin-filter { position: static; background: none; border: 0; padding: 0 0 14px; flex-wrap: wrap; }
.admin-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.admin-list .panel p { margin: 6px 0; }
.admin-row-head { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: baseline; }
.admin-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 10px; }
.admin-actions select { height: 36px; border: 1px solid var(--rule-strong); border-radius: 8px; padding: 0 8px; margin-left: 6px; }
.admin blockquote { margin: 8px 0; padding: 8px 12px; border-left: 3px solid var(--rule-strong); background: var(--paper); white-space: pre-wrap; font-size: var(--s0); }
.admin pre { white-space: pre-wrap; font-size: 12px; background: var(--paper); padding: 10px; border-radius: 8px; overflow-x: auto; }
.admin-service { margin-top: 24px; }
.admin-service h2 { font-size: var(--s1); font-variation-settings: var(--wide); margin-bottom: 10px; }
.admin-login { max-width: 460px; }
.wa-layout { display: grid; gap: 16px; }
@media (min-width: 1100px) { .wa-layout { grid-template-columns: 300px 1fr; } }
.wa-list { list-style: none; margin: 0; padding: 0; background: var(--surface); border: 1px solid var(--rule); border-radius: 12px; max-height: 70vh; overflow-y: auto; }
.wa-list li + li { border-top: 1px solid var(--rule); }
.wa-list a { display: grid; gap: 2px; padding: 10px 14px; color: inherit; text-decoration: none; }
.wa-list a[aria-current="true"] { background: var(--brand-soft); }
.wa-thread { background: var(--surface); border: 1px solid var(--rule); border-radius: 12px; padding: 14px; min-height: 300px; }
.wa-head { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; margin-bottom: 8px; }
.wa-messages { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 8px; max-height: 55vh; overflow-y: auto; }
.wa-messages li { max-width: 80%; padding: 8px 12px; border-radius: 12px; white-space: pre-wrap; font-size: var(--s0); }
.wa-messages li.in { background: var(--paper); justify-self: start; }
.wa-messages li.out { background: var(--brand-soft); justify-self: end; }
.wa-messages li.out.human { background: #e4e8f1; }
.wa-messages time { display: block; font-size: 11px; color: var(--ink-3); margin-top: 4px; }

/* ---- area analysis ------------------------------------------------------------------- */
.area-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 12px; }
.area-head h2 { margin: 0; }
.seg { display: inline-flex; border: 1px solid var(--rule-strong); border-radius: 999px; overflow: hidden; }
.seg button { border: 0; background: var(--surface); padding: 6px 12px; font-weight: 600; font-size: var(--s-1); cursor: pointer; }
.seg button[aria-pressed="true"] { background: var(--ink); color: #fff; }
.area-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 1px; background: var(--rule); border: 1px solid var(--rule); border-radius: 12px; overflow: hidden; margin: 0 0 14px; }
.area-stats div { background: var(--surface); padding: 12px 14px; }
.area-stats b { display: block; font-size: var(--s2); font-variation-settings: var(--wide); }
.area-stats span { font-size: var(--s-1); color: var(--ink-2); }
.estimate { border: 1px solid var(--rule); border-left: 4px solid var(--brand); background: var(--surface); border-radius: 10px; padding: 12px 14px; margin-bottom: 12px; }
.estimate p { margin: 4px 0; }
.estimate-figure b { font-size: var(--s3); font-variation-settings: var(--wide); color: var(--brand); margin-right: 6px; }
.compact-register .row { padding: 10px 0; background: none; }

/* ---- periti / applicants --------------------------------------------------------------- */
.board .lede, .profile .lede { color: var(--ink-2); max-width: 70ch; margin: 8px 0 20px; }
.board-filters { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); margin-bottom: 12px; }
.quick-board { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.board-table td, .board-table th { white-space: nowrap; }
.board-table td:nth-child(2) { white-space: normal; min-width: 180px; }
.profile-grid { display: grid; gap: 28px; margin: 24px 0; }
@media (min-width: 900px) { .profile-grid { grid-template-columns: 1.3fr 1fr; } }
.cat-bars li { display: grid; grid-template-columns: 170px 1fr 120px; gap: 10px; align-items: center; }
.bars .n { white-space: nowrap; }

/* ---- typeahead ---------------------------------------------------------------------------- */
.masthead-search { position: relative; }
.suggest { position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 60; background: var(--surface); border: 1px solid var(--rule); border-radius: 12px; box-shadow: 0 12px 30px rgba(24, 33, 43, .18); padding: 6px; max-height: 70vh; overflow-y: auto; }
.suggest button { display: grid; grid-template-columns: 72px 1fr; gap: 10px; align-items: center; width: 100%; text-align: left; border: 0; background: none; padding: 8px 10px; border-radius: 8px; cursor: pointer; color: var(--ink); }
.suggest button[aria-selected="true"], .suggest button:hover { background: var(--paper); }
.suggest .kind { font-size: 11px; font-weight: 700; color: var(--ink-3); }
.suggest small { display: block; color: var(--ink-2); font-size: var(--s-1); }

/* ---- server-rendered content (shown until the app loads; what search engines read) ----- */
.ssr { max-width: 900px; margin: 0 auto; padding: 24px 16px 48px; }
.ssr h1 { font-size: var(--s4); font-variation-settings: var(--wide); margin: 10px 0; }
.ssr h2 { font-size: var(--s2); margin: 28px 0 10px; }
.ssr .crumbs { font-size: var(--s-1); color: var(--ink-3); }
.ssr-lede { color: var(--ink-2); font-size: var(--s1); }
.ssr dl { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; font-size: var(--s0); }
.ssr dd { margin: 0; }
.ssr ul { padding-left: 18px; }
.ssr li { margin-bottom: 6px; }
.ssr-meta { color: var(--ink-3); font-size: var(--s-1); }
.ssr-cols { columns: 3 220px; }
.ssr-pages { display: flex; gap: 14px; margin-top: 16px; }

/* ---- status: progress track, banner, explainer ------------------------------------------- */
.track { display: inline-flex; gap: 2px; align-items: center; vertical-align: middle; }
.track i { width: 9px; height: 6px; border-radius: 2px; background: var(--rule-strong); }
.track i.on { background: #c98a00; }
.track.granted i.on { background: var(--brand); }
.track.refused i.on { background: var(--brand); }
.track.refused i.on:last-child { background: var(--refused); }
.track.withdrawn i.on { background: var(--ink-3); }
.track.unknown { width: 64px; height: 6px; border-radius: 2px; background: repeating-linear-gradient(90deg, var(--rule-strong) 0 9px, transparent 9px 11px); opacity: .6; }
.status-banner { display: grid; gap: 6px; margin: 18px 0 0; padding: 14px 16px; border-radius: 12px; border: 1px solid var(--rule); border-left-width: 5px; background: var(--surface); }
.status-banner p { margin: 0; max-width: 70ch; }
.status-banner .track i { width: 22px; height: 8px; }
.status-banner.approved { border-left-color: var(--brand); background: var(--brand-soft); }
.status-banner.refused { border-left-color: var(--refused); background: #fbecea; }
.status-banner.pending { border-left-color: var(--notice); background: var(--notice-soft); }
.status-banner.withdrawn, .status-banner.suspended, .status-banner.unknown { border-left-color: var(--ink-3); }
.status-banner .link-btn { justify-self: start; }
.status-help { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 14px; }
.status-help li { display: grid; grid-template-columns: 80px 1fr; gap: 12px; align-items: start; }
.status-help li .track { margin-top: 6px; }
.status-help p { margin: 2px 0 0; color: var(--ink-2); font-size: var(--s0); }
/* grid children must be allowed to shrink below their content (long chip rows, tables) */
.workspace > *, .list-pane, .detail-pane { min-width: 0; }

/* ---- verification, contact card ------------------------------------------------------- */
.verify-slot:empty { display: none; }
.verify-slot { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--rule); font-size: var(--s0); }
.verify-cta { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; }
.verify-cta p { margin: 0; flex: 1 1 260px; color: var(--ink-2); }
.verify-steps ol { margin: 0 0 10px; padding-left: 20px; }
.verify-cta[data-verify-form] { display: block; }
.verify-cta[data-verify-form] p { margin: 0 0 8px; }
.verify-row { display: flex; gap: 8px; margin: 8px 0; flex-wrap: wrap; }
.verify-row input { flex: 1 1 180px; min-width: 0; height: 42px; border: 1px solid var(--rule-strong); border-radius: var(--r-input); padding: 0 12px; font-size: var(--s1); background: var(--surface); color: var(--ink); }
.verify-row input:focus { border-color: var(--brand); outline: none; box-shadow: 0 0 0 3px var(--brand-soft); }
.verify-row .code-input { flex: 0 1 170px; letter-spacing: .4em; font-variant-numeric: tabular-nums; font-weight: 700; text-align: center; }
.verify-steps p { margin: 0 0 6px; }
.verify-steps .form-error:empty, .verify-cta .form-error:empty { display: none; }
.verify-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.verify-ok { margin: 0; color: var(--brand); font-weight: 600; }
.contact-card { background: var(--surface); border: 1px solid var(--rule); border-left: 4px solid var(--brand); border-radius: 12px; padding: 16px 18px; margin: 0 0 22px; max-width: 760px; }
.contact-card p { margin: 0 0 10px; }
.ssr .contact { background: var(--surface); border: 1px solid var(--rule); border-radius: 12px; padding: 4px 16px 12px; margin: 12px 0; }

/* ---- insights charts ------------------------------------------------------------------- */
.insights .lede { color: var(--ink-2); margin: 8px 0 20px; }
.insight-grid { display: grid; gap: 20px; margin-top: 20px; }
@media (min-width: 900px) { .insight-grid { grid-template-columns: 1fr 1fr; } }
.insights .panel h2 { margin-bottom: 4px; }
.brief { margin-top: 20px; }
.brief .answer h3 { margin-top: 0; font-size: var(--s2); }
.chart { width: 100%; height: auto; display: block; margin-top: 10px; overflow: visible; }
.chart .bar { fill: var(--brand); }
.chart .hit { fill: transparent; }
.chart g:hover .bar { fill: #07636c; }
.chart .grid { stroke: var(--rule); stroke-width: 1; }
.chart .baseline { stroke: var(--ink-3); stroke-width: 1; }
.chart .axis { font-size: 11px; fill: var(--ink-3); font-family: Archivo, sans-serif; }
.chart .line { fill: none; stroke: var(--brand); stroke-width: 2; }
.chart .dot { fill: var(--brand); stroke: var(--surface); stroke-width: 2; }
.chart g:hover .dot { r: 6; }
.chart-tip { position: fixed; left: 0; top: 0; z-index: 80; pointer-events: none; background: var(--ink); color: #fff; font-size: 12px; line-height: 1.4; padding: 6px 9px; border-radius: 6px; box-shadow: 0 4px 14px rgba(24, 33, 43, .25); }
.chart-data { margin-top: 8px; font-size: var(--s-1); }
.chart-data summary { cursor: pointer; color: var(--ink-2); }
.hbars li a, .hbars li .hb { display: grid; grid-template-columns: 150px 1fr 150px; gap: 10px; align-items: center; color: inherit; text-decoration: none; }
.hbars .bar { height: 10px; background: var(--brand); border-radius: 0 4px 4px 0; min-width: 2px; }
.hbars li:hover .bar { background: #07636c; }
@media (max-width: 600px) { .hbars li a, .hbars li .hb { grid-template-columns: 110px 1fr 100px; } }

/* ---- street / area report ------------------------------------------------------------- */
.area-grid { display: grid; gap: 20px; margin: 4px 0 12px; }
@media (min-width: 700px) { .area-grid { grid-template-columns: 1fr 1fr; } }
.hist { display: flex; align-items: flex-end; gap: 4px; height: 90px; padding-bottom: 18px; position: relative; }
.hcol { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; position: relative; max-width: 36px; }
.hcol span { display: block; width: 100%; background: var(--brand); border-radius: 4px 4px 0 0; min-height: 2px; }
.hcol.mine span { background: var(--notice); }
.hcol:hover span { background: #07636c; }
.hcol small { position: absolute; bottom: -18px; font-size: 11px; color: var(--ink-3); }
.area-ai { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 14px 0; }
.area-ai span { flex: 1 1 240px; }
.area-filter { position: static; background: none; border: 0; padding: 0 0 6px; }

/* ---- extension ------------------------------------------------------------------------- */
@media (min-width: 900px) { .ext-list { padding-left: 20px; margin: 0; display: grid; gap: 10px; } }

/* ---- CRM ------------------------------------------------------------------------------- */
.crm-kinds { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; margin-bottom: 14px; }
.crm-kind { text-decoration: none; color: var(--ink); padding: 12px 14px; display: grid; gap: 2px; }
.crm-kind b { font-size: var(--s2); font-variation-settings: var(--wide); }
.crm-search { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.crm-search input { flex: 1 1 260px; height: 42px; border: 1px solid var(--rule-strong); border-radius: var(--r-input); padding: 0 12px; }
.admin-filter .sep { width: 1px; background: var(--rule-strong); margin: 4px 4px; align-self: stretch; }
.crm-table td { vertical-align: top; }
.crm-actions { display: flex; gap: 8px; margin: 0 0 16px; flex-wrap: wrap; }
.crm-grid { display: grid; gap: 20px; }
@media (min-width: 1000px) { .crm-grid { grid-template-columns: 1.2fr 1fr; } }
.crm-history { margin-top: 14px; }

/* ---- explore (full screen) -------------------------------------------------------------- */
.explore { display: grid; grid-template-columns: 300px 1fr; height: calc(100dvh - var(--masthead-h) - var(--tabbar-h)); }
.ex-side { overflow-y: auto; background: var(--surface); border-right: 1px solid var(--rule); padding: 16px; }
.ex-filters { display: grid; gap: 12px; }
.ex-filters details { border-top: 1px solid var(--rule); padding-top: 10px; }
.ex-filters summary { font-weight: 700; cursor: pointer; font-size: var(--s0); }
.ex-checks { display: grid; gap: 4px; max-height: 260px; overflow-y: auto; margin-top: 8px; }
.ex-checks .check { font-size: var(--s0); }
.ex-checks .n { color: var(--ink-3); font-size: var(--s-1); margin-left: auto; }
.ex-find { width: 100%; height: 34px; margin-top: 8px; border: 1px solid var(--rule-strong); border-radius: 8px; padding: 0 10px; }
.ex-main { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.ex-bar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; padding: 10px 14px; border-bottom: 1px solid var(--rule); background: var(--paper); }
.ex-bar #ex-count { flex: 1; }
.ex-toggle { display: none; }
.ex-body { flex: 1; min-height: 0; position: relative; }
.ex-table-wrap { position: absolute; inset: 0; overflow: auto; }
.ex-table { font-size: var(--s0); }
.ex-table thead th { position: sticky; top: 0; background: var(--surface); z-index: 2; white-space: nowrap; }
.ex-table td { vertical-align: top; }
.more[hidden], #ex-clear-cols[hidden] { display: none; }
.ex-side { min-width: 0; box-sizing: border-box; }
.ex-filters { min-width: 0; max-width: 100%; }
.ex-filters .two > * { min-width: 0; width: 100%; box-sizing: border-box; }
.ex-filters > * { min-width: 0; max-width: 100%; }
.ex-table thead { position: sticky; top: 0; z-index: 3; background: var(--surface); }
.ex-table thead th { position: static; }
#ex-filter-row th { padding: 4px 6px 8px; border-bottom: 1px solid var(--rule-strong); font-weight: 400; vertical-align: top; }
#ex-filter-row input, #ex-filter-row select { width: 100%; min-width: 72px; height: 32px; padding: 0 6px; font-size: var(--s-1); border: 1px solid var(--rule-strong); border-radius: 6px; background: var(--surface); }
#ex-filter-row th[data-colf="floors"] input, #ex-filter-row th[data-colf="units"] input { min-width: 52px; }
#ex-filter-row input.bad { border-color: var(--warn, #b4532a); }
.ex-dates { display: grid; gap: 4px; min-width: 124px; }
.dev-follow-btn { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 12px 0; }
.dev-follow h3 { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.apt-score { padding: 12px 14px; margin-bottom: 14px; background: var(--paper); border-radius: 10px; }
.apt-score ul { list-style: none; margin: 8px 0; padding: 0; display: grid; gap: 3px; font-size: var(--s-1); }
.apt-score li { display: grid; grid-template-columns: 34px 1fr; }
.apt-score li span { font-weight: 700; }
.apt-score p { margin: 4px 0 0; }
.ex-table .ex-loc { min-width: 220px; max-width: 320px; }
.ex-table .nowrap { white-space: nowrap; }
.ex-sort { border: 0; background: none; font: inherit; font-weight: 650; color: var(--ink-2); cursor: pointer; padding: 0; }
.ex-sort[aria-pressed="true"] { color: var(--ink); }
#ex-map { position: absolute; inset: 0; background: var(--sea); }
@media (max-width: 900px) {
  .explore { grid-template-columns: 1fr; }
  .ex-side { display: none; position: absolute; z-index: 600; inset: calc(var(--masthead-h) + 54px) 0 var(--tabbar-h) 0; box-shadow: 0 10px 30px rgba(24, 33, 43, .25); }
  .ex-side.open { display: block; }
  .ex-toggle { display: inline-flex; }
}

/* ---- map: panel, guide, drawer ----------------------------------------------------------- */
.map-panel { max-height: calc(100% - 150px); overflow-y: auto; } /* clear of the map style switch and zoom below it */
.map-panel-head { display: flex; justify-content: space-between; align-items: center; }
.map-panel-head .icon-btn { border: 1px solid var(--rule-strong); width: 32px; height: 32px; font-size: 16px; font-weight: 700; }
.map-panel .views { grid-template-columns: 1fr 1fr; }
.map-panel .views button:last-child:nth-child(odd) { grid-column: 1 / -1; }
.view-help { font-size: var(--s-1); color: var(--ink-2); background: var(--paper); border-radius: 8px; padding: 8px 10px; margin: 10px 0 !important; }
.map-panel .check { margin: 8px 0; }
.map-panel .two { gap: 8px; }
.map-panel .field input { height: 36px; border: 1px solid var(--rule-strong); border-radius: 8px; padding: 0 8px; width: 100%; }
@media (min-width: 768px) { .mapview:has(.map-drawer:not([hidden])) .leaflet-right { right: 444px; } } /* legend clear of the open drawer */
.street-search { margin-bottom: 4px; }
.street-search input[type="search"] { padding: 0 10px; }
.bandpick { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
.bandpick .chip { height: 28px; padding: 0 9px; font-size: var(--s-1); gap: 5px; }
.bandpick .chip i { width: 10px; height: 10px; border-radius: 2px; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .15); }
.street-results-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 8px; min-height: 28px; }
.street-results-head select { height: 28px; border: 1px solid var(--rule-strong); border-radius: 6px; padding: 0 4px; font-size: var(--s-1); margin-left: auto; }
.street-results { list-style: none; padding: 0; margin: 4px 0 0; max-height: 280px; overflow-y: auto; border-top: 1px solid var(--rule); }
.street-results:empty { display: none; }
.street-results li { border-bottom: 1px solid var(--rule); }
.street-results li.hint { font-size: var(--s-1); color: var(--ink-3); padding: 8px 2px; border: 0; }
.street-results button[data-k] { display: grid; grid-template-columns: 12px 1fr auto; gap: 8px; align-items: center; width: 100%; padding: 7px 4px; border: 0; background: none; text-align: left; cursor: pointer; border-radius: 6px; }
.street-results button[data-k]:hover, .street-results button[aria-current="true"] { background: var(--paper); }
.street-results button[aria-current="true"] { box-shadow: inset 3px 0 0 var(--brand); }
.street-results .sw { width: 12px; height: 12px; border-radius: 3px; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .15); }
.street-results .nm, .street-results .fl { display: flex; flex-direction: column; min-width: 0; }
.street-results .nm b { font-size: var(--s0); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.street-results small { font-size: var(--s-1); color: var(--ink-3); }
.street-results .fl { align-items: flex-end; font-variant-numeric: tabular-nums; }
.street-results .link-btn { margin: 6px 2px; }
/* Pin and draw: their own toolbar on the map, always in view (right of the panel; along the top on a phone). */
.site-tools { position: absolute; z-index: 560; top: 12px; left: calc(12px + min(340px, 100% - 24px) + 12px); display: flex; align-items: center; gap: 4px;
  background: var(--surface); border: 1px solid var(--rule-strong); border-radius: 12px; padding: 4px; box-shadow: 0 6px 20px rgba(24, 33, 43, .22); }
.site-tools .tool { display: inline-flex; align-items: center; gap: 7px; height: 40px; padding: 0 14px; border: 0; border-radius: 9px; background: none; font: inherit; font-size: var(--s-1); font-weight: 650; color: var(--ink); cursor: pointer; white-space: nowrap; }
.site-tools .tool svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; flex: none; }
.site-tools .tool:hover { background: var(--paper, rgba(25, 46, 77, .06)); }
.site-tools .tool.primary { background: var(--ink); color: #fff; }
.site-tools .tool[aria-pressed="true"] { background: var(--notice); color: var(--ink); }
.site-tools .tool:focus-visible, .site-tools select:focus-visible { outline: 2px solid var(--brand); outline-offset: 1px; }
.site-tools select { height: 40px; border: 0; border-left: 1px solid var(--rule); border-radius: 0 9px 9px 0; padding: 0 6px 0 10px; background: none; font: inherit; font-size: var(--s-1); color: var(--ink-2); cursor: pointer; }
@media (max-width: 767px) {
  .site-tools { left: 10px; right: 10px; top: 10px; }
  .site-tools .tool { flex: 1 1 auto; justify-content: center; padding: 0 8px; font-size: 13px; gap: 5px; }
  .site-tools select { padding: 0 2px 0 6px; }
  .mapview .leaflet-top { top: 58px; } /* map style switch below the toolbar */
}
#map.picking { cursor: crosshair; }
.map-drawer { position: absolute; z-index: 550; top: 12px; right: 12px; bottom: 12px; width: min(420px, calc(100% - 24px)); background: var(--surface); border-radius: 14px; box-shadow: 0 10px 34px rgba(24, 33, 43, .25); display: flex; flex-direction: column; }
.drawer-head { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--rule); }
.drawer-head h2 { font-size: var(--s2); }
.drawer-body { overflow-y: auto; padding: 14px 16px 20px; }
.drawer-body .area-stats { grid-template-columns: 1fr 1fr; }
.drawer-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0; }
.legend .small { font-size: 11px; color: var(--ink-2); margin-top: 4px; }
.guide { padding-left: 20px; display: grid; gap: 8px; margin: 0 0 14px; }
.guide-legend { display: grid; grid-template-columns: 70px 1fr; gap: 6px 10px; align-items: center; font-size: var(--s0); }
.guide-legend dd { margin: 0; color: var(--ink-2); }
.swatch { display: inline-block; width: 60px; height: 12px; border-radius: 3px; }
@media (max-width: 767px) {
  .map-panel { max-height: 55%; }
  .map-drawer { top: auto; height: 70%; bottom: 0; right: 0; left: 0; width: 100%; border-radius: 14px 14px 0 0; }
  .map-note { display: none; }
}
.near-note { background: var(--notice-soft); border-radius: 8px; padding: 8px 10px; font-size: var(--s-1); margin: 0; }
.map-drawer[hidden] { display: none; }
.profile-map { height: 360px; border-radius: 12px; border: 1px solid var(--rule); background: var(--sea); margin-top: 6px; }
.profile-map-block .area-head { margin-bottom: 6px; }
@media (max-width: 767px) { .profile-map { height: 280px; } }

/* ---- assistant button and panel ---------------------------------------------------------- */
.fab { position: fixed; z-index: 900; right: 20px; bottom: calc(20px + var(--tabbar-h)); width: 56px; height: 56px; border-radius: 50%; border: 0; cursor: pointer;
  background: var(--brand); color: #fff; box-shadow: 0 8px 24px rgba(24, 33, 43, .3); display: grid; place-items: center; }
.fab svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.fab:hover, .fab.on { background: #07636c; }
.assistant { position: fixed; z-index: 890; right: 20px; bottom: calc(88px + var(--tabbar-h)); width: min(420px, calc(100vw - 24px)); height: min(640px, calc(100dvh - 160px - var(--tabbar-h)));
  background: var(--surface); border-radius: 16px; box-shadow: 0 16px 48px rgba(24, 33, 43, .3); display: flex; flex-direction: column; overflow: hidden; }
.assistant[hidden] { display: none; }
.as-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--rule); }
.as-head > div:last-child { display: flex; align-items: center; gap: 6px; }
.as-ctx { margin: 2px 0 0; font-size: var(--s-1); color: var(--ink-2); }
.as-body { flex: 1; overflow-y: auto; padding: 14px; display: grid; gap: 10px; align-content: start; }
.as-intro { color: var(--ink-2); margin: 0; font-size: var(--s0); }
.as-suggest { display: flex; flex-wrap: wrap; gap: 6px; }
.as-suggest .chip { height: auto; min-height: 32px; padding: 6px 12px; white-space: normal; text-align: left; }
.as-q { justify-self: end; max-width: 88%; background: var(--ink); color: #fff; border-radius: 14px 14px 4px 14px; padding: 8px 12px; font-size: var(--s0); }
.as-q small { display: block; opacity: .7; font-size: 11px; margin-top: 2px; }
.as-a { max-width: 100%; background: var(--paper); border-radius: 14px 14px 14px 4px; padding: 10px 12px; font-size: var(--s0); overflow-x: auto; }
.as-a .answer, .as-a p { margin: 0 0 8px; }
.as-a h3 { font-size: var(--s0); margin: 10px 0 6px; }
.as-a table { font-size: 12px; }
.assistant .verify-slot { margin: 0; padding: 10px 14px; border-top: 1px solid var(--rule); }
.as-form { display: flex; gap: 8px; padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); border-top: 1px solid var(--rule); }
.as-form textarea { flex: 1; resize: none; border: 1px solid var(--rule-strong); border-radius: var(--r-input); padding: 8px 10px; font: inherit; }
.as-form textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
@media (max-width: 767px) {
  .fab { right: 14px; bottom: calc(14px + var(--tabbar-h)); width: 52px; height: 52px; }
  .assistant { inset: var(--masthead-h) 0 var(--tabbar-h) 0; width: 100%; height: auto; border-radius: 0; }
}
/* keep full-screen map controls clear of the assistant button */
.mapview .leaflet-bottom.leaflet-right, #ex-map .leaflet-bottom.leaflet-right { margin-bottom: 76px; }
.view-switch { margin-top: 12px; }
.admin-dl { width: 100%; margin: 0 0 12px; font-size: var(--s-1); height: 38px; } .perit-spellings { margin-top: 16px; }
.tracked-row { position: relative; }
.tracked-row .pref-row { padding: 0 16px 12px; }

/* ---- saved searches, report -------------------------------------------------------------- */
.saved-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.saved-row a { flex: 1; }
.report { max-width: 820px; margin: 0 auto; padding: 24px 20px 60px; background: var(--surface); }
.report header { display: flex; justify-content: space-between; align-items: center; border-bottom: 2px solid var(--ink); padding-bottom: 10px; margin-bottom: 14px; }
.report h1 { font-size: var(--s4); font-variation-settings: "wdth" 125; }
.report h2 { font-size: var(--s1); font-variation-settings: var(--wide); margin: 22px 0 8px; }
.report .lede { color: var(--ink-2); margin: 4px 0 0; }
.report-actions { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; }
.report-actions .back { display: inline-flex; margin: 0; }
.report-foot { margin-top: 28px; border-top: 1px solid var(--rule); padding-top: 10px; }
/* ---- quick search (Ctrl+K) ------------------------------------------------------- */
.masthead-search { position: relative; }
.spot-hint { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); display: flex; gap: 3px; border: 0; background: none; padding: 4px; cursor: pointer; }
.masthead-search input:focus ~ .spot-hint, .masthead-search input:not(:placeholder-shown) ~ .spot-hint { display: none; }
kbd { font: 600 11px/1 system-ui, sans-serif; color: var(--ink-3); background: var(--surface); border: 1px solid var(--rule); border-bottom-width: 2px; border-radius: 5px; padding: 3px 5px; min-width: 18px; text-align: center; display: inline-block; }
.spot { position: fixed; inset: 0; z-index: 10000; background: rgba(25, 46, 77, .28); backdrop-filter: blur(6px) saturate(1.2); -webkit-backdrop-filter: blur(6px) saturate(1.2); display: flex; justify-content: center; align-items: flex-start; padding: 12vh 16px 16px; animation: spot-fade .12s ease-out; }
.spot[hidden] { display: none; }
.spot-box { width: min(640px, 100%); background: color-mix(in srgb, var(--surface) 94%, transparent); border: 1px solid var(--rule); border-radius: 16px; box-shadow: 0 30px 80px rgba(24, 33, 43, .35), 0 2px 8px rgba(24, 33, 43, .12); overflow: hidden; animation: spot-pop .16s cubic-bezier(.2, .9, .3, 1.2); }
.spot-field { display: flex; align-items: center; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--rule); }
.spot-field svg { width: 22px; height: 22px; flex: none; fill: none; stroke: var(--ink-3); stroke-width: 2; stroke-linecap: round; }
.spot-field input { flex: 1; min-width: 0; border: 0; background: none; font-size: 20px; color: var(--ink); outline: none; }
.spot-field input::-webkit-search-cancel-button { display: none; }
.spot-list { max-height: min(56vh, 460px); overflow-y: auto; padding: 6px; }
.spot-sec { font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-3); padding: 10px 12px 4px; }
.spot-list button { display: grid; grid-template-columns: 72px 1fr auto; gap: 10px; align-items: center; width: 100%; text-align: left; border: 0; background: none; padding: 9px 12px; border-radius: 10px; cursor: pointer; color: var(--ink); font: inherit; }
.spot-list button small { display: block; color: var(--ink-2); font-size: var(--s-1); }
.spot-list .kind { font-size: 11px; font-weight: 700; color: var(--ink-3); }
.spot-list .spot-go { opacity: 0; color: #fff; font-weight: 700; }
.spot-list button[aria-selected="true"] { background: var(--brand); color: #fff; }
.spot-list button[aria-selected="true"] small, .spot-list button[aria-selected="true"] .kind { color: rgba(255, 255, 255, .82); }
.spot-list button[aria-selected="true"] .spot-go { opacity: 1; }
.spot-empty { padding: 18px; color: var(--ink-2); margin: 0; }
.spot-foot { display: flex; gap: 16px; padding: 8px 18px; border-top: 1px solid var(--rule); font-size: 12px; color: var(--ink-3); }
.spot-foot span { display: flex; align-items: center; gap: 4px; }
html.spot-open { overflow: hidden; }
@keyframes spot-fade { from { opacity: 0; } }
@keyframes spot-pop { from { opacity: 0; transform: scale(.97) translateY(-6px); } }
@media (max-width: 767px) { .spot { padding-top: 10px; } .spot-hint, .spot-foot { display: none; } .spot-field input { font-size: 17px; } }
@media (prefers-reduced-motion: reduce) { .spot, .spot-box { animation: none; } }

/* ---- documents: admin view and viewer ---------------------------------------------- */
.tag { display: inline-block; font-size: 11px; font-weight: 700; padding: 2px 7px; border-radius: 999px; background: var(--paper); color: var(--ink-2); border: 1px solid var(--rule); vertical-align: 1px; }
.tag.doc-restricted { background: var(--notice-soft); border-color: var(--notice); color: var(--ink); }
.doc-points { margin: 4px 0 2px; padding-left: 18px; color: var(--ink-2); }
.doc-admin { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; }
.admin-filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 12px 0 16px; }
.admin-filters input[type="search"] { flex: 1 1 260px; height: 40px; border: 1px solid var(--rule-strong); border-radius: var(--r-input); padding: 0 12px; }
.admin-filters select { height: 40px; border: 1px solid var(--rule-strong); border-radius: var(--r-input); padding: 0 8px; background: var(--surface); }
.doc-viewer { position: fixed; inset: 0; z-index: 10000; background: rgba(25, 46, 77, .45); display: flex; padding: 3vh 3vw; }
.doc-viewer-box { flex: 1; display: flex; flex-direction: column; background: var(--surface); border-radius: 14px; overflow: hidden; box-shadow: 0 30px 80px rgba(24, 33, 43, .35); }
.doc-viewer-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 14px; border-bottom: 1px solid var(--rule); }
.doc-viewer-head > div:last-child { display: flex; gap: 8px; align-items: center; flex: none; }
.doc-viewer iframe { flex: 1; width: 100%; border: 0; background: var(--paper); }
@media (max-width: 767px) { .doc-viewer { padding: 0; } .doc-viewer-box { border-radius: 0; } }

@media print {
  .masthead, .tabs, .fab, .assistant, .no-print, .chart-tip { display: none !important; }
  body { background: #fff; } main { padding: 0 !important; }
  .report { padding: 0; max-width: none; }
  .report h2 { break-after: avoid; } .steps li, tr { break-inside: avoid; }
  a { color: inherit; text-decoration: none; }
}
.report-actions .btn.primary { flex: none; }

/* ---- list map and dashboard ------------------------------------------------------------------ */
.list-map { position: relative; height: 100%; min-height: 400px; }
#list-map { position: absolute; inset: 0; background: var(--sea); }
.list-map .map-note { right: auto; left: 12px; top: 12px; }
.list-map .leaflet-bottom.leaflet-right { margin-bottom: 76px; }
.dash { max-width: 1100px; }
.dash-search h1 { font-size: clamp(26px, 4vw, var(--s4)); font-variation-settings: var(--wide); margin-bottom: 12px; }
.dash-search .ask-row input { height: 50px; font-size: var(--s1); }
.dash-search p { margin: 10px 0 22px; }
.dash-invite { display: grid; gap: 20px; border-left: 4px solid var(--notice); margin-bottom: 20px; }
@media (min-width: 900px) { .dash-invite { grid-template-columns: 1.3fr 1fr; align-items: center; } }
.dash-invite h2 { font-size: var(--s3); font-variation-settings: var(--wide); margin-bottom: 6px; }
.dash-verify .verify-slot { border-top: 0; margin-top: 0; padding-top: 0; }
.dash-verify .verify-cta > p:first-child, .dash-verify .verify-cta > p.small { display: none; }
.dash-verify .verify-row input, .dash-verify .verify-row .btn { height: 50px; font-size: var(--s1); }
.dash-block { margin-bottom: 20px; }
.dash-block h2 { font-size: var(--s1); font-variation-settings: var(--wide); }
.dash-grid { display: grid; gap: 20px; }
@media (min-width: 1000px) { .dash-grid { grid-template-columns: 1fr 1fr; } }
.dash-row { display: grid; grid-template-columns: 1fr auto; align-items: start; gap: 8px; }
.dash-track { margin-top: 12px; height: 34px; padding: 0 12px; font-size: var(--s0); }

/* newsletter sign-up */
.newsletter { display: grid; gap: 12px; margin-top: 20px; }
.newsletter h2 { margin: 0 0 4px; }
.newsletter p { margin: 0; }
@media (min-width: 760px) { .newsletter { grid-template-columns: 1fr minmax(320px, 420px); align-items: center; } .newsletter [role=status] { grid-column: 2; } }

/* similar applications, site report extras */
.match { font-weight: 600; color: var(--brand); }
.report-toggles { margin: 0 0 18px; border: 0; padding: 0; }
.report-toggles legend { margin-bottom: 6px; }
.report-toggles input { margin: 0 4px 0 0; }
.report-area { display: grid; gap: 16px; }
@media (min-width: 700px) { .report-area.has-map { grid-template-columns: 260px 1fr; align-items: start; } }
.report-map { margin: 0; }
.report-map svg { max-width: 100%; height: auto; display: block; }
.report-map .key { display: inline-flex; align-items: center; gap: 4px; margin-right: 8px; }
.report-map .key::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--c); }
.report-hist { display: flex; align-items: flex-end; gap: 4px; height: 130px; margin-top: 12px; }
.hist-col { flex: 1; max-width: 40px; display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 11px; color: var(--ink-2); }
.hist-bar { width: 100%; background: var(--brand); border-radius: 4px 4px 0 0; }
.hist-col.is-subject .hist-bar { background: var(--ink); }
.hist-col.is-subject .hist-l { font-weight: 700; color: var(--ink); }
@media print { .report section[hidden] { display: none !important; } .report-map svg { width: 220px; } }

/* tracked page preferences */
.pref-row { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; margin: 6px 0 4px; }
.pref-row select { font: inherit; font-size: var(--s-1); padding: 4px 6px; border-radius: 8px; border: 1px solid var(--rule-strong); background: var(--surface); }
.saved-row { display: grid; gap: 4px; }
.saved-row.is-paused > div:first-child { opacity: .6; }

/* chip groups that sit inside content (not the sticky list toolbar) */
.chips { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; border: 0; padding: 0; margin: 0 0 12px; min-width: 0; }
.chips legend { padding: 0; margin-bottom: 6px; }
.chips .chip input { margin: 0 6px 0 0; }
.chips .sep { width: 1px; height: 22px; background: var(--rule-strong); }

/* map / satellite switch */
.basemap-switch { display: flex; background: var(--surface); border: 1px solid var(--rule-strong); border-radius: 999px; padding: 2px; box-shadow: 0 1px 4px rgba(25,46,77,.15); }
.basemap-switch button { border: 0; background: none; font: inherit; font-size: 13px; font-weight: 600; color: var(--ink-2); padding: 5px 12px; border-radius: 999px; cursor: pointer; }
.basemap-switch button[aria-pressed="true"] { background: var(--ink); color: #fff; }
.basemap-switch button:focus-visible { outline: 2px solid var(--brand); outline-offset: 1px; }
.leaflet-container.is-satellite { background: #0c1a24; }
.leaflet-container.is-terrain { background: #cde0e9; }
.terrain-legend { min-width: 170px; }
.terrain-ramp { height: 10px; border-radius: 3px; }
.terrain-ticks { display: flex; justify-content: space-between; color: var(--ink-2); font-size: 11px; }
.terrain-readout { min-height: 1.4em; margin-top: 4px; font-weight: 600; }
.list-map .map-note .link-btn { font-size: inherit; }

/* perit specialisations and badges */
.spec-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.spec-card { background: var(--surface); border: 1px solid var(--rule); border-radius: 12px; padding: 12px 14px; }
.spec-card h3 { margin: 0; font-size: var(--s1); } .spec-card h3 a { color: var(--ink); }
.spec-card ol { margin: 8px 0 0; padding-left: 20px; } .spec-card li { margin: 4px 0; } .spec-card li .muted { display: block; }
.tier-gold { --tier-ink: #6e5200; --tier-soft: #fbf0c9; --tier-line: #e6cd73; --tier-a: #f7d65a; --tier-b: #c99a0e; }
.tier-silver { --tier-ink: #3f4a56; --tier-soft: #eef0f2; --tier-line: #c5cbd2; --tier-a: #e4e8ec; --tier-b: #96a1ad; }
.tier-bronze { --tier-ink: #6f3f1a; --tier-soft: #f6e7da; --tier-line: #dcb795; --tier-a: #eab78a; --tier-b: #a86232; }
.badge { display: inline-flex; align-items: center; gap: 5px; font-size: var(--s-1); font-weight: 600; line-height: 1; padding: 2px 9px 2px 2px; margin: 2px 4px 2px 0; border-radius: 999px; border: 1px solid var(--tier-line); background: var(--tier-soft); color: var(--tier-ink); white-space: nowrap; }
.bi-disc { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, var(--tier-a), var(--tier-b)); color: #fff; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .12); }
.bi { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.medal { display: flex; gap: 10px; align-items: center; }
.medal b { display: block; color: var(--ink); }
.medal-disc { flex: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, var(--tier-a), var(--tier-b)); color: #fff; box-shadow: 0 0 0 3px var(--tier-soft), 0 0 0 4px var(--tier-line), 0 2px 6px rgba(0, 0, 0, .15); }
.medal-disc .bi { width: 22px; height: 22px; stroke-width: 2; }
.level-chip { display: inline-block; font-size: var(--s-1); font-weight: 600; color: var(--brand); background: var(--brand-soft); border-radius: 6px; padding: 3px 7px; margin-right: 4px; white-space: nowrap; }
.badge-board { list-style: none; margin: 0; padding: 0; border: 1px solid var(--rule); border-radius: 12px; background: var(--surface); }
.badge-board li { display: flex; gap: 12px; align-items: center; padding: 10px 14px; border-top: 1px solid var(--rule); }
.badge-board li:first-child { border-top: 0; }
.badge-board .rank { width: 22px; font-weight: 700; color: var(--ink-3); } .badge-board .who { flex: 1; min-width: 0; }
.badge-board .badges { display: block; margin-top: 4px; } .badge-board .pts { white-space: nowrap; }
.badge-rules { margin-top: 10px; } .badge-rules summary { cursor: pointer; color: var(--brand); font-weight: 600; }
.board-table td.badges { white-space: normal; width: 1%; }
.badge-dots { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin-top: 4px; }
.badge-dots .bi-disc { width: 22px; height: 22px; cursor: help; }
.level-bar { height: 8px; background: var(--rule); border-radius: 999px; overflow: hidden; margin: 6px 0; }
.level-bar span { display: block; height: 100%; background: var(--brand); }
.badge-list { list-style: none; padding: 0; margin: 12px 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px 16px; }
@media (max-width: 640px) {
  .spec-grid { grid-auto-flow: column; grid-template-columns: none; grid-auto-columns: 78%; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 6px; }
  .spec-card { scroll-snap-align: start; }
}

/* height zones */
.drawer-sub { display: block; font-size: var(--s0); font-weight: 500; color: var(--ink-3); }
.zone-head { display: flex; gap: 10px; align-items: center; margin: 0 0 12px; }
.zone-head b { display: block; font-size: var(--s1); }
.zone-swatch { width: 34px; height: 34px; border-radius: 8px; flex: none; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .12); }
.mini-list { list-style: none; padding: 0; margin: 6px 0 12px; } .mini-list li { padding: 6px 0; border-top: 1px solid var(--rule); }
.legend hr { border: 0; border-top: 1px solid var(--rule); margin: 6px 0; }

/* keeping a permit up to date */
.refresh-bar { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; font-size: var(--s-1); color: var(--ink-2); margin: 8px 0 4px; }
.refresh-bar.working { color: var(--brand); font-weight: 600; }
.spinner { width: 14px; height: 14px; border: 2px solid var(--brand-soft); border-top-color: var(--brand); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation-duration: 3s; } }
/* eapps file */
.brief-headline { font-size: var(--s1); font-weight: 600; margin: 0 0 10px; }
.brief-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin: 0 0 10px; }
.brief-grid > div { background: var(--surface); border: 1px solid var(--rule); border-radius: 10px; padding: 8px 10px; display: flex; flex-direction: column; gap: 3px; align-items: flex-start; }
.brief-grid .label { font-size: var(--s-1); color: var(--ink-3); }
.brief-flag { background: var(--notice-soft); border-left: 3px solid var(--notice); padding: 6px 10px; border-radius: 6px; font-weight: 600; }
.brief details, .doc-group { margin: 6px 0; } .brief summary, .doc-group summary { cursor: pointer; font-weight: 600; }
.doc-list li { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; border-top: 1px solid var(--rule); }
.doc-list li > div { min-width: 0; } .doc-what { display: block; } .doc-no { font-variant-numeric: tabular-nums; color: var(--ink-3); }
.doc-list li.superseded { opacity: .6; }
.doc-permit-list { display: grid; gap: 12px; }
.doc-permit-group { margin: 0; }
.doc-permit-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 14px; cursor: pointer; font-weight: 600; }
.doc-permit-title { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.doc-permit-desc { margin: 8px 0 4px; }
.doc-permit-group table { margin-top: 8px; }

/* Admin: investment targets */
.target-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; margin: 12px 0; }
.target-tiles .panel { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; }
.target-tiles b { font-size: var(--s2); font-variant-numeric: tabular-nums; }
.target-tiles span { font-size: var(--s-1); color: var(--ink-2); }
.target-score { min-width: 2.4em; padding: 2px 8px; border-radius: 999px; background: var(--ink); color: var(--surface); font-weight: 700; text-align: center; font-variant-numeric: tabular-nums; }
.target-reasons { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0; }
.target-reasons .tag b { font-variant-numeric: tabular-nums; }
.target-reasons .tag.neg { color: var(--ink-3); border-style: dashed; }
.target-routes { display: flex; flex-direction: column; gap: 2px; }
.target[data-pipeline="passed"] { opacity: .55; }
.target .admin-actions select { height: 36px; border: 1px solid var(--rule-strong); border-radius: var(--r-input); padding: 0 8px; background: var(--surface); }
.target-notes { margin-top: 10px; display: grid; gap: 8px; }
.target-notes textarea { width: 100%; border: 1px solid var(--rule-strong); border-radius: var(--r-input); padding: 8px; }
.target-note-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.target-note-list li { border-left: 2px solid var(--rule-strong); padding-left: 10px; }
.target-note-list p { margin: 0; white-space: pre-wrap; }
@media print { .admin-nav, .admin-filters, .site-header, .tabs { display: none !important; } }

/* ---- local plans: map cards, zoomable viewer, policy text ----------------------------------- */
.plan-docs { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; margin: 8px 0; }
.plan-docs.compact { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; }
.plan-doc { display: flex; flex-direction: column; gap: 6px; padding: 6px; border: 1px solid var(--rule-strong); border-radius: 10px; background: var(--surface); text-align: left; cursor: pointer; font-size: var(--s-1); line-height: 1.3; color: inherit; }
.plan-doc:hover { border-color: var(--ink-3); }
.plan-doc img { width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; border-radius: 6px; background: var(--paper); }
.plan-doc .pdf-badge { display: grid; place-items: center; aspect-ratio: 16 / 10; border-radius: 6px; background: var(--paper); color: var(--ink-3); font-weight: 700; letter-spacing: .08em; }
.lp-block { margin-top: 14px; }
.lp-links { display: flex; flex-wrap: wrap; gap: 8px; }
.lp-locs .chip { text-decoration: none; }
.plan-viewer { position: fixed; inset: 0; z-index: 2000; display: flex; flex-direction: column; background: var(--surface); }
.pv-head { display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-bottom: 1px solid var(--rule); }
.pv-head > div { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.pv-head b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pv-head .icon-btn { width: 36px; height: 36px; font-size: 20px; }
.pv-map { flex: 1; background: #f4f4f0; }
.policy-text { max-width: 72ch; }
.policy-text p { margin: 0 0 12px; line-height: 1.6; }
#lp-results mark { background: color-mix(in srgb, var(--notice) 35%, transparent); color: inherit; }
@media (max-width: 767px) { .pv-head .btn { display: none; } }
.crumbs { font-size: var(--s-1); color: var(--ink-3); margin: 0 0 6px; }

/* ---- admin: placing local plan height maps -------------------------------------------------- */
.gr-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin: 10px 0; }
.gr-tools .views { display: flex; gap: 6px; }
.gr-tools .views button { height: 34px; padding: 0 12px; border: 1px solid var(--rule-strong); border-radius: 8px; background: var(--surface); font-weight: 650; cursor: pointer; }
.gr-tools .views button[aria-pressed="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }
.gr-tools #gr-save { margin-left: auto; }
.gr-panes { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; height: 68vh; }
.gr-panes > div { border: 1px solid var(--rule-strong); border-radius: 10px; background: #f4f4f0; cursor: crosshair; }
.gr-lists { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 12px; }
.gr-legend { list-style: none; padding: 0; display: grid; gap: 6px; }
.gr-legend li { display: flex; align-items: center; gap: 6px; }
.gr-legend i { width: 22px; height: 22px; border-radius: 4px; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .2); flex: none; }
.gr-legend input { height: 32px; border: 1px solid var(--rule-strong); border-radius: 6px; padding: 0 6px; }
.gr-legend input[type="number"] { width: 70px; }
.gr-legend input:not([type]) { flex: 1; min-width: 0; }
.gr-pin span { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: #c0392b; color: #fff; font: 700 12px/1 sans-serif; border: 2px solid #fff; box-shadow: 0 1px 4px rgba(0, 0, 0, .4); }
.gr-pin.pending span { background: #f2b705; color: #18212b; }
@media (max-width: 900px) { .gr-panes, .gr-lists { grid-template-columns: 1fr; height: auto; } .gr-panes > div { height: 50vh; } }
.lp-limit { display: flex; flex-direction: column; gap: 3px; padding: 10px 12px; margin-bottom: 12px; border-radius: 10px; background: var(--paper); box-shadow: inset 3px 0 0 var(--ink); }

/* Permit page: where it falls on the local plan maps */
.lpz { margin: 0 0 14px; display: grid; gap: 6px; }
.lpz-crop { position: relative; display: block; height: 220px; border: 1px solid var(--rule); border-radius: 8px; background-color: var(--surface); background-repeat: no-repeat; overflow: hidden; }
.lpz-pin { position: absolute; left: 50%; top: 50%; width: 18px; height: 18px; margin: -9px 0 0 -9px; border: 3px solid #fff; border-radius: 50%; background: #c0392b; box-shadow: 0 0 0 2px rgba(0, 0, 0, .55); }
.lpz figcaption { font-size: var(--s0); display: grid; gap: 4px; }
.lpz-key { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; }
.lpz-key i { width: 14px; height: 14px; border-radius: 3px; border: 1px solid var(--rule-strong); flex: none; }
.lpz-crop img { position: absolute; max-width: none; width: auto; height: auto; }
.lpz-pin { z-index: 1; }

/* street and area intelligence (/area/...) */
.intel-themes { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.intel-themes li { display: grid; grid-template-columns: minmax(120px, 1fr) 90px auto; gap: 4px 10px; align-items: center; }
.intel-themes .it-ex { grid-column: 1 / -1; }
.ib { display: block; height: 8px; background: var(--rule); border-radius: 4px; overflow: hidden; }
.ib span { display: block; height: 100%; background: var(--brand); }
.intel-table td, .intel-table th { white-space: nowrap; }
.intel-table td:first-child { white-space: normal; min-width: 160px; }
.intel-above { font-size: 12px; color: var(--refused); border: 1px solid currentColor; border-radius: 6px; padding: 0 5px; margin-left: 4px; }

/* Sun and terrain panel (permit page) */
.sun-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 10px 0; }
.sun-controls .label { margin: 0; }
.sun-controls input[type="date"] { font: inherit; padding: 5px 8px; border: 1px solid var(--rule-strong); border-radius: var(--r-input); background: var(--surface); color: var(--ink); }
.sun-facts { display: grid; grid-template-columns: max-content 1fr; gap: 4px 12px; margin: 0 0 12px; }
.sun-facts dt { color: var(--ink-2); }
.sun-facts dd { margin: 0; }
.sun-chart { display: grid; gap: 10px; justify-items: center; }
.sunpath { max-width: 100%; height: auto; }
.sun-time { width: 100%; }
.sun-time input[type="range"] { width: 100%; accent-color: var(--sun); }
.sun-key .key { display: inline-flex; align-items: center; gap: 4px; margin-right: 8px; }
.sun-key .key::before { content: ""; width: 12px; height: 4px; border-radius: 2px; background: var(--c); }
/* site analysis (map): tabs in the drawer, the section through the ground */
.site-tabs { display: flex; gap: 2px; margin: -4px -4px 12px; overflow-x: auto; border-bottom: 1px solid var(--rule); }
.site-tabs button { flex: none; font: inherit; font-size: var(--s0); font-weight: 600; color: var(--ink-2); background: none; border: 0; border-bottom: 2px solid transparent; padding: 8px 10px; cursor: pointer; }
.site-tabs button[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--sun); }
.site-tabs button:focus-visible { outline: 2px solid var(--ink); outline-offset: -2px; }
.site-stats small { font-weight: 400; }
.section { width: 100%; height: auto; display: block; margin: 4px 0; }
.sun-floors { display: inline-flex; align-items: center; gap: 4px; }
.sun-floors input { width: 4.5em; font: inherit; padding: 5px 8px; border: 1px solid var(--rule-strong); border-radius: var(--r-input); background: var(--surface); color: var(--ink); }
/* partner ad on permit pages (N3): the gold logo needs a dark card */
.invest-ad { position: relative; display: grid; grid-template-columns: 80px 1fr; gap: 14px; align-items: center; background: #14233a; color: #f3efe4; text-decoration: none; border-radius: 12px; padding: 16px; }
.invest-ad:hover, .invest-ad:focus-visible { background: #1b2f4d; }
.invest-ad:focus-visible { outline: 2px solid #d4af37; outline-offset: 2px; }
.invest-ad img { width: 80px; height: 80px; }
.invest-copy { font-size: var(--s0); line-height: 1.45; }
.invest-copy b { display: block; font-size: var(--s1); color: #fff; margin-bottom: 2px; }
.invest-cta { display: block; margin-top: 8px; font-weight: 600; color: #d4af37; }
.invest-tag { position: absolute; top: 8px; right: 10px; font-size: 10px; letter-spacing: .06em; text-transform: uppercase; color: rgba(243, 239, 228, .55); }
/* "Sponsored by N3" in the masthead: gold logo on a dark pill */
.sponsor { display: flex; align-items: center; gap: 6px; flex: none; padding: 3px 10px 3px 8px; border-radius: 999px; background: #14233a; color: #f3efe4; text-decoration: none; font-size: 11px; line-height: 1.1; }
.sponsor:hover, .sponsor:focus-visible { background: #1b2f4d; }
.sponsor:focus-visible { outline: 2px solid #d4af37; outline-offset: 2px; }
.sponsor img { width: 30px; height: 30px; display: block; }
.sponsor-by { color: rgba(243, 239, 228, .7); }
.sponsor-url { font-weight: 600; color: #d4af37; }
@media (max-width: 1180px) { .sponsor-url { display: none; } }
@media (max-width: 767px) { .sponsor-by { display: none; } .sponsor { padding: 2px 6px; } .sponsor img { width: 26px; height: 26px; } }
/* site analysis: key points, panorama, height rose, sea by floor; the permit page's link to it */
.site-points { margin: 0 0 12px; padding-left: 18px; font-size: var(--s0); display: grid; gap: 6px; }
.pano-wrap { overflow-x: auto; margin: 4px -4px 6px; }
.pano { display: block; width: 100%; min-width: 560px; height: auto; border-radius: 6px; }
.rose-wrap { display: flex; justify-content: center; }
.rose { max-width: 100%; height: auto; }
.key-inline { display: inline-flex; align-items: center; gap: 4px; font-weight: 600; }
.key-inline::before { content: ""; width: 14px; height: 4px; border-radius: 2px; background: var(--c); }
.floor-sea .hb > span:first-child { min-width: 4.5em; }
.pin-hint { margin: 4px 0 8px; }
.site-card { display: grid; gap: 6px; text-decoration: none; color: var(--ink); background: var(--surface); border: 2px solid var(--brand); border-radius: 12px; padding: 14px 16px; }
.site-card:hover, .site-card:focus-visible { background: var(--brand-soft); }
.site-card-head { display: flex; align-items: center; gap: 8px; font-size: var(--s1); }
.site-card-head svg { width: 22px; height: 22px; fill: none; stroke: var(--brand); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.site-card-cta { font-weight: 600; color: var(--brand); font-size: var(--s0); }
/* 3D view */
.view3d { position: fixed; inset: 0; z-index: 2000; display: grid; grid-template-rows: auto 1fr auto; background: var(--surface); }
.v3-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 16px; border-bottom: 1px solid var(--rule); }
.v3-head span { display: block; }
.v3-map { position: relative; min-height: 0; }
.v3-panel { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; padding: 10px 16px 14px; border-top: 1px solid var(--rule); }
.v3-panel .label { margin: 0; }
.v3-panel input[type="range"] { flex: 1 1 200px; accent-color: var(--sun); }
.v3-panel select { font: inherit; padding: 5px 8px; border: 1px solid var(--rule-strong); border-radius: var(--r-input); background: var(--surface); color: var(--ink); }
.v3-panel p { flex-basis: 100%; margin: 0; }
.v3-views { display: flex; flex-wrap: wrap; gap: 6px; }
/* site score, walking table, summary button */
.site-score { display: grid; grid-template-columns: 96px 1fr; gap: 6px 16px; align-items: center; margin-bottom: 14px; }
.site-score > p { grid-column: 1 / -1; margin: 0; }
.score-dial { width: 96px; height: 96px; border-radius: 50%; display: grid; place-content: center; text-align: center; background: radial-gradient(circle at center, var(--surface) 60%, transparent 61%), conic-gradient(var(--brand) calc(var(--p) * 1%), var(--rule) 0); }
.score-dial b { font-size: 30px; line-height: 1; }
.score-dial span { font-size: 11px; color: var(--ink-2); font-weight: 600; }
.score-parts { list-style: none; margin: 0; padding: 0; display: grid; gap: 5px; font-size: var(--s-1); }
.score-parts li { display: grid; grid-template-columns: 1fr 70px 24px; gap: 2px 8px; align-items: center; }
.sp-bar { height: 6px; background: var(--rule); border-radius: 3px; overflow: hidden; }
.sp-bar span { display: block; height: 100%; background: var(--brand); }
.score-parts b { text-align: right; }
.sp-why { grid-column: 1 / -1; margin-top: -2px; }
.site-summary { display: grid; gap: 6px; margin: 14px 0 4px; padding: 12px; border: 1px solid var(--rule); border-radius: 12px; background: var(--paper); }
.site-summary .btn { justify-self: start; }
.walk-head { display: flex; gap: 12px; align-items: center; margin-bottom: 10px; }
.walk-head b { font-size: 28px; }
.walk-table td { vertical-align: top; }
.walk-table .dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 6px; }
.walk-label { background: rgba(255, 255, 255, .85); border: 0; box-shadow: none; font-size: 11px; font-weight: 600; padding: 0 4px; color: #192e4d; }
.walk-label::before { display: none; }
.cons-list { list-style: none; padding: 0; margin: 0 0 8px; display: grid; gap: 6px; font-size: var(--s0); }
.cons-list .dot, .site-points .dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 6px; }
.site-points li.warn { color: var(--danger, #a8322a); }
/* compare sites; the site report */
.compare-btn { width: 100%; margin-bottom: 8px; }
.compare-wrap { overflow-x: auto; }
.compare-table th, .compare-table td { vertical-align: top; min-width: 110px; }
.compare-table tbody th { text-align: left; font-weight: 600; color: var(--ink-2); }
.rep-buttons { display: flex; gap: 8px; }
.rep-map { height: 360px; border-radius: 12px; overflow: hidden; margin: 14px 0; }
.height-rep-map { height: 320px; border-radius: 10px; margin: 12px 0 14px; border: 1px solid var(--rule); position: relative; overflow: hidden; box-shadow: 0 1px 4px rgba(0,0,0,0.06); }
.site-report .site-tabs { display: none; }
.site-report .site-pane { margin-top: 8px; }
.site-report .site-pane > h2 { border-top: 1px solid var(--rule); padding-top: 14px; }
@media print {
  .rep-map { height: 300px; break-inside: avoid; }
  .height-rep-map { height: 260px; break-inside: avoid; }
  .site-report .drawer-actions, .site-report [data-summary-box], .site-report input[type="range"], .site-report .sun-controls, .site-report .link-btn { display: none !important; }
  .site-report .site-pane { break-inside: auto; }
  .site-report svg, .site-report table, .site-score { break-inside: avoid; }
  .invest-ad { break-inside: avoid; }
}
/* Tallest granted map markers and list */
.hmap-pill-wrap { background: transparent; border: 0; }
.hmap-pill { display: inline-flex; align-items: center; background: #fff; border: 2px solid var(--bg, #1a73e8); border-radius: 14px; padding: 2px 7px 2px 4px; box-shadow: 0 2px 6px rgba(0,0,0,0.32); font-family: inherit; font-size: 11px; line-height: 1.25; white-space: nowrap; cursor: pointer; transition: transform .15s ease, box-shadow .15s ease; }
.hmap-pill.is-eapps { border-color: #0b8043; border-width: 2.5px; }
.hmap-pill .hp-num { background: var(--bg, #1a73e8); color: #fff; font-weight: 700; font-size: 10px; padding: 1px 4px; border-radius: 8px; margin-right: 4px; }
.hmap-pill.is-eapps .hp-num { background: #0b8043; }
.hmap-pill .hp-val { font-weight: 700; color: #1e293b; }
.hmap-pill:hover, .hmap-pill.is-hovered { transform: scale(1.18); box-shadow: 0 4px 14px rgba(0,0,0,0.45); z-index: 9999 !important; }
.tallest-list { display: grid; gap: 8px; list-style: none; padding: 0; margin: 10px 0 16px; }
.tallest-item { padding: 9px 12px; border: 1px solid var(--rule, #e5e7eb); border-radius: 8px; background: var(--surface, #fff); transition: background .12s, border-color .12s; cursor: pointer; }
.tallest-item:hover, .tallest-item.is-active { background: #f8fafc; border-color: #94a3b8; }
.tallest-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tallest-rank { color: #fff; font-size: 11px; font-weight: 700; padding: 2px 6px; border-radius: 4px; min-width: 22px; text-align: center; }
.tallest-case { font-weight: 600; text-decoration: none; color: var(--link, #1a73e8); }
.tallest-case:hover { text-decoration: underline; }
.tallest-height { margin-left: auto; font-size: 13px; text-align: right; }
.tallest-sub { margin-top: 4px; display: flex; flex-wrap: wrap; gap: 6px; }
.tallest-m { color: #0b8043; }
.eapps-tag { background: #e6f4ea; color: #137333; font-weight: 700; padding: 1px 5px; border-radius: 4px; font-size: 10px; text-transform: uppercase; letter-spacing: .03em; vertical-align: middle; }
.hmap-popup { font-family: inherit; font-size: 12px; line-height: 1.4; padding: 2px; }
.hmp-title { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 5px; border-bottom: 1px solid #e5e7eb; padding-bottom: 3px; }
.hmp-tag { background: #e6f4ea; color: #137333; font-size: 10px; font-weight: 600; padding: 1px 5px; border-radius: 4px; }
.hmp-main { margin: 4px 0 6px; }
.hmp-val { font-size: 14px; font-weight: 700; color: #0b8043; }
.hmp-meta { margin-top: 4px; color: #64748b; }
/* map panel and key fold away */
.head-btns { display: flex; gap: 6px; }
.map-panel.folded > :not(.map-panel-head) { display: none !important; } /* the pin and draw buttons are in .site-tools */
.map-panel.folded { padding-bottom: 12px; }
.legend-fold { display: flex; width: 100%; justify-content: space-between; align-items: center; gap: 8px; background: none; border: 0; padding: 0 0 4px; font: inherit; font-weight: 700; font-size: 12px; color: var(--ink-2); cursor: pointer; }
.legend.folded .legend-body { display: none; }
.legend.folded .legend-fold { padding: 0; }
.marks-map { height: 420px; border-radius: 12px; margin: 12px 0 16px; }
.admin tr[data-i] { cursor: pointer; }
/* capacity of a drawn plot */
.cap-head { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--rule); border-radius: 12px; overflow: hidden; margin-bottom: 12px; }
.cap-head > div { padding: 12px 14px; border-right: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.cap-head > div:nth-child(2n) { border-right: 0; }
.cap-head b { display: block; font-size: 26px; line-height: 1.1; }
.cap-head span { font-size: var(--s-1); color: var(--ink-2); }
.cap-head > div:first-child { background: #fff7d9; }
.cap-table tr.likely td { background: #fff7d9; }
.cap-opts { margin: 10px 0; }
.cap-opts summary { cursor: pointer; font-weight: 600; }
.cap-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 14px; margin-top: 10px; font-size: var(--s-1); }
.cap-grid label { display: grid; gap: 4px; color: var(--ink-2); }
.cap-grid input, .cap-grid select { font: inherit; padding: 5px 8px; border: 1px solid var(--rule-strong); border-radius: var(--r-input); background: var(--surface); color: var(--ink); }
.cap-grid .check { display: flex; align-items: center; gap: 6px; grid-column: 1 / -1; }
p.warn { color: var(--refused); }
/* homepage: draw your plot (site analysis) */
.plot-hero { display: grid; gap: 20px; align-items: center; margin: 0 0 20px; padding: 24px; border-radius: 18px; background: #14233a; color: #f3efe4; }
@media (min-width: 900px) { .plot-hero { grid-template-columns: 1.25fr 1fr; padding: 32px; } }
.plot-hero h2 { font-size: var(--s4); line-height: 1.1; font-variation-settings: "wdth" 115; color: #fff; margin: 4px 0 10px; }
.plot-hero p { margin: 0 0 12px; color: rgba(243, 239, 228, .88); }
.plot-hero-kicker { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #ffc21a !important; margin: 0 !important; }
.plot-hero-list { list-style: none; padding: 0; margin: 0 0 18px; display: grid; gap: 6px; font-size: var(--s0); }
.plot-hero-list li { padding-left: 22px; position: relative; color: rgba(243, 239, 228, .85); }
.plot-hero-list li::before { content: ""; position: absolute; left: 0; top: .45em; width: 12px; height: 12px; border-radius: 3px; background: #ffc21a; }
.plot-hero-list b { color: #fff; }
.plot-hero-go { display: flex; flex-wrap: wrap; gap: 8px; }
.plot-hero-go select { flex: 1 1 200px; height: 44px; font: inherit; padding: 0 12px; border-radius: var(--r-input); border: 0; background: #fff; color: var(--ink); }
.plot-hero-go .btn { height: 44px; }
.plot-hero-go .btn.primary { background: #ffc21a; border-color: #ffc21a; color: #14233a; }
.plot-hero-go .btn.primary:hover { background: #ffd24d; }
.plot-hero-go .btn:not(.primary) { background: transparent; border-color: rgba(243, 239, 228, .45); color: #f3efe4; }
.plot-hero-art svg { display: block; width: 100%; height: auto; border-radius: 14px; }
@media (max-width: 899px) { .plot-hero-art { display: none; } }
.plot-hero-go .btn { white-space: nowrap; }
.cap-flag { border-radius: 10px; padding: 10px 12px; margin-bottom: 12px; background: #fff7d9; border: 1px solid #f2d06b; font-size: var(--s0); }
.cap-flag.severe { background: #fbe9e7; border-color: var(--refused); }
.cap-flag.severe b { color: var(--refused); }
.cap-flag ul { margin: 6px 0; padding-left: 18px; }

/* site analysis: the actions bar above the tabs */
.site-bar { position: sticky; top: -14px; z-index: 2; margin: -14px -16px 12px; padding: 10px 16px; background: var(--surface); border-bottom: 1px solid var(--rule); display: grid; gap: 6px; }
.site-bar .drawer-actions { margin: 0; gap: 6px; }
.site-bar .drawer-actions .btn { min-height: 34px; padding: 4px 10px; font-size: var(--s0); }
.site-bar .drawer-actions .btn.primary { flex: 1 1 100%; justify-content: center; min-height: 40px; font-size: var(--s1); }
.site-bar .site-summary { margin: 0; padding: 0; border: 0; background: none; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.site-bar .site-summary > .small.muted { display: none; }
.site-bar .site-summary .btn { min-height: 34px; }
/* homepage: the map, prominent */
.map-hero { display: grid; grid-template-columns: auto 1fr auto; gap: 16px; align-items: center; margin: 0 0 16px; padding: 18px 22px; border-radius: 16px;
  background: var(--brand); color: #fff; text-decoration: none; box-shadow: 0 6px 18px rgba(9, 119, 131, .25); }
.map-hero:hover, .map-hero:focus-visible { background: #0b8794; }
.map-hero-icon svg { width: 40px; height: 40px; fill: none; stroke: #fff; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; display: block; }
.map-hero-copy b { display: block; font-size: var(--s3); line-height: 1.15; font-variation-settings: var(--wide); }
.map-hero-copy span { font-size: var(--s0); color: rgba(255, 255, 255, .88); }
.map-hero-go { font-weight: 700; white-space: nowrap; background: #fff; color: var(--brand); border-radius: 999px; padding: 10px 18px; }
@media (max-width: 640px) { .map-hero { grid-template-columns: auto 1fr; } .map-hero-go { grid-column: 1 / -1; text-align: center; } }
.scrape-unit { margin-bottom: 8px; }
.scrape-unit summary { cursor: pointer; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.scrape-log { max-height: 320px; overflow: auto; font-size: 11.5px; line-height: 1.45; background: #0f1a2b; color: #d7e2ee; padding: 10px 12px; border-radius: 8px; white-space: pre-wrap; word-break: break-word; }
.scrape-stats { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); margin-bottom: 16px; }
/* "This spot is on an earlier application's site": take its PA boundary as the plot. */
.plot-pick { margin: 0 0 10px; padding: 10px 12px; border-radius: 10px; background: var(--notice-soft); font-size: var(--s-1); }
.plot-pick p { margin: 0 0 8px; }
.plot-pick-btns { display: flex; flex-wrap: wrap; gap: 6px; }
.plot-pick-btns .btn { min-height: 34px; padding: 4px 10px; font-size: var(--s-1); }
.plot-pick[hidden] { display: none; }
/* Permit page actions: one bar under the case header that stays in view while scrolling. */
.action-bar { position: sticky; top: 0; z-index: 30; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 14px -4px 10px; padding: 10px 4px;
  background: var(--paper, var(--surface)); border-bottom: 1px solid var(--rule); }
@media (max-width: 1099px) { .action-bar { top: var(--masthead-h); } }
.action-bar .btn { display: inline-flex; align-items: center; gap: 7px; min-height: 40px; }
.action-bar .btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; flex: none; }
.action-bar .follow-btn { padding-inline: 18px; font-weight: 700; }
.follow-btn[aria-pressed="true"] { background: var(--notice); border-color: var(--notice); color: var(--ink); }
.follow-btn[aria-pressed="true"] svg { fill: currentColor; }
.action-more { position: relative; }
.action-more > summary { list-style: none; cursor: pointer; }
.action-more > summary::-webkit-details-marker { display: none; }
.action-menu { position: absolute; right: 0; top: calc(100% + 6px); z-index: 31; min-width: 220px; display: grid; background: var(--surface); border: 1px solid var(--rule-strong); border-radius: 10px; box-shadow: 0 8px 24px rgba(24, 33, 43, .18); padding: 6px; }
.action-menu a { display: block; padding: 9px 10px; border-radius: 7px; color: var(--ink); text-decoration: none; font-size: var(--s-1); border: 0; background: none; min-height: 0; }
.action-menu a:hover { background: rgba(25, 46, 77, .06); }
@media (max-width: 767px) {
  .action-bar { flex-wrap: nowrap; overflow-x: auto; margin-inline: -16px; padding-inline: 16px; scrollbar-width: none; }
  .action-bar .btn { flex: none; }
  .action-menu { position: fixed; left: 16px; right: 16px; top: auto; bottom: calc(var(--tabbar-h, 64px) + 12px); }
}
/* Architect view (/permit/<id>/studio): the whole width, three columns that scroll on their own. */
.studio { display: grid; grid-template-columns: minmax(300px, 22%) minmax(0, 1fr) minmax(360px, 30%); gap: 0; height: calc(100dvh - var(--masthead-h)); background: var(--paper, var(--surface)); }
.studio:fullscreen { height: 100dvh; }
.studio-col { overflow-y: auto; padding: 18px 22px 40px; min-width: 0; }
.studio-col + .studio-col { border-left: 1px solid var(--rule); }
.studio-col h2 { font-size: var(--s1); margin: 22px 0 8px; }
.studio-case h1.case { margin: 6px 0 2px; }
.studio-case .works { font-size: var(--s0); }
.studio-actions { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0; }
.studio-actions .btn { min-height: 36px; }
.studio-actions .follow-btn { display: inline-flex; align-items: center; gap: 6px; }
.studio-actions .follow-btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.studio-site { padding: 0 0 40px; }
.studio-site > :not(.studio-map) { margin-inline: 22px; }
.studio-map { height: min(62dvh, 720px); border-bottom: 1px solid var(--rule); }
.studio-est { margin-top: 16px; font-size: var(--s0); }
.studio-ask { background: var(--notice-soft); border-radius: 12px; padding: 12px 14px; }
.studio-ask h2 { margin-top: 0; }
.studio-ask-btns { display: flex; flex-wrap: wrap; gap: 6px; }
.studio table.plain { font-size: 13px; }
@media (min-width: 2200px) { .studio { grid-template-columns: minmax(340px, 20%) minmax(0, 1fr) minmax(460px, 30%); } .studio-map { height: 70dvh; } }
@media (max-width: 1099px) {
  .studio { display: block; height: auto; }
  .studio-col { overflow: visible; }
  .studio-col + .studio-col { border-left: 0; border-top: 1px solid var(--rule); }
}
/* Capacity wizard */
.cap-steps { display: flex; flex-wrap: wrap; gap: 4px 14px; list-style: none; padding: 0; margin: 0 0 12px; font-size: var(--s-1); }
.cap-steps button { text-decoration: none; color: var(--ink-2); }
.cap-steps button span { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; border: 1px solid var(--rule-strong); font-size: 11px; margin-right: 3px; }
.cap-steps button[aria-current="step"] { color: var(--ink); font-weight: 700; }
.cap-steps button[aria-current="step"] span { background: var(--ink); color: #fff; border-color: var(--ink); }
.cap-next { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 14px; }
.edge-tag { display: inline-block; padding: 1px 6px; border-radius: 6px; background: rgba(91, 107, 125, .12); font-size: 12px; }
.edge-tag.on { background: #f28c00; color: #fff; }
.cap-mix input { width: 72px; text-align: right; height: 32px; }
.site-report .cap-steps, .site-report .cap-next { display: none; }
/* Phones: the bottom bar is Home, Applications, Periti, Map, Following; Insights stays on wide screens. */
.tab-phone, .phone-only { display: none; }
@media (max-width: 767px) {
  .tab-wide { display: none !important; }
  .tab-phone { display: flex; }
  .phone-only { display: block; }
  a.phone-only, .action-bar .phone-only { display: inline-flex; }
  .quick-actions.phone-only { display: grid; }
}
.quick-actions { grid-template-columns: 1fr 1fr; gap: 10px; margin: 14px 0 6px; }
.quick-actions a { display: grid; grid-template-columns: 28px 1fr; grid-template-rows: auto auto; column-gap: 10px; align-items: center; padding: 14px; min-height: 72px;
  background: var(--surface); border: 1px solid var(--rule); border-radius: 14px; color: var(--ink); text-decoration: none; box-shadow: 0 1px 3px rgba(24, 33, 43, .06); }
.quick-actions a:active { transform: scale(.98); }
.quick-actions svg { grid-row: span 2; width: 26px; height: 26px; fill: none; stroke: var(--brand, #097783); stroke-width: 1.8; stroke-linejoin: round; }
.quick-actions b { font-size: var(--s0); }
.quick-actions span { font-size: 12px; color: var(--ink-2); }
.phone-block h2 { font-size: var(--s1); margin: 18px 0 8px; }
.recent-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.recent-list a { display: grid; gap: 2px; padding: 12px 14px; background: var(--surface); border: 1px solid var(--rule); border-radius: 12px; color: var(--ink); text-decoration: none; }
.recent-list a b { display: inline; margin-right: 6px; }
.recent-list span { font-size: var(--s-1); color: var(--ink-2); }
.recent-list small { color: var(--brand, #097783); font-weight: 600; }
.install-btn { width: 100%; min-height: 46px; margin-top: 8px; }
.install-hint { background: var(--notice-soft); border-radius: 10px; padding: 10px 12px; }
.email-signin { background: var(--notice-soft); border-radius: 10px; padding: 10px 12px; margin: 8px 0; }
.email-signin .ask-row input { min-width: 0; }
@media (max-width: 767px) {
  /* Bigger tap targets for documents and lists on phones. */
  #documents a[data-doc], .doc-list a { display: inline-block; padding: 8px 0; }
  .ask-row input, .ask-row .btn { min-height: 46px; font-size: 16px; } /* 16px: no zoom on focus in iOS */
  .masthead-search input { font-size: 16px; }
  body { padding-bottom: env(safe-area-inset-bottom); }
}
@media (display-mode: standalone) { .sponsor-url { display: none; } }
/* Assistant full screen: the window under the masthead, the conversation in a readable column. */
.assistant.full { inset: var(--masthead-h) 0 0 0; right: 0; bottom: 0; width: 100%; height: auto; border-radius: 0; z-index: 900; }
.assistant.full .as-body, .assistant.full .as-form, .assistant.full .verify-slot { width: 100%; max-width: 920px; margin-inline: auto; }
.assistant.full .as-body { padding: 24px 20px; font-size: var(--s0); }
.assistant.full .as-form { border-top: 0; padding-bottom: calc(16px + env(safe-area-inset-bottom)); }
.assistant.full .as-head { padding-inline: max(14px, calc((100% - 920px) / 2)); }
@media (max-width: 767px) { .assistant.full { bottom: var(--tabbar-h); } }
#as-full svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; }
#as-full[aria-pressed="true"] { color: var(--brand); }
body:has(.assistant.full:not([hidden])) .fab { display: none; }
.assistant.full .as-form .btn { flex: none; min-width: 120px; }
/* Periti league */
.league-cta { display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: center; margin: 14px 0 18px; padding: 14px 18px; border-radius: 14px;
  background: linear-gradient(110deg, var(--ink), #24466f); color: #fff; text-decoration: none; box-shadow: 0 6px 20px rgba(24, 33, 43, .18); }
.league-cta b { display: block; font-size: var(--s1); }
.league-cta span span { display: block; opacity: .85; font-size: var(--s-1); }
.league-cup { font-size: 30px; }
.league-go { font-weight: 700; white-space: nowrap; }
@media (max-width: 600px) { .league-cta { grid-template-columns: auto 1fr; } .league-go { grid-column: 2; } }
.lg-head { margin-bottom: 10px; }
.lg-kicker { font-size: var(--s-1); font-weight: 700; color: var(--brand, #097783); text-transform: uppercase; letter-spacing: .06em; margin: 0; }
.lg-areas { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 10px 0; }
.lg-areas .chip[aria-pressed="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }
.lg-loc { height: 34px; border: 1px solid var(--rule-strong); border-radius: 999px; padding: 0 10px; background: var(--surface); font: inherit; font-size: var(--s-1); }
.lg-tools { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; margin: 8px 0; }
.lg-tools .seg { display: inline-flex; border: 1px solid var(--rule-strong); border-radius: 999px; padding: 2px; background: var(--surface); }
.lg-tools .seg button { border: 0; background: none; font: inherit; font-size: var(--s-1); font-weight: 650; padding: 6px 12px; border-radius: 999px; cursor: pointer; color: var(--ink-2); }
.lg-tools .seg button[aria-pressed="true"] { background: var(--ink); color: #fff; }
.lg-find input { height: 36px; border: 1px solid var(--rule-strong); border-radius: 999px; padding: 0 14px; font: inherit; min-width: 220px; }
.lg-found { min-height: 1.2em; color: var(--brand, #097783); font-weight: 600; }
.lg-podium { list-style: none; padding: 0; margin: 16px 0 6px; display: grid; grid-template-columns: 1fr 1.15fr 1fr; gap: 12px; align-items: end; }
.lg-podium li { position: relative; display: grid; gap: 4px; justify-items: center; text-align: center; padding: 18px 12px 14px; border-radius: 16px; background: var(--surface); border: 1px solid var(--rule); box-shadow: 0 4px 16px rgba(24, 33, 43, .08); }
.lg-podium .p1 { order: 2; padding-top: 26px; border-color: #e3b341; box-shadow: 0 8px 26px rgba(227, 179, 65, .35); }
.lg-podium .p2 { order: 1; } .lg-podium .p3 { order: 3; }
.lg-podium a { color: var(--ink); text-decoration: none; font-size: var(--s1); }
.lg-medal { font-size: 34px; line-height: 1; }
.lg-score { font-size: var(--s2); font-weight: 800; font-variation-settings: var(--wide, normal); }
.lg-podium .lg-move { position: absolute; top: 10px; right: 10px; }
@media (max-width: 640px) { .lg-podium { grid-template-columns: 1fr; } .lg-podium .p1, .lg-podium .p2, .lg-podium .p3 { order: 0; } }
.lg-champs { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px; }
.lg-champ { display: grid; gap: 2px; text-align: left; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--rule); background: var(--surface); font: inherit; cursor: pointer; }
.lg-champ:hover { border-color: var(--brand, #097783); }
.lg-champ span { font-size: 12px; color: var(--ink-2); text-transform: uppercase; letter-spacing: .04em; }
.lg-champ small { color: var(--ink-2); }
.lg-table { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.lg-table li { border: 1px solid var(--rule); border-radius: 12px; background: var(--surface); transition: box-shadow .3s, border-color .3s; }
.lg-table li.hit { border-color: var(--brand, #097783); box-shadow: 0 0 0 3px var(--brand-soft, rgba(9,119,131,.2)); }
.lg-table summary { display: grid; grid-template-columns: 34px 46px minmax(0, 1.4fr) minmax(60px, 1fr) auto; gap: 10px; align-items: center; padding: 10px 12px; cursor: pointer; list-style: none; }
.lg-table summary::-webkit-details-marker { display: none; }
.lg-rank { font-weight: 800; font-size: var(--s1); text-align: center; }
.lg-name a { color: var(--ink); font-weight: 650; text-decoration: none; }
.lg-badges { margin-left: 6px; white-space: nowrap; }
.lg-badge { display: inline-block; font-size: 15px; margin-right: 2px; cursor: help; }
.lg-bar { height: 8px; border-radius: 99px; background: rgba(25, 46, 77, .08); overflow: hidden; }
.lg-bar i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--brand, #097783), #e3b341); }
.lg-val { font-weight: 700; white-space: nowrap; min-width: 70px; text-align: right; }
.lg-move { font-size: 12px; font-weight: 700; border-radius: 6px; padding: 1px 5px; text-align: center; }
.lg-move.up { color: #0b7a3e; background: rgba(11, 122, 62, .1); } .lg-move.down { color: #a8322a; background: rgba(168, 50, 42, .1); }
.lg-move.new { color: #6a4bc4; background: rgba(106, 75, 196, .1); } .lg-move.same { color: var(--ink-3, #8a94a0); }
.lg-more { padding: 0 14px 12px 102px; }
@media (max-width: 640px) { .lg-table summary { grid-template-columns: 28px 40px 1fr auto; } .lg-bar { display: none; } .lg-more { padding-left: 14px; } }
.lg-rules { margin-top: 26px; }
.lg-badge-list { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 6px 14px; font-size: var(--s-1); }
/* Wizard step 2: the plot's sides, on a plan and in a list */
.edge-pick { display: grid; grid-template-columns: minmax(150px, 240px) 1fr; gap: 14px; align-items: start; margin: 10px 0; }
@media (max-width: 520px) { .edge-pick { grid-template-columns: 1fr; } }
.plot-plan { width: 100%; height: auto; background: var(--surface); border: 1px solid var(--rule); border-radius: 12px; }
.plan-edge { cursor: pointer; outline: none; }
.plan-edge .hit { stroke: transparent; stroke-width: 18; }
.plan-edge .vis { stroke: #8a94a0; stroke-width: 3; stroke-dasharray: 5 4; }
.plan-edge.on .vis { stroke: #f28c00; stroke-width: 5; stroke-dasharray: none; }
.plan-edge circle { fill: #fff; stroke: #8a94a0; stroke-width: 1.5; }
.plan-edge.on circle { fill: #f28c00; stroke: #f28c00; }
.plan-edge text { font: 700 10px Archivo, sans-serif; fill: var(--ink); pointer-events: none; }
.plan-edge.on text { fill: #fff; }
.plan-edge:hover .vis, .plan-edge:focus-visible .vis { stroke: var(--brand, #097783); }
.edge-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 4px; font-size: var(--s-1); }
.edge-list label { display: flex; gap: 6px; align-items: baseline; padding: 6px 8px; border-radius: 8px; border: 1px solid var(--rule); cursor: pointer; }
.edge-list input:checked + b { color: #c06d00; }
.edge-label { display: grid !important; place-items: center; width: 24px !important; height: 24px !important; border-radius: 50%; background: #fff; color: var(--ink); border: 2px solid #5b6b7d;
  font: 700 12px Archivo, sans-serif; box-shadow: 0 1px 4px rgba(0,0,0,.35); cursor: pointer; }
.edge-label.on { background: #f28c00; border-color: #fff; color: #fff; }
/* Plot mode: drawing and studying a plot full screen */
.plot-bar { display: none; }
.mapview.plot-mode .plot-bar { display: flex; position: absolute; z-index: 570; top: 12px; left: 12px; right: calc(min(560px, 44vw) + 24px); flex-wrap: wrap; gap: 8px; align-items: center;
  background: var(--surface); border: 1px solid var(--rule-strong); border-radius: 12px; padding: 8px 10px; box-shadow: 0 6px 20px rgba(24, 33, 43, .22); font-size: var(--s-1); }
.plot-title { font-weight: 800; }
.plot-hint { flex: 1 1 260px; color: var(--ink-2); }
.plot-bar .btn { min-height: 36px; }
.mapview.plot-mode .map-panel, .mapview.plot-mode .map-note, .mapview.plot-mode .site-tools, .mapview.plot-mode .legend { display: none !important; }
.mapview.plot-mode .map-drawer { width: min(560px, 44vw); }
.mapview.plot-mode .leaflet-bottom.leaflet-left { bottom: 0; }
@media (max-width: 767px) {
  .mapview.plot-mode .plot-bar { left: 8px; right: 8px; top: 8px; }
  .mapview.plot-mode .map-drawer { width: 100%; height: 52%; }
  .mapview.plot-mode .plot-hint { flex-basis: 100%; order: 3; }
}
.corner-handle { width: 18px !important; height: 18px !important; margin: -9px 0 0 -9px !important; border-radius: 50%; background: #ffc21a; border: 3px solid #192e4d; box-shadow: 0 1px 5px rgba(0,0,0,.45); cursor: grab; }
.corner-handle:active { cursor: grabbing; }
.mapview.plot-mode .edge-list label { padding: 8px 10px; }
/* Capacity: the recommendation */
.cap-rec { border: 2px solid var(--brand, #097783); border-radius: 14px; padding: 12px 14px; margin-bottom: 14px; background: var(--surface); }
.cap-rec-head { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.cap-rec-head > div { display: grid; }
.cap-rec-head b { font-size: var(--s3, 28px); font-variation-settings: var(--wide, normal); line-height: 1.1; }
.cap-rec ul { margin: 6px 0; padding-left: 18px; }
.cap-rec details { margin-top: 8px; }
.cap-rec summary { cursor: pointer; font-weight: 650; }
.site-report [data-ask-rec] { display: none; }
/* Capacity study: the same layout in the wizard and the report */
.cap-study h4 { font-size: var(--s0); margin: 16px 0 6px; }
.cap-steps-why { padding-left: 20px; display: grid; gap: 8px; font-size: var(--s-1); line-height: 1.5; }
.cap-study table.plain { margin: 4px 0 8px; }
.cap-study details { margin: 8px 0; }
.cap-study details > summary { cursor: pointer; font-weight: 650; }
@media print { .cap-study details > * { display: block; } .cap-study .no-print { display: none; } }
/* Site report: the planning files being read, and the WhatsApp note when it's complete */
.report-status { border: 1px solid var(--rule-strong); border-left: 4px solid var(--brand, #097783); border-radius: 12px; padding: 12px 14px; margin: 12px 0; background: var(--surface); }
.rs-head { display: grid; gap: 2px; }
.rs-bar { height: 8px; border-radius: 99px; background: rgba(25, 46, 77, .08); overflow: hidden; margin: 8px 0; }
.rs-bar i { display: block; height: 100%; background: var(--brand, #097783); transition: width .6s; }
.rs-notify .ask-row { margin: 6px 0; }
/* Typical layout outlines */
.lp-levels { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; margin: 8px 0; }
.lp-levels figure { margin: 0; border: 1px solid var(--rule); border-radius: 10px; padding: 6px; background: var(--surface); break-inside: avoid; }
.lp-levels figcaption { font-size: 12px; font-weight: 650; text-align: center; color: var(--ink-2); }
.lp-svg { width: 100%; height: auto; }
.lp-svg text { font: 600 9px Archivo, sans-serif; fill: var(--ink); }
.lp-svg .lp-street { font-size: 9px; fill: var(--ink-2); }
.lp-plot { fill: none; stroke: var(--ink); stroke-width: 1.5; }
.lp-yard { fill: rgba(76, 145, 65, .18); stroke: none; }
.lp-terrace { fill: rgba(242, 140, 0, .18); stroke: #f28c00; stroke-dasharray: 3 2; }
.lp-garage { fill: rgba(25, 46, 77, .08); stroke: var(--ink-2); }
.lp-unit { fill: rgba(9, 119, 131, .14); stroke: var(--brand, #097783); stroke-width: 1.2; }
.lp-core { fill: rgba(25, 46, 77, .35); stroke: var(--ink); }
.lp-total td { border-top: 2px solid var(--ink); }
.cap-options td { vertical-align: top; }
.cap-options td:first-child { white-space: nowrap; }
/* Architect view: premium recommendations */
.studio-reco { border: 2px solid #e3b341; border-radius: 14px; padding: 12px 14px; margin-bottom: 14px; background: linear-gradient(180deg, rgba(227,179,65,.08), transparent 60%); }
.studio-reco h2 { margin-top: 0; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.premium-tag { font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: #7a5a00; background: #f6dc8c; border-radius: 6px; padding: 2px 7px; }
.studio-reco .answer { font-size: var(--s-1); line-height: 1.55; }

/* admin Scraping: the proxy plan */
.plan-meter { height: 14px; background: var(--rule); border-radius: 3px; overflow: hidden; margin: 8px 0; }
.plan-meter span { display: block; height: 100%; background: var(--brand); }
.plan-days { list-style: none; margin: 8px 0; padding: 0; display: grid; gap: 4px; }
.plan-days li { display: grid; grid-template-columns: 48px 1fr 70px; gap: 8px; align-items: center; }
.plan-days i { display: block; height: 10px; background: var(--brand); border-radius: 0 3px 3px 0; justify-self: start; }
.plan-days span:last-child { text-align: right; }

/* preliminary analysis */
.prelim-map { height: 380px; margin: 8px 0; border: 1px solid var(--rule); border-radius: 4px; }
.prelim-grid { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); margin-bottom: 16px; }
.prelim-unsure input, .prelim-unsure select { border-color: var(--warn, #b4532a); }
.prelim-note { border-left: 3px solid var(--rule-strong); padding-left: 10px; font-size: var(--s0); }
.prelim-item { margin: 10px 0; }
.prelim-item h3 { margin-top: 0; }
.prelim-delete { margin-top: 24px; }
@media print { .no-print { display: none; } }

/* ---- phones: what the page-by-page check turned up ------------------------------------- */
@media (max-width: 767px) {
  input, select, textarea { font-size: 16px; } /* smaller and iPhones zoom the page on focus */
  .link-btn, .ex-sort { min-height: 36px; }
  .ex-bar #ex-count { order: 9; flex-basis: 100%; }
  #ex-filter-row input, #ex-filter-row select { font-size: 16px; min-width: 96px; }
  /* The map stays the point of the page: the panel takes under half of it and scrolls inside itself. */
  .map-panel { max-height: 46dvh; overflow-y: auto; overscroll-behavior: contain; z-index: 1001; }
  .mapview .leaflet-control-attribution { font-size: 10px; }
  body:has(.mapview) .fab { bottom: calc(46dvh + var(--tabbar-h) + 24px); }
  .rep-buttons { flex-wrap: wrap; }
  .rep-buttons .btn { flex: 1 1 auto; }
}
@media (max-width: 767px) {
  .mapview:has(.map-drawer:not([hidden])) .map-panel { display: none; } /* the site analysis takes that space */
  .site-tools { max-width: calc(100% - 16px); left: 8px; right: 8px; transform: none; }
  .site-tools .tool { padding-inline: 8px; white-space: nowrap; min-width: 0; }
  .site-tools .tool span { font-size: 12px; }
  svg { max-width: 100%; }
  .report-actions { flex-wrap: wrap; gap: 8px; }
}
/* tablets: the full navigation doesn't fit beside the search, so the tabs show icons only */
@media (min-width: 768px) and (max-width: 1099px) {
  .masthead { gap: 12px; padding: 0 14px; }
  .masthead-search { min-width: 120px; }
  .tabs a { font-size: 0; gap: 0; padding: 10px; }
  .tabs svg { width: 20px; height: 20px; }
  .sponsor-by { display: none; }
}
@media screen and (max-width: 767px) {
  .newsletter, .newsletter > *, .detail-grid > *, .ask-row, .ask-row input { min-width: 0; }
  .newsletter { grid-template-columns: minmax(0, 1fr); }
  .detail-grid { grid-template-columns: minmax(0, 1fr); }
  .ask-row input { flex: 1 1 0; width: 100%; }
  .ask-row .btn { flex: none; }
  .report table.plain { display: block; overflow-x: auto; }
}
@media print { input, select, textarea { font-size: inherit; } }
