:root {
  /* WI-1 of unified-card-system: consolidated palette. Every color used
     across the app comes from this block - no hex codes elsewhere in the
     stylesheet after the 2026-09-25 unification pass. */
  --bg: #fafaf7;
  --ink: #1a1a1a;
  --muted: #666;
  --line: #e0dfd8;
  --brand: #17505c;         /* teal - primary accent */
  --brand-dark: #0e3d47;    /* teal darker (hover) */
  --accent: #d97a3a;        /* orange - CTA + attention */
  --accent-dark: #c96a2a;   /* orange darker (hover) */
  --accent-soft: #fff4e5;   /* orange tint - caveat + price-anchor bg */
  --soft: #f8f8f5;          /* off-white - card body bg + section wells */
  --low: #4a9d5f;           /* green - LOW risk / good / protected */
  --med: #d9a441;           /* amber - MED risk / moderate / warn */
  --high: #d97a3a;          /* orange - HIGH risk (same as accent by design) */
  --extreme: #b83030;       /* red - EXTREME risk / unprotected / error */
  --unknown: #999;          /* gray - unknown / no data */
  --info: #17505c;          /* teal - info pill */
  --cell-header: #f4f2ec;   /* off-white - table th bg */

  /* WI-3.7 of parcel-combined-audit (2026-09-26): shared rhythm + card
   * vars so landing + parcel + PDF surfaces stop drifting. Landing was
   * using max-width: 900px + margin: auto per-section which mismatched
   * the parent main{max-width: 1080px} - visible gap between hero and
   * teaser card widths in the operator's flameshot. Now all sections
   * share --section-gap for vertical rhythm + --card-radius/--card-border
   * for card visuals. */
  --section-gap: 2rem;      /* between top-level sections (hero → landing-sample → …) */
  --card-gap: 1rem;         /* between cards inside a section (.card + .card) */
  --card-radius: 6px;       /* canonical card border-radius across surfaces */
  --card-border: 1px solid var(--line);

  /* WI-2 of opi-map-ux: semantic map palette. Each hue means ONE thing
     across the map - green is reserved for positive-status (ER-hospital,
     protected hydrant, residential zoning) and NOT for grocery-POI (which
     moves to grey - grocery is a POI category, not a health/safety signal).
     parcel_map.js reads these via getComputedStyle at init into MAP_COLORS. */
  --map-color-parcel: #c33;                     /* red - parcel + critical risk (distinct from --extreme so parcel marker stays vivid) */
  /* WI-9 of parcel-combined-audit (2026-09-26): the three emergency-band
   * shades linked to the canonical --low/--med/--extreme scale so map
   * pins and report cards render the exact same color. Editing the base
   * band hue in one place propagates to both surfaces. */
  --map-color-risk-dark: var(--extreme);        /* red - unprotected hydrant / risk-band EXTREME */
  --map-color-positive:  var(--low);            /* green - ER hospital + protected hydrant + residential zoning + band-low */
  --map-color-warn:      var(--med);            /* amber - non-ER hospital / band-med */
  --map-color-school-elem: #1976d2;      /* blue - elementary school */
  --map-color-school-sec: #f57c00;       /* orange - secondary school */
  --map-color-poi-food: #ef6c00;         /* orange - restaurants / cafes */
  --map-color-poi-service: #1565c0;      /* blue - pharmacy / bank */
  --map-color-poi-grocery: #607d8b;      /* grey - grocery (moved off green to fix semantic overload) */
  --map-color-poi-retail: #c2185b;       /* pink - non-grocery shops */
  --map-color-poi-other: #607d8b;        /* grey - other POIs */
  --map-color-transit-rapid: #d32f2f;    /* dark red - subway / LRT */
  --map-color-transit-rail: #7b1fa2;     /* purple - GO / commuter rail */
  --map-color-transit-streetcar: #0097a7;/* teal - streetcar */
  --map-color-transit-bus: #455a64;      /* grey - bus */
  --map-color-zoning-res: #4a9d5f;       /* green - residential */
  --map-color-zoning-com: #d97a3a;       /* orange - commercial / mixed */
  --map-color-zoning-emp: #9e9e9e;       /* grey - employment / industrial */
  --map-color-zoning-util: #1976d2;      /* blue - utility */
  --map-color-zoning-open: #8bc34a;      /* light green - open space (visually distinct from --map-color-positive) */
  --map-color-zoning-inst: #7e57c2;      /* purple - institutional */
  --map-color-highway: #2e7d32;          /* green - highway interchange badge (semantic: infrastructure connector) */
  --map-color-statscan-da: #0097a7;      /* teal - StatsCan DA boundary (same as streetcar; contexts non-overlapping) */
  --map-color-default: #999;             /* grey - fallback */
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, sans-serif;
  background: var(--bg); color: var(--ink); line-height: 1.5;
}
.site-header {
  padding: 1rem 1.5rem; border-bottom: 1px solid var(--line);
  background: white; display: flex; align-items: baseline; gap: 1rem;
  flex-wrap: wrap;
}
.site-header-brand { display: flex; align-items: baseline; gap: 1rem; flex-grow: 1; }
.brand { color: var(--brand); font-weight: 700; text-decoration: none; font-size: 1.15rem; }
.brand-sub { color: var(--muted); font-size: 0.85rem; }
/* WI-12 top nav */
.site-header-nav { display: flex; gap: 1.25rem; font-size: 0.95rem; align-items: baseline; }
.site-header-nav a {
  color: var(--brand); text-decoration: none; font-weight: 500;
  padding: 0.1rem 0; border-bottom: 2px solid transparent;
}
.site-header-nav a:hover { border-bottom-color: var(--brand); }
.site-header-nav a[aria-current="page"] {
  border-bottom-color: var(--brand); font-weight: 600;
}
main { max-width: 1080px; margin: 0 auto; padding: 2rem 1.5rem; }

/* Landing */
.hero h1 { font-size: 2.2rem; margin: 0 0 0.5rem; }
.hero .lede { color: var(--muted); font-size: 1.1rem; max-width: 640px; }
.address-form { display: flex; gap: 0.5rem; margin: 1.5rem 0 0.5rem; max-width: 720px; }
.address-form input {
  flex: 1; padding: 0.75rem 1rem; font-size: 1rem;
  border: 1px solid var(--line); border-radius: 6px; background: white;
}
.address-form button {
  padding: 0.75rem 1.5rem; font-size: 1rem;
  background: var(--brand); color: white; border: 0; border-radius: 6px; cursor: pointer;
}
.address-form button:hover { background: #0e3d47; }
.samples { display: flex; gap: 0.5rem; align-items: center; margin-top: 0.75rem; flex-wrap: wrap; }
.samples span { color: var(--muted); font-size: 0.9rem; }
.samples .sample {
  padding: 0.35rem 0.75rem; font-size: 0.85rem;
  background: white; color: var(--brand);
  border: 1px solid var(--line); border-radius: 999px; cursor: pointer;
}
.samples .sample:hover { border-color: var(--brand); }
.status { margin-top: 1rem; padding: 0.75rem 1rem; background: white; border-left: 3px solid var(--brand); }

/* Report */
.report-head h1 { margin: 0 0 0.25rem; font-size: 1.6rem; }
.report-head .address { color: var(--muted); margin: 0 0 0.25rem; }
.report-head .meta { margin: 0 0 1rem; font-size: 0.9rem; color: var(--muted); }
#map { height: 420px; border-radius: 6px; margin: 0 0 1.5rem; position: relative; background: #e8ecef; }

/* WI-14 (2026-10-07): one-line map intro for non-GIS visitors. Points at
   the existing in-map Map Layers panel (per prior WI-3 of map-ux: Leaflet-
   owned unified panel is the authoritative legend; no static legend). */
.map-intro {
  margin: 0 0 0.5rem; padding: 0.5rem 0.75rem;
  background: var(--soft, #f8f8f5); border-left: 3px solid var(--brand, #17505c);
  border-radius: 4px; font-size: 0.85rem; color: var(--ink, #1a1a1a);
}

/* WI-14 hotfix 2026-10-07: placeholder shim so #map isn't a blank grey rect
   while Leaflet initializes (~1-3s on first load). Leaflet's rendered tiles
   overlay this element, so no cleanup needed. */
.map-loading-shim {
  position: absolute; inset: 0; display: flex; align-items: center;
  justify-content: center; color: var(--muted, #666); font-size: 0.9rem;
  z-index: 0; pointer-events: none;
}

/* WI-15 (2026-10-07): help popovers next to Risk + Livability composite bands.
   Uses native <details>/<summary> for zero-JS accessible disclosure. */
.band-help {
  display: inline-block; vertical-align: baseline; margin-left: 0.15rem;
  position: relative;
}
.band-help > summary {
  display: inline-flex; align-items: center; justify-content: center;
  width: 1.1em; height: 1.1em; font-size: 0.75rem;
  background: var(--brand, #17505c); color: #fff; border-radius: 50%;
  cursor: pointer; list-style: none; font-weight: 700;
  vertical-align: baseline; line-height: 1;
}
.band-help > summary::-webkit-details-marker { display: none; }
.band-help > summary::marker { display: none; content: ""; }
.band-help > summary:hover { opacity: 0.85; }
.band-help > summary:focus { outline: 2px solid var(--brand, #17505c); outline-offset: 1px; }
.band-help-body {
  position: absolute; top: 1.6em; left: 0;
  min-width: 280px; max-width: 360px;
  padding: 0.6rem 0.8rem; background: #fff;
  border: 1px solid var(--line, #ddd); border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  font-size: 0.8rem; line-height: 1.4; font-weight: 400;
  color: var(--ink, #1a1a1a); z-index: 100;
  white-space: normal;
}

/* WI-15 (2026-10-07): band color key above the arrow cards. Non-expert
   visitors see colored LOW/MED/HIGH/EXTREME badges without any reference
   for what the colors mean. One compact row answers that. */
.band-key {
  display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem 0.9rem;
  margin: 0 0 1rem; padding: 0.5rem 0.75rem;
  background: var(--bg-soft, #f8f8f5); border: 1px solid var(--line, #ddd);
  border-radius: 4px; font-size: 0.8rem; color: var(--muted, #555);
}
.band-key > strong { color: var(--ink, #1a1a1a); font-weight: 700; }
.band-key-item { display: inline-flex; align-items: center; gap: 0.3rem; }
.band-swatch {
  display: inline-block; width: 14px; height: 10px; border-radius: 2px;
  border: 1px solid rgba(0,0,0,0.1);
}
.band-swatch-low     { background: var(--low, #4a9d5f); }
.band-swatch-med     { background: var(--med, #d9a441); }
.band-swatch-high    { background: var(--high, #d97a3a); }
.band-swatch-extreme { background: var(--extreme, #b83030); }
.band-key-note {
  font-size: 0.75rem; color: var(--muted, #666); font-style: italic;
}
@media (max-width: 640px) {
  .band-key { font-size: 0.75rem; gap: 0.35rem 0.6rem; }
  .band-key-note { flex-basis: 100%; }
}

/* WI-14 hotfix 2026-10-07: loading state for CTA buttons so impatient users
   don't flood the server with repeat clicks. Disabled visual + no pointer. */
.cta-primary.is-loading {
  opacity: 0.7; cursor: wait; pointer-events: none;
}
.cta-primary.is-loading::after {
  content: ""; display: inline-block; width: 0.75em; height: 0.75em;
  margin-left: 0.5em; border: 2px solid rgba(255,255,255,0.4);
  border-top-color: #fff; border-radius: 50%;
  animation: cta-spin 0.6s linear infinite; vertical-align: middle;
}
@keyframes cta-spin { to { transform: rotate(360deg); } }
/* ── WI-1 of unified-card-system: single `.card` primitive ───────────────────
   Every parcel-view section uses .card + a --{semantic} modifier. Semantic
   modifiers differ ONLY in accent stripe + optional layout quirk (paywall
   overlay / rank badge etc.) - NEVER in padding/radius/typography.
*/
.verdicts {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1rem;
}

.card {
  background: white;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 1rem 1.25rem;
  margin: 0 0 1rem;
  border-left: 3px solid var(--line);  /* accent stripe - semantic modifier overrides */
  position: relative;
}
.card__head {
  display: flex; justify-content: space-between; align-items: baseline;
  gap: 0.75rem; margin: 0 0 0.5rem;
}
.card__title { margin: 0; font-size: 1.05rem; color: var(--brand); font-weight: 700; }
.card__sub { font-size: 0.75rem; color: var(--muted); font-weight: 400; margin-left: 0.4rem; }
.card__lead {
  margin: 0.25rem 0 0.75rem; font-size: 0.9rem; line-height: 1.45; color: var(--ink);
}
.card__body { margin: 0 0 0.5rem; }
.card__body > p { margin: 0.4rem 0; font-size: 0.9rem; line-height: 1.5; }
.card__foot { margin-top: 0.6rem; padding-top: 0.4rem; border-top: 1px dashed var(--line); }
.card__source { font-size: 0.7rem; color: var(--muted); font-style: italic; }
.card__error { margin: 0.5rem 0; font-size: 0.9rem; color: var(--extreme); }
.card__empty { color: var(--muted); font-style: italic; font-size: 0.9rem; }
/* WI-3 of parcel-combined-audit (2026-09-26): "Show X on map" affordance
 * - button styled as a link so it doesn't compete with primary CTAs. */
.card__action {
  background: transparent; border: none; color: var(--brand); cursor: pointer;
  font-size: 0.8rem; padding: 0; text-decoration: underline;
  text-underline-offset: 2px;
}
.card__action:hover { color: var(--extreme); }
.card__action:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
/* WI-6 of parcel-combined-audit (2026-09-26): named entities in report
 * cards that click through to the map - subtle underline to signal
 * interactivity without competing with primary CTAs. */
.entity-name[data-map-target] {
  cursor: pointer; text-decoration: underline; text-decoration-style: dotted;
  text-underline-offset: 3px; text-decoration-color: var(--brand);
}
.entity-name[data-map-target]:hover { text-decoration-style: solid; }
.entity-name[data-map-target]:focus-visible {
  outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 2px;
}

/* Semantic accent-stripe modifiers (color-only - everything else inherits) */
.card--verdict         { border-left-color: var(--low); }
.card--verdict.card--band-med     { border-left-color: var(--med); }
.card--verdict.card--band-high    { border-left-color: var(--high); }
.card--verdict.card--band-extreme { border-left-color: var(--extreme); }
.card--transit         { border-left-color: var(--info); }
.card--emergency       { border-left-color: var(--extreme); }
.card--neighborhood    { border-left-color: var(--brand); }
.card--zoning          { border-left-color: var(--low); }
.card--permits         { border-left-color: var(--muted); }
.card--comps           { border-left-color: var(--accent); }
.card--sensitivity     { border-left-color: var(--accent); }
/* WI-04 commercial-business-fit: 4-tier concept-fit badges */
.card--concept-fit                    { border-left-color: var(--unknown); }
.card--concept-fit--green             { border-left-color: var(--low); }
.card--concept-fit--yellow            { border-left-color: var(--med); }
.card--concept-fit--orange            { border-left-color: var(--high); }
.card--concept-fit--red               { border-left-color: var(--extreme); }
.card--concept-fit--grey              { border-left-color: var(--unknown); }
/* WI-01 trade-area demographic match: same palette as concept-fit */
.card--trade-area                     { border-left-color: var(--unknown); }
.card--trade-area--green              { border-left-color: var(--low); }
.card--trade-area--yellow             { border-left-color: var(--med); }
.card--trade-area--orange             { border-left-color: var(--high); }
.card--trade-area--red                { border-left-color: var(--extreme); }
.trade-area-dim-table                 { width: 100%; border-collapse: collapse; margin-top: 0.75rem; font-size: 0.9rem; }
.trade-area-dim-table th, .trade-area-dim-table td { padding: 0.4rem 0.6rem; text-align: left; border-bottom: 1px solid var(--line, #ddd); }
.trade-area-dim-table th              { font-weight: 600; color: var(--brand, #17505c); background: var(--bg-soft, #f8f8f5); }
.trade-area-dim-target                { color: var(--muted, #888); font-size: 0.85rem; }
.trade-area-dim--in                   { background: rgba(74, 157, 95, 0.08); }
.trade-area-dim--near                 { background: rgba(217, 164, 65, 0.08); }
.trade-area-dim--off                  { background: rgba(184, 48, 48, 0.08); }
/* WI-02 in-category competitor density: inverse color semantics (UNDERSERVED=green, SATURATED=red) */
.card--competitor-density                     { border-left-color: var(--unknown); }
.card--competitor-density--green              { border-left-color: var(--low); }
.card--competitor-density--yellow             { border-left-color: var(--med); }
.card--competitor-density--orange             { border-left-color: var(--high); }
.card--competitor-density--red                { border-left-color: var(--extreme); }
.competitor-density-table                     { width: 100%; border-collapse: collapse; margin-top: 0.75rem; font-size: 0.9rem; }
.competitor-density-table th, .competitor-density-table td { padding: 0.4rem 0.6rem; text-align: left; border-bottom: 1px solid var(--line, #ddd); }
.competitor-density-table th                  { font-weight: 600; color: var(--brand, #17505c); background: var(--bg-soft, #f8f8f5); }
.competitor-density-list                      { list-style: none; padding: 0; margin: 0.5rem 0; }
.competitor-density-list li                   { padding: 0.3rem 0; border-bottom: 1px solid var(--line, #eee); font-size: 0.9rem; }
.competitor-chain-flag                        { background: #d9a441; color: #fff; font-size: 0.7rem; padding: 0.05rem 0.4rem; border-radius: 3px; margin-left: 0.3rem; }
.competitor-indie-flag                        { background: #17505c; color: #fff; font-size: 0.7rem; padding: 0.05rem 0.4rem; border-radius: 3px; margin-left: 0.3rem; }
/* WI-05 business-survival outlook: BETTER_THAN_AVERAGE=green, AVERAGE=yellow, CURSED=red */
.card--survival                               { border-left-color: var(--unknown); }
.card--survival--green                        { border-left-color: var(--low); }
.card--survival--yellow                       { border-left-color: var(--med); }
.card--survival--red                          { border-left-color: var(--extreme); }
.card--survival--grey                         { border-left-color: var(--unknown); }
.pill--green                          { background: var(--low); }
.pill--yellow                         { background: var(--med); }
.pill--orange                         { background: var(--high); }
.pill--red                            { background: var(--extreme); }
.pill--grey                           { background: var(--unknown); }
.card--action-plan     { border-left-color: var(--info); }
.card--insurance       { border-left-color: var(--accent); }
.card--investor-move   { border-left-color: var(--brand); }
.card--paywall         { border-left-color: var(--accent); cursor: pointer;
                         transition: border-color 0.15s ease, background 0.15s ease; }
.card--paywall:hover   { border-left-color: var(--brand); background: #fdfcf6; }
.card--cta             { border: 2px solid var(--accent); background: var(--accent-soft);
                         border-left-width: 2px; }

/* ── Shared body-shape helpers (drop-in for any card__body) ──────────── */
.card__kv-grid {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem; margin: 0.5rem 0;
}
.card__kv-cell {
  padding: 0.5rem 0.75rem; background: var(--soft); border-radius: 4px;
}
.card__kv-label {
  font-size: 0.7rem; color: var(--muted);
  text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 0.25rem;
}
.card__kv-line { font-size: 0.85rem; margin: 0.15rem 0; }
.card__kv-line strong { color: var(--brand); font-weight: 700; }
.card__kv-line--muted { color: var(--muted); font-size: 0.78rem; }

/* WI-16 (2026-10-08): expanded demographic grid - 8 cells (4x2 on wide, 2x4 on mobile).
   card__kv-grid--demog modifier wraps 2 columns at <900px, 1 column at <600px. */
.card__kv-grid--demog {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.card__kv-sub {
  font-size: 0.65rem; color: var(--muted); font-weight: 400;
  text-transform: none; letter-spacing: 0; margin-left: 0.3rem;
}
.card__lead--neighborhood-intro {
  background: var(--soft, #f8f8f5);
  padding: 0.5rem 0.75rem;
  border-left: 3px solid var(--brand, #17505c);
  border-radius: 4px;
  font-size: 0.85rem;
  margin: 0 0 0.75rem;
}
@media (max-width: 900px) {
  .card__kv-grid--demog { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
  .card__kv-grid--demog { grid-template-columns: 1fr; }
}

.card__table {
  width: 100%; border-collapse: collapse; font-size: 0.85rem; margin: 0.5rem 0;
}
.card__table th {
  background: var(--cell-header); padding: 0.4rem 0.6rem; text-align: left;
  font-weight: 700; color: #333; font-size: 0.75rem; letter-spacing: 0.03em;
}
.card__table td {
  padding: 0.4rem 0.6rem; border-top: 1px solid var(--line);
}
.card__table .card__table-row-total td {
  font-weight: 700; border-top: 2px solid #666;
}

.card__list { list-style: none; padding: 0; margin: 0.5rem 0; }
.card__list li {
  padding: 0.35rem 0.5rem; border-bottom: 1px solid var(--line); font-size: 0.85rem;
}
.card__list li:last-child { border-bottom: none; }

.card__prose { font-size: 0.9rem; line-height: 1.5; color: var(--ink); }
.card__prose p { margin: 0.4rem 0; }

/* ── Legacy verdict-para classes kept for the LLM narrative paragraphs ── */
.verdict-para { margin: 0.35rem 0; font-size: 0.9rem; line-height: 1.5; }
.verdict-para-body { color: var(--ink); }
.verdict-para-caveat {
  color: var(--muted); font-size: 0.78rem; font-style: italic;
  padding-left: 0.6rem; border-left: 2px solid var(--line);
  margin-top: 0.5rem;
}

/* ── Unified `.pill` - single class + semantic modifiers ─────────────── */
.pill {
  display: inline-block; padding: 0.15rem 0.6rem; border-radius: 999px;
  font-size: 0.75rem; font-weight: 700; letter-spacing: 0.05em;
  text-transform: uppercase; color: white; background: var(--unknown);
}
.pill--low, .pill--good, .pill--protected, .pill--excellent { background: var(--low); }
.pill--med, .pill--moderate, .pill--warn { background: var(--med); }
.pill--high { background: var(--high); }
.pill--extreme, .pill--unprotected, .pill--extended, .pill--error { background: var(--extreme); }
.pill--info, .pill--neutral { background: var(--info); }
.pill--no_data, .pill--unknown { background: var(--unknown); }
/* WI-8 of CODG124-enrichment (2026-09-28): direction-aware pill palette
 * (mirror of .band-livability-* / .band-neutral-* above). Same rule set.
 * Class combined `pill pill--{direction}-{tier}`. Custom-band arrows
 * (market_area_catchment THIN/TYPICAL/LARGE/METRO) fall through to bare
 * `pill--<word>` shortcuts below. */
.pill--livability-low     { background: #8a8a8a; }
.pill--livability-med     { background: #d9a441; }
.pill--livability-high    { background: #3a8a86; }
.pill--livability-extreme { background: #2e8b57; }
.pill--neutral-low        { background: #a5c8dd; color: #17505c; }
.pill--neutral-med        { background: #5e8bad; }
.pill--neutral-high       { background: #3a5a7d; }
.pill--neutral-extreme    { background: #4a5c8a; }
.pill--thin,    .pill--neutral-thin    { background: #a5c8dd; color: #17505c; }
.pill--typical, .pill--neutral-typical { background: #5e8bad; }
.pill--large,   .pill--neutral-large   { background: #3a5a7d; }
.pill--metro,   .pill--neutral-metro   { background: #4a5c8a; }

/* Back-compat: keep .band class as an alias for .pill during migration.
   Templates SHOULD migrate to .pill; grep for .band uses after WI-1.1 cleanup. */
.band { display: inline-block; padding: 0.15rem 0.6rem; border-radius: 999px;
        font-size: 0.75rem; font-weight: 700; letter-spacing: 0.05em; color: white;
        background: var(--unknown); }
.band-low { background: var(--low); }
.band-med { background: var(--med); }
.band-high { background: var(--high); }
.band-extreme { background: var(--extreme); }
.band-no_data, .band-unknown { background: var(--unknown); }
/* WI-8 of CODG124-enrichment (2026-09-28): direction-aware pill palette.
 * Risk arrows keep the green→amber→orange→red ladder above.
 * Livability arrows: same tier maps to grey→amber→teal→green (higher = better).
 * Neutral arrows: light-blue→blue→dark-blue→slate (no red anywhere; not a
 * valuation, just a signal magnitude). Class combined `band band-{direction}-{tier}`
 * or bare `band band-{tier}` for composite/risk. Custom-band arrows
 * (market_area_catchment THIN/TYPICAL/LARGE/METRO) fall through to the
 * bare .band-<word> for their custom names - CSS below covers those too. */
.band-livability-low     { background: #8a8a8a; }  /* grey - BASIC */
.band-livability-med     { background: #d9a441; }  /* amber - OK (unchanged hue) */
.band-livability-high    { background: #3a8a86; }  /* teal - GOOD */
.band-livability-extreme { background: #2e8b57; }  /* green - EXCELLENT */
.band-neutral-low        { background: #a5c8dd; color: #17505c; }  /* light blue - SPARSE */
.band-neutral-med        { background: #5e8bad; }  /* blue - TYPICAL */
.band-neutral-high       { background: #3a5a7d; }  /* deep blue - STRONG */
.band-neutral-extreme    { background: #4a5c8a; }  /* slate - PEAK */
/* market_area_catchment custom bands (THIN/TYPICAL/LARGE/METRO - neutral direction) */
.band-thin    { background: #a5c8dd; color: #17505c; }
.band-typical { background: #5e8bad; }
.band-large   { background: #3a5a7d; }
.band-metro   { background: #4a5c8a; }
.raw { margin: 1.5rem 0; }
.raw summary { cursor: pointer; color: var(--muted); font-size: 0.9rem; }
.raw pre { background: #efeee9; padding: 1rem; overflow-x: auto; font-size: 0.75rem; border-radius: 4px; }

/* Parcel marker (Leaflet) */
.parcel-pin {
  color: var(--extreme); font-size: 22px; font-weight: 700;
  text-align: center; line-height: 24px; text-shadow: 0 0 3px white, 0 0 3px white;
}
.leaflet-tooltip.parcel-label {
  background: rgba(184,48,48,0.92); color: white; border: 0; font-weight: 700; font-size: 11px;
  padding: 2px 6px; border-radius: 3px; box-shadow: 0 1px 2px rgba(0,0,0,0.2);
}
.leaflet-tooltip.school-label {
  font-size: 10.5px; font-weight: 600; padding: 1px 5px; border: 0; border-radius: 3px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.2);
}
.leaflet-tooltip.school-label-elementary { background: rgba(25,118,210,0.92); color: white; }
.leaflet-tooltip.school-label-secondary { background: rgba(245,124,0,0.92); color: white; }

/* WI-3.4 of parcel-combined-audit (2026-09-26): retired the stale
 * `.map-legend` + companion `#map { margin-bottom: 0 }` override. The
 * legend widget was replaced by the unified in-map panel in WI-3 of
 * opi-map-ux (see next comment block); the CSS + `#map` override were
 * leftover dead code that visually collapsed the gap between map and
 * verdict cards. Removing restores canonical `#map { margin: 0 0 1.5rem }`
 * from line 98 + full 6px border-radius. `.map-legend` markup is not
 * used by any template (grep-verified). */

/* WI-3 of opi-map-ux: unified in-map panel (checkbox toggle + swatch legend).
 * Replaces the split top-right layer-control + bottom-right map-legend widgets
 * that overlapped at 1024px viewport. Collapsible via chevron in header;
 * state persists to localStorage['opi-map-panel-collapsed']. */
.map-panel {
  background: rgba(255,255,255,0.96); border: 1px solid #ccc; border-radius: 4px;
  font-size: 12px; line-height: 1.4; color: #222;
  box-shadow: 0 1px 3px rgba(0,0,0,0.15);
  /* WI-3.5 of parcel-combined-audit (2026-09-26): bumped max-width 300 →
   * 260 (tighter) + rows now stack label / hint vertically per row - gives
   * the operator a compact scannable list instead of a horizontally-squeezed
   * wrap-mess. Panel becomes taller (natural vertical scroll) instead of
   * wider. */
  min-width: 220px; max-width: 260px;
}
.map-panel__header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 6px 10px; border-bottom: 1px solid var(--line, #e0dfd8);
  background: var(--soft, #f8f8f5);
}
.map-panel__title { font-weight: 700; font-size: 12px; color: var(--brand, #17505c); }
.map-panel__toggle {
  background: transparent; border: 0; padding: 0 4px; cursor: pointer;
  font-size: 14px; color: var(--brand, #17505c); line-height: 1;
}
.map-panel__toggle:hover { color: var(--brand-dark, #0e3d47); }
.map-panel__body { padding: 6px 10px; max-height: 78vh; overflow-y: auto; }
/* WI-3.5 of parcel-combined-audit (2026-09-26): row layout is a
 * flex-wrap so label sits inline with checkbox+swatch on row 1, and the
 * hint flows onto row 2 as an indented sub-line. Was: single horizontal
 * row with margin-left:auto on hint which caused the hint to wrap into
 * 3-4 messy lines when its text was longer than remaining row width. */
.map-panel__row {
  display: flex; flex-wrap: wrap; align-items: baseline;
  gap: 2px 6px;
  padding: 5px 0; cursor: pointer; font-size: 12px;
  border-bottom: 1px solid rgba(0,0,0,0.05);
}
.map-panel__row:last-child { border-bottom: 0; }
.map-panel__row input[type="checkbox"] { margin: 0; cursor: pointer; flex-shrink: 0; }
.map-panel__swatch {
  display: inline-block; width: 12px; height: 12px; border-radius: 3px;
  border: 1px solid rgba(0,0,0,0.15); flex-shrink: 0;
  align-self: center;
}
.map-panel__label { color: var(--ink, #1a1a1a); font-weight: 500; }
.map-panel__hint {
  color: var(--muted, #666); font-size: 10.5px;
  flex-basis: 100%;       /* force wrap onto its own line */
  margin: 0 0 0 26px;     /* indent past checkbox (~14px) + swatch (12px) */
  line-height: 1.3;
  font-style: italic;
}

/* WI-12 of opi-map-ux: keyboard accessibility (WCAG 2.1.1 + 2.4.1).
 * .skip-link is off-screen until Tab-focused, then jumps into view so
 * keyboard-only users can bypass the map + head straight to findings.
 * :focus-visible rings appear only for keyboard-focus (not mouse-click)
 * so sighted mouse users don't see extra rings. */
.skip-link {
  position: absolute; left: -9999px; top: auto;
  width: 1px; height: 1px; overflow: hidden; z-index: 10000;
}
.skip-link:focus {
  position: fixed; left: 8px; top: 8px;
  width: auto; height: auto; padding: 8px 16px;
  background: var(--brand, #17505c); color: white;
  border-radius: 4px; text-decoration: none; font-weight: 700;
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}
.map-panel *:focus-visible,
.leaflet-control button:focus-visible,
.leaflet-marker-icon:focus-visible {
  outline: 2px solid var(--brand, #17505c);
  outline-offset: 1px;
}
#findings:focus { outline: none; } /* skip-link target - no ring on jump */

/* WI-1 of report-audit: below-fold methodology <details> block.
 * Subdued styling so it reads as help-affordance not primary content;
 * summary line is clickable but not styled as a CTA. */
.methodology {
  margin: 1.5rem 0; padding: 0.75rem 1rem;
  background: var(--soft, #f8f8f5);
  border: 1px solid var(--line, #e0dfd8);
  border-radius: 6px;
  font-size: 0.9rem; color: var(--muted, #666);
}
.methodology > summary {
  cursor: pointer; font-weight: 600; color: var(--brand, #17505c);
  font-size: 0.95rem; padding: 0.25rem 0;
}
.methodology > summary:hover { color: var(--brand-dark, #0e3d47); }
.methodology[open] > summary { margin-bottom: 0.5rem; border-bottom: 1px solid var(--line, #e0dfd8); }
.methodology__body p { margin: 0.5rem 0; line-height: 1.5; }
.methodology__body code {
  font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: 0.85em; background: rgba(23,80,92,0.06);
  padding: 0.05em 0.35em; border-radius: 3px;
}

/* WI-2 of report-audit: next-steps recommendation card
 * (forward-looking action list per R10 peak-end). */
.card.card--next-steps {
  border-left: 4px solid var(--brand, #17505c);
  background: linear-gradient(to right, rgba(23,80,92,0.04) 0%, transparent 60%);
}
.card--next-steps .card__title { color: var(--brand, #17505c); }
.card__list.card__list--numbered {
  list-style: decimal outside; padding-left: 1.5rem;
  margin: 0.5rem 0;
}
.card__list--numbered li {
  margin: 0.5rem 0; line-height: 1.5;
}

/* Free-tier unlock CTA banner */
.unlock-cta {
  margin: 1rem 0 1.5rem; padding: 1.25rem 1.5rem;
  background: linear-gradient(135deg, #fef8e7 0%, #fef2d0 100%);
  border: 2px solid var(--med, #f57c00); border-radius: 8px;
  display: grid; grid-template-columns: 1fr auto; gap: 1rem 1.5rem; align-items: center;
}
.unlock-cta-body { grid-column: 1; }
.unlock-cta-body h2 { margin: 0 0 0.5rem; font-size: 1.25rem; color: #5c3a00; }
.unlock-cta-body p { margin: 0 0 0.5rem; color: #4a3200; font-size: 0.95rem; }
.unlock-preview-note { font-size: 0.85rem !important; font-style: italic; opacity: 0.85; }
.unlock-btn {
  grid-column: 2; align-self: center;
  display: inline-block; padding: 0.85rem 1.5rem;
  background: var(--extreme, #b83030); color: white; text-decoration: none;
  border-radius: 6px; font-weight: 700; font-size: 1.05rem;
  box-shadow: 0 2px 6px rgba(184,48,48,0.25);
  transition: transform 0.1s, box-shadow 0.1s;
  white-space: nowrap;
}
.unlock-btn:hover { transform: translateY(-1px); box-shadow: 0 4px 10px rgba(184,48,48,0.35); }
.unlock-fineprint {
  grid-column: 1 / -1; margin: 0; font-size: 0.78rem; color: var(--muted);
}

/* Locked verdict card - blurred content + lock overlay */
.verdict-card-locked { position: relative; }
.verdict-content { position: relative; }
.verdict-content-locked .verdict-para-llm {
  filter: blur(5px); user-select: none; pointer-events: none;
  color: #666;
}
.lock-overlay {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 0.5rem;
  background: rgba(255,255,255,0.35);
  border-radius: 4px;
}
.lock-icon { font-size: 1.75rem; opacity: 0.85; }
.lock-unlock-btn {
  padding: 0.4rem 0.9rem;
  background: var(--extreme, #b83030); color: white; text-decoration: none;
  border-radius: 4px; font-weight: 600; font-size: 0.85rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
.lock-unlock-btn:hover { background: #a02525; }

/* Highway interchange badge */
.highway-pin { background: transparent; border: 0; }
.highway-badge {
  background: #2e7d32; color: white; font-weight: 700; font-size: 11px;
  border: 2px solid white; border-radius: 3px; padding: 1px 5px;
  text-align: center; box-shadow: 0 1px 2px rgba(0,0,0,0.3);
  min-width: 20px; line-height: 14px;
}

/* Footer */
.site-footer {
  max-width: 1080px; margin: 3rem auto 2rem; padding: 1.5rem;
  border-top: 1px solid var(--line); color: var(--muted); font-size: 0.85rem;
}
.site-footer .caveat { margin: 0 0 0.75rem; }
.site-footer .prov { margin: 0; font-size: 0.75rem; }

/* Executive summary - narrow purpose, keep as-is (not a card) */
.exec-summary {
  margin: 1.25rem 0 1.5rem; padding: 1rem 1.25rem;
  background: var(--soft); border-left: 3px solid var(--brand);
  border-radius: 4px; font-size: 0.95rem; line-height: 1.5;
}
.exec-summary h2 { margin: 0 0 0.5rem; font-size: 0.75rem;
  color: var(--brand); text-transform: uppercase; letter-spacing: 0.05em; }

/* WI-9 of CODG124-enrichment: geocode confidence disclosure above exec summary.
   Amber for medium, red-amber for low/unknown. Buyer-facing, not alarming. */
.geocode-disclosure {
  margin: 1rem 0 1.25rem; padding: 0.75rem 1rem;
  border-left: 3px solid #d97706; border-radius: 4px;
  background: #fef3c7; color: #78350f;
  font-size: 0.9rem; line-height: 1.45;
}
.geocode-disclosure--low,
.geocode-disclosure--unknown {
  border-left-color: #c2410c; background: #fed7aa; color: #7c2d12;
}
.geocode-disclosure strong { font-weight: 700; }

/* Verdict-card percentile line (inherits .card__body context) */
.card--verdict .percentile { margin: 0.2rem 0 0.6rem; font-size: 0.8rem; color: var(--brand); }
.card--verdict .percentile strong { font-weight: 700; }

/* Insurance-band callout (inside .card--insurance body) */
.insurance-caveat {
  padding: 0.75rem 1rem; background: var(--accent-soft);
  border-left: 3px solid var(--accent); margin-bottom: 0.75rem;
  font-size: 0.85rem; line-height: 1.4;
}
.insurance-band {
  margin: 0.75rem 0; padding: 0.75rem 1rem; background: var(--soft); border-radius: 4px;
}
.insurance-band .insurance-amount { display: block; font-size: 1.5rem; color: var(--brand);
  font-weight: 700; margin-top: 0.25rem; }
.insurance-band .insurance-midpoint { display: block; font-size: 0.75rem; color: var(--muted); }

/* Sensitivity grid cell highlighting (inside .card--sensitivity body) */
.card__table .cell { text-align: center; font-family: 'SF Mono', Menlo, monospace; }
.card__table .cell-base {
  background: var(--accent-soft); color: var(--brand); font-weight: 700;
  border: 1px solid var(--accent);
}

/* Paywall-teaser blur overlay (inside .card--paywall body) */
.teaser-preview {
  position: relative; margin-top: 0.75rem; min-height: 100px;
  border-radius: 4px; overflow: hidden;
}
.teaser-blur {
  filter: blur(3px); opacity: 0.5;
  user-select: none; pointer-events: none;
}
.teaser-blur table { width: 100%; }
.teaser-overlay {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(180deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0.85) 60%, #fff 100%);
}
.teaser-overlay .cta-primary { pointer-events: auto; }

.price-anchor {
  margin: 1.5rem 0; padding: 0.75rem 1rem;
  background: var(--accent-soft); border-left: 3px solid var(--accent); border-radius: 4px;
  font-size: 0.85rem; color: #333; text-align: center;
}
.price-anchor strong { color: var(--brand); }

.cta-sticky-bar {
  position: fixed; bottom: 0; left: 0; right: 0;
  background: var(--brand); color: white;
  box-shadow: 0 -2px 10px rgba(0,0,0,0.15);
  z-index: 100; padding: 0.75rem 0;
}
.cta-sticky-inner {
  max-width: 1080px; margin: 0 auto; padding: 0 1rem;
  display: flex; align-items: center; gap: 1rem;
}
.cta-sticky-text { flex: 1; font-size: 0.9rem; }
.cta-sticky-text strong { color: white; }
.cta-sticky-sub { color: #d8e6e8; font-size: 0.8rem; margin-left: 0.25rem; }
/* Base .cta-primary - branded orange button used across landing paywall,
   /parcel paywall-resume, sticky bars, teasers, landing sample. Scoped
   selectors below (.cta-sticky-bar, .landing-sample, .teaser-overlay) may
   override padding/margin per context, but the base color + weight is
   inherited so ALL uses of .cta-primary look on-brand. Fixes the grey
   unstyled buttons observed 2026-09-30 on the landing-page paywall +
   WI-6 paywall-resume page (INFRA-OPI-COST-HARDENING-WI6-PAYWALL-BUTTON-STYLING-FIX-2026-09-30). */
.cta-primary {
  display: inline-block;
  background: var(--accent); color: white; border: none;
  padding: 0.6rem 1.25rem; font-weight: 700; cursor: pointer;
  border-radius: 4px; font-size: 0.95rem; text-decoration: none;
  font-family: inherit; line-height: 1.2;
}
.cta-primary:hover { background: var(--accent-dark); }
.cta-primary:focus-visible { outline: 2px solid var(--accent-dark); outline-offset: 2px; }

.cta-sticky-bar .cta-primary {
  padding: 0.5rem 1.25rem; font-size: 0.9rem;
}
.cta-sticky-see { color: #d8e6e8; text-decoration: none; font-size: 0.85rem; }
.cta-sticky-see:hover { color: white; }
.cta-sticky-dismiss {
  background: transparent; border: none; color: #d8e6e8;
  font-size: 1.5rem; cursor: pointer; padding: 0 0.25rem; line-height: 1;
}
.cta-sticky-dismiss:hover { color: white; }

/* Renovation-ROI Report Card + attrs form - INFRA-OPI-INVESTOR-TIER-CSS-2026-09-30.
   None of the .investor-* / .tier-pill / .subhead classes had definitions in
   main.css, so investor_report_partial.html rendered as an unstyled wall of
   text with browser-default form controls (operator flameshot 2026-09-30
   15:01). Match the .card visual language + reuse --accent for the tier
   accents. */
.investor-tier {
  background: white;
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: var(--card-radius);
  padding: 1.25rem 1.5rem;
  margin: 0 0 var(--section-gap, 1.5rem);
}
.investor-head {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.5rem;
  margin: 0 0 0.5rem;
}
.investor-head h2 {
  margin: 0; font-size: 1.15rem; color: var(--brand); font-weight: 700;
}
.tier-pill {
  display: inline-block; padding: 0.15rem 0.55rem; border-radius: 999px;
  font-size: 0.7rem; font-weight: 700; letter-spacing: 0.02em;
  text-transform: uppercase;
}
.tier-pill.tier-paid { background: var(--accent-soft); color: var(--accent-dark); }
.subhead { margin: 0.25rem 0 0.75rem; font-size: 0.9rem; color: var(--muted); }
.subhead.subhead--warn { color: var(--accent-dark); }

/* Attrs form (initial state - user hasn't submitted property posture yet). */
.investor-attrs-form { margin: 0.75rem 0 0; }
.investor-attrs-intro {
  margin: 0 0 1rem; font-size: 0.9rem; color: var(--ink); line-height: 1.5;
}
.investor-attrs-fields {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.75rem 1rem; margin: 0 0 1rem;
}
.investor-attrs-fields label {
  display: flex; flex-direction: column; gap: 0.25rem;
  font-size: 0.85rem; font-weight: 600; color: var(--brand);
  /* ux-audit followup (2026-10-08): the grid stretches all labels in a row to
   * equal height. Without justify-content:space-between the input anchors to
   * the top of each label, so a long multi-line label text (e.g. "Lot size
   * (sqft, 0 for condo/apartment)") pushes its input DOWN relative to the
   * single-line "Square feet" neighbor. Space-between pushes the input to
   * the bottom of each stretched label so all inputs in a row line up. */
  justify-content: space-between;
}
.investor-attrs-fields select,
.investor-attrs-fields input[type="number"] {
  padding: 0.45rem 0.6rem; font-size: 0.9rem; font-family: inherit;
  border: 1px solid var(--line); border-radius: 4px; background: white;
  color: var(--ink);
}
.investor-attrs-fields select:focus,
.investor-attrs-fields input[type="number"]:focus {
  outline: 2px solid var(--accent); outline-offset: 1px;
  border-color: var(--accent);
}
.investor-attrs-submit {
  display: inline-block;
  background: var(--accent); color: white; border: none;
  padding: 0.6rem 1.25rem; font-weight: 700; cursor: pointer;
  border-radius: 4px; font-size: 0.95rem; font-family: inherit; line-height: 1.2;
  margin: 0 0 0.75rem;
}
.investor-attrs-submit:hover { background: var(--accent-dark); }
.investor-attrs-submit:focus-visible {
  outline: 2px solid var(--accent-dark); outline-offset: 2px;
}
.investor-attrs-hint {
  margin: 0; font-size: 0.8rem; color: var(--muted); line-height: 1.5;
  font-style: italic;
}

/* Placeholder branch (WI-3 comps-insufficient state). */
.investor-placeholder { margin: 0.75rem 0; font-size: 0.9rem; line-height: 1.5; }
.investor-placeholder-hint {
  margin: 0.5rem 0 0; font-size: 0.85rem; color: var(--muted);
}

/* Populated branch (attrs submitted + comps available). */
.investor-summary {
  background: var(--soft); border-radius: 4px; padding: 0.75rem 1rem;
  margin: 0.5rem 0 1rem; font-size: 0.9rem; line-height: 1.5;
}
.investor-moves { display: flex; flex-direction: column; gap: 0.75rem; margin: 0 0 1rem; }
.card--investor-move { border-left-color: var(--accent); }
.investor-skip {
  background: var(--soft); border-radius: 4px; padding: 0.75rem 1rem; margin: 0.5rem 0;
}
.investor-skip h3 {
  margin: 0 0 0.5rem; font-size: 0.95rem; color: var(--brand);
}
.investor-skip ul { margin: 0; padding-left: 1.25rem; }
.investor-skip li { font-size: 0.9rem; margin: 0.25rem 0; }

/* Caveat block at bottom - visually de-emphasized but legible. */
.investor-caveat {
  margin: 1rem 0 0; padding: 0.75rem 1rem; border-top: 1px dashed var(--line);
  font-size: 0.8rem; color: var(--muted); line-height: 1.5;
}
.investor-caveat strong { color: var(--ink); }

.verdict-error {
  background: #fef3f2; border: 1px solid #fecaca; color: #991b1b;
  padding: 0.75rem 1rem; border-radius: 4px; font-size: 0.9rem; margin: 0.5rem 0;
}

/* Post-purchase paid variant (INFRA-OPI-PAID-STICKY-DOWNLOAD-2026-09-29):
   green success bar with same visual footprint as the free-tier CTA. Fixes
   the UX gap where paid buyers saw the sticky vanish + no prominent
   download CTA. The .cta-primary inherits accent orange for contrast against
   the green background. */
.cta-sticky-bar.cta-sticky-bar--paid { background: #15803d; }
.cta-sticky-bar--paid .cta-sticky-sub { color: #d1fae5; }
.cta-sticky-bar--paid .cta-sticky-dismiss { color: #d1fae5; }
.cta-sticky-bar--paid .cta-sticky-dismiss:hover { color: white; }

/* Reserve space so sticky bar never overlaps final content on free view */
main { padding-bottom: 5rem; }

/* WI-2 of composite-map-consistency: emergency-services pins on the Leaflet map */
.emergency-pin .fire-badge, .emergency-pin .hospital-badge {
  display: inline-flex; align-items: center; justify-content: center;
  width: 24px; height: 24px; border-radius: 50%;
  font-size: 14px; line-height: 1;
  background: #b83030; color: white; border: 1.5px solid white;
  box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}
.emergency-label { font-size: 0.7rem; font-weight: 700; }

/* WI-3 of composite-map-consistency: zoning polygon centroid label */
.zoning-label {
  background: rgba(255, 255, 255, 0.85); border: 1px solid #666;
  border-radius: 3px; padding: 2px 6px;
  font-weight: 700; font-size: 0.75rem; color: #17505c;
  white-space: nowrap;
}
/* WI-4 of composite-map-consistency: StatsCan DA north-edge label */
.statscan-da-label {
  background: rgba(255, 255, 255, 0.85); border: 1px solid #0097a7;
  border-radius: 3px; padding: 2px 6px;
  font-weight: 700; font-size: 0.7rem; color: #0097a7;
  white-space: nowrap;
}

/* WI-19 (2026-10-08): promoter-code banner + activation form.
 * Spec: .github/prompts/2026-09-27-22-30-opi-enrichment-codg124/19-promoter-code-free-usage.md
 */
.promo-banner {
  display: flex; align-items: center; gap: 10px; justify-content: center;
  padding: 8px 16px; background: #e8f5e9; color: #1b5e20;
  border-bottom: 1px solid #a5d6a7; font-size: 0.88rem; line-height: 1.3;
}
.promo-banner__check { font-weight: 700; font-size: 1rem; }
.promo-banner__off {
  margin-left: 10px; padding: 2px 10px; background: transparent;
  border: 1px solid #4caf50; color: #1b5e20; border-radius: 3px;
  font-size: 0.78rem; cursor: pointer;
}
.promo-banner__off:hover { background: #c8e6c9; }

.promo-link {
  color: var(--brand, #17505c); text-decoration: underline;
  text-decoration-style: dotted; font-size: 0.82rem;
}
.promo-form {
  margin-top: 10px; padding: 12px 14px; background: #f6f6ef;
  border: 1px solid #d9d5cb; border-radius: 4px;
  display: flex; flex-wrap: wrap; gap: 10px; align-items: center;
}
/* ux-audit followup P5+P7: context + format explainer on form expand. */
.promo-form__intro {
  flex-basis: 100%; margin: 0 0 4px 0;
  color: #4a4a4a; font-size: 0.82rem; line-height: 1.4;
}
.promo-form input[type="text"],
.promo-form input[type="email"] {
  flex: 1 1 180px; min-width: 160px;
  /* ux-audit followup P6: WCAG SC 2.5.5 - bump target to ~44px. */
  padding: 11px 12px; font-size: 0.95rem; min-height: 44px;
  border: 1px solid #c7c3b7; border-radius: 3px;
  box-sizing: border-box;
}
.promo-form input:focus-visible {
  outline: 2px solid var(--brand, #17505c); outline-offset: 1px;
  border-color: var(--brand, #17505c);
}
.promo-form button {
  /* ux-audit followup P6: WCAG SC 2.5.5 target size. */
  padding: 11px 20px; min-height: 44px;
  background: var(--brand, #17505c); color: #fff;
  border: 0; border-radius: 3px; font-size: 0.95rem; font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease;
}
.promo-form button:hover:not(:disabled) { background: var(--brand-dark, #0e3d47); }
.promo-form button:disabled {
  background: #8ba3a9; cursor: wait;
}
/* ux-audit followup P8: visible focus ring on button for keyboard users. */
.promo-form button:focus-visible {
  outline: 2px solid #ffb52b; outline-offset: 2px;
}
.promo-form__err {
  flex-basis: 100%; color: #b83030; font-size: 0.85rem; min-height: 1em;
  font-weight: 500; line-height: 1.4;
}

/* WI-18 (2026-10-08): demographic choropleth metric-selector overlay +
 * legend + popover. See:
 *   .github/prompts/2026-09-27-22-30-opi-enrichment-codg124/18-demographic-map-layers.md
 * Four guardrails live in the UI:
 *   G1 monochrome quintile ramp (colors picked in demographic_choropleth.js)
 *   G2 persistent disclaimer (`.choropleth-disclaimer`)
 *   G3 compound view in popover grid
 *   G4 click-to-StatsCan citation (`.choropleth-popover-footer`)
 */
.choropleth-control {
  background: rgba(255, 255, 255, 0.95); padding: 8px 10px;
  border: 1px solid rgba(0, 0, 0, 0.12); border-radius: 6px;
  font-size: 0.78rem; color: var(--ink, #1a1a1a);
  min-width: 230px; max-width: 300px; line-height: 1.3;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
}
.choropleth-control__header {
  font-weight: 700; font-size: 0.82rem; color: var(--brand, #17505c);
  margin-bottom: 6px; border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  padding-bottom: 4px;
}
.choropleth-control__row {
  display: flex; align-items: center; gap: 8px; margin-bottom: 4px;
}
.choropleth-control__row > span { flex: 0 0 55px; color: #555; }
.choropleth-control__row select,
.choropleth-control__row input[type="range"] { flex: 1; font-size: 0.78rem; }
.choropleth-control__legend { margin-top: 8px; }

.choropleth-legend-title {
  font-weight: 700; font-size: 0.76rem; margin-bottom: 4px;
}
.choropleth-legend-swatches {
  display: flex; flex-direction: column; gap: 2px; margin-bottom: 4px;
}
.choropleth-swatch {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 0.72rem; color: #333;
}
.choropleth-swatch > i {
  display: inline-block; width: 14px; height: 10px;
  border: 1px solid rgba(0, 0, 0, 0.3);
}
.choropleth-legend-footer {
  font-size: 0.68rem; color: #666; margin-top: 4px; line-height: 1.25;
}

/* G2: persistent disclaimer footer - rendered in the legend when any
 * Tier C metric is active AND in every DA popover for a Tier C layer.
 * No dismiss button, no cookie - this is attribution + context, not a modal gate. */
.choropleth-disclaimer {
  margin-top: 6px; padding: 6px 8px; background: #fafaf5;
  border: 1px solid #e2e0d0; border-left: 3px solid #8a7a2b;
  font-size: 0.68rem; color: #4a4a4a; line-height: 1.3;
}

/* DA click popover - opens on choropleth DA click. G3 (compound) + G4 (StatsCan citation). */
.choropleth-popover { max-width: 310px; font-size: 0.78rem; }
.choropleth-popover-title {
  font-weight: 700; color: var(--brand, #17505c); margin-bottom: 4px;
  font-size: 0.84rem;
}
.choropleth-popover-banner {
  padding: 4px 6px; background: #eef4f8; border-radius: 3px;
  font-size: 0.78rem; margin-bottom: 6px;
}
.choropleth-popover-banner.banner--tierC {
  background: #f3f3f3; border-left: 3px solid #5c5c5c;
}
.choropleth-popover-grid {
  display: grid; grid-template-columns: 1fr; gap: 1px;
  background: #e8e8e4; padding: 1px; border-radius: 3px;
}
.choropleth-popover-row {
  display: flex; justify-content: space-between; align-items: baseline;
  gap: 8px; padding: 2px 6px; background: #fff; font-size: 0.72rem;
}
.choropleth-popover-row > span { color: #666; }
.choropleth-popover-breakdown {
  margin-top: 4px; padding: 4px 6px; background: #f6f6ef;
  border-radius: 3px; font-size: 0.7rem; color: #555; line-height: 1.3;
}
.choropleth-popover-footer {
  margin-top: 6px; padding-top: 4px;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  font-size: 0.68rem; color: #666;
}
.choropleth-popover-footer a { color: var(--brand, #17505c); }
.choropleth-popover-cid { margin-left: 4px; font-style: italic; color: #888; }

/* WI-6 of WEB-APP-REVAMP: landing-page hero + sample PDF + price anchor + FAQ + trust.
 * WI-3.7 of parcel-combined-audit (2026-09-26): consistency pass  - 
 *   P1: dropped max-width:900px + margin:auto so landing sections inherit
 *       the parent main{max-width:1080px} container. Left edges now align
 *       with the hero form + input.
 *   P3: dropped transform:scale(1.05) on .anchor-us (broke grid rhythm +
 *       could overflow adjacent columns). Emphasis via border + bg + a
 *       slight padding bump keeps space-reserving.
 *   P4: --section-gap references replace hardcoded 2rem margins.
 *   P5: .landing-faq h2 left-aligned to match body-content layout of
 *       the details rows below it (was centered header + left body).
 *   Palette: brand/accent hex refs replaced with var(--brand)/var(--accent)/
 *       var(--soft) etc so future palette tunes propagate.
 */
.landing-sample, .landing-price-anchor, .landing-faq, .landing-trust {
  margin: 0 0 var(--section-gap); padding: 1.5rem 0;
}
.landing-sample {
  background: var(--soft); border-radius: var(--card-radius); text-align: center;
  padding: 1.5rem;   /* explicit inset since section-block above zeroed lateral */
}
.landing-sample h2 { color: var(--brand); margin: 0 0 0.5rem; font-size: 1.4rem; }
.landing-sample .cta-primary {
  display: inline-block; margin: 1rem 0 0.5rem;
  padding: 0.75rem 1.5rem; background: var(--accent); color: white;
  border-radius: 4px; text-decoration: none; font-weight: 700;
}
.landing-sample .cta-primary:hover { background: var(--accent-dark); }
.landing-sample .micro { font-size: 0.75rem; color: var(--muted); margin-top: 0.75rem; }

.landing-price-anchor h2 { color: var(--brand); margin: 0 0 1rem; font-size: 1.4rem; text-align: center; }
.anchor-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; align-items: stretch; }
.anchor-cell {
  padding: 1rem; border: var(--card-border); border-radius: var(--card-radius);
  background: #fff; text-align: center;
}
.anchor-cell.anchor-us {
  /* WI-3.7 P3: emphasize via border + bg + extra vertical padding
   * (reserves grid space) instead of transform:scale (which visually
   * overflows without reserving column width). */
  border: 2px solid var(--accent); background: var(--accent-soft);
  padding: 1.25rem 1rem;
}
.anchor-name { font-weight: 700; color: var(--brand); margin-bottom: 0.4rem; }
.anchor-price { font-size: 2rem; font-weight: 700; color: var(--accent); margin: 0.4rem 0; }
.anchor-cell.anchor-us .anchor-price { color: var(--brand); }
.anchor-desc { font-size: 0.85rem; color: var(--muted); line-height: 1.4; }

.landing-faq h2 { color: var(--brand); margin: 0 0 1rem; font-size: 1.4rem; /* WI-3.7 P5: left-align header to match body */ }
.landing-faq details {
  padding: 0.75rem 1rem; border: var(--card-border); border-radius: var(--card-radius);
  margin: 0.5rem 0; background: #fff;
}
.landing-faq summary {
  cursor: pointer; font-weight: 600; color: var(--brand);
}
.landing-faq details[open] summary { margin-bottom: 0.5rem; }
.landing-faq details p { margin: 0.5rem 0 0; font-size: 0.9rem; line-height: 1.5; color: var(--ink); }

.landing-trust { text-align: center; }
.landing-trust .trust-line { font-size: 0.75rem; color: var(--muted); line-height: 1.6; }
.landing-trust a { color: #17505c; text-decoration: none; }
.landing-trust a:hover { text-decoration: underline; }

/* WI-10 of opi-map-ux: unified popup template - all 12 map-popup sites go
 * through renderPopup({title, subtitle, meta, footer}) so structure is
 * consistent across schools / transit / POIs / emergency / zoning / etc. */
.popup-body { font-family: inherit; line-height: 1.4; }
.popup-title { font-size: 14px; font-weight: 700; color: #17505c; margin-bottom: 2px; }
.popup-subtitle { font-size: 12px; font-style: italic; color: var(--muted, #6b7580); margin-bottom: 4px; }
.popup-meta { font-size: 12px; color: var(--ink, #222); margin-top: 2px; }
.popup-meta code { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 11px; }
.popup-footer {
  font-size: 11px; color: var(--muted, #6b7580);
  margin-top: 6px; padding-top: 4px;
  border-top: 1px solid var(--line, #e0e0dc);
}

/* ── static content pages (/terms /privacy /about /contact) ─────────────── */
.static-page {
  max-width: 780px;
  margin: 2rem auto;
  padding: 0 1.5rem;
  line-height: 1.55;
  color: var(--ink);
}
.static-page h1 { font-size: 28px; margin-bottom: 0.25rem; color: var(--brand); }
/* h2 border-bottom dropped 2026-09-27 per UX-audit P4 - matches landing minimalism */
.static-page h2 { font-size: 18px; margin-top: 2rem; margin-bottom: 0.5rem; color: var(--brand-dark); }
.static-page p, .static-page ul, .static-page ol, .static-page table { font-size: 15px; }
.static-page ul, .static-page ol { padding-left: 1.5rem; }
.static-page li { margin-bottom: 0.35rem; }
.static-page a { color: var(--brand); }
.static-page code { background: var(--soft); padding: 1px 5px; border-radius: 3px; font-size: 13px; }
.static-updated { font-size: 12px; color: var(--muted); font-style: italic; margin-bottom: 1.5rem; }
.privacy-table { width: 100%; border-collapse: collapse; margin: 1rem 0; }
.privacy-table th, .privacy-table td { text-align: left; padding: 8px 10px; border: 1px solid var(--line); font-size: 14px; }
.privacy-table th { background: var(--cell-header); font-weight: 600; }
.privacy-table caption { text-align: left; font-size: 13px; color: var(--muted); font-style: italic; margin-bottom: 6px; caption-side: top; }
/* footer nav (base.html cluster) - token-based color, no inline hex per UX-audit P6 */
.site-footer-nav { margin-top: 10px; font-size: 12px; color: var(--muted); }
.site-footer-nav a { color: var(--muted); text-decoration: none; margin: 0 8px; }
.site-footer-nav a:first-child { margin-left: 0; }
.site-footer-nav a:last-child { margin-right: 0; }
.site-footer-nav a:hover { color: var(--brand); text-decoration: underline; }

/* WI-1 of 2026-10-09-16-33-opi-marketing-wave2: SEO landing pages (city + blog).
 * Thin, no new design tokens - reuses .brand / .ink / .line vars. */
.city-landing { max-width: 920px; margin: 2rem auto; padding: 0 1rem; }
.city-hero { padding: 2rem 0 1.5rem; border-bottom: 1px solid var(--line, #ddd); }
.city-hero h1 { font-size: 2.25rem; color: var(--brand, #17505c); margin: 0 0 0.75rem; }
.city-lede { font-size: 1.05rem; line-height: 1.5; color: var(--ink, #1a1a1a); margin: 0 0 1.5rem; }
.city-proof { margin: 2rem 0; }
.city-proof h2 { font-size: 1.25rem; margin: 0 0 1rem; }
.city-proof-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; }
.city-proof-cell { padding: 1rem; background: var(--bg-soft, #f8f8f5); border: 1px solid var(--line, #ddd); border-radius: 6px; }
.city-proof-metric { font-size: 1.4rem; font-weight: 700; color: var(--brand, #17505c); }
.city-proof-label { font-size: 0.85rem; color: var(--ink-soft, #555); margin-top: 0.25rem; line-height: 1.3; }
.city-sections { margin: 2rem 0; }
.city-section { margin-bottom: 1.5rem; }
.city-section h3 { font-size: 1.1rem; color: var(--brand, #17505c); margin: 0 0 0.5rem; }
.city-section p { line-height: 1.55; margin: 0; }
.city-cta { margin: 2.5rem 0; padding: 1.5rem; background: #fdf9ee; border: 1px solid #d9a441; border-radius: 6px; text-align: center; }
.city-cta h2 { margin: 0 0 0.5rem; }
.city-faq { margin: 2rem 0; }
.city-faq h2 { font-size: 1.25rem; margin: 0 0 1rem; }
.city-faq-item { padding: 0.75rem 1rem; background: var(--bg-soft, #f8f8f5); border: 1px solid var(--line, #ddd); border-radius: 4px; margin-bottom: 0.5rem; }
.city-faq-item > summary { cursor: pointer; font-weight: 600; color: var(--brand, #17505c); }
.city-faq-answer { margin-top: 0.75rem; line-height: 1.5; color: var(--ink, #1a1a1a); }

/* WI-11 of 2026-10-10-18-15-opi-commercial-business-fit: commercial landing */
.commercial-landing { max-width: 920px; margin: 2rem auto; padding: 0 1rem; }
.commercial-hero { padding: 2rem 0 1.5rem; border-bottom: 1px solid var(--line, #ddd); }
.commercial-hero h1 { font-size: 2.25rem; color: var(--brand, #17505c); margin: 0 0 0.75rem; line-height: 1.2; }
.commercial-lede { font-size: 1.1rem; line-height: 1.5; color: var(--ink, #1a1a1a); margin: 0 0 1.5rem; }
.commercial-form { display: flex; flex-direction: column; gap: 0.75rem; max-width: 560px; }
.commercial-form-row { display: flex; flex-direction: column; gap: 0.3rem; }
.commercial-form-label { font-size: 0.9rem; font-weight: 600; color: var(--ink, #1a1a1a); }
.commercial-concept-select { padding: 0.65rem 0.8rem; font-size: 1rem; border: 1px solid var(--line, #ccc); border-radius: 4px; background: #fff; }
.commercial-form input[type="text"] { padding: 0.65rem 0.8rem; font-size: 1rem; border: 1px solid var(--line, #ccc); border-radius: 4px; }
.commercial-form button[type="submit"] { padding: 0.75rem 1.2rem; font-size: 1rem; font-weight: 600; background: var(--brand, #17505c); color: #fff; border: 0; border-radius: 4px; cursor: pointer; align-self: flex-start; }
.commercial-form button[type="submit"]:hover { background: var(--brand-dark, #0f3842); }
.commercial-pricing { margin: 2.5rem 0; }
.commercial-pricing h2 { font-size: 1.3rem; margin: 0 0 1rem; }
.commercial-pricing-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1rem; }
.commercial-pricing-cell { padding: 1.1rem; background: var(--bg-soft, #f8f8f5); border: 1px solid var(--line, #ddd); border-radius: 6px; }
.commercial-pricing-cell--us { background: #fdf9ee; border-color: #d9a441; }
.commercial-pricing-name { font-size: 1rem; font-weight: 600; color: var(--brand, #17505c); margin-bottom: 0.4rem; }
.commercial-pricing-price { font-size: 1.5rem; font-weight: 700; color: var(--ink, #1a1a1a); margin-bottom: 0.5rem; }
.commercial-pricing-desc { font-size: 0.9rem; color: var(--ink-soft, #555); line-height: 1.4; }
.commercial-explainer { margin: 2.5rem 0; }
.commercial-explainer h2 { font-size: 1.3rem; margin: 0 0 1rem; }
.commercial-explainer-list { list-style: disc; padding-left: 1.5rem; }
.commercial-explainer-list li { margin-bottom: 0.75rem; line-height: 1.5; }
.commercial-faq { margin: 2.5rem 0; }
.commercial-faq h2 { font-size: 1.3rem; margin: 0 0 1rem; }
.commercial-faq details { padding: 0.85rem 1rem; background: var(--bg-soft, #f8f8f5); border: 1px solid var(--line, #ddd); border-radius: 4px; margin-bottom: 0.5rem; }
.commercial-faq summary { cursor: pointer; font-weight: 600; color: var(--brand, #17505c); }
.commercial-faq details p { margin-top: 0.75rem; line-height: 1.5; }

/* Blog */
.blog-post { max-width: 720px; margin: 2rem auto; padding: 0 1rem; }
.blog-post-head h1 { font-size: 2rem; color: var(--brand, #17505c); margin: 0 0 0.5rem; }
.blog-post-meta { font-size: 0.85rem; color: var(--muted, #888); margin: 0 0 1.5rem; }
.blog-post-body { font-size: 1.05rem; line-height: 1.65; color: var(--ink, #1a1a1a); }
.blog-post-body h2 { font-size: 1.4rem; color: var(--brand, #17505c); margin: 1.8rem 0 0.75rem; }
.blog-post-body h3 { font-size: 1.15rem; color: var(--brand, #17505c); margin: 1.5rem 0 0.5rem; }
.blog-post-body p { margin: 0 0 1rem; }
.blog-post-body ul, .blog-post-body ol { margin: 0 0 1rem 1.5rem; }
.blog-post-body code { background: var(--bg-tint, #f4f2ec); padding: 1px 5px; border-radius: 3px; font-size: 0.9em; }
.blog-post-body table { border-collapse: collapse; margin: 1rem 0; width: 100%; }
.blog-post-body th, .blog-post-body td { border: 1px solid var(--line, #ddd); padding: 0.4rem 0.6rem; text-align: left; }
.blog-post-body th { background: var(--bg-soft, #f8f8f5); }
.blog-post-cta { margin: 2rem 0; padding: 1rem 1.25rem; background: #fdf9ee; border-left: 4px solid #d9a441; border-radius: 4px; }
.blog-post-nav { margin: 1.5rem 0; }
.blog-post-nav a { color: var(--brand, #17505c); text-decoration: none; font-size: 0.9rem; }
.blog-post-nav a:hover { text-decoration: underline; }
.blog-index { max-width: 720px; margin: 2rem auto; padding: 0 1rem; }
.blog-index h1 { color: var(--brand, #17505c); font-size: 2rem; margin: 0 0 0.5rem; }
.blog-index-lede { font-size: 1rem; color: var(--ink, #1a1a1a); line-height: 1.5; margin: 0 0 2rem; }
.blog-index-list { list-style: none; padding: 0; margin: 0; }
.blog-index-item { margin-bottom: 1.5rem; padding: 1rem; background: var(--bg-soft, #f8f8f5); border: 1px solid var(--line, #ddd); border-radius: 6px; }
.blog-index-link { display: block; text-decoration: none; color: inherit; }
.blog-index-link h2 { color: var(--brand, #17505c); font-size: 1.25rem; margin: 0 0 0.25rem; }
.blog-index-meta { font-size: 0.8rem; color: var(--muted, #888); margin: 0 0 0.5rem; }
.blog-index-excerpt { font-size: 0.95rem; line-height: 1.5; margin: 0; }

/* WI-1 followup 2026-10-09: landing-page cities + blog contextual links. */
/* WI-12 cross-sell callout: audience-mismatch rescue between landings */
.cross-sell {
  max-width: 760px; margin: 2rem auto; padding: 1rem 1.25rem;
  background: #f0f5f6; border-left: 4px solid var(--brand, #17505c);
  border-radius: 4px;
  display: flex; flex-wrap: wrap; gap: 0.75rem 1.25rem;
  align-items: center; justify-content: space-between;
}
.cross-sell-lead { margin: 0; flex: 1 1 400px; line-height: 1.45; color: var(--ink, #1a1a1a); font-size: 0.95rem; }
.cross-sell-cta {
  flex: 0 0 auto; padding: 0.55rem 1rem; background: var(--brand, #17505c);
  color: #fff; text-decoration: none; border-radius: 4px; font-weight: 600;
  font-size: 0.95rem; white-space: nowrap;
}
.cross-sell-cta:hover { background: #0f3842; }

.landing-cities { max-width: 1080px; margin: 2.5rem auto; padding: 0 1rem; }
.landing-cities h2 { font-size: 1.5rem; color: var(--brand, #17505c); margin: 0 0 0.75rem; }
.landing-cities-lede { font-size: 0.95rem; line-height: 1.5; color: var(--ink, #1a1a1a); margin: 0 0 1rem; }
.landing-cities-list { list-style: none; padding: 0; margin: 0 0 1.5rem; }
.landing-cities-list li { padding: 0.75rem 0; border-bottom: 1px solid var(--line, #ddd); font-size: 0.95rem; line-height: 1.5; }
.landing-cities-list li:last-child { border-bottom: 0; }
.landing-cities-list a { color: var(--brand, #17505c); text-decoration: none; }
.landing-cities-list a:hover { text-decoration: underline; }
.landing-cities-blog { font-size: 0.9rem; color: var(--ink-soft, #555); padding: 0.75rem 1rem; background: var(--bg-soft, #f8f8f5); border-left: 3px solid var(--brand, #17505c); border-radius: 4px; line-height: 1.5; }
.landing-cities-blog a { color: var(--brand, #17505c); }
.site-footer-cities { margin: 0.5rem 0 0; font-size: 0.78rem; color: var(--muted, #888); text-align: center; }
.site-footer-cities__label { font-weight: 600; color: var(--ink-soft, #555); margin-right: 6px; }
.site-footer-cities a { color: var(--brand, #17505c); margin: 0 4px; text-decoration: none; }
.site-footer-cities a:hover { text-decoration: underline; }
