:root {
  --ink: #17201f;
  --muted: #5c6866;
  --line: #e4ddd2;
  --bg: #faf7f2;
  --card: #ffffff;
  --teal: #0f3b3a;
  --teal-2: #185755;
  --sand: #e8b04b;
  --sand-soft: #f6e7c8;
  --red: #b3412e;
  --green: #2f7a4a;
  --t-land: #3d7a3a;
  --t-land_building: #1d6a68;
  --t-residential: #2e5fa8;
  --t-commercial: #b4621c;
  --t-condominium: #7a4aa0;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(23, 32, 31, .06), 0 8px 24px rgba(23, 32, 31, .07);
  --serif: 'Fraunces', Georgia, serif;
  --sans: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.55 var(--sans); }
img { max-width: 100%; display: block; }
a { color: var(--teal-2); }
h1, h2, h3 { font-family: var(--serif); font-weight: 650; line-height: 1.15; letter-spacing: -.01em; margin: 0 0 .4em; }
h1 { font-size: clamp(1.9rem, 4.5vw, 3rem); }
h2 { font-size: clamp(1.35rem, 2.6vw, 1.8rem); }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 16px; }
.wrap-wide { max-width: 1600px; margin: 0 auto; padding: 0 16px; }
.lede { font-size: 1.1rem; color: var(--muted); max-width: 60ch; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .4em; padding: .7em 1.15em; border-radius: 999px; border: 1px solid transparent;
  font: 600 .95rem var(--sans); text-decoration: none; cursor: pointer; white-space: nowrap; transition: transform .12s, background .12s; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--teal); color: #fff; }
.btn-primary:hover { background: var(--teal-2); }
.btn-messenger { background: var(--sand); color: var(--teal); }
.btn-messenger:hover { background: #f0c165; }
.btn-ghost { border-color: currentColor; color: var(--teal); background: transparent; }
.btn-block { width: 100%; }
.btn-sm { padding: .4em .9em; font-size: .85rem; }
.linklike { background: none; border: 0; padding: 0; color: var(--teal-2); font: inherit; text-decoration: underline; cursor: pointer; }
.danger { color: var(--red); }

/* Header */
.site-header { background: var(--teal); color: #fff; position: sticky; top: 0; z-index: 1000; }
.header-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font: 650 1.12rem var(--serif); }
.brand em { font-style: italic; font-weight: 500; opacity: .8; }
.brand-mark { width: 30px; height: 30px; color: #fff; flex: none; }
.nav { display: flex; align-items: center; gap: 18px; }
.nav > a, .nav summary { color: #fff; text-decoration: none; font-weight: 500; font-size: .95rem; cursor: pointer; }
.nav > a.btn { color: var(--teal); }
.nav form { margin: 0; }
.nav .linklike { color: #fff; }
.areas-menu { position: relative; }
.areas-menu summary { list-style: none; white-space: nowrap; }
.areas-menu summary::after { content: ' ▾'; font-size: .8em; }
.areas-menu summary::-webkit-details-marker { display: none; }
.areas-pop { position: absolute; right: 0; top: calc(100% + 12px); background: #fff; border-radius: 12px; box-shadow: var(--shadow); padding: 8px; min-width: 220px; }
.areas-pop a { display: flex; justify-content: space-between; padding: 8px 12px; border-radius: 8px; color: var(--ink); text-decoration: none; }
.areas-pop a:hover { background: var(--bg); }
.areas-pop span { color: var(--muted); }

/* Hero */
.hero { background: linear-gradient(180deg, var(--teal) 0%, var(--teal-2) 100%); color: #fff; padding: 48px 0 56px; }
.hero .eyebrow { text-transform: uppercase; letter-spacing: .14em; font-size: .78rem; color: var(--sand); margin: 0 0 12px; font-weight: 600; }
.hero h1 { max-width: 18ch; }
.hero h1 span { color: var(--sand); font-style: italic; font-weight: 500; }
.hero .lede { color: rgba(255, 255, 255, .82); }
.stats { display: flex; gap: 40px; margin: 28px 0 0; flex-wrap: wrap; }
.stats dt { font-size: .78rem; text-transform: uppercase; letter-spacing: .1em; color: rgba(255, 255, 255, .65); }
.stats dd { margin: 2px 0 0; font: 650 1.9rem var(--serif); }

/* Explorer */
.explorer { margin-top: -24px; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 12px; position: relative; z-index: 5; margin: 0 auto; width: calc(100% - 32px); max-width: calc(1600px - 32px); }
.filters label { flex: 1 1 150px; }
.filters .f-search { flex: 2 1 260px; }
.filters input, .filters select { width: 100%; height: 44px; border: 1px solid var(--line); border-radius: 10px; padding: 0 12px; font: inherit; background: #fff; color: var(--ink); }
.filters input:focus, .filters select:focus, .form input:focus, .form select:focus, .form textarea:focus { outline: 2px solid var(--sand); outline-offset: 1px; border-color: var(--sand); }
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 20px; max-width: 1600px; margin: 16px auto 0; padding: 0 16px; }
.count { color: var(--muted); font-size: .92rem; margin: 4px 0 12px; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.cards-3 { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.map-pane { position: sticky; top: 80px; height: calc(100vh - 96px); }
.bigmap { width: 100%; height: 100%; border-radius: var(--radius); box-shadow: var(--shadow); background: #dfe7e4; }
.bigmap-area { height: 460px; margin-bottom: 24px; }
.view-toggle { display: none; }
.empty { padding: 24px; text-align: center; color: var(--muted); }

/* Cards */
.card { display: flex; flex-direction: column; background: var(--card); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); color: var(--ink); text-decoration: none; transition: transform .15s, box-shadow .15s; }
.card:hover { transform: translateY(-2px); box-shadow: 0 2px 4px rgba(23, 32, 31, .08), 0 14px 32px rgba(23, 32, 31, .12); }
.card-img { position: relative; aspect-ratio: 16 / 10; background: #cfd8d4; overflow: hidden; }
.card-img img { width: 100%; height: 100%; object-fit: cover; }
.card-img.is-sat img { transform: scale(1.25); filter: saturate(1.05) contrast(1.03); }
.badge { position: absolute; top: 10px; left: 10px; padding: 3px 10px; border-radius: 999px; font-size: .74rem; font-weight: 600; background: #fff; color: var(--ink); }
.badge-lease { left: auto; right: 10px; background: var(--teal); color: #fff; }
.badge-available { background: #e3f2e7; color: var(--green); }
.badge-under_offer { background: var(--sand-soft); color: #7a5410; }
.badge-sold, .badge-leased { background: #f4dcd6; color: var(--red); }
.badge-hidden { background: #e8e8e8; color: #555; }
.prop-price .badge, .table .badge { position: static; display: inline-block; }
.card-body { padding: 14px 16px 16px; display: flex; flex-direction: column; flex: 1; }
.card-type { margin: 0 0 4px; font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 600; }
.card h3 { font-size: 1.15rem; margin: 0 0 4px; }
.card-addr { margin: 0 0 12px; color: var(--muted); font-size: .9rem; }
.card-foot { margin-top: auto; display: flex; justify-content: space-between; align-items: baseline; gap: 8px; border-top: 1px solid var(--line); padding-top: 10px; font-size: .9rem; color: var(--muted); }
.price { font: 650 1.15rem var(--serif); color: var(--teal); }

/* Map pins */
.pin { background: none; border: 0; }
.pin span { display: inline-block; transform: translate(-50%, -100%); margin-top: -6px; padding: 4px 9px; border-radius: 999px; background: var(--t-land); color: #fff; font: 600 12px/1.2 var(--sans);
  white-space: nowrap; box-shadow: 0 2px 6px rgba(0, 0, 0, .3); border: 2px solid #fff; position: relative; }
.pin span::after { content: ''; position: absolute; left: 50%; bottom: -7px; margin-left: -5px; border: 5px solid transparent; border-top-color: #fff; border-bottom: 0; }
.pin-land_building span { background: var(--t-land_building); }
.pin-residential span { background: var(--t-residential); }
.pin-commercial span { background: var(--t-commercial); }
.pin-condominium span { background: var(--t-condominium); }
.pin-muted span { opacity: .75; }
.pin.is-active span { background: var(--sand); color: var(--teal); transform: translate(-50%, -100%) scale(1.15); }
.pin-solo span { transform: none; margin: 0; width: 22px; height: 22px; padding: 0; background: var(--sand); border: 3px solid #fff; }
.pin-solo span::after { display: none; }
.pin-cluster { background: none; }
.pin-cluster span { display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 50%; background: var(--teal); color: #fff; font-weight: 700; border: 3px solid #fff; box-shadow: 0 0 0 5px rgba(15, 59, 58, .25), 0 2px 8px rgba(0, 0, 0, .3); }
.leaflet-popup-content-wrapper { border-radius: 12px; padding: 0; overflow: hidden; }
.leaflet-popup-content { margin: 0; width: 260px !important; }
.pop { display: block; color: var(--ink); text-decoration: none; }
.pop-img { display: block; height: 120px; overflow: hidden; background: #cfd8d4; }
.pop-img img { width: 100%; height: 100%; object-fit: cover; }
.pop-img.is-sat img { transform: scale(1.25); }
.pop-body { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px 12px; font-size: .85rem; }
.pop-body strong { font: 650 1rem var(--serif); }
.pop-type { font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 600; }
.pop-addr { color: var(--muted); }
.pop-price { font: 650 1rem var(--serif); color: var(--teal); margin-top: 4px; }

/* Bands */
.areas-band { padding: 56px 0 16px; }
.area-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.area-tile { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 16px; text-decoration: none; color: var(--ink); display: flex; flex-direction: column; }
.area-tile:hover { border-color: var(--teal-2); }
.area-tile strong { font: 650 1.05rem var(--serif); }
.area-tile span { color: var(--muted); font-size: .9rem; }
.cta-band { margin: 48px 0 0; background: var(--sand-soft); padding: 40px 0; }
.cta-row { display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; }
.cta-row p { margin: 0; color: var(--muted); }
.cta-buttons { display: flex; gap: 10px; flex-wrap: wrap; }

/* Property page */
.crumbs { padding-top: 20px; font-size: .88rem; color: var(--muted); }
.crumbs a { color: var(--muted); }
.prop { padding-bottom: 48px; }
.prop-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap; margin: 16px 0 24px; }
.prop-head h1 { margin-bottom: 6px; }
.prop-addr { margin: 0; color: var(--muted); font-size: 1.05rem; }
.prop-price { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.prop-price strong { font: 650 clamp(1.5rem, 3vw, 2.1rem) var(--serif); color: var(--teal); }
.prop-price > span:last-child { color: var(--muted); font-size: .9rem; }
.prop-grid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 32px; align-items: start; }
.gallery { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 20px; }
.gallery a { aspect-ratio: 4 / 3; overflow: hidden; border-radius: 10px; }
.gallery a.g-main { grid-column: span 4; aspect-ratio: 16 / 9; }
.gallery img { width: 100%; height: 100%; object-fit: cover; }
.propmap { height: 420px; border-radius: var(--radius); box-shadow: var(--shadow); }
.map-note { font-size: .85rem; color: var(--muted); margin: 8px 0 0; }
.facts { margin-top: 32px; }
.facts dl { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; margin: 0; }
.facts dl div { background: var(--card); padding: 14px 16px; }
.facts dt { font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 600; }
.facts dd { margin: 2px 0 0; font-weight: 600; }
.about-prop { margin-top: 32px; }
.highlight { font-size: 1.15rem; border-left: 4px solid var(--sand); padding-left: 16px; }
.prop-side { position: sticky; top: 84px; }
.enquire { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 24px; }
.enquire h2 { font-size: 1.35rem; }
.or { text-align: center; color: var(--muted); font-size: .88rem; margin: 14px 0 6px; }
.form label { display: block; font-size: .88rem; font-weight: 600; margin-bottom: 12px; color: var(--ink); }
.form input, .form select, .form textarea { display: block; width: 100%; margin-top: 4px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; font: 400 1rem var(--sans); background: #fff; color: var(--ink); }
.form textarea { resize: vertical; }
.form .hp { position: absolute; left: -9999px; }
.ok { background: #e3f2e7; color: var(--green); padding: 14px 16px; border-radius: 10px; }
.err, .flash { background: #f9e5df; color: var(--red); padding: 10px 14px; border-radius: 10px; }
.flash { background: #e3f2e7; color: var(--green); }
.similar { margin-top: 56px; }

/* Area, contact, 404 */
.area-head { margin: 16px 0 24px; }
.area-cards { margin-bottom: 48px; }
.contact { display: grid; grid-template-columns: 1fr 420px; gap: 48px; padding-top: 48px; padding-bottom: 64px; align-items: start; }
.notfound { padding: 80px 16px; }

/* Footer */
.site-footer { background: var(--teal); color: rgba(255, 255, 255, .8); padding: 40px 0; margin-top: 0; font-size: .92rem; }
.site-footer a { color: #fff; }
.footer-grid { display: grid; grid-template-columns: 1.2fr 1fr 1.2fr; gap: 32px; }
.footer-brand { font: 650 1.15rem var(--serif); color: #fff; margin-top: 0; }
.footer-h { font-weight: 600; color: #fff; margin-top: 0; }
.footer-areas { list-style: none; padding: 0; margin: 0; columns: 2; }
.footer-small { font-size: .82rem; color: rgba(255, 255, 255, .6); }

/* Admin */
.admin-main { padding-top: 24px; padding-bottom: 64px; }
.admin-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.admin-head small { color: var(--muted); font: 400 1rem var(--sans); }
.admin-head > div { display: flex; gap: 8px; }
.table-wrap { overflow-x: auto; background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); }
.table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.table th, .table td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; }
.table th { font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.table .num { text-align: right; }
.tag { display: inline-block; font-size: .72rem; background: var(--sand-soft); color: #7a5410; padding: 1px 8px; border-radius: 999px; font-weight: 600; }
.admin-form { background: var(--card); padding: 24px; border-radius: var(--radius); box-shadow: var(--shadow); }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.check { display: flex !important; align-items: center; gap: 8px; }
.check input { width: auto; margin: 0; }
fieldset.pinbox { border: 1px solid var(--line); border-radius: 12px; padding: 16px; margin: 16px 0; }
.pinmap { height: 380px; border-radius: 10px; margin-bottom: 12px; }
.hint { color: var(--muted); font-size: .9rem; }
.photos-admin { margin-top: 32px; }
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; margin-bottom: 16px; }
.photo-grid figure { margin: 0; background: var(--card); border-radius: 10px; overflow: hidden; box-shadow: var(--shadow); }
.photo-grid img { aspect-ratio: 4 / 3; object-fit: cover; width: 100%; }
.photo-grid figcaption { display: flex; justify-content: space-between; padding: 8px 10px; font-size: .85rem; }
.photo-grid form { margin: 0; }
.upload { background: var(--card); padding: 16px; border-radius: var(--radius); box-shadow: var(--shadow); }
.delete-form { margin-top: 32px; }
.login-box { max-width: 380px; margin: 48px auto; background: var(--card); padding: 28px; border-radius: var(--radius); box-shadow: var(--shadow); }
.enq-list { display: grid; gap: 12px; }
.enq { background: var(--card); border-radius: 12px; box-shadow: var(--shadow); padding: 16px 18px; }
.enq.is-done { opacity: .6; }
.enq header { display: flex; gap: 12px; flex-wrap: wrap; align-items: baseline; font-size: .9rem; color: var(--muted); }
.enq header strong { color: var(--ink); font-size: 1.05rem; }
.enq-contact { display: flex; gap: 16px; flex-wrap: wrap; }
.enq form { margin: 0; }

/* Responsive */
@media (max-width: 1100px) {
  .split { grid-template-columns: 1fr 1fr; }
  .cards { grid-template-columns: 1fr; }
  .list-pane .card { flex-direction: row; }
  .list-pane .card-img { aspect-ratio: auto; width: 38%; flex: none; min-height: 150px; }
}
@media (max-width: 860px) {
  .nav > a:not(.btn) { display: none; }
  .brand span { font-size: .98rem; }
  .brand em { display: none; }
  .hero { padding: 28px 0 44px; }
  .hero .lede { font-size: 1rem; }
  .nav { gap: 12px; }
  .stats { gap: 24px; }
  .stats dd { font-size: 1.5rem; }
  .filters .f-search { flex-basis: 100%; }
  .filters label { flex: 1 1 calc(50% - 4px); }
  .view-toggle { display: flex; gap: 4px; margin: 12px 16px 0; background: var(--card); border-radius: 999px; padding: 4px; box-shadow: var(--shadow); }
  .view-toggle button { flex: 1; border: 0; border-radius: 999px; padding: 8px; background: none; font: 600 .95rem var(--sans); color: var(--ink); cursor: pointer; }
  .view-toggle button[aria-pressed="true"] { background: var(--teal); color: #fff; }
  .split { display: block; }
  .map-pane { display: none; position: static; height: 70vh; }
  body.show-map .map-pane { display: block; }
  body.show-map .list-pane { display: none; }
  .prop-grid, .contact { grid-template-columns: 1fr; }
  .prop-side { position: static; }
  .prop-price { align-items: flex-start; }
  .propmap { height: 300px; }
  .footer-grid { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  .gallery { grid-template-columns: repeat(3, 1fr); }
  .gallery a.g-main { grid-column: span 3; }
}
@media (max-width: 480px) {
  .list-pane .card { flex-direction: column; }
  .list-pane .card-img { width: 100%; aspect-ratio: 16 / 10; min-height: 0; }
  .cta-buttons .btn { flex: 1; }
}
