:root {
  --brand: #3d8427;
  --brand-dark: #2b5f1c;
  --brand-soft: #edf5e8;
  --accent: #181a1b;
  --accent-dark: #3d8427;
  --ok: #16a34a;
  --ink: #181a1b;
  --muted: #64665f;
  --line: #e3e1d9;
  --bg: #ffffff;
  --panel: #ffffff;
  --page: #f7f6f2;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(24, 26, 27, .06), 0 4px 16px rgba(24, 26, 27, .07);
  --wood: #765a37;
  --bone: #f4f2ec;
  --topbar: 64px;
  --filterbar: 52px;
}
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; }
body { font: 15px/1.5 "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif; color: var(--ink); background: var(--page); -webkit-font-smoothing: antialiased; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .4em; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
button { font: inherit; cursor: pointer; }

/* ---------- top bar ---------- */
.topbar { position: sticky; top: 0; z-index: 1000; height: var(--topbar); display: flex; align-items: center; gap: 20px; padding: 0 20px;
  background: var(--bone); border-bottom: 3px solid var(--brand); }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); flex-shrink: 0; }
.brand:hover { text-decoration: none; }
.brand-text { display: flex; flex-direction: column; line-height: 1.05; }
.brand img { width: 46px; height: 46px; }
.brand-text strong { font: 900 20px/1 "Montserrat", sans-serif; letter-spacing: .01em; text-transform: uppercase; }
.brand-text strong .g { color: var(--brand); }
.brand-text small { font: 700 10.5px/1.3 "Montserrat", sans-serif; color: var(--ink); text-transform: uppercase; letter-spacing: .2em; display: flex; align-items: center; gap: 6px; margin-top: 3px; }
.brand-text small::before, .brand-text small::after { content: ""; width: 10px; height: 2px; background: var(--brand); }
h1, h2, .results-head h1, .dir-hero h1 { font-family: "Montserrat", "Plus Jakarta Sans", sans-serif; }
.dir-hero-logo { width: 220px; height: auto; }
.search { flex: 1; max-width: 420px; display: flex; align-items: center; background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 0 6px 0 16px; height: 40px; }
.search input { flex: 1; border: 0; outline: 0; font: inherit; background: transparent; min-width: 0; }
.search button { border: 0; background: transparent; color: var(--muted); width: 32px; height: 32px; border-radius: 50%; }
.search:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(61, 132, 39, .18); }
.mainnav { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.mainnav a { color: var(--ink); font-weight: 600; padding: 8px 12px; border-radius: 999px; font-size: 14px; white-space: nowrap; }
.mainnav a:hover { background: rgba(61, 132, 39, .1); text-decoration: none; }
.mainnav a.on { color: var(--brand); }
.btn-accent, .mainnav a.btn-accent { background: var(--accent); color: #fff; }
.mainnav a.btn-accent:hover { background: var(--accent-dark); }
.navtoggle { display: none; margin-left: auto; border: 0; background: transparent; color: var(--ink); }

/* ---------- filter bar ---------- */
.filterbar { position: sticky; top: var(--topbar); z-index: 900; height: var(--filterbar); background: #fff; border-bottom: 1px solid var(--line); display: flex; align-items: center; padding: 0 20px; }
.filters { display: flex; gap: 8px; align-items: center; overflow-x: auto; scrollbar-width: none; }
.filters::-webkit-scrollbar { display: none; }
.dd { position: relative; }
.dd-btn { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 6px 30px 6px 14px; font-size: 13.5px; font-weight: 600; color: var(--ink); white-space: nowrap; position: relative; }
.dd-btn::after { content: ""; position: absolute; right: 12px; top: 50%; width: 6px; height: 6px; border: solid currentColor; border-width: 0 1.6px 1.6px 0; transform: translateY(-70%) rotate(45deg); opacity: .6; }
.dd-btn.active { border-color: var(--brand); background: var(--brand-soft); color: var(--brand-dark); }
.dd-panel { display: none; position: fixed; margin-top: 8px; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 12px 32px rgba(24, 26, 27, .16); padding: 14px; min-width: 260px; z-index: 1100; }
.dd.open .dd-panel { display: block; }
.dd-h { margin: 4px 0 6px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.row2 label { font-size: 12px; font-weight: 600; color: var(--muted); display: grid; gap: 4px; }
.row2 input, .form input[type=email], .form input[type=text], .form input[type=url] { border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; font: inherit; width: 100%; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0 4px; }
.chips button { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 4px 10px; font-size: 12.5px; }
.chips button:hover { border-color: var(--brand); color: var(--brand); }
.seg { display: flex; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; margin-bottom: 8px; }
.seg button { flex: 1; border: 0; border-right: 1px solid var(--line); background: #fff; padding: 7px 4px; font-size: 13px; }
.seg button:last-child { border-right: 0; }
.seg button.on { background: var(--brand); color: #fff; }
.checks label { display: flex; align-items: center; gap: 8px; padding: 5px 2px; font-size: 14px; cursor: pointer; }
.checks input { accent-color: var(--brand); width: 16px; height: 16px; }
.apply { margin-top: 12px; width: 100%; border: 0; background: var(--brand); color: #fff; font-weight: 700; padding: 9px; border-radius: 10px; }
.apply:hover { background: var(--brand-dark); }
.linkbtn { border: 0; background: none; color: var(--brand); font-weight: 600; font-size: 13.5px; white-space: nowrap; }

/* ---------- split map / results ---------- */
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); height: calc(100vh - var(--topbar) - var(--filterbar)); }
.mapwrap { position: relative; border-right: 1px solid var(--line); }
#map { position: absolute; inset: 0; background: #e8eef3; }
.map-search { position: absolute; top: 14px; left: 50%; transform: translateX(-50%); z-index: 500; border: 0; background: #fff; color: var(--brand-dark); font-weight: 700; padding: 8px 16px; border-radius: 999px; box-shadow: var(--shadow); }
.results { overflow-y: auto; padding: 18px 20px 30px; }
.results-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; margin-bottom: 14px; }
.results-head h1 { font-size: 20px; font-weight: 800; margin: 0; }
.results-head p { margin: 2px 0 0; font-size: 13px; }
.sort { font-size: 13px; color: var(--muted); white-space: nowrap; }
.sort select { border: 0; background: transparent; font: inherit; font-weight: 700; color: var(--ink); cursor: pointer; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; transition: opacity .15s; }
.grid.loading { opacity: .5; }

.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); transition: transform .12s, box-shadow .12s; }
.card:hover { transform: translateY(-2px); box-shadow: 0 2px 4px rgba(24, 26, 27, .06), 0 10px 26px rgba(24, 26, 27, .12); }
.card.flash { animation: flash 1.2s ease; }
@keyframes flash { 0%, 40% { box-shadow: 0 0 0 3px var(--brand); } 100% { box-shadow: var(--shadow); } }
.card-img { position: relative; display: block; aspect-ratio: 16 / 10; background: linear-gradient(135deg, #ecebe4, #e2e8dc); }
.card-img::before { content: "No photo"; position: absolute; inset: 0; display: grid; place-items: center; color: var(--muted); font-size: 12px; }
.card-img img { position: relative; width: 100%; height: 100%; object-fit: cover; }
.badge { position: absolute; top: 10px; font-size: 11.5px; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .15); }
.badge.ok { left: 10px; color: var(--ok); }
.badge.ok::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--ok); margin-right: 5px; vertical-align: 1px; }
.badge.off { left: 10px; color: #b91c1c; }
.badge.type { right: 10px; background: var(--wood); color: #fff; }
.card-body { padding: 12px 14px 14px; }
.price { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.price strong { font-size: 20px; font-weight: 800; }
.price .arv { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.addr { display: block; color: var(--ink); font-weight: 600; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.loc { font-size: 13px; }
.facts { display: flex; gap: 12px; margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--line); font-size: 13px; color: #3c3650; flex-wrap: wrap; }
.facts span::before { content: "•"; color: var(--brand); margin-right: 5px; }
.src { font-size: 12px; margin-top: 6px; }
.empty { grid-column: 1 / -1; text-align: center; padding: 50px 20px; color: var(--muted); }
.empty strong { color: var(--ink); }
.pager { display: flex; justify-content: center; align-items: center; gap: 14px; margin-top: 22px; font-size: 14px; }
.pager button { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 7px 14px; font-weight: 600; }
.pager button:disabled { opacity: .4; cursor: default; }

/* map pins */
.pin { background: none; border: 0; }
.pin span { display: inline-block; transform: translate(-50%, -100%); background: var(--brand); color: #fff; font-size: 12px; font-weight: 700; padding: 3px 8px; border-radius: 999px; white-space: nowrap; box-shadow: 0 2px 6px rgba(0, 0, 0, .25); border: 2px solid #fff; }
.pin span { border-color: #fff; }
.pin.hl span, .pin:hover span { background: var(--ink); }
.pin.hl { z-index: 9999 !important; }
.marker-cluster-small, .marker-cluster-medium, .marker-cluster-large { background: rgba(61, 132, 39, .28); }
.marker-cluster { border-radius: 50%; }
.marker-cluster div { width: 30px; height: 30px; margin: 5px 0 0 5px; border-radius: 50%; text-align: center; line-height: 30px; font-size: 12px; }
.marker-cluster-small div, .marker-cluster-medium div, .marker-cluster-large div { background: var(--brand); color: #fff; font-weight: 700; }
.leaflet-popup-content { margin: 10px; }
.pop { display: grid; gap: 3px; color: var(--ink); width: 220px; font: 13px/1.4 "Plus Jakarta Sans", system-ui, sans-serif; }
.pop:hover { text-decoration: none; }
.pop img { width: 100%; height: 120px; object-fit: cover; border-radius: 8px; margin-bottom: 4px; }
.pop strong { font-size: 16px; }
.viewtoggle { display: none; }

/* ---------- detail ---------- */
.detail, .directory, .narrow { max-width: 1180px; margin: 0 auto; padding: 22px 20px 50px; }
.narrow { max-width: 760px; }
.back { display: inline-block; margin-bottom: 14px; font-weight: 600; }
.detail-grid { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: 24px; align-items: start; }
.hero-img { position: relative; border-radius: var(--radius); overflow: hidden; aspect-ratio: 16 / 10; background: linear-gradient(135deg, #ecebe4, #e2e8dc); }
.hero-img img { width: 100%; height: 100%; object-fit: cover; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); margin-top: 18px; }
.panel h2 { font-size: 17px; }
.sticky { position: sticky; top: calc(var(--topbar) + 16px); margin-top: 0; }
.price.big strong { font-size: 30px; }
.detail h1.addr { font-size: 19px; white-space: normal; margin: 4px 0 0; }
.kv { margin: 16px 0; display: grid; grid-template-columns: 1fr 1fr; gap: 10px 16px; }
.kv div { border-top: 1px solid var(--line); padding-top: 8px; }
.kv dt { font-size: 12px; color: var(--muted); font-weight: 600; }
.kv dd { margin: 0; font-weight: 700; }
.desc { white-space: normal; }
#minimap { height: 280px; border-radius: 10px; }
.btn-primary, .btn-outline { display: inline-block; font-weight: 700; padding: 11px 18px; border-radius: 12px; text-align: center; }
.btn-primary { background: var(--brand); color: #fff; border: 0; }
.btn-primary:hover { background: var(--brand-dark); text-decoration: none; }
.btn-outline { border: 1.5px solid var(--brand); color: var(--brand); background: #fff; padding: 7px 14px; font-size: 13.5px; }
.btn-outline:hover { background: var(--brand-soft); text-decoration: none; }
.block { display: block; width: 100%; }

/* ---------- directory ---------- */
.dir-hero { background: var(--bone); border: 1px solid var(--line); display: grid; grid-template-columns: minmax(0, 1fr) 220px; gap: 24px; align-items: center; border-radius: 20px; padding: 30px; margin-bottom: 10px; }
.dir-hero h1 { font-size: 32px; font-weight: 800; }
.dir-hero p { max-width: 760px; margin: 0 0 14px; }
.jump { display: flex; flex-wrap: wrap; gap: 8px; }
.jump a { background: #fff; border: 1px solid var(--line); padding: 5px 12px; border-radius: 999px; font-size: 13px; font-weight: 600; color: var(--ink); }
.dir-section { padding-top: 26px; scroll-margin-top: calc(var(--topbar) + 10px); }
.dir-section h2 { font-size: 22px; font-weight: 800; }
.wgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 14px; }
.wcard { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); display: flex; flex-direction: column; }
.wcard-top { display: flex; justify-content: space-between; gap: 8px; align-items: flex-start; }
.wcard h3 { font-size: 16px; margin: 0; }
.wcard h3 a { color: var(--ink); }
.wcard p { margin: 4px 0 0; font-size: 13.5px; }
.wcard .host { color: var(--brand); font-size: 12.5px; font-weight: 600; }
.wcard-actions { margin-top: auto; padding-top: 12px; display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.tag { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--brand-dark); background: var(--brand-soft); padding: 3px 8px; border-radius: 999px; white-space: nowrap; }
.live { font-size: 12.5px; font-weight: 700; color: var(--ok); display: inline-flex; align-items: center; gap: 6px; }
.live.inline { vertical-align: middle; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 3px rgba(22, 163, 74, .18); }
.metro-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.metro { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; }
.metro h3 { font-size: 15px; }
.metro ul { margin: 0; padding-left: 18px; font-size: 13.5px; }
.dir-cta { margin-top: 34px; text-align: center; }

/* ---------- forms / prose ---------- */
.form { display: grid; gap: 14px; }
.form label { display: grid; gap: 5px; font-weight: 600; font-size: 14px; }
.form fieldset { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
.form legend { font-weight: 600; font-size: 14px; padding: 0 4px; }
.state-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(62px, 1fr)); gap: 4px; }
.state-grid label { display: flex; flex-direction: row; gap: 5px; font-weight: 500; font-size: 13px; }
.hp { position: absolute; left: -9999px; }
.error { color: #b91c1c; font-weight: 600; }
.center { text-align: center; }
.prose h2 { margin-top: 1.4em; }
.prose li { margin: 6px 0; }
.steps { padding-left: 20px; }

/* ---------- footer ---------- */
.sitefoot { background: #141615; color: #c9cbc4; border-top: 4px solid var(--brand); padding: 36px 20px 20px; }
.page-deals .sitefoot { display: none; }
.foot-inner { max-width: 1180px; margin: 0 auto; display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 24px; }
.sitefoot h4 { color: #fff; margin: 0 0 8px; font-size: 14px; }
.sitefoot a { display: block; color: #c9cbc4; font-size: 14px; padding: 2px 0; }
.foot-brand { color: #fff; margin-bottom: 6px; }
.foot-logo { width: 180px; height: auto; background: var(--bone); border-radius: 12px; padding: 8px; margin-bottom: 10px; }
.disclaimer, .copyright { max-width: 1180px; margin: 22px auto 0; font-size: 12px; color: #8d9087; }
.copyright { margin-top: 8px; }

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  .split { grid-template-columns: 1fr 1.1fr; }
  .mainnav a:not(.btn-accent):not(.on) { padding: 8px 8px; }
}
@media (max-width: 900px) {
  :root { --topbar: 60px; }
  .topbar { gap: 10px; padding: 0 14px; }
  .brand-text small { display: none; }
  .navtoggle { display: block; }
  .mainnav { display: none; position: absolute; top: var(--topbar); right: 0; left: 0; flex-direction: column; align-items: stretch; background: #fff; border-bottom: 1px solid var(--line); padding: 10px; box-shadow: var(--shadow); }
  .mainnav.open { display: flex; }
  .search { margin-left: auto; }
  .filterbar { padding: 0 14px; }
  .split { display: block; height: auto; }
  .mapwrap { display: none; position: fixed; inset: calc(var(--topbar) + var(--filterbar)) 0 0 0; z-index: 800; border: 0; }
  body.show-map .mapwrap { display: block; }
  .results { overflow: visible; padding: 14px 16px 90px; }
  .results-head { flex-direction: column; align-items: flex-start; }
  .viewtoggle { display: block; position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%); z-index: 950; border: 0; background: var(--ink); color: #fff; font-weight: 700; padding: 11px 24px; border-radius: 999px; box-shadow: 0 6px 18px rgba(0, 0, 0, .25); }
  .detail-grid { grid-template-columns: 1fr; }
  .sticky { position: static; }
  .foot-inner { grid-template-columns: 1fr 1fr; }
  .foot-inner > div:first-child { grid-column: 1 / -1; }
  .page-deals .sitefoot { display: block; }
}
@media (max-width: 560px) {
  .brand-text { display: none; }
  .dir-hero { grid-template-columns: 1fr; }
  .dir-hero-logo { width: 160px; order: -1; }
  .grid { grid-template-columns: 1fr; }
  .dir-hero { padding: 20px; }
  .dir-hero h1 { font-size: 26px; }
  .detail, .directory, .narrow { padding: 16px 16px 40px; }
}
