:root {
  --bg: #0b0d12;
  --panel: #141821;
  --panel-2: #1c2230;
  --rule: #262d3c;
  --ink: #eef1f7;
  --ink-dim: #98a1b3;
  --ink-dimmer: #6b7488;
  --accent: #ffb84d;       /* hero / UI brand color (unchanged) */
  --warn: #ff6a6a;         /* warn text/numbers (unchanged) */

  /* Map palette -- chosen so each layer is unambiguous when overlapping. */
  --i2:        #3b82f6;    /* I-2 zoning footprint (cool, recessive) */
  --strict:    #ef4444;    /* strict-eligible parcels -- urgent red */
  --buildable: #fbbf24;    /* buildable patches -- amber */
  --siteable:  #f97316;    /* building envelope -- deeper orange */
  --you:       #06b6d4;    /* your address -- cyan, unmistakable single dot */
  --maxw: 1080px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0; padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: var(--accent); text-decoration: none; border-bottom: 1px solid rgba(255,184,77,0.35); }
a:hover { border-bottom-color: var(--accent); }

.kicker {
  font-size: 12px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--ink-dimmer);
  margin-bottom: 14px;
  font-weight: 500;
}

/* ---------- Hero ---------- */
.hero {
  text-align: center;
  padding: 80px 24px 40px;
  max-width: var(--maxw);
  margin: 0 auto;
}
.hero h1 {
  font-size: clamp(72px, 14vw, 156px);
  margin: 0;
  letter-spacing: -0.05em;
  font-weight: 800;
  color: var(--accent);
  line-height: 0.95;
}
.hero h1 .period { color: inherit; }
.hero .lede {
  font-size: clamp(17px, 2.1vw, 21px);
  color: var(--ink-dim);
  margin: 24px auto 0;
  max-width: 640px;
  line-height: 1.5;
}

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin: 48px auto 0;
  max-width: 880px;
}
.stat {
  background: var(--panel);
  border: 1px solid var(--rule);
  border-radius: 14px;
  padding: 24px 20px;
  text-align: center;
}
.stat .num {
  display: block;
  font-size: 64px;
  line-height: 1;
  font-weight: 800;
  color: var(--accent);
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
}
.stat .num.warn { color: var(--warn); }
.stat .lbl {
  display: block;
  font-size: 13px;
  color: var(--ink-dim);
  margin-top: 14px;
  line-height: 1.45;
}
.disclaimer {
  max-width: 720px;
  margin: 28px auto 0;
  padding: 14px 18px;
  font-size: 13.5px;
  color: var(--ink-dim);
  background: var(--panel);
  border: 1px solid var(--rule);
  border-left: 3px solid var(--accent);
  border-radius: 8px;
  line-height: 1.55;
  text-align: left;
}
.disclaimer em {
  color: var(--ink);
  font-style: normal;
  font-weight: 600;
}

/* ---------- Map ---------- */
.mapwrap {
  max-width: var(--maxw);
  margin: 56px auto 0;
  padding: 0 16px;
}
.map-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}
.seg {
  display: inline-flex;
  background: var(--panel);
  border: 1px solid var(--rule);
  border-radius: 999px;
  padding: 3px;
  overflow: hidden;
}
.seg-btn {
  background: transparent;
  color: var(--ink-dim);
  border: 0;
  padding: 8px 18px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border-radius: 999px;
  transition: background 0.15s, color 0.15s;
  font-family: inherit;
}
.seg-btn:hover { color: var(--ink); }
.seg-btn.active { background: var(--accent); color: #1a1a1a; }
.measure-btn {
  background: var(--panel);
  color: var(--ink-dim);
  border: 1px solid var(--rule);
  padding: 8px 18px;
  font-size: 13px;
  font-weight: 600;
  border-radius: 999px;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.measure-btn:hover { color: var(--ink); }
.measure-btn.active { background: var(--accent); color: #1a1a1a; border-color: var(--accent); }
/* An author-level `display` beats the `hidden` attribute's UA style, so the
   hidden state must be restated explicitly. */
.measure-status[hidden] { display: none; }
.measure-status {
  display: inline-block;
  padding: 6px 12px;
  color: var(--ink);
  background: rgba(249, 115, 22, 0.15);
  border: 1px solid var(--accent);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
}
/* ---------- setback slider ---------- */
.slider-wrap {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--panel);
  border: 1px solid var(--rule);
  border-radius: 999px;
  padding: 6px 16px;
}
.slider-lbl {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-dim);
  white-space: nowrap;
}
.slider-wrap input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: clamp(140px, 22vw, 260px);
  height: 4px;
  border-radius: 2px;
  background: var(--rule);
  outline: none;
  cursor: pointer;
}
.slider-wrap input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid #1a1a1a;
  box-shadow: 0 1px 4px rgba(0,0,0,0.5);
}
.slider-wrap input[type="range"]::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid #1a1a1a;
}
.slider-val {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  min-width: 56px;
  text-align: right;
  white-space: nowrap;
}
.method-note {
  max-width: var(--maxw);
  margin: 0 0 10px;
  font-size: 12.5px;
  color: var(--ink-dim);
  line-height: 1.5;
}
.measure-label {
  background: rgba(15,17,21,0.9);
  border: 1px solid var(--accent);
  border-radius: 4px;
  padding: 2px 6px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
  font-family: inherit;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(0,0,0,0.35);
}
.measure-label.total { border-color: #f97316; color: #ffedd5; }
.leaflet-container.measuring { cursor: crosshair !important; }
.leaflet-container.measuring .leaflet-interactive { cursor: crosshair !important; }
.layer-menu {
  margin-left: auto;
}
.layer-menu > summary {
  list-style: none;
  cursor: pointer;
  padding: 8px 14px;
  background: var(--panel);
  border: 1px solid var(--rule);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-dim);
  user-select: none;
}
.layer-menu > summary::-webkit-details-marker { display: none; }
.layer-menu > summary::after { content: " \25be"; opacity: 0.6; }
.layer-menu > summary:hover { color: var(--ink); }
.layer-menu[open] > summary { color: var(--ink); background: var(--panel-2); }
.menu-panel {
  background: var(--panel);
  border: 1px solid var(--rule);
  border-radius: 12px;
  padding: 14px 16px;
  margin: 6px 0 12px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 8px 22px;
  font-size: 13.5px;
}
/* An author-level `display` beats the `hidden` attribute's UA style, so the
   collapsed state must be restated explicitly. */
.menu-panel[hidden] { display: none; }
.menu-panel label[hidden] { display: none; }
.menu-panel label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ink-dim);
  cursor: pointer;
  user-select: none;
  padding: 4px 0;
}
.menu-panel label:hover { color: var(--ink); }
.menu-panel input[type="checkbox"] {
  accent-color: var(--accent);
  transform: translateY(1px);
}
#map {
  height: 70vh;
  min-height: 480px;
  border: 1px solid var(--rule);
  border-radius: 14px;
  background: var(--panel);
}
.legend {
  margin-top: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  font-size: 12.5px;
  color: var(--ink-dim);
}
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend span[hidden] { display: none; }
.legend .sw {
  display: inline-block;
  width: 14px;
  height: 14px;
  border-radius: 3px;
  background: currentColor;
}
.legend .sw.I2        { background: var(--i2);        border: 1px solid var(--i2); }
.legend .sw.STRICT    { background: var(--strict);    border: 1px solid var(--strict); }
.legend .sw.BUILDABLE { background: var(--buildable); border: 1px solid var(--buildable); }
.legend .sw.SITEABLE  { background: var(--siteable);  border: 1px solid var(--siteable); }
.legend .sw.P2B       { background: #2dd4bf;          border: 1px solid #2dd4bf; }
.legend .sw.CITY      { background: #60a5fa;          border: 1px solid #60a5fa; }
.legend .sw.CITYX     { background: rgba(96,165,250,0.45); border: 2px dashed var(--strict); }
.legend .sw.YOU       { background: var(--you);       border: 1px solid var(--you); border-radius: 50%; }

/* ---------- Address checker ---------- */
.checker {
  max-width: var(--maxw);
  margin: 40px auto 0;
  padding: 0 16px;
}
.checker h2 {
  font-size: clamp(20px, 2vw, 24px);
  margin: 0 0 12px;
  letter-spacing: -0.01em;
}
.addr-row { display: flex; gap: 10px; }
.addr-row input {
  flex: 1;
  background: var(--panel);
  border: 1px solid var(--rule);
  color: var(--ink);
  padding: 12px 14px;
  font-size: 15px;
  border-radius: 8px;
  font-family: inherit;
}
.addr-row input::placeholder { color: var(--ink-dimmer); }
.addr-row input:focus {
  outline: none;
  border-color: var(--accent);
  background: var(--panel-2);
}
.addr-row button {
  background: var(--accent);
  color: #1a1a1a;
  border: 0;
  padding: 12px 22px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  border-radius: 8px;
  font-family: inherit;
}
.addr-row button:hover { filter: brightness(1.08); }
.suggest {
  list-style: none;
  padding: 4px 0;
  margin: 4px 0 0;
  background: var(--panel);
  border: 1px solid var(--rule);
  border-radius: 8px;
  max-height: 220px;
  overflow-y: auto;
}
.suggest li {
  padding: 8px 14px;
  cursor: pointer;
  font-size: 14px;
  color: var(--ink);
}
.suggest li:hover, .suggest li.active { background: var(--panel-2); }
.result {
  margin-top: 18px;
  padding: 16px 18px;
  background: var(--bg);
  border-radius: 10px;
  border-left: 4px solid var(--accent);
}
.result .big {
  font-size: 32px;
  font-weight: 800;
  color: var(--warn);
  letter-spacing: -0.02em;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
.result .little {
  font-size: 13px;
  color: var(--ink-dim);
  margin-top: 8px;
  line-height: 1.5;
}
.result b { color: var(--ink); }
.result .muted { color: var(--ink-dimmer); font-size: 0.75em; }

.cmp-row {
  display: grid;
  /* Usually 3 cells; a 4th appears when the slider sits on a non-headline setback. */
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 8px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--rule);
}
.cmp-cell {
  text-align: center;
  padding: 10px 6px;
  background: var(--panel);
  border: 1px solid var(--rule);
  border-radius: 8px;
}
.cmp-cell.active {
  border-color: var(--accent);
  background: var(--panel-2);
}
.cmp-cell .cmp-lbl {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--ink-dimmer);
  margin-bottom: 4px;
}
.cmp-cell.active .cmp-lbl { color: var(--accent); }
.cmp-cell .cmp-val {
  font-size: 17px;
  font-weight: 700;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.cmp-cell .muted { color: var(--ink-dimmer); font-weight: 500; }

/* ---------- Case section ---------- */
.case {
  max-width: var(--maxw);
  margin: 80px auto 0;
  padding: 40px 16px;
}
.case h2 {
  font-size: clamp(22px, 2.6vw, 32px);
  margin: 12px 0 20px;
  letter-spacing: -0.02em;
  line-height: 1.2;
}
.case .lede {
  font-size: 16px;
  color: var(--ink-dim);
  max-width: 780px;
  line-height: 1.6;
}
.case .lede strong { color: var(--ink); font-weight: 700; }
.case-table {
  width: 100%;
  border-collapse: collapse;
  margin: 28px 0 10px;
  font-size: 15px;
  font-variant-numeric: tabular-nums;
}
.case-table thead th {
  padding: 12px 14px;
  text-align: right;
  color: var(--ink-dim);
  font-weight: 600;
  border-bottom: 1px solid var(--rule);
  background: var(--panel);
}
.case-table thead th:first-child { text-align: left; }
.case-table thead th strong { color: var(--ink); font-weight: 800; }
.case-table td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--rule);
  text-align: right;
  color: var(--ink);
}
.case-table td:first-child { text-align: left; color: var(--ink-dim); }
.case-table tbody td.zero { color: #22c55e; font-weight: 700; }  /* zero homes exposed = good news */
.case-foot {
  font-size: 12.5px;
  color: var(--ink-dimmer);
  margin: 4px 0 12px;
  line-height: 1.5;
}
/* ---------- Caveats / disclaimer footer ---------- */
.caveats {
  max-width: 780px;
  margin: 80px auto;
  padding: 0 16px;
  font-size: 13px;
  color: var(--ink-dim);
}
.caveats h3 {
  color: var(--ink);
  font-size: 15px;
  font-weight: 700;
  margin: 24px 0 8px;
}
.caveats p { margin: 8px 0; line-height: 1.65; }
.caveats em {
  color: var(--ink);
  font-style: normal;
  font-weight: 600;
}
.caveats .footnote, .caveats .credit {
  font-size: 12px;
  color: var(--ink-dimmer);
  margin-top: 20px;
}

/* ---------- Leaflet overrides (minor) ---------- */
/* Darken the (light) OSM raster basemap so overlays keep their contrast.
   Invert + hue-rotate preserves road/label legibility while landing close
   to the old dark-carto look. */
.map-tiles-dark {
  filter: invert(1) hue-rotate(180deg) brightness(0.68) contrast(1.05) saturate(0.25);
}

.leaflet-popup-content-wrapper {
  background: var(--panel);
  color: var(--ink);
  border: 1px solid var(--rule);
  border-radius: 8px;
}
.leaflet-popup-tip { background: var(--panel); }
.leaflet-popup-content { font-size: 13px; line-height: 1.55; }
.leaflet-popup-content b { color: var(--accent); }
.leaflet-control-zoom a {
  background: var(--panel);
  color: var(--ink);
  border: 1px solid var(--rule);
}
.leaflet-control-zoom a:hover { background: var(--panel-2); }
.leaflet-control-attribution {
  background: rgba(11,13,18,0.85);
  color: var(--ink-dimmer);
  font-size: 11px;
}
.leaflet-control-attribution a { color: var(--ink-dim); border-bottom: 0; }

@media (max-width: 640px) {
  .hero { padding-top: 56px; }
  .case { padding: 32px 16px; }
  .case-table { font-size: 13px; }
  .case-table th, .case-table td { padding: 10px 10px; }
}

/* ========================================================================
   v20 — front-page restructure (section intros, city-check teaser,
   recommendation reasons, beta ribbon) + 27-parcels page panel.
   ======================================================================== */

/* ---- Beta ribbon ---- */
.beta-ribbon {
  background: #2b1d0d;
  color: #ffd9a1;
  border-bottom: 1px solid rgba(255, 184, 77, 0.4);
  text-align: center;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.03em;
  padding: 7px 12px;
}
.beta-ribbon a { color: var(--accent); }

/* ---- Section intros (map section) ---- */
.section-intro { margin: 0 0 20px; }
.section-intro h2 {
  font-size: clamp(22px, 2.6vw, 30px);
  margin: 0 0 8px;
  letter-spacing: -0.02em;
  line-height: 1.2;
}
.section-intro .section-sub {
  font-size: 14.5px;
  color: var(--ink-dim);
  margin: 0;
  max-width: 640px;
  line-height: 1.6;
}
.checker .kicker { margin-bottom: 8px; }

/* ---- City-numbers teaser ---- */
.citycheck {
  max-width: var(--maxw);
  margin: 88px auto 0;
  padding: 0 16px;
}
.citycheck h2 {
  font-size: clamp(22px, 2.6vw, 32px);
  margin: 12px 0 20px;
  letter-spacing: -0.02em;
  line-height: 1.25;
  max-width: 820px;
}
.citycheck .lede {
  font-size: 16px;
  color: var(--ink-dim);
  max-width: 780px;
  line-height: 1.65;
}
.citycheck .lede strong { color: var(--ink); font-weight: 700; }
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 24px 0 4px;
}
.chip {
  display: inline-flex;
  align-items: baseline;
  gap: 7px;
  background: var(--panel);
  border: 1px solid var(--rule);
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 13px;
  color: var(--ink-dim);
}
.chip b {
  font-size: 20px;
  font-weight: 800;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}
.chip.warn b { color: var(--warn); }
.chip.ok b { color: #22c55e; }

.cta-row { margin: 22px 0 0; }
.btn {
  display: inline-block;
  background: var(--accent);
  color: #1a1a1a;
  font-weight: 700;
  font-size: 14px;
  padding: 12px 22px;
  border-radius: 8px;
  border-bottom: 0;
}
.btn:hover { filter: brightness(1.08); border-bottom: 0; }
.btn.ghost {
  background: transparent;
  color: var(--accent);
  border: 1px solid rgba(255, 184, 77, 0.45);
}
.btn.ghost:hover { background: rgba(255, 184, 77, 0.08); filter: none; }

/* ---- Recommendation reasons (front page) ---- */
.reasons {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin: 32px 0;
  padding: 0;
}
.reasons .reason {
  background: var(--panel);
  border: 1px solid var(--rule);
  border-top: 3px solid #22c55e;
  border-radius: 10px;
  padding: 18px 20px;
}
.reasons dt {
  font-weight: 700;
  color: var(--ink);
  font-size: 15.5px;
  margin: 0 0 8px;
  letter-spacing: -0.01em;
}
.reasons dd {
  margin: 0;
  font-size: 13.5px;
  color: var(--ink-dim);
  line-height: 1.6;
}
.reasons dd span, .reasons dd b { color: var(--ink); font-weight: 700; }
.homes-heading {
  font-size: 19px;
  font-weight: 700;
  margin: 44px 0 10px;
  letter-spacing: -0.01em;
}

/* ---- 27-parcels page ---- */
.cg-body { overflow: hidden; }
.cg-wrap { display: flex; gap: 0; height: calc(100vh - 52px); }
#cg-map { flex: 1 1 auto; min-width: 0; }
.cg-panel {
  flex: 0 0 460px;
  overflow-y: auto;
  padding: 18px 22px 40px;
  background: #12151d;
  border-left: 1px solid var(--rule);
  font-size: 13.5px;
  line-height: 1.55;
  color: #c6cddb;
}
.cg-panel h1 { font-size: 19px; margin: 4px 0 10px; color: var(--ink); letter-spacing: -0.01em; }
.cg-panel h2 {
  font-size: 12.5px; margin: 24px 0 8px; color: var(--ink-dim);
  text-transform: uppercase; letter-spacing: 0.06em;
}
.cg-panel p { margin: 8px 0; }
.cg-note { color: #8891a5; font-size: 12.5px; }

.cg-summary {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 16px 0 4px;
}
.cg-sum-item {
  background: var(--panel);
  border: 1px solid var(--rule);
  border-radius: 8px;
  padding: 10px 12px;
}
.cg-sum-item b {
  display: block;
  font-size: 24px;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}
.cg-sum-item span {
  display: block;
  font-size: 11px;
  color: var(--ink-dim);
  margin-top: 3px;
  line-height: 1.4;
}
.cg-sum-item.warn b { color: var(--warn); }
.cg-sum-item.ok b { color: #22c55e; }

table.cg-bands {
  width: 100%; border-collapse: collapse; font-size: 12.5px;
  font-variant-numeric: tabular-nums;
}
table.cg-bands th, table.cg-bands td {
  padding: 4px 6px; text-align: right; border-bottom: 1px solid #232a39;
}
table.cg-bands th:first-child, table.cg-bands td:first-child { text-align: left; }

.cg-list { margin: 0; padding: 0; list-style: none; }
.cg-band-head {
  margin: 14px 0 2px; font-weight: 700; font-size: 12.5px;
  text-transform: uppercase; letter-spacing: 0.04em;
}
.cg-list li[data-gid] {
  padding: 9px 2px 10px;
  border-bottom: 1px solid #1c2230;
  cursor: pointer;
}
.cg-list li[data-gid]:hover { background: #171c28; }
.cg-parcel-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
}
.cg-addr { color: var(--ink); font-weight: 600; font-size: 13px; }
.cg-owner {
  color: #8891a5; font-size: 11px; text-align: right;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  max-width: 46%;
}
.cg-chip-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 5px; }
.cg-chip-txt {
  font-size: 10.5px;
  color: var(--ink-dim);
  background: var(--panel);
  border: 1px solid var(--rule);
  border-radius: 4px;
  padding: 1px 7px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.cg-chip-txt.ok { color: #22c55e; border-color: rgba(34,197,94,0.4); }
.cg-issue-line {
  margin-top: 6px;
  font-size: 11.5px;
  color: #aab2c2;
  line-height: 1.45;
  padding-left: 9px;
  border-left: 2px solid var(--rule);
}
.cgp-verdict { font-weight: 700; margin-top: 5px; }
.cgp-issue { margin-top: 4px; color: var(--ink-dim); }
.cgp-rec { margin-top: 4px; font-weight: 600; }
.mono-plain { font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, monospace; font-size: 11px; color: var(--ink-dim); }
.leaflet-popup-content { font: 12.5px/1.5 Inter, sans-serif; }

@media (max-width: 860px) {
  .cg-body { overflow: auto; }
  .cg-wrap { flex-direction: column; height: auto; }
  #cg-map { height: 55vh; min-height: 380px; }
  .cg-panel { flex: 1 1 auto; border-left: 0; border-top: 1px solid var(--rule); }
}

/* ========================================================================
   FURTHER ANALYSIS PAGE (further-analysis.html)
   Objective, table-and-chart forward. No decorative flourishes. Every
   section can stand alone as a slide.
   ======================================================================== */

/* ---- Top nav (shared with main site) ---- */
.topnav {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 20px 24px 0;
  display: flex;
  gap: 24px;
  align-items: center;
  font-size: 14px;
}
.topnav .brand { color: var(--ink); border-bottom: 0; font-weight: 700; letter-spacing: -0.02em; }
.topnav-link { color: var(--ink-dim); border-bottom: 0; padding: 4px 0; }
.topnav-link:hover { color: var(--ink); }
.topnav-link.active { color: var(--accent); }

/* ---- Hero ---- */
.brief-hero {
  max-width: 800px;
  margin: 0 auto;
  padding: 56px 24px 24px;
  text-align: left;
}
.brief-hero .kicker { margin-bottom: 12px; }
.brief-hero h1 {
  font-size: clamp(32px, 4.5vw, 48px);
  margin: 0 0 20px;
  letter-spacing: -0.02em;
  font-weight: 800;
  color: var(--ink);
  line-height: 1.15;
}
.brief-hero .lede {
  font-size: 17px;
  color: var(--ink-dim);
  max-width: 720px;
  margin: 0;
  line-height: 1.6;
}

/* ---- Layout ---- */
.brief {
  max-width: 900px;
  margin: 24px auto 60px;
  padding: 0 24px;
}
.brief-section {
  margin-bottom: 88px;
  scroll-margin-top: 24px;
}
.brief-section:last-child { margin-bottom: 40px; }

.section-head {
  display: flex;
  align-items: baseline;
  gap: 16px;
  margin: 0 0 20px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--rule);
}
.section-num {
  font-size: 34px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
  min-width: 32px;
}
.section-head h2 {
  font-size: 24px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.01em;
  margin: 0;
  line-height: 1.25;
}

.section-lede {
  font-size: 16px;
  color: var(--ink);
  margin: 0 0 24px;
  line-height: 1.65;
  max-width: 780px;
}
.section-lede strong { font-weight: 700; }

.section-note {
  font-size: 13.5px;
  color: var(--ink-dim);
  line-height: 1.6;
  margin: 20px 0 0;
  padding: 12px 16px;
  background: var(--panel);
  border-left: 3px solid var(--rule);
  border-radius: 0 6px 6px 0;
}

.mono { font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, monospace; font-size: 12.5px; color: var(--ink); background: var(--panel); padding: 2px 6px; border-radius: 3px; }

/* ---- 1. Ordinance blockquote ---- */
.ordinance {
  background: var(--panel);
  border-left: 4px solid var(--accent);
  padding: 22px 26px;
  margin: 0 0 22px;
  color: var(--ink);
  font-size: 16px;
  line-height: 1.75;
  border-radius: 0 6px 6px 0;
}
.ordinance strong { color: var(--accent); font-weight: 700; }
.ordinance cite {
  display: block;
  font-style: normal;
  color: var(--ink-dim);
  font-size: 12.5px;
  margin-top: 14px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

/* ---- Callout row (facts under ordinance) ---- */
.callout-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin: 0;
}
.callout {
  background: var(--panel);
  border: 1px solid var(--rule);
  border-radius: 8px;
  padding: 14px 18px;
}
.callout-label {
  font-size: 11px;
  color: var(--ink-dimmer);
  text-transform: uppercase;
  letter-spacing: 1.2px;
  font-weight: 600;
  margin-bottom: 6px;
}
.callout-value {
  font-size: 15px;
  color: var(--ink);
  font-weight: 600;
  line-height: 1.4;
}

/* ---- Data tables ---- */
.data-table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 16px;
  font-size: 14.5px;
  font-variant-numeric: tabular-nums;
  background: var(--panel);
  border: 1px solid var(--rule);
  border-radius: 8px;
  overflow: hidden;
}
.data-table thead th {
  padding: 12px 16px;
  text-align: left;
  color: var(--ink-dim);
  font-weight: 600;
  background: var(--panel-2);
  border-bottom: 1px solid var(--rule);
  font-size: 12.5px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
}
.data-table td {
  padding: 10px 16px;
  border-bottom: 1px solid var(--rule);
  color: var(--ink);
}
.data-table tr:last-child td { border-bottom: 0; }
.data-table .num-col { text-align: right; }
.data-table th.num-col { text-align: right; }

/* ---- Chart wrap ---- */
.chart-wrap {
  background: var(--panel);
  border: 1px solid var(--rule);
  border-radius: 10px;
  padding: 24px 20px 20px;
  margin: 0;
}
.chart {
  width: 100%;
  height: auto;
  display: block;
}
.chart-cap {
  font-size: 12.5px;
  color: var(--ink-dim);
  margin: 16px 0 0;
  line-height: 1.6;
}

/* ---- 4. Method grid ---- */
.method-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 14px;
}
.method-card {
  background: var(--panel);
  border: 1px solid var(--rule);
  border-radius: 10px;
  padding: 18px 20px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.method-card[data-color="city"]      { border-top: 3px solid #3b82f6; }
.method-card[data-color="recon"]     { border-top: 3px solid #60a5fa; }
.method-card[data-color="strict"]    { border-top: 3px solid #ef4444; }
.method-card[data-color="buildable"] { border-top: 3px solid #fbbf24; }
.method-card[data-color="p2b"]       { border-top: 3px solid #22c55e; }
.method-head {
  display: flex;
  align-items: baseline;
  gap: 10px;
}
.method-tag {
  font-size: 11px;
  font-weight: 700;
  color: var(--ink-dimmer);
  letter-spacing: 1px;
  font-variant-numeric: tabular-nums;
  padding: 2px 8px;
  background: var(--panel-2);
  border-radius: 4px;
}
.method-card h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
  margin: 0;
  letter-spacing: -0.01em;
  line-height: 1.3;
}
.method-numbers {
  display: flex;
  gap: 24px;
  padding: 10px 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}
.method-numbers > div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.method-numbers .num {
  font-size: 28px;
  font-weight: 800;
  color: var(--ink);
  line-height: 1;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.method-card[data-color="city"] .method-numbers .num      { color: #3b82f6; }
.method-card[data-color="recon"] .method-numbers .num     { color: #60a5fa; }
.method-card[data-color="strict"] .method-numbers .num    { color: #ef4444; }
.method-card[data-color="buildable"] .method-numbers .num { color: #fbbf24; }
.method-card[data-color="p2b"] .method-numbers .num       { color: #22c55e; }
.method-numbers .lbl {
  font-size: 11px;
  color: var(--ink-dimmer);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  font-weight: 600;
}
.method-card p {
  font-size: 13.5px;
  line-height: 1.6;
  margin: 0;
  color: var(--ink);
}

/* ---- 5. Split comparison ---- */
.split-comparison {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin: 0;
}
.split-side {
  background: var(--panel);
  border: 1px solid var(--rule);
  border-radius: 10px;
  padding: 18px 20px;
}
.split-side.split-p2p { border-top: 3px solid #ef4444; }
.split-side.split-p2b { border-top: 3px solid #22c55e; }
.split-tag {
  font-size: 11px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: 1.2px;
  text-transform: uppercase;
  margin-bottom: 12px;
  display: inline-block;
  padding: 3px 10px;
  border-radius: 3px;
  background: var(--panel-2);
}
.split-p2p .split-tag { background: rgba(239,68,68,0.15); color: #ef4444; }
.split-p2b .split-tag { background: rgba(34,197,94,0.15); color: #22c55e; }
.mini-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
  margin: 0 0 12px;
}
.mini-table thead th {
  padding: 8px 8px;
  text-align: left;
  font-weight: 600;
  color: var(--ink-dim);
  border-bottom: 1px solid var(--rule);
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
}
.mini-table thead th:not(:first-child) { text-align: right; }
.mini-table td {
  padding: 8px 8px;
  border-bottom: 1px solid var(--rule);
  color: var(--ink);
  text-align: right;
}
.mini-table td:first-child { text-align: left; color: var(--ink-dim); }
.mini-table tr:last-child td { border-bottom: 0; }
.mini-table .delta-col { color: var(--accent); font-weight: 600; }
.split-p2p .mini-table .delta-col { color: #ef4444; font-weight: 700; }
.split-p2b .mini-table .delta-col { color: var(--ink-dim); }
.split-note {
  font-size: 12.5px;
  color: var(--ink-dim);
  line-height: 1.55;
  margin: 0;
  padding-top: 10px;
  border-top: 1px solid var(--rule);
}

/* ---- 6. Recommendation ---- */
.brief-rec {
  background: rgba(34,197,94,0.03);
  border: 1px solid rgba(34,197,94,0.25);
  border-radius: 12px;
  padding: 32px 32px 28px;
  margin-bottom: 60px;
}
.brief-rec .section-head { border-bottom-color: rgba(34,197,94,0.25); }
.brief-rec .section-num { color: #22c55e; }

.rec-table-wrap {
  overflow-x: auto;
  margin: 0 0 32px;
}
.comparison-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
  background: var(--bg);
  border: 1px solid var(--rule);
  border-radius: 8px;
  overflow: hidden;
  min-width: 620px;
}
.comparison-table thead th {
  padding: 14px 14px 12px;
  text-align: right;
  color: var(--ink);
  font-weight: 700;
  background: var(--panel);
  border-bottom: 1px solid var(--rule);
  font-size: 13px;
  vertical-align: bottom;
  line-height: 1.35;
}
.comparison-table thead th:first-child { text-align: left; }
.comparison-table thead th.rec-col {
  background: rgba(34,197,94,0.12);
  color: #22c55e;
}
.comparison-table .rec-col-sub {
  display: block;
  font-size: 11px;
  font-weight: 500;
  color: var(--ink-dim);
  margin-top: 3px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
}
.comparison-table thead th.rec-col .rec-col-sub { color: #22c55e; opacity: 0.85; }
.comparison-table tbody th {
  text-align: left;
  padding: 12px 14px;
  color: var(--ink);
  font-weight: 500;
  border-bottom: 1px solid var(--rule);
  background: var(--bg);
  font-size: 13.5px;
}
.comparison-table tbody td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--rule);
  color: var(--ink);
  font-size: 13.5px;
  text-align: right;
}
.comparison-table tbody td.rec-col {
  background: rgba(34,197,94,0.06);
  color: var(--ink);
  font-weight: 600;
}
.comparison-table tbody td.num-col { font-weight: 600; }
.comparison-table tbody tr:last-child th,
.comparison-table tbody tr:last-child td { border-bottom: 0; }

.reason-heading {
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
  margin: 0 0 14px;
  letter-spacing: -0.01em;
}

.reason-list {
  margin: 0;
  padding: 0;
}
.reason-list dt {
  font-weight: 700;
  color: var(--ink);
  margin: 14px 0 4px;
  font-size: 15px;
  line-height: 1.4;
}
.reason-list dt:first-of-type { margin-top: 0; }
.reason-list dd {
  margin: 0 0 0 18px;
  font-size: 14px;
  color: var(--ink);
  line-height: 1.65;
  padding-left: 12px;
  border-left: 2px solid rgba(34,197,94,0.3);
}

.brief-rec .section-note {
  border-left-color: rgba(34,197,94,0.4);
  margin-top: 28px;
}

/* ---- 7. Data list (methodology footer) ---- */
.brief-fine {
  font-size: 13.5px;
}
.brief-fine .section-head { padding-bottom: 12px; }
.brief-fine .section-head h2 {
  font-size: 18px;
}
.data-list {
  margin: 0;
  padding: 0;
}
.data-list dt {
  color: var(--ink);
  font-weight: 700;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin: 20px 0 6px;
}
.data-list dt:first-of-type { margin-top: 0; }
.data-list dd {
  margin: 0;
  color: var(--ink-dim);
  font-size: 13.5px;
  line-height: 1.65;
}

/* ---- Responsive ---- */
@media (max-width: 720px) {
  .split-comparison { grid-template-columns: 1fr; }
  .reasons { grid-template-columns: 1fr; }
  .method-grid { grid-template-columns: 1fr; }
  .callout-grid { grid-template-columns: 1fr; }
  .brief-rec { padding: 24px 20px; }
}
@media (max-width: 560px) {
  .topnav { flex-wrap: wrap; padding: 16px 16px 0; gap: 16px; }
  .brief-hero { padding: 40px 20px 20px; }
  .brief { padding: 0 20px; margin-bottom: 40px; }
  .brief-section { margin-bottom: 56px; }
  .section-head { gap: 12px; }
  .section-num { font-size: 28px; }
  .section-head h2 { font-size: 20px; }
  .ordinance { padding: 18px 20px; font-size: 15px; }
  .comparison-table { font-size: 12.5px; min-width: 480px; }
}
