/*
 * SLBI Quadplex Hunt — Page shell styles
 * Owned by Agent 4 (Integration).
 *
 * This file styles the OUTER chrome of slbi-hunt.html — header bar, KPI tiles,
 * filter chip strip, body layout. The map module (slbi-hunt-map.css) and the
 * sidebar module (slbi-hunt-sidebar.css) own their own internals. Decisions
 * baked in:
 *   D3   Bucket chip colors: TM #3b82f6 / TD #10b981 / WD #f59e0b.
 *        ACTIVE chip + general accent: #2563EB (Seekly blue).
 *   D7   Mobile breakpoint 720px — stack-below (map 50vh top, sidebar below).
 *   D23  Filter chips are pure toggle UI; data-attribute marks bucket/status/zone.
 */

/* ─── Reset / base ──────────────────────────────────────────────────────── */
html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  background: #f8fafc;
  color: #0f172a;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 14px;
}
body.slbi-page {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ─── Topbar (matches reports.html / home.html convention) ──────────────── */
.slbi-topbar {
  background: #fff;
  border-bottom: 1px solid #e5e7eb;
  padding: 12px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  flex-shrink: 0;
}
.slbi-topbar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
.slbi-topbar-logo {
  width: 32px;
  height: 32px;
  background: #15803d;
  color: #fff;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}
.slbi-topbar-wordmark {
  font-weight: 700;
  color: #0f172a;
  line-height: 1.2;
}
.slbi-topbar-wordmark small {
  display: block;
  font-weight: 500;
  color: #64748b;
  font-size: 11px;
}
.slbi-topbar-nav {
  display: flex;
  gap: 18px;
}
.slbi-topbar-nav a {
  color: #475569;
  text-decoration: none;
  font-weight: 500;
  font-size: 14px;
}
.slbi-topbar-nav a:hover { color: #0f172a; }
.slbi-topbar-nav a.active {
  color: #15803d;
  font-weight: 600;
}

/* ─── Header bar (title + KPI tiles) ────────────────────────────────────── */
.slbi-header {
  background: #fff;
  border-bottom: 1px solid #e5e7eb;
  padding: 14px 22px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-shrink: 0;
}
.slbi-header h1 {
  font-size: 18px;
  font-weight: 700;
  margin: 0;
  color: #0f172a;
}
.slbi-header h1 small {
  display: inline-block;
  margin-left: 8px;
  font-size: 12px;
  font-weight: 500;
  color: #64748b;
}
.slbi-header-left {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
  flex: 1 1 auto;
}
.slbi-header h1 {
  white-space: nowrap;
}
.slbi-bucket-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  font-size: 17px;
  color: #475569;
  margin-top: 0;
}
/* 2026-05-22 v2 — [hidden] override (display:flex above wins by default). */
.slbi-bucket-legend[hidden] { display: none; }
.slbi-filter-group[hidden] { display: none; }
.slbi-bl-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}
.slbi-bl-dot {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
}
.slbi-bl-item b {
  font-weight: 700;
  color: #0f172a;
  margin-right: 2px;
}
.slbi-bl-item em {
  font-style: normal;
  color: #94a3b8;
  font-feature-settings: 'tnum';
  font-variant-numeric: tabular-nums;
  margin-left: 2px;
}
.slbi-kpis {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}
.slbi-kpi {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  font-size: 11px;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 600;
}
.slbi-kpi b {
  font-size: 16px;
  font-weight: 700;
  color: #0f172a;
  font-feature-settings: 'tnum';
  font-variant-numeric: tabular-nums;
  text-transform: none;
  letter-spacing: 0;
}

/* ─── Filter strip ──────────────────────────────────────────────────────── */
.slbi-filters {
  background: #fff;
  border-bottom: 1px solid #e5e7eb;
  padding: 10px 22px;
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  align-items: center;
  flex-shrink: 0;
}
.slbi-filter-group {
  display: flex;
  align-items: center;
  gap: 6px;
}
.slbi-filter-group > label {
  font-size: 11px;
  color: #64748b;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-right: 2px;
}
.slbi-chip {
  border: 1px solid #cbd5e1;
  background: #fff;
  color: #475569;
  font-size: 12px;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.12s ease, color 0.12s ease, border-color 0.12s ease;
  font-family: inherit;
  line-height: 1.1;
}
.slbi-chip:hover { border-color: #94a3b8; }

/* Active state — bucket chips colored to match the map dots */
.slbi-chip.active { color: #fff; }
.slbi-chip[data-bucket="Through Medium"].active {
  background: #3b82f6;
  border-color: #3b82f6;
}
.slbi-chip[data-bucket="Through Deep"].active {
  background: #10b981;
  border-color: #10b981;
}
.slbi-chip[data-bucket="Wide-Shallow"].active {
  background: #facc15;
  border-color: #facc15;
  color: #0f172a;
}
.slbi-chip[data-bucket="Wide-Medium"].active {
  background: #f59e0b;
  border-color: #f59e0b;
}
.slbi-chip[data-bucket="Wide-Deep"].active {
  background: #dc2626;
  border-color: #dc2626;
}
/* 2026-05-22 restructure — 4 Koch chips at W>=50, retired KTM/KTD.
   130s/140s keep KTM/KTD pink+purple for continuity; 150s/160+ get
   indigo+cyan. Default ON (slbi-hunt.html ships .active on all 4). */
.slbi-chip[data-bucket="130s KT"].active {
  background: #ec4899;
  border-color: #ec4899;
}
.slbi-chip[data-bucket="140s KT"].active {
  background: #a855f7;
  border-color: #a855f7;
}
.slbi-chip[data-bucket="150s KT"].active {
  background: #6366f1;
  border-color: #6366f1;
}
.slbi-chip[data-bucket="160+ KT"].active {
  background: #06b6d4;
  border-color: #06b6d4;
}
/* 2026-05-22 v2 — No Demo scenario chip palette.
   Distinct teal/emerald/lime/sky/slate family vs Through Lots' warm + violet
   palette above. Source: dispatch + slbi_scenario_expansion_proposal.md. */
.slbi-chip[data-scenario="D"].active {
  background: #0d9488;
  border-color: #0d9488;
}
.slbi-chip[data-scenario="DA"].active {
  background: #059669;
  border-color: #059669;
}
.slbi-chip[data-scenario="DB"].active {
  background: #65a30d;
  border-color: #65a30d;
}
.slbi-chip[data-scenario="U"].active {
  background: #0284c7;
  border-color: #0284c7;
}
.slbi-chip[data-scenario="V"].active {
  background: #475569;
  border-color: #475569;
}
/* 2026-05-22 hb-on-page — No-Demo page H + B bucket chip palette.
   B chips = purple gradient (B1 light → B4 deep). H chips = peach gradient
   (H1 cream → H6 amber). Matches the legend swatches + the map pin paint
   in slbi-hunt-map.js (B_HEX / H_HEX). */
/* 2026-05-22 hb-on-page rebound: 5 B chips (dropped 2,500-3,000; added
   4,000-4,500 / 4,500-5,000 / 5,000+). Universe floor raised to 3,000 sf. */
.slbi-chip[data-bbucket="B0"].active { background: #e7d4f4; border-color: #c8a9e4; color: #5a3389; }
.slbi-chip[data-bbucket="B1"].active { background: #c8a9e4; border-color: #9e73cc; color: #36165e; }
.slbi-chip[data-bbucket="B2"].active { background: #9e73cc; border-color: #7546b0; color: #ffffff; }
.slbi-chip[data-bbucket="B3"].active { background: #7546b0; border-color: #5a3389; color: #ffffff; }
.slbi-chip[data-bbucket="B4"].active { background: #5a3389; border-color: #3c1f6e; color: #ffffff; }
.slbi-chip[data-bbucket="B5"].active { background: #3c1f6e; border-color: #2a1450; color: #ffffff; }
.slbi-chip[data-hbucket="H1"].active { background: #fff4dc; border-color: #f8c77e; color: #b07800; }
.slbi-chip[data-hbucket="H2"].active { background: #fde8c8; border-color: #f8c77e; color: #8a5300; }
.slbi-chip[data-hbucket="H3"].active { background: #fbd49a; border-color: #efae56; color: #7a4a00; }
.slbi-chip[data-hbucket="H4"].active { background: #f8c77e; border-color: #efae56; color: #6a3f00; }
.slbi-chip[data-hbucket="H5"].active { background: #efae56; border-color: #e89c2d; color: #ffffff; }
.slbi-chip[data-hbucket="H6"].active { background: #e89c2d; border-color: #b07800; color: #ffffff; }
/* Group-label sit between B and H rows in the legend header. */
.slbi-bl-group-label { font-weight: 700; font-size: 11px; color: #475569; margin-right: 4px; padding-left: 8px; }
.slbi-bl-group-label b { color: #1e293b; font-size: 12px; margin-right: 4px; }
.slbi-chip[data-status="ACTIVE"].active {
  background: #2563EB;
  border-color: #2563EB;
}
.slbi-chip[data-status="PENDING"].active {
  background: #eab308;
  border-color: #ca8a04;
  color: #422006;
}
.slbi-chip[data-status="SOLD_12MO"].active {
  background: #6b7280;
  border-color: #6b7280;
}
.slbi-chip[data-status="OFF_MARKET"].active {
  background: #475569;
  border-color: #475569;
}
.slbi-chip[data-zone].active {
  background: #2563EB;
  border-color: #2563EB;
}

/* 2026-05-25 — Has Garage chip — teal so it reads distinctly from the
 * purple Underbuilt chip + blue Active chip + amber Pending chip. */
.slbi-chip[data-garage].active {
  background: #0d9488;
  border-color: #0d9488;
  color: #ffffff;
}
/* 2026-05-25 v3 — Region chips. Slate when active so they read distinctly
 * from purple bucket chips + blue status chips + teal garage chip. */
.slbi-filter-group-region { gap: 4px; }
.slbi-chip[data-region].active {
  background: #1e293b;
  border-color: #1e293b;
  color: #ffffff;
}
.slbi-chip[data-region]:not(.active) {
  background: #f8fafc;
  border-color: #cbd5e1;
  color: #475569;
}
/* 2026-05-25 — visual indicator on dots/pills of parcels with a detached
 * garage. Tiny teal ring outside the existing marker; doesn't interfere
 * with hover/click and stacks on any bucket color. */
.slbi-marker-wrap.has-garage::before {
  content: "";
  position: absolute;
  top: -3px;
  left: -3px;
  right: -3px;
  bottom: -3px;
  border: 2px solid #0d9488;
  border-radius: 50%;
  pointer-events: none;
  z-index: -1;
}
.slbi-marker-wrap.has-garage {
  position: relative;
}
/* v2.33: Underbuilt-only chip needs its own active style or it disappears
 * (base .slbi-chip.active sets color:#fff but no background = white-on-white).
 * Distinct purple to read clearly against the blue/red bucket chips and the
 * blue zone chips. */
.slbi-chip[data-underbuilt].active {
  background: #7c3aed;
  border-color: #7c3aed;
  color: #fff;
}
.slbi-chip[data-underbuilt].active:hover {
  background: #6d28d9;
  border-color: #6d28d9;
}

.slbi-price-select {
  border: 1px solid #cbd5e1;
  background: #fff;
  color: #0f172a;
  font-size: 12px;
  font-weight: 500;
  padding: 5px 10px;
  border-radius: 6px;
  font-family: inherit;
  cursor: pointer;
}

/* v2.34: Price-range inputs (MLS + AVM). Replaces the tier dropdown. */
.slbi-price-input {
  border: 1px solid #cbd5e1;
  background: #fff;
  color: #0f172a;
  font-size: 12px;
  font-weight: 500;
  padding: 5px 8px;
  border-radius: 6px;
  font-family: inherit;
  width: 72px;
  outline: none;
  transition: border-color 0.12s ease, box-shadow 0.12s ease;
}
.slbi-price-input::placeholder { color: #94a3b8; font-weight: 400; }
.slbi-price-input:hover { border-color: #94a3b8; }
.slbi-price-input:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.15);
}
.slbi-price-sep {
  color: #94a3b8;
  font-size: 13px;
  font-weight: 600;
  user-select: none;
}

/* ─── Body (map + sidebar) ──────────────────────────────────────────────── */
.slbi-body {
  display: flex;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
}
.slbi-map-host {
  flex: 1 1 auto;
  position: relative;
  min-width: 0;
  background: #eef2f7;
}
.slbi-sidebar-host {
  flex: 0 0 400px;
  overflow-y: auto;
  background: #fff;
  border-left: 1px solid #e5e7eb;
}

/* ─── Areas Statistics button ───────────────────────────────────────────── */
.slbi-filter-actions {
  margin-left: auto;
}
.slbi-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid #0f172a;
  background: #0f172a;
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  font-family: inherit;
  line-height: 1.1;
  transition: background 0.12s ease, border-color 0.12s ease;
}
.slbi-action-btn:hover {
  background: #1e293b;
  border-color: #1e293b;
}
.slbi-action-btn.active {
  background: #2563EB;
  border-color: #2563EB;
}
.slbi-action-btn svg {
  flex-shrink: 0;
}
/* Reset button: distinct red-orange outline so it reads as a destructive
 * action. No active state — single-click resets. */
.slbi-action-btn.slbi-reset {
  background: #fff;
  border-color: #fecaca;
  color: #b91c1c;
}
.slbi-action-btn.slbi-reset:hover {
  background: #fef2f2;
  border-color: #fca5a5;
  color: #991b1b;
}

/* Export CSV button: neutral outline, no active state */
.slbi-action-btn.slbi-export {
  background: #fff;
  border-color: #cbd5e1;
  color: #475569;
}
.slbi-action-btn.slbi-export:hover {
  background: #f1f5f9;
  border-color: #94a3b8;
  color: #0f172a;
}
.slbi-action-btn.slbi-export:disabled {
  opacity: 0.5;
  cursor: wait;
}

/* Lot Lines toggle: distinct slate-gray active so it reads as a layer, not
 * a scope lock or modal toggle. Inactive = white outline (overlay off). */
.slbi-action-btn.slbi-lot-lines {
  background: #fff;
  border-color: #cbd5e1;
  color: #475569;
}
.slbi-action-btn.slbi-lot-lines:hover {
  background: #f8fafc;
  border-color: #94a3b8;
}
.slbi-action-btn.slbi-lot-lines.active {
  background: #475569;
  border-color: #475569;
  color: #fff;
}
.slbi-action-btn.slbi-lot-lines.active:hover {
  background: #334155;
  border-color: #334155;
}

/* LA-only toggle: distinct green active state so it reads as a scope lock,
 * not "modal open". Inactive = gray outline (constraint released). */
.slbi-action-btn.slbi-la-only {
  background: #fff;
  border-color: #cbd5e1;
  color: #475569;
}
.slbi-action-btn.slbi-la-only:hover {
  background: #f8fafc;
  border-color: #94a3b8;
}
.slbi-action-btn.slbi-la-only.active {
  background: #15803d;
  border-color: #15803d;
  color: #fff;
}
.slbi-action-btn.slbi-la-only.active:hover {
  background: #166534;
  border-color: #166534;
}

/* v2.29 — Listings Hunt mini-group: tiny inline label that visually groups
   the On-hunt + Off-hunt toggle chips next to "SLBI dots". Vertical separator
   on the left so the user reads it as a sub-section of the action strip. */
.slbi-mini-group-label {
  display: inline-flex;
  align-items: center;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #64748b;
  padding: 0 8px 0 10px;
  margin-left: 4px;
  border-left: 1px solid #e2e8f0;
  height: 22px;
  user-select: none;
}

/* On-hunt toggle: blue active (matches the on-hunt dot palette anchor). White
   outline when off so the dot palette hint stays visible. */
.slbi-action-btn.slbi-on-hunt {
  background: #fff;
  border-color: #cbd5e1;
  color: #475569;
}
.slbi-action-btn.slbi-on-hunt:hover {
  background: #f8fafc;
  border-color: #94a3b8;
}
.slbi-action-btn.slbi-on-hunt.active {
  background: #2563EB;
  border-color: #2563EB;
  color: #fff;
}
.slbi-action-btn.slbi-on-hunt.active:hover {
  background: #1d4ed8;
  border-color: #1d4ed8;
}

/* Off-hunt toggle: teal active (matches the off-hunt dot palette anchor). */
.slbi-action-btn.slbi-off-hunt {
  background: #fff;
  border-color: #cbd5e1;
  color: #475569;
}
.slbi-action-btn.slbi-off-hunt:hover {
  background: #f8fafc;
  border-color: #94a3b8;
}
.slbi-action-btn.slbi-off-hunt.active {
  background: #0d9488;
  border-color: #0d9488;
  color: #fff;
}
.slbi-action-btn.slbi-off-hunt.active:hover {
  background: #0f766e;
  border-color: #0f766e;
}

/* Hunt swatch — tiny 3-dot strip that previews the on/off palette inside each
   toggle chip so the user can tell which colors are about to vanish. */
.slbi-hunt-swatch {
  display: inline-block;
  width: 18px;
  height: 8px;
  border-radius: 2px;
  flex-shrink: 0;
}
.slbi-hunt-swatch-on {
  background: linear-gradient(90deg, #3B82F6 0 33%, #EAB308 33% 66%, #6B7280 66% 100%);
}
.slbi-hunt-swatch-off {
  background: linear-gradient(90deg, #14B8A6 0 33%, #C2410C 33% 66%, #0F172A 66% 100%);
}

/* v2.21.6 — Targets toggle: white when off, gradient-stoplight when on so
   the button visually previews the dot colors active in target mode. */
.slbi-action-btn.slbi-targets {
  background: #fff;
  border-color: #cbd5e1;
  color: #475569;
}
.slbi-action-btn.slbi-targets:hover {
  background: #f8fafc;
  border-color: #94a3b8;
}
.slbi-action-btn.slbi-targets.active {
  background: linear-gradient(90deg, #fbbf24 0 25%, #84cc16 25% 50%, #10b981 50% 75%, #047857 75% 100%);
  border-color: #047857;
  color: #fff;
  text-shadow: 0 0 4px rgba(0,0,0,0.45);
  font-weight: 700;
}
.slbi-action-btn.slbi-targets.active:hover {
  filter: brightness(0.95);
}

/* ─── Areas Statistics modal (left-rail drawer) ─────────────────────────── */
.slbi-modal-scrim {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(15, 23, 42, 0.18);
  z-index: 90;
}
.slbi-modal-scrim.show { display: block; }

.slbi-nbhd-modal {
  position: fixed;
  top: 40px;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  /* v2.35: widened 1600 -> 1880 to fit 3 new sold-market columns
   * (TH+Condo p50, TH+Condo p80, Avg <2K sf). max-width clamp keeps it
   * inside narrow viewports. */
  width: 1880px;
  max-width: 98vw;
  background: #f8fafc;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  box-shadow: 0 18px 50px rgba(15, 23, 42, 0.22), 0 4px 12px rgba(15, 23, 42, 0.08);
  z-index: 100;
  display: none;
  flex-direction: column;
  overflow: hidden;
  font-family: inherit;
}
.slbi-nbhd-modal.open {
  display: flex;
}
/* Grouped per-bucket × zone_type header — 2-row thead. Each bucket has a
 * colored group cell (TM/TD/WS/WM/WD) spanning 2 sub-columns (SFR + MF). */
.slbi-nm-table-wide th.col-group {
  text-align: center;
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  border-bottom: 2px solid rgba(15, 23, 42, 0.08);
  padding: 6px 8px;
}
.slbi-nm-table-wide th.col-group.col-tm { background: #dbeafe; color: #1d4ed8; }
.slbi-nm-table-wide th.col-group.col-td { background: #d1fae5; color: #047857; }
.slbi-nm-table-wide th.col-group.col-ws { background: #fef9c3; color: #a16207; }
.slbi-nm-table-wide th.col-group.col-wm { background: #fed7aa; color: #c2410c; }
.slbi-nm-table-wide th.col-group.col-wd { background: #fecaca; color: #b91c1c; }
.slbi-nm-table-wide th.col-group .dim {
  display: block;
  font-size: 9px;
  font-weight: 500;
  color: rgba(15, 23, 42, 0.55);
  text-transform: none;
  letter-spacing: 0;
}
.slbi-nm-table-wide th.col-sub {
  font-size: 10px;
  font-weight: 600;
  color: #64748b;
  padding: 4px 6px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-bottom: 1px solid #e5e7eb;
}
.slbi-nm-table-wide td.col-sub { padding: 4px 6px; }
.slbi-nm-table-wide .slbi-nm-pill.tm-sub { background: rgba(59, 130, 246, 0.10); color: #1d4ed8; border-color: rgba(59, 130, 246, 0.25); }
.slbi-nm-table-wide .slbi-nm-pill.td-sub { background: rgba(16, 185, 129, 0.12); color: #047857; border-color: rgba(16, 185, 129, 0.28); }
.slbi-nm-table-wide .slbi-nm-pill.ws-sub { background: rgba(202, 138, 4, 0.12); color: #92400e; border-color: rgba(202, 138, 4, 0.28); }
.slbi-nm-table-wide .slbi-nm-pill.wm-sub { background: rgba(245, 158, 11, 0.14); color: #9a3412; border-color: rgba(245, 158, 11, 0.30); }
.slbi-nm-table-wide .slbi-nm-pill.wd-sub { background: rgba(220, 38, 38, 0.10); color: #b91c1c; border-color: rgba(220, 38, 38, 0.25); }
/* 2026-05-23 — TM/TD removal cleanup. The HTML for these chips + legend
   rows was deleted in commit 574f00d; the prior CSS hide rules are gone now
   because the nth-child(1)+(2) rule would otherwise hide WS+WM (the new
   first two legend items). The data-bucket selectors are also harmless to
   leave dropped since the matching HTML doesn't exist. */

/* v2.21.5 — Aggregate total cells (Through / Wide / Combined). Through uses a
   neutral indigo, Wide uses a warm tan. The combined cell stays plain. */
.slbi-nm-table-wide td.col-through-total .slbi-nm-pill.through-total {
  background: rgba(99, 102, 241, 0.12); color: #4338ca; border-color: rgba(99, 102, 241, 0.28);
  font-weight: 700;
}
.slbi-nm-table-wide td.col-wide-total .slbi-nm-pill.wide-total {
  background: rgba(120, 113, 108, 0.12); color: #57534e; border-color: rgba(120, 113, 108, 0.28);
  font-weight: 700;
}
.slbi-nm-table-wide td.col-total-combined { font-weight: 700; }

/* 2026-05-22 — H/B filter match cells. Stronger saturations than the rollup
   totals so the filtered counts stand out (this is the deal-flow number).
   Through-match = deeper indigo. Wide-match = deeper tan. Active subset
   shows as a tiny muted line beneath the pill. */
.slbi-nm-table-wide td.col-through-match .slbi-nm-pill.through-match {
  background: rgba(99, 102, 241, 0.22); color: #312e81; border-color: rgba(99, 102, 241, 0.45);
  font-weight: 700;
}
.slbi-nm-table-wide td.col-wide-match .slbi-nm-pill.wide-match {
  background: rgba(120, 113, 108, 0.22); color: #3f3f46; border-color: rgba(120, 113, 108, 0.45);
  font-weight: 700;
}
.slbi-nm-table-wide td .slbi-nm-match-active {
  display: block;
  font-size: 10px;
  color: #16a34a;
  font-weight: 600;
  margin-top: 1px;
  letter-spacing: 0.02em;
}
.slbi-nm-table-wide th.col-through-match,
.slbi-nm-table-wide th.col-wide-match {
  background: #eef2ff;
  color: #312e81;
  font-size: 11px;
}
/* 2026-05-23 — L/W (Through Lot + Wide Lot) filter bar inside the
   Through-Lots Areas Statistics modal. Mirrors No-Demo's filter-bar
   styling exactly so the two pages stay visually consistent. */
.slbi-tl-filterbar {
  margin: 6px 12px 8px 12px;
  background: #f4f1ea;
  border: 1px solid #e0d8c5;
  border-radius: 8px;
  padding: 10px 14px;
  display: flex;
  gap: 24px;
  align-items: center;
  flex-wrap: wrap;
}
.slbi-tl-filter-group {
  display: flex;
  align-items: center;
  gap: 10px;
}
.slbi-tl-filter-label {
  font-weight: 700;
  font-size: 11px;
  color: #5b1e8e;
  letter-spacing: 0.4px;
  text-transform: uppercase;
}
.slbi-tl-filter-control {
  display: inline-flex;
  align-items: center;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  overflow: hidden;
}
.slbi-tl-filter-control select,
.slbi-tl-filter-select {
  border: none;
  padding: 7px 10px;
  font-size: 12px;
  font-weight: 600;
  background: #fff;
  cursor: pointer;
  outline: none;
  color: #111827;
}
.slbi-tl-filter-control select + select {
  border-left: 1px solid #e5e7eb;
}
.slbi-tl-filter-summary {
  margin-left: auto;
  font-size: 12px;
  color: #6b7280;
}
.slbi-tl-filter-summary strong {
  color: #111827;
}

/* 2026-05-21 — Return-band columns (Scen A · 4×1200 / Scen B · 2×1200 + 2×1600)
   Two scenario column groups, each with 5 tier sub-cells + 1 median cell.
   Cell format: "<active> / <total>" with active bolded + total grey-suffixed.
   Active count drives the background colour. Mirrors the Lot Report's
   Best Areas section so the two views read the same. */
.slbi-nm-table-wide th.col-group.col-scen-a { background: #ede9fe; color: #5b21b6; }
.slbi-nm-table-wide th.col-group.col-scen-b { background: #ecfeff; color: #0e7490; }
.slbi-nm-table-wide th.col-sub.ret-tier {
  font-size: 9.5px;
  letter-spacing: 0.02em;
  padding: 4px 5px;
}
.slbi-nm-table-wide th.col-sub.ret-tier.ret-bar-20   { background: #f0fdf4; color: #166534; }
.slbi-nm-table-wide th.col-sub.ret-tier.ret-bar-15   { background: #f7fee7; color: #4d7c0f; }
.slbi-nm-table-wide th.col-sub.ret-tier.ret-bar-10   { background: #fefce8; color: #854d0e; }
.slbi-nm-table-wide th.col-sub.ret-tier.ret-bar-0    { background: #fff7ed; color: #9a3412; }
.slbi-nm-table-wide th.col-sub.ret-tier.ret-bar-loss { background: #fef2f2; color: #991b1b; }
.slbi-nm-table-wide td.ret-cell {
  padding: 4px 6px;
  text-align: center;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.slbi-nm-table-wide td.ret-cell.ret-bar-20   { background: #dcfce7; color: #15803d; }
.slbi-nm-table-wide td.ret-cell.ret-bar-15   { background: #d9f99d; color: #4d7c0f; }
.slbi-nm-table-wide td.ret-cell.ret-bar-10   { background: #fef9c3; color: #854d0e; }
.slbi-nm-table-wide td.ret-cell.ret-bar-0    { background: #fed7aa; color: #9a3412; }
.slbi-nm-table-wide td.ret-cell.ret-bar-loss { background: #fecaca; color: #991b1b; }
.slbi-nm-table-wide td.ret-cell.zero         { color: #94a3b8; }
.slbi-nm-table-wide td.ret-cell .ret-active  { font-weight: 700; }
.slbi-nm-table-wide td.ret-cell .ret-total   { color: rgba(15, 23, 42, 0.45); font-weight: 500; font-size: 0.9em; }
.slbi-nm-table-wide td.ret-cell.zero .ret-active { color: #cbd5e1; }
.slbi-nm-table-wide td.ret-cell.ret-med .is-pos { color: #15803d; }
.slbi-nm-table-wide td.ret-cell.ret-med .is-neg { color: #b91c1c; }

/* v4 redesign 2026-05-21: Areas-modal Scen A/B redesign.
 * - Middle "ACTIVE / TOTAL" label band spanning each scenario's 6 cells.
 * - Active + Total summary header cells (green / beige tint).
 * - Summary body cells (green / beige fill).
 * - TOTAL footer row (purple-tinted, sticks to bottom).
 */
.slbi-nm-table-wide .slbi-nm-actlabelrow th.slbi-nm-actlabel-a {
  background: #f3edff;
  color: #5b21b6;
  font-size: 9px;
  letter-spacing: 0.08em;
  font-weight: 600;
  text-align: center;
  padding: 3px 4px;
  border-bottom: 1px solid rgba(91, 33, 182, 0.18);
}
.slbi-nm-table-wide .slbi-nm-actlabelrow th.slbi-nm-actlabel-b {
  background: #e8f5f3;
  color: #0e7490;
  font-size: 9px;
  letter-spacing: 0.08em;
  font-weight: 600;
  text-align: center;
  padding: 3px 4px;
  border-bottom: 1px solid rgba(14, 116, 144, 0.18);
}

/* Summary-cell header tints (Active = green, Total = beige). Apply to both
 * scen A and scen B columns; the scenario tint comes from the group row. */
.slbi-nm-table-wide th.col-sub.ret-summary-active {
  background: #dcfce7;
  color: #15803d;
  font-size: 9.5px;
  font-weight: 700;
  padding: 4px 5px;
}
.slbi-nm-table-wide th.col-sub.ret-summary-total {
  background: #fef3c7;
  color: #92400e;
  font-size: 9.5px;
  font-weight: 700;
  padding: 4px 5px;
}

/* Summary body cells - matching tints, slightly muted */
.slbi-nm-table-wide td.ret-cell.ret-summary.ret-summary-active {
  background: #ecfdf5;
  color: #15803d;
  font-weight: 700;
}
.slbi-nm-table-wide td.ret-cell.ret-summary.ret-summary-total {
  background: #fffbeb;
  color: #92400e;
  font-weight: 700;
}
.slbi-nm-table-wide td.ret-cell.ret-summary.zero {
  background: #f8fafc;
  color: #cbd5e1;
}

/* TOTAL footer row - purple-tinted, sticks to bottom of tbody. */
.slbi-nm-table-wide tfoot.slbi-nm-tfoot tr.slbi-nm-totrow {
  background: #f5f3ff;
  font-weight: 700;
}
.slbi-nm-table-wide tfoot.slbi-nm-tfoot td.slbi-nm-totlabel {
  background: #ede9fe;
  color: #5b21b6;
  text-align: right;
  padding: 6px 10px;
  letter-spacing: 0.05em;
  font-size: 11px;
  border-top: 2px solid #c4b5fd;
}
.slbi-nm-table-wide tfoot.slbi-nm-tfoot td.slbi-nm-totlabel .dim {
  color: rgba(91, 33, 182, 0.6);
  font-weight: 500;
  font-size: 10px;
  margin-left: 4px;
}
.slbi-nm-table-wide tfoot.slbi-nm-tfoot td.ret-cell {
  border-top: 2px solid #c4b5fd;
  font-weight: 700;
}

/* 2026-05-21 v1: Areas-modal cell-click affordance. Cells with `is-clickable`
 * (rendered count > 0) get cursor + subtle box-shadow hover. Loading spinner
 * overlays the cell while the APN fetch is in flight. */
.slbi-nm-table-wide td.ret-cell.is-clickable {
  cursor: pointer;
  position: relative;
  transition: box-shadow 120ms ease-out, transform 80ms ease-out;
}
.slbi-nm-table-wide td.ret-cell.is-clickable:hover {
  box-shadow: inset 0 0 0 2px rgba(15, 23, 42, 0.45);
  transform: translateY(-1px);
}
.slbi-nm-table-wide td.ret-cell.is-loading {
  cursor: progress;
  opacity: 0.55;
}
.slbi-nm-table-wide td.ret-cell.is-loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 12px;
  height: 12px;
  margin: -6px 0 0 -6px;
  border: 2px solid rgba(15, 23, 42, 0.18);
  border-top-color: #5b21b6;
  border-radius: 50%;
  animation: slbiNmSpin 700ms linear infinite;
}
@keyframes slbiNmSpin {
  to { transform: rotate(360deg); }
}

/* 2026-05-21 v1: Transient toast for truncated results (>5000 APNs). */
.slbi-highlight-toast {
  position: fixed;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  background: #1e293b;
  color: #fef3c7;
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.35);
  z-index: 9999;
  pointer-events: none;
  animation: slbiToastIn 200ms ease-out;
}
@keyframes slbiToastIn {
  from { opacity: 0; transform: translate(-50%, -8px); }
  to   { opacity: 1; transform: translate(-50%, 0); }
}

/* 2026-05-21 v1: Map-corner "N highlighted · clear" pill — sibling element
 * appended to the .slbi-map-host. Only visible when N > 0 (.is-visible). */
.slbi-highlight-pill {
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  background: #ffffff;
  color: #1e293b;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.16);
  font-size: 12px;
  font-weight: 600;
  display: none;
  z-index: 9;
  cursor: pointer;
  user-select: none;
  font-variant-numeric: tabular-nums;
}
.slbi-highlight-pill.is-visible {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.slbi-highlight-pill .slbi-highlight-pill-clear {
  color: #6b7280;
  font-weight: 500;
  border-left: 1px solid rgba(15, 23, 42, 0.12);
  padding-left: 8px;
  margin-left: 2px;
  transition: color 100ms ease-out;
}
.slbi-highlight-pill:hover .slbi-highlight-pill-clear {
  color: #dc2626;
}

/* v2.35: sold-market benchmark columns. Subtle teal tint distinguishes them
 * from bucket-count columns and from the existing Med Sold column. */
.slbi-nm-table-wide th.col-mkt {
  background: #ccfbf1;
  color: #0f766e;
  border-left: 1px solid rgba(15, 23, 42, 0.06);
}
.slbi-nm-table-wide th.col-mkt .dim {
  display: block;
  font-size: 10px;
  font-weight: 400;
  color: #14b8a6;
  text-transform: none;
  letter-spacing: 0;
  margin-top: 1px;
}
.slbi-nm-table-wide td.col-mkt {
  background: rgba(204, 251, 241, 0.20);
  font-variant-numeric: tabular-nums;
}
.slbi-nm-table-wide td.col-mkt + td.col-mkt {
  border-left: 1px dashed rgba(15, 23, 42, 0.06);
}
/* v2.35.1: psf suffix rendered smaller + dimmer alongside the price value.
 * Format: "$590k/$653psf" -- the slash + psf chunk drops back so the headline
 * price reads as the dominant number. */
.slbi-nm-table-wide td.col-mkt .mkt-psf {
  font-size: 11px;
  color: #64748b;
  font-weight: 400;
  margin-left: 1px;
}
.slbi-nm-table-wide th.col-through-total,
.slbi-nm-table-wide th.col-wide-total {
  background: #f1f5f9; color: #334155;
}
.slbi-nm-kpi .val.through { color: #4338ca; }
.slbi-nm-kpi .val.wide    { color: #78716c; }

/* 2026-05-22 restructure — 4 Koch chip columns at W>=50, retired KTM/KTD.
   130s/140s keep KTM/KTD colors (pink/purple); 150s/160+ get indigo/cyan. */
.slbi-nm-table-wide th.col-group.col-k130 { background: #fce7f3; color: #be185d; }
.slbi-nm-table-wide th.col-group.col-k140 { background: #ede9fe; color: #7e22ce; }
.slbi-nm-table-wide th.col-group.col-k150 { background: #e0e7ff; color: #4338ca; }
.slbi-nm-table-wide th.col-group.col-k160 { background: #cffafe; color: #0e7490; }
.slbi-nm-table-wide th.col-sub.col-k130-sub { color: #be185d; }
.slbi-nm-table-wide th.col-sub.col-k140-sub { color: #7e22ce; }
.slbi-nm-table-wide th.col-sub.col-k150-sub { color: #4338ca; }
.slbi-nm-table-wide th.col-sub.col-k160-sub { color: #0e7490; }
.slbi-nm-table-wide .slbi-nm-pill.k130-sub { background: rgba(236, 72, 153, 0.10); color: #be185d; border-color: rgba(236, 72, 153, 0.28); }
.slbi-nm-table-wide .slbi-nm-pill.k140-sub { background: rgba(168, 85, 247, 0.10); color: #7e22ce; border-color: rgba(168, 85, 247, 0.28); }
.slbi-nm-table-wide .slbi-nm-pill.k150-sub { background: rgba(99, 102, 241, 0.10); color: #4338ca; border-color: rgba(99, 102, 241, 0.28); }
.slbi-nm-table-wide .slbi-nm-pill.k160-sub { background: rgba(6, 182, 212, 0.10); color: #0e7490; border-color: rgba(6, 182, 212, 0.28); }
/* v2.26: SB9-eligible sub-column. Teal/green chip — distinct from blue SFR
   and pink MF. Solid background + white text so the count reads as a stronger
   signal than the muted SFR/MF tints (since SB9 is the "this lot qualifies"
   ground truth, not just "this is what zoning says"). */
.slbi-nm-table-wide .slbi-nm-pill.sb9-sub { background: #10b981; color: #fff; border-color: #059669; font-weight: 700; }
.slbi-nm-table-wide th.col-sub.col-sb9-sub { color: #059669; font-weight: 700; }
.slbi-nm-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 22px;
  background: #fff;
  border-bottom: 1px solid #e5e7eb;
  flex: 0 0 auto;
}
.slbi-nm-title {
  font-size: 16px;
  font-weight: 700;
  color: #0f172a;
}
.slbi-nm-close {
  border: none;
  background: transparent;
  color: #64748b;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  padding: 0 6px;
  border-radius: 4px;
}
.slbi-nm-close:hover { color: #0f172a; background: #f1f5f9; }
.slbi-nm-summary {
  padding: 10px 22px;
  font-size: 12px;
  color: #475569;
  background: #fff;
  border-bottom: 1px solid #e5e7eb;
  line-height: 1.4;
}
.slbi-nm-summary strong { color: #0f172a; font-weight: 600; }
.slbi-nm-kpis {
  display: grid;
  /* v2.26: expanded from 9 → 10 columns to fit the new SB9 ✓ KPI tile. */
  grid-template-columns: repeat(10, 1fr);
  gap: 5px;
  padding: 10px 22px;
  background: #fff;
  border-bottom: 1px solid #e5e7eb;
}
.slbi-nm-kpi {
  display: flex;
  flex-direction: column;
  padding: 6px 8px;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  background: #f8fafc;
}
.slbi-nm-kpi .lbl {
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #64748b;
  line-height: 1.2;
}
.slbi-nm-kpi .val {
  font-size: 16px;
  font-weight: 700;
  color: #0f172a;
  font-feature-settings: 'tnum';
  font-variant-numeric: tabular-nums;
  margin-top: 2px;
}
.slbi-nm-kpi .val.tm { color: #3b82f6; }
.slbi-nm-kpi .val.td { color: #10b981; }
.slbi-nm-kpi .val.ws { color: #ca8a04; }
.slbi-nm-kpi .val.wm { color: #f59e0b; }
.slbi-nm-kpi .val.wd { color: #dc2626; }
/* v2.21 Koch overlay KPI tile values */
.slbi-nm-kpi .val.k130 { color: #ec4899; }
.slbi-nm-kpi .val.k140 { color: #a855f7; }
.slbi-nm-kpi .val.k150 { color: #6366f1; }
.slbi-nm-kpi .val.k160 { color: #06b6d4; }
.slbi-nm-kpi .lbl em { font-style: normal; opacity: 0.55; font-size: 0.85em; margin-left: 2px; }
.slbi-nm-kpi .val.sfr { color: #2563EB; }
.slbi-nm-kpi .val.sb9 { color: #059669; }
.slbi-nm-kpi .val.mf { color: #be185d; }

.slbi-nm-controls {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 10px 22px;
  background: #fff;
  border-bottom: 1px solid #e5e7eb;
  flex-wrap: wrap;
}
.slbi-nm-search {
  flex: 1 1 200px;
  font: inherit;
  font-size: 13px;
  padding: 6px 10px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  background: #fff;
  color: #0f172a;
}
.slbi-nm-search:focus {
  outline: none;
  border-color: #2563EB;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.18);
}
.slbi-nm-chips {
  display: flex;
  gap: 6px;
}
.slbi-nm-chip {
  border: 1px solid #cbd5e1;
  background: #fff;
  color: #475569;
  font-size: 12px;
  font-weight: 600;
  padding: 5px 11px;
  border-radius: 999px;
  cursor: pointer;
  font-family: inherit;
}
.slbi-nm-chip:hover { border-color: #94a3b8; }
.slbi-nm-chip.active {
  background: #0f172a;
  color: #fff;
  border-color: #0f172a;
}
.slbi-nm-chip[data-bucket="TM"].active { background: #3b82f6; border-color: #3b82f6; }
.slbi-nm-chip[data-bucket="TD"].active { background: #10b981; border-color: #10b981; }
.slbi-nm-chip[data-bucket="WS"].active { background: #facc15; border-color: #facc15; color: #0f172a; }
.slbi-nm-chip[data-bucket="WM"].active { background: #f59e0b; border-color: #f59e0b; }
.slbi-nm-chip[data-bucket="WD"].active { background: #dc2626; border-color: #dc2626; }

.slbi-nm-multibar {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 8px 22px;
  background: #f1f5f9;
  border-bottom: 1px solid #e5e7eb;
  font-size: 12px;
  color: #475569;
}
.slbi-nm-multibar-count {
  flex: 1 1 auto;
  font-weight: 600;
}
.slbi-nm-multibar button {
  border: 1px solid #cbd5e1;
  background: #fff;
  color: #475569;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 6px;
  cursor: pointer;
  font-family: inherit;
}
.slbi-nm-multibar button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.slbi-nm-multibar-flyto:not(:disabled) {
  background: #2563EB;
  border-color: #2563EB;
  color: #fff;
}
.slbi-nm-multibar-flyto:not(:disabled):hover {
  background: #1d4ed8;
  border-color: #1d4ed8;
}

/* ─────────────────────────────────────────────────────────────────────────
   2026-05-25 iter-A — Areas Statistics always-multi clickable cells
   .aa-cell      = a clickable Filter-Match table cell (House / Buildable /
                   Both on No-Demo; Through / Wide on Through Lots)
   .aa-nbhd-name = clickable neighborhood name (or affordance dot on Through
                   Lots where the namelink already owns flyto)
   .aa-toolbar   = inline count badge + Clear button in .slbi-nm-head
   ───────────────────────────────────────────────────────────────────────── */
.aa-cell {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 7px;
  border-radius: 5px;
  border: 1px solid transparent;
  cursor: pointer;
  user-select: none;
  transition: background 0.1s, border-color 0.1s;
}
.aa-cell:hover {
  background: #eff6ff;
  border-color: #bfdbfe;
}
.aa-cell .aa-num,
.aa-cell .aa-pct {
  pointer-events: none;
}
.aa-cell .aa-pct {
  color: #94a3b8;
  font-size: 11px;
  font-weight: 500;
}
.aa-cell.aa-both .aa-num {
  color: #6d28d9;
}
.aa-cell.aa-selected {
  background: #16a34a;
  border-color: #15803d;
  color: #fff;
}
.aa-cell.aa-selected .aa-num,
.aa-cell.aa-selected .aa-pct,
.aa-cell.aa-selected .slbi-nm-pill {
  color: #fff;
}
.aa-cell.aa-selected .slbi-nm-pill {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.35);
}
.aa-cell.aa-selected .slbi-nm-match-active {
  color: #f0fdf4;
}
.aa-cell.aa-selected::before {
  content: "\2713";  /* ✓ */
  color: #fff;
  font-weight: 900;
  font-size: 11px;
  margin-right: 2px;
}

.aa-nbhd-name {
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid transparent;
  display: inline-block;
  transition: background 0.1s, border-color 0.1s;
  /* 2026-05-25 fix — was font-size:11px + color:#94a3b8 ("subtle dot" style
     borrowed from Through Lots), but on No-Demo this IS the main Neighborhood
     column. Pale-gray-on-white made the column look empty ("not populating").
     Inherit cell typography so the name reads at full strength on both pages. */
  font-size: inherit;
  color: inherit;
  font-weight: inherit;
  user-select: none;
}
.aa-nbhd-name:hover {
  background: #fef3c7;
  border-color: #fcd34d;
  color: #92400e;
}
.aa-nbhd-name.aa-selected {
  background: #ca8a04;
  color: #fff;
  border-color: #a16207;
}
.aa-nbhd-name.aa-selected::before {
  content: "\2713 ";  /* ✓ */
  font-weight: 900;
}

.slbi-nd-row.aa-row-has-sel,
.slbi-nm-row.aa-row-has-sel {
  background: #f0fdf4;
}

.aa-toolbar {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-right: 12px;
}
.aa-count-badge {
  background: #16a34a;
  color: #fff;
  padding: 3px 9px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.aa-count-badge.aa-zero {
  background: #e2e8f0;
  color: #64748b;
}
.aa-clear-btn {
  border: 1px solid #fecaca;
  background: #fff;
  color: #b91c1c;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 6px;
  cursor: pointer;
  font-family: inherit;
}
.aa-clear-btn:hover:not(:disabled) {
  background: #fef2f2;
}
.aa-clear-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.slbi-nm-table-wrap {
  flex: 1 1 auto;
  overflow-y: auto;
  background: #fff;
}
.slbi-nm-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}
.slbi-nm-table thead th {
  position: sticky;
  top: 0;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  padding: 8px 6px;
  text-align: right;
  font-weight: 600;
  font-size: 10px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #475569;
  cursor: pointer;
  white-space: nowrap;
  user-select: none;
}
.slbi-nm-table thead th.col-check { width: 28px; padding: 6px 4px; cursor: default; }
.slbi-nm-table thead th.col-rank  { width: 32px; text-align: right; }
.slbi-nm-table thead th.col-name  { text-align: left; padding-left: 8px; }
.slbi-nm-table thead th:hover     { color: #0f172a; background: #eef2f7; }
.slbi-nm-table thead th.sort-asc::after  { content: ' ▲'; color: #2563EB; }
.slbi-nm-table thead th.sort-desc::after { content: ' ▼'; color: #2563EB; }
.slbi-nm-table tbody td {
  padding: 7px 6px;
  text-align: right;
  border-bottom: 1px solid #f1f5f9;
  color: #0f172a;
  font-feature-settings: 'tnum';
  font-variant-numeric: tabular-nums;
}
.slbi-nm-table tbody td.col-check { padding: 6px 4px; text-align: center; }
.slbi-nm-table tbody td.col-rank  { color: #64748b; font-weight: 600; }
.slbi-nm-table tbody td.col-name  { text-align: left; padding-left: 8px; font-weight: 600; }
.slbi-nm-table tbody tr.selected  { background: #eff6ff; }
.slbi-nm-table tbody tr:hover     { background: #f8fafc; }
.slbi-nm-namelink {
  color: #2563EB;
  text-decoration: none;
  font-weight: 600;
}
.slbi-nm-namelink:hover { text-decoration: underline; }
.slbi-nm-rowcheck { cursor: pointer; transform: scale(1.05); }

.slbi-nm-pill {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.02em;
  min-width: 30px;
  text-align: center;
}
.slbi-nm-pill.tm { background: #3b82f6; }
.slbi-nm-pill.td { background: #10b981; }
.slbi-nm-pill.ws { background: #facc15; color: #0f172a; }
.slbi-nm-pill.wm { background: #f59e0b; }
.slbi-nm-pill.wd { background: #dc2626; }
.slbi-nm-pill.sfr { background: #2563EB; }
.slbi-nm-pill.mf  { background: #be185d; }

.slbi-nm-empty {
  text-align: center;
  padding: 30px 0;
  color: #94a3b8;
  font-style: italic;
}

/* Modal mobile (<720): full-width drawer */
@media (max-width: 720px) {
  .slbi-nbhd-modal { width: 100vw; max-width: 100vw; }
  .slbi-nm-kpis { grid-template-columns: repeat(2, 1fr); }
}

/* ─── Hover enrichment tooltip — fires /api/slbi/parcel-enrichment ──────── */
.slbi-tt {
  position: fixed;
  z-index: 150;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.15);
  padding: 10px 12px;
  width: 320px;
  max-width: 92vw;
  font-size: 12px;
  color: #0f172a;
  pointer-events: auto;
  line-height: 1.35;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
.slbi-tt::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: -6px;
  transform: translateX(-50%) rotate(45deg);
  width: 10px;
  height: 10px;
  background: #fff;
  border-right: 1px solid #e2e8f0;
  border-bottom: 1px solid #e2e8f0;
}
.slbi-tt.flip-below::after {
  bottom: auto;
  top: -6px;
  border-right: none;
  border-bottom: none;
  border-left: 1px solid #e2e8f0;
  border-top: 1px solid #e2e8f0;
}
.slbi-tt-addr { font-weight: 700; font-size: 13px; }
.slbi-tt-sub { font-size: 11px; color: #64748b; margin-top: 2px; }
.slbi-tt-line { margin-top: 6px; font-weight: 600; }
.slbi-tt-tag {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #fff;
  margin-right: 4px;
  vertical-align: middle;
}
.slbi-tt-tag.active { background: #2563EB; }
.slbi-tt-tag.pending { background: #eab308; color: #422006; }
.slbi-tt-tag.sold { background: #6b7280; }
.slbi-tt-tag.offmkt { background: #94a3b8; }
/* v2.21: instant-render house line (baked GeoJSON fields — beds/baths/sqft/year).
 * Renders synchronously from the feature props with no API latency, mirrors
 * the main Seekly hover-card meta line so the SLBI page feels like the rest
 * of the platform at zoom 17+. */
.slbi-tt-house {
  margin-top: 6px;
  padding: 4px 8px;
  background: #f1f5f9;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  color: #0f172a;
  font-feature-settings: 'tnum';
  font-variant-numeric: tabular-nums;
}
/* v2.25: zoning-capacity line — "Currently: 1 unit · Allowed: 3 units (R3-1)".
 * Underbuilt parcels (room to add density) render in green; at-max parcels
 * render in muted gray so they read as "no upside" at a glance. */
.slbi-tt-capacity {
  margin-top: 4px;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  font-feature-settings: 'tnum';
  font-variant-numeric: tabular-nums;
  background: #f1f5f9;
  color: #475569;
}
.slbi-tt-capacity.underbuilt {
  background: #dcfce7;
  color: #14532d;
  border-left: 3px solid #16a34a;
}
.slbi-tt-capacity.atmax {
  background: #f1f5f9;
  color: #64748b;
  border-left: 3px solid #94a3b8;
}
.slbi-tt-cap-lbl {
  color: inherit;
  opacity: 0.75;
  font-weight: 500;
}
.slbi-tt-loader {
  margin-top: 8px;
  padding: 6px 0;
  font-size: 11px;
  color: #64748b;
  display: flex;
  align-items: center;
  gap: 6px;
}
.slbi-tt-spinner {
  display: inline-block;
  width: 10px;
  height: 10px;
  border: 1.5px solid #cbd5e1;
  border-top-color: #2563EB;
  border-radius: 50%;
  animation: slbi-tt-spin 0.7s linear infinite;
}
@keyframes slbi-tt-spin { to { transform: rotate(360deg); } }
.slbi-tt-enrich {
  margin-top: 8px;
  padding-top: 6px;
  border-top: 1px solid #f1f5f9;
}
.slbi-tt-row {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 2px 0;
  font-size: 11px;
}
.slbi-tt-lbl { color: #64748b; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; font-size: 9px; }
.slbi-tt-val { color: #0f172a; font-weight: 600; font-feature-settings: 'tnum'; font-variant-numeric: tabular-nums; text-align: right; }
.slbi-tt-empty { color: #94a3b8; font-style: italic; font-size: 11px; }
.slbi-tt-cta {
  margin-top: 8px;
  padding-top: 6px;
  border-top: 1px solid #f1f5f9;
  font-size: 10px;
  color: #2563EB;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 600;
}

/* ─── Parcel detail LEFT panel (assessor + MLS dump on parcel click) ────── */
/* Lives on the LEFT side of the screen. Neighborhood Report stays on the
 * RIGHT (Agent 3 sidebar). Both panels visible simultaneously. Same width
 * as the Areas Statistics modal so they share visual mass. */
.slbi-parcel-panel {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: 560px;
  max-width: 92vw;
  background: #fff;
  border-right: 1px solid #e5e7eb;
  box-shadow: 2px 0 18px rgba(15, 23, 42, 0.12);
  z-index: 100;
  display: none;
  flex-direction: column;
  overflow: hidden;
  font-family: inherit;
}
.slbi-parcel-panel.open { display: flex; }

.slbi-pp-head {
  flex: 0 0 auto;
  background: #fff;
  border-bottom: 1px solid #e5e7eb;
  padding: 14px 22px 12px;
}
.slbi-pp-title-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}
.slbi-pp-addr {
  font-size: 18px;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.2;
}
.slbi-pp-sub {
  font-size: 11px;
  color: #64748b;
  margin-top: 3px;
  letter-spacing: 0.02em;
}
.slbi-pp-close {
  border: none;
  background: transparent;
  color: #64748b;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  padding: 0 6px;
  border-radius: 4px;
  flex-shrink: 0;
}
.slbi-pp-close:hover { color: #0f172a; background: #f1f5f9; }
.slbi-pp-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
}
.slbi-pp-pill {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 10px;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
}
.slbi-pp-pill.active      { background: #2563EB; }
.slbi-pp-pill.sold        { background: #6b7280; }
.slbi-pp-pill.offmkt      { background: #94a3b8; }
.slbi-pp-pill.pending     { background: #d97706; }
.slbi-pp-pill.uc          { background: #ea580c; }
.slbi-pp-pill.coming-soon { background: #7c3aed; }
.slbi-pp-seekly-link {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  background: #15803d;
  color: #fff;
  text-decoration: none;
  font-size: 12px;
  font-weight: 600;
  border-radius: 6px;
  border: 1px solid #15803d;
  transition: background 0.12s ease;
}
.slbi-pp-seekly-link:hover {
  background: #166534;
  border-color: #166534;
}

.slbi-pp-sec {
  padding: 14px 22px;
  border-bottom: 1px solid #f1f5f9;
  flex: 0 0 auto;
}
.slbi-pp-sec:last-child { border-bottom: none; }
.slbi-pp-sec-title {
  font-size: 10px;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 10px;
}
.slbi-pp-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px 16px;
}
.slbi-pp-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 12px;
  padding: 3px 0;
  gap: 8px;
}
.slbi-pp-row .lbl {
  color: #64748b;
  font-weight: 500;
}
.slbi-pp-row .val {
  color: #0f172a;
  font-weight: 600;
  font-feature-settings: 'tnum';
  font-variant-numeric: tabular-nums;
  text-align: right;
}
.slbi-pp-row .val .dim { color: #94a3b8; font-weight: 400; }
.slbi-pp-hint {
  color: #94a3b8;
  font-weight: 400;
  font-size: 11px;
  margin-left: 4px;
}
.slbi-pp-empty {
  font-size: 11px;
  color: #64748b;
  line-height: 1.5;
  padding: 8px 10px;
  background: #f8fafc;
  border-radius: 4px;
  border-left: 3px solid #cbd5e1;
}
.slbi-pp-empty b {
  color: #0f172a;
  font-weight: 600;
}

.slbi-pp-remarks {
  margin-top: 8px;
  font-size: 11px;
  color: #475569;
  line-height: 1.45;
  padding: 8px 10px;
  background: #f8fafc;
  border-radius: 4px;
  border-left: 3px solid #cbd5e1;
}
.slbi-pp-bldgs {
  margin-top: 8px;
  padding-top: 6px;
  border-top: 1px solid #f1f5f9;
}
.slbi-pp-bldg-row {
  display: flex;
  gap: 10px;
  padding: 3px 0;
  font-size: 11px;
  font-feature-settings: 'tnum';
  font-variant-numeric: tabular-nums;
}
.slbi-pp-bldg-n {
  flex: 0 0 50px;
  color: #64748b;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 10px;
}
.slbi-pp-bldg-detail {
  color: #0f172a;
}
.slbi-pp-legal {
  margin-top: 8px;
  padding: 6px 10px;
  background: #f8fafc;
  border-radius: 4px;
  font-size: 10px;
  color: #64748b;
  line-height: 1.4;
}
.slbi-pp-legal span { color: #0f172a; font-family: ui-monospace, "SF Mono", Menlo, monospace; }

.slbi-pp-history {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.slbi-pp-history-row {
  display: grid;
  grid-template-columns: 90px 1fr 80px;
  align-items: baseline;
  gap: 8px;
  padding: 4px 0;
  font-size: 12px;
  border-bottom: 1px dashed #f1f5f9;
}
.slbi-pp-history-row:last-child { border-bottom: none; }
.slbi-pp-history-date { color: #64748b; font-weight: 600; font-size: 11px; }
.slbi-pp-history-addr { color: #0f172a; }
.slbi-pp-history-price { color: #0f172a; font-weight: 700; text-align: right; font-feature-settings: 'tnum'; font-variant-numeric: tabular-nums; }

.slbi-pp-loading {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: #64748b;
}
.slbi-pp-spinner {
  display: inline-block;
  width: 12px;
  height: 12px;
  border: 1.5px solid #cbd5e1;
  border-top-color: #2563EB;
  border-radius: 50%;
  animation: slbi-pp-spin 0.7s linear infinite;
}
@keyframes slbi-pp-spin { to { transform: rotate(360deg); } }

/* Scrolling: the body inside the panel scrolls, head + actions stay pinned */
.slbi-parcel-panel {
  overflow-y: auto;
}

/* ─── Mobile — stack below 720px (Decision 7) ───────────────────────────── */
@media (max-width: 720px) {
  .slbi-parcel-panel {
    width: 100vw;
    max-width: 100vw;
  }
  .slbi-pp-grid { grid-template-columns: 1fr; }
  .slbi-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
  .slbi-kpis {
    width: 100%;
    justify-content: space-between;
    gap: 8px;
  }
  .slbi-kpi b { font-size: 14px; }
  .slbi-filters {
    padding: 8px 14px;
    gap: 8px;
  }
  .slbi-filter-group {
    flex-wrap: wrap;
  }
  .slbi-body {
    flex-direction: column;
    overflow: visible;
  }
  .slbi-map-host {
    flex: 0 0 50vh;
    height: 50vh;
  }
  .slbi-sidebar-host {
    flex: 1 1 auto;
    width: 100%;
    border-left: none;
    border-top: 1px solid #e5e7eb;
  }
  .slbi-sb-host,
  .slbi-sb {
    width: 100% !important;
  }
}

/* ──────────────────────────────────────────────────────────────────────────
 * 2026-05-22 No Demo Mode — mode toggle bar, universe gate pill, legend +
 * filter bar. Hidden when mode=through (default). Visible when mode=nodemo.
 * Visual reference: mockups/slbi_no_demo_area_stats_mockup_v2_2026_05_22.html
 * ────────────────────────────────────────────────────────────────────────── */

/* Mode toggle row (always visible above the existing slbi-header). */
.slbi-mode-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 22px 0 22px;
  flex-wrap: wrap;
  flex-shrink: 0;
  background: #f8fafc;
}
.slbi-mode-toggle {
  display: inline-flex;
  border: 1px solid #d1d5db;
  border-radius: 999px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}
.slbi-mode-btn {
  background: #fff;
  border: none;
  padding: 8px 20px;
  font-size: 12px;
  font-weight: 600;
  color: #6b7280;
  cursor: pointer;
  letter-spacing: 0.2px;
}
.slbi-mode-btn:hover {
  background: #f3f4f6;
}
.slbi-mode-btn.active {
  background: #5b1e8e;
  color: #fff;
}
.slbi-universe-gate {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  border: 1px solid #c5e0cc;
  border-radius: 6px;
  padding: 6px 12px;
  font-size: 11px;
  color: #1f5e1b;
  font-weight: 600;
  line-height: 1.3;
}
.slbi-universe-gate-lock {
  background: #1f5e1b;
  color: #fff;
  font-size: 9px;
  padding: 2px 6px;
  border-radius: 3px;
  letter-spacing: 0.4px;
  font-weight: 700;
}

/* No-Demo controls section (legend + filter bar). Hidden via [hidden]. */
.slbi-nodemo-controls {
  background: #fff;
  border-bottom: 1px solid #e5e7eb;
  padding: 14px 22px 12px 22px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex-shrink: 0;
}
.slbi-nodemo-controls[hidden] {
  display: none;
}

/* Legend (B + H + Returns) */
.slbi-nodemo-defs {
  display: flex;
  gap: 28px;
  flex-wrap: wrap;
  align-items: flex-start;
}
.slbi-nodemo-defs-group h3 {
  margin: 0 0 6px 0;
  font-size: 11px;
  font-weight: 700;
  color: #5b1e8e;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.slbi-nodemo-defs-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.slbi-nodemo-defs-returns {
  margin-left: auto;
}
.slbi-nodemo-def {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: #111827;
}
.slbi-nodemo-swatch {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 11px;
  min-width: 28px;
  text-align: center;
}
.slbi-nodemo-range {
  color: #6b7280;
  font-family: ui-monospace, "SF Mono", monospace;
  font-size: 11px;
}
.slbi-nodemo-feas {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 3px;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.3px;
  margin-left: 2px;
}
.slbi-nodemo-feas.feas-a { background: #fcefc8; color: #7f5e00; }
.slbi-nodemo-feas.feas-b { background: #d5ebd2; color: #1f5e1b; }

/* B-bucket swatch colors (purple gradient per mockup) */
/* 2026-05-22 hb-on-page rebound: 5 B swatches matching the new boundaries
   (B1 3,000-3,500 → B5 5,000+). Old #e4d2f2 (light lavender, 2,500-3,000) dropped. */
/* 2026-05-25 v8: B0 added (2,000-3,000 sf) — palest lavender. */
.slbi-nodemo-swatch.b0 { background: #e7d4f4; color: #5a3389; }
.slbi-nodemo-swatch.b1 { background: #c8a9e4; color: #4b2483; }
.slbi-nodemo-swatch.b2 { background: #9e73cc; color: #36165e; }
.slbi-nodemo-swatch.b3 { background: #7546b0; color: #ffffff; }
.slbi-nodemo-swatch.b4 { background: #5a3389; color: #ffffff; }
.slbi-nodemo-swatch.b5 { background: #3c1f6e; color: #ffffff; }
/* H-bucket swatch colors (warm gradient per mockup) */
.slbi-nodemo-swatch.h1 { background: #fff4dc; color: #b07800; }
.slbi-nodemo-swatch.h2 { background: #fde8c8; color: #8a5300; }
.slbi-nodemo-swatch.h3 { background: #fbd49a; color: #7a4a00; }
.slbi-nodemo-swatch.h4 { background: #f8c77e; color: #6a3f00; }
.slbi-nodemo-swatch.h5 { background: #efae56; color: #ffffff; }
.slbi-nodemo-swatch.h6 { background: #e89c2d; color: #ffffff; }
/* Return-bracket swatch colors */
.slbi-nodemo-swatch.r1 { background: #fbd9d6; color: #8a1f18; }
.slbi-nodemo-swatch.r2 { background: #fcefc8; color: #7f5e00; }
.slbi-nodemo-swatch.r3 { background: #d5ebd2; color: #1f5e1b; }
.slbi-nodemo-swatch.r4 { background: #ffe38a; color: #6b4900; }

/* Filter bar */
.slbi-nodemo-filterbar {
  background: #f4f1ea;
  border: 1px solid #e0d8c5;
  border-radius: 8px;
  padding: 12px 16px;
  display: flex;
  gap: 24px;
  align-items: center;
  flex-wrap: wrap;
}
.slbi-nodemo-filter-group {
  display: flex;
  align-items: center;
  gap: 10px;
}
.slbi-nodemo-filter-label {
  font-weight: 700;
  font-size: 11px;
  color: #5b1e8e;
  letter-spacing: 0.4px;
  text-transform: uppercase;
}
.slbi-nodemo-filter-control {
  display: inline-flex;
  align-items: center;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  overflow: hidden;
}
.slbi-nodemo-filter-control select {
  border: none;
  padding: 7px 10px;
  font-size: 12px;
  font-weight: 600;
  background: #fff;
  cursor: pointer;
  outline: none;
  color: #111827;
}
.slbi-nodemo-filter-control select + select {
  border-left: 1px solid #e5e7eb;
}
.slbi-nodemo-demo-blockers {
  border-left: 1px solid #d5c8b5;
  padding-left: 18px;
  gap: 8px;
  flex-wrap: wrap;
}
.slbi-nodemo-check {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  padding: 5px 10px;
  font-size: 11px;
  color: #111827;
  cursor: pointer;
  user-select: none;
}
.slbi-nodemo-check input {
  margin: 0;
  cursor: pointer;
}
.slbi-nodemo-check.active {
  border-color: #5b1e8e;
  background: #f4ecf8;
  color: #5b1e8e;
  font-weight: 600;
}
.slbi-nodemo-filter-summary {
  margin-left: auto;
  font-size: 12px;
  color: #6b7280;
}
.slbi-nodemo-filter-summary strong {
  color: #111827;
}

/* ── No-Demo modal table — slbi-nodemo-modal.js ─────────────────────────── */
.slbi-nd-mode-tag {
  display: inline-block;
  background: #5b1e8e;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
  letter-spacing: 0.5px;
  vertical-align: middle;
  margin-left: 4px;
}
.slbi-nd-meta {
  margin-left: auto;
  font-size: 11px;
  color: #6b7280;
}
.slbi-nd-table thead .col-b-group {
  background: #f4ecf8;
  color: #5b1e8e;
}
.slbi-nd-table thead .col-filter-group {
  background: #e8f4ff;
  color: #0b3d6e;
}
.slbi-nd-table thead .col-returns-group {
  background: #fffbe6;
  color: #6b4900;
}
.slbi-nd-chip {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  min-width: 28px;
}
.slbi-nd-chip.b1 { background: #e4d2f2; color: #6a3fa0; }
.slbi-nd-chip.b2 { background: #c8a9e4; color: #4b2483; }
.slbi-nd-chip.b3 { background: #9e73cc; color: #36165e; }
.slbi-nd-chip.b4 { background: #7546b0; color: #ffffff; }
.slbi-nd-table .house-mix {
  font-family: ui-monospace, "SF Mono", monospace;
  font-size: 11px;
  color: #6b7280;
  white-space: nowrap;
}
.slbi-nd-table .filter-cell {
  font-weight: 700;
}
.slbi-nd-table .filter-cell .pct {
  font-size: 10px;
  color: #6b7280;
  font-weight: 400;
  margin-left: 2px;
}
.slbi-nd-table .filter-cell.both {
  color: #5b1e8e;
  font-size: 13px;
}
.slbi-nd-table .ret-cell.r1-sub { background: rgba(251,217,214,0.30); }
.slbi-nd-table .ret-cell.r2-sub { background: rgba(252,239,200,0.30); }
.slbi-nd-table .ret-cell.r3-sub { background: rgba(213,235,210,0.30); }
.slbi-nd-table .ret-cell.r4-sub { background: rgba(255,227,138,0.40); }
.slbi-nd-table .ret-cell.zero { background: transparent; }
.slbi-nd-table .ret-cell .ret-active {
  font-weight: 700;
  color: #111827;
}
.slbi-nd-table .ret-cell .ret-total {
  color: #6b7280;
  font-weight: 400;
  font-size: 11px;
}
