/* Layout and components. All colors come from the theme file. */
[hidden] { display: none !important; }
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 16px/1.5 var(--font); color: var(--text); background: var(--bg); }
img { max-width: 100%; display: block; }
a { color: var(--brand); }
button, input, select { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: -999px; top: 8px; background: var(--surface); padding: 8px 12px; z-index: 2000; }
.skip-link:focus { left: 8px; }
.hp { position: absolute; left: -5000px; }

/* Buttons and chips */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 1px solid var(--line); background: var(--surface);
  border-radius: 999px; padding: 10px 18px; cursor: pointer; text-decoration: none; font-weight: 600; min-height: 44px; }
.btn-small { padding: 6px 14px; min-height: 36px; font-size: 14px; }
.btn-primary { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); }
.btn-primary:hover { background: #12306e; }
.btn-accent { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn-block { width: 100%; }
.btn-social { width: 100%; }
.btn[disabled], button[disabled] { opacity: .55; cursor: not-allowed; }
.chip { border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 6px 14px; min-height: 36px; cursor: pointer;
  font-size: 14px; font-weight: 600; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.chip:hover { border-color: var(--brand); }
.chip.is-on, .chip[aria-expanded="true"] { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); }
.chip-link { border-color: transparent; background: none; text-decoration: underline; }
.chip-primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.chip.has-value:not(.is-on) { border-color: var(--brand); color: var(--brand); }
.lock { font-size: 12px; }

/* Status dots: color + letter, never color alone */
/* Same house shape as the map pins; the letter sits in the house body */
.dot { display: inline-grid; place-items: center; width: 24px; height: 21px; padding-top: 6px; box-sizing: border-box; flex: none;
  clip-path: polygon(50% 2%, 98% 47%, 86% 47%, 86% 98%, 14% 98%, 14% 47%, 2% 47%); border-radius: 0;
  font: 800 10px/1 var(--font); font-style: normal; color: #fff; }
.dot-active { background: var(--st-active); }
.dot-bumpable { background: var(--st-bumpable); }
.dot-pending { background: var(--st-pending); color: var(--st-pending-ink); }
.dot-sold { background: var(--st-sold); }

/* Header */
.site-header { position: sticky; top: 0; z-index: 1000; height: var(--header-h); display: flex; align-items: center; justify-content: space-between;
  padding: 0 16px; background: var(--surface); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--brand); }
.brand img { width: 62px; height: auto; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-text strong { font: 800 17px/1.1 var(--font-head); letter-spacing: .2px; }
.brand-text small { color: var(--muted); font-size: 12px; }
.main-nav { display: flex; align-items: center; gap: 16px; }
.main-nav > a { text-decoration: none; font-weight: 600; font-size: 15px; }
.nav-phone { color: var(--muted) !important; }
@media (max-width: 760px) { .main-nav > a:not(.btn) { display: none; } .brand-text small { display: none; } }

/* Search page layout: filters on top, map and results side by side (computer) or stacked (phone) */
.page-search { height: 100vh; overflow: hidden; display: flex; flex-direction: column; }
.page-search .site-footer { display: none; }   /* disclaimers move into the results pane on this page */
.search-layout { flex: 1; display: grid; grid-template-columns: minmax(0, 1fr) 460px; grid-template-rows: auto minmax(0, 1fr); min-height: 0; }
.search-bar { grid-column: 1 / -1; background: var(--surface); border-bottom: 1px solid var(--line); padding: 10px 16px; z-index: 900; }
#search-form { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; }
.q-wrap { position: relative; flex: 1 1 260px; max-width: 380px; }
.q-wrap input { width: 100%; border: 1px solid var(--line); border-radius: 999px; padding: 9px 16px; min-height: 40px; }
.ac-list { position: absolute; top: 44px; left: 0; right: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg); list-style: none; margin: 0; padding: 4px; z-index: 1100; }
.ac-list li { padding: 8px 10px; border-radius: 6px; cursor: pointer; display: flex; justify-content: space-between; gap: 8px; }
.ac-list li[aria-selected="true"], .ac-list li:hover { background: var(--bg); }
.ac-list small { color: var(--muted); }
.chip-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.pop { position: relative; }
.pop-panel { position: absolute; top: 44px; left: 0; min-width: 240px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-lg); padding: 14px; z-index: 1100; display: grid; gap: 8px; }
.pop-wide { min-width: 340px; }
.pop-panel label { display: grid; gap: 4px; font-size: 14px; font-weight: 600; }
.pop-panel select { border: 1px solid var(--line); border-radius: 8px; padding: 8px; }
label.check { display: flex; align-items: center; gap: 8px; font-weight: 500; }
.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.seg { border: 0; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.seg legend { font-weight: 700; font-size: 14px; margin-bottom: 6px; }
.seg label input { position: absolute; opacity: 0; }
.seg label span { display: inline-block; border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; cursor: pointer; font-weight: 600; }
.seg label input:checked + span { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); }
.seg label input:focus-visible + span { outline: 3px solid var(--focus); }
.group-label { margin: 8px 0 0; font-size: 12px; text-transform: uppercase; letter-spacing: .6px; color: var(--muted); font-weight: 700; }
.fine { font-size: 12px; color: var(--muted); margin: 4px 0 0; }

.map-pane { position: relative; min-height: 0; }
#map { position: absolute; inset: 0; }
.map-controls { position: absolute; top: 12px; left: 56px; right: 12px; display: flex; justify-content: space-between; gap: 8px; z-index: 800; pointer-events: none; }
.map-controls > * { pointer-events: auto; }
.seg-buttons { display: inline-flex; background: var(--surface); border-radius: 999px; box-shadow: var(--shadow); overflow: hidden; height: 38px; }
.seg-buttons button { border: 0; background: none; padding: 0 14px; font-weight: 600; font-size: 14px; cursor: pointer; }
.seg-buttons button.is-on { background: var(--brand); color: var(--brand-ink); }
.tools { position: relative; display: flex; gap: 8px; align-items: flex-start; }
.btn-draw { display: inline-flex; align-items: center; gap: 6px; }
.btn-tools { box-shadow: var(--shadow); min-height: 38px; padding: 6px 14px; }
.tools-panel { position: absolute; right: 0; top: 46px; width: 250px; background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow-lg); padding: 12px; display: grid; gap: 6px; }
.tools-panel button { text-align: left; border: 1px solid var(--line); background: var(--surface); border-radius: 8px; padding: 8px 10px; cursor: pointer; font-weight: 600; }
.tools-panel button:hover:not([disabled]) { border-color: var(--brand); }
.map-legend { position: absolute; left: 12px; bottom: 26px; background: rgba(255,255,255,.95); border-radius: 999px; padding: 6px 12px; display: flex; gap: 12px;
  font-size: 12px; font-weight: 600; box-shadow: var(--shadow); z-index: 800; }
.map-legend span { display: inline-flex; align-items: center; gap: 4px; }
.map-legend .dot { width: 22px; height: 19px; padding-top: 5px; font-size: 9.5px; }
.draw-hint { position: absolute; top: 60px; left: 50%; transform: translateX(-50%); background: var(--brand); color: var(--brand-ink); padding: 8px 14px;
  border-radius: 999px; font-size: 14px; font-weight: 600; z-index: 800; box-shadow: var(--shadow); }

/* House-shaped pins: color by status + letter + price */
.pin { display: flex; flex-direction: column; align-items: center; transform: translate(-50%, -100%); }
.pin .house { position: relative; width: 26px; height: 22px; }
.pin .house svg { width: 26px; height: 22px; filter: drop-shadow(0 1px 1.5px rgba(0,0,0,.35)); }
.pin .house b { position: absolute; left: 0; right: 0; top: 7px; text-align: center; font: 800 10px/1 var(--font); color: #fff; }
.pin.g-pending .house b { color: var(--st-pending-ink); }
.pin .tag { margin-top: 1px; background: var(--surface); border: 1px solid var(--line); border-radius: 6px; padding: 0 4px; font: 700 11px/16px var(--font);
  box-shadow: 0 1px 2px rgba(0,0,0,.15); white-space: nowrap; }
.pin.is-hot .tag { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); }
.pin-icon { background: none !important; border: 0 !important; }
.cluster { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: var(--brand); color: var(--brand-ink);
  font: 800 13px/1 var(--font); border: 3px solid rgba(255,255,255,.85); box-shadow: var(--shadow); transform: translate(-50%, -50%); }

/* Map pop-up card (must carry RMLS logo + courtesy line: rules B1, B2) */
.leaflet-popup-content { margin: 0; width: 260px !important; }
.leaflet-popup-content-wrapper { border-radius: var(--radius); padding: 0; overflow: hidden; }
.pop-card img { width: 100%; height: 140px; object-fit: cover; }
.pop-card .body { padding: 10px 12px; }
.pop-card .price { font: 800 18px/1.2 var(--font-head); margin: 0; }
.pop-card p { margin: 2px 0; font-size: 13px; }
.pop-card .row { display: flex; gap: 6px; margin-top: 8px; }
.pop-card .row a, .pop-card .row button { flex: 1; font-size: 13px; }

/* Results */
.results-pane { overflow-y: auto; background: var(--bg); border-left: 1px solid var(--line); min-height: 0; }
.results-head { padding: 14px 16px 6px; }
.results-head h1 { font: 800 20px/1.2 var(--font-head); margin: 0; }
.results-summary { margin: 4px 0 0; color: var(--muted); font-size: 14px; }
.sold-gate { margin-top: 10px; background: #FFF4E5; border: 1px solid #F5C77E; border-radius: var(--radius-sm); padding: 10px 12px; display: grid; gap: 6px; font-size: 14px; }
.cards { list-style: none; margin: 0; padding: 8px 16px; display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.card { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; transition: transform .12s; }
.card:hover, .card.is-hot { transform: translateY(-2px); box-shadow: var(--shadow-lg); outline: 2px solid var(--accent); }
.card-link { text-decoration: none; color: inherit; display: block; }
.card-photo { position: relative; aspect-ratio: 4 / 3; background: #dfe6ee; }
.card-photo img { width: 100%; height: 100%; object-fit: cover; }
.badge { position: absolute; top: 8px; left: 8px; border-radius: 6px; padding: 2px 8px; font: 700 12px/18px var(--font); color: #fff; }
.badge.status.g-active { background: var(--st-active); }
.badge.status.g-bumpable { background: var(--st-bumpable); }
.badge.status.g-pending { background: var(--st-pending); color: var(--st-pending-ink); }
.badge.status.g-sold { background: var(--st-sold); }
.badge.oh { top: auto; bottom: 8px; background: var(--brand); }
.heart { position: absolute; top: 6px; right: 6px; width: 36px; height: 36px; border-radius: 50%; border: 0; background: rgba(255,255,255,.92); font-size: 20px; cursor: pointer; color: var(--st-sold); }
.heart[aria-pressed="true"] { background: var(--st-sold); color: #fff; }
.card-body { padding: 10px 12px 12px; }
.card .price { font: 800 18px/1.2 var(--font-head); margin: 0; }
.card .facts, .card .addr { margin: 2px 0 0; font-size: 13px; }
.card .addr { color: var(--muted); }
.courtesy { display: flex; align-items: center; gap: 6px; margin: 8px 0 0; font-size: 12px; color: var(--muted); }
.rmls-mark { height: 22px; width: auto; display: inline-block; vertical-align: middle; }
.pager { display: flex; gap: 6px; justify-content: center; padding: 10px 16px 18px; flex-wrap: wrap; }
.pager button { min-width: 40px; min-height: 40px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; font-weight: 700; }
.pager button[aria-current="page"] { background: var(--brand); color: var(--brand-ink); }
.results-pane .idx-disclaimer { padding: 0 16px 24px; }
.empty { padding: 30px 16px; text-align: center; color: var(--muted); }

@media (max-width: 1100px) { .search-layout { grid-template-columns: minmax(0, 1fr) 360px; } .cards { grid-template-columns: 1fr; } }
@media (max-width: 760px) {
  .page-search { height: auto; overflow: visible; }
  .search-layout { display: flex; flex-direction: column; }
  .map-pane { height: 48vh; }   /* phone: map on top, list right below (not sticky, so the list gets the screen when scrolling) */
  .results-pane { border-left: 0; overflow: visible; }
  .map-controls { left: 12px; top: 12px; flex-wrap: wrap; }
  .map-legend { display: none; }
  .cards { grid-template-columns: 1fr; }
  #search-form { gap: 8px; }
  .chip-row { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; }
  .pop-panel { position: fixed; left: 8px; right: 8px; top: auto; bottom: 8px; min-width: 0; }
}

/* Footer and disclaimers (rules A2 to A5) */
.site-footer { background: var(--brand); color: var(--brand-ink); padding: 24px 16px; font-size: 13px; }
.site-footer a { color: var(--brand-ink); }
.idx-disclaimer { font-size: 12px; line-height: 1.5; color: inherit; opacity: .92; }
.idx-disclaimer p { margin: 6px 0; }
.idx-disclaimer .rmls-mark { display: inline-block; vertical-align: middle; margin-right: 4px; background: #fff; border-radius: 3px; }
.footer-links { margin-top: 12px; }
.sample-note { font-weight: 700; color: #FFD666; }
.results-pane .idx-disclaimer { color: var(--muted); }
.results-pane .sample-note { color: var(--st-sold); }

/* Modal */
.modal { border: 0; border-radius: 16px; padding: 22px; width: min(440px, 94vw); box-shadow: var(--shadow-lg); }
.modal::backdrop { background: rgba(11, 31, 75, .45); }
.modal h2 { font: 800 22px/1.2 var(--font-head); margin: 0 0 6px; color: var(--brand); }
.modal-lead { margin: 0 0 14px; color: var(--muted); }
.modal-close-form { position: absolute; right: 10px; top: 8px; margin: 0; }
.modal-close { border: 0; background: none; font-size: 28px; cursor: pointer; line-height: 1; }
.modal form label { display: grid; gap: 4px; font-size: 14px; font-weight: 600; margin-bottom: 10px; }
.modal input:not([type="checkbox"]), .modal textarea, .modal select { border: 1px solid var(--line); border-radius: 8px; padding: 10px; width: 100%; }
.modal label.check { display: flex; font-weight: 500; }
.social-buttons { display: grid; gap: 8px; }
.or { text-align: center; margin: 12px 0; color: var(--muted); font-size: 13px; }
.terms { font-size: 13px; margin-bottom: 8px; }
.terms ol { padding-left: 18px; margin: 6px 0; }
.form-error { color: var(--st-sold); font-weight: 600; }
.opt { font-weight: 400; color: var(--muted); }

/* Listing page */
.listing { max-width: 1180px; margin: 0 auto; padding: 16px; }
.crumbs { font-size: 13px; color: var(--muted); margin-bottom: 8px; }
.gallery { display: grid; grid-template-columns: 2fr 1fr; grid-template-rows: 1fr 1fr; gap: 6px; border-radius: var(--radius); overflow: hidden; height: min(56vw, 480px); position: relative; }
.gallery img { width: 100%; height: 100%; object-fit: cover; cursor: zoom-in; }
.gallery img:first-child { grid-row: 1 / 3; }
.gallery .all-photos { position: absolute; right: 12px; bottom: 12px; }
.gallery.one { grid-template-columns: 1fr; }
.courtesy-strip { display: flex; align-items: center; gap: 8px; padding: 8px 2px; font-size: 14px; color: var(--muted); border-bottom: 1px solid var(--line); }
.listing-grid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 28px; margin-top: 16px; }
.l-head h1 { font: 800 30px/1.15 var(--font-head); margin: 4px 0; }
.l-head .addr { font-size: 18px; margin: 0; }
.l-head .status-pill { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: 14px; }
.key-facts { display: flex; flex-wrap: wrap; gap: 8px 22px; margin: 14px 0; padding: 12px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.key-facts div { display: grid; }
.key-facts b { font: 800 20px/1.1 var(--font-head); }
.key-facts span { font-size: 13px; color: var(--muted); }
.section { margin: 26px 0; }
.section h2 { font: 800 20px/1.2 var(--font-head); margin: 0 0 10px; color: var(--brand); }
.details-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.details-grid h3 { font-size: 15px; margin: 0 0 6px; }
.details-grid dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 4px 10px; font-size: 14px; }
.details-grid dt { color: var(--muted); }
.details-grid dd { margin: 0; }
.other-sources { background: var(--surface); border: 1px dashed var(--line); border-radius: var(--radius); padding: 14px 16px; }
.other-sources .src { font-size: 12px; color: var(--muted); }
#l-map { height: 300px; border-radius: var(--radius); }
.side-card { position: sticky; top: calc(var(--header-h) + 16px); background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; display: grid; gap: 10px; }
.side-card h2 { font: 800 18px/1.2 var(--font-head); margin: 0; }
.side-card textarea { min-height: 90px; resize: vertical; }
.side-card form { display: grid; gap: 8px; }
.side-card input, .side-card textarea, .side-card select { border: 1px solid var(--line); border-radius: 8px; padding: 10px; width: 100%; }
.tabs { display: flex; gap: 6px; }
.tabs button { flex: 1; border: 1px solid var(--line); background: var(--surface); border-radius: 8px; padding: 8px; font-weight: 700; cursor: pointer; }
.tabs button[aria-selected="true"] { background: var(--brand); color: var(--brand-ink); }
.payment b { font: 800 24px/1.1 var(--font-head); }
.payment table { width: 100%; font-size: 14px; border-collapse: collapse; }
.payment td { padding: 3px 0; }
.payment td:last-child { text-align: right; }
.gate-box { background: #FFF4E5; border: 1px solid #F5C77E; border-radius: var(--radius); padding: 16px; display: grid; gap: 8px; }
.oh-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.oh-list li { background: var(--surface); border-radius: 8px; padding: 8px 12px; border-left: 4px solid var(--accent); }
.history-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.history-table th, .history-table td { text-align: left; padding: 6px 4px; border-bottom: 1px solid var(--line); }
@media (max-width: 900px) { .listing-grid { grid-template-columns: 1fr; } .side-card { position: static; } .gallery { grid-template-columns: 1fr; } .gallery img:not(:first-child) { display: none; } .gallery img:first-child { grid-row: auto; } }

/* Account page */
.account { max-width: 1100px; margin: 0 auto; padding: 20px 16px 40px; }
.welcome { display: flex; justify-content: space-between; gap: 16px; align-items: center; background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; }
.welcome h1 { font: 800 24px/1.2 var(--font-head); margin: 0; color: var(--brand); }
.welcome .pcs-line { margin: 8px 0; padding: 8px 12px; border-left: 4px solid var(--brand); background: var(--bg, #f4f7fb); border-radius: 10px; font-size: 14.5px; max-width: 620px; }
.welcome .pcs-line a { font-weight: 700; }
.view-as { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: 10px 0 4px; }
.view-as label { font-weight: 700; color: var(--brand); }
.view-as select { min-height: 40px; padding: 6px 10px; border: 1px solid var(--line, #D6E1ED); border-radius: 999px; font: inherit; background: var(--surface); }
.view-as .fine { flex-basis: 100%; }
.team-card { display: flex; gap: 10px; align-items: center; }
.team-card .avatar { width: 48px; height: 48px; border-radius: 50%; background: var(--brand); color: var(--brand-ink); display: grid; place-items: center; font-weight: 800; }
.saved-row { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px 16px; margin-bottom: 10px; display: grid; gap: 8px; }
.saved-row .top { display: flex; justify-content: space-between; gap: 10px; align-items: center; flex-wrap: wrap; }
.new-badge { background: var(--st-active); color: #fff; border-radius: 999px; padding: 1px 8px; font-size: 12px; font-weight: 700; }
.strip { display: flex; gap: 8px; overflow-x: auto; }
.strip a { flex: 0 0 120px; text-decoration: none; color: inherit; font-size: 12px; }
.strip img { width: 120px; height: 80px; object-fit: cover; border-radius: 8px; }
.fav-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; list-style: none; padding: 0; }

/* fixes after first screenshot review */
.side-card { align-self: start; align-content: start; }
.side-card .heart-wide { position: static; width: 100%; height: auto; border-radius: 999px; font-size: 16px; color: var(--st-sold); background: var(--surface); border: 1px solid var(--line); }
.side-card .heart-wide[aria-pressed="true"] { background: var(--st-sold); color: #fff; }
.courtesy .rmls-mark, .courtesy-strip .rmls-mark { height: 22px; width: auto; flex: 0 0 auto; }
.payment select { border: 1px solid var(--line); border-radius: 8px; padding: 6px; }
.payment .row-2 label { display: grid; gap: 4px; font-size: 13px; font-weight: 600; }

.signin-existing { margin-top: 14px; font-size: 14px; border-top: 1px solid var(--line); padding-top: 10px; }
.signin-existing summary { cursor: pointer; font-weight: 600; color: var(--brand); }
.signin-existing form { margin-top: 10px; }
.form-msg { color: var(--st-active); font-weight: 600; }
.pop-card img.rmls-mark { width: 40px; height: auto; object-fit: contain; }
.pop-card .courtesy { margin-top: 6px; }
.pop-card .row a.btn-primary, .leaflet-container .pop-card a.btn-primary { color: var(--brand-ink); }
.pop-card .row a.btn:not(.btn-primary) { color: var(--brand); }
.leaflet-container .pop-card p { margin: 2px 0; }

.smart-note { margin: 6px 0 0; font-size: 13px; background: #E7F1FB; border-radius: 8px; padding: 6px 10px; color: var(--text); }

/* ---------- Messages thread (My Home Search and agent pages) ---------- */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.thread { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 10px; }
.thread .msg { max-width: 640px; padding: 10px 14px; border-radius: 12px; background: var(--surface, #fff); border: 1px solid var(--line); }
.thread .msg p { margin: 4px 0 0; }
.thread .who { font-size: 12px; color: var(--muted); }
.thread .from-lead { justify-self: start; }
.thread .to-lead { justify-self: end; background: color-mix(in srgb, var(--accent) 10%, #fff); border-color: color-mix(in srgb, var(--accent) 35%, #fff); }
.thread .private { justify-self: end; background: #FFF8E6; border-style: dashed; }
#messages textarea, .agent-card textarea { width: 100%; max-width: 640px; font: inherit; padding: 10px; border: 1px solid var(--line); border-radius: 10px; }
.notice { background: #FFF8E6; border: 1px solid #F0D58A; padding: 10px 14px; border-radius: 10px; }
.pill { display: inline-block; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: var(--accent); color: var(--accent-ink); }
.pill-muted { background: var(--line); color: var(--muted); }

/* ---------- Agent dashboard ---------- */
.agent-main { max-width: 1240px; margin: 0 auto; padding: 18px 20px 40px; }
.agent-card { background: var(--surface, #fff); border: 1px solid var(--line); border-radius: 14px; padding: 16px 20px; }
.agent-card.narrow { max-width: 460px; margin: 40px auto; }
.agent-card h1 { margin-top: 0; font-size: 26px; }
.agent-card h2 { font-size: 17px; margin: 0 0 10px; }
.agent-card input[type=email] { width: 100%; padding: 10px; border: 1px solid var(--line); border-radius: 10px; font: inherit; }
.agent-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(420px, 1fr)); gap: 16px; align-items: start; }
.agent-bar { display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; align-items: center; }
.agent-search input { padding: 8px 12px; border: 1px solid var(--line); border-radius: 999px; min-width: 240px; font: inherit; }
.agent-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 14px; }
.agent-tabs a { padding: 6px 14px; border-radius: 999px; border: 1px solid var(--line); text-decoration: none; color: var(--text, #1B2433); background: #fff; }
.agent-tabs a[aria-current] { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); }
.table-wrap { overflow-x: auto; background: #fff; border: 1px solid var(--line); border-radius: 14px; }
.agent-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.agent-table th, .agent-table td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.agent-table th { font-size: 12px; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); background: var(--bg); }
.agent-table tr.has-unread { background: color-mix(in srgb, var(--accent) 6%, #fff); }
.inline-form { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.check { display: flex; gap: 8px; align-items: center; font-size: 14px; margin-top: 6px; }
@media (max-width: 520px) { .agent-grid { grid-template-columns: 1fr; } }

/* ---------- Phone polish (Nov 18 review) ---------- */
.btn { white-space: nowrap; }
@media (max-width: 520px) {
  .brand-text strong { font-size: 15px; }
  .brand img { width: 48px; height: auto; }
  .welcome { flex-direction: column; align-items: flex-start; }
  .team-card { width: 100%; border-top: 1px solid var(--line); padding-top: 12px; }
  .team-card .avatar { flex: 0 0 44px; width: 44px; height: 44px; }
}

/* ---------- Feed health ---------- */
.health-pill { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.health-pill.h-ok { background: #E3F4E6; color: #17692F; }
.health-pill.h-warn { background: #FFF3D6; color: #7A5600; }
.health-pill.h-fail { background: #FDE4E4; color: #A11D1D; }
.leaflet-control-attribution a { text-decoration: underline; }
.site-notice { margin: 10px 16px; }

/* ---------- Quick City picker ---------- */
.pop-cities { width: min(460px, 92vw); }
.pop-head { margin: 0 0 8px; font-weight: 600; }
.city-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 16px; }
.city-grid .check small { color: var(--muted); margin-left: 4px; }
.pop-foot { margin: 10px 0 0; display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.linkish { background: none; border: 0; padding: 0; color: var(--accent); font: inherit; font-weight: 600; text-decoration: underline; cursor: pointer; }
/* An open chip that also has a value: keep its text readable */
.chip.has-value[aria-expanded="true"] { color: var(--brand-ink); }
/* Filter pop-ups sit above the map (and its credits line) on every screen size */
.search-bar { position: relative; z-index: 1200; }
@media (max-width: 860px) { .pop-panel { max-height: 70vh; overflow: auto; } }
@media (max-width: 860px) { #save-search { order: -1; } }   /* phones: the alerts button comes first so it is never scrolled out of sight */

/* ---------- Feature pages and Advanced search ---------- */
.page-h1 { font: 800 30px/1.15 var(--font-head); margin: 4px 0 8px; }
.lead { font-size: 17px; color: var(--muted); max-width: 760px; }
.page-cards { grid-template-columns: repeat(auto-fill, minmax(max(260px, calc((100% - 42px) / 4)), 1fr)); padding: 16px 0; }
.feature-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; margin: 16px 0 32px; }
.feature-tile { display: grid; gap: 4px; padding: 16px 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; color: inherit; }
.feature-tile:hover { border-color: var(--accent); box-shadow: var(--shadow); }
.feature-tile b { font-size: 17px; color: var(--brand); }
.feature-tile span { font-weight: 700; color: var(--accent); }
.feature-tile small { color: var(--muted); font-size: 13.5px; }
.adv-form { display: grid; gap: 14px; max-width: 900px; margin: 12px 0 40px; }
.adv-form fieldset { border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 18px; background: var(--surface); }
.adv-form legend { font-weight: 700; padding: 0 6px; color: var(--brand); }
.adv-form label:not(.check) { display: grid; gap: 4px; font-size: 14px; font-weight: 600; }
.adv-form input[type=search], .adv-form select { border: 1px solid var(--line); border-radius: 8px; padding: 9px 10px; font: inherit; }
.adv-form .wide { margin-bottom: 10px; }
.adv-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
.adv-form input[type=text] { border: 1px solid var(--line); border-radius: 8px; padding: 9px 10px; font: inherit; }
.sch-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.sch-chips:empty { display: none; }
.adv-schools .fine { margin: 0 0 10px; }
.adv-schools .fine:last-child { margin: 10px 0 0; }
.school-fine { font-size: 12px; color: var(--muted, #5b6470); margin: 4px 0 0; }
.adv-row { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.adv-cities { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.adv-actions { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; position: sticky; bottom: 0; background: var(--bg); padding: 10px 0; }

/* Header "Search homes" menu: map, advanced, by feature */
.nav-menu { position: relative; }
.nav-menu summary { cursor: pointer; font-weight: 600; list-style: none; }
.nav-menu summary::-webkit-details-marker { display: none; }
.nav-menu summary::after { content: " \25BE"; font-size: 12px; }
.nav-menu-panel { position: absolute; right: 0; top: 30px; min-width: 230px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg); padding: 8px; display: grid; z-index: 1300; }
.nav-menu-panel a { padding: 8px 10px; border-radius: 6px; text-decoration: none; color: var(--text, #1B2433); font-weight: 600; }
.nav-menu-panel a:hover { background: var(--bg); }
.nav-menu-panel a.sub { font-weight: 400; padding-left: 22px; font-size: 14px; }

/* ---------- Listing page, Portland Veteran Homes layout (Nov 18) ---------- */
.l-topbar { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin: 4px 0 12px; }
.back-link { font-weight: 600; text-decoration: none; }
.l-stepper { display: inline-flex; align-items: center; gap: 8px; margin-left: 12px; }
.l-stepper .l-step-count { font-size: 13px; color: #5B6576; white-space: nowrap; }
@media (max-width: 640px) { .l-topbar { flex-wrap: wrap; row-gap: 8px; } .l-stepper { margin-left: auto; } }
.l-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.l-actions .btn { border-radius: 999px; }
.gallery2 { display: grid; grid-template-columns: 2fr 1fr; gap: 6px; height: min(56vw, 470px); border-radius: var(--radius); overflow: hidden; }
.gallery2.one { grid-template-columns: 1fr; }
.g-main { position: relative; min-height: 0; background: #000; }
.g-main img { width: 100%; height: 100%; object-fit: cover; cursor: zoom-in; display: block; }
.g-side { display: grid; grid-template-rows: 1fr 1fr; gap: 6px; position: relative; min-height: 0; }
.g-side img { width: 100%; height: 100%; object-fit: cover; cursor: zoom-in; display: block; min-height: 0; }
.g-status { position: absolute; top: 12px; left: 12px; padding: 5px 12px; border-radius: 999px; font: 700 13px/1 var(--font); color: #fff; background: var(--st-active); box-shadow: var(--shadow); }
.g-status.st-bumpable { background: var(--st-bumpable); }
.g-status.st-pending { background: var(--st-pending); color: var(--st-pending-ink); }
.g-status.st-sold { background: var(--st-sold); }
.g-arrow { position: absolute; top: 50%; transform: translateY(-50%); width: 42px; height: 42px; border-radius: 50%; border: 0; background: rgba(255,255,255,.92); color: var(--brand); font-size: 28px; line-height: 1; cursor: pointer; box-shadow: var(--shadow); display: grid; place-items: center; padding-bottom: 3px; }
.g-prev { left: 12px; } .g-next { right: 12px; }
.g-arrow:hover { background: #fff; }
.g-tour { position: absolute; left: 12px; bottom: 12px; display: inline-flex; gap: 6px; align-items: center; padding: 8px 14px; border-radius: 999px; border: 0; background: var(--brand); color: var(--brand-ink); font: 700 14px/1 var(--font); cursor: pointer; box-shadow: var(--shadow); }
.g-count { position: absolute; right: 12px; bottom: 12px; padding: 5px 10px; border-radius: 999px; background: rgba(0,0,0,.65); color: #fff; font: 600 13px/1 var(--font); }
.g-all { position: absolute; right: 12px; bottom: 12px; padding: 8px 14px; border-radius: 999px; border: 0; background: #fff; color: var(--brand); font: 700 14px/1 var(--font); cursor: pointer; box-shadow: var(--shadow); }
.l-head2 { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin: 6px 0 10px; }
.l-head2 h1 { font: 800 28px/1.15 var(--font-head); margin: 0 0 4px; color: var(--brand); }
.l-sub { margin: 0 0 2px; color: var(--muted); }
.l-head2 .fine { margin: 0; }
.l-price { text-align: right; display: grid; gap: 2px; }
.l-price b { font: 800 30px/1.1 var(--font-head); color: var(--text); white-space: nowrap; }
.fact-bubbles { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 14px; }
.fact-bubbles > div { display: grid; justify-items: center; gap: 2px; min-width: 92px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.fb-top { display: inline-flex; align-items: center; gap: 6px; color: var(--accent); }
.fb-top b { color: var(--text); font: 800 18px/1 var(--font-head); }
.fact-bubbles small { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .04em; font-weight: 600; }
.ic { flex: none; }
.tour-bar { display: flex; width: 100%; justify-content: center; gap: 8px; padding: 12px; border-radius: var(--radius-sm); border: 1px solid var(--brand); background: var(--surface); color: var(--brand); font: 700 15px/1 var(--font); cursor: pointer; margin: 0 0 14px; }
.tour-bar:hover { background: #EEF3FA; }
.tour-panel { margin: -6px 0 16px; }
.tour-frame iframe { width: 100%; aspect-ratio: 16 / 9; border: 0; border-radius: var(--radius-sm); background: #000; }
.kicker { font: 700 12px/1 var(--font); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 16px 0 8px; }
.hl-chips .hl { display: inline-block; padding: 6px 12px; border-radius: 999px; background: #E6F3F6; color: #035466; font-weight: 600; font-size: 14px; }
.remarks.clamp { max-height: 9.5em; overflow: hidden; -webkit-mask-image: linear-gradient(#000 70%, transparent); mask-image: linear-gradient(#000 70%, transparent); }
.linkish { background: none; border: 0; padding: 0; color: var(--accent); font-weight: 700; cursor: pointer; text-decoration: underline; }
.tour-card { display: grid; gap: 10px; }
.agent-row { display: flex; gap: 12px; align-items: center; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.agent-row img { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; object-position: top; background: #E6EBF2; }
.agent-row b { display: block; color: var(--brand); font: 800 16px/1.2 var(--font-head); }
.agent-row span { color: var(--muted); font-size: 13px; }
#tour-form { display: grid; gap: 10px; }
#tour-form h2 { font: 800 19px/1.2 var(--font-head); color: var(--brand); margin: 4px 0 0; }
#tour-form .fine { margin: -4px 0 0; }
#tour-form label { display: grid; gap: 4px; font-size: 13px; font-weight: 600; color: var(--muted); }
#tour-form select, .tour-contact input, #ask-form input, #ask-form textarea { width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); font: inherit; color: var(--text); background: #fff; }
.tour-contact { display: grid; gap: 8px; }
.day-picker { display: grid; grid-template-columns: 28px 1fr 28px; align-items: center; gap: 4px; }
.day-arrow { width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--line); background: #fff; color: var(--brand); font-size: 18px; line-height: 1; cursor: pointer; }
.day-strip { display: flex; gap: 6px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.day-strip::-webkit-scrollbar { display: none; }
.day { flex: 0 0 calc((100% - 18px) / 4); scroll-snap-align: start; display: grid; justify-items: center; gap: 2px; padding: 8px 0; border: 1px solid var(--line); border-radius: 10px; background: #fff; cursor: pointer; color: var(--text); }
.day small { font: 700 11px/1 var(--font); text-transform: uppercase; color: var(--muted); }
.day b { font: 800 18px/1 var(--font-head); }
.day[aria-checked="true"] { border-color: var(--accent); background: #E6F3F6; box-shadow: inset 0 0 0 1px var(--accent); }
.day[aria-checked="true"] small { color: var(--accent); }
.btn-tour { background: var(--tour, var(--accent)); color: #fff; border-color: var(--tour, var(--accent)); font-weight: 700; padding: 12px; }
.btn-tour:hover { filter: brightness(.92); }
.btn-outline { background: #fff; color: var(--brand); border: 1px solid var(--brand); font-weight: 700; padding: 11px; }
.btn-block { width: 100%; display: block; text-align: center; }
#ask-form { display: grid; gap: 8px; }
#ask-form textarea { min-height: 110px; }
@media (max-width: 760px) {
  .gallery2 { grid-template-columns: 1fr; height: 62vw; border-radius: var(--radius-sm); }
  .g-side { display: none; }
  .g-count { bottom: 12px; }
  .l-head2 { flex-direction: column; gap: 6px; }
  .l-price { text-align: left; order: -1; }
  .l-price b { font-size: 26px; }
  .l-head2 h1 { font-size: 22px; }
  .fact-bubbles > div { min-width: 0; flex: 1 1 calc(33% - 8px); padding: 6px 8px; }
  .fb-top b { font-size: 16px; }
  .l-topbar .btn { padding: 6px 10px; font-size: 13px; }
}
@media print {
  .site-header, .l-topbar, .g-arrow, .g-tour, .g-all, .tour-card, .tour-bar, #similar, .site-footer { display: none !important; }
  .gallery2 { height: 320px; }
}
.link-btn { background: none; border: 0; padding: 0; color: var(--accent); font: inherit; font-weight: 600; text-decoration: underline; cursor: pointer; }
#remarks.clamp { display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden; }
.l-actions .heart { position: static; width: auto; height: auto; border-radius: 999px; border: 1px solid var(--line); background: #fff; font-size: 15px; color: var(--brand); }
.l-actions .heart[aria-pressed="true"] { background: var(--st-sold); color: #fff; }
/* AI Smart Search box: wider, labeled, with a one-line hint */
.q-wrap.smart { flex: 1 1 520px; max-width: 760px; }
.q-wrap.smart input { padding-left: 158px; min-height: 46px; border: 2px solid var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 12%, transparent); }
.smart-badge { position: absolute; left: 7px; top: 7px; height: 32px; display: inline-flex; align-items: center; gap: 5px; padding: 0 11px; border-radius: 999px; background: var(--accent); color: #fff; font-size: 13px; font-weight: 700; pointer-events: none; white-space: nowrap; }
.q-help { margin: 5px 4px 0 16px; font-size: 12.5px; color: var(--muted); }
@media (max-width: 700px) {
  .q-wrap.smart { flex-basis: 100%; max-width: none; }
  .q-wrap.smart input { padding-left: 16px; padding-top: 30px; min-height: 64px; border-radius: 18px; }
  .smart-badge { top: 7px; left: 9px; height: 24px; font-size: 12px; }
}
.map-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 0 0 10px; }
.map-bar .seg { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; background: #fff; }
.map-bar .seg button { border: 0; background: none; padding: 7px 14px; font: inherit; font-weight: 600; cursor: pointer; color: var(--brand); }
.map-bar .seg button[aria-pressed="true"] { background: var(--brand); color: #fff; }
.map-bar .map-hood { margin-left: auto; }
/* ===== Listing page sections ported from the PVH listing page (NWRS colors) ===== */
.map-bar .seg button { white-space: nowrap; }
.map-frame { position: relative; height: 380px; border-radius: 14px; overflow: hidden; border: 1px solid var(--line); background: #e8edf2; }
.map-frame #l-map { position: absolute; inset: 0; height: 100%; }
.map-frame .map-ifr { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.map-cap { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; color: var(--muted); margin: 6px 2px 0; }
.walk-box { margin-top: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; }
.ws-t { display: block; font-size: 15px; margin-bottom: 8px; }
.ws-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; }
.ws { display: flex; flex-direction: column; }
.ws b { font-size: 28px; color: var(--brand); line-height: 1; }
.ws span { font-weight: 700; font-size: 13px; }
.ws em { font-style: normal; font-size: 12.5px; color: var(--muted); }
.ws-foot { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; margin-top: 10px; font-size: 12.5px; color: var(--muted); }
.ws-foot img { vertical-align: middle; }
.travel { margin-top: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; }
.travel > b { display: block; margin-bottom: 8px; }
.travel-form { display: flex; gap: 8px; flex-wrap: wrap; }
.travel-form input { flex: 1 1 220px; border: 1px solid var(--line); border-radius: 10px; padding: 9px 12px; }
.travel-form select { border: 1px solid var(--line); border-radius: 10px; padding: 9px 10px; }
.travel-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.travel-chips .chip { font-size: 13px; padding: 6px 12px; }
.schools { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
.school { display: flex; flex-direction: column; gap: 3px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); text-decoration: none; color: var(--text); }
.school span { font-size: 11.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.school b { font-size: 17px; color: var(--brand); }
.school em { font-style: normal; font-size: 13px; color: var(--accent); font-weight: 600; }
.school:hover { border-color: var(--accent); }
.flood { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); margin-bottom: 12px; }
.flood b { font-size: 20px; } .flood b.good { color: #1f5a2a; } .flood b.bad { color: #c1262c; }
.flood span { font-size: 14px; color: var(--muted); }
.rows { display: grid; grid-template-columns: 1fr 1fr; gap: 0 24px; }
.rows .r, .row-kv { display: flex; justify-content: space-between; align-items: center; padding: 7px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.rows .r b, .row-kv b { font-weight: 600; display: inline-flex; align-items: center; gap: 6px; }
.rows .dot { display: inline-block; width: 9px; height: 9px; padding: 0; border-radius: 50%; clip-path: none; }
.pt { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.tl { border-left: 2px solid var(--line); margin-left: 6px; padding-left: 16px; display: grid; gap: 12px; }
.tli { position: relative; }
.tli::before { content: ""; position: absolute; left: -23px; top: 4px; width: 12px; height: 12px; border-radius: 50%; background: var(--brand); border: 2px solid #fff; box-shadow: 0 0 0 1px var(--line); }
.tli.cur::before { background: var(--accent); }
.tli b { font-size: 16px; } .tli div { font-size: 13px; color: var(--muted); } .tli.dim { opacity: .85; }
.cut { margin-left: 8px; font-size: 12px; font-weight: 700; color: #1A7F37; background: #e6f4ea; padding: 2px 8px; border-radius: 999px; }
.tax { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; margin-bottom: 8px; }
.tax b { display: block; font-size: 20px; } .tax span { font-size: 13px; color: var(--muted); }
.pq { display: flex; align-items: center; gap: 14px; margin-top: 18px; padding: 16px 18px; border-radius: 16px; background: linear-gradient(120deg, var(--brand), color-mix(in srgb, var(--brand) 70%, var(--accent))); color: #fff; border-bottom: 3px solid var(--accent); }
.pq-ic { width: 42px; height: 42px; border-radius: 50%; background: #fff; display: grid; place-items: center; font-size: 20px; flex: none; }
.pq-tx { flex: 1; display: flex; flex-direction: column; } .pq-tx b { font-size: 18px; }
.pq-k { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; opacity: .8; font-weight: 700; } .pq-tx > span:last-child { font-size: 13px; opacity: .9; }
.pq .btn-tour { white-space: nowrap; }
.pay { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 20px; }
.paybox { display: grid; grid-template-columns: 1.05fr 1fr 1fr; gap: 20px; align-items: center; }
.pay-in { display: grid; gap: 10px; }
.pf { display: flex; flex-direction: column; gap: 4px; } .pf > span { font-size: 13px; font-weight: 700; }
.pf input, .pf select, .pair input { border: 1px solid var(--line); border-radius: 10px; padding: 9px 12px; background: #fff; font: inherit; width: 100%; min-width: 0; }
.pf[hidden] { display: none; }
.pair { display: grid; grid-template-columns: 1.4fr 1fr; gap: 6px; }
.pay-donut { position: relative; background: #fff; border-radius: 16px; padding: 14px; border: 1px solid var(--line); }
.pay-donut svg { width: 100%; height: auto; display: block; }
.pay-donut .tot { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.pay-donut .tot b { font-size: 30px; color: var(--brand); } .pay-donut .tot span { font-size: 13px; color: var(--muted); }
.pay-legend { display: grid; gap: 8px; }
.pay-lc { display: flex; gap: 10px; align-items: center; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 8px 12px; }
.pay-lc[hidden] { display: none; }
.pay-lc i { width: 12px; height: 12px; border-radius: 50%; flex: none; }
.pay-lc span { display: block; font-size: 12.5px; color: var(--muted); } .pay-lc b { font-size: 16px; color: var(--brand); }
.feenote { font-weight: 600; font-size: 13.5px; margin: 14px 0 6px; }
.cmp { margin: 14px 0; border: 1px solid var(--line); border-radius: 14px; background: #fff; padding: 14px; }
.cmp-h { display: flex; gap: 10px; align-items: center; margin-bottom: 10px; } .cmp-h span { display: block; font-size: 13px; color: var(--muted); }
.cmp-g { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.cmp-c { text-align: left; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); padding: 12px; cursor: pointer; font: inherit; display: flex; flex-direction: column; gap: 2px; }
.cmp-c.on { border-color: var(--accent); box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 25%, transparent); }
.cmp-c .tag { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--accent); }
.cmp-c b { font-size: 22px; color: var(--brand); } .cmp-c .per, .cmp-d { font-size: 12.5px; color: var(--muted); }
.cmp-line { font-weight: 600; font-size: 13.5px; margin: 10px 0 0; }
@media (max-width: 900px) { .paybox { grid-template-columns: 1fr; } .pay-donut { max-width: 260px; margin: 0 auto; } }
@media (max-width: 640px) { .pt, .rows, .cmp-g { grid-template-columns: 1fr; } .pq { flex-wrap: wrap; } .map-frame { height: 300px; } .map-bar .map-hood { margin-left: 0; } }
/* Sign-up box, PVH wording: banner, free perks, green "go" highlight on the field you're in */
#signup { --go: #1A7F37; }
#signup .su-head { margin: -4px -4px 14px; padding: 16px 18px 14px; border-radius: 14px; background: linear-gradient(120deg, var(--brand), color-mix(in srgb, var(--brand) 70%, var(--accent))); color: #fff; }
#signup .su-kick { margin: 0 0 4px; font-size: 11.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; opacity: .85; }
#signup .su-head h2 { color: #fff; margin: 0 0 6px; font-size: 24px; }
#signup .su-head .modal-lead { color: #fff; opacity: .92; margin: 0; }
/* Plain checklist (no icon tiles): a check, the point in bold, one short line */
.su-perks { list-style: none; padding: 0; margin: 0 0 14px; display: grid; gap: 5px; }
.su-perks li { position: relative; padding-left: 24px; font-size: 13.5px; line-height: 1.4; color: var(--muted); }
.su-perks li::before { content: "\2713"; position: absolute; left: 2px; top: 0; font-weight: 800; color: var(--go, #1A7F37); }
.su-perks b { color: var(--text); }
#signup input:not([type="checkbox"]):focus, #signup input:not([type="checkbox"]):focus-visible { outline: none; border-color: var(--go); box-shadow: 0 0 0 3px color-mix(in srgb, var(--go) 22%, transparent); }
#signup input[type="checkbox"]:focus-visible { outline: 3px solid var(--go); }
#signup input:not([type="checkbox"]):not(:placeholder-shown):valid:not(:focus) { border-color: color-mix(in srgb, var(--go) 55%, var(--line)); }
#signup .su-submit { font-size: 16px; padding-top: 12px; padding-bottom: 12px; }
.su-trust { text-align: center; color: var(--go, #1A7F37); font-weight: 600; }
.su-fast { margin: 0 0 6px; font-size: 13px; font-weight: 700; color: var(--brand); text-align: center; }
#signup .modal-close { color: #fff; position: relative; z-index: 2; top: 18px; right: 10px; }
/* Saved-search confirmation: frosted glass card, top middle of the map, fades away after 6 seconds */
.map-toast { position: absolute; top: 62px; left: 50%; transform: translate(-50%, -8px); z-index: 1100; opacity: 0; transition: opacity .3s, transform .3s;
  display: flex; align-items: center; gap: 10px; max-width: min(460px, calc(100% - 24px)); padding: 10px 12px 10px 10px; border-radius: 16px;
  background: rgba(255,255,255,.72); -webkit-backdrop-filter: blur(14px) saturate(160%); backdrop-filter: blur(14px) saturate(160%);
  border: 1px solid rgba(255,255,255,.7); box-shadow: 0 10px 30px rgba(14,42,71,.18); color: var(--brand); }
.map-toast.in { opacity: 1; transform: translate(-50%, 0); }
.mt-ic { flex: none; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: #1A7F37; color: #fff; font-weight: 900; }
.mt-tx { display: flex; flex-direction: column; line-height: 1.3; }
.mt-tx b { font-size: 15px; font-weight: 800; letter-spacing: -.01em; }
.mt-tx small { font-size: 12.5px; color: #3b4b5e; }
.mt-x { flex: none; border: 0; background: none; font-size: 20px; color: #5a6576; cursor: pointer; padding: 0 2px; }
@media (max-width: 640px) { .map-toast { top: 60px; } }
/* Saved homes: status ribbon on the photo, filter chips, one-tap remove with Undo */
.fav-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.fav-filter .chip .n { opacity: .7; font-weight: 600; margin-left: 2px; }
.fav-card { position: relative; transition: opacity .25s, transform .25s; }
.fav-card.gone { opacity: 0; transform: scale(.96); }
.fav-ribbon { position: absolute; left: 8px; right: 8px; bottom: 8px; padding: 6px 10px; border-radius: 10px; font-size: 13px; font-weight: 800; letter-spacing: -.01em;
  background: rgba(255,255,255,.82); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); color: var(--brand); box-shadow: 0 4px 14px rgba(0,0,0,.15); }
.fav-ribbon.k-sold { background: rgba(193,38,44,.9); color: #fff; }
.fav-ribbon.k-pending { background: rgba(255,248,225,.9); color: #7a5300; }
.fav-ribbon.k-bumpable { background: rgba(232,240,255,.92); color: #1d4ed8; }
.fav-ribbon.k-cut { background: rgba(230,244,234,.92); color: #1A7F37; }
.fav-remove { position: absolute; top: 8px; right: 8px; z-index: 2; border: 0; border-radius: 999px; padding: 5px 10px; font: inherit; font-size: 12.5px; font-weight: 700;
  background: rgba(255,255,255,.88); color: var(--brand); cursor: pointer; box-shadow: 0 2px 8px rgba(0,0,0,.15); }
.fav-remove:hover { background: #fff; color: #c1262c; }
.fav-toast { position: fixed; top: auto; bottom: 20px; }
/* Agent two-step sign in */
.mfa .kicker { margin-bottom: 2px; }
.mfa-steps { padding-left: 20px; margin: 8px 0 12px; }
.mfa-qr { width: 210px; height: 210px; margin: 6px 0 10px; padding: 8px; background: #fff; border: 1px solid var(--line); border-radius: 12px; }
.mfa-qr svg { width: 100%; height: 100%; display: block; }
.mfa-key { font-size: 15px; letter-spacing: .08em; }
.mfa-form input[name="code"] { font-size: 24px; letter-spacing: .3em; text-align: center; max-width: 240px; display: block; margin-top: 4px; }
.backup-codes { columns: 2; font-size: 16px; }
.backup-codes code { letter-spacing: .05em; }
/* Agent lead page: contact buttons, email history */
.contact-bar { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 4px; }
.agent-card.wide { grid-column: 1 / -1; }
.email-table td { vertical-align: top; }
.email-homes { list-style: none; padding: 0; margin: 4px 0 0; font-size: 13px; display: grid; gap: 3px; }
.why { display: inline-block; font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 999px; margin-right: 4px; }
.why-match { background: #e6f4ea; color: #1A7F37; } .why-suggested { background: #FFF3D6; color: #7a5300; } .why-saved { background: #E8F0FF; color: #1d4ed8; }
.bad { color: #c1262c; font-weight: 700; }
.email-frame { width: 100%; height: 75vh; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
/* Agent welcome card */
.welcome-card { display: grid; grid-template-columns: 1.3fr 1fr; gap: 18px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 18px 20px; margin: 4px 0 22px; }
.wc-me { display: flex; gap: 16px; align-items: center; }
.wc-me img { width: 84px; height: 84px; border-radius: 50%; object-fit: cover; border: 3px solid var(--accent); }
.wc-name { margin: 0; font-size: 28px; }
.wc-title { margin: 2px 0; font-weight: 700; color: var(--accent); font-size: 14px; }
.wc-contact { margin: 0 0 2px; font-size: 14px; }
.wc-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.wc-stats a { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 10px 6px; border-radius: 12px; background: #fff; border: 1px solid var(--line); text-decoration: none; color: var(--brand); }
.wc-stats b { font-size: 24px; } .wc-stats span { font-size: 12px; color: var(--muted); }
.wc-note { grid-column: 1 / -1; margin: 0; }
@media (max-width: 760px) { .welcome-card { grid-template-columns: 1fr; } .wc-stats { grid-template-columns: repeat(2, 1fr); } }
.green-row { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; padding: 8px 0; border-bottom: 1px solid var(--line); }
/* Owner Setup page */
.setup-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.setup-list li { padding: 8px 12px; border-radius: 10px; background: #fff; border: 1px solid var(--line); }
.setup-list li.ok::before { content: "\2713  "; color: #1A7F37; font-weight: 800; }
.setup-list li.warn::before { content: "!  "; color: #b45309; font-weight: 800; }
.setup-key { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; align-items: end; padding: 8px 0; border-bottom: 1px solid var(--line); }
.setup-key label { display: flex; flex-direction: column; gap: 4px; font-weight: 700; }
.setup-key input { font: inherit; padding: 9px 12px; border: 1px solid var(--line); border-radius: 10px; }
.setup-key .fine { grid-column: 1; }
.setup-report p { margin: 4px 0; padding: 6px 10px; border-radius: 8px; background: #fff; border: 1px solid var(--line); }
.setup-report .ok { border-color: #b7e0c2; } .setup-report .warn { border-color: #f0d58a; } .setup-report .bad { border-color: #f1b5b5; color: #8a1c1c; }
pre.cron { white-space: pre-wrap; font-size: 12.5px; background: #0E2A47; color: #e8eef5; padding: 12px; border-radius: 10px; overflow-x: auto; }
pre.cron .fine { color: #9fb3c8; }
/* RMLS rule: courtesy line no smaller than the listing text, in a readily visible color; logo clearly visible */
.courtesy { font-size: 13px; color: #3B4B5E; flex-wrap: wrap; gap: 2px 6px; }
.card .courtesy { display: block; }
.card .courtesy .rmls-mark { display: block; margin-bottom: 3px; }
.courtesy-strip { font-size: 14px; color: #3B4B5E; }
.ss-name { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; } .ss-rename { font-size: 13px; } .ss-input { font: inherit; font-weight: 700; padding: 4px 8px; border: 2px solid #1A7F37; border-radius: 8px; min-width: 260px; }
/* Lead list: star, hot score */
.star { border: 0; background: none; font-size: 20px; line-height: 1; cursor: pointer; color: #b8c1cc; padding: 2px; }
.star.on { color: #E8A317; }
.pill-hot { background: #fde8e4; color: #b42318; font-weight: 800; }
.pill-warm { background: #fff3d6; color: #7a5300; }
.agent-tabs { flex-wrap: wrap; }
.lead-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.lead-top h1 { margin: 0; }
.lead-meta { display: flex; flex-wrap: wrap; gap: 8px 18px; align-items: center; margin: 6px 0 10px; font-size: 14px; }
.hot-why { margin: 2px 0 0; }
.contact-log { display: grid; gap: 8px; }
.contact-log input[name="note"] { font: inherit; padding: 8px 12px; border: 1px solid var(--line); border-radius: 10px; }
.seg-pick { display: flex; flex-wrap: wrap; gap: 6px; }
.seg-pick label { cursor: pointer; }
.seg-pick input { position: absolute; opacity: 0; }
.seg-pick span { display: inline-block; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); background: #fff; font-size: 13px; font-weight: 600; }
.seg-pick input:checked + span { background: var(--brand); color: #fff; border-color: var(--brand); }
.seg-pick input:focus-visible + span { outline: 3px solid #1A7F37; }
.contact-list { list-style: none; padding: 0; margin: 10px 0 0; display: grid; gap: 8px; font-size: 14px; }
.contact-list li { padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.fav-note { padding: 0 14px 12px; font-size: 14px; }
.fav-note .note-text { margin: 0 0 4px; font-style: italic; color: #3B4B5E; }
.fav-note textarea { width: 100%; font: inherit; padding: 8px 10px; border: 2px solid #1A7F37; border-radius: 10px; margin-bottom: 6px; }
.my-notes { list-style: none; padding: 0; display: grid; gap: 12px; }
.my-notes li { display: flex; gap: 12px; align-items: flex-start; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 10px; }
.my-notes img { border-radius: 8px; object-fit: cover; }
.my-notes p { margin: 4px 0 0; font-style: italic; }
.my-note-box { margin: 14px 0; padding: 12px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; } .my-note-box textarea { width: 100%; font: inherit; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; margin: 6px 0; } .my-note-box textarea:focus { outline: none; border-color: #1A7F37; box-shadow: 0 0 0 3px rgba(26,127,55,.2); }
.lead-team { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 10px 0 6px; } .lead-team .tm { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; } .lead-team img { border-radius: 50%; object-fit: cover; }

/* ---------- Search by feature (PVH layout, NWRS colors) ---------- */
.feature-jump { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0 18px; }
.feature-group { margin: 26px 0 8px; }
.feature-group h2 { font-size: 1.35rem; margin: 0 0 12px; padding-bottom: 6px; border-bottom: 3px solid var(--accent); display: inline-block; }
.feature-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; }
.feature-card { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; color: inherit; text-decoration: none; box-shadow: 0 1px 3px rgba(16,32,58,.06); transition: transform .15s, box-shadow .15s; }
.feature-card:hover, .feature-card:focus-visible { transform: translateY(-2px); box-shadow: 0 8px 22px rgba(16,32,58,.14); }
.fc-img { position: relative; display: block; aspect-ratio: 3 / 2; background: #e9eef3; }
.fc-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.fc-count { position: absolute; left: 10px; bottom: 10px; background: rgba(16,32,58,.82); color: #fff; font-weight: 700; font-size: .85rem; padding: 4px 10px; border-radius: 999px; backdrop-filter: blur(3px); }
.fc-body { display: flex; flex-direction: column; gap: 3px; padding: 12px 14px 14px; }
.fc-body b { font-size: 1.05rem; color: var(--brand); }
.fc-body small { color: var(--muted); font-size: .9rem; }
.fc-go { margin-top: 6px; color: var(--accent); font-weight: 700; font-size: .9rem; }
.feature-hero { display: grid; grid-template-columns: minmax(180px, 300px) 1fr; gap: 18px; align-items: center; margin: 8px 0 14px; }
.feature-hero img { width: 100%; height: auto; border-radius: 12px; display: block; }
@media (max-width: 640px) { .feature-hero { grid-template-columns: 1fr; } }

/* ---------- Photo viewer: one at a time or scroll all ---------- */
.photo-viewer { width: min(1100px, 96vw); }
.pv-bar { display: inline-flex; gap: 4px; padding: 3px; margin: 0 0 10px; background: var(--line); border-radius: 999px; }
.pv-mode { border: 0; background: none; padding: 6px 14px; border-radius: 999px; font: inherit; font-weight: 600; font-size: 14px; color: var(--muted); cursor: pointer; }
.pv-mode[aria-pressed="true"] { background: var(--surface); color: var(--brand); box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.pv-img { width: 100%; max-height: 72vh; object-fit: contain; display: block; }
.pv-nav { display: flex; justify-content: space-between; align-items: center; margin: 8px 0 0; }
.pv-hint { text-align: center; margin: 6px 0 0; }
.pv-all { max-height: 80vh; overflow-y: auto; scroll-behavior: smooth; outline: none; padding-right: 4px; }
.pv-fig { margin: 0 0 14px; }
.pv-fig img { width: 100%; height: auto; display: block; border-radius: 6px; cursor: zoom-in; background: var(--line); min-height: 200px; }
.pv-fig figcaption { font-size: 13px; color: var(--muted); text-align: right; margin-top: 4px; }
@media (max-width: 640px) { .pv-all { max-height: 82vh; } .pv-mode { padding: 6px 10px; font-size: 13px; } }

/* ---------- Property Details tabs (PVH layout) ---------- */
.pd-tabs { display: flex; flex-wrap: wrap; gap: 6px; border-bottom: 2px solid var(--line); margin: 6px 0 14px; }
.pd-tab { border: 0; background: none; font: inherit; font-weight: 600; font-size: 15px; color: var(--muted); padding: 10px 14px; margin-bottom: -2px; border-bottom: 3px solid transparent; cursor: pointer; }
.pd-tab[aria-selected="true"] { color: var(--brand); border-bottom-color: var(--accent); }
.pd-tab:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.pd-sub { font-size: 15px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin: 14px 0 8px; }
.pd-panel > .pd-sub:first-child { margin-top: 0; }
.pd-facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 0 24px; margin: 0; }
.pd-facts > div { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.pd-facts dt { color: var(--muted); font-size: 14px; }
.pd-facts dd { margin: 0; font-weight: 600; font-size: 14px; text-align: right; }
.pd-rooms { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.pd-rrow { display: grid; grid-template-columns: 1.2fr .7fr .8fr 2fr; gap: 10px; padding: 9px 12px; border-top: 1px solid var(--line); font-size: 14px; }
.pd-rrow:first-child { border-top: 0; }
.pd-rhead { background: var(--bg, #f4f5f7); font-weight: 700; font-size: 12.5px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.pd-rf { color: var(--muted); }
.pd-few .pd-x { display: none; }
.pd-more { display: block; padding: 10px 12px; border-top: 1px solid var(--line); width: 100%; text-align: left; }
@media (max-width: 640px) {
  .pd-rrow { grid-template-columns: 1fr 1fr; }
  .pd-rhead span:nth-child(n+3) { display: none; }
  .pd-rrow .pd-rf { grid-column: 1 / -1; }
  .pd-tab { padding: 8px 10px; font-size: 14px; }
}

/* Map pin card: Save heart button beside View home */
.pop-card .row .heart { position: static; width: auto; height: auto; border-radius: 6px; border: 1px solid var(--line); background: #fff; font-size: 13px; color: var(--st-sold); }
.pop-card .row .heart[aria-pressed="true"] { background: var(--st-sold); color: #fff; border-color: var(--st-sold); }

/* Text message consent (same approved wording as the PVH forms) */
.sms-consent { display: flex; gap: 10px; align-items: flex-start; background: #f4f7fb; border: 1px solid #dbe3ee; border-radius: 10px; padding: 10px 12px; margin: 4px 0; font-size: 13px; line-height: 1.45; font-weight: 400; cursor: pointer; }
.sms-consent input { width: 18px; height: 18px; flex: 0 0 18px; margin: 2px 0 0; cursor: pointer; }
.sms-consent small { display: block; margin-top: 4px; font-size: 11.5px; color: var(--muted); }
.sms-consent a { color: inherit; text-decoration: underline; }
.su-names { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.su-names label { min-width: 0; }
.su-why { margin: -4px 0 8px; font-size: 12px; color: var(--muted); }
.modal form label.su-consent { display: flex; gap: 10px; margin-top: 10px; font-size: 12.5px; font-weight: 400; }
.su-consent b { font-weight: 600; }
@media (max-width: 360px) { .su-names { grid-template-columns: 1fr; } }

/* Voice search button inside the AI Smart Search box */
.q-wrap.smart.has-mic input { padding-right: 50px; }
.q-mic { position: absolute; right: 7px; top: 7px; width: 32px; height: 32px; border-radius: 50%; border: 0; display: grid; place-items: center;
  background: color-mix(in srgb, var(--accent) 14%, var(--surface)); color: var(--accent); cursor: pointer; }
.q-mic:hover { background: var(--accent); color: #fff; }
.q-mic.is-listening { background: #c1262c; color: #fff; animation: mic-pulse 1.2s ease-out infinite; }
@keyframes mic-pulse { 0% { box-shadow: 0 0 0 0 rgba(193,38,44,.5); } 100% { box-shadow: 0 0 0 10px rgba(193,38,44,0); } }
@media (prefers-reduced-motion: reduce) { .q-mic.is-listening { animation: none; } }
@media (max-width: 760px) { .q-mic { top: 16px; } }

/* Privacy policy page */
.legal .legal-promise { background: color-mix(in srgb, var(--accent) 8%, var(--surface)); border-left: 4px solid var(--accent); padding: 12px 16px; border-radius: 8px; }
.legal .legal-toc { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px 18px; margin: 16px 0; }
.legal .legal-toc ol { margin: 6px 0 0; padding-left: 20px; columns: 2; column-gap: 28px; }
.legal .legal-table { width: 100%; border-collapse: collapse; margin: 10px 0 14px; font-size: 14px; }
.legal .legal-table th, .legal .legal-table td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.legal h2 { scroll-margin-top: calc(var(--header-h) + 12px); }
@media (max-width: 640px) { .legal .legal-toc ol { columns: 1; } .legal .legal-table { font-size: 13px; } }

/* Around This Home */
.around .preview-tag { display: inline-block; background: #fff4d6; color: #7a5300; border-radius: 999px; padding: 3px 10px; font-size: 12px; font-weight: 700; margin: 0 0 8px; }
.ar-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 12px; }
.ar-chips .chip b { font-weight: 700; opacity: .7; }
.ar-chips .chip[aria-pressed="true"] { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); }
.ar-wrap { display: grid; grid-template-columns: 1.4fr 1fr; gap: 14px; }
.ar-map { height: 360px; border-radius: 12px; border: 1px solid var(--line); }
.ar-list { list-style: none; margin: 0; padding: 0; max-height: 360px; overflow: auto; border: 1px solid var(--line); border-radius: 12px; }
.ar-list li { display: grid; grid-template-columns: 26px 1fr auto; gap: 8px; align-items: center; padding: 8px 10px; border-bottom: 1px solid var(--line); font-size: 14px; }
.ar-list li:last-child { border-bottom: 0; }
.ar-list small { display: block; color: var(--muted); font-size: 12px; }
.ar-i, .ar-pin { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--accent); color: #fff; font: 700 11px/1 var(--font); }
.ar-pin { transform: translate(-50%, -50%); border: 2px solid #fff; box-shadow: 0 1px 3px rgba(0,0,0,.35); }
.ar-home { transform: translate(-50%, -50%); width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; background: var(--brand); color: #fff; font-size: 18px; border: 2px solid #fff; box-shadow: 0 1px 4px rgba(0,0,0,.4); }
.ar-d { text-align: right; font-weight: 600; white-space: nowrap; }
.ar-nums { margin-top: 16px; }
.ar-nums h3 { margin: 0 0 8px; font-size: 17px; }
.ar-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.ar-num { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; }
.ar-num b { display: block; font-size: 18px; }
.ar-num span { font-size: 12px; color: var(--muted); }
.ar-src { margin-top: 10px; }
@media (max-width: 760px) { .ar-wrap { grid-template-columns: 1fr; } .ar-map { height: 280px; } }
.ar-ctl { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.ar-ctl button { border: 0; border-radius: 999px; padding: 8px 14px; font: 700 13px/1 var(--font); cursor: pointer; box-shadow: 0 2px 6px rgba(0,0,0,.3); }
.ar-ctl .ar-view { background: var(--accent); color: #fff; }
.ar-ctl .ar-back { background: var(--surface); color: var(--ink, #1b2433); }
.ar-dot { transform: translate(-50%, -50%); width: 10px; height: 10px; border-radius: 50%; background: var(--accent); border: 2px solid #fff; box-shadow: 0 1px 2px rgba(0,0,0,.4); }
.ar-list .ar-note { display: block; background: color-mix(in srgb, var(--accent) 8%, var(--surface)); font-size: 13px; font-weight: 600; }
.ar-ico { transform: translate(-50%, -50%); width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%; background: #fff; border: 2px solid var(--accent); font-size: 14px; box-shadow: 0 1px 4px rgba(0,0,0,.35); cursor: pointer; transition: transform .12s; }
.ar-ico:hover, .ar-pin:hover { transform: translate(-50%, -50%) scale(1.25); }
.ar-pin { cursor: pointer; transition: transform .12s; }
.ar-list .ar-row { cursor: pointer; }
.ar-list .ar-row:hover, .ar-list .ar-row:focus { background: color-mix(in srgb, var(--accent) 6%, var(--surface)); outline: none; }
.ar-list .ar-i { font-size: 12px; }
.ar-ctl .ar-view { display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; font-size: 14px; border: 2px solid #fff; }
.ar-ctl .ar-view svg { flex: none; }
.ar-ctl .ar-view b { font-size: 16px; line-height: 1; }
.ar-ctl .ar-view:hover { filter: brightness(1.1); transform: translateY(-1px); }
.ar-ctl .ar-view.ar-pulse { animation: ar-pulse 1.4s ease-out 2; }
@keyframes ar-pulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 60%, transparent), 0 2px 6px rgba(0,0,0,.3); } 100% { box-shadow: 0 0 0 14px transparent, 0 2px 6px rgba(0,0,0,.3); } }
@media (prefers-reduced-motion: reduce) { .ar-ctl .ar-view.ar-pulse { animation: none; } }

/* My note inside the tour card (Nov 19) */
.side-card .my-note-box.in-card { margin: 6px 0 0; padding: 12px 14px; background: color-mix(in srgb, var(--brand) 7%, #fff); border: 1px solid color-mix(in srgb, var(--brand) 22%, #fff); border-left: 4px solid var(--brand); border-radius: 12px; }
.side-card .my-note-box.in-card textarea { background: #fff; }
.side-card .my-note-box.in-card textarea { min-height: 64px; }
@media (min-width: 901px) { .side-card { max-height: calc(100vh - var(--header-h) - 32px); overflow-y: auto; overscroll-behavior: contain; } }
.texts-on { color: #1A7F37; margin: 2px 0; }

/* Footer refresh (Nov 19): RMLS disclaimers in a rounded bubble, two columns on wide screens */
.site-footer { display: grid; grid-template-columns: 1fr auto; gap: 10px 28px; align-items: start; padding: 26px max(20px, calc((100% - 1180px) / 2)) 20px; }
.site-footer .footer-links { grid-row: 1; grid-column: 2; margin: 0; text-align: right; }
.site-footer .idx-disclaimer, .site-footer .sample-note { grid-column: 1 / -1; }
.site-footer .idx-disclaimer { margin: 6px 0 0; padding: 14px 18px 10px; background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.16); border-radius: 18px; opacity: 1; }
.idx-d-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; font-weight: 700; font-size: 12.5px; letter-spacing: .02em; }
.idx-disclaimer .idx-d-head .rmls-mark { height: 26px; padding: 3px 8px; margin: 0; background: #fff; border-radius: 999px; box-sizing: content-box; }
.idx-d-body { columns: 2 340px; column-gap: 32px; }
.idx-d-body p { margin: 0 0 7px; break-inside: avoid; opacity: .88; }
.results-pane .idx-disclaimer { margin: 4px 16px 24px; padding: 12px 14px 6px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; }
.results-pane .idx-d-body { columns: 1; }
.results-pane .idx-disclaimer .idx-d-head .rmls-mark { padding: 0; }
@media (max-width: 700px) { .site-footer { grid-template-columns: 1fr; } .site-footer .footer-links { grid-row: auto; grid-column: 1; text-align: left; } }

/* Property details: "Systems and floor area" folds away (Nov 19) */
.pd-more-box { margin-top: 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.pd-more-box > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 10px; padding: 12px 14px; }
.pd-more-box > summary::-webkit-details-marker { display: none; }
.pd-more-box > summary::after { content: "Show"; margin-left: auto; font-size: 13px; font-weight: 700; color: var(--brand); }
.pd-more-box[open] > summary::after { content: "Hide"; }
.pd-more-box > summary .pd-sub { margin: 0; }
.pd-more-box .pd-count { font-size: 13px; color: var(--muted); }
.pd-more-box > dl { padding: 0 14px 10px; }

/* A little more color (Nov 19): schools, the Systems box and the travel chips use the tour-button color */
.school { border-color: color-mix(in srgb, var(--tour, var(--accent)) 25%, var(--line)); background: color-mix(in srgb, var(--tour, var(--accent)) 5%, var(--surface)); }
.school b { color: var(--tour, var(--accent)); }
.school em { align-self: flex-start; margin-top: 8px; padding: 6px 12px; border-radius: 999px; background: var(--tour, var(--accent)); color: #fff; font-weight: 700; }
.school:hover { border-color: var(--tour, var(--accent)); box-shadow: 0 6px 18px color-mix(in srgb, var(--tour, var(--accent)) 18%, transparent); }
.school:hover em { filter: brightness(.92); }
.pd-more-box { background: color-mix(in srgb, var(--tour, var(--accent)) 8%, transparent); border-color: color-mix(in srgb, var(--tour, var(--accent)) 30%, transparent); }
.pd-more-box > summary .pd-sub, .pd-more-box > summary::after { color: var(--tour, var(--accent)); }
.pd-more-box[open] > summary { border-bottom: 1px solid color-mix(in srgb, var(--tour, var(--accent)) 20%, transparent); }
.pd-more-box > dl { padding-top: 6px; }
.travel-chips .chip { background: color-mix(in srgb, var(--tour, var(--accent)) 10%, #fff); border-color: color-mix(in srgb, var(--tour, var(--accent)) 35%, #fff); color: var(--tour, var(--accent)); font-weight: 600; }
.travel-chips .chip:hover, .travel-chips .chip.is-on, .travel-chips .chip[aria-pressed="true"] { background: var(--tour, var(--accent)); border-color: var(--tour, var(--accent)); color: #fff; }
.school em { white-space: nowrap; font-size: 12.5px; padding: 6px 11px; }

/* ?smart=1: draw the eye to the AI Smart Search box */
#q.q-hint { box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 35%, transparent); transition: box-shadow .4s; }

/* CRM phase 1 (Nov 19): stages and follow-ups in the agent screen */
.stage-chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: -6px 0 14px; font-size: 13px; }
.stage-chips a { padding: 3px 10px; border-radius: 999px; border: 1px solid var(--line); text-decoration: none; color: var(--muted); background: #fff; }
.stage-chips a[aria-current] { border-color: var(--accent); color: var(--accent); font-weight: 700; }
.stage-tag { display: inline-block; margin-top: 3px; font-size: 11.5px; font-weight: 700; padding: 1px 8px; border-radius: 999px; background: #EEF1F5; color: #41474A; }
.stage-tag.st-active { background: #E3F1FB; color: #0B5A8C; }
.stage-tag.st-under_contract { background: #FFF4D6; color: #7A4B00; }
.stage-tag.st-closed { background: #E5F4E4; color: #1A7F37; }
.stage-tag.st-not_now { background: #F3F3F3; color: #888; }
.task-due.late { color: #B42318; font-weight: 700; }
.tasks-card .task-list { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 6px; }
.task-list li { display: flex; gap: 10px; align-items: flex-start; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.task-list li.today { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 6%, #fff); }
.task-list li.late { border-color: #E4A2A2; background: #FFF5F5; }
.task-list li.done { opacity: .6; }
.task-list li.done b { text-decoration: line-through; }
.task-list form { margin: 0; }
.task-check { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--accent); background: #fff; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; color: #fff; font-size: 13px; }
.task-check:hover { background: color-mix(in srgb, var(--accent) 20%, #fff); }
.task-check.on { background: var(--accent); }
.task-body { display: grid; } .task-body small { color: var(--muted); }
.task-add { display: flex; flex-wrap: wrap; gap: 8px; }
.task-add input[name=title] { flex: 1 1 240px; }
.task-add input, .task-add select { padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; font: inherit; }

/* How often: one-tap frequency toggles (account page, /email-prefs) */
.you-control { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px 20px; }
.freq { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.freq-label { font-weight: 600; font-size: 14px; }
.freq-opts { display: inline-flex; flex-wrap: wrap; border: 1px solid var(--line); border-radius: 999px; padding: 3px; gap: 2px; background: var(--bg, #fff); }
.freq-opt { border: 0; background: transparent; color: inherit; font: inherit; font-size: 14px; font-weight: 600; min-height: 40px; padding: 0 16px; border-radius: 999px; cursor: pointer; transition: background-color .15s, color .15s; }
.freq-opt:hover { background: var(--surface); }
.freq-opt.is-on { background: var(--brand); color: var(--brand-ink); }
.freq-opt.is-pause.is-on { background: #5B6576; color: #fff; }
.freq-opt:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.freq-hint { flex-basis: 100%; }
.prefs-page { max-width: 760px; margin: 0 auto; padding: 32px 16px; }
.prefs-page .notice, .you-control .notice { background: #EAF6EE; border-radius: 10px; padding: 12px 14px; }
@media (max-width: 560px) { .freq-opt { padding: 0 12px; } }
/* Required sign-up step: a quiet way back instead of the close button */
#signup .su-back { position: absolute; left: 14px; top: 12px; z-index: 2; color: #fff; font-size: 14px; text-decoration: none; opacity: .9; }
#signup .su-back:hover { text-decoration: underline; }
.pill-warn { background: #f9eeda; color: #7a4b00; }
/* The Doty Group Value Range */
.card .est-value { margin: 0 0 2px; font-size: 13px; color: var(--muted); }
.value-range { border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; margin: 14px 0; }
.value-range h2 { font-size: 17px; margin: 0 0 4px; }
.vr-tag { font-size: 12px; font-weight: 600; background: #eef3fa; color: #0b2d5b; border-radius: 999px; padding: 2px 8px; vertical-align: middle; }
.vr-nums { font-size: 20px; margin: 2px 0 10px; }
.vr-bar { position: relative; height: 10px; border-radius: 999px; background: linear-gradient(90deg, #dbe6f3, #0b2d5b 50%, #dbe6f3); margin: 18px 0 10px; }
.vr-list { position: absolute; top: -6px; width: 2px; height: 22px; background: #b31942; }
.vr-list i { position: absolute; top: -18px; left: -24px; font-size: 11px; font-style: normal; color: #b31942; white-space: nowrap; }
.vr-cant ul { margin: 6px 0 12px; padding-left: 18px; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 4px 18px; font-size: 14px; }
.vr-cant p, .vr-cta p { margin: 0 0 4px; }
.vr-cta { background: #f3f6fa; border-radius: 10px; padding: 12px 14px; margin: 10px 0; }
.vr-cta .btn { margin-top: 8px; }
/* Sign-up box: the home they are about to see */
#signup .su-context { display: flex; gap: 12px; align-items: center; border: 1px solid var(--line); border-radius: 12px; padding: 8px; margin: 0 0 12px; }
#signup .su-context[hidden] { display: none; }
#signup .su-context img { width: 84px; height: 62px; object-fit: cover; border-radius: 8px; flex: none; }
#signup .su-context b { display: block; }
#signup .su-context small { color: var(--muted); }

/* Home value page (/home-value) */
.home-value { max-width: 860px; margin: 0 auto; padding: 24px 16px 40px; }
.hv-kick { text-transform: uppercase; letter-spacing: .06em; font-size: 12px; font-weight: 700; color: var(--muted); margin: 0 0 6px; }
.hv-hero h1 { font-size: clamp(28px, 5vw, 42px); margin: 0 0 8px; }
.hv-form { position: relative; margin: 18px 0 10px; }
.hv-box { display: flex; gap: 8px; flex-wrap: wrap; }
.hv-box input { flex: 1 1 280px; min-width: 0; font-size: 17px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); }
.hv-suggest { position: absolute; z-index: 20; left: 0; right: 0; top: 52px; margin: 0; padding: 4px 0; list-style: none; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); box-shadow: var(--shadow); }
.hv-suggest li { padding: 9px 14px; cursor: pointer; }
.hv-suggest li:hover, .hv-suggest li:focus { background: #f3f6fa; }
.hv-steps { list-style: none; padding: 0; margin: 18px 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; }
.hv-steps li { display: flex; gap: 10px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 10px 12px; }
.hv-steps b { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--brand-2); color: #fff; flex: none; }
.hv-why { margin-top: 26px; }
.hv-report h1 { font-size: clamp(24px, 4vw, 34px); margin: 0 0 4px; }
.hv-facts { border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; margin: 14px 0; background: var(--surface); }
.hv-facts summary { cursor: pointer; font-weight: 700; }
.hv-facts summary .fine { font-weight: 400; margin-left: 6px; }
.hv-facts-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px 14px; margin-top: 12px; }
.hv-facts-form label { display: grid; gap: 4px; font-size: 14px; }
.hv-facts-form .wide, .hv-facts-form .form-error, .hv-facts-form button { grid-column: 1 / -1; }
.hv-facts-form button { justify-self: start; }
.hv-comps h2, .hv-rpr h2, .hv-cta h2 { font-size: 19px; margin: 22px 0 6px; }
.hv-comp-list { display: grid; gap: 10px; }
.hv-comp { display: flex; gap: 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 10px; background: var(--surface); }
.hv-comp img { width: 120px; height: 84px; object-fit: cover; border-radius: 6px; flex: none; }
.hv-comp p { margin: 0 0 2px; }
.hv-comp .courtesy { font-size: 12px; color: var(--muted); }
.hv-cta form { display: grid; gap: 10px; margin-top: 8px; }
.hv-cta form button { justify-self: start; }
@media (max-width: 520px) { .hv-comp img { width: 88px; height: 66px; } .hv-box .btn { width: 100%; } }
.hv-track{margin:28px 0;padding:22px;border:1px solid var(--line,#dce2ea);border-radius:12px;background:var(--surface,#f3f6fa)}
.hv-track h2{margin:0 0 6px}
.hv-track p{margin:0 0 14px}

/* Phones: filters fold up so the search is not overwhelming (Troy, Nov 21, 2026).
   Map search: one "Filters" bar shows how many are set and opens or closes the rest.
   Advanced search: each group opens and closes on its own; Where and Price stay open. */
.filters-toggle { display: none; }
@media (max-width: 760px) {
  .filters-toggle:not([hidden]) { display: flex; align-items: center; gap: 6px; width: 100%; min-height: 44px; padding: 8px 14px;
    border: 1px solid var(--line); border-radius: 12px; background: var(--surface, #fff); font: 700 15px/1.2 var(--font-head, inherit); color: var(--brand); cursor: pointer; }
  .ft-count { font-weight: 600; color: var(--muted); font-size: 13px; }
  .ft-arrow { margin-left: auto; width: 10px; height: 10px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); transition: transform .2s; }
  .filters-toggle[aria-expanded="true"] .ft-arrow { transform: rotate(-135deg); }
  .filters-body { display: grid; gap: 8px; }
  .filters-body.is-folded { display: none; }
  .is-folded-q .q-help { display: none; }
  .adv-form fieldset.mf legend { display: flex; align-items: center; width: 100%; min-height: 44px; cursor: pointer; }
  .adv-form fieldset.mf legend::after { content: ""; margin-left: auto; width: 9px; height: 9px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(-135deg); transition: transform .2s; }
  .adv-form fieldset.mf.is-folded legend::after { transform: rotate(45deg); }
  .adv-form fieldset.mf.is-folded > :not(legend) { display: none; }
  .adv-form fieldset.mf .mf-n { font-weight: 600; color: var(--muted); font-size: 13px; margin-left: 6px; }
  .adv-fold-all { display: flex; gap: 12px; margin: 4px 0 0; font-size: 14px; }
}

/* Review band (NWRS pages): one compact row; long reviews clamp to 4 lines with "Read full review" in a pop-up
   (centered on desktop, a bottom sheet on phones). Troy, Nov 21, 2026 */
.rv-band { margin: 24px 0; }
.rv-top { display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.rv-total { font: 800 40px/1 var(--font-head, inherit); color: var(--brand); }
.rv-stars { color: #F5B301; letter-spacing: 1px; }
.rv-badges { display: flex; flex-wrap: wrap; gap: 8px; }
.rv-badge { background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; font-size: 14px; }
.rv-track { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(250px, calc((100% - 32px) / 3)); gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 6px; }
.rv-card { scroll-snap-align: start; background: #fff; border-radius: 14px; box-shadow: var(--shadow, 0 2px 12px rgba(0,0,0,.08)); padding: 18px; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.rv-card blockquote { margin: 0; font-size: 15px; line-height: 1.55; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.rv-card figcaption { font-size: 13px; color: var(--muted); margin-top: auto; }
.rv-read { align-self: flex-start; background: none; border: 0; padding: 0; font: inherit; font-size: 14px; font-weight: 700; color: var(--accent); cursor: pointer; text-decoration: underline; }
.rv-fine { font-size: 12px; color: var(--muted); margin-top: 10px; }
.rv-more { margin: 6px 0 0; font-weight: 700; }
.rv-dlg { border: 0; border-radius: 16px; padding: 24px; width: min(560px, 92vw); max-height: 80vh; box-shadow: var(--shadow-lg, 0 12px 40px rgba(0,0,0,.25)); }
.rv-dlg::backdrop { background: rgba(11, 31, 75, .45); }
.rv-dlg p { font-size: 16px; line-height: 1.65; margin: 12px 0; }
.rv-dlg .x { position: absolute; right: 12px; top: 8px; border: 0; background: none; font-size: 28px; cursor: pointer; line-height: 1; }
.rv-dlg .nav { display: flex; justify-content: space-between; gap: 10px; margin-top: 14px; }
.rv-dlg .nav button { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 8px 16px; font: inherit; cursor: pointer; }
@media (max-width: 640px) {
  .rv-track { grid-auto-columns: 85%; }
  .rv-total { font-size: 32px; }
  .rv-dlg { margin: auto 0 0; width: 100vw; max-width: 100vw; border-radius: 18px 18px 0 0; max-height: 85vh; }
}

/* Phones, round 2 (Troy, Nov 21, 2026): one view at a time, fewer map buttons, a one-line header, and "Show homes" while filters are open */
.view-switch, .show-homes { display: none; }
@media (max-width: 760px) {
  .brand-text strong { font-size: 14px; line-height: 1.15; }
  .site-header .brand { min-width: 0; flex: 1 1 auto; }
  .main-nav { flex: none; gap: 10px; }
  .nav-menu summary { white-space: nowrap; }
  .nav-long { display: none; }
  .site-header .brand img { width: 48px; height: auto; }
  .map-controls .seg-buttons, .map-controls .btn-draw { display: none; }   /* satellite and drawing live in the Tools menu on phones */
  .view-switch:not([hidden]) { display: inline-flex; position: fixed; left: 50%; bottom: calc(16px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 900;
    background: var(--brand); border-radius: 999px; padding: 4px; box-shadow: 0 8px 24px rgba(0,0,0,.25); }
  .view-switch button { border: 0; background: none; color: #fff; font: 700 15px/1 var(--font-head, inherit); padding: 11px 22px; border-radius: 999px; cursor: pointer; min-width: 84px; }
  .view-switch button.is-on { background: #fff; color: var(--brand); }
  body.v-list .map-pane { display: none; }
  body.v-map .results-pane { display: none; }
  body.v-map .map-pane { height: calc(100dvh - var(--header-h) - 140px); min-height: 360px; }
  .show-homes:not([hidden]) { display: block; position: fixed; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); z-index: 950; border: 0; border-radius: 999px;
    background: var(--button, var(--brand)); color: #fff; font: 700 16px/1 var(--font-head, inherit); padding: 16px; box-shadow: 0 8px 24px rgba(0,0,0,.25); cursor: pointer; }
  .page-search .results-pane { padding-bottom: 80px; }
}

.nav-short { display: none; }
@media (max-width: 760px) { .nav-short { display: inline; } }

/* Footer marks on every page (Troy, Nov 21, 2026): Equal Housing Opportunity, REALTOR® and RMLS */
.footer-marks { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 12px; }
.footer-marks img { display: block; height: 56px; width: auto; }
.footer-marks .rmls-mark-f { height: 26px; background: #fff; border-radius: 3px; padding: 2px 4px; box-sizing: content-box; }
.footer-marks .eho { font-size: 12px; opacity: .9; }

/* Phones, round 3 (Troy, Nov 21, 2026): search box pinned at the top; filters slide up from the bottom like the real estate apps */
.sheet-backdrop, .sheet-head { display: none; }
@media (max-width: 760px) {
  .page-search .search-bar { position: sticky; top: var(--header-h); z-index: 800; background: var(--surface, #fff); box-shadow: 0 6px 14px rgba(0,0,0,.06); }
  .filters-body:not(.is-folded) { position: fixed; left: 0; right: 0; bottom: 0; z-index: 960; max-height: 84dvh; overflow-y: auto; overscroll-behavior: contain;
    background: var(--surface, #fff); border-radius: 20px 20px 0 0; box-shadow: 0 -10px 30px rgba(0,0,0,.25);
    padding: 8px 16px calc(96px + env(safe-area-inset-bottom)); animation: sheetUp .22s ease-out; }
  .filters-body:not(.is-folded) .sheet-head { display: flex; align-items: center; justify-content: space-between; position: sticky; top: -8px; z-index: 2; background: inherit; padding: 12px 0 10px; margin: -8px 0 4px; }
  .sheet-head::before { content: ""; position: absolute; left: 50%; top: 4px; width: 40px; height: 4px; margin-left: -20px; border-radius: 4px; background: var(--line); }
  .sheet-head b { font: 800 19px/1.2 var(--font-head, inherit); color: var(--brand); }
  .sheet-head button { border: 0; background: none; font: 700 16px/1 var(--font-head, inherit); color: var(--accent); padding: 10px 4px; cursor: pointer; }
  .filters-body:not(.is-folded) .chip-row { flex-wrap: wrap; overflow: visible; }
  .filters-body:not(.is-folded) .chip { min-height: 44px; }
  .filters-body .pop-panel { position: static !important; box-shadow: none; border: 1px solid var(--line); margin-top: 8px; max-height: none; width: 100%; }
  .filters-body .pop { flex: 1 1 100%; }
  .sheet-backdrop.on { display: block; position: fixed; inset: 0; z-index: 950; background: rgba(11, 31, 75, .45); }
  .show-homes:not([hidden]) { z-index: 970; }
  body.sheet-open { overflow: hidden; }
  body.sheet-open .search-bar { z-index: 965; }
}
@keyframes sheetUp { from { transform: translateY(40px); opacity: .4; } to { transform: none; opacity: 1; } }

/* Combine features (Troy, Nov 21): ticked features as removable chips, and the zero-results help */
.feature-picks { margin: 8px 0; }
.feature-picks summary { cursor: pointer; }
.feature-group { margin: 8px 0 2px; font-weight: 600; }
.feature-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 12px; }
.feature-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0; }
.chip-x::after { content: " \00d7"; font-weight: 700; }
.drop-feature { margin-top: 8px; }
.results .empty .btn { margin-top: 8px; }
@media (min-width: 861px) { #pop-more { left: auto; right: 0; max-height: calc(100vh - 190px); overflow: auto; } }

/* Assumable loan savings panel (listing page) */
.asm { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 20px; }
.asm .kicker { margin: 0 0 4px; }
.asm-teaser { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; border: 2px solid var(--brand, #0f6f7c); border-radius: 14px; padding: 14px 18px; }
.asm-teaser[hidden], .asm-body[hidden] { display: none; }
.asm-teaser-t { margin: 0; font-weight: 600; flex: 1 1 280px; }
.asm-body { margin-top: 6px; }
.asm-lead { color: var(--muted); margin: 0 0 14px; }
.asm-box { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 16px; }
.asm-in { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; align-content: start; }
.asm-in .pf small { font-size: 12px; color: var(--muted); }
.asm-chk { grid-column: 1 / -1; display: flex; gap: 8px; align-items: flex-start; font-size: 13.5px; }
.asm-out { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.asm-big span { display: block; font-size: 13px; color: var(--muted); font-weight: 700; }
.asm-big b { display: block; font-size: 34px; line-height: 1.1; color: var(--brand); }
.asm-big small { display: block; font-size: 13px; color: var(--muted); }
.asm-rows { display: grid; gap: 6px; }
.asm-rows > div { display: flex; justify-content: space-between; gap: 10px; font-size: 14px; border-top: 1px solid var(--line); padding-top: 6px; }
.asm-rows > div[hidden] { display: none; }
.asm-rows b { color: var(--brand); white-space: nowrap; }
.asm-cta { margin: 14px 0 0; }
.asm-facts { margin-top: 14px; border-top: 1px solid var(--line); padding-top: 10px; }
.asm-facts summary { cursor: pointer; font-weight: 700; }
.asm-facts dt { font-weight: 700; margin-top: 10px; } .asm-facts dd { margin: 2px 0 0; color: var(--muted); font-size: 14.5px; }
@media (max-width: 760px) { .asm-box { grid-template-columns: 1fr; } .asm-in { grid-template-columns: 1fr; } }
.feature-chips .school-fine { flex-basis: 100%; margin: 0; }
.adv-schools .adv-grid { align-items: start; }
.sch-pick input[type=text] { width: 100%; min-width: 0; box-sizing: border-box; }

/* BAH on every listing (veteran quick win, Nov 2026): soft blue tint under BAH, soft red tint over, plain when even */
.bah-chip { display: inline-block; margin: 2px 0 4px; padding: 2px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 600; line-height: 1.5; background: rgba(14, 42, 71, .07); color: #0E2A47; }
.bah-chip.bah-under { background: rgba(30, 90, 170, .10); color: #13427a; }
.bah-chip.bah-over { background: rgba(178, 34, 52, .09); color: #8f1b2b; }
.l-price .bah-chip { margin-top: 6px; font-size: 14px; }
.bah-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 4px 16px 6px; padding: 10px 14px; border-radius: 12px; background: rgba(30, 90, 170, .06); font-size: 14px; }
.bah-box { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 14px; margin: 14px 0 4px; padding: 12px 16px; border-radius: 12px; background: rgba(14, 42, 71, .05); }
.bah-box > div { display: flex; flex-direction: column; gap: 2px; }
.bah-box b { font-size: 17px; }
.bah-box span { font-size: 13.5px; color: var(--muted); }
.bah-box.bah-under { background: rgba(30, 90, 170, .08); }
.bah-box.bah-under b { color: #13427a; }
.bah-box.bah-over { background: rgba(178, 34, 52, .07); }
.bah-box.bah-over b { color: #8f1b2b; }
.bah-dlg { max-width: 460px; }
.bah-form { display: flex; flex-direction: column; gap: 12px; }
.bah-form h2 { margin: 0; }
.bah-deps { display: flex; gap: 18px; border: 0; padding: 0; margin: 0; }
.bah-deps legend { font-weight: 600; margin-bottom: 6px; padding: 0; }
.bah-amt { margin: 0; font-weight: 700; min-height: 1.4em; }
.bah-btns { display: flex; flex-wrap: wrap; gap: 10px; }
.pay .vt-row select { font-size: 14px; }
.pay .vt-note { margin: 4px 0 10px; padding: 10px 12px; border-radius: 10px; background: rgba(30, 90, 170, .06); font-size: 13.5px; line-height: 1.45; }

/* Assumable alerts (veteran quick win 1c, behind assumable_alerts.enabled) */
.asm-alert { margin: 12px 0 0; padding: 12px 16px; border-radius: 14px; background: rgba(30, 90, 170, .06); }
.asm-alert-t { margin: 0 0 8px; font-size: 14px; }
.asm-alert-btn.is-done { background: #e9f4ec; border-color: #2f7a46; color: #1f5a33; cursor: default; }
.asm-alert-msg { margin: 8px 0 0; font-size: 14px; }
.asm-alert-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 4px 16px 6px; padding: 10px 14px; border-radius: 12px; background: rgba(30, 90, 170, .06); font-size: 14px; }
.asm-alert-bar[hidden] { display: none; }
.asm-alert-bar p { margin: 0; flex: 1 1 240px; }
.asm-alert-bar .asm-alert-msg { flex-basis: 100%; }

/* Lead source and journey (lead profile) */
.pill-new { background: rgba(179, 38, 45, .1); color: #a3232a; }
.pill-ret { background: rgba(44, 94, 168, .12); color: #2c5ea8; }
.started-with { background: rgba(44, 94, 168, .08); border-radius: 10px; padding: 12px 14px; margin-bottom: 14px; }
.started-with b { font-size: 16px; }
.started-with small { display: block; color: #5b6579; font-size: 13px; margin-top: 4px; }
.sw-cap { display: block; font-size: 12px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: #5b6579; margin-bottom: 2px; }
.jr-head { display: flex; align-items: center; gap: 10px; }
.jr-head h2 { margin: 0; }
.jr-live { font-size: 12px; font-weight: 700; color: #2f7d4f; background: rgba(47, 125, 79, .1); padding: 2px 9px; border-radius: 20px; }
.jr-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #2f7d4f; margin-right: 5px; vertical-align: 1px; animation: jrpulse 2s infinite; }
@keyframes jrpulse { 50% { opacity: .35; } }
@media (prefers-reduced-motion: reduce) { .jr-dot { animation: none; } }
.jr-day { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #5b6579; margin: 14px 0 4px; }
.jr-ev { display: grid; grid-template-columns: 66px 1fr; gap: 10px; padding: 7px 0; border-top: 1px solid #e3e7ee; font-size: 14px; }
.jr-ev time { color: #5b6579; font-size: 13px; font-variant-numeric: tabular-nums; }
.jr-ev.is-key { font-weight: 600; }
.jr-ev.is-first { background: rgba(44, 94, 168, .08); border-radius: 8px; padding: 8px; border-top: 0; }
.jr-ev.is-before { opacity: .8; }
.jr-tag { display: inline-block; font-size: 11px; font-weight: 600; padding: 1px 7px; border-radius: 10px; border: 1px solid #e3e7ee; color: #5b6579; margin-left: 6px; }
.feature-rows { display: grid; gap: 8px; }
.feature-row { display: grid; grid-template-columns: minmax(0, 200px) 1fr 64px; gap: 10px; align-items: center; font-size: 14px; }
.feature-bar { display: flex; height: 14px; background: #f2f4f7; border-radius: 4px; overflow: hidden; }
.feature-bar span:first-child { background: #b3262d; }
.feature-bar span + span { background: #2c5ea8; }
.feature-row .n { text-align: right; color: #5b6579; font-variant-numeric: tabular-nums; }
@media (max-width: 520px) { .feature-row { grid-template-columns: minmax(0, 1fr) 56px; } .feature-row .feature-bar { grid-column: 1 / -1; order: 3; } }

/* PCS keep or sell box in the listing payment calculator (config pcs_keep_sell) */
.pcs { border: 1px solid var(--line); border-radius: 12px; background: #fff; padding: 10px 12px; }
.pcs-on { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 14px; cursor: pointer; color: var(--brand); }
.pcs-on input { width: 18px; height: 18px; }
.pcs-body { margin-top: 10px; display: grid; gap: 8px; }
.pcs-body[hidden], .pcs-sell[hidden], .pcs-keep[hidden] { display: none; }
.pcs-seg { display: flex; gap: 6px; }
.pcs-seg label { flex: 1; }
.pcs-seg input { position: absolute; opacity: 0; }
.pcs-seg span { display: block; text-align: center; border: 1px solid var(--line); border-radius: 999px; padding: 6px 8px; font-size: 13.5px; font-weight: 700; cursor: pointer; }
.pcs-seg input:checked + span { background: var(--brand); border-color: var(--brand); color: #fff; }
.pcs-seg input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.pcs .pair { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.pcs-out { margin: 6px 0 0; font-size: 13.5px; font-weight: 600; }
.pcs-src { margin: 0; font-size: 12px; color: var(--muted); }
.pcs .btn-small { margin-top: 6px; }
.pcs .pair label { display: flex; flex-direction: column; gap: 2px; }
.pcs .pair small { font-size: 12px; font-weight: 700; color: var(--muted); }
.pay-in, .pcs, .pcs .pair input { min-width: 0; }
.pcs .btn-small { white-space: normal; width: 100%; }

/* BAH line, then the PCS box, sit in the open space under the circle and payment parts (Troy, Nov 23, 2026);
   on phones they follow the payment parts in that order */
@media (min-width: 901px) {
  .paybox.has-side { align-items: start; grid-template-rows: auto auto auto 1fr; }
  .paybox.has-side > .pay-in { grid-row: 1 / span 4; }
  .paybox.has-side > .pay-donut, .paybox.has-side > .pay-legend { grid-row: 1; }
  .paybox.has-side > .bah-box { grid-column: 2 / 4; grid-row: 2; }
  .paybox.has-side > .pcs { grid-column: 2 / 4; grid-row: 3; }
  .paybox.has-side:not(.has-bah) > .pcs { grid-row: 2; }
}
.paybox > .bah-box { margin: 0; }

/* Turn on photo texts (account and email settings), Nov 23, 2026 */
.texting-optin{background:#fff;border:1px solid #DDE3EB;border-radius:12px;padding:16px 18px;margin:16px 0;max-width:720px}
.texting-optin h2,.texting-optin h3{margin:0 0 6px}
.texting-optin label{display:block;font-weight:600;margin:10px 0 4px}
.texting-optin input[type=tel]{width:100%;max-width:320px;height:44px;border:1px solid #c9d3e2;border-radius:10px;padding:0 12px;font:inherit}
.texting-optin label.check{display:flex;gap:10px;align-items:flex-start;font-weight:400;font-size:13px;line-height:1.5}
.texting-optin label.check input{margin-top:3px;width:18px;height:18px;flex:0 0 18px}

/* School boundary map (Tools > School boundaries) */
.school-layer { display: grid; gap: 4px; font-size: 14px; font-weight: 600; }
.school-layer select { border: 1px solid var(--line); border-radius: 8px; padding: 7px 8px; font: inherit; font-weight: 500; background: var(--surface); }
.school-pop { min-width: 200px; max-width: 250px; }
.school-pop b { display: block; font-size: 15px; margin-bottom: 2px; }
.school-pop .sp-sub { color: var(--muted); font-size: 13px; }
.school-pop button { display: block; width: 100%; margin: 10px 0 6px; border: 0; border-radius: 999px; padding: 9px 12px; background: var(--brand); color: #fff; font: inherit; font-weight: 700; cursor: pointer; }
.school-pop .fine { font-size: 11.5px; color: var(--muted); line-height: 1.4; margin: 0; }
.school-note { position: absolute; left: 10px; top: 64px; z-index: 500; max-width: 300px; background: var(--surface); border-radius: 8px; box-shadow: var(--shadow-lg); padding: 6px 10px; font-size: 12px; color: var(--muted); }
@media (max-width: 700px) { .school-note { top: 62px; max-width: 220px; font-size: 11px; padding: 4px 8px; } }

.footer-logo { display: block; width: max-content; margin: 0 0 10px; padding: 8px 12px; background: #fff; border-radius: 8px; line-height: 0; }
.footer-logo img { display: block; width: 112px; height: auto; }
.page-search .results-pane .site-footer.in-pane { display: block; margin: 24px 0 0; }
.page-search .results-pane .site-footer.in-pane .idx-disclaimer { display: none; }   /* the list already shows it just above */
/* Troy Doty Homes map search only (its search bar sits under the brokerage line): clear space between the
   status row and the filter row, and between each filter button. The other sites keep their own spacing. */
@media (min-width: 761px) {
  html[data-site="tdh"] .page-search .filters-body { display: grid; gap: 12px; }
  html[data-site="tdh"] .page-search .filter-chips { gap: 12px; }
}
.sold-range { align-items: center; }
.sold-range[hidden] { display: none !important; }
.sold-range-label { font-size: 14px; font-weight: 600; color: var(--muted); margin-right: 2px; }
.sold-range .chip { min-height: 34px; padding: 6px 14px; font-size: 14px; }
/* Drawn area: "See homes in this area" button under Draw area / Tools, and the big photo view it opens */
.btn-area-homes { display: block; margin-top: 8px; margin-left: auto; min-height: 40px; padding: 8px 16px; border: 0; border-radius: 999px;
  background: var(--brand); color: #fff; font-weight: 700; box-shadow: var(--shadow); cursor: pointer; }
.btn-area-homes[hidden], .btn-back-map[hidden] { display: none !important; }
.btn-back-map { display: inline-flex; align-items: center; gap: 6px; margin: 0 0 10px; padding: 8px 16px; border: 1px solid var(--line);
  border-radius: 999px; background: #fff; color: var(--brand); font-weight: 700; cursor: pointer; }
body.v-gallery .search-layout { grid-template-columns: minmax(0, 1fr); }
body.v-gallery .map-pane { display: none; }
body.v-gallery .results-pane { border-left: 0; }
body.v-gallery .results-pane .results-head, body.v-gallery #results { max-width: 1320px; margin-left: auto; margin-right: auto; }
body.v-gallery #results { grid-template-columns: repeat(auto-fill, minmax(max(260px, calc((100% - 42px) / 4)), 1fr)); padding: 8px 24px 24px; }
.tools { flex-wrap: wrap; justify-content: flex-end; }
.tools-break { flex-basis: 100%; height: 0; }
.tools .btn-area-homes { margin-top: 0; }
.cluster.cl-active { background: var(--st-active); color: #fff; }
.cluster.cl-bumpable { background: var(--st-bumpable); color: #fff; }
.cluster.cl-pending { background: var(--st-pending); color: var(--st-pending-ink); }
.cluster.cl-sold { background: var(--st-sold); color: #fff; }
.card-photo { background: linear-gradient(100deg, #eceef1 40%, #f6f7f9 50%, #eceef1 60%) 0 0 / 200% 100%; animation: photo-wait 1.2s linear infinite; }
.card-photo img { opacity: 0; transition: opacity .25s; }
.card-photo img.is-loaded { opacity: 1; }
.card-photo:has(img.is-loaded) { animation: none; background: #eceef1; }
@keyframes photo-wait { to { background-position: -200% 0; } }
.seg-buttons .hood-toggle { border-left: 1px solid var(--line); }
.tools-panel [data-draw] small { display: block; font-weight: 400; font-size: 12px; color: var(--muted); margin-top: 2px; }
#tools-btn .caret { font-size: 11px; margin-left: 2px; }
.area-actions { display: flex; gap: 6px; justify-content: flex-end; margin-top: 8px; flex-wrap: wrap; }
.area-actions[hidden] { display: none !important; }
.area-actions .btn-area-homes { margin-top: 0; }
.btn-area-mini { min-height: 40px; padding: 8px 12px; border-radius: 999px; background: var(--surface, #fff); border: 1px solid var(--line); box-shadow: var(--shadow); font-weight: 700; cursor: pointer; }
/* stacked under Draw tools so the row never covers Map / Satellite / Neighborhoods */
.area-actions { flex-direction: column; align-items: flex-end; }
.area-actions .area-mini-row { display: flex; gap: 6px; }
.leaflet-container.is-drawing .leaflet-marker-pane, .leaflet-container.is-drawing .leaflet-popup-pane { pointer-events: none; opacity: .45; }
.leaflet-container.is-drawing .leaflet-marker-pane * { pointer-events: none !important; }
/* "See homes in this area" view: 3 across with big photos, a showcase before they open a listing (Troy, Nov 24, 2026) */
body.v-gallery #results { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; padding: 10px 28px 32px; }
body.v-gallery #results .card { border-radius: 14px; overflow: hidden; box-shadow: 0 6px 22px rgba(20, 30, 45, .10); transition: transform .15s, box-shadow .15s; }
body.v-gallery #results .card:hover { transform: translateY(-3px); box-shadow: 0 12px 30px rgba(20, 30, 45, .16); }
body.v-gallery #results .card-photo { aspect-ratio: 3 / 2; }
body.v-gallery #results .card-body { padding: 14px 18px 18px; }
body.v-gallery #results .card .price { font-size: 24px; }
@media (max-width: 1000px) { body.v-gallery #results { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { body.v-gallery #results { grid-template-columns: 1fr; padding: 8px 14px 24px; } }
