/*
 * Property Detail page — editorial-luxury rebuild (2026-05-06)
 * Source-of-truth design: H:\My Drive\_1 Claude\Mockups\property-modal-redesign-2026-05-05.html
 * Original (legacy) styles: frontend/_old-files/property-original-2026-05-06/property.css
 *
 * All tokens come from design-system.css (--ink #00102E navy, --bg #fafaf7 cream,
 * --line warm hairline, --font-serif Fraunces, --font-sans Inter).
 */

/* ============================================
   LAYOUT — modal + side action columns
   ============================================ */
body.property-body {
  background: var(--bg);
  margin: 0;
}

.page-loading {
  position: fixed; inset: 0;
  display: flex; align-items: center; justify-content: center;
  flex-direction: column;
  gap: 12px;
  background: var(--bg);
  color: var(--muted);
  font-size: 13px;
  z-index: 1000;
}
.page-loading.hidden { display: none; }

.hidden { display: none !important; }

/* When loaded in an iframe (from search.html), the search-page modal-pane
   already provides rounded corners + shadow. The prop-modal just fills it. */
.prop-wrap {
  max-width: 100%;
  margin: 0;
  padding: 0;
  min-height: 100vh;
}

.prop-modal {
  background: var(--surface, #fff);
  display: grid;
  grid-template-rows: 56px 1fr;
  overflow: hidden;
  height: 100vh;
}

/* RIGHT VERTICAL ACTION COLUMN (love/like/maybe/dislike) */
.actionCol {
  flex: 0 0 76px;
  display: flex; flex-direction: column; justify-content: center;
  gap: 10px;
}
.pill {
  width: 76px; height: 76px;
  border-radius: 6px;
  background: var(--surface, #fff);
  border: 1px solid var(--line);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 5px;
  font-family: var(--font-sans);
  font-weight: 700; font-size: 10px; letter-spacing: .12em;
  color: var(--ink); text-transform: uppercase;
  cursor: pointer;
  transition: transform .15s, border-color .15s, box-shadow .15s;
}
.pill:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(0,16,46,.08); }
.pill.active { border-color: var(--ink); }
.pill .ic { width: 22px; height: 22px; }
.pill.love .ic { color: #2e7d4f; }
.pill.like .ic { color: #2454b3; }
.pill.maybe .ic { color: #b07b1a; }
.pill.dislike .ic { color: #a83232; }
.pill.love:hover { border-color: #2e7d4f; }
.pill.like:hover { border-color: #2454b3; }
.pill.maybe:hover { border-color: #b07b1a; }
.pill.dislike:hover { border-color: #a83232; }

/* PREV / NEXT NAV COLUMNS */
.navCol {
  display: flex; flex-direction: column; justify-content: center;
  gap: 10px;
}
.navPill {
  width: 76px; height: 76px;
  border-radius: 6px;
  background: var(--surface, #fff);
  border: 1px solid var(--line);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 6px;
  font-family: var(--font-sans);
  font-weight: 700; font-size: 10px; letter-spacing: .12em;
  color: var(--ink); text-transform: uppercase;
  cursor: pointer;
  transition: transform .15s, border-color .15s, box-shadow .15s;
}
.navPill:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(0,16,46,.08);
  border-color: var(--ink);
}
.navPill .ic { width: 22px; height: 22px; color: var(--ink); }

/* ============================================
   TOP BAR
   ============================================ */
.prop-tophead {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 18px;
  border-bottom: 1px solid var(--line);
  background: var(--surface, #fff);
}
.prop-back {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 12px; border-radius: 999px;
  background: var(--bg);
  font-weight: 500;
  border: 0;
  cursor: pointer;
  font-size: 13px;
  color: var(--ink);
}
.prop-back:hover { background: var(--bg-soft); }
.prop-thumb {
  width: 44px; height: 44px;
  border-radius: 8px;
  background: var(--bg-soft-2);
  background-size: cover; background-position: center;
  flex: none;
}
.prop-titleblock { display: flex; flex-direction: column; line-height: 1.2; min-width: 200px; }
.price-mini { font-size: 18px; font-weight: 800; color: var(--ink); font-family: var(--font-serif); }
.addr-mini { font-size: 13px; color: var(--muted); }
.grow { flex: 1; }

.prop-stats-strip {
  display: flex; gap: 0; align-items: center;
}
.ss-stat {
  display: flex; flex-direction: column;
  padding: 0 14px;
  text-align: center;
  border-right: 1px solid var(--line);
}
.ss-stat:last-child { border-right: 0; }
.ss-l {
  font-size: 9px; font-weight: 600;
  letter-spacing: .14em; text-transform: uppercase;
  color: var(--muted);
}
.ss-v {
  font-size: 14px; font-weight: 700;
  color: var(--ink);
  font-family: var(--font-serif);
  margin-top: 2px;
}
.ss-shape { color: #2e7d4f; }

.iconbtn {
  width: 36px; height: 36px; border-radius: 999px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--bg-soft);
  cursor: pointer;
  border: 0;
  color: var(--ink);
}
.iconbtn:hover { background: var(--bg-soft-2); }
.iconbtn.settings-btn { background: var(--ink); color: #fff; }
.iconbtn.settings-btn:hover { background: var(--ink-2); }

/* ============================================
   TABS
   ============================================ */
.prop-tabs {
  display: flex; gap: 0;
  border-bottom: 1px solid var(--line);
  padding: 0 22px;
  background: var(--surface, #fff);
  overflow-x: auto;
  align-items: center;
}
.prop-tabs .tab {
  padding: 16px 18px;
  font-weight: 500; font-size: 13px;
  color: var(--muted);
  border-bottom: 2px solid transparent;
  white-space: nowrap;
  display: inline-flex; align-items: center; gap: 8px;
  margin-bottom: -1px;
  letter-spacing: .01em;
  transition: color .12s;
  cursor: pointer;
  text-decoration: none;
}
.prop-tabs .tab:hover { color: var(--ink); }
.prop-tabs .tab.active { color: var(--ink); border-color: var(--ink); font-weight: 600; }
.prop-tabs .reportBtn {
  margin-left: auto;
  margin-right: 12px;
  align-self: center;
  padding: 8px 14px;
  background: var(--ink); color: #fff;
  font-family: var(--font-sans);
  font-size: 12px; font-weight: 500;
  letter-spacing: .03em;
  border-radius: 4px;
  display: inline-flex; align-items: center; gap: 7px;
  transition: background .12s;
  cursor: pointer;
  border: 0;
}
.prop-tabs .reportBtn:hover { background: var(--ink-2); }
.prop-tabs .reportBtn .ic { width: 13px; height: 13px; }

.prop-tabs .tabCloseBtn {
  align-self: center;
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--bg-soft);
  color: var(--ink);
  border: 0;
  cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  transition: background .12s;
  margin-right: 4px;
}
.prop-tabs .tabCloseBtn:hover { background: var(--bg-soft-2); }

/* ============================================
   BODY + content column
   ============================================ */
.prop-body {
  overflow-y: auto;
  padding: 0;
  scroll-behavior: smooth;
}
.col {
  max-width: 980px;
  margin: 0 auto;
  padding: 0 28px 80px;
}

/* ============================================
   GALLERY (5-up)
   ============================================ */
.gallery {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 3px;
  height: 500px;
  background: var(--ink);
}
.gallery .ph {
  position: relative;
  background-size: cover; background-position: center;
  background-color: var(--bg-soft-2);
}
.gallery .ph.ph-hero { grid-row: 1/3; }
.gallery .ph .viewall {
  position: absolute; bottom: 16px; right: 16px;
  background: rgba(255,255,255,.95); color: var(--ink);
  padding: 9px 16px; border-radius: 4px;
  font-size: 12px; font-weight: 600;
  letter-spacing: .06em; text-transform: uppercase;
  display: inline-flex; align-items: center; gap: 8px;
  box-shadow: 0 2px 12px rgba(0,0,0,.15);
  transition: background .12s;
  border: 0;
  cursor: pointer;
}
.gallery .ph .viewall:hover { background: #fff; }

/* ============================================
   BRANDED PHOTO PLACEHOLDER (stopgap 2026-06-04)
   Shown when a listing has no displayable photo (backfill still draining or
   a fallback image failed to load). On-brand, subtle — never a blank grid.
   ============================================ */
.ph-placeholder {
  display: flex !important;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background-color: #ece4d7 !important;
  background-image: linear-gradient(135deg, #f3eee6 0%, #e7dccb 100%) !important;
  color: #00102E;
  text-align: center;
  padding: 16px;
}
.ph-placeholder svg { width: 40px; height: 40px; opacity: 0.55; }
.ph-placeholder .ph-ph-label {
  font-size: 11px; font-weight: 700; letter-spacing: 0.08em;
  text-transform: uppercase; color: #6b5e4b; opacity: 0.85;
}
.gallery .ph.ph-hero.ph-placeholder svg { width: 64px; height: 64px; }

/* ============================================
   HERO BLOCK
   ============================================ */
.hero {
  padding: 32px 0 28px;
  border-bottom: 1px solid var(--line);
}
.hero .eyebrow {
  font-size: 11px; font-weight: 600;
  letter-spacing: .14em; text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 10px;
}
.hero .eyebrow .dotsep { margin: 0 8px; color: var(--line); }
.hero .eyebrow .status-dot {
  display: inline-block; width: 6px; height: 6px; border-radius: 50%;
  background: #2e7d4f; margin-right: 6px; vertical-align: middle;
}
.hero .price {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 48px;
  line-height: 1.05;
  letter-spacing: -.015em;
  color: var(--ink);
  margin: 0 0 8px;
}
.hero .price .price-ppsf {
  font-size: 18px;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: 0;
  vertical-align: middle;
  font-family: var(--font-sans, sans-serif);
}
.hero .addr {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  font-size: 22px;
  color: var(--ink);
  line-height: 1.3;
}
.hero .addr .city {
  color: var(--muted);
  font-style: normal;
  font-family: var(--font-sans);
  font-size: 13px;
  letter-spacing: .04em;
  margin-left: 12px;
  text-transform: uppercase;
}

/* ============================================
   ACTION BAR
   ============================================ */
.actionbar {
  display: flex; gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
}
.actionbar .btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 10px 14px;
  border-radius: 4px;
  font-weight: 500; font-size: 13px;
  border: 1px solid var(--line);
  background: var(--surface, #fff);
  color: var(--ink);
  transition: background .12s, border-color .12s;
  cursor: pointer;
  font-family: var(--font-sans);
}
.actionbar .btn:hover { background: var(--bg-soft); border-color: var(--muted); }
.actionbar .btn.primary { background: var(--ink); border-color: var(--ink); color: #fff; }
.actionbar .btn.primary:hover { background: var(--ink-2); border-color: var(--ink-2); color: #fff; }
.actionbar .btn .ic { width: 14px; height: 14px; }
.actionbar .btn.is-saved {
  color: var(--accent-terra, #c45a3a);
  border-color: var(--accent-terra, #c45a3a);
  background: color-mix(in srgb, var(--accent-terra, #c45a3a) 10%, var(--surface, #fff));
  font-weight: 600;
}
/* Fill the bookmark glyph so "saved" reads at a glance, not just from color. */
.actionbar .btn.is-saved .ic path { fill: currentColor; }

/* ============================================
   SECTIONS
   ============================================ */
.row { padding: 22px 0; border-bottom: 1px solid var(--line); }
.label {
  font-size: 11px; font-weight: 700;
  letter-spacing: .14em; text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 14px;
}
.label .meta {
  font-weight: 500; letter-spacing: .04em; text-transform: none;
  color: var(--muted); margin-left: 10px;
  font-size: 11px; font-style: italic;
}

/* MAIN STATS — 4 bordered tiles centered */
.mainStats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}
.mainStat {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 16px 12px;
  text-align: center;
  background: var(--surface, #fff);
}
.mainStat .v {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: 26px;
  color: var(--ink);
  line-height: 1.05;
  margin-bottom: 4px;
}
.mainStat .l {
  font-size: 11px; font-weight: 600;
  letter-spacing: .12em; text-transform: uppercase;
  color: var(--muted);
}

/* ESTIMATED VALUE — AVM v2 Low/Average/Good */
.estValue .label {
  display: flex; align-items: center; gap: 10px;
  font-size: 11px; font-weight: 600;
  letter-spacing: .12em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 12px;
}
.estConfPill {
  display: inline-block; padding: 3px 8px; border-radius: 999px;
  font-size: 10px; font-weight: 700; letter-spacing: .04em;
  text-transform: uppercase;
}
.estConfPill.pill-high        { background: #d1fae5; color: #065f46; }
.estConfPill.pill-medium      { background: #dbeafe; color: #1e40af; }
.estConfPill.pill-directional { background: #fef3c7; color: #92400e; }
.estConfPill.pill-insufficient{ background: #fee2e2; color: #991b1b; }
/* Estimated-value LINE GRAPH — Variant D Final (2026-05-18).
   Top: 3 NEUTRAL comp pills (LOW/AVG/HIGH) at fixed 20/50/80. Rail with 4
   dots (LIST + LOW/AVG/HIGH). BLUE accent on LIST (subject). Vertical
   connector line from rail center straight down to LIST pill top. Dashed
   rail extension when LIST falls below LOW (20%) or above HIGH (80%).
   Two "If sold at" delta cards below: target price + subject-relative %. */
.estLine {
  --estline-blue: #2563EB;
  --estline-blue-deep: #1E40AF;
  --estline-blue-soft: #DBEAFE;
  --estline-edge: #94A3B8;
  --estline-edge-ink: #475569;
  position: relative;
  padding: 6px 60px 0;
  margin-bottom: 14px;
  overflow: visible;
}
.estLine__topPills {
  position: relative;
  height: 50px;
}
.estLine__marker {
  position: absolute;
  top: 0;
  transform: translateX(-50%);
  display: flex; flex-direction: column;
  align-items: center;
  white-space: nowrap;
}
.estLine__pill {
  display: flex; flex-direction: column;
  align-items: center;
  padding: 5px 12px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: 0 1px 2px rgba(0,16,46,.04);
  line-height: 1.15;
}
.estLine__pill--list {
  border-color: var(--estline-blue);
  background: linear-gradient(180deg, var(--estline-blue-soft) 0%, #fff 90%);
  box-shadow: 0 2px 10px rgba(37,99,235,.18);
  padding: 7px 14px;
}
.estLine__price {
  font-family: var(--font-serif);
  font-size: 16px;
  font-weight: 500;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.estLine__pill--list .estLine__price {
  font-size: 19px;
  color: var(--estline-blue-deep);
}
.estLine__ppsf {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .04em;
  color: var(--muted);
  margin-top: 1px;
}
.estLine__pill--list .estLine__ppsf {
  color: var(--estline-blue-deep); opacity: .82;
}

/* Rail track — overflow visible so the LIST connector can extend below */
.estLine__track {
  position: relative;
  height: 14px;
  margin: -10px 0 2px;
  overflow: visible;
}
.estLine__line {
  position: absolute;
  left: 20%; right: 20%; top: 50%;
  height: 2px;
  background: linear-gradient(90deg, var(--estline-edge) 0%, var(--estline-edge) 100%);
  transform: translateY(-50%);
  border-radius: 2px;
  opacity: .55;
}
.estLine__lineExt {
  position: absolute;
  top: 50%;
  height: 1.5px;
  border-top: 1.5px dashed var(--ink-3, #2c3a5e);
  opacity: .45;
  transform: translateY(-50%);
}
.estLine__dot {
  position: absolute;
  top: 50%;
  width: 10px; height: 10px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--estline-edge);
  transform: translate(-50%, -50%);
  z-index: 3;
}
.estLine__dot.is-list {
  width: 13px; height: 13px;
  border-color: var(--estline-blue);
  background: var(--estline-blue);
  box-shadow: 0 0 0 3px rgba(37,99,235,.18);
}
/* LIST connector — vertical line from rail center down to LIST pill */
.estLine__listConn {
  position: absolute;
  top: 50%;
  width: 1.5px;
  height: 30px;
  background: var(--estline-blue);
  opacity: .55;
  transform: translateX(-50%);
  z-index: 1;
}

/* Single-line labels under the rail — tightened */
.estLine__labels {
  position: relative;
  height: 16px;
  margin-top: 2px;
}
.estLine__lbl {
  position: absolute;
  top: 0;
  transform: translateX(-50%);
  font-size: 10px; font-weight: 700;
  letter-spacing: .14em; text-transform: uppercase;
  color: var(--estline-edge-ink);
  white-space: nowrap;
  background: #fff;
  padding: 0 4px;
  z-index: 2;
}

/* LIST pill row below the rail — proportional+clamped x, blue accent */
.estLine__listRow {
  position: relative;
  height: 70px;
  margin-top: 0;
}
.estLine__listMarker {
  position: absolute;
  top: 0;
  transform: translateX(-50%);
  display: flex; flex-direction: column;
  align-items: center;
  white-space: nowrap;
}
.estLine__listTag {
  font-size: 9px; font-weight: 700;
  letter-spacing: .16em; text-transform: uppercase;
  color: var(--estline-blue-deep);
  padding: 2px 8px;
  background: var(--estline-blue-soft);
  border-radius: 4px;
  margin-top: 4px;
}

/* "If sold at" delta cards — target price as headline, % as subtitle */
.estLine__deltas {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  max-width: 620px;
}
.estLine__deltaCard {
  padding: 14px 18px;
  border-radius: 12px;
  background: linear-gradient(180deg, #ECFDF5 0%, #fff 90%);
  border: 1px solid #BBF7D0;
}
.estLine__deltaCard.is-overpriced {
  background: linear-gradient(180deg, #FEF2F2 0%, #fff 90%);
  border-color: #FECACA;
}
.estLine__deltaLead {
  font-size: 10px; font-weight: 700;
  letter-spacing: .14em; text-transform: uppercase;
  color: var(--muted);
}
.estLine__deltaPrice {
  font-family: var(--font-serif);
  font-size: 22px; font-weight: 500;
  color: var(--ink);
  margin-top: 4px; line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
.estLine__deltaPct {
  font-size: 13px; font-weight: 700;
  color: var(--green-good, #15803D);
  margin-top: 6px;
  letter-spacing: .02em;
}
.estLine__deltaCard.is-overpriced .estLine__deltaPct { color: #B91C1C; }
.estLine__deltaPct .amt { font-weight: 500; opacity: .85; }

/* Loading / empty state — keep the structure but mute it. */
.estLine[data-state="loading"] .estLine__pill,
.estLine[data-state="empty"] .estLine__pill {
  border-style: dashed;
  background: var(--bg-soft, #FAFAF9);
}
.estLine[data-state="empty"] .estLine__dot { opacity: .4; }
.estLine[data-state="empty"] .estLine__line { opacity: .25; }

.estMeta {
  font-size: 11px; color: var(--muted); margin-top: 12px;
  letter-spacing: .01em;
}

/* Tight screens — collapse vertically */
@media (max-width: 640px) {
  .estLine { padding: 6px 16px 0; }
  .estLine__topPills {
    height: auto;
    display: flex; flex-direction: column; gap: 8px;
  }
  .estLine__marker {
    position: static;
    transform: none !important;
    flex-direction: row; gap: 10px;
    justify-content: space-between; width: 100%;
  }
  .estLine__pill {
    flex-direction: row; gap: 8px; align-items: baseline;
  }
  .estLine__track { display: none; }
  .estLine__labels { display: none; }
  .estLine__listRow {
    height: auto;
    display: block;
    margin-top: 10px;
  }
  .estLine__listMarker {
    position: static;
    transform: none !important;
    flex-direction: row; gap: 10px;
    justify-content: space-between; width: 100%;
  }
  .estLine__deltas {
    grid-template-columns: 1fr;
    gap: 8px;
    max-width: none;
  }
}

/* HIGHLIGHTS */
.highlights .grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px 22px;
}
.hlitem {
  display: flex; align-items: center; gap: 10px;
  font-weight: 400; font-size: 13px;
  color: var(--ink);
}
.hlitem .check { width: 14px; height: 14px; flex: none; color: var(--accent-terra, #c45a3a); }
.hl-empty {
  font-size: 12px; color: var(--muted); font-style: italic;
  grid-column: 1 / -1;
}

/* TOP DETAILS — up to 8 customizable tiles, JS-rendered */
.topDetails .label .meta {
  font-weight: 500; letter-spacing: .04em; text-transform: none;
  color: var(--muted); margin-left: 10px;
  font-size: 11px; font-style: italic;
}
.topDetails .tiles {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}
@media (min-width: 1100px) {
  .topDetails .tiles { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
}
.topTile {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 16px 12px;
  text-align: center;
  background: var(--surface, #fff);
  transition: background .12s, border-color .12s;
}
.topTile:hover { background: var(--bg-soft); border-color: var(--muted); }
.topTile .v {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: 22px;
  color: var(--ink);
  line-height: 1.1;
  margin-bottom: 4px;
  word-break: break-word;
}
.topTile .l {
  font-size: 10px; font-weight: 600;
  letter-spacing: .12em; text-transform: uppercase;
  color: var(--muted);
}
.topTile .x {
  position: absolute; right: 4px; top: 4px;
  width: 18px; height: 18px; border-radius: 50%;
  color: var(--muted);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none;
  transition: opacity .12s, background .12s, color .12s;
  font-size: 11px; line-height: 1;
  background: transparent;
  border: 0; cursor: pointer;
}
.topTile:hover .x { opacity: 1; pointer-events: auto; }
.topTile .x:hover { color: var(--accent-terra, #c45a3a); background: var(--bg-soft); }
.topTile.add {
  background: transparent;
  border: 1px dashed var(--line);
  display: flex; align-items: center; justify-content: center;
  color: var(--muted);
  font-weight: 500; font-size: 12px;
  letter-spacing: .04em; text-transform: uppercase;
  cursor: pointer;
  min-height: 80px;
}
.topTile.add:hover { border-color: var(--ink); color: var(--ink); }

/* TOP-DETAIL PICKER MODAL */
.tdPicker {
  position: fixed; inset: 0;
  display: none;
  align-items: center; justify-content: center;
  z-index: 9000;
}
.tdPicker.is-open { display: flex; }
.tdPicker-backdrop {
  position: absolute; inset: 0;
  background: rgba(20, 22, 24, .55);
  cursor: pointer;
}
.tdPicker-panel {
  position: relative;
  width: min(560px, calc(100vw - 32px));
  max-height: 80vh;
  background: var(--surface, #fff);
  border-radius: 10px;
  border: 1px solid var(--line);
  box-shadow: 0 24px 64px rgba(0,0,0,.25);
  display: flex; flex-direction: column;
  overflow: hidden;
}
.tdPicker-head {
  position: relative;
  padding: 18px 22px 14px;
  border-bottom: 1px solid var(--line);
}
.tdPicker-title {
  font-family: var(--font-serif);
  font-size: 20px; font-weight: 500;
  color: var(--ink);
  letter-spacing: -.01em;
}
.tdPicker-sub {
  font-size: 12px; color: var(--muted);
  margin-top: 4px;
}
.tdPicker-close {
  position: absolute; right: 12px; top: 12px;
  width: 28px; height: 28px; border-radius: 50%;
  background: transparent; border: 0;
  display: flex; align-items: center; justify-content: center;
  color: var(--muted); cursor: pointer;
  transition: background .12s, color .12s;
}
.tdPicker-close:hover { background: var(--bg-soft); color: var(--ink); }
.tdPicker-grid {
  padding: 14px 18px 18px;
  overflow-y: auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.tdPicker-opt {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 12px 14px;
  background: transparent;
  text-align: left;
  cursor: pointer;
  font-size: 13px;
  color: var(--ink);
  transition: background .12s, border-color .12s;
  display: flex; flex-direction: column; gap: 2px;
}
.tdPicker-opt:hover:not([disabled]) { background: var(--bg-soft); border-color: var(--ink); }
.tdPicker-opt[disabled] {
  cursor: not-allowed;
  color: var(--muted);
  opacity: .55;
}
.tdPicker-opt .tdo-label {
  font-weight: 500;
  font-size: 13px;
}
.tdPicker-opt .tdo-val {
  font-size: 11px;
  color: var(--muted);
  letter-spacing: .04em;
}
.tdPicker-opt[disabled] .tdo-val::after {
  content: ' · added';
  color: var(--muted);
}

/* PUBLIC REMARKS */
.remarks h3 {
  font-family: var(--font-serif);
  font-size: 22px; font-weight: 500;
  margin: 0 0 14px;
  color: var(--ink);
  letter-spacing: -.01em;
}
.remarks p {
  font-size: 16px; line-height: 1.65;
  color: var(--ink);
  margin: 0;
  max-width: 70ch;
}
.remarks p::first-letter {
  font-family: var(--font-serif);
  float: left;
  font-size: 56px;
  line-height: .85;
  margin: 6px 8px 0 0;
  color: var(--ink);
  font-weight: 500;
}
.remarks .more {
  color: var(--ink);
  font-weight: 500;
  margin-left: 4px;
  border-bottom: 1px solid var(--ink);
  padding-bottom: 1px;
  cursor: pointer;
}
.remarks .more:hover { color: var(--accent-terra, #c45a3a); border-color: var(--accent-terra, #c45a3a); }

/* LOCATION + MAP */
.locationGrid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  align-items: stretch;
}
.locationCopy h3 {
  font-family: var(--font-serif);
  font-size: 26px; font-weight: 500;
  margin: 0 0 14px;
  color: var(--ink);
  letter-spacing: -.01em;
}
.locationCopy p {
  font-size: 14px; line-height: 1.65;
  color: var(--ink);
  margin: 0 0 20px;
  max-width: 50ch;
}
.locScores {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.locScore {
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 12px 8px;
  text-align: center;
  background: var(--surface, #fff);
}
.locScore .v {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: 22px;
  color: var(--ink);
  line-height: 1.05;
  margin-bottom: 4px;
}
.locScore .l {
  font-size: 10px; font-weight: 600;
  letter-spacing: .12em; text-transform: uppercase;
  color: var(--muted);
}
.miniMap {
  height: 100%;
  min-height: 240px;
  border-radius: 4px;
  background: linear-gradient(135deg, #d8dcc8 0%, #b8c4a0 50%, #98a888 100%);
  position: relative; overflow: hidden;
  cursor: pointer;
  transition: filter .15s;
}
.miniMap:hover { filter: brightness(1.04); }
.miniMap::before {
  content: ""; position: absolute; inset: 0;
  background:
    repeating-linear-gradient(0deg, rgba(255,255,255,.05) 0 1px, transparent 1px 30px),
    repeating-linear-gradient(90deg, rgba(255,255,255,.05) 0 1px, transparent 1px 30px);
}
.miniMap .expandHint {
  position: absolute; top: 14px; right: 14px;
  background: rgba(255,255,255,.95);
  color: var(--ink);
  padding: 8px 14px; border-radius: 4px;
  font-size: 11px; font-weight: 600;
  letter-spacing: .08em; text-transform: uppercase;
  display: inline-flex; align-items: center; gap: 6px;
  box-shadow: 0 2px 8px rgba(0,0,0,.15);
  pointer-events: none;
  z-index: 2;
}
.miniMap .expandHint svg { width: 12px; height: 12px; }

/* PROPERTY DETAILS */
.pdetails h2 {
  font-family: var(--font-serif);
  font-size: 28px; font-weight: 600;
  margin: 0 0 6px;
  color: var(--ink);
  letter-spacing: -.015em;
}
.pdetails .hint {
  font-size: 12px; font-style: italic;
  color: var(--muted);
  margin-bottom: 24px;
}
.group {
  border-top: 1px solid var(--line);
  padding: 22px 0;
}
.group:last-child { border-bottom: 1px solid var(--line); }
.group-head {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 14px;
}
.group-head .grpIcon {
  width: 20px; height: 20px;
  color: var(--ink);
  flex: none;
  stroke-width: 1.5;
}
.group-head h4 {
  font-family: var(--font-serif);
  font-size: 18px; font-weight: 500;
  margin: 0;
  color: var(--ink);
}
.group-body {
  display: grid; grid-template-columns: 1fr 1fr 1fr;
  gap: 12px 32px;
}
.frow { display: flex; flex-direction: column; }
.frow .l { color: var(--muted); font-size: 11px; letter-spacing: .04em; margin-bottom: 2px; text-transform: uppercase; }
.frow .v { font-weight: 500; font-size: 14px; color: var(--ink); }

/* COMPARABLES + PUBLIC RECORDS shared header */
.compsHead { display: flex; align-items: baseline; gap: 12px; margin-bottom: 14px; }
.compsHead h2 {
  font-family: var(--font-serif); font-weight: 600;
  font-size: 28px; margin: 0;
  color: var(--ink); letter-spacing: -.015em;
}
.compsHead .hint { font-size: 12px; font-style: italic; color: var(--muted); }

.comps-limited-banner {
  background: #fff3e0;
  border: 1px solid #d4a55a;
  border-left: 3px solid #c08a16;
  color: #6b4d11;
  font-size: 12px;
  padding: 7px 12px;
  border-radius: 4px;
  margin: -8px 0 14px;
}

.placeholder-section {
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 24px;
  text-align: center;
}
.placeholder-section p { color: var(--muted); font-size: 13px; margin: 0 0 12px; }
.viewAll {
  display: inline-block;
  margin-top: 4px;
  font-size: 11px; font-weight: 600;
  letter-spacing: .12em; text-transform: uppercase;
  color: var(--accent-terra, #c45a3a);
  border-bottom: 1px solid var(--accent-terra, #c45a3a);
  padding-bottom: 1px;
  text-decoration: none;
  cursor: pointer;
}
.viewAll:hover { color: var(--accent-terra-deep, #9c4429); border-color: var(--accent-terra-deep, #9c4429); }

/* COMPARABLES section — map + table */
.compMap {
  height: 280px;
  border-radius: 4px;
  border: 1px solid var(--line);
  background: linear-gradient(135deg, #d8dcc8 0%, #b8c4a0 50%, #98a888 100%);
  position: relative;
  overflow: hidden;
  margin-bottom: 18px;
}
.compMap::before {
  content: ""; position: absolute; inset: 0;
  background:
    repeating-linear-gradient(0deg, rgba(255,255,255,.05) 0 1px, transparent 1px 30px),
    repeating-linear-gradient(90deg, rgba(255,255,255,.05) 0 1px, transparent 1px 30px);
  pointer-events: none;
}

.subPills .cnt {
  font-weight: 500;
  color: inherit;
  margin-left: 4px;
  opacity: .7;
}

.compTable {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  margin-top: 4px;
  margin-bottom: 14px;
}
.compTable th {
  text-align: left;
  font-weight: 600; font-size: 10px;
  letter-spacing: .14em; text-transform: uppercase;
  color: var(--muted);
  padding: 10px 8px;
  border-bottom: 1px solid var(--ink);
}
.compTable th.num, .compTable td.num { text-align: right; }
.compTable td {
  padding: 14px 8px;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
}
.compTable tr:hover td { background: var(--bg-soft); cursor: pointer; }
.compTable td.addr {
  font-family: var(--font-serif); font-size: 15px; font-weight: 500;
  color: var(--ink);
}
.compTable td.price {
  font-family: var(--font-serif); font-size: 16px; font-weight: 600;
  color: var(--ink);
}
.compTable td.statusCell {
  color: var(--muted); font-size: 11px;
  letter-spacing: .08em; text-transform: uppercase;
}
.comp-empty {
  text-align: center; padding: 28px 8px;
  color: var(--muted); font-style: italic;
}

/* Tier badges — A..G letter pill inline with comp address.
   A/B = green (strongest), C/D = blue (supporting), E = amber (backup),
   F/G = grey (imputed, low-confidence fallback). */
.compTier {
  display: inline-block;
  width: 18px; height: 18px;
  margin-right: 8px;
  vertical-align: middle;
  border-radius: 4px;
  font-size: 10px; font-weight: 700;
  line-height: 18px; text-align: center;
  color: #fff;
  letter-spacing: 0;
}
.compTier-A { background: #15803d; }   /* dark green */
.compTier-B { background: #22c55e; }   /* green */
.compTier-C { background: #2563eb; }   /* blue */
.compTier-D { background: #60a5fa; }   /* light blue */
.compTier-E { background: #d97706; }   /* amber */
.compTier-F,
.compTier-G,
.compTier-imputed { background: #94a3b8; color: #fff; }   /* slate (imputed) */

/* Imputed comp rows — slight tint + italic so they read as "informational
   fallback" rather than a real sale. */
.compRow-imputed td {
  background: #f8fafc;
  color: #64748b;
  font-style: italic;
}
.compRow-imputed td.price {
  color: #475569;   /* a touch darker so price stays legible */
  font-style: italic;
}
.compRow-imputed:hover td { cursor: default; background: #f8fafc; }

/* PUBLIC RECORDS sub-pills */
.subPills {
  display: flex; gap: 0; align-items: center;
  margin-bottom: 16px;
  font-size: 11px; letter-spacing: .14em;
  text-transform: uppercase; color: var(--muted);
}
.subPills a {
  padding: 4px 8px;
  color: var(--muted);
  border-bottom: 1px solid transparent;
  cursor: pointer;
  transition: color .12s, border-color .12s;
  text-decoration: none;
}
.subPills a:hover { color: var(--ink); }
.subPills a.active { color: var(--ink); border-color: var(--ink); font-weight: 600; }
.subPills .sep { color: var(--line); margin: 0 4px; }

/* BUILDING & ZONING */
.zoningGrid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 32px;
  margin-bottom: 22px;
}
.zoningPanel h4, .buildablePanel h4 {
  font-family: var(--font-serif); font-weight: 500;
  font-size: 18px; color: var(--ink);
  margin: 0 0 14px;
}
.zfacts { display: grid; gap: 10px 18px; grid-template-columns: 1fr 1fr; }
.zChips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 16px; }
.zChip {
  padding: 5px 10px; border-radius: 999px;
  font-size: 11px; font-weight: 500;
  letter-spacing: .04em;
  background: var(--bg-soft); color: var(--ink);
  border: 1px solid var(--line);
}
.zChip.yes { background: rgba(91,107,58,.10); color: var(--accent-moss, #5b6b3a); border-color: rgba(91,107,58,.25); }
.zChip.no  { background: var(--bg-soft); color: var(--muted); }
/* Hazard chips — present = warning red, clear = soft neutral */
.zChip.haz { background: rgba(180, 70, 70, .10); color: #a04040; border-color: rgba(180,70,70,.30); font-weight: 600; }
.zChip.ok  { background: var(--bg-soft); color: var(--muted); }
.zChip[title] { cursor: help; }

/* ───────────────────────────────────────────────────────────────────── */
/* Building & Zoning redesign 2026-05-12 — mock-derived styles           */
/* Hero · Max Units Explained · Property Details · Buildable · Zoning    */
/* ───────────────────────────────────────────────────────────────────── */
.heroMetric {
  background: linear-gradient(135deg, rgba(91,107,58,.07), rgba(91,107,58,.02));
  border: 1px solid rgba(91,107,58,.18);
  border-radius: 10px;
  padding: 20px 24px;
  display: flex; align-items: center; gap: 24px;
  margin: 0 0 16px;
}
.heroMetric__big {
  font-family: var(--font-serif, 'Cormorant Garamond', Georgia, serif);
  font-size: 56px; font-weight: 700; line-height: 1;
  color: var(--accent-moss, #5b6b3a);
}
.heroMetric__big small { font-size: 20px; color: var(--ink, #1a1a1a); font-weight: 500; }
.heroMetric__breakdown { flex: 1; }
.heroMetric__label {
  font-size: 12px; color: var(--muted);
  text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 6px;
}
.heroMetric__formula { font-size: 14px; color: var(--ink-soft, #444); line-height: 1.8; }
.heroMetric__formula b { color: var(--ink, #1a1a1a); font-weight: 600; }

.cite {
  color: var(--muted); font-size: 11px; margin-left: 4px;
  font-style: italic; text-decoration: none;
  border-bottom: 1px dotted var(--muted); cursor: help;
}
.cite:hover { color: var(--accent-moss, #5b6b3a); border-bottom-color: var(--accent-moss, #5b6b3a); }

/* "Max Units Explained" details */
details.moreDetails {
  margin: -8px 0 8px;
  border-radius: 8px;
  background: var(--bg-soft);
  border: 1px solid var(--line);
}
details.moreDetails summary {
  cursor: pointer; list-style: none;
  padding: 10px 16px; font-size: 13px; font-weight: 500;
  color: var(--ink-soft, #444);
  display: flex; align-items: center; gap: 8px; user-select: none;
}
details.moreDetails summary::-webkit-details-marker { display: none; }
details.moreDetails summary::after {
  content: 'More details ↓'; margin-left: auto;
  color: var(--accent-moss, #5b6b3a); font-weight: 600;
  font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em;
}
details.moreDetails[open] summary::after { content: 'Less ↑'; }
details.moreDetails[open] summary { border-bottom: 1px solid var(--line); }
.moreDetails__body { padding: 16px 20px 20px; }
.explainBlock {
  margin-bottom: 18px; padding-bottom: 18px;
  border-bottom: 1px dashed var(--line);
}
.explainBlock:last-child { margin-bottom: 0; padding-bottom: 0; border: none; }
.explainBlock__head {
  font-family: var(--font-serif, 'Cormorant Garamond', Georgia, serif);
  font-size: 17px; font-weight: 600; color: var(--ink); margin-bottom: 4px;
}
.explainBlock__sub { font-size: 11px; color: var(--muted); margin-bottom: 8px; font-style: italic; }
.explainBlock__body { font-size: 14px; color: var(--ink-soft, #444); line-height: 1.7; }
.explainBlock__body p { margin: 0 0 10px; }
.explainBlock__body ul { margin: 6px 0 10px; padding-left: 18px; }
.explainBlock__body li { margin: 4px 0; }
.explainBlock__body b { color: var(--ink); font-weight: 600; }
.explainBlock__body .stat {
  display: inline-block; background: rgba(91,107,58,.08); color: var(--accent-moss, #5b6b3a);
  padding: 2px 8px; border-radius: 4px; font-weight: 600; font-size: 13px;
  font-family: 'Courier New', monospace;
}

/* Sections */
.zsection { margin-top: 28px; }
.zsection:first-of-type { margin-top: 0; }
.zsection__head { display: flex; align-items: baseline; gap: 8px; margin-bottom: 12px; }
.zsection__title { font-family: var(--font-serif, 'Cormorant Garamond', Georgia, serif); font-size: 22px; font-weight: 600; }
.zsection__src { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; }

/* 2-col fact grid */
.factGrid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0; border-top: 1px solid var(--line); }
.factRow { display: flex; align-items: baseline; justify-content: space-between; padding: 12px 0; border-bottom: 1px solid var(--line); padding-right: 24px; }
.factRow:nth-child(2n) { padding-right: 0; padding-left: 24px; }
.factRow__label { font-size: 13px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; }
.factRow__value { font-size: 16px; font-weight: 600; text-align: right; }
.factRow__value small { display: block; font-size: 12px; color: var(--muted); font-weight: 400; margin-top: 2px; }

/* Pills — scoped under .pillRow to NOT inherit the 76×76 vertical action-button
   .pill rules at L55 (which set width/height/display/flex-direction). Without
   this namespace, every Programs & Eligibility chip rendered as a 76×76 block
   and stacked vertically. Fixed 2026-05-16. */
.pillRow { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.pillRow .pill {
  width: auto; height: auto;
  display: inline-flex; flex-direction: row; align-items: center; gap: 4px;
  padding: 6px 12px; border-radius: 999px;
  font-size: 12px; font-weight: 500; letter-spacing: 0.04em;
  text-transform: none;
  background: var(--bg-soft); color: var(--ink-soft, #444);
  border: 1px solid var(--line); cursor: help; position: relative;
}
.pillRow .pill.ok    { background: rgba(91,107,58,.10); color: var(--accent-moss, #5b6b3a); border-color: rgba(91,107,58,.25); }
.pillRow .pill.no    { background: rgba(180,70,70,.08); color: #a04030; border-color: rgba(180,70,70,.20); }
.pillRow .pill.haz   { background: rgba(180,70,70,.10); color: #a04040; border-color: rgba(180,70,70,.30); font-weight: 600; }
.pillRow .pill.warn  { background: rgba(181,132,16,.10); color: #b58410; border-color: rgba(181,132,16,.25); font-weight: 600; }

/* Tooltip popover (CSS-only hover) */
.tt-wrap { position: relative; display: inline-block; }
.tt {
  visibility: hidden; opacity: 0;
  position: absolute; bottom: calc(100% + 8px); left: 50%;
  transform: translateX(-50%);
  width: 360px; background: #fff;
  border: 1px solid var(--line); border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
  padding: 16px; z-index: 100;
  text-align: left; pointer-events: none;
  transition: opacity 0.15s, visibility 0.15s;
}
.tt-wrap:hover .tt, .tt-wrap:focus-within .tt { visibility: visible; opacity: 1; pointer-events: auto; }
.tt::before { content: ''; position: absolute; top: 100%; left: 0; right: 0; height: 14px; background: transparent; }
.tt__head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 6px; border-bottom: 1px solid var(--line); padding-bottom: 6px; }
.tt__name { font-family: var(--font-serif, 'Cormorant Garamond', serif); font-size: 18px; font-weight: 600; color: var(--ink); }
.tt__year { font-size: 11px; color: var(--muted); }
.tt__full { font-size: 11px; color: var(--muted); margin-bottom: 8px; font-style: italic; }
.tt__tldr { font-size: 13px; color: var(--ink); line-height: 1.5; margin-bottom: 8px; font-weight: 500; }
.tt__what { font-size: 12px; color: var(--ink-soft, #444); line-height: 1.5; margin-bottom: 10px; }
.tt__cites { margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--line); }
.tt__cites-label { font-size: 10px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); margin-bottom: 4px; }
.tt__cite-link { display: block; font-size: 11px; color: var(--accent-moss, #5b6b3a); text-decoration: none; line-height: 1.5; padding: 2px 0; }
.tt__cite-link:hover { text-decoration: underline; }
.tt__cite-code { font-family: 'Courier New', monospace; font-weight: 600; }
.tt__cite-label { color: var(--muted); margin-left: 4px; }

/* Inline help icon (ⓘ) */
.helpIc { display: inline-flex; align-items: center; justify-content: center; width: 14px; height: 14px; border-radius: 50%; background: var(--bg-soft); color: var(--muted); font-size: 10px; font-weight: 700; font-style: italic; cursor: help; margin-left: 4px; border: 1px solid var(--line); transition: background 0.15s, color 0.15s; }
.helpIc:hover { background: var(--accent-moss, #5b6b3a); color: #fff; border-color: var(--accent-moss, #5b6b3a); }
.helpIc-wrap { position: relative; display: inline-block; vertical-align: middle; }
/* 2026-05-13 — tooltip overflow fix. Default anchor LEFT side of icon (the
   tooltip extends RIGHTWARD), which keeps it inside the modal for icons in
   the left column. .anchor-right flips to right-anchored for right-column /
   right-edge cases. JS in property.js (positionTooltips) flips at hover time
   based on actual measured overflow against the property modal bounding rect. */
.helpIc-wrap .helpTt { visibility: hidden; opacity: 0; position: absolute; top: calc(100% + 8px); left: 0; right: auto; width: 340px; max-width: calc(100vw - 32px); background: #fff; border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 8px 24px rgba(0,0,0,0.12); padding: 14px 16px; z-index: 100; text-align: left; pointer-events: none; transition: opacity 0.15s, visibility 0.15s; }
.helpIc-wrap.anchor-right .helpTt { left: auto; right: 0; }
.helpIc-wrap:hover .helpTt, .helpIc-wrap:focus-within .helpTt { visibility: visible; opacity: 1; pointer-events: auto; }
.helpTt::before { content: ''; position: absolute; bottom: 100%; left: 0; right: 0; height: 14px; background: transparent; }
.helpTt__name { font-family: var(--font-serif, 'Cormorant Garamond', serif); font-size: 17px; font-weight: 600; color: var(--ink); margin-bottom: 6px; padding-bottom: 6px; border-bottom: 1px solid var(--line); }
.helpTt__concept { font-size: 13px; color: var(--ink-soft, #444); line-height: 1.6; margin-bottom: 10px; }
.helpTt__specific { background: rgba(91,107,58,.07); border-left: 3px solid var(--accent-moss, #5b6b3a); padding: 8px 10px; border-radius: 4px; margin-bottom: 10px; font-size: 12px; color: var(--ink); line-height: 1.6; }
.helpTt__specific b { color: var(--accent-moss, #5b6b3a); font-weight: 600; }
.helpTt__specific-label { font-size: 10px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--accent-moss, #5b6b3a); margin-bottom: 3px; font-weight: 600; }
.helpTt__source { font-size: 11px; color: var(--muted); border-top: 1px solid var(--line); padding-top: 8px; font-style: italic; }
.helpTt__source b { color: var(--ink-soft, #444); font-style: normal; font-weight: 600; }

/* RSO banner + hazards-clear */
.rsoBanner { display: flex; align-items: flex-start; gap: 10px; padding: 12px 16px; background: rgba(181,132,16,.08); border: 1px solid rgba(181,132,16,.25); border-radius: 8px; margin-top: 16px; font-size: 14px; line-height: 1.5; }
.rsoBanner__ic { font-size: 18px; color: #b58410; flex-shrink: 0; }
.rsoBanner b { font-weight: 600; }
.hazClear { display: flex; align-items: center; gap: 10px; padding: 10px 14px; background: rgba(91,107,58,.06); border: 1px solid rgba(91,107,58,.18); border-radius: 8px; font-size: 14px; color: var(--accent-moss, #5b6b3a); }

/* INVESTMENT STRATEGIES placeholder */
.stratPlaceholder {
  text-align: center;
  padding: 28px 12px;
  background: var(--bg-soft);
  border-radius: 4px;
  color: var(--muted);
  font-size: 13px;
}
.stratPlaceholder b {
  display: block;
  font-family: var(--font-serif); font-weight: 500;
  font-size: 22px; color: var(--ink);
  margin-bottom: 6px;
}
.stratPlaceholder em { font-style: italic; font-size: 12px; }

/* ============================================
   FULL-SCREEN MAP OVERLAY
   ============================================ */
.mapOverlay {
  position: fixed; inset: 0;
  background: rgba(0,16,46,.78);
  display: none;
  align-items: center; justify-content: center;
  z-index: 200;
  padding: 24px;
  backdrop-filter: blur(4px);
}
.mapOverlay.open { display: flex; }
.mapOverlay .mapPanel {
  background: var(--surface, #fff);
  border-radius: 6px;
  width: min(1400px, 95vw);
  height: 92vh;
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-rows: 60px 1fr;
  box-shadow: 0 24px 80px rgba(0,0,0,.4);
}
.mapOverlay .mapHead {
  display: flex; align-items: center; gap: 16px;
  padding: 0 22px;
  border-bottom: 1px solid var(--line);
}
.mapOverlay .titleblock { display: flex; flex-direction: column; line-height: 1.15; }
.mapOverlay .ttl { font-family: var(--font-serif); font-weight: 500; font-size: 18px; color: var(--ink); }
.mapOverlay .sub { color: var(--muted); font-size: 12px; letter-spacing: .04em; }
.mapOverlay .closeBtn {
  width: 36px; height: 36px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg-soft);
  color: var(--ink);
  cursor: pointer;
  transition: background .12s;
  border: 0;
}
.mapOverlay .closeBtn:hover { background: var(--line); }
.bigMapWrap {
  background: linear-gradient(135deg, #d8dcc8 0%, #b8c4a0 50%, #98a888 100%);
  position: relative;
}

/* ─────────────────────────────────────────────────────────────────
   Property History timeline (#sec-public > History sub-pill)
   v1 — MLS-only events grouped by year, vertical rail layout.
   ───────────────────────────────────────────────────────────────── */
.history-rail {
  margin-top: 4px;
  padding-bottom: 12px;
}
.history-loading {
  padding: 18px 4px;
  color: var(--muted);
  font-size: 13px;
  font-style: italic;
}
.history-empty {
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 22px 24px;
  text-align: center;
}
.history-empty-title {
  font-family: var(--font-serif);
  font-size: 15px;
  font-weight: 500;
  color: var(--ink);
  margin-bottom: 4px;
}
.history-empty-note {
  color: var(--muted);
  font-size: 12px;
}

/* Year boundary — horizontal divider with the year label inline */
.history-year {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 18px 0 10px;
}
.history-year:first-child { margin-top: 6px; }
.history-year-line {
  flex: 1;
  height: 1px;
  background: var(--line);
}
.history-year-label {
  font-family: var(--font-serif);
  font-size: 16px;
  font-weight: 500;
  color: var(--ink);
  letter-spacing: .04em;
  padding: 0 10px;
}

/* Single event row — chip on the left, details on the right */
.history-event {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 14px;
  padding: 9px 0;
  border-bottom: 1px dotted var(--line);
}
.history-event:last-child { border-bottom: 0; }

.history-chip {
  align-self: start;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 8px;
  border-radius: 3px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  line-height: 1.2;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Chip color taxonomy */
.history-chip-active     { background: #1d3a8a; color: #fff; }      /* dark blue */
.history-chip-sold       { background: #b13a2c; color: #fff; }      /* red */
.history-chip-pending    { background: #c08a16; color: #fff; }      /* amber */
.history-chip-withdrawn  { background: #6b3aa0; color: #fff; }      /* purple */
.history-chip-change     { background: #e7e5e0; color: #4d4a44; }   /* grey/neutral */
.history-chip-status     { background: #e7e5e0; color: #4d4a44; }
.history-chip-gap        { background: #f3f1ec; color: #8c887e; font-style: italic; }

.history-detail {
  min-width: 0;  /* allow long agent names to truncate cleanly */
}
.history-event-title {
  font-family: var(--font-serif);
  font-size: 15px;
  font-weight: 500;
  color: var(--ink);
  line-height: 1.3;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 10px;
}
.history-event-prices {
  font-family: var(--font-sans, inherit);
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
}
.history-event-prices .history-arrow {
  color: var(--accent-terra, #c45a3a);
  margin: 0 2px;
  font-size: 10px;
}
.history-event-meta {
  margin-top: 2px;
  font-size: 11px;
  letter-spacing: .04em;
  color: var(--muted);
  line-height: 1.4;
}

/* Final TRANSACTION_GAP placeholder — softer treatment */
.history-event.history-gap {
  margin-top: 6px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  border-bottom: 0;
}
.history-event.history-gap .history-event-title {
  font-size: 13px;
  color: var(--muted);
  font-style: italic;
}
.history-event.history-gap .history-event-meta {
  font-style: italic;
}

/* ============================================
   PHOTO GALLERY OVERLAY (Level 1 — mosaic view)
   Opens when user clicks the big hero photo or "View all photos".
   Each tile drills into the single-photo lightbox.
   ============================================ */
.photo-gallery-overlay {
  position: fixed;
  inset: 0;
  z-index: 9000;          /* below lightbox (10000) so lightbox stacks on top */
  display: none;
  opacity: 0;
  pointer-events: none;
  transition: opacity .15s ease-out;
}
.photo-gallery-overlay.is-open {
  display: block;
  opacity: 1;
  pointer-events: auto;
}
.photo-gallery-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(12, 28, 51, 0.85);
  cursor: pointer;
}
.photo-gallery-panel {
  position: relative;
  max-width: 1400px;
  height: 92vh;
  margin: 4vh auto;
  background: var(--bg-card, #fff);
  border-radius: 6px;
  box-shadow: 0 24px 80px rgba(0,0,0,.45);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.photo-gallery-head {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 28px;
  background: var(--bg-card, #fff);
  border-bottom: 1px solid var(--line, #e5e7eb);
}
.photo-gallery-titleblock {
  min-width: 0;
}
.photo-gallery-addr {
  font-size: 16px;
  font-weight: 600;
  color: var(--ink, #111827);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.photo-gallery-count {
  font-size: 12px;
  color: var(--ink-soft, #6b7280);
  letter-spacing: .04em;
  margin-top: 2px;
}
.photo-gallery-close {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: transparent;
  color: var(--ink, #111827);
  border: 1px solid var(--line, #e5e7eb);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background .12s, border-color .12s;
  flex-shrink: 0;
}
.photo-gallery-close:hover {
  background: var(--bg-soft, #f3f4f6);
  border-color: var(--ink-soft, #9ca3af);
}
.photo-gallery-grid {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 16px 28px 40px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: 200px;
  gap: 12px;
  align-content: start;
}
.pg-tile {
  position: relative;
  overflow: hidden;
  cursor: pointer;
  border-radius: 4px;
  background: var(--bg-soft-2, #f3f4f6) center / cover no-repeat;
  transition: transform .18s ease-out, box-shadow .18s ease-out;
}
.pg-tile::after {
  content: '';
  position: absolute;
  inset: 0;
  box-shadow: inset 0 0 0 0 transparent;
  transition: box-shadow .18s ease-out;
  pointer-events: none;
}
.pg-tile:hover {
  transform: scale(1.01);
}
.pg-tile:hover::after {
  box-shadow: inset 0 0 0 3px var(--accent, #2563eb);
}
.pg-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
}
/* Mosaic sizing — hero double, wide spans 2 cols, tall spans 2 rows */
.pg-tile.pg-hero { grid-column: span 2; grid-row: span 2; }
.pg-tile.pg-wide { grid-column: span 2; }
.pg-tile.pg-tall { grid-row: span 2; }

@media (max-width: 1024px) {
  .photo-gallery-panel { margin: 2vh auto; height: 96vh; }
  .photo-gallery-grid { grid-template-columns: repeat(2, 1fr); padding: 14px 20px 32px; }
  .pg-tile.pg-hero { grid-column: span 2; grid-row: span 2; }
  .pg-tile.pg-wide { grid-column: span 2; }
}
@media (max-width: 640px) {
  .photo-gallery-panel { margin: 0; height: 100vh; border-radius: 0; }
  .photo-gallery-grid { grid-template-columns: 1fr; grid-auto-rows: 220px; padding: 12px 14px 28px; }
  .pg-tile.pg-hero, .pg-tile.pg-wide { grid-column: span 1; }
  .pg-tile.pg-tall { grid-row: span 1; }
  .photo-gallery-head { padding: 14px 18px; }
}

/* ============================================
   PHOTO LIGHTBOX (full-screen overlay)
   ============================================ */
.gallery .ph { cursor: pointer; }
.gallery .ph.ph-empty { cursor: default; }

.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(8, 8, 10, 0.96);
  z-index: 10000;
  display: none;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}
.lightbox.is-open {
  display: flex;
  pointer-events: auto;
}
.lightbox-stage {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px 80px;
  box-sizing: border-box;
  cursor: zoom-out;
}
.lightbox-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  box-shadow: 0 4px 32px rgba(0,0,0,.6);
  user-select: none;
  cursor: default;
  pointer-events: none;
  display: block;
}
.lightbox-img.is-loading { opacity: 0.35; }

.lightbox-close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  color: #fff;
  border: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background .12s;
  z-index: 2;
}
.lightbox-close:hover { background: rgba(255,255,255,0.18); }

.lightbox-counter {
  position: absolute;
  top: 22px;
  left: 24px;
  color: #fff;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: .04em;
  background: rgba(0,0,0,0.4);
  padding: 6px 12px;
  border-radius: 3px;
  z-index: 2;
  pointer-events: none;
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  color: #fff;
  border: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background .12s;
  z-index: 2;
}
.lightbox-nav:hover { background: rgba(255,255,255,0.20); }
.lightbox-nav:disabled {
  opacity: 0.3;
  cursor: default;
  pointer-events: none;
}
.lightbox-prev { left: 18px; }
.lightbox-next { right: 18px; }

@media (max-width: 640px) {
  .lightbox-stage { padding: 56px 12px; }
  .lightbox-nav { width: 42px; height: 42px; }
  .lightbox-prev { left: 8px; }
  .lightbox-next { right: 8px; }
}

/* ============================================
   PROPERTY DETAILS — chip blocks (Phase 1 More Details, 2026-05-13)
   Mirrors frontend/more-details-mockup.html. Lives at the bottom of a
   .group (after .group-body) so it spans the full group width.
   ============================================ */
.chips-block {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid #f3eee0;
}
.chips-block:first-of-type { margin-top: 16px; }
.chips-label {
  font-size: 11px;
  color: var(--muted);
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  margin-bottom: 10px;
}
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.chip {
  font-size: 12px;
  background: #f1ebda;
  color: var(--ink);
  padding: 5px 10px;
  border-radius: 999px;
  font-weight: 500;
  line-height: 1.3;
}

/* ============================================
   MORE DETAILS REDESIGN (2026-05-13)
   Source: frontend/more-details-mockup.html.
   - Each .mdSection is draggable. Drag handle is the gold ⋮⋮ at top-left.
   - .mdGrid renders 2-col definition-list rows that hide when empty.
   - .mdChipBlock for grouped chip lists.
   - .mdSaveBar floats bottom-right after first drag.
   ============================================ */
.mdSection {
  background: transparent;
  border: 1px solid var(--line, #e5e0d6);
  border-radius: 6px;
  margin-bottom: 18px;
  padding: 0;
  position: relative;
  transition: opacity .15s, transform .15s, box-shadow .15s;
  overflow: hidden;
}
.mdSection[hidden] { display: none !important; }
.mdSection[draggable="true"] { cursor: default; }
.mdSection.is-dragging { opacity: 0.4; }
.mdSection.drop-target-above { box-shadow: 0 -3px 0 var(--gold, #D4A946); }
.mdSection.drop-target-below { box-shadow: 0 3px 0 var(--gold, #D4A946); }

.mdSection .drag-handle {
  position: absolute;
  top: 18px; left: 8px;
  width: 18px; height: 18px;
  display: flex; align-items: center; justify-content: center;
  color: var(--muted, #6b7a8f);
  opacity: 0;
  cursor: grab;
  transition: opacity .15s;
  user-select: none;
  font-size: 14px;
  line-height: 1;
  z-index: 1;
}
.mdSection:hover .drag-handle { opacity: 0.6; }
.mdSection .drag-handle:hover { opacity: 1; }
.mdSection .drag-handle:active { cursor: grabbing; }

.mdSection-head {
  display: flex; align-items: baseline; justify-content: space-between;
  padding: 16px 24px 6px;
  border-bottom: 1px solid var(--line, #e5e0d6);
}
.mdSection-head h3 {
  font-family: var(--font-serif, Georgia, serif);
  font-weight: 600;
  font-size: 18px;
  margin: 0;
  color: var(--ink, #0c1c33);
}
.mdSection-head .mdSection-sub {
  font-size: 11px;
  color: var(--muted, #6b7a8f);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.mdGrid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 32px;
  padding: 8px 24px 16px;
}
.mdGrid > div[id^="md-home-units-host"] {
  grid-column: 1 / -1;
  display: contents;  /* children render into the grid */
}
.mdRow {
  display: flex; justify-content: space-between; align-items: baseline;
  padding: 11px 0;
  border-bottom: 1px solid #f3eee0;
  gap: 12px;
}
.mdRow[hidden] { display: none; }
.mdRow:last-child { border-bottom: 0; }
.mdLabel {
  font-size: 11px;
  color: var(--muted, #6b7a8f);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  flex: 0 0 auto;
}
.mdValue {
  font-size: 13px;
  color: var(--ink, #0c1c33);
  font-weight: 500;
  text-align: right;
}
.mdValue.mono { font-family: 'SF Mono', Consolas, monospace; font-size: 12px; }

.mdChipBlock {
  padding: 10px 24px 16px;
  border-top: 1px solid #f3eee0;
}
.mdChipBlock[hidden] { display: none; }
.mdChipBlock:first-of-type { border-top: 0; }
.mdChipBlock .mdChip-label {
  font-size: 11px;
  color: var(--muted, #6b7a8f);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.mdChips {
  display: flex; flex-wrap: wrap; gap: 6px;
}
.mdChips .chip {
  font-size: 12px;
  background: #f1ebda;
  color: var(--ink, #0c1c33);
  padding: 4px 10px;
  border-radius: 999px;
  font-weight: 500;
  line-height: 1.3;
}
.mdChips .chip.pos  { background: #e1f0e6; color: var(--pos, #2e7d4f); }
.mdChips .chip.warn { background: #fbeadb; color: var(--warn, #b35a14); }
.mdChips .chip.muted { background: transparent; border: 1px solid var(--line, #e5e0d6); color: var(--muted, #6b7a8f); }

/* Source attribution badge — small pill next to a label or value */
.mdSection .source {
  font-size: 9px;
  color: var(--muted, #6b7a8f);
  margin-left: 6px;
  background: #f0ece1;
  padding: 1px 5px;
  border-radius: 3px;
  letter-spacing: 0.04em;
  font-weight: 700;
  text-transform: none;
}

/* Per-unit / ADU rows inside Home */
.mdRow.mdUnitRow .mdValue { font-weight: 500; }
.mdRow .mdInlinePill {
  display: inline-block;
  font-size: 10px;
  padding: 2px 7px;
  border-radius: 999px;
  margin-left: 6px;
  font-weight: 600;
  letter-spacing: 0.03em;
}
.mdRow .mdInlinePill.pos  { background: #e1f0e6; color: var(--pos, #2e7d4f); }
.mdRow .mdInlinePill.warn { background: #fbeadb; color: var(--warn, #b35a14); }
.mdRow .mdInlinePill.muted { background: transparent; border: 1px solid var(--line, #e5e0d6); color: var(--muted, #6b7a8f); }

/* Sale history rows */
.mdSaleHost { padding: 8px 24px 16px; }
.mdSaleRow {
  display: grid;
  grid-template-columns: 110px 1fr 1fr 90px;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid #f3eee0;
  font-size: 13px;
  align-items: baseline;
}
.mdSaleRow:last-child { border-bottom: 0; }
.mdSaleRow .date { font-weight: 600; color: var(--ink, #0c1c33); }
.mdSaleRow .price { font-weight: 600; }
.mdSaleRow .subtype { color: var(--muted, #6b7a8f); }
.mdSaleRow .ppsf { color: var(--muted, #6b7a8f); font-size: 12px; text-align: right; }

/* Sticky save bar */
.mdSaveBar {
  position: fixed;
  bottom: 24px; right: 24px;
  background: var(--bg-card, #fffdf7);
  border: 1px solid var(--line, #e5e0d6);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(12, 28, 51, 0.15);
  padding: 12px 16px;
  display: none;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  z-index: 100;
  transform: translateY(20px);
  opacity: 0;
  transition: transform .25s, opacity .25s;
  pointer-events: none;
}
.mdSaveBar.visible {
  display: flex;
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}
.mdSaveBar-msg {
  color: var(--ink, #0c1c33);
  font-weight: 500;
}
.mdSaveBar-dot {
  display: inline-block;
  width: 8px; height: 8px;
  background: var(--pos, #2e7d4f);
  border-radius: 50%;
  margin-right: 6px;
  vertical-align: middle;
}
.mdSaveBar button {
  border: 1px solid var(--line, #e5e0d6);
  background: transparent;
  color: var(--ink, #0c1c33);
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 4px;
  cursor: pointer;
  letter-spacing: 0.02em;
}
.mdSaveBar button:hover { background: #f1ebda; }
.mdSaveBar .mdSaveBar-close {
  border: 0;
  background: transparent;
  padding: 4px 6px;
  color: var(--muted, #6b7a8f);
  font-size: 16px;
}
.mdSaveBar .mdSaveBar-close:hover { background: transparent; color: var(--ink, #0c1c33); }

@media (max-width: 640px) {
  .mdGrid { grid-template-columns: 1fr; gap: 0; }
  .mdSaleRow { grid-template-columns: 1fr 1fr; row-gap: 4px; }
  .mdSaveBar { left: 12px; right: 12px; bottom: 12px; }
}

/* ──────────────────────────────────────────────────────────────────
   Max Units Explained — itemized law breakdown (added 2026-05-13)
   ────────────────────────────────────────────────────────────────── */
.max-units-breakdown {
  display: flex; flex-direction: column;
  margin: 0 0 12px;
  background: #fff;
  border: 1px solid var(--line, #e5e7eb);
  border-radius: 8px;
  overflow: hidden;
}
.mub-head, .mub-row {
  display: grid;
  grid-template-columns: minmax(140px, 1.6fr) 100px minmax(160px, 1.4fr);
  gap: 12px;
  align-items: center;
  padding: 10px 14px;
}
.mub-head {
  background: var(--bg-soft, #f5f4ef);
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--muted, #6b7a8f);
  border-bottom: 1px solid var(--line, #e5e7eb);
  font-weight: 600;
}
.mub-row {
  border-bottom: 1px solid var(--line, #e5e7eb);
  font-size: 14px;
}
.mub-row:last-child { border-bottom: none; }
.mub-row__law { color: var(--ink, #0c1c33); font-weight: 500; }
.mub-row__units {
  color: var(--ink, #0c1c33); font-weight: 600;
  font-family: 'SF Mono', 'Menlo', 'Consolas', monospace;
  font-size: 13px;
}
.mub-row__cite { font-size: 13px; }
.mub-row--base { background: rgba(91,107,58,.04); }
.mub-row--total {
  background: var(--bg-soft, #f5f4ef);
  border-top: 2px solid var(--line, #e5e7eb);
  font-weight: 600;
}
.mub-row--total .mub-row__law { font-family: var(--font-serif, 'Cormorant Garamond', Georgia, serif); font-size: 17px; }
.mub-row--total .mub-row__units { color: var(--accent-moss, #5b6b3a); font-size: 15px; }

/* Clickable law citation — small text-link w/ external-link arrow */
.law-citation {
  display: inline-flex; align-items: center; gap: 4px;
  color: var(--accent-moss, #5b6b3a);
  text-decoration: none;
  border-bottom: 1px dotted rgba(91,107,58,.4);
  padding-bottom: 1px;
  transition: border-color .15s ease, color .15s ease;
}
.law-citation:hover, .law-citation:focus {
  color: #3d4a26;
  border-bottom-color: var(--accent-moss, #5b6b3a);
  outline: none;
}
.law-citation__arrow {
  font-size: 11px;
  opacity: 0.7;
  transition: opacity .15s ease, transform .15s ease;
}
.law-citation:hover .law-citation__arrow {
  opacity: 1;
  transform: translate(1px, -1px);
}
.law-citation--nourl {
  color: var(--ink-soft, #444);
  border-bottom-style: dotted;
  cursor: help;
}

.mub-disclaimer {
  margin-top: 12px;
  font-size: 12px;
  color: var(--muted, #6b7a8f);
  font-style: italic;
  line-height: 1.5;
}

/* SB9 not-eligible block — sits below the breakdown table */
.sb9-not-eligible {
  margin-top: 14px;
  padding: 12px 14px;
  background: rgba(181,132,16,.08);
  border: 1px solid rgba(181,132,16,.25);
  border-radius: 8px;
  color: #6e5510;
}
.sb9-not-eligible__head {
  display: flex; align-items: center; gap: 8px;
  font-weight: 700;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 8px;
}
.sb9-not-eligible__icon { font-size: 16px; }
.sb9-not-eligible__list {
  margin: 0;
  padding-left: 24px;
  font-size: 14px;
  line-height: 1.6;
}
.sb9-not-eligible__list li { margin: 2px 0; color: var(--ink, #0c1c33); }
.sb9-not-eligible__body { font-size: 13px; line-height: 1.5; }

@media (max-width: 640px) {
  .mub-head, .mub-row {
    grid-template-columns: 1.4fr 70px 1.2fr;
    gap: 8px;
    padding: 10px;
  }
  .mub-row__law, .mub-row__cite { font-size: 13px; }
  .mub-row__units { font-size: 12px; }
}

/* ──────────────────────────────────────────────────────────────────
   Scenario cards — mutually-exclusive build pathways (2026-05-18)
   Replaces the additive-rows table. Each card represents ONE pathway
   (Keep+ADU, SB9 two-unit, SB9 lot split, SB1123). Cards sit side-by-
   side on wide screens, stack on narrow.
   ────────────────────────────────────────────────────────────────── */
.scenarios-intro {
  margin: 0 0 12px;
  padding: 10px 12px;
  background: rgba(91,107,58,.06);
  border-left: 3px solid var(--accent-moss, #5b6b3a);
  border-radius: 4px;
  font-size: 13px;
  color: var(--ink, #0c1c33);
  line-height: 1.5;
}
.scenarios-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
  margin: 0 0 12px;
}
.scenario-card {
  display: flex; flex-direction: column;
  background: #fff;
  border: 1px solid var(--line, #e5e7eb);
  border-radius: 10px;
  padding: 14px;
  box-shadow: 0 1px 2px rgba(12,28,51,.04);
  transition: box-shadow .15s ease, border-color .15s ease;
}
.scenario-card:hover {
  box-shadow: 0 4px 12px rgba(12,28,51,.08);
}
.scenario-card--dominant {
  border-color: var(--accent-moss, #5b6b3a);
  border-width: 2px;
  background: linear-gradient(180deg, rgba(91,107,58,.04), #fff);
}
.scenario__head {
  display: flex; justify-content: space-between; align-items: baseline;
  gap: 10px;
  margin-bottom: 8px;
}
.scenario__title {
  font-family: var(--font-serif, 'Cormorant Garamond', Georgia, serif);
  font-size: 18px;
  color: var(--ink, #0c1c33);
  font-weight: 600;
  line-height: 1.2;
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
.scenario-dominant-tag {
  display: inline-block;
  padding: 2px 6px;
  font-family: var(--font-sans, 'Inter', sans-serif);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: var(--accent-moss, #5b6b3a);
  color: #fff;
  border-radius: 3px;
}
.scenario__units {
  font-family: 'SF Mono', 'Menlo', 'Consolas', monospace;
  font-size: 22px;
  font-weight: 700;
  color: var(--accent-moss, #5b6b3a);
  white-space: nowrap;
}
.scenario__units small {
  font-size: 12px;
  font-weight: 500;
  color: var(--muted, #6b7a8f);
  margin-left: 2px;
}
.scenario__rationale {
  font-size: 13px;
  color: var(--ink, #0c1c33);
  line-height: 1.5;
  margin: 0 0 8px;
}
.scenario__sub {
  font-size: 12px;
  color: var(--muted, #6b7a8f);
  font-style: italic;
  margin: 0 0 8px;
}
.scenario__badges {
  display: flex; flex-wrap: wrap; gap: 4px;
  margin: 0 0 10px;
}
.scenario-badge {
  display: inline-flex; align-items: center;
  padding: 3px 7px;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-radius: 3px;
  border: 1px solid currentColor;
}
.scenario-badge--risk-low { color: #5b6b3a; background: rgba(91,107,58,.08); }
.scenario-badge--risk-medium { color: #a86c1a; background: rgba(181,132,16,.08); }
.scenario-badge--risk-high { color: #a13030; background: rgba(161,48,48,.08); }
.scenario-badge--demo { color: #a13030; background: rgba(161,48,48,.08); }
.scenario-badge--subdiv { color: #2a5d8a; background: rgba(42,93,138,.08); }
.scenario__conditions {
  margin: 0 0 10px;
  padding-left: 20px;
  font-size: 12px;
  color: var(--ink-soft, #4b5870);
  line-height: 1.5;
}
.scenario__conditions li { margin: 2px 0; }
.scenario__foot {
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 10px;
  padding-top: 8px;
  border-top: 1px solid var(--line, #e5e7eb);
  margin-top: auto;
}
.scenario__cites {
  display: flex; flex-wrap: wrap; gap: 6px;
  font-size: 12px;
}
.scenario__permit {
  font-size: 11px;
  color: var(--muted, #6b7a8f);
  text-transform: lowercase;
  font-style: italic;
  text-align: right;
}
.scenario__mutex {
  margin-top: 8px;
  font-size: 11px;
  color: var(--muted, #6b7a8f);
  line-height: 1.4;
}
.scenario-cite {
  display: inline-flex; align-items: center; gap: 3px;
  color: var(--accent-moss, #5b6b3a);
  text-decoration: none;
  border-bottom: 1px dotted rgba(91,107,58,.4);
  padding-bottom: 1px;
}
.scenario-cite:hover { color: #3d4a26; }
.scenario-cite__arrow { font-size: 10px; opacity: 0.7; }
.scenario-cite--nourl { color: var(--ink-soft, #4b5870); cursor: help; }

/* Hero badges (under the big units number) */
.hero-badges {
  display: flex; flex-wrap: wrap; gap: 4px;
  margin-top: 4px;
}
.hero-badge {
  display: inline-flex; align-items: center;
  padding: 2px 6px;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-radius: 3px;
}
.hero-badge--demo { color: #a13030; background: rgba(161,48,48,.1); }
.hero-badge--subdiv { color: #2a5d8a; background: rgba(42,93,138,.1); }
.hero-badge--risk-low { color: #5b6b3a; background: rgba(91,107,58,.1); }
.hero-badge--risk-medium { color: #a86c1a; background: rgba(181,132,16,.1); }
.hero-badge--risk-high { color: #a13030; background: rgba(161,48,48,.1); }

@media (max-width: 640px) {
  .scenarios-grid { grid-template-columns: 1fr; }
  .scenario__head { flex-direction: column; align-items: flex-start; gap: 4px; }
  .scenario__units { font-size: 24px; }
}
