:root {
  --ink: #1d2b2a;
  --muted: #60706e;
  --cream: #fbfaf6;
  --accent: #b86b3d;
  --accent-dark: #94512d;
  --line: #deded7;
  --shadow: 0 18px 45px rgba(26, 40, 38, .18);
}

* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); font-family: "DM Sans", sans-serif; background: var(--cream); }
button, a { font: inherit; }
button { cursor: pointer; }
.map-page, #map { min-height: 100dvh; }
#map { position: fixed; inset: 0; z-index: 0; background: #d8e2dc; }
.maplibregl-ctrl-group { border-radius: 4px !important; box-shadow: var(--shadow) !important; }
.maplibregl-ctrl-attrib { font-family: "DM Sans", sans-serif !important; font-size: 10px !important; }
.map-project-pin { display: flex; align-items: center; gap: 9px; padding: 8px 12px 8px 8px; border: 2px solid #fff; border-radius: 4px; color: var(--ink); background: rgba(255,255,255,.96); box-shadow: 0 5px 16px rgba(38, 50, 43, .18); font: 700 12px "DM Sans", sans-serif; white-space: nowrap; }
.map-project-pin span { width: 17px; height: 17px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); background: var(--accent); }
.map-project-pin.is-active { border-color: var(--accent); }
.project-picker { display: grid; gap: 5px; padding: 10px 14px; border-radius: 5px; background: var(--cream); box-shadow: var(--shadow); font-size: 11px; color: var(--muted); }
.project-picker select { max-width: 230px; border: 0; background: transparent; color: var(--ink); font: 600 14px 'DM Sans', sans-serif; padding: 4px 0; }
.detail-panel-inner { height: 100dvh; min-height: 0; }
.topbar { position: fixed; z-index: 2; top: 22px; left: 28px; right: 28px; display: flex; justify-content: space-between; align-items: center; pointer-events: none; }
.topbar > * { pointer-events: auto; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-size: 13px; font-weight: 700; letter-spacing: .09em; }
.brand small { display: block; margin-top: 2px; font-size: 8px; font-weight: 500; letter-spacing: .14em; color: var(--muted); }
.brand-mark { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: var(--ink); color: white; font: 700 22px "Playfair Display", serif; letter-spacing: 0; }
.list-button, .details-button, .enquiry-button { border: 0; color: white; background: var(--ink); text-decoration: none; font-weight: 600; transition: background .2s ease, transform .2s ease; }
.list-button { padding: 12px 16px; border-radius: 4px; font-size: 14px; }
.list-button span, .details-button span, .enquiry-button span { margin-left: 12px; font-size: 18px; line-height: 0; }
.list-button:hover, .details-button:hover, .enquiry-button:hover { background: var(--accent-dark); transform: translateY(-1px); }

.map-intro { position: fixed; z-index: 1; top: 128px; left: 28px; width: min(410px, calc(100% - 56px)); padding: 0 0 0 1px; pointer-events: none; }
.eyebrow { margin: 0 0 9px; color: var(--accent-dark); font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
h1, h2, h3 { margin: 0; font-family: "Playfair Display", serif; font-weight: 600; }
.map-intro h1 { max-width: 390px; font-size: clamp(32px, 4vw, 54px); line-height: 1.04; letter-spacing: -.035em; }
.map-intro > p:last-child { max-width: 335px; color: var(--muted); font-size: 15px; line-height: 1.55; }

.project-card { position: fixed; z-index: 3; right: 28px; bottom: 36px; width: min(350px, calc(100% - 56px)); padding: 25px; background: rgba(255,255,255,.97); box-shadow: var(--shadow); border-radius: 7px; }
.card-status { display: inline-block; margin-bottom: 11px; color: var(--accent-dark); font-size: 10px; font-weight: 700; letter-spacing: .12em; }
.project-card h2 { font-size: 30px; letter-spacing: -.025em; }
.location { margin: 6px 0 17px; color: var(--muted); font-size: 14px; }
.price { margin: 0 0 19px; font-size: 18px; font-weight: 700; }
.facts { display: grid; gap: 11px; margin-bottom: 22px; padding-top: 17px; border-top: 1px solid var(--line); }
.facts div { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.facts span { color: var(--muted); font-size: 12px; }
.facts strong { text-align: right; font-size: 12px; }
.details-button { display: flex; justify-content: space-between; align-items: center; width: 100%; padding: 13px 15px; border-radius: 3px; }
.close-button { position: absolute; top: 11px; right: 14px; z-index: 2; border: 0; background: transparent; color: var(--muted); font-size: 28px; line-height: 1; }

.detail-panel { position: fixed; z-index: 5; inset: 0; display: grid; justify-items: end; background: rgba(22, 32, 30, .35); opacity: 0; pointer-events: none; transition: opacity .24s ease; }
.detail-panel.is-open { opacity: 1; pointer-events: auto; }
.detail-panel-inner { width: min(780px, 100%); min-height: 100%; overflow-y: auto; padding: 66px clamp(24px, 6vw, 72px) 38px; background: var(--cream); transform: translateX(34px); transition: transform .24s ease; }
.detail-panel.is-open .detail-panel-inner { transform: translateX(0); }
.panel-close { top: 27px; right: 30px; color: var(--ink); }
.detail-heading { padding-bottom: 28px; border-bottom: 1px solid var(--line); }
.detail-heading h2 { font-size: clamp(40px, 6vw, 65px); line-height: 1; letter-spacing: -.04em; }
.detail-subtitle { max-width: 470px; margin: 16px 0 0; color: var(--muted); font-size: 16px; line-height: 1.55; }
.detail-grid { display: grid; grid-template-columns: minmax(210px, .8fr) minmax(270px, 1.2fr); gap: clamp(28px, 5vw, 62px); padding: 32px 0 38px; }
.project-specs { margin: 0; }
.project-specs div { padding: 13px 0; border-bottom: 1px solid var(--line); }
dt { margin-bottom: 5px; color: var(--muted); font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
dd { margin: 0; font-size: 14px; line-height: 1.45; }
.layout-card { margin: 0; }
.layout-card img { display: block; width: 100%; border-radius: 3px; }
.layout-card figcaption { margin-top: 11px; color: var(--muted); font-size: 12px; line-height: 1.45; }
.layout-card h3 { margin-bottom: 12px; font-size: 25px; }
.layout-choices { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.layout-choices button { padding: 7px 9px; border: 1px solid var(--line); border-radius: 4px; background: white; color: var(--ink); font-size: 12px; }
.layout-choices button[aria-pressed="true"] { background: var(--ink); color: white; }
.layout-preview { display: block; padding: 0; width: 100%; border: 1px solid var(--line); background: white; color: var(--muted); }
.layout-preview span { display: block; padding: 9px; font-size: 12px; }
.layout-placeholder { padding: 28px 20px; border: 1px dashed var(--line); color: var(--muted); font-size: 14px; line-height: 1.6; }
.layout-dialog { width: min(1200px, 96vw); max-height: 94dvh; padding: 18px; border: 0; border-radius: 8px; background: var(--cream); }
.layout-dialog::backdrop { background: rgba(10, 20, 20, .8); }
.layout-dialog form { position: sticky; top: 0; text-align: right; }
.layout-dialog button { padding: 10px 16px; border: 0; border-radius: 4px; color: white; background: var(--ink); }
.layout-dialog img { display: block; width: 100%; height: auto; }
.map-project-pin.is-approximate { border-style: dashed; }
.map-project-pin b { font-weight: 700; max-width: 240px; overflow: hidden; text-overflow: ellipsis; }
.overview .map-project-pin:not(.is-active):not(:hover):not(:focus-visible) b { display: none; }
[hidden] { display: none !important; }
.enquiry { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 24px; color: #fff; background: var(--ink); }
.enquiry .eyebrow { color: #d4a180; }
.enquiry h3 { font-size: 25px; line-height: 1.1; }
.enquiry-button { white-space: nowrap; padding: 12px 15px; background: var(--accent); border-radius: 3px; }
.notice { margin: 11px 0 0; color: var(--muted); font-size: 11px; }
.map-footer { position: fixed; z-index: 1; bottom: 12px; left: 28px; color: #52615e; font-size: 11px; }

@media (max-width: 720px) {
  .topbar { top: 14px; left: 16px; right: 16px; }
  .brand { font-size: 11px; }
  .project-picker { padding: 7px 10px; }
  .project-picker select { max-width: 155px; font-size: 12px; }
  .brand small { display: block; }
  .brand-mark { width: 34px; height: 34px; }
  .list-button { padding: 10px 12px; font-size: 12px; }
  .map-intro { top: 94px; left: 18px; width: min(330px, calc(100% - 36px)); }
  .map-intro h1 { font-size: 34px; }
  .map-intro > p:last-child { font-size: 13px; }
  .project-card { right: 16px; bottom: 20px; width: calc(100% - 32px); padding: 20px; }
  .project-card h2 { font-size: 27px; }
  .facts { grid-template-columns: 1fr 1fr; gap: 10px 20px; }
  .facts div { display: block; }
  .facts strong { display: block; margin-top: 3px; text-align: left; }
  .detail-panel-inner { padding: 62px 22px 26px; }
  .detail-grid { grid-template-columns: 1fr; }
  .enquiry { display: block; }
  .enquiry-button { display: inline-block; margin-top: 18px; }
  .map-footer { display: none; }
}
