/* Theme refresh 2026-07-09 (Gabe: "navy is bland, make it pop / modern"): light surfaces,
   vivid DG-style blue, colorful pills, soft shadows. */
:root {
  --bg: #f1f5f9;
  --card: #ffffff;
  --ink: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --accent: #2563eb;
  --accent-deep: #1d4ed8;
  --accent-soft: #eff6ff;
  --green: #047857; /* was #059669 = 3.77:1 on white, under AA. This measures 5.48:1. */
  --green-soft: #ecfdf5;
  --amber: #b45309;
  --amber-soft: #fffbeb;
  --red: #dc2626;
  --radius: 14px;
  --rail-w: 72px;
  --shadow: 0 1px 3px rgba(15, 23, 42, 0.06), 0 8px 24px rgba(15, 23, 42, 0.05);
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--ink);
}

/* ---------- App shell: fixed icon rail + content ---------- */
.shell { display: flex; min-height: 100vh; }
.rail {
  width: var(--rail-w);
  background: var(--card);
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 12px 0;
  position: sticky;
  top: 0;
  height: 100vh;
  flex-shrink: 0;
}
.rail-brand { padding: 8px 0 14px; }
.rail-brand .brand-ic {
  width: 26px; height: 26px; stroke: none; fill: var(--accent);
  filter: drop-shadow(0 2px 4px rgba(37,99,235,0.35));
}
.rail-btn {
  width: 60px;
  border: 0; border-radius: 12px;
  background: transparent;
  cursor: pointer;
  opacity: 0.62;
  transition: background 0.12s, opacity 0.12s;
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 8px 0 7px;
  color: var(--ink);
}
.rail-btn .ic { width: 19px; height: 19px; }
.rail-label { font-size: 9.5px; font-weight: 700; letter-spacing: 0.2px; }
.rail-btn.active { color: var(--accent); }
.rail-btn.active { background: var(--accent-soft); opacity: 1; box-shadow: inset 0 0 0 1.5px var(--accent); }
.rail-btn:disabled { cursor: default; }
.rail-btn:not(:disabled):hover { background: var(--bg); opacity: 1; }

.content { flex: 1; min-width: 0; display: flex; flex-direction: column; }

/* ---------- Top bar ---------- */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 22px;
  background: var(--card);
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  flex-wrap: wrap;
  /* Pinned: inside the GHL iframe the header was scrolling half out of view and looked
     "cut off". Sticky keeps the brand + mode pill as a solid top edge at any scroll. */
  position: sticky;
  top: 0;
  z-index: 30;
}
/* GHL iframe (html.in-iframe, set by app.js): the frame's top band hides behind GHL's
   fixed header, so push the app down 36px and re-anchor the two sticky elements to match.
   Standalone tabs (no iframe) are unaffected. */
.in-iframe .content { padding-top: 36px; }
.in-iframe .rail { padding-top: 48px; } /* rail's own 12px + the 36px band */
.in-iframe .topbar { top: 36px; }
/* ...but that 36px band was TRANSPARENT, so page content scrolled up THROUGH it and sat
   above the header — the "gap with stuff going above it" (Gabe, 2026-08-08). The header is
   pinned 36px down to clear GHL's own bar; nothing else may show in that strip. Fill it
   with an opaque bar that travels with the viewport. z-index sits just under .topbar (30)
   so the header still paints over it. */
.in-iframe .topbar::before {
  content: "";
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 36px;
  background: var(--card);
  z-index: 29;
}
.in-iframe .mapcol { top: 116px; height: calc(100vh - 132px); }
.in-iframe .drawer { top: 36px; } /* same band: drawer header was hiding behind GHL's bar */

.topbar h1 {
  margin: 0; font-size: 17px; letter-spacing: 0.2px;
  background: linear-gradient(90deg, var(--accent), #7c3aed);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-weight: 800;
}
.tagline { margin: 2px 0 0; font-size: 12px; color: var(--muted); }


/* ---------- Deal bar ---------- */
.dealbar { margin: 16px 22px 0; }
.dealhead-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
/* Addresses never need a runway — cap the bar and give the deal picker real room. */
.dealhead-row .addr-wrap { flex: 1 1 340px; min-width: 280px; max-width: 560px; }
.picker-compact { flex: 1 1 260px; min-width: 240px; max-width: 430px; font-size: 13.5px; padding: 10px 8px; color: var(--ink); }
.facts-chips { display: contents; }
.pipeline-sub { font-weight: 400; font-size: 12px; color: var(--muted); }

/* .stepper / .step lived here until 2026-08-07 — the full stage bar is retired in favour
   of the single stage pill in the deal header (UI-STANDARD §7, Gabe 2026-08-06). */

/* ---------- Sticky map column ---------- */
/* .workspace / .workcol lived here until 2026-08-07: the two-column Discover screen they
   laid out is gone, and the map now sits in the Overview tab, where skin.css places it on
   the panel's own grid. */
.mapcol {
  position: sticky;
  /* Clears the sticky topbar (~64px) — with top:16px the pinned header painted over the
     map column's comps bar once scrolled (audit layout regression from the iframe fix). */
  top: 80px;
  height: calc(100vh - 96px);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  background: #e8ecf3;
}
#map { position: absolute; inset: 0; }
.map-note {
  position: absolute;
  left: 12px; right: 12px; bottom: 12px;
  background: rgba(255,255,255,0.94);
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 9px 13px;
  font-size: 12.5px;
  color: var(--muted);
  z-index: 5;
}

@media (max-width: 1000px) {
  .mapcol { position: relative; height: 340px; top: 0; }
}

/* ---------- Cards & form ---------- */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  margin-bottom: 14px;
  box-shadow: var(--shadow);
}
.card h2 { margin: 0 0 12px; font-size: 15px; }

label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; font-weight: 600; color: var(--muted); }
input, select {
  font-size: 14.5px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
}
input:focus, select:focus { outline: 2px solid var(--accent); outline-offset: 0; border-color: transparent; }

.actions { display: flex; align-items: center; gap: 14px; margin-top: 14px; }
button.primary {
  font-size: 14.5px;
  font-weight: 700;
  padding: 10px 22px;
  border: 0;
  border-radius: 10px;
  background: linear-gradient(180deg, var(--accent), var(--accent-deep));
  color: #fff;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.35);
  transition: transform 0.1s, box-shadow 0.1s;
}
button.primary:not(:disabled):hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(37, 99, 235, 0.4); }
button.primary:hover { filter: brightness(1.08); }
button.primary:disabled { opacity: 0.55; cursor: not-allowed; }
.cost-hint { font-size: 12px; color: var(--muted); }

/* ---------- History drawer (slides out from the rail) ---------- */
.drawer {
  position: fixed;
  left: var(--rail-w);
  top: 0;
  bottom: 0;
  width: 300px;
  background: var(--card);
  border-right: 1px solid var(--line);
  box-shadow: 8px 0 24px rgba(26, 29, 41, 0.08);
  padding: 18px;
  z-index: 40;
  overflow-y: auto;
}
.drawer-head { display: flex; align-items: center; justify-content: space-between; }
.drawer-head h2 { margin: 0; font-size: 15px; }
.drawer-x { border: 0; background: transparent; font-size: 15px; cursor: pointer; color: var(--muted); }
.drawer .history-list { flex-direction: column; }
.drawer .history-item { width: 100%; }

/* ---------- Help drawer (the mini knowledge base; articles live in /help/*.md) ---------- */
.help-drawer { width: 460px; max-width: calc(100vw - var(--rail-w)); }
.help-drawer .drawer-head h2 { font-size: 18px; }
.help-back { margin-top: 12px; align-self: flex-start; }
.help-body { margin-top: 14px; display: flex; flex-direction: column; gap: 10px; }
.help-topic {
  text-align: left;
  border: 1px solid var(--line);
  background: var(--bg);
  border-radius: 12px;
  padding: 14px 16px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-family: inherit;
}
.help-topic:hover { border-color: var(--accent); background: var(--accent-soft); }
.help-topic-title { font-weight: 700; font-size: 15px; color: var(--ink); }
.help-topic-sub { font-size: 13px; color: var(--muted); }
.help-article { font-size: 15px; line-height: 1.65; color: var(--ink); }
.help-article h3 { font-size: 16.5px; font-weight: 700; margin: 22px 0 6px; color: var(--accent-deep); }
.help-article h4 { font-size: 13px; font-weight: 700; margin: 18px 0 5px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; }
.help-article p { margin: 10px 0; }
.help-article ul, .help-article ol { margin: 10px 0; padding-left: 22px; }
.help-article li { margin: 6px 0; }
/* 44px tall, the touch-target floor (WCAG 2.5.5 / Apple's HIG). These were 32px, which is
   a comfortable mouse target and a miss-prone thumb target — and this app runs inside a
   GHL iframe on phones (2026-08-07 ui-check finding). The visual size is unchanged; the
   height comes from padding, so the buttons just get easier to hit. */
.help-top { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; }
.help-top .ic { width: 16px; height: 16px; }
.topbar-right { display: flex; align-items: center; gap: 10px; }

/* ---------- Blast preflight: the "What buyers will see" card in the review popup ---------- */
.bp-card .bp-field { display: block; font-size: 12.5px; font-weight: 600; color: var(--muted); margin: 10px 0 0; }
.bp-card .bp-field input, .bp-card .bp-field textarea {
  display: block; width: 100%; margin-top: 4px; font-size: 14px; font-weight: 400;
  padding: 9px 12px; border: 1px solid var(--line); border-radius: 8px;
  font-family: inherit; color: var(--ink); resize: vertical;
}
.bp-warnings { margin-top: 10px; display: flex; flex-direction: column; gap: 5px; }
.bp-warn { font-size: 12.5px; color: var(--amber); background: var(--amber-soft); border: 1px solid #fcd34d; border-radius: 8px; padding: 6px 10px; }
.bp-warn.bp-block { color: var(--red); background: #fef2f2; border-color: #fecaca; }

/* ---------- Setup nag banner (checks-and-balances: critical settings missing) ---------- */
.nag-banner {
  display: flex; align-items: center; gap: 12px;
  background: var(--amber-soft); border: 1px solid #fcd34d; color: var(--amber);
  border-radius: 12px; padding: 10px 14px; margin: 12px 24px 0;
  font-size: 13.5px; font-weight: 600;
}
.nag-banner span { flex: 1; }
.nag-banner .ghost-btn { flex-shrink: 0; }

/* ---------- Single address bar with in-field Zillow icon ---------- */
.addr-wrap { position: relative; }
.addr-input {
  width: 100%;
  font-size: 15.5px;
  padding: 13px 46px 13px 14px;
  border-radius: 10px;
}
.zbtn {
  position: absolute;
  right: 9px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: #f4f6fb;
  border: 1px solid var(--line);
}
.zbtn:hover { border-color: var(--accent); }
.zbtn img { display: block; border-radius: 4px; }

.addr-suggest {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  z-index: 30;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.10);
  overflow: hidden;
}
.suggest-row {
  padding: 10px 13px;
  font-size: 13.5px;
  color: var(--ink);
  cursor: pointer;
  border-bottom: 1px solid var(--line);
}
.suggest-row:last-child { border-bottom: none; }
.suggest-row:hover { background: var(--accent-soft); color: var(--accent); }

.opts-row { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.opts-row select { flex: 1; min-width: 120px; font-size: 13px; padding: 9px 8px; }
.opts-row .primary { flex-shrink: 0; }

/* ---------- History ---------- */
.history-list { display: flex; gap: 8px; flex-wrap: wrap; }
.history-item {
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 7px 11px;
  font-size: 12px;
  cursor: pointer;
  background: #fafafa;
}
.history-item:hover { border-color: var(--accent); }
.history-item b { display: block; font-size: 12.5px; }
.history-item .hmeta { color: var(--muted); }
.hbadge {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  border-radius: 999px;
  padding: 2px 7px;
  margin-left: 6px;
  background: var(--green-soft);
  color: var(--green);
}
.hbadge.test { background: var(--accent-soft); color: var(--accent); }

/* ---------- Status & results ---------- */
.status { padding: 12px 16px; border-radius: var(--radius); font-size: 13.5px; margin-bottom: 14px; }
.status.info { background: var(--accent-soft); color: var(--accent); }
.status.error { background: #fef2f2; color: var(--red); }
.hidden { display: none !important; }

.summary { font-size: 13px; color: var(--muted); display: flex; gap: 16px; flex-wrap: wrap; }
.summary strong { color: var(--ink); }
.results-bar { display: flex; flex-direction: column; gap: 12px; }
.results-bar .push-bar { border-top: 1px solid var(--line); padding-top: 12px; }

.push-bar { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
#sel-count { font-size: 13px; font-weight: 600; }
.inv-select, .mine-select { margin-right: 10px; transform: scale(1.2); }

.group-title { font-size: 18px; font-weight: 700; margin: 20px 0 10px; }
.group-sub { font-weight: 400; font-size: 12px; color: var(--muted); margin-left: 6px; }
.collapsible { cursor: pointer; user-select: none; }
.chev { display: inline-block; transition: transform 0.15s; color: var(--muted); }
.chev.open { transform: rotate(90deg); }

.cards { display: flex; flex-direction: column; gap: 10px; }
.inv-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px;
}
.inv-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.inv-name { font-size: 14.5px; font-weight: 700; }
.badges { display: flex; gap: 5px; flex-wrap: wrap; }
.badge {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.4px;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
}
.badge { background: var(--accent); color: #fff; border: 0; }
.badge.flipper { background: #f59e0b; color: #fff; }
.badge.landlord { background: #16a34a; color: #fff; }
.badge.yours { background: linear-gradient(135deg, #fde047, #f59e0b); color: #713f12; }
.badge.teaser { background: #10b981; color: #fff; }

/* DEMO unlock / pricing UI (unwired) */
.unlock-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  margin: 4px 0 14px;
  padding: 14px 16px;
  border-radius: 12px;
  background: linear-gradient(90deg, var(--accent-soft), #fff);
  border: 1px solid var(--accent);
}
.unlock-copy { display: flex; flex-direction: column; gap: 2px; }
.unlock-copy strong { font-size: 15px; color: var(--ink); }
.unlock-copy span { font-size: 12.5px; color: var(--muted); }
.unlock-bar .primary { flex-shrink: 0; }
.forever-note {
  margin: 4px 0 14px;
  padding: 11px 14px;
  border-radius: 10px;
  background: var(--green-soft);
  color: var(--green);
  font-size: 13px;
}
/* Blur + veil are gated on the parent .locked so removing that ONE class on unlock reveals everything. */

/* Your-buyers panel (Phase 2 matching) */
.inv-card.mine { border-left: 3px solid var(--accent); }
.fit { font-size: 12px; font-weight: 700; color: var(--muted); white-space: nowrap; }
.fit.good { color: var(--green); }
.fit.none { font-weight: 500; font-style: italic; }
.mchips { display: flex; gap: 6px; flex-wrap: wrap; margin: 8px 0 2px; }
.mchip {
  font-size: 11.5px;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--green-soft);
  color: var(--green);
  font-weight: 600;
}
.mchip.no { background: #fee2e2; color: #b91c1c; }
.mchip.warn { background: #fef3c7; color: #92400e; }
.unlock-chip { cursor: pointer; }
.badge.inst { background: #ede9fe; color: #5b21b6; }
.spot-btn { margin-top: 8px; }
.comp-pin.spot { outline: 3px solid #7c3aed; box-shadow: 0 0 0 5px rgba(124, 58, 237, 0.3); z-index: 5; }
.comp-pin.dim { opacity: 0.35; }
#pull-bar.flash { animation: pull-flash 0.8s ease 2; }
.pull-owned { color: var(--muted); font-weight: 500; }
@keyframes pull-flash { 50% { box-shadow: 0 0 0 3px var(--accent); } }

/* Map pin popups */
.pin-pop { font-size: 12.5px; line-height: 1.45; }
.pin-pop .pin-sub { color: var(--muted); font-size: 11.5px; }
.pin-pop .comp-detail-btn { margin-top: 7px; }
.maplibregl-popup-content { border-radius: 10px; box-shadow: 0 6px 20px rgba(0,0,0,0.15); padding: 10px 12px; }

/* Cash-sale comp pins (DG-style price chips) */
/* Floats OVER the map like a map control. It used to be in normal flow inside .mapcol, but
   #map is absolutely positioned inset:0 — the map canvas painted on top and the button was
   invisible (and unclickable) since the v0.3 shell. Verified live by Gabe 2026-07-20. */
.comps-bar {
  position: absolute; top: 10px; left: 10px; right: 54px; z-index: 6;
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
}
/* The button is the map's ONE call to action — solid accent, not a ghost (Gabe 2026-07-20:
   "should be more in your face so people know to click it"). */
.comps-bar .ghost-btn {
  background: var(--accent); border-color: var(--accent); color: #fff;
  font-weight: 600; padding: 9px 14px;
  box-shadow: 0 2px 10px rgba(37, 99, 235, 0.45);
}
.comps-bar .ghost-btn:hover { filter: brightness(1.08); }
.comps-bar .ghost-btn .ic { stroke: #fff; }
#comps-note:not(:empty) {
  background: rgba(255,255,255,0.94); border: 1px solid var(--line);
  border-radius: 9px; padding: 5px 10px;
}
.comp-pin {
  background: linear-gradient(180deg, #22c55e, #16a34a);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  padding: 4px 9px;
  border-radius: 9px;
  border: 2px solid #fff;
  box-shadow: 0 3px 10px rgba(22, 163, 74, 0.45);
  cursor: pointer;
  white-space: nowrap;
}
.comp-pin:hover { transform: scale(1.12); }

.stats b { color: var(--ink); font-size: 13px; display: block; }

.contacts { display: flex; gap: 5px; flex-wrap: wrap; }
.chip {
  font-size: 12px;
  padding: 4px 9px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fafafa;
  cursor: pointer;
}
.chip:hover { border-color: var(--accent); color: var(--accent); }
.chip.shared { opacity: 0.45; }
.chip.copied { background: var(--green-soft); color: var(--green); border-color: var(--green); }
.contact-note { font-size: 11px; color: var(--muted); margin-top: 7px; }

/* ---------- Facts strip + detail modal ---------- */
.ghost-btn {
  font-size: 12.5px;
  font-weight: 600;
  padding: 7px 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--accent);
  cursor: pointer;
  white-space: nowrap;
}
.ghost-btn:hover { border-color: var(--accent); }

.facts { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; align-items: center; }
.fact {
  font-size: 12.5px;
  padding: 6px 11px;
  border-radius: 8px;
  background: #f4f6fb;
  border: 1px solid var(--line);
  color: var(--muted);
}
.fact b { color: var(--ink); margin-right: 3px; }
.fact.flag {
  /* The ONE motivation-flag look (Gabe 2026-08-17): solid orange pill, DARK text.
     White-on-this-orange measures ~3.1:1 (under the AA 4.5 floor); dark text ~8:1.
     .flag-chip in skin.css must match — same data, same costume, everywhere. */
  background: var(--amber-5);
  border-color: var(--amber-6);
  color: var(--foreground);
  font-weight: 700;
  font-size: 12px;
  padding: 5px 11px;
  border-radius: 999px;
}
.fact-note { font-size: 11.5px; color: var(--muted); }
.flag-row { display: flex; gap: 8px; flex-wrap: wrap; }

/* Free CRM facts get a soft green "no charge" tag; the paid report sits behind a button. */
.free-tag {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 11px; font-weight: 700; letter-spacing: 0.2px;
  color: #15803d; background: #f0fdf4; border: 1px solid #bbf7d0;
  padding: 5px 10px; border-radius: 999px;
}
.free-tag .ic { width: 12px; height: 12px; }
.unlock-report-btn {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 13px; font-weight: 700; color: #fff; cursor: pointer;
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  border: 0; border-radius: 10px; padding: 8px 14px;
  box-shadow: 0 2px 8px rgba(37,99,235,0.28);
}
.unlock-report-btn:hover { filter: brightness(1.06); }
.unlock-report-btn.unlocked {
  background: linear-gradient(135deg, #22c55e, #16a34a);
  box-shadow: 0 2px 8px rgba(22,163,74,0.28);
}
.unlock-report-btn:disabled { opacity: 0.6; cursor: default; }
.unlock-report-btn .ic { width: 15px; height: 15px; }
.unlock-report-btn .ur-sub { font-weight: 500; font-size: 11px; opacity: 0.85; }
.unlock-report-btn.loading { position: relative; color: transparent; }
.unlock-report-btn.loading::after {
  content: ""; position: absolute; inset: 0; margin: auto; width: 15px; height: 15px;
  border: 2px solid rgba(255,255,255,0.5); border-top-color: #fff; border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Dispo Blast — THE money action, so it outdresses the blue Add button.
   Metrics match button.primary so the pair sits flush on one row. */
.push-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.blast-btn {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 14.5px; font-weight: 700; color: #fff; cursor: pointer;
  background: linear-gradient(135deg, #8b5cf6, #6d28d9);
  border: 0; border-radius: 10px; padding: 10px 18px;
  box-shadow: 0 2px 6px rgba(109,40,217,0.35);
  transition: transform 0.1s, box-shadow 0.1s;
}
.blast-btn:not(:disabled):hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(109,40,217,0.4); }
.blast-btn:hover { filter: brightness(1.07); }
.blast-btn:disabled { opacity: 0.45; cursor: default; box-shadow: none; }
.blast-btn .ic { width: 15px; height: 15px; }

.lane { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; margin-bottom: 12px; }
.lane-ready { border-color: #bbf7d0; background: #f0fdf4; }
.lane-cold { border-color: #fde68a; background: #fffbeb; }
.lane-head {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  font-size: 14px; font-weight: 800; margin-bottom: 8px;
}
.lane-ready .lane-head { color: #15803d; }
.lane-cold .lane-head { color: #b45309; }
.lane-head .ic { width: 15px; height: 15px; }
.lane-count { background: rgba(0,0,0,0.07); border-radius: 999px; padding: 1px 9px; font-size: 12px; }
.lane-sub { flex-basis: 100%; font-size: 11.5px; font-weight: 500; color: var(--muted); }
/* Second Wave: the outside-the-buy-box group inside the ready lane gets its own header
   so the wording split is visible before anything sends. */
.lane-subhead { margin-top: 12px; padding-top: 10px; border-top: 1px dashed #d1d5db; }
.lane-ready .lane-subhead { color: #b45309; }
.blast-skips { margin-top: 4px; }
.lane-row {
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  padding: 6px 0; border-top: 1px solid rgba(0,0,0,0.05); font-size: 13px;
}
.lane-name { font-weight: 600; min-width: 0; }
.lane-chans { display: flex; gap: 6px; flex-shrink: 0; }
.chan {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 11px; font-weight: 700; color: var(--muted);
  background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 3px 9px;
}
.chan .ic { width: 11px; height: 11px; }
.chan.none { font-weight: 500; font-style: italic; }
.optin-chip {
  font-size: 10.5px; font-weight: 700; color: #b45309; white-space: nowrap;
  background: #fef3c7; border: 1px solid #fde68a; border-radius: 999px; padding: 2px 8px;
  margin-left: 6px; vertical-align: 1px;
}
.optin-chip.in { color: #15803d; background: #dcfce7; border-color: #bbf7d0; }
.optin-chip.out { color: #b91c1c; background: #fee2e2; border-color: #fecaca; }
.inv-name .chan { margin-left: 6px; vertical-align: 1px; font-size: 10.5px; padding: 2px 8px; }
.chan.dflt { font-weight: 500; color: var(--muted); border-style: dashed; }
.inv-card.mine.opted-out { opacity: 0.6; }
.unmatched-all { font-size: 12px; padding: 6px 12px; margin-bottom: 10px; }
/* Activity tiers (Ted, 2026-07-23): active no-buy-box buyers a new client can still blast.
   Deliberately LARGE — Gabe: "easily found and the text large enough to see". */
.activity-tiers { margin: 14px 0; padding: 14px; border: 1px solid var(--border, #2a2f3a); border-radius: 10px; }
.activity-tiers h3 { margin: 0 0 4px; font-size: 16px; }
.activity-tiers .act-sub { font-size: 13px; opacity: .75; margin-bottom: 10px; }
.activity-tiers .tier-btn { display: block; width: 100%; text-align: left; font-size: 15px; font-weight: 600; padding: 12px 14px; margin: 6px 0; cursor: pointer; }
.activity-tiers .tier-btn:disabled { opacity: .5; cursor: default; }
.activity-tiers .act-note { font-size: 12px; opacity: .7; margin-top: 6px; }
.blast-foot { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-top: 4px; }
.blast-foot .fact-note { flex: 1; min-width: 220px; }
.attest-row { flex-basis: 100%; display: flex; align-items: flex-start; gap: 8px; font-size: 12.5px; color: var(--ink-soft, #475569); line-height: 1.45; cursor: pointer; padding: 8px 10px; background: var(--panel-soft, #f8fafc); border: 1px solid var(--line, #e2e8f0); border-radius: 8px; }
.attest-row input { margin-top: 2px; accent-color: #7c3aed; }
.blast-btn:disabled { opacity: 0.45; cursor: not-allowed; filter: saturate(0.6); }
/* Schedule-for-later row under the Send button (2026-08-10). First cut was amber "so it
   pops" — reverted same day: E3 reserves amber for WARNINGS, and scheduling is a friendly
   variant of Send. The brand-tint button family below is the fix: colored enough to be
   found, same hue family as the primary it's subordinate to. */
.bp-sched { flex-basis: 100%; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
/* Brand-tinted secondary action: productive but subordinate to the one solid primary on
   the surface (B8). Double-class ON PURPOSE: .mini-btn is defined later in this sheet and
   a single-class tint here loses the same-specificity tie and silently reverts — the
   exact 2026-08-07 "Load comps" lesson in UI-STANDARD §7. Two classes outrank it no
   matter where either rule moves. */
.mini-btn.btn-brand-tint, .btn-brand-tint { background: var(--primary-soft); border: 1px solid var(--primary); color: var(--primary-hover); font-weight: 600; }
.mini-btn.btn-brand-tint:hover:not(:disabled), .btn-brand-tint:hover:not(:disabled) { background: var(--primary); color: var(--primary-foreground); }
.mini-btn.btn-brand-tint:disabled, .btn-brand-tint:disabled { opacity: 0.45; cursor: not-allowed; }
/* Funnel-colored stat numbers: the tiles echo the chip encoding used all over the blast
   surfaces (viewed=violet, committed=green, interested=amber-as-data). Color that MEANS
   something, not decoration (Gabe asked for pop, 2026-08-10). */
.bignum.t-sent { color: var(--primary); }
.bignum.t-viewed { color: var(--violet-6); }
.bignum.t-committed { color: var(--success); }
.bignum.t-interested { color: var(--warning); }
/* Scheduled-row "resend" badge: brand tint, NOT the red gone-badge — red reads as error. */
.sched-badge { font-size: 11px; font-weight: 700; color: var(--primary-hover); background: var(--primary-soft); border: 1px solid var(--primary); border-radius: 999px; padding: 2px 8px; vertical-align: 2px; }
.bp-sched input[type="datetime-local"] { font: inherit; font-size: 13px; padding: 6px 8px; border: 1px solid var(--line, #e2e8f0); border-radius: 8px; background: var(--panel, #fff); color: inherit; }
#bp-sched-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
#bp-sched-row.hidden { display: none; }
#blast-scheduled { margin-bottom: 14px; }
#blast-scheduled .lane-head { margin: 4px 0 8px; }
.blast-row.sched-failed .fact-note { color: #b91c1c; }
.plan-card.current { border-color: #7c3aed; box-shadow: 0 0 0 2px rgba(124,58,237,0.25); }
.plan-card.current .plan-choose:disabled { opacity: 0.7; cursor: default; }
#usage-note .ghost-btn { margin-left: 8px; font-size: 12px; padding: 4px 10px; vertical-align: -1px; }
.brand-form { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 12px 0; }
@media (max-width: 560px) { .brand-form { grid-template-columns: 1fr; } }
.brand-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }

/* Automatic follow-ups (Account tab) */
.fu-steps { margin: 10px 0 12px; padding-left: 18px; font-size: 13px; color: var(--muted); line-height: 1.55; }
.fu-steps li { margin-bottom: 5px; }
.fu-steps b { color: var(--ink); }

/* All-properties share link (Account tab) */
.link-row { display: flex; gap: 8px; align-items: center; margin: 12px 0 4px; }
.link-row input { flex: 1; min-width: 0; font-size: 13px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }

/* Deal-page disclaimer editor (Account tab) */
.disc-label { margin: 12px 0 6px; }
.disc-label textarea { width: 100%; resize: vertical; min-height: 96px; font: inherit; font-size: 13.5px; line-height: 1.5; }
.disc-count { font-size: 11.5px; color: var(--muted); text-align: right; margin-bottom: 12px; }
.disc-count.over { color: var(--red, #b91c1c); font-weight: 700; }

/* First-run connect gate (full-screen cover until the account links its GHL token) */
.connect-gate { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(160deg, #eef2ff, #f8fafc); padding: 20px; overflow-y: auto; }
.connect-card { background: #fff; border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 12px 40px rgba(15,23,42,0.12);
  padding: 28px 26px; max-width: 520px; width: 100%; }
.connect-card h2 { margin: 0 0 6px; font-size: 21px; }
.connect-sub { margin: 0 0 16px; color: var(--muted); font-size: 14px; }
.connect-steps { margin: 0 0 16px; padding-left: 20px; font-size: 14px; line-height: 1.7; color: var(--ink); }
.connect-scopes { display: block; margin-top: 4px; font-weight: 700; color: var(--accent-deep); font-size: 13px; }
#connect-token { width: 100%; margin-bottom: 10px; font-size: 14px; }
#connect-btn { width: 100%; }
.connect-status { min-height: 18px; margin: 10px 0 4px; font-size: 13.5px; font-weight: 600; color: var(--accent-deep); }
.connect-fine { margin: 6px 0 0; font-size: 12px; color: var(--muted); line-height: 1.5; }
.wallet-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 12px; }
.wallet-balance { display: flex; flex-direction: column; gap: 4px; max-width: 420px; }
.wallet-amt { font-size: 30px; font-weight: 800; letter-spacing: -0.02em; }
.wallet-loads { display: flex; gap: 8px; flex-wrap: wrap; }
/* flex-direction:row is NOT the default here — the global `label` rule sets column, which
   stacked every checkbox above its own label across the whole Account tab. */
.auto-row { display: flex; flex-direction: row; align-items: flex-start; gap: 8px; font-size: 13px; color: var(--muted); line-height: 1.45; cursor: pointer; padding: 10px 12px; background: #f8fafc; border: 1px solid var(--line); border-radius: 8px; margin-bottom: 10px; }
.auto-row input { margin-top: 2px; accent-color: #7c3aed; }
.fact-note.warn { color: #b45309; }

/* Blast dashboard */
.blast-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 14px; margin-bottom: 22px; }
.bigstat.tile {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px 18px; box-shadow: var(--shadow);
}
.bigstat.tile .bignum { font-size: 32px; }
.tile-note { display: block; font-size: 10px; font-weight: 500; text-transform: none; letter-spacing: 0; margin-top: 2px; }
.blast-row { display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 10px; }
.blast-addr { font-size: 15px; font-weight: 700; }
.blast-deal { font-size: 12px; color: var(--muted); margin-top: 2px; }
.blast-row-side { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.blast-counts { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; color: #6d28d9; }
.blast-counts .ic { width: 14px; height: 14px; }
.blast-when { font-size: 12px; color: var(--muted); }
.blast-demo {
  font-size: 10px; font-weight: 700; letter-spacing: 0.5px; text-transform: uppercase;
  color: var(--muted); background: #f4f6fb; border: 1px solid var(--line);
  border-radius: 999px; padding: 2px 8px;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(26, 29, 41, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 60;
  padding: 20px;
}
.modal {
  background: var(--card);
  border-radius: 14px;
  max-width: 620px;
  width: 100%;
  max-height: 82vh;
  overflow-y: auto;
  padding: 22px;
}
.modal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.modal-head h2 { margin: 0; font-size: 16px; }

/* Opt-in enrich modal (2026-08-17): one row per offered field. Conflict rows wear the
   warning soft tone — amber = "your data disagrees with theirs", a real warning, not
   decoration (rulebook E3). */
.enrich-row { display: flex; align-items: flex-start; gap: var(--space-2);
  padding: var(--space-2) var(--space-3); border: 1px solid var(--border);
  border-radius: var(--radius); margin: var(--space-2) 0; font-size: var(--text-base);
  cursor: pointer; background: var(--surface); }
.enrich-row input { margin-top: var(--space-1); }
.enrich-row.conflict { background: var(--warning-soft); border-color: var(--warning); }
.enrich-keep { display: block; font-size: var(--text-xs); color: var(--warning-strong); }
.enrich-actions { display: flex; gap: var(--space-2); margin-top: var(--space-3); }

/* Shown inside #map when maplibre can't start (no WebGL) — the list carries the feature. */
.map-dead-note { display: flex; align-items: center; justify-content: center; height: 100%;
  padding: var(--space-6); text-align: center; color: var(--muted-foreground);
  font-size: var(--text-sm); background: var(--surface); }
.detail-sec { margin-top: 16px; }
.detail-sec h3 { margin: 0 0 8px; font-size: 13px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.5px; }
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 18px; font-size: 13.5px; }
.detail-grid span { color: var(--muted); }
.deed-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 12.5px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
}
.deed-tag {
  font-size: 10.5px;
  font-weight: 700;
  border-radius: 999px;
  padding: 2px 8px;
  background: var(--accent-soft);
  color: var(--accent);
  white-space: nowrap;
}

footer { text-align: center; color: var(--muted); font-size: 11.5px; padding: 22px 0 26px; }

/* ---------- Views (rail navigation) ---------- */
.view { padding: 0 22px; }
.view-head { margin: 18px 0 14px; }
.view-head h2 { margin: 0 0 4px; font-size: 20px; }
.view-sub { margin: 0; font-size: 13px; color: var(--muted); }

/* Deals board (mini kanban) */
.deals-board { padding-bottom: 18px; }
.deals-tabs { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }
.deals-tab {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 13.5px; font-weight: 600; color: var(--muted); cursor: pointer;
  background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 8px 15px;
}
.deals-tab:hover { border-color: var(--accent); color: var(--ink); }
.deals-tab.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.deals-tab .tab-count {
  font-size: 11px; font-weight: 700; border-radius: 999px; padding: 1px 8px;
  background: var(--accent-soft); color: var(--accent);
}
/* A translucent WHITE badge on the indigo pill left white text at 3.78:1. Darkening the
   badge instead of lightening it keeps the same visual weight and measures 8.74:1. */
.deals-tab.active .tab-count { background: rgba(0,0,0,0.22); color: #fff; }
.board-cols { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 6px; }
.stage-col { min-width: 210px; flex: 1; }
.deal-addr { font-size: 12px; color: var(--muted); margin-top: 2px; }
.deal-chips { display: flex; gap: 5px; flex-wrap: wrap; margin-top: 5px; }
.deal-chip {
  display: inline-flex; align-items: center; gap: 3px;
  font-size: 11.5px; font-weight: 600; color: var(--ink);
  background: var(--accent-soft); border-radius: 6px; padding: 2px 7px;
}
.deal-ic { width: 12px; height: 12px; color: var(--accent); }
.stage-head {
  font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.5px;
  color: var(--muted); margin-bottom: 8px; display: flex; justify-content: space-between; align-items: center;
}
.stage-count { background: var(--accent-soft); color: var(--accent); border-radius: 999px; padding: 1px 8px; font-size: 11px; }
.deal-card {
  background: var(--card); border: 1px solid var(--line); border-radius: 10px;
  padding: 10px 12px; margin-bottom: 8px; cursor: pointer; box-shadow: var(--shadow);
  transition: transform 0.1s, border-color 0.1s;
}
.deal-card:hover { transform: translateY(-1px); border-color: var(--accent); }
.deal-name { font-size: 13px; font-weight: 600; }
.deal-value { font-size: 12px; color: var(--green); font-weight: 700; margin-top: 2px; }
.stage-empty { color: var(--line); text-align: center; padding: 8px; }

/* Buyers view */
.buyers-bar-card { margin-bottom: 18px; }
.health-bar {
  height: 10px; border-radius: 999px; background: #fef3c7; overflow: hidden; margin-bottom: 8px;
}
.health-fill {
  height: 100%; border-radius: 999px; background: #16a34a; width: 0;
  transition: width 600ms ease;
}
/* Buyer Health cockpit */
/* Fixed 3-up (auto-fit + a spanning row keeps phantom empty tracks alive and pins the
   cards at min width — the "cramped to the left" bug, Gabe 2026-07-21). */
.cockpit-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 18px; }
@media (max-width: 900px) { .cockpit-grid { grid-template-columns: 1fr; } }
.ck-card h3 { margin: 0 0 10px; font-size: 16px; }
.ck-wide { grid-column: 1 / -1; }
.ck-card .fact-note { font-size: 13.5px; }
.ck-row {
  display: flex; justify-content: space-between; align-items: baseline; gap: 10px;
  padding: 6px 0; font-size: 14.5px;
}
.ck-label { color: #0f172a; display: flex; align-items: baseline; gap: 7px; }
.ck-note { color: var(--muted); font-size: 12.5px; font-weight: 400; }
.ck-num { font-size: 16px; font-weight: 700; font-variant-numeric: tabular-nums; }
/* Segmented parts-of-whole bar: 2px surface gaps separate segments (never strokes);
   min-width keeps sliver segments visible + hoverable; rounded ends on the stack only. */
.ck-bar { display: flex; gap: 2px; height: 18px; margin: 4px 0 10px; }
.ck-seg { min-width: 6px; }
.ck-seg:first-child { border-radius: 4px 0 0 4px; }
.ck-seg:last-child { border-radius: 0 4px 4px 0; }
.ck-seg:only-child { border-radius: 4px; }
.ck-swatch {
  width: 12px; height: 12px; border-radius: 3px; flex: none;
  display: inline-block; align-self: center;
}
/* Provenance bar list: independent shares of the list (rows overlap, so never stacked) */
.ck-prow { margin-bottom: 4px; }
.ck-track { height: 6px; border-radius: 999px; background: #f1f5f9; overflow: hidden; }
.ck-fill { height: 100%; border-radius: 999px; background: #2a78d6; min-width: 4px; }
.ck-eng-tiles { display: flex; gap: 22px; flex-wrap: wrap; margin-bottom: 8px; }
.ck-eng b { font-size: 24px; display: block; }
.ck-eng span { font-size: 13px; color: var(--muted); }
/* Inline legend: number sits right beside its label (space-between spread the pair so far
   apart the count read as the NEXT label's — Gabe misread 38 as dormant, 2026-07-22). */
.ck-legend-grid { display: flex; flex-wrap: wrap; gap: 2px 20px; }
.ck-legend-grid .ck-row { padding: 3px 0; gap: 7px; justify-content: flex-start; }
/* Hatched = "no data ever" (texture for the absence class, distinct from solid-gray dormant) */
.ck-hatch { background: repeating-linear-gradient(45deg, #cbd5e1 0 3px, #f8fafc 3px 7px); }
.ck-top { margin-top: 6px; border-top: 1px solid var(--line); padding-top: 6px; }
.ck-empty .fact-note { margin: 0; }

.buyers-tools { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.buyers-tools .addr-input { flex: 1; min-width: 220px; }
.buyers-stats { display: flex; gap: 8px; flex-wrap: wrap; }

/* Settings */
.set-card h3 { margin: 0 0 12px; font-size: 15px; }
.plan-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; margin-bottom: 10px; }
.plan-card {
  border: 1px solid var(--line); border-radius: 12px; padding: 16px; position: relative;
  display: flex; flex-direction: column; gap: 6px;
}
.plan-card.featured { border: 2px solid var(--accent); box-shadow: 0 6px 20px rgba(37, 99, 235, 0.15); }
.plan-tag {
  position: absolute; top: -10px; left: 50%; transform: translateX(-50%);
  background: var(--accent); color: #fff; font-size: 10px; font-weight: 800; letter-spacing: 0.5px;
  padding: 3px 10px; border-radius: 999px;
}
.plan-name { font-weight: 800; font-size: 15px; }
.plan-price { font-size: 26px; font-weight: 800; color: var(--accent); }
.plan-price span { font-size: 13px; color: var(--muted); font-weight: 600; }
.plan-card ul { margin: 4px 0 10px; padding-left: 18px; font-size: 12.5px; color: var(--muted); display: grid; gap: 4px; }
.plan-card .primary { margin-top: auto; }
.demo-tag { background: var(--amber-soft); color: var(--amber); font-size: 10px; font-weight: 800; padding: 2px 8px; border-radius: 999px; vertical-align: middle; }

.usage-row { display: flex; align-items: center; gap: 14px; }
.usage-meter { flex: 1; height: 10px; border-radius: 999px; background: var(--bg); overflow: hidden; }
.usage-fill { height: 100%; width: 0%; border-radius: 999px; background: linear-gradient(90deg, var(--accent), #7c3aed); transition: width 0.4s; }

.cost-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.cost-table th { text-align: left; color: var(--muted); font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.4px; padding: 6px 10px; }
.cost-table td { padding: 8px 10px; border-top: 1px solid var(--line); }
.cost-table td:nth-child(2) { font-weight: 700; color: var(--accent); white-space: nowrap; }
.cost-table td:nth-child(3) { color: var(--muted); font-size: 12px; }

/* Unlock bar: selected + all buttons */
.unlock-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

/* Toast */
.toast {
  position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%);
  background: var(--ink); color: #fff; font-size: 13px; padding: 11px 18px;
  border-radius: 10px; box-shadow: 0 8px 24px rgba(0,0,0,0.25); z-index: 60; max-width: 90vw;
}

/* Big in-your-face stats (Gabe: stats were tiny) */
.bigstats { display: flex; gap: 18px; align-items: flex-end; margin: 10px 0 4px; flex-wrap: wrap; }
.bigstat { text-align: left; }
.bignum { font-size: 26px; font-weight: 800; line-height: 1; color: var(--ink); }
.bigstat:first-child .bignum { color: var(--accent); }
.biglabel { font-size: 11px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.4px; margin-top: 3px; }
.substats { font-size: 11.5px; color: var(--muted); margin-left: auto; align-self: center; }

/* Hot buyer (bought xN of the nearby cash sales) */
.badge.hot { background: linear-gradient(135deg, #fb923c, #ef4444); color: #fff; border: 0; }
.badge.hot .ic { color: #fde047; }
.badge.yours .ic { fill: currentColor; stroke-width: 1; }
.hot-inline { color: #ea580c; font-weight: 700; }

/* +N more contacts expander */
.more-chip { border: 1px dashed var(--line); background: transparent; color: var(--accent); cursor: pointer; font-weight: 700; }
.more-contacts { display: contents; }

/* ---------- Inline SVG icons (premium pass 3: no more emoji) ---------- */
.ic {
  width: 1em; height: 1em;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
  vertical-align: -0.13em;
  display: inline-block;
  flex-shrink: 0;
}
.rail-brand .brand-ic { fill: var(--accent); stroke: var(--accent); stroke-width: 1; }
.gt-ic { width: 19px; height: 19px; color: var(--accent); margin-right: 3px; }
.fact-ic { width: 13px; height: 13px; margin-right: 5px; color: var(--muted); }
.badge .ic, .mchip .ic { width: 11px; height: 11px; }
.star-ic { color: #f59e0b; fill: #f59e0b; stroke: #f59e0b; }
.inv-name .star-ic { width: 14px; height: 14px; }
.comp-pin .ic { width: 12px; height: 12px; stroke-width: 2.2; margin-right: 1px; }
.chip .ic { width: 12px; height: 12px; color: var(--muted); }
.hot-inline .ic, .badge.hot .ic { fill: currentColor; stroke-width: 1; }
.forever-note .ic { stroke-width: 2.4; }
.unlock-copy .ic { color: var(--accent); }
.ghost-btn .ic { width: 14px; height: 14px; vertical-align: -0.18em; }

/* ---------- Comp cards in the work column (synced with map pins) ---------- */
.comp-card { cursor: pointer; transition: border-color 0.12s, transform 0.12s; padding: 12px 14px; }
.comp-card:hover { border-color: #16a34a; transform: translateY(-1px); }
.comp-card .badge { font-size: 12px; padding: 6px 12px; white-space: nowrap; }
.comp-card .badge .ic { width: 14px; height: 14px; }
.comp-cols { display: flex; justify-content: space-between; align-items: stretch; gap: 12px; }
.comp-left { min-width: 0; }
.comp-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 9px; }
.comp-right { display: flex; flex-direction: column; align-items: flex-end; text-align: right; gap: 3px; flex-shrink: 0; }
.comp-addr { font-size: 17px; font-weight: 700; }
.comp-price-label { font-size: 10px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: var(--muted); }
.comp-price { font-size: 22px; font-weight: 800; color: #16a34a; white-space: nowrap; line-height: 1; }
.comp-meta { font-size: 12px; color: var(--muted); margin: 2px 0 6px; }
.comp-buyer { font-size: 12.5px; font-weight: 700; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-bottom: 6px; }
.comp-card .ghost-btn { font-size: 12px; padding: 5px 11px; }

/* Pin highlight when its card is hovered */
.comp-pin.pin-hover {
  transform: scale(1.45);
  box-shadow: 0 6px 18px rgba(22, 163, 74, 0.6), 0 0 0 3px rgba(255,255,255,0.9);
  z-index: 30;
}

/* Results summary as HERO numbers (the paid result is the product) */
.sum-hero { display: flex; gap: 26px; align-items: flex-end; flex-wrap: wrap; }
.sum-hero .bignum { font-size: 34px; }
.sum-hero .bignum.sum-found { color: var(--accent); }
.sum-meta {
  margin-left: auto;
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 12px;
  color: var(--muted);
  text-align: right;
  align-self: center;
}

.cost-scroll { overflow-x: auto; }

/* Go-live checklist (Account) */
.readiness-list { display: flex; flex-direction: column; gap: 8px; }
.ready-row { display: flex; align-items: center; gap: 10px; font-size: 13.5px; }
.ready-mark {
  width: 20px; height: 20px; border-radius: 50%; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 800;
}
.ready-mark.ok { background: var(--green-soft); color: var(--green); }
.ready-mark.todo { background: #fef2f2; color: var(--red); }
.ready-mark.manual { background: var(--amber-soft); color: var(--amber); }
.ready-label { font-weight: 700; }
.ready-note { color: var(--muted); font-size: 12.5px; }
.blast-counts.engage { color: var(--green); }
#buybox-request-btn { margin-top: 10px; }

/* --- Funnel blast cards + drilldown + sold state (2026-08-05) --- */
.blast-funnel { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 6px; }
.blast-funnel-btn { border: 1px solid var(--line); background: var(--card); border-radius: 999px;
  padding: 3px 11px; font-size: 12.5px; font-weight: 700; cursor: pointer; color: var(--muted); }
.blast-funnel-btn.v { color: #6d28d9; }
.blast-funnel-btn.c { color: var(--green); border-color: var(--green); }
.blast-funnel-btn.i { color: var(--amber); }
.blast-funnel-btn.zero { opacity: 0.55; }
.blast-funnel-btn:hover { background: var(--bg); }
.blast-drill { margin-top: 10px; border-top: 1px solid var(--line); padding-top: 8px; }
.drill-row { display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 4px 0; font-size: 13.5px; }
.drill-name { font-weight: 700; }
.drill-badge { font-size: 12px; color: var(--muted); }
.drill-badge.c { color: var(--green); font-weight: 800; }
.drill-badge.i { color: var(--amber); font-weight: 700; }
.drill-badge.f { color: #b91c1c; font-weight: 700; text-align: right; }

/* Delivery report — what actually arrived */
.blast-funnel-btn.s { color: var(--muted); }
.deliv-head { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 10px; }
.deliv-chip { font-size: 12px; font-weight: 800; border-radius: 999px; padding: 4px 10px; border: 1px solid var(--line); }
.deliv-chip.ok { color: var(--green); border-color: var(--green); }
.deliv-chip.pend { color: var(--amber); border-color: var(--amber); }
.deliv-chip.bad { color: #b91c1c; border-color: #b91c1c; }
.deliv-chip.unk { color: var(--muted); }
.deliv-reason { font-size: 12.5px; color: var(--muted); line-height: 1.5; margin-bottom: 5px; }
.deliv-reason b { color: var(--ink); }
.deliv-alert { font-size: 13px; line-height: 1.5; color: #7f1d1d; background: #fef2f2;
  border: 1px solid #fecaca; border-radius: 8px; padding: 10px 12px; margin-bottom: 10px; }
.deliv-names { margin-top: 8px; border-top: 1px solid var(--line); padding-top: 6px; }
.deliv-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px;
  flex-wrap: wrap; margin-top: 10px; }
.drill-badge.v { color: #6d28d9; }
.mini-btn { border: 1px solid var(--line); background: var(--card); border-radius: 8px;
  padding: 5px 10px; font-size: 12px; font-weight: 700; cursor: pointer; color: var(--muted); }
.mini-btn:hover { background: var(--bg); }
.blast-gone { opacity: 0.75; }
.gone-badge { font-size: 11.5px; font-weight: 800; color: #b91c1c; background: #fee2e2;
  border-radius: 999px; padding: 2px 8px; margin-left: 6px; vertical-align: middle; }

/* Contextual help chips: deep-link into the Help drawer's matching article */
.help-tip { display: inline-flex; align-items: center; justify-content: center;
  width: 17px; height: 17px; border-radius: 50%; border: 1px solid var(--line);
  background: var(--bg); color: var(--muted); font-size: 11px; font-weight: 800;
  cursor: pointer; vertical-align: middle; margin-left: 4px; padding: 0; line-height: 1; }
.help-tip:hover { color: var(--accent); border-color: var(--accent); }

/* ── Analyze view ─────────────────────────────────────────── */
.an-pickbar { display: flex; align-items: center; gap: 14px; padding: 14px 18px; margin-bottom: 14px; flex-wrap: wrap; }
.an-pickbar .picker-compact { min-width: 300px; }
.an-meta { font-size: 13px; color: var(--muted); font-weight: 600; }
.an-stagechip { background: var(--accent-soft); color: var(--accent-deep); border-radius: 20px;
  padding: 2px 10px; font-size: 11px; font-weight: 700; margin-left: 6px; }
.an-grid { display: grid; grid-template-columns: 360px 1fr; gap: 14px; align-items: start; }
@media (max-width: 980px) { .an-grid { grid-template-columns: 1fr; } }

.an-inputs { padding: 18px; }
.an-h { font-size: 13px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.5px;
  color: var(--ink); margin: 0 0 10px; display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.an-h + .an-h, .an-fields + .an-h { margin-top: 18px; }
.an-note { font-size: 11.5px; font-weight: 500; text-transform: none; letter-spacing: 0; color: var(--muted); }
.an-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 12px; }
.an-fields label { font-size: 12px; font-weight: 600; color: var(--muted); display: block; }
.an-fields-4 { grid-template-columns: repeat(3, 1fr); }
.an-inwrap { display: flex; align-items: center; gap: 6px; background: var(--bg);
  border: 1px solid var(--line); border-radius: 9px; padding: 7px 10px; margin-top: 4px; }
.an-inwrap:focus-within { border-color: var(--accent); background: #fff; }
.an-inwrap span { color: var(--muted); font-size: 13px; font-weight: 600; }
.an-inwrap input { border: none; outline: none; background: transparent; width: 100%;
  font-size: 14px; font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; }
.an-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-left: 2px; vertical-align: 1px; }
.an-dot.on { background: var(--green); }
.an-dot.edited { background: transparent; box-shadow: inset 0 0 0 2px var(--amber); }
.an-rentblock { margin-top: 18px; border-top: 1px solid var(--line); padding-top: 14px; }
.an-rentblock summary { cursor: pointer; list-style: none; }
.an-rentblock summary::before { content: "▸ "; color: var(--muted); }
.an-rentblock[open] summary::before { content: "▾ "; }
.an-rentblock .an-fields { margin-top: 10px; }
.an-exnote { margin: 12px 0 0; }

.an-results { display: flex; flex-direction: column; gap: 14px; }
.an-hero-card { padding: 22px 24px; }
.an-hero-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.an-hero-label { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.8px; color: var(--muted); }
.an-hero-value { font-size: 42px; font-weight: 850; letter-spacing: -1.5px; color: var(--ink);
  font-variant-numeric: tabular-nums; line-height: 1.1; }
.an-hero-value.neg { color: var(--red); }
.an-badge { display: inline-flex; align-items: center; border-radius: 20px; padding: 5px 13px;
  font-size: 12px; font-weight: 700; }
.an-badge.green { background: var(--green-soft); color: var(--green); }
.an-badge.yellow { background: var(--amber-soft); color: var(--amber); }
.an-badge.red { background: #fef2f2; color: var(--red); }
.an-badge.neutral { background: var(--bg); color: var(--muted); }
.an-posdetail { font-size: 13px; color: var(--muted); margin-top: 8px; }
.an-rules { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 16px; }
.an-rules-head { grid-column: 1 / -1; font-size: 11px; font-weight: 800; text-transform: uppercase;
  letter-spacing: 0.6px; color: var(--muted); }
.an-rule { text-align: center; background: var(--bg); border: 1px solid var(--line);
  border-radius: 10px; padding: 10px 6px; }
.an-rule-pct { font-size: 11px; font-weight: 700; color: var(--muted); }
.an-rule-val { font-size: 17px; font-weight: 800; letter-spacing: -0.5px; font-variant-numeric: tabular-nums; }
.an-rule-val.pos { color: var(--ink); } .an-rule-val.neg { color: var(--red); }
.an-rule-sub { font-size: 10.5px; color: var(--muted); }
.an-offer { display: flex; gap: 18px; margin-top: 14px; flex-wrap: wrap; }
.an-offer-row { font-size: 13px; color: var(--muted); display: flex; gap: 7px; align-items: baseline; }
.an-offer-row b { color: var(--ink); font-variant-numeric: tabular-nums; }
.an-offer-max b { color: var(--accent-deep); }
.an-breakdown { margin-top: 16px; border-top: 1px solid var(--line); padding-top: 10px; }
.an-bd-row { display: flex; justify-content: space-between; font-size: 13px; padding: 3.5px 0; color: var(--muted); }
.an-bd-row b { color: var(--ink); font-variant-numeric: tabular-nums; font-weight: 650; }
.an-bd-row b.ded { color: var(--red); }
.an-bd-top b { color: var(--green); }
.an-bd-total { border-top: 1px solid var(--line); margin-top: 5px; padding-top: 8px; font-weight: 800; color: var(--ink); }
.an-bd-total b { font-weight: 850; }

.an-arv-card, .an-dispo-card, .an-save-card { padding: 18px 22px; }
.an-arv-card:empty, .an-dispo-card:empty, .an-save-card:empty { display: none; }
.an-arvrow { display: flex; justify-content: space-between; align-items: baseline;
  font-size: 13px; color: var(--muted); padding: 4px 0; }
.an-arvrow b { color: var(--ink); font-variant-numeric: tabular-nums; }
.an-arvrow b.pos { color: var(--green); } .an-arvrow b.neg { color: var(--red); }
.an-arv-card .an-badge, .an-dispo-card .an-badge { margin-top: 10px; }
.an-spread b { font-size: 20px; font-weight: 800; letter-spacing: -0.5px; }
.an-rentrow { display: flex; align-items: center; gap: 12px; margin-top: 12px;
  border-top: 1px solid var(--line); padding-top: 12px; font-size: 13px; }
.an-rent-score { width: 44px; height: 44px; border-radius: 50%; display: inline-flex;
  align-items: center; justify-content: center; font-size: 16px; font-weight: 850; flex: none; }
.an-rent-score.green { background: var(--green-soft); color: var(--green); box-shadow: inset 0 0 0 2px var(--green); }
.an-rent-score.yellow { background: var(--amber-soft); color: var(--amber); box-shadow: inset 0 0 0 2px var(--amber); }
.an-rent-score.red { background: #fef2f2; color: var(--red); box-shadow: inset 0 0 0 2px var(--red); }
.an-save-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }

/* Analyze fixes (Gabe's shakedown 2026-08-06): placeholders must be unmistakably NOT
   values, and input boxes bottom-align so a wrapped label can't shove its box out of
   line with the row. */
.an-fields label { display: flex; flex-direction: column; justify-content: flex-end; }
.an-inwrap input::placeholder { color: #c6d0dc; font-weight: 500; }
.an-nonums { background: var(--amber-soft); color: var(--amber); border-radius: 20px;
  padding: 2px 10px; font-size: 11px; font-weight: 700; margin-left: 6px; }

/* Analyze readability (Gabe 2026-08-06): on the wide GHL iframe the label and its number
   sat a mile apart in small type. Cap the results column, bump the money type, and run a
   dotted leader between label and value so the eye can't lose the row. */
.an-results { max-width: 880px; }
.an-lead { flex: 1; border-bottom: 2px dotted var(--line); margin: 0 10px; min-width: 24px;
  transform: translateY(-4px); }
.an-bd-row { font-size: 15px; padding: 5px 0; }
.an-bd-row b { font-size: 16px; }
.an-bd-total { font-size: 16px; }
.an-bd-total b { font-size: 19px; }
.an-arvrow { font-size: 14.5px; }
.an-arvrow b { font-size: 16px; }
.an-spread b { font-size: 22px; }
.an-offer-row { font-size: 14px; }
.an-offer-row b { font-size: 16px; }
.an-rule-val { font-size: 19px; }

/* Traffic-light input states (Gabe 2026-08-06): green = has a value, red = required and
   empty, amber = empty but unlocks a section. Focus keeps the white/accent treatment. */
.an-inwrap.an-filled { background: #f0fdf4; border-color: #bbf7d0; }
.an-inwrap.an-req { background: #fef2f2; border-color: #fecaca; }
.an-inwrap.an-want { background: #fffbeb; border-color: #fde68a; }
.an-inwrap.an-filled:focus-within, .an-inwrap.an-req:focus-within,
.an-inwrap.an-want:focus-within { background: #fff; border-color: var(--accent); }

/* Hero card wears the verdict (Gabe 2026-08-06): the whole MAO card tints with the
   position so the deal's state reads from across the room. Breakdown stays on white. */
.an-hero-card { border-left: 6px solid transparent; transition: background 0.25s, border-color 0.25s; }
.an-hero-card.st-green { border-left-color: var(--green); border-color: #a7f3d0;
  background: linear-gradient(180deg, #ecfdf5 0%, #ffffff 52%); }
.an-hero-card.st-green .an-hero-value { color: #047857; }
.an-hero-card.st-yellow { border-left-color: #d97706; border-color: #fde68a;
  background: linear-gradient(180deg, #fffbeb 0%, #ffffff 52%); }
.an-hero-card.st-yellow .an-hero-value { color: var(--amber); }
.an-hero-card.st-red { border-left-color: var(--red); border-color: #fecaca;
  background: linear-gradient(180deg, #fef2f2 0%, #ffffff 52%); }
.an-hero-card.st-red .an-hero-value { color: var(--red); }
.an-hero-card .an-badge { font-size: 13px; padding: 7px 16px; }

/* Dispo card restructure (Gabe 2026-08-06): target price lives IN the dispo card (it's a
   dispo number, set after the deal numbers), and the landlord result block carries the
   same name as its input block on the left. */
.an-target-row { display: block; font-size: 12px; font-weight: 600; color: var(--muted);
  margin-bottom: 12px; }
.an-target-row .an-inwrap { max-width: 240px; }
.an-hero-warn:not(:empty) { margin-top: 10px; font-size: 12.5px; font-weight: 600;
  color: var(--red); background: #fef2f2; border: 1px solid #fecaca; border-radius: 8px;
  padding: 7px 12px; display: inline-block; }
.an-rent-out { margin-top: 14px; border-top: 1px solid var(--line); padding-top: 10px; }
.an-rent-head { font-size: 11px; font-weight: 800; text-transform: uppercase;
  letter-spacing: 0.6px; color: var(--muted); margin-bottom: 4px; }
.an-rentrow { border-top: none; margin-top: 6px; padding-top: 0; }

/* Landlord result lives under its own inputs (Gabe: rent numbers must appear where you
   type them). */
#an-rent-result .an-rentrow { border-top: 1px solid var(--line); margin-top: 12px; padding-top: 12px; }
#an-rent-result .an-note { margin: 10px 0 0; }

/* Readability pass 3 (Gabe: "important things large and in your face") ───────────── */
.an-note { font-size: 13px; }
.an-h { font-size: 14px; }
.an-fields label { font-size: 13px; }
.an-inwrap input { font-size: 16px; }
.an-inwrap span { font-size: 14px; }
.an-meta { font-size: 14.5px; }
.an-stagechip { font-size: 12px; }
.an-posdetail { font-size: 15px; }
.an-hero-warn:not(:empty) { font-size: 13.5px; }
.an-offer-row { font-size: 15px; }
.an-offer-row b { font-size: 17px; }
.an-bd-row { font-size: 15.5px; }
.an-bd-row b { font-size: 17px; }
.an-bd-total b { font-size: 20px; }
.an-arvrow { font-size: 15.5px; }
.an-arvrow b { font-size: 18px; }
.an-spread b { font-size: 24px; }
.an-badge { font-size: 13px; }
.an-target-row { font-size: 13px; }
.an-nonums { font-size: 12px; }

/* Rental hero: stat tiles washed in the score color, numbers you can't miss */
.an-rent-hero { margin-top: 14px; border-radius: 12px; padding: 14px; border: 1px solid var(--line); }
.an-rent-hero.st-green { background: linear-gradient(180deg, #ecfdf5, #f8fffb); border-color: #a7f3d0; }
.an-rent-hero.st-yellow { background: linear-gradient(180deg, #fffbeb, #fffdf4); border-color: #fde68a; }
.an-rent-hero.st-red { background: linear-gradient(180deg, #fef2f2, #fff7f7); border-color: #fecaca; }
.an-rh-top { display: flex; align-items: center; gap: 12px; }
.an-rh-badge { font-size: 17px; font-weight: 800; letter-spacing: -0.3px; }
.an-rh-at { font-size: 13px; color: var(--muted); font-weight: 600; }
.an-rent-score { width: 54px; height: 54px; font-size: 20px; }
.an-rh-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; }
.an-rh-tile { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
.an-rh-lbl { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.6px; color: var(--muted); }
.an-rh-val { font-size: 23px; font-weight: 850; letter-spacing: -0.8px; font-variant-numeric: tabular-nums; }
.an-rh-val span { font-size: 13px; font-weight: 700; color: var(--muted); letter-spacing: 0; }
.an-rh-val.pos { color: #047857; } .an-rh-val.mid { color: var(--amber); } .an-rh-val.neg { color: var(--red); }

/* ============================================================================
   v2 LAYOUT (2026-08-06) — spaces in the rail, a deal worked across four tabs.
   Panels are filled by layout.js; everything here is chrome around them.
   ========================================================================== */

.rail-gap { flex: 1 1 auto; }

/* --- the working-deal strip: what every tab below is talking about --------- */
.deal-context {
  display: flex; align-items: center; gap: 14px;
  padding: 12px 16px; margin-bottom: 14px;
  background: #fff; border: 1px solid var(--line, #e3e9f0);
  border-left: 4px solid var(--brand, #6d28d9); border-radius: 10px;
}
.dc-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.dc-eyebrow {
  font-size: 11px; letter-spacing: .08em; text-transform: uppercase;
  color: #8a97a8; font-weight: 700;
}
#dc-name { font-size: 17px; font-weight: 700; color: #16202c; }
.dc-addr {
  font-size: 14px; color: #5b6879;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
#dc-change { margin-left: auto; flex: none; }

/* --- the four tabs, numbered because the ORDER is the method -------------- */
.flowtabs {
  display: flex; gap: 4px; margin-bottom: 18px;
  border-bottom: 2px solid var(--line, #e3e9f0);
}
.flowtab {
  display: flex; align-items: center; gap: 8px;
  padding: 11px 18px; margin-bottom: -2px;
  background: none; border: none; border-bottom: 3px solid transparent;
  font-size: 15px; font-weight: 600; color: #77839a; cursor: pointer;
  transition: color .12s ease, border-color .12s ease;
}
.flowtab:hover { color: #16202c; }
.flowtab.active { color: var(--brand, #6d28d9); border-bottom-color: var(--brand, #6d28d9); }
.ft-n {
  display: inline-flex; align-items: center; justify-content: center;
  width: 21px; height: 21px; border-radius: 50%;
  background: #eef1f6; color: #77839a; font-size: 12px; font-weight: 700;
}
.flowtab.active .ft-n { background: var(--brand, #6d28d9); color: #fff; }

.flowpanel { animation: fadeIn .12s ease; }
@keyframes fadeIn { from { opacity: .4; } to { opacity: 1; } }

/* #tab-property rules lived here and matched nothing — that panel was renamed to
   #tab-overview before this file was written (found + removed 2026-08-07). */
#tab-buyers #results { display: block; }

.blast-tab-card h3 { margin: 0 0 6px; font-size: 19px; }
.bt-actions { display: flex; gap: 10px; margin-top: 14px; flex-wrap: wrap; }
.empty-note { color: #5b6879; }

@media (max-width: 720px) {
  .flowtab { padding: 10px 12px; font-size: 14px; }
  .flowtab .ft-n { width: 19px; height: 19px; }
  .deal-context { flex-wrap: wrap; }
}

/* What a buyer actually owns (asset-class mix) — the land-vs-houses answer at a glance. */
.inv-mix { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 2px; }
.mix-chip {
  font-size: 12px; font-weight: 600; color: #5b6879;
  background: #f3f6fa; border: 1px solid #e3e9f0;
  padding: 3px 9px; border-radius: 999px;
}
.mix-chip.mix-top { background: #eef2ff; border-color: #c7d2fe; color: #4338ca; }

/* --- v2: spaces across the top, rail retired --------------------------------- */
.shell > .rail { display: none; }
.shell .content { margin-left: 0; }

.spaces {
  display: flex; gap: 6px; align-items: center;
  padding: 0 0 2px; margin: 0 0 16px;
  border-bottom: 1px solid var(--line, #e3e9f0);
}
.space {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 10px 18px; margin-bottom: -1px;
  background: none; border: none; border-bottom: 3px solid transparent;
  font-size: 15.5px; font-weight: 650; color: #6b7789; cursor: pointer;
}
.space:hover { color: #16202c; }
.space.active { color: #16202c; border-bottom-color: #16202c; }
.space .n {
  font-size: 12px; font-weight: 700; color: #5b6879;
  background: #eef1f6; border-radius: 999px; padding: 2px 8px;
}
.space.active .n { background: var(--brand, #6d28d9); color: #fff; }

/* Before a deal is chosen the flow is still visible, just not usable yet — the
   point is that you can SEE the four steps the moment you land. */
.deal-context.no-deal { border-left-color: #c9d2de; background: #fbfcfe; }
.deal-context.no-deal #dc-name { color: #6b7789; font-weight: 600; }
.flowtab:disabled { opacity: .45; cursor: default; }
.flowtab:disabled:hover { color: #77839a; }

/* ============================================================================
   DEAL WORKSPACE v3 (2026-08-06) — record-page pattern, tokens only.
   Overrides the retired v2 .flowtab/.deal-context styles where names collide.
   ========================================================================== */

/* --- persistent deal header ------------------------------------------------ */
.deal-header {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-sm);
  padding: var(--space-4) var(--space-6); margin-bottom: var(--space-4);
}
.dh-top { display: flex; align-items: center; gap: var(--space-4); }
.dh-id { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
#dc-name { font-size: var(--text-lg); font-weight: var(--weight-bold); color: var(--foreground); }
.dc-addr { font-size: var(--text-sm); color: var(--muted-foreground);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#dh-primary { flex: none; }

/* --- two-column body: facts rail + tabbed main ----------------------------- */
.deal-body {
  display: grid; grid-template-columns: 250px minmax(0, 1fr);
  gap: var(--space-4); align-items: start;
  max-width: var(--width-workspace);
}
.deal-rail {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: var(--space-4);
  position: sticky; top: var(--space-3);
}
.rail-title {
  margin: 0 0 var(--space-3); font-size: var(--text-xs); font-weight: var(--weight-bold);
  letter-spacing: .07em; text-transform: uppercase; color: var(--muted-foreground);
}
.rail-note { margin: var(--space-3) 0 0; font-size: var(--text-xs); color: var(--faint-foreground); }
/* facts chips stack vertically in the rail instead of wrapping in a row */
.deal-rail .facts { margin: 0; }
.deal-rail .facts-chips { display: flex; flex-direction: column; gap: var(--space-2); align-items: stretch; }

/* --- plain tabs (unnumbered — sequence lives in the stage bar + task list) -- */
.flowtabs { display: flex; gap: var(--space-1); margin-bottom: var(--space-4);
  border-bottom: 1px solid var(--border); }
.flowtab {
  display: inline-flex; align-items: center; padding: 10px var(--space-4);
  margin-bottom: -1px; background: none; border: none;
  border-bottom: 2px solid transparent; cursor: pointer;
  font-size: var(--text-sm); font-weight: var(--weight-bold); color: var(--muted-foreground);
}
.flowtab:hover { color: var(--foreground); }
.flowtab.active { color: var(--foreground); border-bottom-color: var(--primary); }

/* --- overview: task list card ---------------------------------------------- */
.task-card { padding: var(--space-4) var(--space-6); margin-bottom: var(--space-4); }
.task-title { margin: 0 0 var(--space-3); font-size: var(--text-base);
  font-weight: var(--weight-bold); color: var(--foreground); }
.task-row {
  display: flex; align-items: center; gap: var(--space-3); width: 100%;
  padding: var(--space-3) var(--space-2); background: none; border: none;
  border-top: 1px solid var(--border); cursor: pointer; text-align: left;
}
.task-row:hover { background: var(--gray-1); }
.task-status {
  flex: none; width: 22px; height: 22px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: var(--text-xs); font-weight: var(--weight-bold);
  border: 1.5px solid var(--border-strong); color: var(--muted-foreground);
}
.task-status.done { background: var(--success-soft); border-color: var(--success);
  color: var(--success-strong); }
.task-status.started { background: var(--warning-soft); border-color: var(--warning);
  color: var(--warning-strong); }
.task-label { flex: 1; font-size: var(--text-sm); font-weight: var(--weight-bold);
  color: var(--foreground); display: flex; flex-direction: column; gap: 1px; }
.task-hint { font-size: var(--text-xs); font-weight: var(--weight-normal);
  color: var(--faint-foreground); }
.task-meta { flex: none; font-size: var(--text-xs); color: var(--muted-foreground); }

/* --- overview map + blast card --------------------------------------------- */
#tab-overview .mapcol { width: 100%; margin: 0 0 var(--space-4); }
#tab-overview #map { width: 100%; min-height: 360px; border-radius: var(--radius-lg); }
.blast-tab-card h3 { margin: 0 0 var(--space-2); font-size: var(--text-lg); }
.bt-actions { display: flex; gap: var(--space-3); margin-top: var(--space-4); flex-wrap: wrap; }

/* --- responsive: rail folds above the tabs at narrow widths ----------------- */
@media (max-width: 860px) {
  .deal-body { grid-template-columns: 1fr; }
  .deal-rail { position: static; }
  .deal-rail .facts-chips { flex-direction: row; flex-wrap: wrap; }
  .dh-top { flex-wrap: wrap; }
}

/* In the rail, the unlock button is a quiet secondary action (B7: the deal's numbers
   are the heroes; a paid upsell must not be the loudest element on screen). */
.deal-rail .unlock-report-btn {
  display: flex; flex-direction: column; align-items: flex-start; gap: 2px;
  width: 100%; margin-top: var(--space-2); padding: var(--space-2) var(--space-3);
  background: var(--surface); color: var(--primary);
  border: 1px solid var(--border-strong); border-radius: var(--radius);
  font-size: var(--text-sm); font-weight: var(--weight-bold);
  cursor: pointer; text-align: left; box-shadow: none;
}
.deal-rail .unlock-report-btn:hover { border-color: var(--primary); background: var(--primary-soft); }
.deal-rail .unlock-report-btn .ur-sub {
  font-size: var(--text-xs); font-weight: var(--weight-normal);
  color: var(--muted-foreground); white-space: normal; line-height: 1.35;
}
.deal-rail .unlock-report-btn.unlocked { color: var(--success-strong); border-color: var(--border); }

/* ============================================================================
   Centered, focused page (Gabe 2026-08-06: no more edge-to-edge) + facts as a
   header highlights row (Salesforce compact-layout pattern); rail retired.
   ========================================================================== */
body { background: var(--background); }
.shell .content {
  max-width: 1280px; margin: 0 auto;
  padding-left: var(--space-8); padding-right: var(--space-8);
}
.deal-body { display: block; max-width: none; }
.deal-main { max-width: none; }

/* facts row in the header: quiet chips under the stage bar */
.dh-facts { margin-top: var(--space-3); }
.dh-facts .facts { margin: 0; }
.dh-facts .facts-chips { display: flex; flex-wrap: wrap; gap: var(--space-2); align-items: center; }
.dh-facts .unlock-report-btn {
  display: inline-flex; flex-direction: column; align-items: flex-start; gap: 1px;
  padding: 6px var(--space-3); margin: 0;
  background: var(--surface); color: var(--primary);
  border: 1px solid var(--border-strong); border-radius: 999px;
  font-size: var(--text-xs); font-weight: var(--weight-bold);
  cursor: pointer; box-shadow: none; text-align: left;
}
.dh-facts .unlock-report-btn:hover { border-color: var(--primary); background: var(--primary-soft); }
.dh-facts .unlock-report-btn .ur-sub { display: none; } /* the pill stays one quiet line */
.dh-facts .unlock-report-btn.unlocked { color: var(--success-strong); border-color: var(--border); }

.bt-status { font-size: var(--text-base); font-weight: var(--weight-bold);
  color: var(--foreground); margin: 0; }

@media (max-width: 900px) {
  .shell .content { padding-left: var(--space-4); padding-right: var(--space-4); }
}

/* Pull receipts + already-own note (2026-08-18, Ted's "did I pay twice?" question) */
.dupe-note { flex-basis: 100%; margin-top: var(--space-2); }
.receipts-head { margin: var(--space-4) 0 var(--space-1); font-size: var(--text-sm); }
.receipt-row { display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-3);
  align-items: baseline; padding: 6px 0; border-top: 1px dashed var(--line); }
.receipt-when { font-size: var(--text-xs); color: var(--muted); min-width: 130px; }
.receipt-body { display: flex; flex-wrap: wrap; gap: 2px var(--space-3); }
.receipt-part { font-size: var(--text-xs); color: var(--ink); }
.receipt-part + .receipt-part::before { content: "· "; color: var(--muted); }
