:root {
  --teal: #0fb8c9;
  --teal-dark: #0a8f9c;
  --pink: #7d918e;
  --pink-soft: rgba(125,145,142,0.12);
  --navy: #0a0e0d;
  --ink: #0a0e0d;
  --muted: #5b6b68;
  --line: #e2e6e5;
  --bg: #ffffff;
  --card: #ffffff;
  --good: #0fb8c9;
  --font-heading: 'Montserrat', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-body: 'Montserrat', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --glass-bg: rgba(255, 255, 255, 0.85);
  --glass-border: rgba(0, 0, 0, 0.08);
  --glass-blur: blur(16px);
  font-family: var(--font-body);
}

[data-theme="dark"] {
  --teal: #2ee2f2;
  --teal-dark: #5aeaf4;
  --pink: #7d918e;
  --pink-soft: rgba(125,145,142,0.15);
  --navy: #f2f7f6;
  --ink: #f2f7f6;
  --muted: #7d918e;
  --line: #1b2422;
  --bg: #05080a;
  --card: #0a0f11;
  --good: #2ee2f2;
  --glass-bg: rgba(10, 15, 17, 0.85);
  --glass-border: rgba(255, 255, 255, 0.08);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  background: var(--bg);
  color: var(--ink);
}

body {
  display: flex;
  flex-direction: column;
}

/* ---------- Top bar ---------- */

.topbar {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 12px 20px;
  background: var(--card);
  border-bottom: 1px solid var(--line);
}

.brand { display: flex; align-items: center; gap: 10px; }
.brand-mark { width: 38px; height: 38px; flex: none; }
.brand-name { font-size: 22px; font-weight: 800; letter-spacing: -0.02em; color: var(--navy); font-family: var(--font-heading); }
.brand-tag { font-size: 11px; color: var(--muted); }

.mode-toggle {
  display: flex;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 0;
  padding: 3px;
}

.mode-btn {
  border: 0;
  background: transparent;
  padding: 7px 18px;
  border-radius: 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
}

.mode-btn.active { background: var(--teal); color: #04141a; }

.search-box {
  flex: 1;
  max-width: 460px;
  padding: 10px 16px;
  border: 1px solid var(--line);
  border-radius: 0;
  font-size: 14px;
  outline: none;
}

.search-box:focus { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(15, 184, 201, 0.15); }

.topnav { margin-left: auto; display: flex; align-items: center; gap: 18px; }
.topnav-link { font-size: 14px; font-weight: 600; color: var(--navy); text-decoration: none; }
.topnav-link.primary {
  background: var(--teal);
  color: #04141a;
  padding: 9px 16px;
  border-radius: 0;
  font-weight: 700;
}

/* ---------- Filter bar ---------- */

.filterbar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 20px;
  background: var(--card);
  border-bottom: 1px solid var(--line);
}

.filter {
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 0;
  background: var(--card);
  font-size: 13px;
  color: var(--ink);
}

.filter.check {
  display: flex;
  align-items: center;
  gap: 7px;
  font-weight: 600;
  cursor: pointer;
}

.filter-spacer { flex: 1; }
.result-count { font-size: 13px; color: var(--muted); font-weight: 600; }

/* ---------- Layout ---------- */

.content {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(400px, 44%) 1fr;
  min-height: 0;
}

.list-pane {
  overflow-y: auto;
  padding: 0;
  display: flex;
  flex-direction: column;
  align-content: start;
}

.map-pane { position: relative; min-height: 0; }
#map { position: absolute; inset: 0; }

.map-credit {
  position: absolute;
  left: 10px;
  bottom: 10px;
  z-index: 5;
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: 0;
  padding: 5px 10px;
  font-size: 11px;
  color: var(--muted);
}

/* ---------- Listing cards ---------- */

.card {
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line);
  overflow: hidden;
  cursor: pointer;
  transition: background 0.15s ease;
  display: flex;
  align-items: center;
  padding: 14px 20px;
  gap: 12px;
}

.card:hover { background: var(--pink-soft); }
.card.active { background: var(--pink-soft); border-left: 3px solid var(--teal); }

.card-photo {
  display: none;
}

.card-photo svg { display: none; }

/* ---------- Save / heart button ---------- */
.save-btn {
  position: relative;
  top: auto;
  right: auto;
  background: transparent;
  border: 1px solid var(--line);
  width: 32px;
  height: 32px;
  border-radius: 0;
  font-size: 16px;
  cursor: pointer;
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s, color 0.15s, border-color 0.15s;
  z-index: 2;
  line-height: 1;
  flex: none;
}
.save-btn:hover { transform: scale(1.1); border-color: var(--teal); }
.save-btn.saved { color: var(--teal); border-color: var(--teal); }
.save-btn.detail-save { position: absolute; top: 14px; right: 56px; background: var(--glass-bg); }

.badge {
  display: inline-block;
  background: rgba(255, 255, 255, 0.94);
  border-radius: 0;
  padding: 4px 9px;
  font-size: 11px;
  font-weight: 700;
  color: var(--navy);
  margin-right: 6px;
}

.badge.eligible { color: var(--good); }

.card-body { padding: 0; flex: 1; }
.card-price { font-size: 18px; font-weight: 800; color: var(--navy); font-family: var(--font-heading); }
.card-price .per { font-size: 12px; font-weight: 600; color: var(--muted); }
.card-specs { font-size: 13px; color: var(--muted); margin-top: 2px; }
.card-address { font-size: 12.5px; color: var(--muted); margin-top: 1px; }

.empty-state {
  grid-column: 1 / -1;
  text-align: center;
  color: var(--muted);
  padding: 60px 20px;
  font-size: 14px;
}

/* ---------- Map markers ---------- */

.price-pin {
  background: var(--navy);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  padding: 5px 10px;
  border-radius: 0;
  border: 2px solid #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  cursor: pointer;
  white-space: nowrap;
  font-family: inherit;
}

.price-pin.rent { background: var(--teal); }
.price-pin.active { background: var(--pink); color: var(--navy); transform: scale(1.12); }

/* ---------- Detail overlay ---------- */

.detail-overlay {
  position: fixed;
  inset: 0;
  background: rgba(18, 48, 61, 0.45);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 50;
  padding: 24px;
}

.detail-overlay.hidden { display: none; }

.detail-card {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: 0;
  width: min(680px, 100%);
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(255,255,255,0.4) inset;
}

.detail-photo {
  height: 220px;
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  padding: 14px;
  border-radius: 0;
}

.detail-close {
  background: rgba(255, 255, 255, 0.95);
  border: 0;
  width: 34px;
  height: 34px;
  border-radius: 0;
  font-size: 17px;
  cursor: pointer;
  color: var(--navy);
}

.detail-body { padding: 20px 24px 26px; }
.detail-price { font-size: 28px; font-weight: 700; color: var(--navy); font-family: var(--font-heading); }
.detail-price .per { font-size: 14px; color: var(--muted); font-weight: 600; }
.detail-title { font-size: 17px; font-weight: 700; margin-top: 2px; }
.detail-address { color: var(--muted); font-size: 14px; margin-top: 2px; }

.detail-stats {
  display: flex;
  gap: 10px;
  margin: 16px 0;
  flex-wrap: wrap;
}

.stat {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 0;
  padding: 10px 14px;
  min-width: 96px;
}

.stat .v { font-size: 16px; font-weight: 800; color: var(--navy); }
.stat .k { font-size: 11px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; }

.eligibility {
  border-radius: 0;
  padding: 12px 14px;
  font-size: 13.5px;
  margin-bottom: 14px;
  border: 1px solid var(--line);
}

.eligibility.yes { background: #eef8f1; border-color: #bfe4cd; color: var(--good); }
.eligibility.no { background: var(--pink-soft); border-color: #f2ccd0; color: #8a3a44; }

.detail-blurb { font-size: 14.5px; line-height: 1.55; color: var(--ink); }

.detail-footer {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.detail-source { font-size: 11.5px; color: var(--muted); }

.contact-btn {
  background: var(--teal);
  color: #fff;
  border: 0;
  border-radius: 0;
  padding: 11px 20px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

.contact-btn:hover { background: var(--teal-dark); }

/* ---------- Responsive ---------- */

@media (max-width: 760px) {
  .content { grid-template-columns: 1fr; grid-template-rows: 320px 1fr; }
  .map-pane { order: -1; }
  .search-wrap { display: none; }
  .brand-tag { display: none; }
}

/* ---------- Cahow Estimate ---------- */

.card-est {
  color: var(--teal);
  font-weight: 700;
  font-size: 12.5px;
  margin-top: 2px;
}

.estimate-box {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 0;
  padding: 14px 16px;
  margin-bottom: 14px;
}

.est-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.est-label {
  font-weight: 800;
  color: var(--teal-dark);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.est-conf {
  font-size: 11px;
  padding: 3px 9px;
  border-radius: 0;
  font-weight: 700;
}

.est-conf.high { background: #e3f4ea; color: var(--good); }
.est-conf.medium { background: #fdf3e3; color: #9a6b1f; }
.est-conf.low { background: #fbe9ea; color: #8a3a44; }

.est-value {
  font-size: 24px;
  font-weight: 700;
  color: var(--navy);
  margin-top: 6px;
  font-family: var(--font-heading);
}

.est-sub {
  font-size: 12.5px;
  color: var(--muted);
  margin-top: 2px;
}

.est-comps {
  font-size: 12.5px;
  color: var(--ink);
  margin-top: 10px;
}

.est-comps ul {
  margin: 6px 0 0;
  padding-left: 18px;
}

.est-comps li { margin-top: 2px; color: var(--muted); }

/* ---------- Off-market ---------- */

.dot-pin {
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: var(--pink);
  border: 2px solid #fff;
  box-shadow: 0 1px 5px rgba(0, 0, 0, 0.45);
  cursor: pointer;
  padding: 0;
  transition: transform 0.12s ease;
}

.dot-pin:hover { transform: scale(1.5); background: var(--card); border-color: var(--pink); }

.off-chip {
  display: inline-block;
  vertical-align: 3px;
  background: var(--pink-soft);
  border: 1px solid #f2ccd0;
  color: #8a3a44;
  font-size: 10.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 3px 8px;
  border-radius: 0;
  margin-right: 4px;
}

/* ---------- Any-home search dropdown ---------- */

.search-wrap {
  flex: 1;
  max-width: 460px;
  position: relative;
}

.search-wrap .search-box {
  width: 100%;
  max-width: none;
}

.search-results {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: 0;
  box-shadow: 0 14px 34px rgba(18, 48, 61, 0.2);
  z-index: 60;
  overflow: hidden;
}

.search-results.hidden { display: none; }

.search-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  padding: 10px 14px;
  border: 0;
  background: var(--card);
  cursor: pointer;
  font-size: 13px;
  text-align: left;
  font-family: inherit;
}

.search-item:hover { background: var(--bg); }
.search-item + .search-item { border-top: 1px solid var(--line); }
.si-addr { font-weight: 600; color: var(--ink); }
.si-tag { font-size: 11.5px; color: var(--muted); white-space: nowrap; }
.si-tag.sale { color: var(--teal-dark); font-weight: 700; }
.si-tag.offmarket { color: #8a3a44; font-weight: 700; }

/* ---------- Price history ---------- */

.history-box {
  border: 1px solid var(--line);
  border-radius: 0;
  padding: 14px 16px;
  margin-bottom: 14px;
}

.hist-title {
  font-weight: 800;
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--navy);
  margin-bottom: 8px;
}

.hist-spark {
  width: 100%;
  height: 74px;
  margin-bottom: 10px;
}

.hist-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.hist-table td {
  padding: 6px 4px;
  border-top: 1px solid var(--line);
  color: var(--ink);
}

.hist-table .num { text-align: right; font-weight: 600; }
.hist-table .chg { color: var(--good); font-size: 12px; }
.est-row td { color: var(--teal-dark); font-weight: 700; }

/* ---------- Combined-ARV note (house + accessory apartment) ---------- */

.arv-note {
  background: var(--pink-soft);
  border: 1px solid #f2ccd0;
  border-radius: 0;
  padding: 10px 14px;
  font-size: 12.5px;
  color: var(--ink);
  margin: -6px 0 14px;
}

/* ---------- List a property flow ---------- */

.list-card { width: min(620px, 100%); display: flex; flex-direction: column; }

.list-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 20px 24px 12px;
  border-bottom: 1px solid var(--line);
}
.list-head h2 { margin: 2px 0 0; font-size: 20px; color: var(--navy); font-family: var(--font-heading); }
.list-kicker { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--teal); }

.list-body { padding: 18px 24px; overflow-y: auto; }
.list-hint { font-size: 13.5px; color: var(--muted); line-height: 1.5; margin: 0 0 14px; }

.list-input {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 0;
  font-size: 14px;
  font-family: inherit;
  color: var(--ink);
  background: var(--card);
}
.list-input:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 3px rgba(15, 184, 201, 0.15); }
textarea.list-input { resize: vertical; }

.list-search-results { margin-top: 8px; display: flex; flex-direction: column; gap: 6px; }
.list-result {
  text-align: left; border: 1px solid var(--line); background: var(--card); border-radius: 0;
  padding: 9px 12px; font-size: 13px; cursor: pointer; font-family: inherit;
  display: flex; justify-content: space-between; gap: 8px; align-items: center;
}
.list-result:hover { background: var(--bg); border-color: var(--teal); }
.lr-arv { color: var(--muted); font-size: 12px; white-space: nowrap; }

.list-link { background: none; border: 0; color: var(--teal); font-weight: 600; font-size: 13.5px; cursor: pointer; padding: 10px 0 0; font-family: inherit; }

.known-panel { background: var(--bg); border: 1px solid var(--line); border-radius: 0; padding: 14px 16px; margin-bottom: 16px; }
.known-panel.manual { background: var(--bg); border-color: var(--line); }
.known-title { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.05em; color: var(--teal-dark); margin-bottom: 10px; }
.known-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.known-grid .k { display: block; font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.03em; }
.known-grid .v { display: block; font-size: 14px; font-weight: 700; color: var(--navy); }
.known-note { font-size: 12px; color: var(--muted); margin-top: 10px; }
.known-elig { margin-top: 10px; }
.pill { display: inline-block; font-size: 11.5px; font-weight: 700; padding: 4px 10px; border-radius: 0; }
.pill.ok { background: #e3f4ea; color: var(--good); }
.pill.no { background: var(--pink-soft); color: #8a3a44; }

.frow { margin-bottom: 12px; }
.frow.two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.frow.three { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }
.frow label { display: block; font-size: 12.5px; font-weight: 600; color: var(--ink); }
.frow label > .list-input, .frow label > .seg, .frow label > select { margin-top: 5px; }
.opt { font-weight: 400; color: var(--muted); font-size: 11.5px; }
.opt.req { color: var(--teal-dark); }

.seg { display: flex; border: 1px solid var(--line); border-radius: 0; overflow: hidden; }
.seg-btn { flex: 1; border: 0; background: var(--card); padding: 9px; font-size: 13px; font-weight: 600; color: var(--muted); cursor: pointer; font-family: inherit; }
.seg-btn.on { background: var(--teal); color: #fff; }

.chips { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 6px; }
.chip { border: 1px solid var(--line); background: var(--card); border-radius: 0; padding: 6px 12px; font-size: 12.5px; cursor: pointer; font-family: inherit; color: var(--ink); }
.chip.on { background: var(--teal); color: #fff; border-color: var(--teal); }

.list-foot {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 24px; border-top: 1px solid var(--line);
}

.dropzone {
  border: 2px dashed var(--line); border-radius: 0; padding: 30px 20px;
  text-align: center; color: var(--muted); font-size: 14px; cursor: pointer;
}
.dropzone:hover { border-color: var(--teal); color: var(--teal-dark); }
.dz-icon { font-size: 26px; margin-bottom: 6px; }
.dz-sub { font-size: 12px; margin-top: 6px; }
.dz-sub code { background: var(--bg); padding: 2px 6px; border-radius: 0; }
.photo-preview { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.pp-item { background: var(--bg); border: 1px solid var(--line); border-radius: 0; padding: 6px 10px; font-size: 12px; color: var(--ink); }

.payload {
  background: var(--navy); color: var(--line); border-radius: 0; padding: 14px;
  font-size: 11.5px; line-height: 1.5; overflow-x: auto; white-space: pre; margin: 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

/* ---------- Agents directory ---------- */

.modal-card { width: min(640px, 100%); }

.agency-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.agency { border: 1px solid var(--line); border-radius: 0; padding: 14px; }
.agency-top { display: flex; gap: 10px; align-items: center; margin-bottom: 8px; }
.agency-avatar {
  width: 38px; height: 38px; flex: none; border-radius: 0;
  background: var(--teal); color: #fff; font-weight: 800; font-size: 14px;
  display: flex; align-items: center; justify-content: center;
}
.agency-name { font-weight: 700; font-size: 14px; color: var(--navy); }
.agency-tagline { font-size: 12px; color: var(--muted); }
.agency-meta { display: flex; gap: 10px; font-size: 12px; color: var(--ink); font-weight: 600; margin-bottom: 8px; flex-wrap: wrap; }
.agency-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 8px; }
.atag { background: var(--bg); border: 1px solid var(--line); border-radius: 0; padding: 3px 9px; font-size: 11px; color: var(--ink); }
.agency-parishes { font-size: 11.5px; color: var(--muted); }

/* ---------- ARV lookup ---------- */

.arv-card { background: var(--bg); border: 1px solid var(--line); border-radius: 0; padding: 16px; margin-top: 14px; }
.arv-addr { font-weight: 700; font-size: 14px; color: var(--navy); }
.arv-big { font-size: 30px; font-weight: 700; color: var(--navy); margin: 4px 0 10px; font-family: var(--font-heading); }
.arv-big span { font-size: 13px; font-weight: 600; color: var(--muted); }
.arv-total td { font-weight: 800; color: var(--teal-dark); }
.arv-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.arv-src { font-size: 11px; color: var(--muted); }

/* ---------- Rent Connect ---------- */

.rc-tabs { display: flex; align-items: center; gap: 6px; margin-bottom: 14px; }
.rc-tab {
  border: 1px solid var(--line); background: var(--card); border-radius: 0;
  padding: 7px 14px; font-size: 12.5px; font-weight: 600; color: var(--muted);
  cursor: pointer; font-family: inherit;
}
.rc-tab.on { background: var(--navy); color: #fff; border-color: var(--navy); }
.rc-tab-spacer { flex: 1; }
.contact-btn.sm { padding: 8px 14px; font-size: 13px; }

.rc-list { display: flex; flex-direction: column; gap: 12px; }
.rc-post { border: 1px solid var(--line); border-radius: 0; padding: 14px 16px; border-left: 4px solid var(--teal); }
.rc-post.offering { border-left-color: var(--pink); }
.rc-kind { font-size: 10.5px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.05em; color: var(--teal-dark); }
.rc-post.offering .rc-kind { color: #8a3a44; }
.rc-headline { font-size: 15px; font-weight: 700; color: var(--navy); margin-top: 3px; }
.rc-meta { font-size: 12.5px; color: var(--muted); font-weight: 600; margin-top: 2px; }
.rc-bio { font-size: 13.5px; line-height: 1.5; color: var(--ink); margin: 8px 0 10px; }
.rc-connect {
  border: 1px solid var(--teal); background: var(--card); color: var(--teal-dark);
  border-radius: 0; padding: 7px 14px; font-size: 13px; font-weight: 700;
  cursor: pointer; font-family: inherit;
}
.rc-connect:hover { background: var(--teal); color: #fff; }
.rc-connect.sent { border-color: var(--good); color: var(--good); background: #eef8f1; cursor: default; }

/* ---------- Ad slots ---------- */
.ad-placeholder {
  border: 2px dashed var(--line); border-radius: 0; padding: 20px;
  text-align: center; color: var(--muted); font-size: 13px;
  display: flex; flex-direction: column; gap: 6px; align-items: center;
}
.ad-placeholder a { color: var(--teal); font-weight: 700; text-decoration: none; }
.ad-placeholder a:hover { text-decoration: underline; }
.ad-unit { display: block; border-radius: 0; overflow: hidden; position: relative; }
.ad-unit img { width: 100%; display: block; }
.ad-label { position: absolute; bottom: 6px; right: 8px; font-size: 10px; color: #fff; background: rgba(0,0,0,0.5); padding: 2px 6px; border-radius: 0; }

@media (max-width: 700px) {
  .agency-grid { grid-template-columns: 1fr; }
}

/* ---------- Hero section ---------- */
.hero {
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  padding: 48px 20px 40px;
  text-align: center;
}

.hero-tabs {
  display: flex;
  justify-content: center;
  gap: 0;
  margin-bottom: 24px;
}

.hero-tab {
  padding: 10px 24px;
  border: 1px solid var(--line);
  background: var(--card);
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
  font-family: inherit;
}

.hero-tab + .hero-tab { border-left: 0; }
.hero-tab.active { background: var(--teal); color: #04141a; border-color: var(--teal); }

.hero-headline {
  font-family: var(--font-heading);
  font-size: 28px;
  font-weight: 700;
  color: var(--navy);
  margin: 0 0 8px;
}

.hero-sub {
  font-size: 15px;
  color: var(--muted);
  margin: 0 0 28px;
}

.hero-search {
  display: flex;
  max-width: 640px;
  margin: 0 auto 32px;
  border: 1px solid var(--line);
}

.hero-search input {
  flex: 1;
  padding: 14px 18px;
  border: 0;
  font-size: 15px;
  font-family: inherit;
  color: var(--ink);
  background: var(--card);
  outline: none;
}

.hero-search button {
  padding: 14px 28px;
  background: var(--teal);
  color: #04141a;
  border: 0;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
}

.hero-tiles {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  max-width: 800px;
  margin: 0 auto;
  border: 1px solid var(--line);
}

.hero-tile {
  padding: 20px 16px;
  text-align: left;
  cursor: pointer;
  background: var(--card);
  border: 0;
  font-family: inherit;
  transition: background 0.15s;
}

.hero-tile + .hero-tile { border-left: 1px solid var(--line); }
.hero-tile:hover { background: var(--pink-soft); }
.hero-tile h4 { margin: 0 0 4px; font-size: 13px; font-weight: 700; color: var(--navy); }
.hero-tile p { margin: 0; font-size: 12px; color: var(--muted); line-height: 1.4; }

/* ---------- Theme toggle ---------- */
.theme-toggle {
  background: transparent;
  border: 1px solid var(--line);
  padding: 7px 14px;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
  font-family: inherit;
  white-space: nowrap;
}

.theme-toggle:hover { border-color: var(--teal); color: var(--teal); }

/* ---------- Listing row badges ---------- */
.card .badge {
  background: transparent;
  border: 1px solid var(--teal);
  color: var(--teal);
  padding: 2px 7px;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.card .badge.eligible { border-color: var(--teal); color: var(--teal); }

.card-est {
  display: inline;
  color: var(--muted);
  font-weight: 600;
  font-size: 13px;
  margin-left: 8px;
}

/* ---------- Animations ---------- */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.card { animation: fadeInUp 0.3s ease both; }
.card:nth-child(1) { animation-delay: 0s; }
.card:nth-child(2) { animation-delay: 0.03s; }
.card:nth-child(3) { animation-delay: 0.06s; }
.card:nth-child(4) { animation-delay: 0.09s; }
.card:nth-child(5) { animation-delay: 0.12s; }
.card:nth-child(n+6) { animation-delay: 0.15s; }

.hero { animation: fadeIn 0.4s ease both; }
.hero-tiles { animation: fadeInUp 0.5s ease 0.15s both; }

.detail-overlay:not(.hidden) .detail-card {
  animation: fadeInUp 0.25s ease both;
}

/* ---------- Social auth buttons ---------- */
.auth-social-btn {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; padding: 11px 16px; border: 1px solid var(--line); border-radius: 0;
  background: var(--card); color: var(--ink); font-size: 14px; font-weight: 600;
  cursor: pointer; font-family: inherit; transition: border-color 0.15s, box-shadow 0.15s;
}
.auth-social-btn:hover { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(15, 184, 201, 0.1); }
.auth-social-btn svg { flex: none; }

/* ---------- Messaging center ---------- */
.msg-convo {
  display: block; width: 100%; text-align: left; padding: 12px 14px;
  border: 1px solid var(--line); border-radius: 0; background: var(--card);
  cursor: pointer; font-family: inherit; margin-bottom: 8px; transition: border-color 0.15s;
}
.msg-convo:hover { border-color: var(--teal); }
.msg-convo-top { display: flex; align-items: center; gap: 8px; }
.msg-convo-name { font-size: 14px; font-weight: 700; color: var(--navy); }
.msg-convo-time { margin-left: auto; font-size: 12px; color: var(--muted); }
.msg-convo-preview { font-size: 13px; color: var(--muted); margin-top: 3px; line-height: 1.4; }
.msg-badge {
  background: var(--teal); color: #fff; font-size: 11px; font-weight: 800;
  padding: 1px 7px; border-radius: 0; min-width: 20px; text-align: center;
}

.convo-messages {
  max-height: 350px; overflow-y: auto; display: flex; flex-direction: column; gap: 8px;
  padding: 12px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.msg-bubble { max-width: 80%; padding: 10px 14px; border-radius: 0; font-size: 14px; line-height: 1.45; }
.msg-bubble.mine { align-self: flex-end; background: var(--teal); color: #fff; border-bottom-right-radius: 4px; }
.msg-bubble.theirs { align-self: flex-start; background: var(--bg); color: var(--ink); border-bottom-left-radius: 4px; border: 1px solid var(--line); }
.msg-time { font-size: 10px; margin-top: 3px; opacity: 0.7; }
.msg-bubble.mine .msg-time { text-align: right; }
.msg-body { word-break: break-word; }

/* ---------- Home loans modal ---------- */
.hl-field { display: flex; flex-direction: column; gap: 4px; font-size: 12px; font-weight: 600; color: var(--muted); margin-bottom: 10px; text-transform: uppercase; letter-spacing: 0.03em; }
.hl-field input { font-size: 15px; font-weight: 500; color: var(--ink); padding: 9px 11px; }
.hl-result { border: 1px solid var(--teal); padding: 14px; margin: 6px 0 16px; background: var(--bg); }
.hl-monthly { font-size: 30px; font-weight: 800; color: var(--navy); font-family: var(--font-heading); }
.hl-monthly span { font-size: 14px; font-weight: 500; color: var(--muted); margin-left: 6px; }
.hl-sub { font-size: 12.5px; color: var(--muted); margin-top: 4px; }
.hl-lenders { border-top: 1px solid var(--line); padding-top: 12px; }
.hl-lender { font-size: 13.5px; padding: 6px 0; border-bottom: 1px solid var(--line); color: var(--ink); }

/* ---------- Homeowner photo gallery ---------- */
.home-photos { border-top: 1px solid var(--line); margin-top: 16px; padding-top: 14px; }
.hp-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; flex-wrap: wrap; }
.hp-title { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); }
.hp-upload { background: transparent; border: 1px solid var(--teal); color: var(--teal); font-family: inherit; font-size: 12.5px; font-weight: 600; padding: 6px 12px; cursor: pointer; border-radius: 0; }
.hp-upload:hover { background: var(--teal); color: #04141a; }
.hp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; }
.hp-item { margin: 0; border: 1px solid var(--line); background: var(--bg); }
.hp-item img { width: 100%; height: 110px; object-fit: cover; display: block; }
.hp-cap { font-size: 12px; color: var(--ink); padding: 6px 8px 2px; }
.hp-by { font-size: 11px; color: var(--muted); padding: 2px 8px 7px; }
.hp-empty { grid-column: 1 / -1; font-size: 13px; color: var(--muted); padding: 10px 0; }

/* ---------- Disclaimers ---------- */
.est-disclaimer { font-size: 11.5px; line-height: 1.5; color: var(--muted); margin-top: 12px; padding-top: 10px; border-top: 1px dashed var(--line); }
.site-disclaimer { font-size: 11.5px; line-height: 1.5; color: var(--muted); text-align: center; padding: 12px 20px; background: var(--bg); border-top: 1px solid var(--line); }

/* ---------- User-submitted sales (market data collection) ---------- */
.user-sales { border-top: 1px solid var(--line); margin-top: 16px; padding-top: 14px; }
.us-head { margin-bottom: 10px; }
.us-title { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); }
.us-form { display: flex; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; align-items: flex-end; }
.us-label { display: flex; flex-direction: column; font-size: 11px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 0.03em; }
.us-label input { font-family: inherit; font-size: 13px; padding: 6px 8px; border: 1px solid var(--line); background: var(--card); color: var(--ink); margin-top: 2px; width: 100px; }
.us-submit { font-family: inherit; font-size: 12.5px; font-weight: 600; padding: 6px 12px; border: 1px solid var(--teal); background: transparent; color: var(--teal); cursor: pointer; border-radius: 0; }
.us-submit:hover { background: var(--teal); color: #04141a; }
.us-cta { font-size: 13px; color: var(--muted); margin-bottom: 12px; }
.us-cta a { color: var(--teal); text-decoration: none; font-weight: 600; }
.us-list { display: flex; flex-direction: column; gap: 6px; }
.us-item { display: flex; align-items: center; gap: 12px; padding: 8px; border: 1px solid var(--line); background: var(--bg); }
.us-year { font-size: 13px; font-weight: 600; color: var(--navy); min-width: 50px; }
.us-price { font-size: 14px; font-weight: 700; color: var(--teal); }
.us-empty { font-size: 13px; color: var(--muted); padding: 8px 0; }

/* ---------- Agent tiers / pricing ---------- */
.agent-pricing { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 14px; }
.agent-tier { border: 1px solid var(--line); padding: 16px; background: var(--bg); }
.agent-tier-pro { border-color: var(--teal); }
.agent-tier-name { font-size: 14px; font-weight: 700; color: var(--navy); text-transform: uppercase; letter-spacing: 0.04em; }
.agent-tier-price { font-size: 26px; font-weight: 800; color: var(--navy); font-family: var(--font-heading); margin: 4px 0 10px; }
.agent-tier-features { list-style: none; padding: 0; margin: 0 0 14px; }
.agent-tier-features li { font-size: 13px; color: var(--ink); padding: 4px 0; border-bottom: 1px solid var(--line); }
.agent-tier-features li::before { content: "✓ "; color: var(--teal); font-weight: 700; }
.agent-badge { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; padding: 2px 6px; margin-left: 6px; }
.agent-badge.featured { background: var(--teal); color: #04141a; }
.agency-featured { border-left: 3px solid var(--teal); }

/* ---------- Coming-soon placeholders ---------- */
.coming-soon-block { border: 1px dashed var(--line); padding: 20px; text-align: center; background: var(--bg); }
.coming-soon-block .cs-title { font-size: 15px; font-weight: 700; color: var(--navy); font-family: var(--font-heading); margin-bottom: 8px; }
.coming-soon-block p { font-size: 13px; line-height: 1.55; color: var(--muted); margin: 0 0 14px; }
.coming-soon-block .us-submit { display: inline-block; }
