/* ClearView — shared stylesheet. Plain CSS, no build step, mobile-first. */

:root {
  --navy: #1b2a4a;
  --navy-dark: #121e35;
  --teal: #0e7c6b;
  --teal-dark: #0a5e51;
  --bg: #f6f7f9;
  --card: #ffffff;
  --border: #e2e6ec;
  --text: #1f2937;
  --muted: #6b7280;
  --amber-bg: #fef3c7;
  --amber-border: #f59e0b;
  --green: #15803d;
  --green-bg: #dcfce7;
  --red: #b91c1c;
  --red-bg: #fee2e2;
  --amber-text: #92400e;
  --radius: 12px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.55;
}

a { color: var(--teal-dark); }
a:hover { text-decoration: none; }

/* ---------- Header / nav ---------- */
.site-header {
  background: var(--navy);
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 50;
}
.header-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.brand { text-decoration: none; color: #fff; }
.brand-name { font-size: 26px; font-weight: 800; letter-spacing: -0.5px; }
/* Footer brokerage name matches the brand wordmark size (26px) per Realcomp
   Rule 18.2.7 / NAR SOP 12-5 / MCL 339.2512e: the office name must be
   displayed at least as large as any other name or logo on the page. */
.brand-tag { font-size: 12px; color: #cbd5e1; margin-top: -2px; }
.main-nav { display: flex; gap: 6px; flex-wrap: wrap; }
.main-nav a {
  color: #e2e8f0;
  text-decoration: none;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 15px;
}
.main-nav a:hover, .main-nav a.active { background: rgba(255, 255, 255, 0.14); color: #fff; }

/* ---------- Layout ---------- */
.container { max-width: 1100px; margin: 0 auto; padding: 24px 20px 60px; }
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 20px;
}
.card h2 { margin-top: 0; font-size: 21px; }
.card h3 { margin: 18px 0 8px; font-size: 17px; }
.muted { color: var(--muted); font-size: 14px; }
.small { font-size: 13px; }
.big-number { font-size: 30px; font-weight: 800; color: var(--navy); }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 760px) {
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
}

/* ---------- Hero / search ---------- */
.hero { text-align: center; padding: 70px 20px 40px; }
.hero h1 { font-size: 56px; margin: 0 0 8px; color: var(--navy); letter-spacing: -1px; }
.hero p.tagline { font-size: 19px; color: var(--muted); margin: 0 0 28px; }
.search-wrap { position: relative; max-width: 620px; margin: 0 auto; }
.search-wrap input[type="text"] {
  width: 100%;
  padding: 16px 20px;
  font-size: 17px;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.08);
  outline: none;
}
.search-wrap input[type="text"]:focus { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(14, 124, 107, 0.18); }
.search-results {
  position: absolute;
  left: 0; right: 0; top: calc(100% + 6px);
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
  text-align: left;
  overflow: hidden;
  display: none;
}
.search-results.visible { display: block; }
.search-results button {
  display: block;
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  padding: 12px 18px;
  font-size: 15px;
  cursor: pointer;
  border-bottom: 1px solid #f1f5f9;
}
.search-results button:hover { background: #f1f5f9; }
.search-results button:last-child { border-bottom: none; }
.chips { margin-top: 20px; display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.chip {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 7px 14px;
  font-size: 14px;
  cursor: pointer;
}
.chip:hover { border-color: var(--teal); }

/* ---------- Autocomplete dropdown + selected-filter chips (map search) ---------- */
.autocomplete-wrap { position: relative; }
.autocomplete-list {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: #fff;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
  max-height: 240px;
  overflow-y: auto;
  z-index: 30;
}
.autocomplete-list button {
  display: block;
  width: 100%;
  text-align: left;
  padding: 9px 12px;
  background: none;
  border: none;
  border-bottom: 1px solid #f1f5f9;
  font-size: 15px;
  cursor: pointer;
}
.autocomplete-list button:last-child { border-bottom: none; }
.autocomplete-list button:hover, .autocomplete-list button.active { background: #f1f5f9; }
.autocomplete-list button:disabled { color: var(--muted); cursor: default; }
.selected-chips { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.selected-chips:empty { margin-top: 0; }
.chip.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #eef2f7;
  border-color: #cbd5e1;
  padding: 5px 6px 5px 12px;
  cursor: default;
}
.chip.filter-chip:hover { border-color: #cbd5e1; }
.chip.filter-chip button {
  background: none;
  border: none;
  font-size: 16px;
  line-height: 1;
  padding: 2px 4px;
  color: var(--muted);
  cursor: pointer;
}
.chip.filter-chip button:hover { color: var(--navy); }

/* ---------- Forms ---------- */
label { display: block; font-size: 14px; font-weight: 600; margin: 12px 0 4px; }
input[type="text"], input[type="number"], input[type="email"], select {
  width: 100%;
  padding: 10px 12px;
  font-size: 15px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
}
input[type="file"] { font-size: 14px; margin-top: 4px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 600px) { .form-row { grid-template-columns: 1fr; } }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  background: var(--navy);
  color: #fff;
  border: none;
  padding: 11px 20px;
  font-size: 15px;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  text-decoration: none;
}
.btn:hover { background: var(--navy-dark); }
.btn-secondary { background: #fff; color: var(--navy); border: 1px solid #cbd5e1; }
.btn-secondary:hover { background: #f1f5f9; }
.btn-teal { background: var(--teal); }
.btn-teal:hover { background: var(--teal-dark); }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; }

/* ---------- Toggle / segmented ---------- */
.toggle-group { display: flex; gap: 0; margin: 12px 0; flex-wrap: wrap; }
.toggle-group button {
  background: #fff;
  border: 1px solid #cbd5e1;
  padding: 9px 16px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  margin-left: -1px;
}
.toggle-group button:first-child { border-radius: 8px 0 0 8px; margin-left: 0; }
.toggle-group button:last-child { border-radius: 0 8px 8px 0; }
.toggle-group button.active { background: var(--navy); color: #fff; border-color: var(--navy); }

/* ---------- Tables ---------- */
table { width: 100%; border-collapse: collapse; font-size: 15px; }
th, td { text-align: left; padding: 9px 10px; border-bottom: 1px solid #f1f5f9; }
th { color: var(--muted); font-size: 13px; text-transform: uppercase; letter-spacing: 0.4px; }
tr.total-row td { font-weight: 700; border-top: 2px solid var(--border); }

/* ---------- Cash to close comparison ---------- */
tr.ctc-section td { font-weight: 700; background: #f1f5f9; }
.ctc-compare td.ctc-best { background: var(--green-bg); font-weight: 700; }
.ctc-compare td.ctc-worst { background: var(--red-bg); font-weight: 700; }
.ctc-compare td.ctc-flag { background: var(--amber-bg); }
.form-error { color: var(--red); font-weight: 600; }
.ctc-flag-note { font-size: 13px; color: var(--amber-text); }
.fixed-tag { font-size: 13px; }

/* ---------- Badges / statuses ---------- */
.badge {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}
.badge-green { background: var(--green-bg); color: var(--green); }
.badge-amber { background: var(--amber-bg); color: var(--amber-text); }
.badge-red { background: var(--red-bg); color: var(--red); }
.badge-navy { background: #e0e7ff; color: var(--navy); }

/* ---------- Gallery / map placeholders ---------- */
.gallery {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 10px;
  margin-bottom: 20px;
}
.gallery .photo {
  background: #dbe3ec;
  border-radius: var(--radius);
  min-height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 14px;
  text-align: center;
  padding: 10px;
}
.gallery .photo.main { min-height: 300px; grid-row: span 2; font-size: 16px; }
.gallery .photo img { width: 100%; height: 100%; object-fit: cover; display: block; border-radius: var(--radius); }
.gallery .photo.main img { min-height: 300px; }
.gallery button.photo { border: 2px solid transparent; padding: 0; cursor: pointer; overflow: hidden; }
.gallery button.photo.selected { border-color: var(--teal); }
.gallery button.photo img { border-radius: 0; }
@media (max-width: 760px) {
  .gallery { grid-template-columns: 1fr 1fr; }
  .gallery .photo.main { grid-row: auto; min-height: 200px; grid-column: span 2; }
}
.map-box {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  min-height: 300px;
  overflow: hidden;
  margin-bottom: 20px;
}
.map-box iframe { width: 100%; height: 300px; border: 0; display: block; }
.map-placeholder {
  min-height: 300px;
  background: #e8edf3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  text-align: center;
  padding: 20px;
}

/* ---------- Lender dashboard ---------- */
.lender-card { border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; margin-bottom: 16px; }
.lender-card h3 { margin: 0 0 6px; }
.doc-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 0; border-bottom: 1px solid #f1f5f9; }
.doc-row:last-child { border-bottom: none; }
.doc-row .doc-name { font-weight: 600; flex: 1 1 220px; }
.progress { height: 10px; background: #e5e7eb; border-radius: 999px; overflow: hidden; margin: 10px 0; }
.progress-bar { height: 100%; background: var(--teal); width: 0%; transition: width 0.3s; }
.hidden { display: none !important; }
.callout {
  border-left: 4px solid var(--teal);
  background: #f0fdfa;
  padding: 12px 16px;
  border-radius: 0 8px 8px 0;
  margin: 16px 0;
}
.warning-box {
  border-left: 4px solid var(--amber-border);
  background: #fffbeb;
  padding: 12px 16px;
  border-radius: 0 8px 8px 0;
  margin: 16px 0;
}
details { border: 1px solid var(--border); border-radius: 8px; padding: 12px 16px; margin-bottom: 10px; }
details summary { font-weight: 600; cursor: pointer; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--border); padding: 24px 20px 40px; color: var(--muted); font-size: 13px; }
.footer-inner { max-width: 1100px; margin: 0 auto; }
.footer-brokerage { font-size: 26px; font-weight: 800; color: var(--navy); margin: 0 0 4px; }
.footer-logo { width: 220px; max-width: 70%; height: auto; display: block; margin-bottom: 12px; }
.footer-contact { font-size: 15px; color: var(--ink); margin: 0 0 16px; }

/* ---------- Lender selection, proposals, notifications ---------- */
/* Property-type checkboxes (By-price mode): two inline checkbox
   labels in place of the old type select. */
.form-label { display: block; font-size: 14px; font-weight: 600; margin: 12px 0 4px; }
.type-checks { display: flex; gap: 18px; flex-wrap: wrap; padding: 8px 0 2px; }
.type-checks label { display: flex; align-items: center; gap: 8px; font-weight: 400; font-size: 15px; margin: 0; cursor: pointer; }
.type-checks input[type="checkbox"] { width: 17px; height: 17px; accent-color: var(--teal); cursor: pointer; }
.interest-checks { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 18px; margin-top: 6px; }
@media (max-width: 600px) { .interest-checks { grid-template-columns: 1fr; } }
.interest-checks label { display: flex; align-items: flex-start; gap: 8px; font-weight: 400; font-size: 15px; margin: 6px 0; cursor: pointer; }
.interest-checks input[type="checkbox"] { width: 17px; height: 17px; margin-top: 2px; accent-color: var(--teal); cursor: pointer; flex-shrink: 0; }

.notif-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  border: 1px solid #99f6e4;
  background: #f0fdfa;
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 16px;
}
.notif-badge {
  display: inline-block;
  background: var(--teal);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 999px;
  white-space: nowrap;
}
.notif-bar p { margin: 0; flex: 1 1 260px; }

.proposal-stat { background: var(--bg); border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px; }
.proposal-stat .stat-label { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.4px; }
.proposal-stat .stat-value { font-size: 21px; font-weight: 800; color: var(--navy); }

.optin-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
  margin: 12px 0;
  font-size: 14px;
  cursor: pointer;
}
.optin-row input[type="checkbox"] { width: 17px; height: 17px; margin-top: 2px; accent-color: var(--teal); cursor: pointer; flex-shrink: 0; }
.optin-note { font-size: 13px; color: var(--muted); margin: 4px 0 0; }

/* Lender-side activity indicator light: dim until the buyer does something. */
.activity-dot {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #d1d5db;
  vertical-align: middle;
  margin-right: 6px;
}
.activity-dot.on { background: var(--green); box-shadow: 0 0 0 3px rgba(21, 128, 61, 0.2); }
.activity-row { display: flex; align-items: baseline; gap: 4px; padding: 8px 0; border-bottom: 1px solid #f1f5f9; }
.activity-row:last-child { border-bottom: none; }
.activity-row .activity-name { font-weight: 600; flex: 1 1 180px; }
.activity-row .activity-note { color: var(--muted); font-size: 13px; text-align: right; }

.msg-thread { margin-top: 12px; }
.msg-row { background: var(--bg); border-radius: 8px; padding: 8px 12px; margin-bottom: 8px; font-size: 14px; }
.msg-row .msg-meta { color: var(--muted); font-size: 12px; }
.msg-form { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.msg-form select { flex: 0 1 220px; }
.msg-form input[type="text"] { flex: 1 1 220px; }

/* Floating message bubble + popup (lenders.html): a Facebook-style
   circular bubble fixed bottom-left, with the chat popup above it.
   The popup lives outside #dashboard and #pa-results. */
.msg-bubble {
  position: fixed;
  left: 20px;
  bottom: 20px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: none;
  background: var(--teal);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
  z-index: 60;
  padding: 0;
}
.msg-bubble:hover { background: var(--teal-dark); }
.msg-bubble-dot {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--red);
  border: 2px solid #fff;
}
.msg-popup {
  position: fixed;
  left: 20px;
  bottom: 88px;
  width: min(360px, calc(100vw - 40px));
  max-height: min(480px, calc(100vh - 120px));
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.18);
  z-index: 60;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.msg-popup-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--teal);
  color: #fff;
  padding: 10px 14px;
  font-size: 15px;
}
.msg-popup-close {
  background: none;
  border: none;
  color: #fff;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  padding: 0 2px;
}
.msg-popup-body { padding: 12px 14px 14px; overflow-y: auto; }
.msg-popup-label { display: block; font-size: 13px; font-weight: 600; margin: 0 0 4px; }
.msg-popup .msg-thread { max-height: 200px; overflow-y: auto; margin-top: 10px; }
.msg-popup .msg-row.sent { background: #e6f4f1; margin-left: 28px; }
.msg-popup .msg-row.received { background: var(--bg); margin-right: 28px; }
.msg-sent-note { font-size: 13px; color: var(--green); font-weight: 600; margin: 6px 0 0; }
/* Conversation list in the message popup: one row per lender. */
.msg-conv-list { display: flex; flex-direction: column; }
.msg-conv-row {
  display: block;
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  border-bottom: 1px solid var(--border);
  padding: 10px 4px;
  cursor: pointer;
  font: inherit;
}
.msg-conv-row:hover { background: var(--bg); }
.msg-conv-name { display: block; font-weight: 700; font-size: 14px; }
.msg-conv-preview { display: block; font-size: 13px; color: var(--muted); margin-top: 2px; }
.msg-back {
  background: none;
  border: none;
  color: var(--teal-dark);
  font: inherit;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  padding: 0 0 8px;
}
.msg-popup .msg-form input[type="text"] { flex: 1 1 160px; }
.msg-activity { margin-top: 12px; border-top: 1px solid var(--border); padding-top: 8px; }

/* ---------- Live IDX search results ---------- */
.search-results { max-height: 480px; overflow-y: auto; }
.search-section-label {
  padding: 8px 18px 4px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  color: var(--muted);
}
.search-results button .r-addr { display: block; font-weight: 600; }
.search-results button .r-meta { display: block; font-size: 13px; color: var(--muted); margin-top: 2px; }
.search-results button .r-broker { display: block; font-size: 12px; color: var(--muted); margin-top: 4px; }
.idx-logo-inline { height: 16px; width: auto; vertical-align: -3px; margin-right: 5px; }
.idx-logo-small { height: 28px; width: auto; margin: 10px 18px 0; }
.result-attr { border-top: 1px solid #f1f5f9; padding: 0 18px 12px; }
.result-attr p { font-size: 11px; color: var(--muted); line-height: 1.5; margin: 6px 0 0; }
#idx-attribution .idx-logo-inline { height: 24px; vertical-align: -6px; }

/* ---------- Budget search ---------- */
.budget-btn-row { margin-top: 18px; text-align: center; }
.budget-result {
  display: block;
  width: 100%;
  text-align: left;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
  margin-bottom: 12px;
  cursor: pointer;
  text-decoration: none;
  color: var(--text);
}
.budget-result:hover { border-color: var(--teal); }
.budget-result .b-lead { display: flex; gap: 32px; flex-wrap: wrap; align-items: baseline; }
.budget-result .b-col-label {
  display: block;
  font-size: 12px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.4px;
}
.budget-result .b-price { font-size: 24px; font-weight: 800; color: var(--navy); }
.budget-result .b-pay { font-size: 24px; font-weight: 800; color: var(--teal-dark); }
.budget-result .b-per { font-size: 14px; font-weight: 600; color: var(--muted); }
.budget-result .b-meta { display: block; font-size: 14px; color: var(--muted); margin-top: 6px; }
.budget-result .b-broker { display: block; font-size: 12px; color: var(--muted); margin-top: 6px; }

/* ---------- Budget map view + favorites ---------- */
.budget-map { height: 400px; }
/* Map price pills (AdvancedMarkerElement content): a white pill with
   navy text instead of a plain pin. Teal border on hover/selected. */
.map-price-pill {
  background: #fff;
  color: var(--navy);
  border: 1px solid var(--navy);
  border-radius: 999px;
  padding: 3px 9px;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
  cursor: pointer;
}
.map-price-pill:hover, .map-price-pill.selected { border-color: var(--teal); color: var(--teal-dark); }
/* Map hover card (InfoWindow content): primary photo + price + facts.
   The whole card is a link to the listing. */
.map-hover-card { display: block; width: 220px; color: inherit; text-decoration: none; }
.map-hover-card img { width: 100%; height: 130px; object-fit: cover; display: block; border-radius: 8px; margin-bottom: 8px; }
.map-hover-price { display: block; font-size: 17px; font-weight: 800; color: var(--navy); }
.map-hover-facts { display: block; font-size: 13px; color: var(--muted); margin-top: 2px; }
.map-hover-addr { display: block; font-size: 13px; margin-top: 2px; }
.budget-result-wrap { margin-bottom: 14px; }
.budget-result-wrap .budget-result { margin-bottom: 8px; }
.budget-save-btn { font-size: 13px; padding: 6px 12px; }
.budget-save-btn.saved { border-color: var(--teal); color: var(--teal-dark); background: #f0fdfa; }
#favorite-toggle.saved { border-color: var(--teal); color: var(--teal-dark); background: #f0fdfa; }
/* SEV warning (2026-11-20): shown beside the tax figures when the
   SEV fails the validity check — amber, like the payment pill. */
.sev-warning {
  color: var(--amber-text);
  background: var(--amber-bg);
  border: 1px solid var(--amber-border);
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 14px;
}
#listing-price-payment.payment-pill {
  font-size: 30px;
  font-weight: 800;
  color: var(--amber-text);
  background: var(--amber-bg);
  border: 1px solid var(--amber-border);
  border-radius: 10px;
  padding: 2px 12px;
  margin-left: 12px;
  text-decoration: none;
  white-space: nowrap;
}
/* Green is defined for a future real pre-approval state; nothing
   applies it yet — the pill is always amber until buyer accounts land. */
#listing-price-payment.payment-pill.status-green {
  color: var(--green);
  background: var(--green-bg);
  border-color: var(--green);
}
.saved-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 12px 0;
  border-bottom: 1px solid #f1f5f9;
}
.saved-row:last-child { border-bottom: none; }

/* ---------- Refinement round (Nov 19, 2026) ---------- */

/* Header: logo lockup + visitor status pill. */
.brand-block { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.brand-logo { height: 34px; width: auto; display: block; }
.status-pill {
  display: inline-block;
  font-size: 13px;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid transparent;
  text-decoration: none;
  white-space: nowrap;
}
.status-pill.status-amber { background: var(--amber-bg); border-color: var(--amber-border); color: var(--amber-text); }
/* Green is defined for when buyer accounts + real approvals land.
   Nothing applies it yet — the pill is always amber until then. */
.status-pill.status-green { background: var(--green-bg); border-color: var(--green); color: var(--green); }

/* Lender logo collage (Our Lenders): logos only — a wrapping,
   centered row of tiles with varied light tints, not a uniform
   stacked list. Each tile is one SVG mark + the lender name. */
.logo-collage { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; }
.logo-tile {
  flex: 0 1 176px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 18px 12px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-align: center;
}
.logo-tiles.tint-navy { background: #eef2f7; }
.logo-tiles.tint-teal { background: #f0fdfa; }
.logo-tiles.tint-amber { background: #fffbeb; }
.logo-tiles.tint-crimson { background: #fef2f2; }
.logo-tiles.tint-slate { background: #f1f5f9; }
.logo-mark {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.logo-mark.mark-navy { background: var(--navy); }
.logo-mark.mark-teal { background: var(--teal); }
.logo-mark.mark-amber { background: var(--amber-border); }
.logo-mark.mark-crimson { background: #991b1b; }
.logo-mark.mark-slate { background: #334155; }
.logo-name { font-size: 16px; font-weight: 800; color: var(--navy); line-height: 1.25; }

/* Dashboard preview label — one discreet honesty line under the h1. */
.preview-label { border-left: 3px solid var(--amber-border); padding-left: 10px; }

/* Education section nav (replaces the small "Jump to" line). Sticky
   under the site header so it stays reachable while scrolling. */
.section-nav {
  position: sticky;
  top: 64px;
  z-index: 40;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 14px;
  margin-bottom: 20px;
}
.section-nav a {
  font-size: 15px;
  font-weight: 600;
  color: var(--navy);
  text-decoration: none;
  padding: 6px 10px;
  border-radius: 8px;
  background: #f1f5f9;
}
.section-nav a:hover { background: #e0e7ff; }

/* Notice banner — amber callout box. */
.notice-banner {
  background: var(--amber-bg);
  border: 1px solid var(--amber-border);
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 14px;
  margin-bottom: 20px;
}

/* Collapsible Education parts + listing affordability sections. */
details.part > summary,
.afford-section > summary {
  cursor: pointer;
  font-weight: 800;
  color: var(--navy);
  list-style: none;
}
details.part > summary::-webkit-details-marker,
.afford-section > summary::-webkit-details-marker { display: none; }
details.part > summary::before,
.afford-section > summary::before {
  content: "\25B8";
  display: inline-block;
  margin-right: 8px;
  color: var(--teal-dark);
  transition: transform 0.15s ease;
}
details.part[open] > summary::before,
.afford-section[open] > summary::before { transform: rotate(90deg); }
details.part > summary { font-size: 21px; }
details.part > summary h2 { display: inline; font-size: 21px; }
.afford-section {
  border-top: 1px solid var(--border);
  padding-top: 12px;
  margin-top: 16px;
}
.afford-section > summary { font-size: 18px; }

/* Listing stat chips — icon + value, larger than the old muted line. */
#listing-stats { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.stat-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 16px;
  font-weight: 700;
  color: var(--navy);
  background: #f1f5f9;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 12px;
}
.stat-chip svg { width: 18px; height: 18px; flex-shrink: 0; }

/* Map search mode toggle (By budget / By price). */
.mode-toggle { margin: 0 0 16px; }

/* Distance check + nearby schools on the listing page. */
#distance-form { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-end; margin: 0 0 8px; }
#distance-form label { font-size: 14px; font-weight: 600; width: 100%; }
#distance-form input[type="text"] { flex: 1 1 260px; }
#nearby-schools h3 { margin: 18px 0 8px; font-size: 17px; }
#nearby-schools ul { margin: 0; padding-left: 20px; }
#nearby-schools li { margin-bottom: 4px; }

/* Embedded explainer videos (self-hosted MP4s, no external hosts).
 * Centered in the card: the video is 720px max inside a full-width
 * card, so a left margin would leave a wide band of whitespace. */
.video-embed { margin: 16px auto; max-width: 720px; }
.video-embed video { width: 100%; max-width: 720px; height: auto; display: block; border-radius: 8px; background: #000; }
.video-embed .video-caption { margin-top: 8px; text-align: center; }
.video-card h2 { text-align: center; }

/* Side-by-side proposal comparison (lender dashboard). Lowest value in
 * a row is green, highest is red — only when at least two lenders have
 * a value in that row. The chosen lender's column gets a pale teal
 * tint (listed after the best/worst rules so it wins on overlap). */
.prop-compare td.prop-best { background: var(--green-bg); font-weight: 700; }
.prop-compare td.prop-worst { background: var(--red-bg); font-weight: 700; }
.prop-compare td.prop-chosen, .prop-compare th.prop-chosen { background: #e6f4f1; }
.choose-confirm { font-weight: 600; }
