:root {
  /* Warm editorial palette: cream and sand, mangrove green, terracotta accent */
  --cream: #F6F1E8;
  --paper: #FFFCF7;
  --sand: #EFE6D6;
  --ink: #26312E;
  --muted: #6E655A;
  --line: #E3D9C9;
  --mangrove: #1F5A47;
  --mangrove-dark: #17463A;
  --accent: #BF5F37;
  --shadow: rgba(70, 50, 30, 0.10);
  --forest: #173F33;          /* header and footer bands */
  --on-forest: #F6F1E8;
  --on-forest-muted: #C9D6CF;
  --accent-light: #EBA884;    /* terracotta on dark green */
  --tile: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='16' viewBox='0 0 32 16'%3E%3Cpath d='M16 1 L23 8 L16 15 L9 8 Z' fill='none' stroke='%23F6F1E8' stroke-width='1.3'/%3E%3Ccircle cx='16' cy='8' r='2.2' fill='%23EBA884'/%3E%3Ccircle cx='0' cy='8' r='3.2' fill='%23EBA884'/%3E%3Ccircle cx='32' cy='8' r='3.2' fill='%23EBA884'/%3E%3C/svg%3E");
  --error: #A3342A;
  --gutter: clamp(16px, 4vw, 48px);
  --measure: 68ch;
  --font: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.55;
}
a { color: var(--mangrove); text-underline-offset: 0.18em; }
a:hover { color: var(--mangrove-dark); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
h1, h2, h3 { line-height: 1.1; margin: 0; }
/* Headings: a soft, friendly serif */
h1, h2, h3, .wordmark, .serif {
  font-family: var(--serif); font-variation-settings: "SOFT" 60; font-optical-sizing: auto;
}
p { margin: 0; }

.skip { position: absolute; left: -9999px; }
.skip:focus { left: var(--gutter); top: 8px; background: var(--paper); padding: 8px 12px; z-index: 10; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Header and footer */
.site-header {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 18px var(--gutter);
  border-bottom: 1px solid var(--line);
}
.wordmark {
  font-weight: 600; font-size: 1.4rem; letter-spacing: -0.01em;
  color: var(--ink); text-decoration: none;
}
.site-nav { margin-left: auto; }
.wordmark, .nav-areas summary, .header-cta { white-space: nowrap; }
.narrow-only { display: none; }
.nav-areas { position: relative; }
.nav-areas summary {
  list-style: none; cursor: pointer; font-weight: 600; color: var(--ink);
  padding: 10px 4px; display: flex; align-items: center; gap: 6px;
}
.nav-areas summary::-webkit-details-marker { display: none; }
.nav-areas summary::after {
  content: ''; width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
  transform: translateY(-2px) rotate(45deg); transition: transform 0.15s;
}
.nav-areas[open] summary::after { transform: translateY(2px) rotate(-135deg); }
.nav-areas summary:hover { color: var(--mangrove-dark); }
.nav-panel {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 20;
  display: grid; grid-template-columns: repeat(2, max-content); gap: 28px;
  background: var(--paper); border: 1px solid var(--line); border-radius: 12px;
  padding: 20px 24px; box-shadow: 0 12px 32px var(--shadow);
}
.nav-areas:not([open]) .nav-panel { display: none; }
.nav-group-label { margin: 0 0 8px; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.nav-group ul { list-style: none; margin: 0; padding: 0; }
.nav-group a { display: block; padding: 5px 0; color: var(--ink); text-decoration: none; white-space: nowrap; }
.nav-group a:hover { color: var(--mangrove-dark); text-decoration: underline; }
.header-cta, .send {
  display: inline-block; font: inherit; font-weight: 600;
  background: var(--mangrove); color: #fff; text-decoration: none;
  border: 0; border-radius: 999px; padding: 10px 18px; cursor: pointer;
}
.header-cta:hover, .send:hover { background: var(--mangrove-dark); color: #fff; }

.site-footer {
  position: relative; margin-top: 112px; padding: 44px var(--gutter) 48px;
  background: var(--sand);
  color: var(--muted); font-size: 0.875rem;
}
.site-footer p { max-width: var(--measure); margin-bottom: 8px; }
/* A band of Penang-inspired tile pattern along the top of the footer */
.site-footer::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 16px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='16' viewBox='0 0 32 16'%3E%3Cpath d='M16 1 L23 8 L16 15 L9 8 Z' fill='none' stroke='%231F5A47' stroke-width='1.2'/%3E%3Ccircle cx='16' cy='8' r='2' fill='%23BF5F37'/%3E%3Ccircle cx='0' cy='8' r='3' fill='%23BF5F37' fill-opacity='.55'/%3E%3Ccircle cx='32' cy='8' r='3' fill='%23BF5F37' fill-opacity='.55'/%3E%3C/svg%3E") repeat-x left center;
  opacity: 0.55;
}

main { padding: 0 var(--gutter); }

/* Hero */
.hero { padding: clamp(40px, 8vw, 96px) 0 clamp(28px, 4vw, 48px); }
.hero-with-map { display: grid; grid-template-columns: minmax(0, 1fr) minmax(260px, 380px); gap: clamp(32px, 5vw, 72px); align-items: center; max-width: none; }
.hero h1 {
  font-size: clamp(2.6rem, 6.4vw, 5.25rem);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 0.98;
  max-width: 11ch;
}
.hero h1 em { font-style: italic; font-weight: 400; color: var(--mangrove); }
.stats { display: flex; flex-wrap: wrap; gap: 6px 0; margin-top: 22px; font-weight: 600; font-size: 1.1875rem; color: var(--mangrove-dark); }
.stats span { white-space: nowrap; }
.stats span + span::before { content: '·'; margin: 0 10px; color: var(--muted); }
.hero .lede { margin-top: 14px; }
.hero-map .area-map { box-shadow: 0 10px 30px var(--shadow); }
.map-count { fill: var(--mangrove); stroke: var(--paper); stroke-width: 2; transition: fill 0.15s; }
.map-count-num { font-size: 11px; font-weight: 700; fill: #fff; pointer-events: none; }
.map-count-link:hover .map-count, .map-count-link:focus-visible .map-count { fill: var(--accent); }
.map-count-link:focus-visible .map-count { stroke: var(--ink); }
.list-note { margin: 0 0 12px; font-size: 0.875rem; color: var(--muted); max-width: var(--measure); }

/* Featured project */
.featured {
  display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 0;
  margin: 8px 0 clamp(40px, 6vw, 64px); background: var(--paper); border: 1px solid var(--line); border-radius: 16px; overflow: hidden;
}
.featured-photo { display: block; min-height: 300px; }
.featured-photo img { display: block; width: 100%; height: 100%; object-fit: cover; }
.featured-body { padding: clamp(24px, 3.5vw, 40px); display: flex; flex-direction: column; justify-content: center; }
.eyebrow { margin: 0 0 8px; font-size: 0.8125rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); }
.featured h2 { font-size: clamp(1.75rem, 3.5vw, 2.75rem); font-weight: 560; line-height: 1.02; letter-spacing: -0.01em; }
.featured h2 a { color: var(--ink); text-decoration: none; }
.featured h2 a:hover { text-decoration: underline; text-decoration-thickness: 2px; }
.featured .row-summary { margin-top: 10px; }
.featured-note { margin-top: 10px; }
.featured .price { margin-top: 18px; }
.featured-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; margin-top: 20px; }
.featured-more { font-weight: 600; color: var(--mangrove-dark); }
.lede { margin-top: 24px; max-width: 54ch; font-size: 1.1875rem; color: var(--ink); }

/* Filters */
.filters {
  display: flex; flex-wrap: wrap; align-items: end; gap: 12px 20px;
  padding: 20px 0; border-top: 1px solid #CDBFA9;
}
.filters label { display: grid; gap: 4px; font-size: 0.875rem; color: var(--muted); }
select, input {
  font: inherit; font-size: 1rem; color: var(--ink);
  background: var(--paper); border: 1px solid var(--line); border-radius: 6px;
  padding: 9px 10px; min-height: 44px;
}
.count { margin-left: auto; font-size: 0.875rem; color: var(--muted); }


.no-photo { display: grid; place-items: center; height: 100%; padding: 8px; text-align: center; font-size: 0.75rem; color: var(--muted); }
.row-summary { margin-top: 6px; color: var(--ink); }
.notice-affordable { margin-top: 16px; max-width: var(--measure); padding: 12px 14px; background: var(--paper); border-left: 3px solid var(--mangrove); font-size: 0.9375rem; }
.price { font-weight: 650; font-variant-numeric: tabular-nums; }

.empty { padding: 32px 0; font-size: 1.125rem; }

/* Project page */
.back { padding-top: 24px; font-size: 0.9375rem; }
.project-head { padding: 32px 0 40px; border-bottom: 1px solid #CDBFA9; }
.part-of { color: var(--muted); font-weight: 600; margin-bottom: 4px; }
.project-head h1 {
  font-size: clamp(2.5rem, 7vw, 5rem); font-weight: 520;
  letter-spacing: -0.02em; line-height: 0.98;
}
.project-head .row-summary { margin-top: 14px; max-width: var(--measure); }
.price-large { font-size: clamp(1.5rem, 3vw, 2rem); margin: 24px 0 14px; }

.hero-photo { margin: 32px 0 0; }
.hero-photo img { display: block; width: 100%; height: auto; max-height: 560px; object-fit: cover; border-radius: 12px; }
.gallery { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
.gallery a { display: block; border-radius: 8px; overflow: hidden; }
.gallery img { display: block; width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; }

.project-body {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, 380px); gap: 48px; padding-top: 40px;
}
.project-body h2 { font-size: 1.5rem; font-weight: 560; margin: 36px 0 12px; }
.project-body section > h2:first-child { margin-top: 0; }

.facts { margin: 0; display: grid; grid-template-columns: 1fr; }
.facts div { display: grid; grid-template-columns: 11rem 1fr; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; }

.highlights { margin: 0; padding-left: 1.2em; max-width: var(--measure); }
.highlights li { margin-bottom: 6px; }

.table-wrap { overflow-x: auto; }
.units { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.units th, .units td { text-align: left; padding: 10px 12px 10px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.units thead th { color: var(--muted); font-weight: 500; font-size: 0.875rem; }
.units tbody th { font-weight: 600; }

.data-date { margin-top: 20px; color: var(--muted); font-size: 0.875rem; max-width: var(--measure); }

.side { display: grid; gap: 24px; align-content: start; }
.panel { background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 24px; }
.panel h2 { margin-top: 0; }
.panel > p { margin-bottom: 16px; color: var(--muted); font-size: 0.9375rem; }
.panel form { display: grid; gap: 14px; }
.panel label { display: grid; gap: 4px; font-size: 0.9375rem; }
.panel input, .panel select { width: 100%; }
.enquiry { border-top: 4px solid var(--mangrove); }
.send { text-align: center; padding: 12px 18px; }
.notice { font-size: 0.8125rem; color: var(--muted); margin-top: -6px; }
.details { border: 0; border-top: 1px solid var(--line); margin: 6px 0 0; padding: 16px 0 0; display: grid; gap: 14px; min-width: 0; }
.details legend { padding: 0; font-size: 0.875rem; color: var(--muted); float: left; width: 100%; margin-bottom: 4px; }
.chip-group { display: grid; gap: 6px; }
.chip-label { font-size: 0.875rem; font-weight: 600; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.panel .chip { display: inline-flex; position: relative; }
.chip input { position: absolute; opacity: 0; width: 1px; height: 1px; min-height: 0; }
.chip span {
  display: inline-block; padding: 7px 12px; border: 1px solid var(--line); border-radius: 999px;
  font-size: 0.875rem; background: var(--paper); color: var(--ink); cursor: pointer;
}
.chip input:checked + span { background: var(--mangrove); border-color: var(--mangrove); color: #fff; }
.chip input:focus-visible + span { outline: 3px solid var(--accent); outline-offset: 2px; }
.panel .result { margin: 16px 0 0; color: var(--ink); font-size: 1.5rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.panel .note { margin: 6px 0 0; color: var(--muted); font-size: 0.8125rem; }

.prose { max-width: var(--measure); padding-top: 48px; }
.prose h1 { font-size: clamp(2.25rem, 6vw, 3.75rem); font-weight: 520; margin-bottom: 20px; }
.prose h2 { font-size: 1.5rem; font-weight: 560; margin: 28px 0 8px; }
.prose p { margin-bottom: 12px; }

@media (max-width: 820px) {
  .count { margin-left: 0; width: 100%; }
  .project-body { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .facts div { grid-template-columns: 1fr; gap: 2px; }
}
/* Area guides */
.area-link { margin-top: 10px; font-size: 0.9375rem; }
.area-link a { color: var(--mangrove-dark); font-weight: 600; }
.area-guide .lede { max-width: var(--measure); }
.area-head { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 48px; align-items: end; }
.area-map-figure { margin: 0; }
.area-map { display: block; width: 100%; height: auto; border-radius: 12px; border: 1px solid var(--line); }
.area-map-figure figcaption { margin-top: 6px; font-size: 0.75rem; color: var(--muted); }
.map-dot { fill: #B9AA93; transition: fill 0.15s; }
.map-hit { fill: transparent; }
.map-link { cursor: pointer; outline: none; }
.map-link:hover .map-dot, .map-link:focus-visible .map-dot { fill: var(--mangrove); }
.map-link:focus-visible .map-hit { fill: none; stroke: var(--accent); stroke-width: 2.5; }
.map-hover-label { font-size: 13px; font-weight: 600; fill: var(--mangrove-dark); paint-order: stroke; stroke: var(--paper); stroke-width: 4px; stroke-linejoin: round; opacity: 0; pointer-events: none; transition: opacity 0.12s; }
.map-link:hover .map-hover-label, .map-link:focus-visible .map-hover-label { opacity: 1; }
.map-ring { fill: var(--accent); fill-opacity: 0.22; }
.map-active { fill: var(--accent); stroke: var(--paper); stroke-width: 2.5; }
.map-label { font-size: 15px; font-weight: 700; fill: var(--ink); paint-order: stroke; stroke: var(--paper); stroke-width: 4px; stroke-linejoin: round; }
.area-body { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 56px; align-items: start; }
.area-body .prose { padding-top: 32px; }
.area-body .prose ul { padding-left: 1.2em; margin: 0; }
.area-body .prose li { margin-bottom: 8px; }
.area-projects { margin-top: 40px; background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 24px; position: sticky; top: 24px; }
.area-projects h2 { font-size: 1.375rem; font-weight: 560; margin-bottom: 12px; }
.area-projects ul { list-style: none; margin: 0 0 20px; padding: 0; }
.area-projects li a { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.area-projects li a:hover .ap-name { text-decoration: underline; }
.ap-name { font-weight: 600; }
.ap-price { color: var(--muted); white-space: nowrap; font-size: 0.9375rem; }
.area-projects .send { display: flex; }
.area-sources { margin-top: 56px; padding-top: 24px; border-top: 1px solid var(--line); max-width: var(--measure); font-size: 0.875rem; color: var(--muted); }
.area-sources h2 { font-size: 1rem; color: var(--ink); margin-bottom: 6px; }
.area-sources ul { padding-left: 1.2em; }
@media (max-width: 560px) {
  .wide-only { display: none; }
  .narrow-only { display: inline; }
  .site-header { gap: 10px; }
  .header-cta { padding: 8px 14px; font-size: 0.9375rem; }
  .nav-areas { position: static; }
  .site-header { position: relative; }
  .nav-panel { left: var(--gutter); right: var(--gutter); top: calc(100% - 4px); grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; padding: 16px 18px; }
  .nav-group a { white-space: normal; }
}
@media (max-width: 370px) {
  .site-header { gap: 6px; }
  .wordmark { font-size: 1.02rem; }
  .header-cta { padding: 7px 11px; font-size: 0.875rem; }
  .nav-areas summary { font-size: 0.9375rem; }
  .hero .stats { font-size: 0.9375rem; }
  .hero .stats span + span::before { margin: 0 5px; }
}
@media (max-width: 820px) {
  .hero-with-map { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .stats { font-size: 1.0625rem; }
  .stats span + span::before { margin: 0 7px; }
  .hero-map { max-width: 340px; }
  .featured { grid-template-columns: minmax(0, 1fr); }
  .featured-photo { min-height: 0; aspect-ratio: 16 / 10; }
  .area-body { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .area-head { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .area-map-figure { max-width: 320px; }
  .area-projects { position: static; }
  .area-projects li a { flex-direction: column; gap: 2px; }
  .ap-price { white-space: normal; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}

/* ===== Forest-green header and footer, edged with Penang tile ===== */
.site-header { background: var(--forest); border-bottom: 0; }
.wordmark, .wordmark:hover { color: var(--on-forest); }
.site-header .nav-areas summary { color: var(--on-forest); }
.site-header .nav-areas summary:hover { color: var(--accent-light); }
.site-header .header-cta { background: var(--on-forest); color: var(--forest); }
.site-header .header-cta:hover { background: var(--accent-light); color: var(--forest); }
/* A tile edge under the header */
.site-header { position: relative; }
.site-header::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -16px; height: 16px; z-index: 1;
  background: var(--forest) var(--tile) repeat-x left center; pointer-events: none;
}
main > .back:first-child, .project .back, .area-guide .back { padding-top: 40px; }
.prose { padding-top: 64px; }

/* Home hero: cream, with a terracotta italic accent */
.hero-with-map { max-width: none; }
.hero h1 { font-size: clamp(2.75rem, 6.8vw, 5.5rem); }
.hero h1 em { color: var(--accent); }
.hero .stats span + span::before { color: var(--accent); }

/* Featured pick: sand card, terracotta label */
.featured { background: var(--sand); border-color: transparent; box-shadow: 0 14px 36px var(--shadow); }
.eyebrow { display: inline-block; align-self: flex-start; padding: 4px 10px; border-radius: 999px; background: var(--accent); color: #fff; letter-spacing: 0.08em; }

/* Listing */
.listing-heading { font-size: clamp(1.75rem, 3.6vw, 2.75rem); font-weight: 520; letter-spacing: -0.01em; margin-bottom: 18px; }
.listing-heading span { color: var(--accent); font-style: italic; }
.filters { border-top: 0; padding-top: 0; }

/* Footer: green band edged with tile */
.site-footer { background: var(--forest); color: var(--on-forest-muted); padding-top: 56px; }
.site-footer a { color: var(--on-forest); }
.site-footer::before { top: -16px; background: var(--forest) var(--tile) repeat-x left center; opacity: 1; }

/* Filters: styled dropdowns */
.filters select {
  appearance: none; -webkit-appearance: none;
  min-height: 44px; padding: 10px 40px 10px 14px;
  font: inherit; font-size: 0.9375rem; color: var(--ink);
  background: var(--paper) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5 11 1.5' fill='none' stroke='%231F5A47' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 14px center;
  border: 1px solid var(--line); border-radius: 10px; cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.filters select:hover { border-color: #C9BBA5; }
.filters select:focus-visible { outline: none; border-color: var(--mangrove); box-shadow: 0 0 0 3px rgba(31, 90, 71, 0.18); }
.filters label { font-weight: 600; color: var(--ink); font-size: 0.8125rem; }

/* Whole listing row is tappable: the name's link stretches over the row */

/* Placeholder for projects without photos: sand tile pattern with the project's initial */
.no-photo {
  position: relative; display: grid; place-items: center; height: 100%; padding: 8px;
  background: var(--sand) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Cpath d='M12 3 L21 12 L12 21 L3 12 Z' fill='none' stroke='%23C9BBA5' stroke-width='1'/%3E%3Ccircle cx='12' cy='12' r='1.6' fill='%23D9A88C'/%3E%3C/svg%3E");
  color: var(--muted);
}
.no-photo-initial {
  font-family: var(--serif); font-variation-settings: "SOFT" 60; font-size: 2.75rem; line-height: 1; color: var(--mangrove);
  width: 64px; height: 64px; display: grid; place-items: center; border-radius: 50%; background: var(--paper);
}
.no-photo-text { position: absolute; left: 0; right: 0; bottom: 6px; text-align: center; font-size: 0.6875rem; }
@media (max-width: 820px) {
  .no-photo-initial { width: 44px; height: 44px; font-size: 1.75rem; }
  .no-photo-text { display: none; }
}

/* Footer: enquiry prompt and area guides above the small print */
.footer-top { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 40px 64px; padding-bottom: 36px; margin-bottom: 28px; border-bottom: 1px solid rgba(246, 241, 232, 0.18); }
.site-footer .footer-cta p { max-width: 46ch; color: var(--on-forest-muted); font-size: 1rem; }
.site-footer .footer-cta .footer-title { font-family: var(--serif); font-variation-settings: "SOFT" 60; font-size: clamp(1.5rem, 3vw, 2.125rem); line-height: 1.1; color: var(--on-forest); margin-bottom: 10px; }
.site-footer .footer-whatsapp {
  display: inline-block; margin-top: 18px; padding: 11px 20px; border-radius: 999px; font-weight: 600; text-decoration: none;
  background: var(--on-forest); color: var(--forest);
}
.site-footer .footer-whatsapp:hover { background: var(--accent-light); }
.footer-areas { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 24px; }
.site-footer .footer-areas-title { grid-column: 1 / -1; font-family: var(--serif); font-variation-settings: "SOFT" 60; font-size: 1.375rem; color: var(--on-forest); margin-bottom: 10px; }
.site-footer .footer-label { font-size: 0.75rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--accent-light); margin-bottom: 10px; }
.footer-group ul { list-style: none; margin: 0; padding: 0; }
.footer-group a { display: inline-block; padding: 3px 0; color: var(--on-forest); text-decoration: none; font-size: 0.9375rem; }
.footer-group a:hover { color: var(--accent-light); text-decoration: underline; }
.site-footer .footer-small p { font-size: 0.8125rem; }
@media (max-width: 820px) {
  .footer-top { grid-template-columns: minmax(0, 1fr); }
}

/* Listing: a grid of project cards */
.cards { list-style: none; margin: 8px 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 22px; }
.card {
  position: relative; display: flex; flex-direction: column; overflow: hidden;
  background: var(--paper); border: 1px solid var(--line); border-radius: 14px;
  transition: transform 0.18s, box-shadow 0.18s;
}
.card[hidden] { display: none; }
.card:hover { transform: translateY(-3px); box-shadow: 0 14px 32px var(--shadow); }
.card-photo { position: relative; aspect-ratio: 4 / 3; background: var(--sand); overflow: hidden; }
.card-img { display: block; height: 100%; }
.card-photo img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s; }
.card:hover .card-photo img { transform: scale(1.03); }
.card-badges { position: absolute; left: 12px; top: 12px; display: flex; flex-wrap: wrap; gap: 6px; list-style: none; margin: 0; padding: 0; }
.card-badges li {
  font-size: 0.6875rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
  color: #fff; background: rgba(23, 63, 51, 0.88); border-radius: 6px; padding: 5px 9px;
}
.card-badges .badge-affordable { background: rgba(191, 95, 55, 0.92); }
.card-body { display: flex; flex-direction: column; flex: 1; padding: 16px 18px 16px; }
.card-where { font-size: 0.75rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.card-name { margin-top: 6px; font-size: clamp(1.1875rem, 1.6vw, 1.375rem); font-weight: 560; letter-spacing: -0.01em; line-height: 1.12; overflow-wrap: anywhere; }
.card-name a { color: var(--ink); text-decoration: none; }
.card-name a::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.card-name a:focus-visible { outline: none; }
.card-name a:focus-visible::after { outline: 3px solid var(--accent); outline-offset: -3px; border-radius: 14px; }
.card:hover .card-name a { color: var(--mangrove); }
.card-facts { margin-top: 8px; color: var(--ink); font-size: 0.9375rem; }
.card-when { margin-top: 10px; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent); }
/* Price first, Compare always underneath it, so every card lines up the same way */
.card-foot { margin-top: auto; padding-top: 14px; display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.card-foot .price { margin: 0; }
.card-foot .price { font-size: 1.0625rem; color: var(--mangrove-dark); white-space: nowrap; }
.card .no-photo { height: 100%; }
/* Wide screens: more cards per row, so the grid fills the page without blowing the cards up */
@media (min-width: 1500px) {
  .cards { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}
@media (min-width: 1920px) {
  .cards { grid-template-columns: repeat(6, minmax(0, 1fr)); }
}
@media (min-width: 2560px) {
  .cards { grid-template-columns: repeat(7, minmax(0, 1fr)); }
}
@media (max-width: 1100px) {
  .cards { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
}
@media (max-width: 820px) {
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
/* Phones: two compact cards per row */
@media (max-width: 600px) {
  .cards { gap: 12px; }
  .card { border-radius: 12px; }
  .card-badges { left: 8px; top: 8px; gap: 4px; }
  .card-badges li { font-size: 0.5625rem; padding: 3px 6px; letter-spacing: 0.08em; }
  .card-badges .badge-affordable { display: none; }
  .card-body { padding: 12px 12px 12px; }
  .card-where { font-size: 0.625rem; letter-spacing: 0.08em; }
  .card-name { font-size: 1.0625rem; margin-top: 4px; }
  .card-facts { display: none; }
  .card-when { margin-top: 6px; font-size: 0.625rem; letter-spacing: 0.06em; }
  .card-foot { padding-top: 10px; }
  .card-foot .price { font-size: 0.875rem; white-space: normal; }
}
/* Phones: filters in a 2 x 2 grid to save scrolling */
@media (max-width: 600px) {
  .filters { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 10px; }
  .filters select { width: 100%; min-width: 0; padding-right: 32px; font-size: 0.875rem; background-position: right 10px center; text-overflow: ellipsis; }
  .filters .count { grid-column: 1 / -1; }
}

/* WhatsApp buttons: a small chat-bubble icon so it's clear where they lead */
.header-cta, .send, .site-footer .footer-whatsapp { display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.header-cta::before, .send::before, .site-footer .footer-whatsapp::before {
  content: ""; flex: none; width: 1.05em; height: 1.05em; background: currentColor;
  -webkit-mask: var(--chat-icon) center / contain no-repeat; mask: var(--chat-icon) center / contain no-repeat;
}
:root { --chat-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2.5a9.5 9.5 0 0 0-8.2 14.3L2.5 21.5l4.8-1.3A9.5 9.5 0 1 0 12 2.5Zm0 1.8a7.7 7.7 0 1 1-4 14.3l-.3-.2-2.8.8.8-2.7-.2-.3A7.7 7.7 0 0 1 12 4.3Z'/%3E%3C/svg%3E"); }

/* Header: Why us link */
.site-nav { display: flex; align-items: center; gap: 22px; }
.nav-link { color: var(--on-forest); font-weight: 600; text-decoration: none; }
.nav-link:hover { color: var(--accent-light); }

/* About / Why us page */
.about-head { padding: 48px 0 40px; max-width: 760px; }
.about-head h1 { font-size: clamp(2.5rem, 6.5vw, 4.75rem); font-weight: 520; letter-spacing: -0.02em; line-height: 1; }
.about-head h1 em { color: var(--accent); font-weight: 400; }
.about-head .lede { margin-top: 20px; }
.reasons { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.reason { background: var(--paper); border: 1px solid var(--line); border-radius: 14px; padding: 24px 22px; }
.reason-num { display: block; font-family: var(--serif); font-style: italic; font-size: 1.75rem; color: var(--accent); line-height: 1; margin-bottom: 14px; }
.reason h2 { font-size: 1.3125rem; font-weight: 560; line-height: 1.15; margin-bottom: 10px; }
.reason p { font-size: 0.9375rem; color: var(--ink); }
.how { margin-top: 64px; }
.how > h2, .who h2 { font-size: clamp(1.75rem, 3.4vw, 2.5rem); font-weight: 520; margin-bottom: 20px; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; counter-reset: step; }
.steps li { counter-increment: step; border-top: 2px solid var(--mangrove); padding-top: 16px; }
.steps li h3 { font-size: 1.25rem; font-weight: 560; margin-bottom: 6px; }
.steps li h3::before { content: counter(step) ". "; color: var(--accent); }
.who { margin-top: 64px; display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 48px; align-items: start; }
.who p { max-width: 60ch; margin-bottom: 12px; }
.who .who-sign { font-weight: 600; color: var(--mangrove); }
.who-cta { background: var(--sand); border-radius: 14px; padding: 28px; }
.who .who-cta-title { font-family: var(--serif); font-size: 1.5rem; line-height: 1.15; margin-bottom: 6px; }
@media (max-width: 1000px) { .reasons { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 700px) {
  .reasons, .steps, .who { grid-template-columns: minmax(0, 1fr); }
  .steps { gap: 20px; }
  .who { gap: 24px; }
}

/* Monthly instalment estimates */
.card-monthly { display: block; margin-top: 2px; font-size: 0.75rem; font-weight: 500; color: var(--muted); white-space: nowrap; }
.monthly { margin-top: -6px; color: var(--muted); font-size: 0.9375rem; }
.monthly strong { color: var(--ink); font-weight: 650; }
@media (max-width: 600px) { .card-monthly { font-size: 0.6875rem; } }

/* Typical layout on project pages */
.floor-plan { margin-top: 36px; }
.floor-plan figure { margin: 0; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 12px; }
.floor-plan figure a { display: block; }
.floor-plan img { display: block; width: 100%; height: auto; max-height: 640px; object-fit: contain; }
.floor-plan figcaption { margin-top: 8px; font-size: 0.875rem; color: var(--muted); }
.plan-more { margin: 10px 0 0; }
.plan-link { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; color: var(--accent); }
.plan-link::after { content: "→"; }

/* Ben's take on project pages */
.take { margin-top: 36px; background: var(--paper); border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: 10px; padding: 20px 22px; }
.project-body .take h2 { margin-top: 0; }
.take h3 { font-size: 1rem; font-weight: 650; margin: 18px 0 6px; }
.take p, .take ul { margin: 0; }
.take ul { padding-left: 1.2em; }
.take li + li { margin-top: 4px; }
.take p.take-draft { display: inline-block; margin: 0 0 4px; padding: 2px 10px; border-radius: 999px; background: #F6E3D6; color: #8A3F1F; font-size: 0.8125rem; font-weight: 600; }

/* Compare: card toggle, tray and the compare page */
.card-compare { position: relative; z-index: 2; display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border: 1px solid var(--line); border-radius: 999px; background: var(--paper); font-size: 0.8125rem; font-weight: 600; color: var(--mangrove); cursor: pointer; white-space: nowrap; }
.card-compare input { margin: 0; padding: 0; min-height: 0; width: 15px; height: 15px; accent-color: var(--mangrove); }
.card-compare:has(input:checked) { background: var(--mangrove); border-color: var(--mangrove); color: #fff; }
.card-compare:has(input:disabled) { opacity: 0.5; cursor: not-allowed; }
.compare-tray { position: fixed; z-index: 20; left: 50%; bottom: 16px; transform: translateX(-50%); width: min(720px, calc(100% - 32px)); display: flex; align-items: center; gap: 12px; padding: 12px 14px 12px 18px; background: #173F33; color: #fff; border-radius: 14px; box-shadow: 0 10px 30px rgba(0,0,0,0.25); }
.compare-tray[hidden] { display: none; }
.compare-tray p { margin: 0; flex: 1; min-width: 0; font-size: 0.875rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.compare-go { padding: 8px 14px; border-radius: 999px; background: var(--accent); color: #fff; font-weight: 700; font-size: 0.875rem; text-decoration: none; white-space: nowrap; }
.compare-go:hover { color: #fff; background: #A9512D; }
.compare-go.is-disabled { opacity: 0.5; pointer-events: none; }
.compare-clear { border: 0; background: none; color: #EBA884; font: inherit; font-size: 0.875rem; cursor: pointer; padding: 6px; }
.compare-page { max-width: 1120px; margin: 0 auto; padding: 0 16px 48px; }
.compare-pickers { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 20px 0 24px; }
.compare-pickers label { display: grid; gap: 6px; font-size: 0.875rem; font-weight: 600; }
.compare-pickers select { width: 100%; min-width: 0; padding: 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--paper); font: inherit; font-weight: 400; }
.compare-empty { padding: 28px; text-align: center; border: 1px dashed var(--line); border-radius: 12px; color: var(--muted); }
table.compare { width: 100%; border-collapse: collapse; table-layout: fixed; min-width: 560px; background: var(--paper); }
table.compare th, table.compare td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; font-size: 0.9375rem; }
table.compare thead th { font-family: inherit; font-weight: 700; }
table.compare thead img { display: block; width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; border-radius: 8px; margin-bottom: 8px; }
table.compare tbody th { width: 150px; color: var(--muted); font-weight: 500; font-size: 0.875rem; }
table.compare thead td { width: 150px; }
.compare-na { color: var(--muted); font-style: italic; }
.compare-ask { margin: 20px 0 8px; }
.take p.take-side { margin-top: 12px; font-weight: 600; }
@media (max-width: 640px) {
  .compare-pickers { grid-template-columns: 1fr; }
  table.compare tbody th, table.compare thead td { width: 110px; }
  .compare-tray { flex-wrap: wrap; }
  .compare-tray p { flex-basis: 100%; white-space: normal; }
}
@media (max-width: 640px) {
  .card-compare { padding: 3px 8px; font-size: 0.75rem; gap: 4px; }
  .card-compare input { width: 13px; height: 13px; }
}
table.compare tbody th, table.compare thead td { position: sticky; left: 0; z-index: 1; background: var(--paper); }

/* Penang map: tinted sea with soft shore lines, paper land, forested hills, rivers, the expressway and bridges */
.map-sea { fill: url(#map-sea-fill); }
.map-shore path { fill: none; stroke: #FFFFFF; stroke-linejoin: round; }
.map-shore-outer path { stroke-width: 14; stroke-opacity: 0.22; }
.map-shore-inner path { stroke-width: 6; stroke-opacity: 0.45; }
.map-land path { fill: var(--paper); stroke: #B9A88E; stroke-width: 0.9; }
.map-forest { fill: #DDE6D0; stroke: #C3D0AE; stroke-width: 0.8; }
.map-contour { fill: none; stroke: #B3C29B; stroke-width: 0.7; }
.map-peak { fill: #7D6F59; }
.map-river { fill: none; stroke: #8FBDB4; stroke-width: 1.2; stroke-linecap: round; }
.map-road-casing { fill: none; stroke: #FFFFFF; stroke-width: 3.4; stroke-linecap: round; }
.map-road { fill: none; stroke: #DDAA86; stroke-width: 1.6; stroke-linecap: round; }
.map-bridge-casing { stroke: #7D6F59; stroke-width: 3.6; stroke-linecap: round; }
.map-bridge { stroke: #FFFFFF; stroke-width: 1.6; stroke-linecap: round; }
.map-water { font-family: var(--serif); font-style: italic; font-size: 10px; letter-spacing: 0.08em; fill: #5B8C83; }
.map-region { font-size: 9.5px; font-weight: 700; letter-spacing: 0.14em; fill: var(--muted); paint-order: stroke; stroke: var(--paper); stroke-width: 3px; stroke-linejoin: round; }
.map-compass circle { fill: rgba(255, 252, 247, 0.85); stroke: #8C7F6B; stroke-width: 0.8; }
.map-compass path { fill: var(--mangrove); }
.map-compass text { font-size: 8px; font-weight: 700; fill: var(--ink); }
.map-scale path { fill: none; stroke: var(--ink); stroke-width: 1.1; }
.map-scale text { font-size: 7.5px; fill: var(--ink); }
.map-frame { fill: none; stroke: #FFFFFF; stroke-opacity: 0.75; stroke-width: 1; }
.map-count-halo { fill: var(--paper); fill-opacity: 0.85; }

/* Search: in the filters (live), and in the header (takes you to the filtered list) */
:root { --search-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='10.5' cy='10.5' r='6.5' fill='none' stroke='black' stroke-width='2.2'/%3E%3Cpath d='M15.5 15.5 21 21' stroke='black' stroke-width='2.2' stroke-linecap='round'/%3E%3C/svg%3E"); }
.filters .filter-search { flex: 1 1 100%; }
.filter-search input {
  width: 100%; max-width: 560px; padding-left: 40px;
  background: var(--paper) no-repeat 13px center / 17px 17px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='10.5' cy='10.5' r='6.5' fill='none' stroke='%236B7A72' stroke-width='2.2'/%3E%3Cpath d='M15.5 15.5 21 21' stroke='%236B7A72' stroke-width='2.2' stroke-linecap='round'/%3E%3C/svg%3E");
  border-color: #CDBFA9; border-radius: 10px;
}
.filter-search input:focus-visible { outline: none; border-color: var(--mangrove); box-shadow: 0 0 0 3px rgba(31, 90, 71, 0.18); }
.header-search { display: flex; }
.header-search input { width: 200px; }
.header-search input {
  width: 190px; min-height: 36px; padding: 6px 12px 6px 34px; font-size: 0.9375rem;
  color: var(--on-forest); background: rgba(255, 255, 255, 0.1) no-repeat 11px center / 15px 15px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='10.5' cy='10.5' r='6.5' fill='none' stroke='%23F3EBDD' stroke-width='2.2'/%3E%3Cpath d='M15.5 15.5 21 21' stroke='%23F3EBDD' stroke-width='2.2' stroke-linecap='round'/%3E%3C/svg%3E");
  border: 1px solid rgba(255, 255, 255, 0.22); border-radius: 999px;
}
.header-search input::placeholder { color: rgba(243, 235, 221, 0.72); }
.header-search input:focus-visible { outline: none; background-color: rgba(255, 255, 255, 0.18); border-color: var(--accent-light); }
.search-link { display: none; width: 40px; height: 40px; border-radius: 999px; color: var(--on-forest); position: relative; }
.search-link::before { content: ""; position: absolute; inset: 10px; background: currentColor; -webkit-mask: var(--search-icon) center / contain no-repeat; mask: var(--search-icon) center / contain no-repeat; }
.search-link:hover { color: var(--accent-light); }
@media (max-width: 960px) {
  .header-search { display: none; }
  .site-header .search-link { display: inline-block; }
}
@media (max-width: 560px) {
  .filters .filter-search { grid-column: 1 / -1; }
  .filter-search input { max-width: none; }
  .site-header .search-link { width: 36px; height: 36px; }
  .search-link::before { inset: 9px; }
}
.site-header .nav-link { white-space: nowrap; }
@media (max-width: 370px) {
  .site-header .search-link { width: 30px; height: 30px; }
  .search-link::before { inset: 7px; }
}


/* Floating WhatsApp button: always in the bottom-right corner, above everything else */
.float-chat {
  position: fixed; z-index: 30; right: max(16px, env(safe-area-inset-right));
  bottom: max(16px, calc(env(safe-area-inset-bottom) + 12px));
  height: 60px; padding: 0 22px 0 18px; border-radius: 999px;
  display: flex; align-items: center; gap: 10px;
  background: #25D366; color: #fff; border: 3px solid #fff;
  font-weight: 700; font-size: 1.0625rem; text-decoration: none; white-space: nowrap;
  box-shadow: 0 8px 24px rgba(0,0,0,0.28);
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.float-chat::before {
  content: ""; flex: none; width: 30px; height: 30px; background: currentColor;
  -webkit-mask: var(--chat-icon) center / contain no-repeat; mask: var(--chat-icon) center / contain no-repeat;
}
/* A soft ring pulses out a few times after the page opens, to catch the eye, then stops */
.float-chat::after {
  content: ""; position: absolute; inset: -3px; border-radius: inherit; border: 3px solid #25D366;
  opacity: 0; pointer-events: none; animation: float-chat-pulse 1.8s ease-out 1.5s 4;
}
@keyframes float-chat-pulse { 0% { transform: scale(1); opacity: 0.7; } 100% { transform: scale(1.35); opacity: 0; } }
.float-chat:hover { background: #1EBE5A; color: #fff; transform: translateY(-2px); box-shadow: 0 12px 28px rgba(0,0,0,0.3); }
.float-chat:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
/* Sit above the compare tray when it is open, so neither covers the other */
body:has(.compare-tray:not([hidden])) .float-chat { bottom: calc(max(16px, env(safe-area-inset-bottom)) + 84px); }
@media (max-width: 480px) { .float-chat { height: 56px; padding: 0 18px 0 15px; font-size: 1rem; } .float-chat::before { width: 27px; height: 27px; } }
@media (prefers-reduced-motion: reduce) { .float-chat { transition: none; } .float-chat::after { animation: none; } .float-chat:hover { transform: none; } }
@media print { .float-chat { display: none; } }
