/* ============================================================
   CADASTRE — munidata design system (theme 05, chosen 2026-07)
   Ledger's discipline in Terra's landscape: the land registry.
   Structure: ruled rows, double rules, tabular numerals,
   footnoted provenance. Wardrobe: survey moss, clay, sand.
   ============================================================ */

:root {
  /* palette */
  --paper: #f3eeda; /* card/panel surface */
  --sand: #e8e1cc; /* page ground */
  --sand-deep: #e3dbc0; /* map ground, wells */
  --sand-line: #c9bd97; /* hairlines on sand */
  --ink: #2b3a33; /* moss ink — text, rules */
  --ink-soft: #55635b; /* secondary text */
  --ink-faint: #2b3a3355;
  --clay: #b34a26; /* accent: live/new/selected, file numbers */
  --moss: #6d7f5a; /* quiet positive, past events */
  --water: #3c6b74; /* links, water on maps */
  --gold: #8a6d2f; /* provenance, caution */

  /* type */
  --f-display: "Zilla Slab", serif;
  --f-body: "Karla", sans-serif;
  --f-mono: "IBM Plex Mono", monospace;

  /* structure */
  --rule: 1px solid var(--ink-faint);
  --rule-strong: 1px solid var(--ink);
  --rule-double: 3px double var(--ink);
  --r: 3px; /* registry corners: nearly square */
  --shadow: 5px 5px 0 #2b3a331f;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
body {
  background: var(--sand);
  color: var(--ink);
  font-family: var(--f-body);
  font-size: 14.5px;
  line-height: 1.55;
  background-image:
    repeating-radial-gradient(circle at 85% -20%, transparent 0 54px, #cfc39b26 54px 56px),
    repeating-linear-gradient(0deg, transparent 0 27px, #2b3a3308 27px 28px);
}
h1,
h2,
h3,
.display {
  font-family: var(--f-display);
}
.mono,
code,
.file-no {
  font-family: var(--f-mono);
}
a {
  color: var(--water);
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}
.num {
  font-variant-numeric: tabular-nums;
}

/* ---------------- top bar ---------------- */
.topbar {
  display: flex;
  align-items: center;
  gap: 26px;
  padding: 13px 24px;
  background: var(--paper);
  border-bottom: var(--rule-double);
  position: sticky;
  top: 0;
  z-index: 50;
}
.wordmark {
  font-family: var(--f-display);
  font-size: 20px;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
/* The Parcel mark (brand/parcel-mark.tsx): outline inherits ink from the link
   color; the monument dot is clay via its own fill token. */
.wordmark .parcel-mark {
  display: block;
}
.topbar nav {
  display: flex;
  gap: 20px;
  font-size: 13.5px;
}
.topbar nav a {
  color: var(--ink);
  text-decoration: none;
  padding-bottom: 2px;
}
.topbar nav a.on {
  box-shadow: inset 0 -2px 0 var(--clay);
  font-weight: 700;
}
.topbar .spacer {
  flex: 1;
}
.pill {
  font-size: 11.5px;
  padding: 5px 11px;
  border-radius: var(--r);
  background: var(--ink);
  color: var(--paper);
  white-space: nowrap;
}
.pill.clay {
  background: var(--clay);
}
.avatar {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: var(--moss);
  color: var(--paper);
  font: 700 12px / 28px var(--f-body);
  text-align: center;
}

/* ---------------- panels & cards ---------------- */
.panel {
  background: var(--paper);
  border: var(--rule-strong);
  border-radius: var(--r);
  box-shadow: var(--shadow);
}
.panel-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 18px;
  border-bottom: var(--rule-double);
}
.panel-head h2,
.panel-head h3 {
  font-size: 15px;
  font-weight: 600;
}
.panel-head .sub {
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.panel-body {
  padding: 16px 18px;
}
.well {
  background: var(--sand-deep);
  border: 1px solid var(--sand-line);
  border-radius: var(--r);
}

/* ---------------- badges ---------------- */
.badge {
  display: inline-block;
  font-size: 11px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  padding: 3px 9px;
  border: 1px solid #2b3a3366;
  border-radius: var(--r);
  background: #ece5cd;
  color: var(--ink);
}
.badge.status {
  background: var(--clay);
  border-color: var(--clay);
  color: var(--paper);
  font-weight: 700;
}
.badge.quiet {
  background: transparent;
}
.badge.moss {
  background: var(--moss);
  border-color: var(--moss);
  color: var(--paper);
}

/* class → left tick color on cards & map parcels */
.c-rezoning {
  --class-c: var(--clay);
}
.c-site_plan {
  --class-c: var(--water);
}
.c-opa {
  --class-c: var(--gold);
}
.c-minor_variance {
  --class-c: var(--moss);
}
.c-subdivision {
  --class-c: #7d5a86;
}

/* ---------------- file number & meta ---------------- */
.file-no {
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--clay);
}
.meta-line {
  font-variant-caps: all-small-caps;
  letter-spacing: 0.06em;
  font-size: 13px;
  color: var(--ink-soft);
}

/* ---------------- facts (ledger grid) ---------------- */
.facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 1px;
  background: #2b3a3326;
  border: 1px solid #2b3a3344;
  font-variant-numeric: tabular-nums;
}
.fact {
  background: #efe9d3;
  padding: 12px 14px 10px;
}
.fact .v {
  font-family: var(--f-display);
  font-size: 24px;
  font-weight: 600;
  line-height: 1.1;
}
.fact .v small {
  font-size: 14px;
  font-weight: 500;
}
.fact .l {
  font-size: 10.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-top: 4px;
  color: var(--ink-soft);
}
.fact .prov {
  margin-top: 7px;
}

/* provenance chip — every derived number wears one */
.prov {
  display: inline-block;
  font-family: var(--f-mono);
  font-size: 10px;
  padding: 2px 6px;
  background: var(--paper);
  border: 1px solid var(--sand-line);
  border-radius: var(--r);
  color: #6d6142;
  cursor: pointer;
}
.prov:hover {
  border-color: var(--gold);
  color: var(--gold);
}
.prov.source {
  color: var(--moss);
} /* source_structured — no LLM involved */

/* footnote-style evidence block */
.evidence {
  border-left: 3px solid var(--gold);
  background: #efe9d3;
  padding: 10px 14px;
  font-size: 13px;
  margin: 8px 0;
}
.evidence q {
  font-style: italic;
}
.evidence .cite {
  display: block;
  margin-top: 6px;
  font-family: var(--f-mono);
  font-size: 10.5px;
  color: #6d6142;
}

/* ---------------- event rows (registry lines) ---------------- */
.ev {
  display: grid;
  grid-template-columns: 82px 12px 1fr;
  gap: 0 12px;
  padding: 9px 0;
  font-size: 13px;
  align-items: baseline;
  border-bottom: 1px dotted var(--ink-faint);
}
.ev .d {
  font-family: var(--f-mono);
  font-size: 11.5px;
  color: var(--ink-soft);
}
.ev .dot {
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: var(--moss);
  justify-self: center;
  position: relative;
  top: 1px;
}
.ev.new .dot {
  background: var(--clay);
}
.ev.future .dot {
  background: transparent;
  border: 1px solid var(--ink-faint);
}
.ev .t b {
  font-weight: 700;
}
.ev .t span {
  color: var(--ink-soft);
}

/* ---------------- buttons ---------------- */
.btn {
  display: inline-block;
  font-family: var(--f-body);
  font-weight: 700;
  font-size: 13px;
  padding: 9px 18px;
  border-radius: var(--r);
  border: var(--rule-strong);
  background: var(--ink);
  color: var(--paper);
  cursor: pointer;
  text-decoration: none;
}
.btn.clay {
  background: var(--clay);
  border-color: var(--clay);
}
.btn.ghost {
  background: transparent;
  color: var(--ink);
}
.btn.sm {
  padding: 6px 12px;
  font-size: 12px;
}

/* ---------------- forms ---------------- */
label.field {
  display: block;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 4px;
}
input[type="text"],
input[type="email"],
select,
textarea {
  width: 100%;
  font-family: var(--f-body);
  font-size: 14px;
  color: var(--ink);
  background: var(--paper);
  border: var(--rule-strong);
  border-radius: var(--r);
  padding: 8px 10px;
}
input:focus,
select:focus {
  outline: 2px solid var(--clay);
  outline-offset: 1px;
}
.checkrow {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  padding: 4px 0;
}

/* ---------------- tables (the ledger itself) ---------------- */
table.ledger {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}
table.ledger th {
  text-align: left;
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-soft);
  font-weight: 600;
  padding: 8px 10px;
  border-bottom: var(--rule-double);
}
table.ledger td {
  padding: 9px 10px;
  border-bottom: 1px dotted var(--ink-faint);
  vertical-align: baseline;
}
table.ledger tr:hover td {
  background: #efe9d3;
}

/* ---------------- cadastral map canvas ---------------- */
.map {
  position: relative;
  overflow: hidden;
  background: var(--sand-deep);
  background-image:
    repeating-radial-gradient(circle at 75% 30%, transparent 0 20px, #c2b48a4d 20px 21.5px),
    linear-gradient(
      105deg,
      transparent 0 31%,
      #a89c7455 31% calc(31% + 1px),
      transparent 0 62%,
      #a89c7455 62% calc(62% + 1px),
      transparent 0
    ),
    linear-gradient(15deg, transparent 0 44%, #a89c7455 44% calc(44% + 1px), transparent 0);
}
.map .road {
  position: absolute;
  background: var(--paper);
  border: 1px solid var(--sand-line);
}
.map .road.h {
  height: 10px;
  left: 0;
  right: 0;
}
.map .road.v {
  width: 10px;
  top: 0;
  bottom: 0;
}
.map .water {
  position: absolute;
  background: #3c6b7422;
  border: 1px solid #3c6b7444;
  border-radius: 40% 60% 55% 45%;
}
.parcel {
  position: absolute;
  border: 1.5px solid var(--class-c, var(--clay));
  background: color-mix(in srgb, var(--class-c, var(--clay)) 14%, transparent);
  cursor: pointer;
}
.parcel.selected {
  border-width: 2.5px;
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--class-c, var(--clay)) 22%, transparent);
}
.parcel .tick {
  position: absolute;
  color: var(--ink);
  font: 12px var(--f-mono);
}
.parcel .tick.tl {
  top: -7px;
  left: -5px;
}
.parcel .tick.br {
  bottom: -7px;
  right: -5px;
}
.maptag {
  position: absolute;
  font-size: 10.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 3px 8px;
  background: var(--paper);
  border: var(--rule-strong);
  border-radius: var(--r);
}
.map .drawn-poly {
  position: absolute;
  border: 2px dashed var(--ink);
  background: #2b3a330d;
  border-radius: 2px 14px 4px 10px;
}
.map .drawn-poly .polylabel {
  position: absolute;
  top: -10px;
  left: 10px;
  font: 10.5px var(--f-mono);
  background: var(--ink);
  color: var(--paper);
  padding: 2px 7px;
  border-radius: var(--r);
  letter-spacing: 0.08em;
}

/* ---------------- status stepper (11-state enum) ---------------- */
.stepper {
  list-style: none;
}
.stepper li {
  display: grid;
  grid-template-columns: 14px 1fr;
  gap: 10px;
  align-items: baseline;
  padding: 6px 0;
  font-size: 13px;
  color: var(--ink-soft);
}
.stepper li::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 2px;
  border: 1px solid var(--ink-faint);
  position: relative;
  top: 1px;
}
.stepper li.done {
  color: var(--ink);
}
.stepper li.done::before {
  background: var(--moss);
  border-color: var(--moss);
}
.stepper li.now {
  color: var(--ink);
  font-weight: 700;
}
.stepper li.now::before {
  background: var(--clay);
  border-color: var(--clay);
}

/* ---------------- footer / statusbar ---------------- */
.statusbar {
  display: flex;
  gap: 22px;
  align-items: center;
  padding: 8px 24px;
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--ink-soft);
  background: var(--paper);
  border-top: var(--rule-double);
}
.statusbar .ok::before {
  content: "●";
  color: var(--moss);
  margin-right: 6px;
}

/* ---------------- utility ---------------- */
.row {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}
.stack {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.muted {
  color: var(--ink-soft);
}
.small {
  font-size: 12.5px;
}
.upcase {
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
hr.rule {
  border: none;
  border-top: var(--rule);
  margin: 14px 0;
}
hr.rule-double {
  border: none;
  border-top: var(--rule-double);
  margin: 16px 0;
}

/* ============================================================
   CADASTRE — kit extensions (6vs.2)
   Components the mockups defined in page-local <style> blocks,
   consolidated here so the shared JSX component kit is styled by
   the shipped stylesheet. Served concatenated after cadastre.css.
   ============================================================ */

/* ---------------- chip (interactive filter / tag) ----------------
   Canonical = map-view.html's chip (the richer, genuinely interactive
   element: selected `.on`, class-color `.tick` swatch, `.x` dismiss).
   alerts.html's mono "criteria" chip is a different concern, deferred. */
.chip {
  display: inline-block; font-size: 12.5px; padding: 5px 11px;
  border: 1px solid #2b3a3355; border-radius: var(--r);
  background: var(--paper); color: var(--ink);
  cursor: pointer; white-space: nowrap; text-decoration: none;
}
.chip:hover { border-color: var(--ink); }
.chip.on { background: var(--ink); color: var(--paper); border-color: var(--ink); font-weight: 600; }
.chip.tick { display: inline-flex; align-items: center; gap: 6px; }
.chip.tick::before {
  content: ""; width: 9px; height: 9px; border-radius: 2px;
  background: var(--class-c, var(--ink)); border: 1px solid #2b3a3344;
}
.chip .x { color: var(--ink-soft); margin-left: 3px; font-family: var(--f-mono); }

/* ---------------- kv (label / value registry rows) ----------------
   From application.html. Right-aligned values with an optional
   sub-line and a trailing provenance chip. */
.kv { border-top: var(--rule); margin-top: 4px; }
.kv .r {
  display: grid; grid-template-columns: minmax(88px, auto) 1fr; gap: 10px 14px;
  padding: 9px 0; border-bottom: 1px dotted var(--ink-faint); align-items: baseline;
}
.kv .r:last-child { border-bottom: none; }
.kv .k { font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-soft); }
.kv .val { text-align: right; font-size: 13.5px; }
.kv .val .sub { display: block; font-size: 11.5px; color: var(--ink-soft); }
.kv .val .mono { font-size: 12px; letter-spacing: .01em; }
.kv .val .arrow { color: var(--ink-faint); margin: 0 5px; }
.kv .prov { margin-top: 5px; }

/* ---------------- auth forms ----------------
   The base input selector (cadastre.css) omits password/search inputs; the
   auth pages need them styled like the rest, so extend the selector here. */
input[type="password"], input[type="search"] {
  width: 100%; font-family: var(--f-body); font-size: 14px; color: var(--ink);
  background: var(--paper); border: var(--rule-strong); border-radius: var(--r);
  padding: 8px 10px;
}
input[type="password"]:focus, input[type="search"]:focus { outline: 2px solid var(--clay); outline-offset: 1px; }

/* Inline validation / auth error banner — clay rule, like a flagged ledger line. */
.formerror {
  border-left: 3px solid var(--clay); background: #efe9d3;
  padding: 9px 12px; font-size: 13px; color: var(--ink); margin-bottom: 14px;
}
/* Success/notice banner — moss rule (verification confirmations). */
.formnotice {
  border-left: 3px solid var(--moss); background: #efe9d3;
  padding: 9px 12px; font-size: 13px; color: var(--ink); margin-bottom: 14px;
}

/* ---------------- class-color tokens (6vs.3) ----------------
   `--class-c` per canonical `application_class` value, read by `.parcel`
   (map) and `.chip.tick` / card ticks. Mapped 1:1 to the ApplicationClass
   enum (pipeline/core/taxonomy.py, 10 values) so every canonical class has a
   swatch and the slug matches the enum string exactly.

   The base sheet (cadastre.css) defines 5 of these; two gaps this closes:
   (1) it used `.c-opa`, which does NOT match the enum slug — the canonical
       token is `.c-official_plan_amendment` below (base's `.c-opa` is now a
       dead legacy alias, harmless, kept only to avoid forking the base).
   (2) five classes had no color: condo, consent_severance, heritage,
       demolition_control, other — added below.

   Colors extend the Cadastre palette. The five existing hues span clay/water/
   gold/moss/purple; the five new ones fill the remaining perceptual gaps
   (blue, magenta, sienna, amber, neutral) so adjacent map parcels stay
   distinguishable while staying muted and harmonious. New values are a design
   call (flagged in the 6vs.3 handoff); revisit if a brand palette lands. */
.c-official_plan_amendment { --class-c: var(--gold); }   /* canonical slug for base's .c-opa */
.c-condo               { --class-c: #3f6f8f; }  /* steel blue — fills the blue gap */
.c-consent_severance   { --class-c: #c08a2e; }  /* amber — lighter sibling of gold */
.c-heritage            { --class-c: #86543a; }  /* sienna — aged/heritage */
.c-demolition_control  { --class-c: #94334a; }  /* mulberry — magenta-side, distinct from clay */
.c-other               { --class-c: #6a6a62; }  /* neutral warm grey — the catch-all */

/* ---------------- map overlays (6vs.3) ----------------
   Chrome that floats over the `.map` canvas. The canvas primitives themselves
   (.map/.parcel/.road/.water/.maptag/.drawn-poly) live in the base sheet; the
   mockups kept these overlay rules page-local, so — like the chip/kv rules —
   they are consolidated here to style the shared map component kit. */

/* location tag pinned to the map's top-left corner */
.map .maptag.tl-tag { top: 12px; left: 12px; z-index: 6; }

/* zoom in/out button cluster (top-right) */
.zoomctl {
  position: absolute; top: 12px; right: 12px; z-index: 6;
  display: flex; flex-direction: column; box-shadow: var(--shadow);
}
.zoomctl button {
  width: 34px; height: 34px; font: 600 18px/1 var(--f-body); color: var(--ink);
  background: var(--paper); border: var(--rule-strong); cursor: pointer;
}
.zoomctl button:first-child { border-radius: var(--r) var(--r) 0 0; border-bottom: none; }
.zoomctl button:last-child { border-radius: 0 0 var(--r) var(--r); }
.zoomctl button:hover { background: #ece5cd; }

/* class-color legend (bottom-left); swatch reads --class-c from its .c-* class */
.legend {
  position: absolute; bottom: 12px; left: 12px; z-index: 6;
  background: var(--paper); border: var(--rule-strong); border-radius: var(--r);
  box-shadow: var(--shadow); padding: 10px 12px; min-width: 178px;
}
.legend .lg-head {
  font-size: 9.5px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--ink-soft); border-bottom: 1px dotted var(--ink-faint);
  padding-bottom: 5px; margin-bottom: 6px;
}
.legend .lg-row {
  display: grid; grid-template-columns: 12px 1fr auto; gap: 9px; align-items: center;
  font-size: 12px; padding: 2.5px 0;
}
.legend .lg-sw { width: 11px; height: 11px; border-radius: 2px; border: 1px solid #2b3a3344; background: var(--class-c, var(--ink)); }
.legend .lg-n { font-family: var(--f-mono); font-size: 11.5px; color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.legend .lg-total {
  display: flex; justify-content: space-between; gap: 10px; margin-top: 6px;
  padding-top: 6px; border-top: 1px dotted var(--ink-faint); font-size: 11px;
  color: var(--ink-soft); font-variant-caps: all-small-caps; letter-spacing: .04em;
}
.legend .lg-total .num { font-family: var(--f-mono); color: var(--clay); font-weight: 600; }

/* scale bar (bottom-right) */
.scalebar { position: absolute; bottom: 14px; right: 14px; z-index: 6; font: 9px var(--f-mono); letter-spacing: .06em; color: var(--ink-soft); text-align: center; }
.scalebar .bar { height: 5px; width: 90px; border: 1px solid var(--ink); border-top: none; margin-bottom: 3px; }
/* true-scale mode (basemap plate): the component sets the bar's width in cqw
   (a true fraction of the .map.plate container); the caption keeps its own
   width and the bar right-aligns under the map's right-anchored corner. */
.scalebar.true-scale { white-space: nowrap; }
.scalebar.true-scale .bar { margin-left: auto; }

/* ============================================================
   BASEMAP PLATE (munidata-e4y) — the city's real surveyed shape under the
   markers. Stretched-viewBox SVG in the same 0–100 space as lib/project.ts;
   all tones stay inside the sand family at whisper contrast so the saturated
   class-color markers keep the foreground. */
.map.plate {
  background: var(--sand); /* neighbour municipalities: one tone above the land plate */
  background-image: none;
  container-type: inline-size; /* lets the true-scale bar size itself in cqw */
}
/* The plate is a cached standalone SVG asset (munidata-7tb, lib/basemap-svg) —
   an <img> filling the canvas. object-fit:fill + the SVG's preserveAspectRatio
   "none" reproduce the non-uniform 0–100 stretch markers project into; layer
   fills/strokes live inside that SVG (an <img>-embedded SVG can't read this
   sheet); pointer-events:none so it never intercepts draw/marker input. */
.map .basemap {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  object-fit: fill;
  pointer-events: none;
}
/* on-plate source attribution (OGL): tiny, under the scale bar */
.map.plate .scalebar { bottom: 27px; }
.map-attrib {
  position: absolute; right: 14px; bottom: 8px; z-index: 6;
  font: 8.5px var(--f-mono); letter-spacing: 0.02em; color: #a4966d;
}

/* freshness watermark (top-right) — so map data-age is never ambiguous */
.map .asof-tag {
  position: absolute; top: 12px; right: 12px; z-index: 6;
  font: 10px var(--f-mono); letter-spacing: .06em; color: var(--ink-soft);
  background: var(--paper); border: 1px solid var(--sand-line);
  border-radius: var(--r); padding: 5px 9px;
}
.map .asof-tag b { color: var(--clay); }

/* server-projected point marker: one dot per application, colored by its
   application_class token (--class-c). The free public map plots these into
   the canvas by lat/lon → % (no client JS, no basemap tiles). */
.map .mappt {
  position: absolute; width: 9px; height: 9px; border-radius: 2px;
  background: color-mix(in srgb, var(--class-c, var(--clay)) 72%, var(--paper));
  border: 1px solid var(--class-c, var(--clay));
  transform: translate(-50%, -50%); z-index: 4;
}

/* ============================================================
   PUBLIC LANDING (9wl) — the free marketing + week-delayed map page.
   Page-local styles from docs/design/ux/public-map.html, consolidated here
   (same pattern as the chip/kv/map-overlay ports) so the shared components
   are styled by the served sheet.
   ============================================================ */

/* page rhythm */
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
section.band { padding: 60px 0; }
section.band + section.band { border-top: var(--rule); }

/* top-bar sign-in link + CTA spacing (marketing chrome) */
.topbar a.signin { color: var(--ink); text-decoration: none; font-size: 13.5px; font-weight: 500; }
.topbar a.signin:hover { text-decoration: underline; text-underline-offset: 3px; }
.topbar .btn.sm { margin-left: 2px; }

/* ---------------- hero ---------------- */
.hero { padding: 66px 0 48px; }
.hero .kicker { font-family: var(--f-mono); font-size: 12px; letter-spacing: .22em; text-transform: uppercase; color: var(--gold); }
.hero h1 { font-size: clamp(34px, 5.1vw, 58px); font-weight: 600; line-height: 1.03; letter-spacing: -0.01em; margin: 16px 0 18px; max-width: 20ch; }
.hero h1 .clay { color: var(--clay); }
.hero .sub { font-size: 17px; line-height: 1.6; max-width: 62ch; color: var(--ink-soft); }
.hero .sub b { color: var(--ink); font-weight: 600; }
.hero .cta-row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-top: 26px; }
.hero .cta-row .note { font-size: 12.5px; color: var(--ink-soft); }

/* delay-notice band (delay-is-the-paywall) */
.delay { margin-top: 40px; padding: 18px 22px; border-top: var(--rule-double); border-bottom: var(--rule-double); display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.delay .stamp { font-family: var(--f-mono); font-size: 10.5px; letter-spacing: .16em; text-transform: uppercase; color: var(--paper); background: var(--ink); padding: 6px 11px; border-radius: var(--r); white-space: nowrap; align-self: flex-start; }
.delay .say { font-size: 15.5px; line-height: 1.5; flex: 1; min-width: 260px; }
.delay .say b { font-weight: 700; }
.delay .say .sep { color: var(--clay); font-weight: 700; margin: 0 6px; }
.delay a.gopro { font-weight: 700; text-decoration: none; white-space: nowrap; }
.delay a.gopro:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ---------------- map band ---------------- */
.mapband { padding-top: 8px; }
.mapband .caption { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 14px; }
.mapband .caption h2 { font-size: 22px; font-weight: 600; }
.mapband .caption .meta-line { font-size: 13px; }
.map.public { height: 60vh; min-height: 460px; border: var(--rule-strong); border-radius: var(--r); box-shadow: var(--shadow); }

/* ---------------- locked popover (Pro-gated preview) ---------------- */
.popover { position: relative; z-index: 8; width: 320px; padding: 0; overflow: hidden; }
.popover .pop-head { padding: 12px 15px 10px; border-bottom: var(--rule-double); }
.popover .pop-head h3 { font-size: 15px; font-weight: 600; margin-top: 4px; }
.popover .pop-body { padding: 12px 15px 14px; }
.popover .pop-badges { display: flex; gap: 6px; margin-bottom: 11px; }
.popover .minifacts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: #2b3a3326; border: 1px solid #2b3a3344; margin-bottom: 10px; }
.popover .mf { background: #efe9d3; padding: 9px 11px; }
.popover .mf .v { font-family: var(--f-display); font-size: 19px; font-weight: 600; line-height: 1.1; }
.popover .mf .v small { font-size: 11px; font-weight: 500; color: var(--ink-soft); }
.popover .mf .l { font-size: 10px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-soft); margin-top: 3px; }
.popover .asof { font-size: 11.5px; color: var(--ink-soft); font-variant-caps: all-small-caps; letter-spacing: .04em; margin-bottom: 10px; }
.popover .asof b { color: var(--clay); font-variant-caps: normal; }
.popover .locked { display: flex; align-items: center; gap: 9px; padding: 9px 11px; background: var(--sand-deep); border: 1px solid var(--sand-line); border-radius: var(--r); font-size: 12.5px; }
.popover .locked .lk { font-size: 14px; }
.popover .locked b { font-weight: 700; }
.popover .locked .tag { margin-left: auto; font-family: var(--f-mono); font-size: 9.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--paper); background: var(--clay); padding: 3px 7px; border-radius: var(--r); white-space: nowrap; }

/* ---------------- stat band ("this week in the pipeline") ---------------- */
.stats .caption { margin-bottom: 18px; }
.stats .caption h2 { font-size: 24px; font-weight: 600; }
.stats .caption p { font-size: 14px; color: var(--ink-soft); max-width: 60ch; margin-top: 6px; }
.stat-grid { display: grid; gap: 1px; background: #2b3a3326; border: 1px solid #2b3a3344; }
.stat-grid.cols-4 { grid-template-columns: repeat(4, 1fr); }
.stat-grid.cols-3 { grid-template-columns: repeat(3, 1fr); } /* a tile is suppressed (e.g. status-changes before history accrues) */
.stat { background: #efe9d3; padding: 20px 20px 18px; position: relative; display: flex; flex-direction: column; }
.stat .v { font-family: var(--f-display); font-size: 34px; font-weight: 600; line-height: 1; font-variant-numeric: tabular-nums; }
.stat .v small { font-size: 15px; font-weight: 500; color: var(--ink-soft); }
.stat .l { font-size: 12.5px; margin-top: 8px; color: var(--ink); line-height: 1.4; }
.stat .method { font-family: var(--f-mono); font-size: 10px; color: var(--ink-soft); margin-top: auto; padding-top: 12px; letter-spacing: .01em; }
.stat.locked { background: var(--sand-deep); }
.stat.locked .v { color: var(--ink-soft); }
.stat.locked .l { color: var(--ink-soft); }
.stat.locked .lockrow { display: inline-flex; align-items: center; gap: 7px; margin-top: auto; padding-top: 12px; }
.stat.locked .lockrow .tag { font-family: var(--f-mono); font-size: 9.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--paper); background: var(--clay); padding: 3px 7px; border-radius: var(--r); }

/* ---------------- sample folio depth row ---------------- */
.sample .caption { margin-bottom: 18px; }
.sample .caption h2 { font-size: 24px; font-weight: 600; }
.sample .caption p { font-size: 14px; color: var(--ink-soft); margin-top: 6px; }
.folio { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; }
.folio .col { border: var(--rule-strong); border-right: none; }
.folio .col:last-child { border-right: var(--rule-strong); }
.folio .col-head { padding: 10px 15px; border-bottom: var(--rule-double); background: var(--paper); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-soft); }
.folio .col-body { padding: 15px; background: var(--paper); height: calc(100% - 41px); }
.folio .minifacts2 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: #2b3a3326; border: 1px solid #2b3a3344; }
.folio .mf2 { background: #efe9d3; padding: 11px 12px; }
.folio .mf2 .v { font-family: var(--f-display); font-size: 22px; font-weight: 600; line-height: 1.05; }
.folio .mf2 .v small { font-size: 12px; font-weight: 500; color: var(--ink-soft); }
.folio .mf2 .l { font-size: 10px; letter-spacing: .07em; text-transform: uppercase; color: var(--ink-soft); margin-top: 4px; }
.folio .mf2 .prov { margin-top: 7px; }
.folio .fnote { font-size: 12px; color: var(--ink-soft); margin-top: 12px; line-height: 1.5; }
.folio .fnote .file-no { font-size: 11px; }
.folio .ev:last-child { border-bottom: none; }
.folio table.ledger td .dl { font-weight: 600; }
.folio table.ledger td .sub { display: block; font-size: 11px; color: var(--ink-soft); }
.folio table.ledger tr:last-child td { border-bottom: none; }
.folio .doc-pg { font-family: var(--f-mono); font-size: 11px; color: var(--ink-soft); }

/* ---------------- pricing ---------------- */
.pricing .caption { margin-bottom: 22px; text-align: center; }
.pricing .caption h2 { font-size: 26px; font-weight: 600; }
.pricing .caption p { font-size: 14px; color: var(--ink-soft); margin-top: 6px; }
.plan-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; align-items: start; }
.plan { display: flex; flex-direction: column; }
.plan.pro { border-color: var(--clay); box-shadow: 5px 5px 0 #b34a2626; }
.plan .plan-top { padding: 20px 20px 16px; border-bottom: var(--rule-double); position: relative; }
.plan .flag { position: absolute; top: -1px; right: -1px; font-size: 10px; letter-spacing: .14em; text-transform: uppercase; font-weight: 700; color: var(--paper); background: var(--clay); padding: 5px 10px; border-radius: 0 var(--r) 0 var(--r); }
.plan .name { font-family: var(--f-display); font-size: 20px; font-weight: 600; }
.plan .price { font-family: var(--f-display); font-size: 34px; font-weight: 600; line-height: 1; margin-top: 10px; font-variant-numeric: tabular-nums; }
.plan .price small { font-size: 14px; font-weight: 500; color: var(--ink-soft); }
.plan .who { font-size: 12.5px; color: var(--ink-soft); margin-top: 8px; line-height: 1.45; }
.plan .feats { padding: 16px 20px 8px; list-style: none; flex: 1; }
.plan .feats li { font-size: 13px; line-height: 1.4; padding: 6px 0 6px 20px; position: relative; border-bottom: 1px dotted var(--ink-faint); }
.plan .feats li:last-child { border-bottom: none; }
.plan .feats li::before { content: "▸"; position: absolute; left: 2px; color: var(--moss); }
.plan .feats li.off { color: var(--ink-soft); }
.plan .feats li.off::before { content: "·"; color: var(--ink-faint); }
.plan .feats li.soon .s { font-family: var(--f-mono); font-size: 9.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--gold); margin-left: 5px; }
.plan .plan-foot { padding: 8px 20px 20px; }
.plan .plan-foot .btn { display: block; text-align: center; }

/* ---------------- site footer ---------------- */
.sitefoot { padding: 44px 0 32px; border-top: var(--rule-double); }
.sitefoot .creed { font-family: var(--f-display); font-size: 18px; font-weight: 500; line-height: 1.45; max-width: 58ch; }
.sitefoot .lic { font-size: 12.5px; color: var(--ink-soft); margin-top: 14px; max-width: 66ch; line-height: 1.55; }
.sitefoot .foot-nav { display: flex; gap: 20px; flex-wrap: wrap; margin-top: 20px; font-size: 13px; }
.sitefoot .foot-nav a { color: var(--ink); text-decoration: none; }
.sitefoot .foot-nav a:hover { text-decoration: underline; text-underline-offset: 3px; }
.sitefoot .foot-nav .soon { color: var(--ink-soft); }
.statusbar .spacer { flex: 1; }
.statusbar .delay-flag { color: var(--clay); }

/* ---------------- prose (methodology / about-the-data pages, 9wl.7) ---------------- */
.prose { max-width: 68ch; }
.prose h1 { font-family: var(--f-display); font-size: 30px; font-weight: 600; margin-bottom: 6px; }
.prose h2 { font-size: 18px; font-weight: 600; margin: 26px 0 8px; }
.prose p { font-size: 15px; line-height: 1.65; color: var(--ink); margin-bottom: 12px; }
.prose ul { margin: 0 0 12px 20px; font-size: 15px; line-height: 1.65; }
.prose .lede { font-size: 16px; color: var(--ink-soft); }

/* ---------------- alerts / saved searches (z0a.1) ---------------- */
.alerts-wrap { max-width: 760px; margin: 4vh auto 8vh; padding: 0 24px; }
.alerts-wrap.narrow { max-width: 560px; }
.alerts-wrap .col-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.alerts-wrap .col-head h1 { font-family: var(--f-display); font-size: 22px; font-weight: 600; }

/* saved-search rows */
.saved { padding: 14px 0; border-bottom: 1px dotted var(--ink-faint); }
.saved:last-child { border-bottom: none; padding-bottom: 2px; }
.saved:first-child { padding-top: 2px; }
.saved .name { display: flex; align-items: baseline; gap: 9px; flex-wrap: wrap; }
.saved .name h3 { font-family: var(--f-display); font-size: 16px; font-weight: 600; }
.crit { display: flex; gap: 6px; flex-wrap: wrap; margin: 8px 0 7px; }
.crit .chip .k { color: var(--ink-soft); }

/* per-search delivery history */
.deliveries { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 2px 0 7px; font-size: 12px; }
.deliveries.none { font-variant-caps: all-small-caps; letter-spacing: .05em; color: var(--ink-soft); }
.delivery { display: inline-flex; align-items: baseline; gap: 6px; }
.delivery .dl-date { font-variant-numeric: tabular-nums; color: var(--ink-soft); }
.delivery .dl-count { font-variant-numeric: tabular-nums; color: var(--ink-soft); }

/* a disabled action rendered as a non-link (at the plan cap) */
.btn.disabled { opacity: .5; cursor: not-allowed; }
.saved .acts { display: flex; align-items: center; gap: 0; margin-top: 4px; font-size: 12.5px; }
.saved .acts .sep { color: var(--ink-faint); margin: 0 8px; }
.saved .acts form { margin: 0; }

/* text-link-styled submit buttons (pause / delete / resume) */
.linkbtn {
  background: none; border: none; padding: 0; cursor: pointer; font: inherit;
  color: var(--ink-soft); border-bottom: 1px solid var(--ink-faint);
}
.linkbtn:hover { color: var(--clay); border-color: var(--clay); }
.linkbtn.danger:hover { color: var(--clay); border-color: var(--clay); }
.saved .acts a { color: var(--ink-soft); text-decoration: none; border-bottom: 1px solid var(--ink-faint); }
.saved .acts a:hover { color: var(--clay); border-color: var(--clay); }

/* new / edit form */
.form-grid { display: flex; flex-direction: column; gap: 16px; }
/* group heading that reads like label.field but labels a set of controls, not one */
.field-label { display: block; font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-soft); margin-bottom: 4px; }
.area-choice { border: none; padding: 0; margin: 0; }
.area-choice legend { padding: 0; margin-bottom: 6px; }
.area-choice .area-input { margin: 4px 0 2px 22px; }
.bbox-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 12px; }
.bbox-grid .field.sm { font-size: 11px; }
.bbox-grid input { margin-top: 3px; }
.checkgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 18px; }
.checkgrid .swatch { display: inline-block; width: 9px; height: 9px; border-radius: 2px; background: var(--class-c, var(--ink-soft)); vertical-align: baseline; }
.units-row { display: grid; grid-template-columns: auto 1fr; gap: 10px; align-items: center; }
.units-row .op { font-family: var(--f-mono); font-size: 14px; color: var(--ink-soft); white-space: nowrap; }
.radios { display: flex; flex-direction: column; gap: 5px; }
.radios .hint { font-family: var(--f-mono); font-size: 11px; color: var(--ink-soft); margin-left: 6px; }
.create-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.create-row .note { font-family: var(--f-mono); font-size: 11px; color: var(--ink-soft); }

/* "why alerts" voice panel */
.voice .voice-line { font-family: var(--f-display); font-size: 16.5px; font-weight: 500; line-height: 1.4; }
.voice .voice-line .em { color: var(--clay); }

/* ---------------- responsive ---------------- */
@media (max-width: 1000px) {
  .stat-grid.cols-3, .stat-grid.cols-4 { grid-template-columns: repeat(2, 1fr); }
  .folio { grid-template-columns: 1fr; }
  .folio .col { border-right: var(--rule-strong); }
  .plan-grid { grid-template-columns: 1fr; }
  .popover { width: 280px; }
}
@media (max-width: 620px) {
  .stat-grid.cols-3, .stat-grid.cols-4 { grid-template-columns: 1fr; }
  .map.public { height: 54vh; min-height: 380px; }
  .checkgrid { grid-template-columns: 1fr; }
}

/* ============================================================
   MAP WORKSPACE (8ge) — the Pro logged-in map + filter strip + rail.
   Page-local styles ported from docs/design/ux/map-view.html, adapted to
   server-projected point markers (not hand-placed parcels). Same porting
   pattern as the landing (9wl) block above.
   ============================================================ */

/* --- top-bar search box --- */
.topbar .search { position: relative; flex: 0 1 320px; min-width: 180px; margin: 0; }
.topbar .search input[type="search"] {
  width: 100%; font-family: var(--f-body); font-size: 13px; color: var(--ink);
  background: var(--paper); border: 1px solid var(--sand-line); border-radius: var(--r);
  padding: 7px 10px 7px 30px;
}
.topbar .search input[type="search"]:focus { outline: 2px solid var(--clay); outline-offset: 1px; border-color: var(--ink); }
.topbar .search::before {
  content: "⌕"; position: absolute; left: 9px; top: 50%; transform: translateY(-50%);
  color: var(--ink-soft); font-size: 15px; pointer-events: none;
}

/* --- filter strip --- */
.filterstrip {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 10px 24px; background: #ece5cd; border-bottom: var(--rule-strong);
  position: sticky; top: 54px; z-index: 40;
}
.filterstrip .fgroup { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.filterstrip .flabel {
  font-size: 10px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--ink-soft); margin-right: 2px;
}
.filterstrip .sep { width: 1px; align-self: stretch; background: var(--sand-line); margin: 0 2px; }
.filterstrip .spacer { flex: 1; }
.filterstrip .clearall { font-size: 12px; color: var(--clay); text-decoration: none; white-space: nowrap; }
.filterstrip .clearall:hover { text-decoration: underline; text-underline-offset: 3px; }
/* constrain the filter-form controls (base input rule is width:100%) */
.filterstrip .ffilters select,
.filterstrip .ffilters input {
  width: auto; font-family: var(--f-body); font-size: 12.5px; color: var(--ink);
  background: var(--paper); border: 1px solid var(--sand-line); border-radius: var(--r);
  padding: 5px 10px;
}
.filterstrip .ffilters select { padding-right: 24px; }
.filterstrip .ffilters .unitsin { width: 66px; }
.filterstrip .ffilters input[type="date"] { font-family: var(--f-mono); font-size: 11.5px; }
.filterstrip .ffilters .rangedash { color: var(--ink-soft); }
.filterstrip .ffilters :focus { outline: 2px solid var(--clay); outline-offset: 1px; }

/* draw-polygon affordance (4ra: activated by client/draw.client.js) */
.btn.draw {
  border: 1.5px dashed var(--ink); background: var(--paper); color: var(--ink);
  font-weight: 700; padding: 7px 15px; font-size: 13px; display: inline-flex; align-items: center; gap: 7px;
  cursor: pointer;
}
.btn.draw .pen { color: var(--clay); }
/* Inert until the client script un-disables it (progressive enhancement). */
.btn.draw[aria-disabled="true"] { opacity: .5; cursor: not-allowed; }
.btn.draw.armed { background: var(--ink); color: var(--paper); border-style: solid; }
.btn.draw.armed .pen { color: var(--paper); }
.filterstrip .clearpoly { font-size: 12px; color: var(--clay); text-decoration: none; white-space: nowrap; }
.filterstrip .clearpoly:hover { text-decoration: underline; text-underline-offset: 3px; }

/* drawn watch area (4ra): server-rendered SVG overlay + the live client preview.
   Both fill the canvas and never intercept pointer events over the markers. */
.map .drawoverlay, .map .drawlive {
  position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 4;
}
.map .drawoverlay polygon { fill: #2b3a3314; stroke: var(--ink); stroke-width: .5; stroke-dasharray: 1.6 1.2; }
.map .drawlive polyline { fill: none; stroke: var(--clay); stroke-width: .5; stroke-dasharray: 1.4 1; }
/* While arming/drawing, the canvas takes a crosshair and swallows touch-scroll. */
.map.drawing { cursor: crosshair; touch-action: none; }

/* save-drawn-view-as-watchlist bar (4ra), under the canvas when an area is drawn */
.savebar {
  display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap;
  margin-top: 10px; padding: 12px 14px; border: var(--rule-strong); border-radius: var(--r);
  background: var(--paper);
}
.savebar .savebar-copy { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 220px; }
.savebar .flabel .pen { color: var(--clay); }
.savebar .savebar-sum { font-family: var(--f-mono); font-size: 11px; color: var(--ink-soft); }
.savebar .savebar-note { font-size: 11.5px; color: var(--gold); max-width: 52ch; }
.savebar .savebar-name {
  flex: 1; min-width: 160px; padding: 7px 10px; border: var(--rule); border-radius: var(--r);
  font-size: 13px; font-family: var(--f-body);
}
.savebar .savebar-name:focus { outline: 2px solid var(--clay); outline-offset: 1px; }

/* POST /map/watchlist outcome banner (4ra) */
.mapnotice {
  margin: 10px 24px 0; padding: 9px 14px; font-size: 13px; border-radius: var(--r);
  border: var(--rule); background: var(--paper);
}
.mapnotice.ok { border-color: var(--clay); color: var(--ink); }
.mapnotice.warn { border-color: var(--gold); color: var(--ink); }

/* --- workspace split (62/38) --- */
.workspace { display: grid; grid-template-columns: 62fr 38fr; gap: 0; align-items: stretch; }
.mapcol { position: relative; padding: 16px 12px 16px 24px; }
.railcol { padding: 16px 24px 16px 12px; overflow-y: auto; }
.map.canvas { height: 72vh; min-height: 520px; border: var(--rule-strong); border-radius: var(--r); box-shadow: var(--shadow); }
.mapcol .capnote { font-size: 12px; color: var(--ink-soft); margin-top: 10px; }
.mapcol .capnote b { color: var(--ink); font-variant-numeric: tabular-nums; }

/* focused-marker highlight (focus arrives via ?focus= from the ledger/search links) */
.map .mappt.sel {
  width: 13px; height: 13px; z-index: 7;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--class-c, var(--clay)) 30%, transparent), var(--shadow);
}

/* focus popover: provenance-rich extracted facts (8ge.6) — each mini-fact
   carries a provenance chip (invariant #3); the grid wraps to as many rows as
   there are present facts. */
.popover .minifacts.prov-facts .mf { padding: 9px 11px 10px; }
.popover .minifacts.prov-facts .mf .prov { margin-top: 6px; }
.popover .pop-noext { font-size: 12px; color: var(--ink-soft); line-height: 1.5; }

/* focus popover close affordance */
.popover .closex {
  position: absolute; top: 9px; right: 11px; font: 13px var(--f-mono); color: var(--ink-soft);
  text-decoration: none; z-index: 2; line-height: 1;
}
.popover .closex:hover { color: var(--clay); }
.popover .file-no { display: block; font-family: var(--f-mono); font-size: 10.5px; color: var(--ink-soft); }

/* --- right rail: in-view ledger --- */
.railcol .panel-head h3 { font-size: 15px; font-weight: 600; }
.iv-row td .addr { font-weight: 600; text-decoration: none; color: var(--ink); }
.iv-row td .addr:hover { color: var(--clay); text-decoration: underline; text-underline-offset: 2px; }
.iv-row td .sub {
  display: block; font-size: 11px; color: var(--ink-soft);
  font-variant-caps: all-small-caps; letter-spacing: .04em;
}
.iv-row td.u { text-align: right; font-family: var(--f-mono); font-size: 12px; }
.iv-row .tick-cell { border-left: 3px solid var(--class-c, var(--ink-faint)); }
.iv-badge { font-size: 9.5px; padding: 2px 6px; }
.rail-empty { font-size: 13px; color: var(--ink-soft); padding: 14px 18px; line-height: 1.5; }
.railcol .viewall, .searchpage .viewall { padding: 10px 18px 14px; }
.railcol .viewall .small { font-size: 12px; color: var(--ink-soft); }

/* stack the rail panels (events feed over the paginated ledger, 8ge.4) */
.railcol .panel + .panel { margin-top: 16px; }

/* --- right rail: events-in-view feed (8ge.4) --- */
.evfeed { list-style: none; margin: 0; padding: 0; }
.evrow {
  display: flex; align-items: baseline; gap: 10px;
  padding: 9px 18px; border-bottom: 1px dotted var(--ink-faint);
  border-left: 3px solid var(--class-c, var(--ink-faint));
}
.evrow:last-child { border-bottom: none; }
.evrow .ev-main { flex: 1; min-width: 0; text-decoration: none; color: var(--ink); display: block; }
.evrow .ev-main:hover .ev-addr { color: var(--clay); text-decoration: underline; text-underline-offset: 2px; }
.evrow .ev-type {
  display: block; font-size: 10px; font-variant-caps: all-small-caps; letter-spacing: .06em;
  color: var(--clay); font-weight: 600;
}
.evrow .ev-addr { display: block; font-size: 13px; font-weight: 600; line-height: 1.3; }
.evrow .ev-trans {
  display: block; font-size: 11px; color: var(--ink-soft); font-variant-numeric: tabular-nums; margin-top: 1px;
}
.evrow .ev-day {
  flex: 0 0 auto; font-family: var(--f-mono); font-size: 11px; color: var(--ink-soft); white-space: nowrap;
}

/* --- right rail: watchlists panel (8ge.5) --- */
.railcol .panel-head .rail-manage {
  font-size: 12px; color: var(--clay); text-decoration: none; font-weight: 600;
}
.railcol .panel-head .rail-manage:hover { text-decoration: underline; text-underline-offset: 2px; }
.watchlist { list-style: none; margin: 0; padding: 0; }
.watchrow {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 18px; border-bottom: 1px dotted var(--ink-faint);
}
.watchrow:last-child { border-bottom: none; }
.watch-main { flex: 1; min-width: 0; text-decoration: none; color: var(--ink); display: block; }
.watch-main:hover .watch-name { color: var(--clay); text-decoration: underline; text-underline-offset: 2px; }
.watch-name { display: block; font-size: 13px; font-weight: 600; line-height: 1.3; }
.watch-paused { font-weight: 400; color: var(--ink-soft); font-variant-caps: all-small-caps; letter-spacing: .04em; }
.watch-sum {
  display: block; font-size: 11px; color: var(--ink-soft);
  font-variant-caps: all-small-caps; letter-spacing: .03em; margin-top: 1px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.newpill {
  flex: 0 0 auto; font-family: var(--f-mono); font-size: 10px; font-weight: 600;
  color: #fff; background: var(--clay); border-radius: 999px; padding: 2px 8px; white-space: nowrap;
}
.rail-empty a { color: var(--clay); }

/* --- right rail: in-view ledger pager (8ge.4) --- */
.pager { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 12px 18px 14px; }
.pager .pageno {
  font-size: 11px; color: var(--ink-soft); font-variant-caps: all-small-caps; letter-spacing: .05em;
}
.pager .btn.disabled { opacity: .4; pointer-events: none; }

/* --- search results page --- */
.searchpage { padding-top: 28px; padding-bottom: 60px; }
.searchpage .caption { margin-bottom: 18px; }
.searchpage .caption h2 { font-size: 22px; font-weight: 600; }
.searchpage .caption h2 .clay { color: var(--clay); }
.searchpage .searchhits .iv-row td { padding: 11px 10px; }

@media (max-width: 1000px) {
  .workspace { grid-template-columns: 1fr; }
  .railcol { border-top: var(--rule-strong); }
  .map.canvas { height: 60vh; min-height: 440px; }
}

/* --- application folio (93e.1) — header block; page-specific composition ported
   from docs/design/ux/application.html (the system lives in cadastre.css) --- */
.crumb {
  display: flex; align-items: baseline; flex-wrap: wrap; gap: 2px;
  padding: 15px 2px 6px; font-size: 12.5px;
  font-variant-caps: all-small-caps; letter-spacing: .05em; color: var(--ink-soft);
}
.crumb a { color: var(--water); text-decoration: none; }
.crumb a:hover { text-decoration: underline; }
.crumb .sep { color: var(--ink-faint); margin: 0 8px; }
.crumb .here { color: var(--clay); font-family: var(--f-mono); font-size: 11.5px; letter-spacing: .04em; }

.hdr .top { display: flex; justify-content: space-between; align-items: flex-start; gap: 22px; }
.hdr h1 { font-size: 27px; font-weight: 600; line-height: 1.1; margin: 7px 0 9px; letter-spacing: -.01em; }
.hdr .actions { display: flex; gap: 9px; flex-shrink: 0; padding-top: 3px; }
.hdr .badges { display: flex; gap: 7px; flex-wrap: wrap; margin-top: 12px; }
.aliases {
  margin-top: 11px; padding: 8px 12px; font-size: 12px; line-height: 1.5;
  background: var(--sand-deep); border: 1px solid var(--sand-line); border-radius: var(--r);
  color: var(--ink-soft);
}
.aliases .old { font-family: var(--f-mono); font-size: 11.5px; color: var(--ink); letter-spacing: .03em; }

@media (max-width: 700px) {
  .hdr .top { flex-direction: column; gap: 12px; }
}
