:root {
  --paper: #f4efe6;
  --paper-2: #ebe4d8;
  --card: #fffcf7;
  --ink: #1b1714;
  --ink-soft: #3d362f;
  --muted: #6d645b;
  --line: #e3d9cc;
  --line-strong: #cfc3b3;
  --accent: #8e3a28;
  --accent-deep: #6e2c1e;
  --accent-soft: #f3e4dc;
  --sage: #3e5a4a;
  --sage-soft: #e4eee8;
  --gold: #b0894a;
  --shadow: 0 18px 40px -24px rgba(40, 28, 18, 0.35);
  --radius: 18px;
  --header-h: 64px;
  --font-display: "Fraunces", "Iowan Old Style", Georgia, serif;
  --font-body: "Figtree", "Avenir Next", "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }
a { color: inherit; }
button { font-family: inherit; }

.wrap {
  width: min(1180px, calc(100% - 32px));
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  height: var(--header-h);
  display: flex;
  align-items: center;
  background: color-mix(in srgb, var(--paper) 86%, transparent);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 80%, transparent);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: min(1180px, calc(100% - 32px));
  margin-inline: auto;
}
.brand {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  min-width: 0;
}
.brand-mark {
  font-family: var(--font-display);
  font-weight: 560;
  font-size: 1.15rem;
  letter-spacing: -0.03em;
  line-height: 1.1;
}
.brand-sub {
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}
.header-nav {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.header-nav a {
  text-decoration: none;
  font-size: 0.84rem;
  color: var(--ink-soft);
  padding: 8px 10px;
  border-radius: 999px;
}
.header-nav a:hover { background: var(--paper-2); }
.card-body h2 { overflow-wrap: anywhere; }

.hero {
  padding: 36px 0 12px;
}
.kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.74rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 650;
  margin-bottom: 12px;
}
.hero h1 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(2.1rem, 5vw, 4.2rem);
  line-height: 1.04;
  letter-spacing: -0.035em;
  margin: 0 0 14px;
  max-width: 16ch;
}
.lede {
  max-width: 46ch;
  color: var(--ink-soft);
  font-size: 1.05rem;
  margin: 0 0 28px;
}

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  margin: 8px 0 28px;
}
.stat {
  background: var(--card);
  padding: 16px 18px;
}
.stat b {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 2.4vw, 1.85rem);
  font-weight: 560;
  letter-spacing: -0.03em;
}
.stat span {
  color: var(--muted);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 8px 0 22px;
  align-items: center;
}
.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.chip-row.views { margin-left: auto; }
.chip {
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--ink-soft);
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 0.84rem;
  cursor: pointer;
}
.chip[aria-pressed="true"],
.chip.is-on {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}

.grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 22px;
  padding-bottom: 64px;
}
.card {
  background: var(--card);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  border: 1px solid color-mix(in srgb, var(--line) 70%, white);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 24px 48px -22px rgba(40, 28, 18, 0.42);
}
.card-media {
  position: relative;
  aspect-ratio: 4 / 3;
  background: #d9cfc3;
  overflow: hidden;
}
.card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: color-mix(in srgb, var(--card) 92%, transparent);
  backdrop-filter: blur(8px);
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  font-weight: 650;
}
.badge.warn {
  background: #2b241c;
  color: #f4eadc;
}
.card-body { padding: 16px 16px 18px; }
.card-body h2 {
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 520;
  letter-spacing: -0.03em;
  margin: 0 0 4px;
  line-height: 1.15;
}
.meta { color: var(--muted); font-size: 0.9rem; margin: 0 0 12px; }
.facts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 14px;
}
.fact {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 0.78rem;
  color: var(--ink-soft);
}
.fact svg { width: 14px; height: 14px; }
.card-foot {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  border-top: 1px solid var(--line);
  padding-top: 12px;
}
.owner { font-size: 0.78rem; color: var(--muted); }

.table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--card);
  margin-bottom: 64px;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  min-width: 720px;
}
th, td {
  text-align: left;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
th {
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 650;
  background: var(--paper);
}
td a { color: var(--accent); text-decoration: none; font-weight: 650; }
tr:last-child td { border-bottom: 0; }

.site-footer {
  border-top: 1px solid var(--line);
  padding: 28px 0 40px;
  color: var(--muted);
  font-size: 0.86rem;
}
.site-footer .wrap {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

/* Property page */
.back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--muted);
  font-size: 0.86rem;
  margin: 18px 0 8px;
}
.prop-hero {
  position: relative;
  border-radius: 22px;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  background: #d9cfc3;
  box-shadow: var(--shadow);
}
.prop-hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  cursor: zoom-in;
}
.prop-title {
  display: grid;
  gap: 18px;
  padding: 26px 0 8px;
}
.prop-title h1 {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 3.1rem);
  font-weight: 520;
  letter-spacing: -0.035em;
  margin: 0 0 6px;
  line-height: 1.05;
}
.postcode { color: var(--muted); margin: 0 0 10px; }
.note {
  background: var(--accent-soft);
  border-left: 3px solid var(--accent);
  padding: 12px 14px;
  border-radius: 0 12px 12px 0;
  font-size: 0.92rem;
  max-width: 72ch;
  margin: 0 0 16px;
}
.note.quiet {
  background: var(--sage-soft);
  border-left-color: var(--sage);
}
.copy {
  color: var(--ink-soft);
  max-width: 68ch;
  font-size: 1.02rem;
}
.section { padding: 28px 0 8px; }
.section h2 {
  font-family: var(--font-display);
  font-size: 1.55rem;
  font-weight: 540;
  letter-spacing: -0.03em;
  margin: 0 0 14px;
}

.gallery {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.gallery a {
  display: block;
  border-radius: 12px;
  overflow: hidden;
  background: #d9cfc3;
  aspect-ratio: 4 / 3;
}
.gallery img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.video {
  position: relative;
  padding-top: 56.25%;
  border-radius: 16px;
  overflow: hidden;
  background: #111;
}
.video iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.map {
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--line);
  min-height: 280px;
}
.map iframe { width: 100%; height: 320px; border: 0; display: block; }

.details {
  display: grid;
  gap: 0;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
}
.details div {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  font-size: 0.95rem;
}
.details div:last-child { border-bottom: 0; }
.details dt, .details .k { color: var(--muted); }
.details a { color: var(--accent); }

.ext-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--ink);
  color: var(--paper);
  text-decoration: none;
  border-radius: 999px;
  padding: 11px 16px;
  font-size: 0.9rem;
  font-weight: 650;
}
.btn.ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line-strong);
}

.floorplan {
  background: #fff;
  border-radius: 16px;
  border: 1px solid var(--line);
  padding: 12px;
}
.floorplan img { width: 100%; height: auto; cursor: zoom-in; }

.more-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}
.mini {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 12px;
  text-decoration: none;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
}
.mini img { width: 110px; height: 88px; object-fit: cover; }
.mini h3 {
  font-family: var(--font-display);
  font-size: 1.05rem;
  margin: 10px 0 2px;
  font-weight: 540;
}
.mini p { margin: 0; color: var(--muted); font-size: 0.82rem; }

/* Lightbox */
.lb {
  position: fixed;
  inset: 0;
  background: rgba(16, 12, 10, 0.92);
  display: none;
  z-index: 80;
  color: #f7f1e8;
}
.lb.is-open { display: flex; flex-direction: column; }
.lb-stage {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
  padding: 16px;
}
.lb-stage img {
  max-width: 100%;
  max-height: calc(100dvh - 92px);
  width: auto;
  height: auto;
  object-fit: contain;
}
.lb-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px calc(12px + env(safe-area-inset-bottom));
  gap: 10px;
}
.lb button {
  background: rgba(255,255,255,0.1);
  color: inherit;
  border: 0;
  border-radius: 999px;
  width: 44px;
  height: 44px;
  font-size: 1.2rem;
  cursor: pointer;
}
.lb-count { font-size: 0.86rem; opacity: 0.8; }

.hidden { display: none !important; }

@media (min-width: 640px) {
  .grid { grid-template-columns: 1fr 1fr; }
  .gallery { grid-template-columns: repeat(3, 1fr); gap: 10px; }
  .more-grid { grid-template-columns: 1fr 1fr; }
  .prop-title { grid-template-columns: 1.4fr 0.8fr; align-items: start; }
  .prop-hero { aspect-ratio: 16 / 9; }
}
@media (min-width: 980px) {
  .grid { grid-template-columns: 1fr 1fr 1fr; }
  .gallery { grid-template-columns: repeat(4, 1fr); }
  .hero { padding-top: 56px; }
  .wrap { width: min(1180px, calc(100% - 48px)); }
  .header-inner { width: min(1180px, calc(100% - 48px)); }
}
@media (max-width: 639px) {
  .stats { grid-template-columns: 1fr 1fr; }
  .prop-hero { aspect-ratio: 5 / 4; border-radius: 16px; }
  .header-nav { display: none; }
  .chip-row.views { margin-left: 0; width: 100%; }
  .prop-title { padding-top: 18px; }
}

@media print {
  .site-header, .toolbar, .back, .lb, .header-nav { display: none !important; }
  .card, .prop-hero, .gallery a { break-inside: avoid; box-shadow: none; }
  body { background: white; }
  .gallery { grid-template-columns: 1fr 1fr; }
}
