/* 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 */
.dot { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; font: 700 11px/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; }
.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: 16px; height: 16px; font-size: 10px; }
.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); }
.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(260px, 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-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-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; }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; }
.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; }
.su-perks { list-style: none; padding: 0; margin: 0 0 14px; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.su-perks li { display: grid; grid-template-columns: 34px 1fr; column-gap: 8px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 8px 10px; }
.su-perks .su-ic { grid-row: span 2; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: color-mix(in srgb, var(--accent) 14%, #fff); font-size: 16px; }
.su-perks b { font-size: 13.5px; } .su-perks small { font-size: 11.5px; color: var(--muted); line-height: 1.3; }
#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; }
@media (max-width: 480px) { .su-perks { grid-template-columns: 1fr; } }
.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; }
}
