/* Kandoo Realty — site styles */
:root {
  --red: #DA2121;
  --red-dark: #B01A1A;
  --red-deep: #A81919;
  --red-soft: #FFF4F4;
  --red-line: #F6CACA;
  --ink: #0E1B26;
  --text: #33424F;
  --muted: #4A5A68;
  --line: #E3E8EC;
  --field: #C9D3DB;
  --soft: #F4F6F8;
  --photo: #DCE4EA;
  --white: #ffffff;
  --radius: 14px;
  --font: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: var(--font); color: var(--ink); background: var(--white); line-height: 1.5; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; }
a { color: var(--red); }
a:hover { color: var(--red-dark); }
h1, h2, h3 { line-height: 1.15; letter-spacing: -0.02em; margin: 0; }
p { margin: 0; }
input, select, textarea, button { font: inherit; font-size: 16px; color: var(--ink); }
:focus-visible { outline: 3px solid var(--red); outline-offset: 2px; }
.icon { flex: none; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.wide { max-width: 1440px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--white); padding: 10px 14px; z-index: 2000; }
.skip:focus { left: 8px; }

/* Buttons and fields */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 18px; border-radius: 8px; border: 1px solid transparent; font-weight: 700; font-size: 15px; text-decoration: none; cursor: pointer; white-space: nowrap; }
.btn-red { background: var(--red); color: var(--white); }
.btn-red:hover { background: var(--red-dark); color: var(--white); }
.btn-outline { background: var(--white); color: var(--ink); border-color: var(--field); }
.btn-outline:hover { border-color: var(--ink); color: var(--ink); }
.btn-outline-red { background: var(--white); color: var(--red); border-color: var(--red); }
.btn-white { background: var(--white); color: var(--red); }
.btn-white:hover { background: var(--red-soft); color: var(--red-dark); }
.field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 700; color: var(--muted); }
.field input, .field select, .field textarea, .input { font-weight: 500; min-height: 46px; padding: 0 12px; border: 1px solid var(--field); border-radius: 8px; background: var(--white); width: 100%; }
.field textarea { padding: 12px; resize: vertical; min-height: 110px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; line-height: 1.5; color: var(--muted); font-weight: 500; }
.check input { width: 20px; height: 20px; margin: 0; flex: none; accent-color: var(--red); }
.hp { position: absolute; left: -5000px; }
.notice { padding: 14px 16px; border-radius: 10px; font-weight: 600; font-size: 15px; }
.notice-ok { background: #E8F6EC; color: #145A2A; }
.notice-err { background: var(--red-soft); color: var(--red-dark); }

/* Header */
.site-header { background: var(--white); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 1100; transition: box-shadow .2s; }
.site-header.is-stuck { box-shadow: 0 4px 16px rgba(14, 27, 38, 0.10); }
html { scroll-padding-top: 96px; }
.header-menu { display: contents; }
.header-call, .menu-btn { display: none; }
.site-header .container { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; padding-top: 14px; padding-bottom: 14px; }
.logo img { width: 220px; height: auto; }
.main-nav { display: flex; flex-wrap: wrap; gap: 0 22px; font-size: 15px; font-weight: 600; }
.main-nav a { color: var(--ink); text-decoration: none; padding: 10px 0; border-bottom: 2px solid transparent; }
.main-nav a:hover, .main-nav a[aria-current="page"] { color: var(--red); border-bottom-color: var(--red); }
.header-actions { display: flex; gap: 10px; align-items: center; }
.header-phone { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; text-decoration: none; color: var(--ink); padding: 10px 0; }
.topbar { background: var(--ink); color: #fff; font-size: 14px; }
.topbar .container { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 40px; }
.topbar-note { color: #C9D3DB; }
.cur-form { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.cur-form label { color: #C9D3DB; }
.cur-form select { background: transparent; color: #fff; border: 1px solid #4A5A68; border-radius: 6px; font: inherit; font-weight: 600; padding: 4px 8px; min-height: 32px; max-width: 62vw; }
.cur-form select:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.cur-form option { color: var(--ink); background: #fff; }
.fx-note { background: var(--red-soft); border-bottom: 1px solid var(--red-line); font-size: 14px; color: var(--ink); }
.fx-note .container { padding-top: 8px; padding-bottom: 8px; }
.fx-note-fa { margin-top: 4px; text-align: right; }
.fx-note a { color: var(--red-dark); font-weight: 700; white-space: nowrap; }
.price-cad { color: var(--muted); font-size: 15px; margin: -2px 0 6px; }
@media (max-width: 600px) { .topbar-note { display: none; } }

/* Hero */
.hero { background: var(--red); color: var(--white); }
.hero .container { padding-top: 88px; padding-bottom: 96px; display: flex; flex-direction: column; gap: 24px; }
.eyebrow { font-size: 14px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; }
.hero .eyebrow { color: #FFE4E8; }
.hero h1 { font-size: min(72px, calc((100vw - 48px) / 12.5)); font-weight: 800; letter-spacing: -0.03em; line-height: 1.02; white-space: nowrap; }
.hero h1[data-fit] { display: block; max-width: 100%; }
.hero p.lead { font-size: 20px; color: #FFE4E8; max-width: 640px; }
.hero-search { background: var(--white); color: var(--ink); border-radius: var(--radius); padding: 16px; display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; align-items: end; max-width: 1040px; margin-top: 12px; }
.hero-search .btn { min-height: 46px; }

/* Sections */
.section { padding: 88px 0; }
.section-soft { background: var(--soft); }
.section-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 32px; }
.section-head h2, .section h2.title { font-size: 36px; font-weight: 800; }
.section-head p { color: var(--muted); margin-top: 8px; }
.eyebrow-red { color: var(--red); }

/* Cards */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 290px), 1fr)); gap: 24px; }
.card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; text-decoration: none; color: inherit; position: relative; transition: box-shadow .15s, border-color .15s; }
.card:hover, .card.is-active { border-color: var(--red); box-shadow: 0 8px 24px rgba(14, 27, 38, 0.10); color: inherit; }
.card-photo { aspect-ratio: 3 / 2; width: 100%; flex: none; min-height: 0; overflow: hidden; background: var(--photo); position: relative; display: flex; align-items: center; justify-content: center; color: var(--muted); }
.card-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center; }
.badge { position: absolute; top: 12px; left: 12px; background: var(--red); color: var(--white); font-size: 12px; font-weight: 700; padding: 5px 10px; border-radius: 999px; }
.card-body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 4px; }
.card-price { font-size: 22px; font-weight: 800; letter-spacing: -0.01em; }
.card-title { font-size: 15px; font-weight: 600; }
.card-city { font-size: 14px; color: var(--muted); }
.card-meta { font-size: 14px; color: var(--muted); padding-top: 10px; margin-top: 6px; border-top: 1px solid var(--line); }
.fav { position: absolute; top: 8px; right: 8px; width: 44px; height: 44px; border-radius: 999px; border: 0; background: rgba(255,255,255,0.92); color: var(--red); display: flex; align-items: center; justify-content: center; cursor: pointer; z-index: 2; }
.fav[aria-pressed="true"] svg, [data-fav][aria-pressed="true"] svg { fill: var(--red); color: var(--red); }

/* Services */
.service-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 20px; }
.service { background: var(--soft); border-radius: var(--radius); padding: 28px; display: flex; flex-direction: column; gap: 12px; }
.service .icon { color: var(--red); }
.service h3 { font-size: 20px; font-weight: 800; }
.service p { color: var(--muted); font-size: 15px; line-height: 1.6; }

/* Stats band */
.stats { background: var(--red-deep); color: var(--white); }
.stats .container { padding-top: 80px; padding-bottom: 80px; display: flex; flex-wrap: wrap; gap: 48px; align-items: center; }
.stats-copy { flex: 1 1 420px; display: flex; flex-direction: column; gap: 16px; }
.stats-copy h2 { font-size: 36px; font-weight: 800; }
.stats-copy p { color: #FFE4E8; font-size: 17px; line-height: 1.6; }
.stat-grid { flex: 1 1 460px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.stat { border: 1px solid rgba(255,255,255,0.3); border-radius: var(--radius); padding: 24px; }
.stat strong { display: block; font-size: 44px; font-weight: 800; line-height: 1.1; }
.stat span { color: #FFE4E8; font-size: 15px; }

/* CTA pair */
.cta-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: 24px; }
.cta { border-radius: 18px; padding: 40px; display: flex; flex-direction: column; gap: 14px; align-items: flex-start; }
.cta-red { background: var(--red); color: var(--white); }
.cta-red h2 { font-size: 32px; font-weight: 800; }
.cta-soft { background: var(--soft); }
.cta-soft h2 { font-size: 28px; font-weight: 800; }
.cta-soft a { font-weight: 600; padding: 6px 0; }

/* Contact */
.contact-wrap { display: flex; flex-wrap: wrap; gap: 48px; }
.contact-info { flex: 1 1 320px; display: flex; flex-direction: column; gap: 14px; }
.contact-info h2 { font-size: 36px; font-weight: 800; }
.contact-info p { color: var(--muted); font-size: 17px; }
.contact-lines { font-size: 16px; line-height: 2; }
.contact-form { flex: 2 1 480px; background: var(--white); border-radius: 16px; padding: 28px; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 16px; }
.contact-form .full { grid-column: 1 / -1; }

/* Footer */
.site-footer { background: var(--ink); color: #C9D3DB; }
.site-footer .container { padding-top: 48px; padding-bottom: 40px; display: flex; flex-direction: column; gap: 24px; }
.footer-top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 24px; }
.footer-top strong { color: var(--white); font-size: 18px; }
.footer-top a { color: #C9D3DB; }
/* Social media icons */
.soc { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 50%; border: 0; padding: 0; cursor: pointer; color: var(--white); background: var(--ink); text-decoration: none; transition: transform .15s, filter .15s; }
.soc:hover { transform: translateY(-2px); filter: brightness(1.1); }
.soc:focus-visible { outline: 3px solid var(--red); outline-offset: 2px; }
.soc-facebook { background: #1877F2; }
.soc-instagram { background: radial-gradient(circle at 30% 107%, #FDCB52 0%, #FD5949 45%, #D6249F 60%, #285AEB 90%); }
.soc-linkedin { background: #0A66C2; }
.soc-x { background: #000; }
.soc-youtube { background: #FF0000; }
.soc-tiktok { background: #000; }
.soc-whatsapp { background: #25D366; }
.soc-sms { background: #34A853; }
.soc-email { background: #4A5A68; }
.soc-link, .soc-more { background: #EAEFF2; color: var(--ink); }
.footer-follow { display: flex; flex-direction: column; gap: 10px; }
.footer-social, .topbar-social { display: flex; flex-wrap: wrap; gap: 10px; }
.footer-social .soc { width: 42px; height: 42px; }
.topbar-social { gap: 6px; margin-left: auto; margin-right: 14px; }
.topbar-social .soc { width: 28px; height: 28px; background: rgba(255,255,255,0.12); }
.topbar-social .soc:hover { background: var(--red); }
.topbar-social + .cur-form { margin-left: 0; }
@media (max-width: 700px) { .topbar-social { display: none; } }
.share-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 14px 0; }
.share-bar-label { font-weight: 700; font-size: 15px; }
.share-bar-btns { display: flex; flex-wrap: wrap; gap: 8px; }
.share-or { text-align: center; color: var(--muted); font-size: 14px; margin: 4px 0 10px; display: flex; align-items: center; gap: 10px; }
.share-or::before, .share-or::after { content: ""; flex: 1; border-top: 1px solid var(--line); }
@media print { .share-bar, .topbar-social { display: none; } }
.legal { font-size: 12px; line-height: 1.6; color: #9FB0BE; max-width: 960px; }

/* Search page */
.filters { border-bottom: 1px solid var(--line); background: var(--white); }
.filters form { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; padding-top: 14px; padding-bottom: 14px; }
.filters .q { flex: 1 1 240px; min-width: 0; max-width: 100%; display: flex; align-items: center; gap: 8px; border: 1px solid var(--field); border-radius: 8px; padding: 0 12px; min-height: 46px; color: var(--muted); }
.filters .q input { border: 0; outline: none; flex: 1; min-width: 0; min-height: 44px; }
.filters .price-box { width: 9.5em; min-height: 46px; padding: 0 12px; border: 1px solid var(--field); border-radius: 8px; background: var(--white); font: inherit; }
.filters .price-box[aria-invalid="true"] { border-color: #B01A1A; box-shadow: 0 0 0 1px #B01A1A; }
.filters select { min-height: 46px; padding: 0 10px; border: 1px solid var(--field); border-radius: 8px; background: var(--white); }
.segmented { display: flex; border: 1px solid var(--field); border-radius: 8px; overflow: hidden; }
.segmented label { position: relative; }
.segmented input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.segmented span { display: flex; align-items: center; min-height: 44px; padding: 0 16px; font-weight: 700; font-size: 15px; }
.segmented input:checked + span { background: var(--red); color: var(--white); }
.segmented input:focus-visible + span { outline: 3px solid var(--red); outline-offset: -3px; }
.search-layout { display: flex; flex-wrap: wrap; }
.results { flex: 1 1 520px; min-width: 0; padding: 20px 24px 40px; background: #F7F8F9; display: flex; flex-direction: column; gap: 16px; }
.results-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; }
.results-head h1 { font-size: 22px; font-weight: 800; }
.results-head p { font-size: 13px; color: var(--muted); margin-top: 4px; }
.results .card-grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); gap: 16px; }
.results .card-price { font-size: 20px; }
.map-pane { --draw-h: 52px; flex: 1 1 480px; min-width: 0; position: relative; min-height: 70vh; background: #EAEFF2; container-type: inline-size; }
/* The drawing tools sit in a bar above the map, so they never cover it */
.map-pane #map { position: absolute; inset: var(--draw-h) 0 0 0; }
.price-pin { background: var(--red); color: var(--white); border: 2px solid var(--white); border-radius: 999px; padding: 4px 9px; font-weight: 800; font-size: 12px; white-space: nowrap; box-shadow: 0 2px 6px rgba(0,0,0,0.3); font-family: var(--font); transform: translate(-50%, -50%); display: inline-block; cursor: pointer; }
.price-pin.is-active { background: var(--ink); z-index: 1000; }
.leaflet-div-icon.pin-wrap { background: none; border: 0; }
/* Drawing tools: a bar above the map. Overlays on the map: count (bottom centre), hints (top centre) */
.map-stats, .map-draw, .map-draw-hint { position: absolute; z-index: 800; }
.map-stats { bottom: 24px; left: 50%; transform: translateX(-50%); text-align: center; width: max-content; background: var(--white); border-radius: 10px; padding: 8px 12px; box-shadow: 0 2px 10px rgba(14,27,38,0.18); font-size: 14px; line-height: 1.35; max-width: calc(100% - 140px); }
.map-stats strong { color: var(--red); font-size: 17px; }
.map-stats span { display: block; color: var(--muted); font-size: 13px; }
.map-stats span:empty { display: none; }
.map-draw { top: 0; left: 0; right: 0; height: var(--draw-h); box-sizing: border-box; display: flex; flex-direction: row; flex-wrap: nowrap; justify-content: center; gap: 6px; align-items: center; white-space: nowrap; background: var(--white); padding: 6px 12px; border-bottom: 1px solid var(--line, #E3E8EC); overflow-x: auto; scrollbar-width: none; }
.map-draw-label { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); padding: 0 4px; }
.map-draw button, .map-draw-clear { display: flex; align-items: center; gap: 8px; min-height: 38px; padding: 0 12px; border: 1px solid var(--field, #C9D2D9); border-radius: 8px; background: var(--white); color: var(--ink); font: 600 14px/1 var(--font); cursor: pointer; text-decoration: none; }
.map-draw button:hover, .map-draw-clear:hover { border-color: var(--red); color: var(--red); }
.map-draw button[aria-pressed="true"] { background: var(--red); border-color: var(--red); color: var(--white); }
.map-draw-clear { color: var(--red); border-color: var(--red); justify-content: center; }
.map-draw-hint { left: 50%; top: calc(var(--draw-h) + 12px); transform: translateX(-50%); margin: 0; background: var(--ink); color: var(--white); border-radius: 999px; padding: 8px 16px; font-size: 14px; box-shadow: 0 2px 10px rgba(0,0,0,0.3); width: max-content; max-width: calc(100% - 120px); text-align: center; }
#map.is-drawing, #map.is-drawing .leaflet-interactive, #map.is-drawing .price-pin { cursor: crosshair; touch-action: none; }
@container (max-width: 520px) {
  .map-draw { gap: 4px; padding: 4px 6px; justify-content: flex-start; justify-content: safe center; }
  .map-draw-label { display: none; }
  .map-draw button, .map-draw-clear { min-height: 36px; padding: 0 9px; gap: 6px; font-size: 13px; }
  .map-stats { bottom: 20px; font-size: 13px; max-width: calc(100% - 110px); }
  .map-draw-hint { top: calc(var(--draw-h) + 10px); max-width: calc(100% - 24px); }
}
@container (max-width: 400px) {
  .map-draw svg { display: none; }
}
.pager { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: center; padding-top: 8px; }
.empty { background: var(--white); border-radius: var(--radius); padding: 40px; text-align: center; color: var(--muted); }
@media (max-width: 999px) {
  .map-pane { order: -1; flex-basis: 100%; min-height: 55vh; }
}
@media (min-width: 1000px) {
  .search-layout { flex-wrap: nowrap; height: calc(100vh - 160px); min-height: 560px; }
  .results { overflow-y: auto; }
  .map-pane { min-height: 0; }
}

/* Listing page */
.listing-top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; padding-top: 20px; }
.listing-top .actions { display: flex; flex-wrap: wrap; gap: 8px; }
.gallery { display: grid; grid-template-columns: minmax(0, 3fr) minmax(180px, 1fr); gap: 10px; margin-top: 16px; }
.gallery-single { grid-template-columns: minmax(0, 1fr); }
.gallery-main { aspect-ratio: 3 / 2; max-height: 640px; width: 100%; border-radius: var(--radius); background: var(--photo); overflow: hidden; position: relative; display: flex; align-items: center; justify-content: center; color: var(--muted); }
.gallery-main img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.gal-arrow { position: absolute; top: 50%; transform: translateY(-50%); z-index: 2; width: 48px; height: 48px; border-radius: 999px; border: 0; background: rgba(255,255,255,0.92); color: var(--ink); display: grid; place-items: center; cursor: pointer; box-shadow: 0 2px 10px rgba(0,0,0,0.25); transition: background .15s, transform .15s; }
.gal-arrow:hover { background: #fff; transform: translateY(-50%) scale(1.06); }
.gal-arrow:focus-visible { outline: 3px solid var(--red); outline-offset: 2px; }
.gal-prev { left: 14px; }
.gal-next { right: 14px; }
.gal-count { position: absolute; right: 14px; bottom: 14px; z-index: 2; background: rgba(14,27,38,0.72); color: #fff; font-size: 13px; font-weight: 700; padding: 4px 10px; border-radius: 999px; }
.thumbs { position: relative; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: max-content; gap: 8px; align-content: start; overflow-y: auto; min-height: 0; max-height: 640px; }
.thumbs button { display: block; width: 100%; padding: 0; border: 2px solid transparent; border-radius: 8px; overflow: hidden; background: var(--photo); cursor: pointer; }
.thumbs button[aria-current="true"] { border-color: var(--red); }
.thumbs img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
@media (min-width: 821px) {
  /* the thumbnail column is exactly as tall as the main photo */
  .gallery:not(.gallery-single) { align-items: start; }
  .gallery:not(.gallery-single) .thumbs { height: 0; min-height: 100%; }
}
@media (max-width: 820px) {
  .gallery { grid-template-columns: minmax(0, 1fr); }
  .gallery-main { border-radius: 12px; }
  .gal-arrow { width: 40px; height: 40px; }
  .thumbs { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 96px; overflow-x: auto; overflow-y: hidden; max-height: none; padding-bottom: 4px; }
}
.listing-body { display: flex; flex-wrap: wrap; gap: 32px; align-items: flex-start; padding: 28px 0 72px; }
.listing-main { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 36px; }
.listing-side { flex: 1 1 340px; }
.price-big { font-size: 40px; font-weight: 800; letter-spacing: -0.02em; }
.listing-main h1 { font-size: 22px; font-weight: 700; margin-top: 6px; }
.chips { display: flex; flex-wrap: wrap; gap: 10px; padding-top: 12px; }
.chip { padding: 10px 14px; border-radius: 10px; background: var(--soft); font-weight: 700; font-size: 15px; }
.listing-main h2 { font-size: 22px; font-weight: 800; margin-bottom: 12px; }
.remarks { font-size: 16px; line-height: 1.75; color: var(--text); white-space: pre-line; }
.facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.facts div { padding: 14px 16px; border-bottom: 1px solid var(--line); }
.facts dt { font-size: 13px; color: var(--muted); }
.facts dd { margin: 0; font-weight: 700; }
.calc { background: var(--red-soft); border: 1px solid var(--red-line); border-radius: var(--radius); padding: 24px; display: flex; flex-direction: column; gap: 16px; }
.calc-inputs { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.calc-out { display: flex; flex-wrap: wrap; gap: 28px; align-items: baseline; padding-top: 12px; border-top: 1px solid var(--red-line); }
.calc-out small { display: block; font-size: 13px; font-weight: 700; color: var(--muted); }
.calc-out strong { font-size: 20px; font-weight: 800; }
.calc-out .monthly { font-size: 36px; color: var(--red-dark); }
.calc-note { font-size: 12px; color: var(--muted); }
.mini-map { height: 300px; border-radius: var(--radius); overflow: hidden; background: #EAEFF2; }
.side-card { border: 1px solid var(--line); border-radius: 16px; padding: 24px; display: flex; flex-direction: column; gap: 14px; box-shadow: 0 8px 24px rgba(14,27,38,0.06); }
.side-card h2 { font-size: 20px; font-weight: 800; }
.side-card p { font-size: 14px; color: var(--muted); }
.attribution { font-size: 13px; color: var(--muted); }

/* Agent */
.agent { display: flex; align-items: center; gap: 14px; }
.agent-photo { width: 72px; height: 72px; border-radius: 999px; object-fit: cover; flex: none; border: 3px solid var(--white); box-shadow: 0 0 0 2px var(--red); }
.agent-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.agent-name { font-size: 18px; font-weight: 800; }
.agent-title { font-size: 13px; color: var(--muted); }
.agent-links { display: flex; flex-wrap: wrap; gap: 0 14px; font-size: 14px; font-weight: 700; }
.agent-links a { padding: 4px 0; overflow-wrap: anywhere; }
.agent-full { padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.agent-compact { background: var(--white); border: 1px solid var(--line); border-radius: 12px; padding: 12px 16px; }
.agent-compact .agent-photo { width: 56px; height: 56px; }
.agent-compact .agent-name { font-size: 16px; }
.agent-compact .agent-text { flex: 1; }
.agent-hero .agent-photo { width: 120px; height: 120px; }
.agent-hero .agent-name { font-size: 22px; }

/* Google reviews */
.stars { display: inline-flex; gap: 1px; vertical-align: middle; }
.rating-summary { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 12px; color: var(--muted); font-weight: 600; }
.rating-summary strong { font-size: 32px; font-weight: 800; color: var(--ink); }
.review-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 20px; }
.review { border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; display: flex; flex-direction: column; gap: 14px; background: var(--white); }
.review-head { display: flex; gap: 12px; align-items: center; }
.review-head img, .review-initial { width: 44px; height: 44px; border-radius: 999px; flex: none; object-fit: cover; }
.review-initial { background: var(--red); color: var(--white); display: flex; align-items: center; justify-content: center; font-weight: 800; }
.review-author { font-weight: 800; color: var(--ink); text-decoration: none; }
.review-when { font-size: 13px; color: var(--muted); display: flex; align-items: center; gap: 8px; }
.review-text { color: var(--text); line-height: 1.65; font-size: 15px; white-space: pre-line; }
.review-more { font-size: 14px; font-weight: 700; }
.agent-rating { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--muted); text-decoration: none; }

/* Calculators page */
.calc-hero { background: var(--red); color: var(--white); }
.calc-hero .container { padding-top: 56px; padding-bottom: 56px; display: flex; flex-direction: column; gap: 12px; }
.calc-hero .eyebrow { color: #FFE4E8; }
.calc-hero h1 { font-size: clamp(34px, 5vw, 52px); font-weight: 800; }
.calc-hero .lead { color: #FFE4E8; font-size: 18px; max-width: 640px; }
.calc-page { padding-top: 32px; padding-bottom: 72px; display: flex; flex-direction: column; gap: 24px; }
.tabs { display: flex; flex-wrap: wrap; gap: 0; border-bottom: 1px solid var(--line); }
.tabs [role=tab] { flex: 1 1 0; min-width: max-content; min-height: 58px; padding: 0 18px; border: 0; background: none; font-family: inherit; font-weight: 700; font-size: 19px; color: var(--muted); border-bottom: 3px solid transparent; cursor: pointer; margin-bottom: -1px; text-align: center; }
.tabs [role=tab]:hover { color: var(--ink); }
@media (max-width: 960px) {
  .tabs [role=tab] { flex: 1 1 50%; min-width: 0; min-height: 52px; font-size: 17px; padding: 0 8px; }
}
.tabs [role=tab][aria-selected=true] { color: var(--red); border-bottom-color: var(--red); }
.calc-panel { display: flex; flex-wrap: wrap; gap: 32px; align-items: flex-start; }
.calc-panel[hidden] { display: none; }
.calc-form { flex: 1 1 360px; display: flex; flex-direction: column; gap: 16px; }
.field-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.hint { font-size: 12px; font-weight: 500; color: var(--muted); }
.calc-results { flex: 1 1 380px; background: var(--red-soft); border: 1px solid var(--red-line); border-radius: var(--radius); padding: 28px; display: flex; flex-direction: column; gap: 18px; align-items: flex-start; }
.result-main small { display: block; font-size: 14px; font-weight: 700; color: var(--muted); }
.result-main strong { font-size: clamp(36px, 5vw, 48px); font-weight: 800; color: var(--red-dark); letter-spacing: -0.02em; }
.result-list { margin: 0; width: 100%; display: flex; flex-direction: column; }
.result-list div { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-top: 1px solid var(--red-line); }
.result-list dt { color: var(--text); }
.result-list dd { margin: 0; font-weight: 800; text-align: right; }
.calc-warning { background: var(--white); border-left: 0; border: 1px solid var(--red); color: var(--red-dark); border-radius: 8px; padding: 12px 14px; font-weight: 600; font-size: 14px; }
.bracket-table { width: 100%; border-collapse: collapse; font-size: 14px; background: var(--white); border-radius: 8px; overflow: hidden; }
.bracket-table caption { text-align: left; font-weight: 700; padding-bottom: 8px; color: var(--text); }
.bracket-table th, .bracket-table td { padding: 8px 12px; border-bottom: 1px solid var(--line); text-align: left; }
.bracket-table td:last-child, .bracket-table th:last-child { text-align: right; }
.calc-extra { flex: 1 1 100%; min-width: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); gap: 24px; }
.extra-card { border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.extra-card h2 { font-size: 22px; font-weight: 800; }
.extra-wide { grid-column: 1 / -1; }
.extra-intro { color: var(--muted); font-size: 15px; }
.extra-inputs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.extra-inputs .full { grid-column: 1 / -1; }
.extra-card .result-list div { border-top-color: var(--line); }
.result-list .total { border-top: 2px solid var(--ink) !important; }
.result-list .total dt, .result-list .total dd { font-weight: 800; font-size: 18px; color: var(--ink); }
.table-scroll { overflow-x: auto; }
.extra-card details summary { cursor: pointer; font-weight: 700; color: var(--red); min-height: 44px; display: flex; align-items: center; }
.amort-table { min-width: 520px; }
.amort-table td:not(:first-child), .amort-table th:not(:first-child) { text-align: right; }
.risk-up { color: var(--red-dark); font-weight: 700; }
.risk-down { color: #145A2A; font-weight: 700; }
.compare-panel { flex-direction: column; gap: 16px; align-items: stretch; }
.compare-intro { color: var(--muted); max-width: 760px; }
.calc-page > *, .compare-panel > * { min-width: 0; max-width: 100%; }
.compare-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); }
.compare { width: 100%; min-width: 720px; border-collapse: collapse; font-size: 15px; }
.compare th, .compare td { padding: 10px 14px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
.compare thead th { background: var(--soft); font-size: 15px; font-weight: 800; }
.compare tbody th { font-weight: 600; color: var(--text); width: 26%; position: sticky; left: 0; background: var(--white); z-index: 1; }
.compare thead th:first-child { position: sticky; left: 0; z-index: 2; }
.compare input, .compare select { width: 100%; min-height: 44px; padding: 0 10px; border: 1px solid var(--field); border-radius: 8px; background: var(--white); font-weight: 500; }
.compare tr.out td { font-weight: 800; }
.compare tr.out-payment td { font-size: 20px; color: var(--red-dark); background: var(--red-soft); }
.compare tr.out-payment th { background: var(--red-soft); }
.compare tr.out-note td { font-weight: 600; font-size: 13px; color: var(--red-dark); }
.compare td.best { background: #E8F6EC; color: #145A2A; }
.compare td.best::after { content: ' · lowest'; font-size: 12px; font-weight: 700; }
.calc-disclaimer { font-size: 13px; color: var(--muted); max-width: 900px; }
.calc-agent { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; }
.calc-agent .agent { flex: 1 1 360px; }

/* Neighbourhood guides */
.area-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 24px; }
.area-card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; text-decoration: none; color: inherit; display: flex; flex-direction: column; transition: box-shadow .15s, border-color .15s; }
.area-card:hover { border-color: var(--red); box-shadow: 0 8px 24px rgba(14,27,38,0.10); color: inherit; }
.area-card-photo { position: relative; aspect-ratio: 16 / 10; background: var(--red-deep); overflow: hidden; }
.area-card-photo img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.area-card:hover .area-card-photo img { transform: scale(1.04); }
.area-card-photo::after { content: ''; position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,0.6), rgba(0,0,0,0) 55%); }
.area-card-name { position: absolute; left: 18px; bottom: 14px; z-index: 1; color: var(--white); font-size: 28px; font-weight: 800; letter-spacing: -0.02em; }
.area-card-body { padding: 18px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.area-card-tagline { font-weight: 600; }
.area-card-facts { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 14px; color: var(--muted); }
.area-card-link { margin-top: auto; color: var(--red); font-weight: 700; font-size: 15px; padding-top: 6px; }
.area-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.area-tags span { font-size: 12px; font-weight: 700; padding: 5px 10px; border-radius: 999px; background: var(--red-soft); color: var(--red-dark); }
.area-hero { position: relative; min-height: 420px; background: var(--red-deep); color: var(--white); display: flex; align-items: flex-end; overflow: hidden; }
.area-hero > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.area-hero-shade { position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,0.7), rgba(0,0,0,0.1) 60%); }
.area-hero-text { position: relative; padding-top: 120px; padding-bottom: 40px; display: flex; flex-direction: column; gap: 10px; width: 100%; }
.area-hero h1 { font-size: clamp(44px, 7vw, 80px); font-weight: 800; letter-spacing: -0.03em; }
.area-hero p { font-size: 20px; max-width: 720px; }
.area-back { color: var(--white); font-weight: 700; text-decoration: none; padding: 8px 0; align-self: flex-start; }
.area-back:hover { color: #FFE4E8; }
.photo-credit { font-size: 12px; color: var(--muted); padding-top: 8px; }
.photo-credit a { color: var(--muted); }
.area-body { display: flex; flex-wrap: wrap; gap: 40px; align-items: flex-start; padding-top: 32px; padding-bottom: 64px; }
.area-main { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 36px; }
.area-main h2 { font-size: 26px; font-weight: 800; margin-bottom: 12px; }
.area-side { flex: 1 1 320px; }
.area-facts { margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.area-facts div { background: var(--soft); border-radius: 12px; padding: 16px; }
.area-facts dt { font-size: 13px; color: var(--muted); font-weight: 600; }
.area-facts dd { margin: 4px 0 0; font-size: 22px; font-weight: 800; }
.area-text { font-size: 17px; line-height: 1.75; color: var(--text); }
.area-highlights { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 10px; }
.area-highlights li { padding: 14px 16px 14px 44px; border: 1px solid var(--line); border-radius: 10px; position: relative; font-weight: 500; }
.area-highlights li::before { content: ''; position: absolute; left: 16px; top: 19px; width: 14px; height: 14px; border-radius: 999px; background: var(--red); box-shadow: inset 0 0 0 4px var(--red-soft); }
.area-places { display: flex; flex-wrap: wrap; gap: 8px; }
.area-places span { padding: 10px 14px; border-radius: 10px; background: var(--soft); font-weight: 700; font-size: 15px; }
.area-mini-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.area-mini { position: relative; aspect-ratio: 4 / 3; border-radius: 12px; overflow: hidden; background: var(--red-deep); display: flex; align-items: flex-end; text-decoration: none; }
.area-mini img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.area-mini::after { content: ''; position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,0.65), rgba(0,0,0,0) 60%); }
.area-mini span { position: relative; z-index: 1; color: var(--white); font-weight: 800; font-size: 17px; padding: 10px 12px; }

/* Client accounts */
.header-actions .btn { min-height: 42px; padding: 0 16px; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); background: var(--ink); color: var(--white); padding: 12px 18px; border-radius: 10px; font-weight: 600; font-size: 15px; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; z-index: 3000; max-width: calc(100% - 32px); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.dialog { border: 0; border-radius: 16px; padding: 0; width: min(560px, calc(100% - 32px)); box-shadow: 0 24px 64px rgba(0,0,0,0.25); }
.dialog::backdrop { background: rgba(14,27,38,0.55); }
.dialog form { padding: 24px; display: flex; flex-direction: column; gap: 14px; }
.dialog-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.dialog-head h2 { font-size: 22px; font-weight: 800; }
.dialog-x { width: 44px; height: 44px; border: 0; background: var(--soft); border-radius: 999px; font-size: 24px; cursor: pointer; line-height: 1; }
.dialog-sub { color: var(--muted); font-weight: 600; }
.dialog-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.note-card { margin-top: 16px; }
.note-card textarea { width: 100%; padding: 12px; border: 1px solid var(--field); border-radius: 8px; resize: vertical; font-weight: 500; }
.account-perks { margin: 4px 0 0; padding-left: 20px; color: var(--text); line-height: 1.9; }
.account-page { padding-top: 24px; padding-bottom: 72px; display: flex; flex-direction: column; gap: 20px; }
.account-nav { display: flex; flex-wrap: wrap; gap: 8px; position: sticky; top: 0; background: var(--white); padding: 10px 0; z-index: 5; border-bottom: 1px solid var(--line); }
.account-nav a { padding: 10px 14px; border-radius: 999px; background: var(--soft); color: var(--ink); text-decoration: none; font-weight: 700; font-size: 14px; }
.account-nav a:hover { background: var(--red-soft); color: var(--red-dark); }
.account-section { padding-top: 16px; scroll-margin-top: 70px; }
.account-section h2 { font-size: 26px; font-weight: 800; margin-bottom: 16px; }
.saved-item { display: flex; flex-direction: column; gap: 8px; }
.saved-note { font-size: 14px; color: var(--text); background: var(--soft); border-radius: 10px; padding: 10px 12px; }
.search-list { display: flex; flex-direction: column; gap: 12px; }
.search-item { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 14px; border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; }
.search-item-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.search-item-text span { color: var(--muted); font-size: 14px; }
.search-item-text a { font-weight: 700; font-size: 14px; padding: 4px 0; }
.search-item-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.search-item-actions select { min-height: 46px; padding: 0 10px; border: 1px solid var(--field); border-radius: 8px; background: var(--white); font-weight: 500; }
.settings-form { display: flex; flex-direction: column; gap: 14px; max-width: 520px; }
.account-danger { margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 14px; align-items: flex-start; }
.account-danger summary { cursor: pointer; color: var(--red-dark); font-weight: 700; min-height: 44px; display: flex; align-items: center; }
.admin-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.admin-tabs a { padding: 10px 16px; border-radius: 999px; background: var(--soft); color: var(--ink); text-decoration: none; font-weight: 700; }
.admin-tabs a[aria-current="page"] { background: var(--red); color: var(--white); }
.pill { display: inline-block; padding: 3px 9px; border-radius: 999px; background: var(--soft); font-size: 12px; font-weight: 700; }
.pill-hot { background: var(--red-soft); color: var(--red-dark); }

/* Admin: send listings */
.send-step { margin-top: 28px; display: flex; flex-direction: column; gap: 14px; }
.send-step h2 { font-size: 22px; font-weight: 800; display: flex; align-items: center; gap: 10px; }
.step-num { width: 32px; height: 32px; border-radius: 999px; background: var(--red); color: var(--white); display: inline-flex; align-items: center; justify-content: center; font-size: 16px; }
.send-criteria { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; align-items: end; }
.send-mls { grid-column: 1 / -1; }
.send-area { grid-column: 1 / -1; margin: 0; font-size: 15px; color: var(--muted, #4A5A68); }
.send-main { margin-top: 16px; }
.send-count { color: var(--muted); margin-bottom: 10px; }
.send-homes, .send-clients { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: 10px; }
.send-home, .send-client { display: flex; gap: 12px; align-items: center; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; cursor: pointer; }
.send-home:has(input:checked), .send-client:has(input:checked) { border-color: var(--red); background: var(--red-soft); }
.send-home input, .send-client input { width: 20px; height: 20px; accent-color: var(--red); flex: none; }
.send-home-photo { width: 72px; height: 54px; border-radius: 8px; background: var(--photo); overflow: hidden; flex: none; }
.send-home-photo img { width: 100%; height: 100%; object-fit: cover; }
.send-home-text, .send-client > span { display: flex; flex-direction: column; min-width: 0; font-size: 14px; }
.send-client[hidden] { display: none; }
.send-client-tools { display: flex; flex-wrap: wrap; gap: 8px; }
.send-consent { font-size: 14px; font-weight: 600; color: var(--ink); }
.send-options { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: 16px; }
.send-option { border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; display: flex; flex-direction: column; gap: 12px; }
.send-option h3 { font-size: 18px; font-weight: 800; }
.agent-badge { display: inline-block; font-size: 12px; font-weight: 700; color: var(--red-dark); background: var(--red-soft); border-radius: 999px; padding: 2px 8px; margin-left: 6px; }

/* Admin */
.admin table { width: 100%; border-collapse: collapse; font-size: 14px; }
.admin th, .admin td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.admin th { background: var(--soft); }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; }

@media print {
  .topbar, .site-header, .site-footer, .listing-side, .listing-top .actions, .thumbs, .gal-arrow, .gal-count, .calc, .mini-map { display: none !important; }
  .listing-body { padding: 0; }
}
.field-error { display: block; color: #B01A1A; font-size: 13px; font-weight: 600; line-height: 1.4; margin-top: 2px; }
.field input[aria-invalid="true"], .field select[aria-invalid="true"], .field textarea[aria-invalid="true"] { border-color: #B01A1A; box-shadow: 0 0 0 1px #B01A1A; }
.check input[aria-invalid="true"] { outline: 2px solid #B01A1A; outline-offset: 2px; }
.agent-login { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); font-size: 14px; color: var(--muted); }
.agent-login a { color: var(--red-dark); font-weight: 700; }
.showing-pick { border: 1px solid var(--line); border-radius: 12px; padding: 12px; margin: 0; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.showing-pick[hidden] { display: none; }
.showing-pick legend { font-weight: 800; font-size: 15px; padding: 0 4px; }
.day-chips { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 6px; scroll-snap-type: x proximity; }
.day-chip { position: relative; flex: none; scroll-snap-align: start; }
.day-chip input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.day-chip > span:first-of-type { display: flex; flex-direction: column; align-items: center; justify-content: center; width: 72px; min-height: 72px; border: 1px solid var(--field); border-radius: 10px; background: var(--white); line-height: 1.15; }
.day-chip small { font-size: 12px; color: var(--muted); font-weight: 600; }
.day-chip strong { font-size: 20px; font-weight: 800; }
.day-chip input:checked + span { background: var(--red); border-color: var(--red); color: #fff; }
.day-chip input:checked + span small { color: #FFE3E3; }
.day-chip input:focus-visible + span { outline: 3px solid var(--red); outline-offset: 2px; }
.day-chip:hover > span:first-of-type { border-color: var(--red); }
.listing-side, .listing-main { min-width: 0; }
.day-chips { min-width: 0; max-width: 100%; }

/* Compact pinned header with a Menu button: on phones, and (via site.js) whenever the links would wrap */
@media (max-width: 820px) {
  html { scroll-padding-top: 76px; }
  .site-header .container { flex-wrap: nowrap; gap: 8px; padding-top: 10px; padding-bottom: 10px; }
  .site-header .logo { margin-right: auto; }
  .site-header .logo img { width: 158px; }
  .site-header .header-call { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 10px; color: var(--ink); border: 1px solid var(--line); }
  .site-header .menu-btn { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--white); color: var(--ink); font: inherit; font-weight: 700; cursor: pointer; }
  .site-header .menu-btn .mb-close, .site-header .menu-btn[aria-expanded="true"] .mb-open { display: none; }
  .site-header .menu-btn[aria-expanded="true"] .mb-close { display: inline; }
  .site-header .header-menu { display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--white); border-bottom: 1px solid var(--line); box-shadow: 0 12px 24px rgba(14, 27, 38, 0.12); padding: 8px 16px 16px; max-height: calc(100vh - 70px); overflow-y: auto; }
  .site-header .header-menu.is-open { display: block; }
  .site-header .main-nav { flex-direction: column; gap: 0; font-size: 17px; }
  .site-header .main-nav a { padding: 12px 4px; border-bottom: 1px solid var(--line); }
  .site-header .main-nav a:hover, .site-header .main-nav a[aria-current="page"] { border-bottom-color: var(--line); }
  .site-header .header-actions { flex-wrap: wrap; padding-top: 14px; }
  .site-header .header-actions .btn { flex: 1 1 140px; }
}
html.header-compact { scroll-padding-top: 76px; }
html.header-compact .site-header .container { flex-wrap: nowrap; gap: 8px; padding-top: 10px; padding-bottom: 10px; }
html.header-compact .site-header .logo { margin-right: auto; }
html.header-compact .site-header .logo img { width: 158px; }
html.header-compact .site-header .header-call { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 10px; color: var(--ink); border: 1px solid var(--line); }
html.header-compact .site-header .menu-btn { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--white); color: var(--ink); font: inherit; font-weight: 700; cursor: pointer; }
html.header-compact .site-header .menu-btn .mb-close, html.header-compact .site-header .menu-btn[aria-expanded="true"] .mb-open { display: none; }
html.header-compact .site-header .menu-btn[aria-expanded="true"] .mb-close { display: inline; }
html.header-compact .site-header .header-menu { display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--white); border-bottom: 1px solid var(--line); box-shadow: 0 12px 24px rgba(14, 27, 38, 0.12); padding: 8px 16px 16px; max-height: calc(100vh - 70px); overflow-y: auto; }
html.header-compact .site-header .header-menu.is-open { display: block; }
html.header-compact .site-header .main-nav { flex-direction: column; gap: 0; font-size: 17px; }
html.header-compact .site-header .main-nav a { padding: 12px 4px; border-bottom: 1px solid var(--line); }
html.header-compact .site-header .main-nav a:hover, html.header-compact .site-header .main-nav a[aria-current="page"] { border-bottom-color: var(--line); }
html.header-compact .site-header .header-actions { flex-wrap: wrap; padding-top: 14px; }
html.header-compact .site-header .header-actions .btn { flex: 1 1 140px; }
@media (max-width: 440px) {
  .tabs [role=tab] { font-size: 15px; padding: 0 4px; }
}

/* Our team and agent pages */
.team-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: 24px; }
.team-card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; }
.team-card-photo { display: block; aspect-ratio: 1 / 1; background: var(--photo); overflow: hidden; }
.team-card-photo img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .3s; }
.team-card:hover .team-card-photo img { transform: scale(1.03); }
.team-card-body { padding: 18px 20px 22px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.team-card-body h2 { font-size: 20px; font-weight: 800; margin: 0; }
.team-card-body h2 a { color: var(--ink); text-decoration: none; }
.team-card-title { color: var(--muted); margin: 0; font-size: 14px; }
.team-card-links { display: flex; flex-direction: column; gap: 4px; margin: 6px 0 10px; font-weight: 700; font-size: 15px; }
.team-card-links a { display: inline-flex; align-items: center; gap: 8px; color: var(--ink); text-decoration: none; overflow-wrap: anywhere; }
.team-card-links a:hover { color: var(--red); }
.team-card-body .btn { margin-top: auto; align-self: flex-start; }
.agent-page { display: flex; flex-wrap: wrap; gap: 32px; align-items: flex-start; }
.agent-page-main { flex: 2 1 480px; min-width: 0; }
.agent-page-side { flex: 1 1 320px; min-width: 0; }
.agent-page-head { display: flex; flex-wrap: wrap; gap: 24px; align-items: center; }
.agent-page-head img { width: 200px; height: 200px; border-radius: 999px; object-fit: cover; border: 4px solid var(--white); box-shadow: 0 0 0 3px var(--red); flex: none; }
.agent-page-head h1 { font-size: clamp(30px, 4vw, 44px); font-weight: 800; margin: 0 0 4px; letter-spacing: -0.02em; }
.agent-page-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }
.agent-bio { margin-top: 32px; font-size: 17px; line-height: 1.7; max-width: 70ch; }
.agent-bio h2 { font-size: 22px; font-weight: 800; margin-bottom: 8px; }
@media (max-width: 600px) { .agent-page-head img { width: 140px; height: 140px; } }

/* Website chat assistant */
.chat { position: fixed; right: 20px; bottom: 20px; z-index: 1500; font-family: var(--font); }
.chat.chat-left { right: auto; left: 20px; }
.chat-fab { display: inline-flex; align-items: center; gap: 8px; min-height: 52px; padding: 0 20px 0 16px; border: 0; border-radius: 999px; background: var(--red); color: var(--white); font: 700 15px/1 var(--font); box-shadow: 0 6px 20px rgba(218,33,33,0.35); cursor: pointer; }
.chat-fab:hover { filter: brightness(1.06); }
.chat-fab:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
.chat.is-open .chat-fab { display: none; }
.chat-panel { width: min(380px, calc(100vw - 32px)); height: min(600px, calc(100vh - 110px)); display: flex; flex-direction: column; background: var(--white); border-radius: 16px; box-shadow: 0 12px 40px rgba(14,27,38,0.28); overflow: hidden; }
.chat-panel[hidden] { display: none; }
.chat-head { display: flex; align-items: center; gap: 10px; padding: 12px 12px 12px 16px; background: var(--ink); color: var(--white); }
.chat-head h2 { font-size: 16px; margin: 0; color: var(--white); }
.chat-head p { font-size: 12px; margin: 2px 0 0; opacity: .8; }
.chat-avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--red); display: grid; place-items: center; font-weight: 800; flex: none; }
.chat-x { margin-left: auto; width: 40px; height: 40px; border: 0; border-radius: 50%; background: rgba(255,255,255,0.12); color: var(--white); font-size: 24px; line-height: 1; cursor: pointer; }
.chat-log { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 10px; background: #F4F6F8; }
.chat-msg { max-width: 88%; padding: 10px 13px; border-radius: 14px; font-size: 15px; line-height: 1.45; overflow-wrap: anywhere; }
.chat-msg p { margin: 0; }
.chat-msg p + p, .chat-msg ul { margin-top: 6px; }
.chat-msg ul { padding-inline-start: 18px; margin-bottom: 0; }
.chat-msg a { color: var(--red); font-weight: 700; }
.chat-bot { background: var(--white); align-self: flex-start; border-end-start-radius: 4px; box-shadow: 0 1px 2px rgba(14,27,38,0.08); }
.chat-me { background: var(--red); color: var(--white); align-self: flex-end; border-end-end-radius: 4px; white-space: pre-wrap; }
.chat-disclose { font-size: 12px; color: var(--muted); margin: 0 2px; line-height: 1.4; }
.chat-suggest { display: flex; flex-wrap: wrap; gap: 6px; }
.chat-suggest button { border: 1px solid var(--red); background: var(--white); color: var(--red); border-radius: 999px; padding: 7px 12px; font: 600 13px/1.2 var(--font); cursor: pointer; text-align: start; }
.chat-suggest button:hover { background: var(--red); color: var(--white); }
.chat-typing { display: flex; gap: 4px; padding: 14px; }
.chat-typing span:not(.sr-only) { width: 7px; height: 7px; border-radius: 50%; background: #9AA7B2; animation: chat-dot 1s infinite ease-in-out; }
.chat-typing span:nth-child(2) { animation-delay: .15s; }
.chat-typing span:nth-child(3) { animation-delay: .3s; }
@keyframes chat-dot { 0%, 80%, 100% { opacity: .3; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }
@media (prefers-reduced-motion: reduce) { .chat-typing span { animation: none !important; } }
.chat-form { display: flex; gap: 8px; align-items: flex-end; padding: 10px; border-top: 1px solid var(--line); background: var(--white); }
.chat-form textarea { flex: 1; resize: none; border: 1px solid var(--field); border-radius: 12px; padding: 10px 12px; font: 15px/1.4 var(--font); max-height: 120px; min-height: 44px; }
.chat-send { width: 44px; height: 44px; flex: none; border: 0; border-radius: 50%; background: var(--red); color: var(--white); display: grid; place-items: center; cursor: pointer; }
.chat-foot { margin: 0; padding: 0 12px 10px; font-size: 13px; color: var(--muted); text-align: center; background: var(--white); }
.chat-foot a { color: var(--red); font-weight: 700; }
@media (max-width: 560px) {
  .chat { right: 12px; bottom: 12px; }
  .chat.chat-left { left: 12px; right: auto; }
  .chat-fab span { display: none; }
  .chat-fab { width: 56px; height: 56px; padding: 0; justify-content: center; }
  .chat.is-open { inset: 0; }
  .chat-panel { width: 100vw; height: 100dvh; border-radius: 0; }
}
@media print { .chat { display: none; } }

/* Too many homes in view: grouped counts and a zoom-in message */
.cluster-pin { display: grid; place-items: center; border-radius: 50%; background: rgba(218,33,33,.92); color: #fff; font: 800 14px/1 var(--font); border: 3px solid #fff; box-shadow: 0 0 0 4px rgba(218,33,33,.25), 0 2px 8px rgba(0,0,0,.3); transform: translate(-50%, -50%); cursor: pointer; }
.cluster-pin:hover { background: var(--ink); }
.map-zoom-hint { position: absolute; z-index: 800; top: calc(var(--draw-h) + 12px); left: 50%; transform: translateX(-50%); margin: 0; width: max-content; max-width: calc(100% - 24px); background: var(--white); color: var(--ink); border-left: 4px solid var(--red); border-radius: 10px; padding: 10px 14px; font-size: 14px; box-shadow: 0 2px 10px rgba(14,27,38,.2); text-align: center; }
.map-zoom-hint[hidden], .map-draw-hint:not([hidden]) ~ .map-zoom-hint { display: none; }
@container (max-width: 520px) { .map-zoom-hint { font-size: 13px; } }

/* CRM shortlist (shown only to signed-in agents) */
.sl-btn { border: 1px solid var(--red); background: #fff; color: var(--red); border-radius: 999px; font: 700 13px/1 var(--font); padding: 8px 12px; cursor: pointer; white-space: nowrap; }
.sl-btn .sl-on, .sl-btn[aria-pressed="true"] .sl-off { display: none; }
.sl-btn[aria-pressed="true"] .sl-on { display: inline; }
.sl-btn[aria-pressed="true"] { background: var(--red); color: #fff; }
.sl-btn.sl-card { position: absolute; top: 12px; right: 62px; z-index: 3; box-shadow: 0 2px 8px rgba(0,0,0,.2); }
.card { position: relative; }
.sl-btn.sl-bar { min-height: 44px; padding: 0 16px; font-size: 15px; }
.sl-btn.sl-send { margin-left: auto; flex: none; }
.sl-pill { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 1400; background: var(--ink); color: #fff; text-decoration: none; font-weight: 700; padding: 12px 20px; border-radius: 999px; box-shadow: 0 6px 20px rgba(0,0,0,.3); white-space: nowrap; }
.sl-pill b { background: var(--red); border-radius: 999px; padding: 2px 8px; margin: 0 2px; }
.sl-pill[hidden] { display: none; }
.sl-toast { position: fixed; left: 50%; bottom: 76px; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 10px; z-index: 1500; font-weight: 600; }
/* Send listings: results + shortlist side by side */
.send-cart-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, 380px); gap: 20px; align-items: start; margin-top: 16px; }
.send-results-head { display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.send-results-head .send-count { margin: 0; flex: 1 1 300px; }
.send-home { cursor: default; }
.send-home.is-in, .send-home:has(.sl-btn[aria-pressed="true"]) { border-color: var(--red); background: var(--red-soft); }
.send-home-text a { color: inherit; }
.send-cart { position: sticky; top: 84px; }
.sl-panel { background: #fff; border: 2px solid var(--red); border-radius: 14px; padding: 16px; max-height: calc(100vh - 110px); overflow-y: auto; }
.sl-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.sl-head h2 { font-size: 18px; font-weight: 800; margin: 0; display: flex; align-items: center; gap: 8px; }
.sl-count { background: var(--red); color: #fff; border-radius: 999px; font-size: 13px; padding: 2px 9px; }
.sl-items { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; counter-reset: sl; }
.sl-item { position: relative; display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 10px; padding: 8px 30px 8px 8px; border: 1px solid var(--line); border-radius: 10px; }
.sl-photo { width: 76px; height: 58px; border-radius: 8px; overflow: hidden; background: var(--photo, #EAEFF2); display: block; }
.sl-photo img { width: 100%; height: 100%; object-fit: cover; }
.sl-text { display: flex; flex-direction: column; gap: 2px; font-size: 14px; min-width: 0; }
.sl-text a { color: var(--ink); }
.sl-note input { width: 100%; margin-top: 6px; min-height: 34px; padding: 0 8px; border: 1px dashed var(--field); border-radius: 6px; font: 13px var(--font); transition: border-color .3s; }
.sl-note input.is-saved { border-color: #1B7F3B; border-style: solid; }
.sl-x { position: absolute; top: 4px; right: 4px; width: 26px; height: 26px; border: 0; border-radius: 50%; background: #EEF1F4; color: var(--ink); font-size: 18px; line-height: 1; cursor: pointer; }
.sl-x:hover { background: var(--red); color: #fff; }
.sl-foot { margin-top: 10px; }
@media (max-width: 1000px) { .send-cart-layout { grid-template-columns: 1fr; } .send-cart { position: static; order: -1; } .sl-panel { max-height: none; } }
@media print { .sl-btn, .sl-pill { display: none; } }

/* Editing drawn areas on the search map */
/* Edit handles. Leaflet replaces its own leaflet-div-icon class with ours, so style .leaflet-marker-icon.edit-* */
.leaflet-marker-icon.edit-handle { box-sizing: border-box; background: #fff; border: 3px solid var(--red); border-radius: 50%; box-shadow: 0 1px 5px rgba(0,0,0,.45); cursor: grab; touch-action: none; }
.leaflet-marker-icon.edit-handle:hover, .leaflet-marker-icon.edit-handle.leaflet-drag-target { box-shadow: 0 0 0 5px rgba(218,33,33,.25), 0 1px 5px rgba(0,0,0,.45); }
.leaflet-marker-icon.edit-move { background: var(--ink); border-color: #fff; color: #fff; display: grid; place-items: center; font-size: 16px; line-height: 1; cursor: move; }
.leaflet-marker-icon.edit-delete { background: var(--red); border-color: #fff; color: #fff; display: grid; place-items: center; font: 800 18px/1 var(--font); cursor: pointer; }
.map-draw button[data-draw-edit][aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.map-draw [hidden] { display: none !important; }
/* Calculators: white tabs with a thin red border; each tab's text has its own colour; the chosen tab gets a red bar */
.tabs { gap: 6px; border-bottom: 2px solid var(--red); }
.tabs [role=tab] { --tab: var(--red); background: #fff; color: var(--tab); border: 1px solid var(--red); border-bottom-width: 0; border-radius: 10px 10px 0 0; margin-bottom: 0; transition: box-shadow .15s; }
.tabs [role=tab]:hover { color: var(--tab); box-shadow: inset 0 -2px 0 #F4B5B5; }
.tabs [role=tab][aria-selected=true] { color: var(--tab); border-color: var(--red); border-width: 1px; border-bottom-width: 0; box-shadow: inset 0 -3px 0 var(--red); font-weight: 800; }
.tabs #tab-mortgage { --tab: #C81E1E; }
.tabs #tab-compare  { --tab: #1D5FA8; }
.tabs #tab-afford   { --tab: #18794E; }
.tabs #tab-ltt      { --tab: #9A5200; }
@media (max-width: 960px) { .tabs { row-gap: 6px; } .tabs [role=tab] { flex: 1 1 calc(50% - 6px); border-radius: 10px; border-bottom-width: 1px; } .tabs [role=tab][aria-selected=true] { border-bottom-width: 1px; box-shadow: 0 0 0 2px rgba(218,33,33,.25); } }
.team-card-licence { color: var(--muted); margin: 2px 0 0; font-size: 12.5px; line-height: 1.4; }
/* Calculators: "Talk to our mortgage agent" */
.mortgage-agent { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 28px; background: var(--white); border: 1px solid var(--line); border-top: 4px solid var(--red); border-radius: var(--radius); padding: 28px; scroll-margin-top: 90px; }
.mortgage-agent-who { display: flex; gap: 18px; align-items: flex-start; }
.mortgage-agent-who img { width: 120px; height: 120px; border-radius: 50%; object-fit: cover; flex: none; border: 3px solid var(--white); box-shadow: 0 2px 10px rgba(14,27,38,.15); }
.mortgage-agent-who .eyebrow { color: var(--red); margin: 0 0 4px; }
.mortgage-agent-who h2 { font-size: 24px; font-weight: 800; margin: 0 0 6px; }
.mortgage-agent-name { margin: 0; font-weight: 700; }
.mortgage-agent-name a { color: var(--ink); }
.mortgage-agent-who .team-card-links { margin: 10px 0; }
.mortgage-agent-form { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 16px; align-content: start; }
.mortgage-agent-form .full, .mortgage-agent-form .notice { grid-column: 1 / -1; }
@media (max-width: 860px) { .mortgage-agent { grid-template-columns: 1fr; padding: 20px; } .mortgage-agent-form { grid-template-columns: 1fr; } .mortgage-agent-who img { width: 84px; height: 84px; } }
@media (max-width: 520px) { .mortgage-agent-who { flex-direction: column; gap: 12px; } }
