/* Real estate listing: Larkfield and Co, an invented estate agency in
   an invented market town. Warm stone ground, deep teal and brass, a
   Baskerville display face and tabular prices. Every house is drawn in
   CSS from one set of spans; the map is one inline SVG plus pins the
   script places from each card's data-x and data-y. */

.lf-page {
  --lf-night: #1d2a2a;
  --lf-on-night: #f4ecdc;
  --lf-teal-text: #0f5c55;
  --lf-teal-dark-text: #0b403c;
  --lf-red-text: #a3321f;
  --lf-brass-ink-text: #7a5412;
  --lf-card: #fff;
  --lf-glass: rgba(255, 253, 249, 0.96);
  --lf-glass-2: rgba(255, 253, 249, 0.94);
  --lf-on-fill: #1d2a2a;
  --lf-ground: #f7f4ee;
  --lf-paper: #fffdf9;
  --lf-stone: #efe9dd;
  --lf-ink: #1d2a2a;
  --lf-muted: #4f5b58;
  --lf-line: #ddd4c4;
  --lf-line-strong: #b9ae9a;
  --lf-teal: #0f5c55;
  --lf-teal-dark: #0b403c;
  --lf-teal-deep: #082f2c;
  --lf-teal-pale: #e1eeeb;
  --lf-brass: #d3a64a;
  --lf-brass-pale: #f6ead0;
  --lf-brass-ink: #7a5412;
  --lf-cream: #f4ecdc;
  --lf-red: #a3321f;
  --lf-red-pale: #f8e4de;
  --lf-display: "Baskerville Old Face", Baskerville, Constantia, Georgia, serif;
  --lf-sans: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --lf-shadow: 0 1px 2px rgba(29, 42, 42, 0.06), 0 8px 24px rgba(29, 42, 42, 0.08);
  --lf-wrap: 1280px;

  background: var(--lf-ground);
  color: var(--lf-ink);
  font-family: var(--lf-sans);
}

/* Dark mode, the default: viewings after dark. Deep teal-black
   grounds, warm pale ink, teal lifted for text and brass kept (PRD section 13.10). Only this template's own tokens
   change; screen only, so print always uses the light palette. */
@media screen {
  :root[data-theme="dark"] .lf-page {
    --lf-night: #071110;
    --lf-teal-text: #6fcfc2;
    --lf-teal-dark-text: #8fdbd0;
    --lf-red-text: #ff8a80;
    --lf-brass-ink-text: #e6bf6a;
    --lf-card: #161e1e;
    --lf-glass: rgba(15, 21, 21, 0.96);
    --lf-glass-2: rgba(15, 21, 21, 0.94);
    --lf-ground: #0f1515;
    --lf-paper: #161e1e;
    --lf-stone: #1e2828;
    --lf-ink: #e6eeec;
    --lf-muted: #a8b6b3;
    --lf-line: #2c3838;
    --lf-line-strong: #4a5856;
    --lf-teal-pale: #12302c;
    --lf-brass-pale: #33280f;
    --lf-red-pale: #3a1b17;
    --lf-shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px rgba(0, 0, 0, 0.35);
    color-scheme: dark;
  }
}

.lf-theme-btn {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid color-mix(in srgb, currentColor 35%, transparent);
  border-radius: 50%;
  background: transparent;
  color: inherit;
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
}

.lf-theme-btn:hover {
  background: color-mix(in srgb, currentColor 12%, transparent);
}

html:has(.lf-page) {
  scroll-behavior: smooth;
}

.lf-page [hidden] {
  display: none !important;
}

/* Resets weigh the same as base.css's element rules and win by order,
   so any class below can still set its own margins. */
:where(.lf-page) p,
:where(.lf-page) h1,
:where(.lf-page) h2,
:where(.lf-page) h3,
:where(.lf-page) h4,
:where(.lf-page) ul,
:where(.lf-page) ol,
:where(.lf-page) dl,
:where(.lf-page) dd,
:where(.lf-page) fieldset {
  margin: 0;
}

:where(.lf-page) li {
  margin: 0;
}

:where(.lf-page) ul,
:where(.lf-page) ol {
  padding: 0;
  list-style: none;
}

:where(.lf-page) fieldset {
  padding: 0;
  border: 0;
  min-width: 0;
}

:where(.lf-page) h1,
:where(.lf-page) h2,
:where(.lf-page) h3 {
  color: inherit;
}

.lf-page :focus-visible {
  outline: 3px solid var(--lf-teal);
  outline-offset: 2px;
}

.lf-page svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.lf-wrap {
  max-width: var(--lf-wrap);
  margin: 0 auto;
  padding: 0 var(--space-6);
}

.lf-page section[id],
.lf-page footer[id] {
  scroll-margin-top: 84px;
}

.lf-eyebrow {
  font-size: var(--font-size-xs);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--lf-brass-ink-text);
  margin-bottom: var(--space-3);
}

/* ---------- Buttons and fields ---------- */

.lf-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  min-height: 44px;
  padding: 0 var(--space-5);
  border: 2px solid transparent;
  border-radius: 999px;
  font-size: var(--font-size-sm);
  font-weight: 700;
  line-height: 1.2;
  cursor: pointer;
  transition: background-color var(--transition-fast), border-color var(--transition-fast), color var(--transition-fast);
}

.lf-btn svg {
  width: 18px;
  height: 18px;
}

.lf-btn--primary {
  background: var(--lf-teal);
  color: #fff;
}

.lf-btn--primary:hover {
  background: var(--lf-teal-dark);
}

.lf-btn--brass {
  background: var(--lf-brass);
  color: var(--lf-on-fill);
}

.lf-btn--brass:hover {
  background: #e0b861;
}

.lf-btn--quiet {
  background: var(--lf-paper);
  border-color: var(--lf-line-strong);
  color: var(--lf-ink);
}

.lf-btn--quiet:hover {
  border-color: var(--lf-teal);
  color: var(--lf-teal-text);
}

.lf-btn--sm {
  min-height: 40px;
  padding: 0 var(--space-4);
}

.lf-btn--block {
  width: 100%;
}

.lf-btn:disabled {
  opacity: 0.6;
  cursor: default;
}

.lf-link {
  padding: var(--space-2) 0;
  border: 0;
  background: none;
  color: var(--lf-teal-text);
  font-size: var(--font-size-sm);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.lf-link:hover {
  color: var(--lf-teal-dark-text);
}

.lf-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.lf-field > label,
.lf-field > legend,
.lf-group > legend,
.lf-sort > label {
  font-size: var(--font-size-xs);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--lf-muted);
  padding: 0;
}

.lf-field > legend {
  margin-bottom: 6px;
}

.lf-page .lf-input,
.lf-page .lf-select {
  width: 100%;
  min-height: 46px;
  margin: 0;
  padding: 0 var(--space-3);
  border: 1.5px solid var(--lf-muted);
  border-radius: 8px;
  background: var(--lf-paper);
  color: var(--lf-ink);
  font: inherit;
  font-size: var(--font-size-base);
}

.lf-page .lf-select {
  appearance: none;
  padding-right: 36px;
  background-image: linear-gradient(45deg, transparent 50%, var(--lf-ink) 50%), linear-gradient(135deg, var(--lf-ink) 50%, transparent 50%);
  background-position: calc(100% - 19px) 50%, calc(100% - 13px) 50%;
  background-size: 6px 6px;
  background-repeat: no-repeat;
  cursor: pointer;
}

.lf-page .lf-input:hover,
.lf-page .lf-select:hover {
  border-color: var(--lf-teal);
}

.lf-page .lf-input:focus-visible,
.lf-page .lf-select:focus-visible {
  outline: 3px solid var(--lf-teal);
  outline-offset: 1px;
  border-color: var(--lf-teal);
}

.lf-page .lf-input[aria-invalid="true"],
.lf-page .lf-select[aria-invalid="true"] {
  border-color: var(--lf-red);
  background: var(--lf-red-pale);
}

.lf-error {
  display: flex;
  gap: 6px;
  margin-top: var(--space-2);
  color: var(--lf-red-text);
  font-size: var(--font-size-sm);
  font-weight: 600;
  line-height: 1.4;
}

.lf-error::before {
  content: "!";
  flex: none;
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  margin-top: 1px;
  border-radius: 50%;
  background: var(--lf-red);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
}

.lf-field .lf-error {
  margin-top: 0;
}

.lf-hint {
  color: var(--lf-muted);
  font-size: var(--font-size-sm);
  line-height: 1.4;
}

.lf-status {
  font-size: var(--font-size-sm);
  line-height: 1.5;
}

.lf-status:not(:empty) {
  margin-top: var(--space-4);
  padding: var(--space-3) var(--space-4);
  border-left: 4px solid var(--lf-brass);
  border-radius: 0 8px 8px 0;
  background: var(--lf-brass-pale);
  color: var(--lf-ink);
}

/* Segmented radios and chips: the input stays in the tab order,
   visually hidden, and styles the span after it. */
.lf-seg {
  display: flex;
  border: 1.5px solid var(--lf-line-strong);
  border-radius: 8px;
  background: var(--lf-paper);
  overflow: hidden;
}

.lf-seg label {
  position: relative;
  flex: 1 1 0;
  min-width: 0;
}

.lf-seg input,
.lf-chip-opt input,
.lf-toggle input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  margin: 0;
}

.lf-seg span {
  display: grid;
  place-items: center;
  min-height: 43px;
  padding: 0 var(--space-3);
  border-left: 1px solid var(--lf-line);
  font-size: var(--font-size-sm);
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color var(--transition-fast), color var(--transition-fast);
}

.lf-seg label:first-child span {
  border-left: 0;
}

.lf-seg label:hover span {
  background: var(--lf-teal-pale);
}

.lf-seg input:checked + span {
  background: var(--lf-teal);
  color: #fff;
}

.lf-seg input:focus-visible + span {
  outline: 3px solid var(--lf-teal);
  outline-offset: -5px;
  box-shadow: inset 0 0 0 5px #fff;
}

.lf-seg input:disabled + span {
  color: var(--lf-muted);
  background: repeating-linear-gradient(135deg, transparent 0 6px, rgba(29, 42, 42, 0.06) 6px 7px);
  text-decoration: line-through;
  cursor: not-allowed;
}

.lf-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.lf-chip-opt {
  position: relative;
}

.lf-chip-opt span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 40px;
  padding: 0 var(--space-4);
  border: 1.5px solid var(--lf-line-strong);
  border-radius: 999px;
  background: var(--lf-paper);
  font-size: var(--font-size-sm);
  font-weight: 600;
  cursor: pointer;
  transition: background-color var(--transition-fast), border-color var(--transition-fast);
}

.lf-chip-opt span::before {
  content: "";
  width: 14px;
  height: 14px;
  border: 1.5px solid var(--lf-line-strong);
  border-radius: 4px;
  background: var(--lf-card);
}

.lf-chip-opt:hover span {
  border-color: var(--lf-teal);
}

.lf-chip-opt input:checked + span {
  border-color: var(--lf-teal);
  background: var(--lf-teal-pale);
  color: var(--lf-teal-dark-text);
}

.lf-chip-opt input:checked + span::before {
  border-color: var(--lf-teal);
  background: var(--lf-teal) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14'%3E%3Cpath d='M3 7.2l2.6 2.6L11 4.4' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 12px no-repeat;
}

.lf-chip-opt input:focus-visible + span {
  outline: 3px solid var(--lf-teal);
  outline-offset: 2px;
}

.lf-toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  min-height: 40px;
  font-size: var(--font-size-sm);
  font-weight: 600;
  cursor: pointer;
}

.lf-toggle-track {
  position: relative;
  flex: none;
  width: 42px;
  height: 24px;
  border-radius: 999px;
  background: var(--lf-line-strong);
  transition: background-color var(--transition-fast);
}

.lf-toggle-track::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--lf-card);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
  transition: transform var(--transition-fast);
}

.lf-toggle input:checked + .lf-toggle-track {
  background: var(--lf-teal);
}

.lf-toggle input:checked + .lf-toggle-track::after {
  transform: translateX(18px);
}

.lf-toggle input:focus-visible + .lf-toggle-track {
  outline: 3px solid var(--lf-teal);
  outline-offset: 2px;
}

/* ---------- Header ---------- */

.lf-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: var(--lf-glass);
  border-bottom: 1px solid var(--lf-line);
}

.lf-header-in {
  display: flex;
  align-items: center;
  gap: var(--space-6);
  max-width: var(--lf-wrap);
  min-height: 68px;
  margin: 0 auto;
  padding: 0 var(--space-6);
}

.lf-logo {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  color: var(--lf-ink);
  text-decoration: none;
}

.lf-logo:hover {
  color: var(--lf-ink);
  text-decoration: none;
}

.lf-logo-mark {
  width: 34px;
  height: 34px;
}

.lf-page .lf-logo-mark {
  stroke-width: 2.6;
}

.lf-logo-roof {
  stroke: var(--lf-brass);
}

.lf-logo-wall,
.lf-logo-door {
  stroke: var(--lf-teal);
}

.lf-logo-text {
  font-family: var(--lf-display);
  font-size: 1.6rem;
  line-height: 1;
  white-space: nowrap;
}

.lf-logo-text span,
.lf-footer-brand span {
  font-style: italic;
  color: var(--lf-brass-ink-text);
}

.lf-nav {
  margin-left: auto;
}

.lf-nav ul {
  display: flex;
  gap: var(--space-1);
}

.lf-nav a {
  display: block;
  padding: var(--space-2) var(--space-3);
  border-radius: 6px;
  color: var(--lf-ink);
  font-size: var(--font-size-sm);
  font-weight: 600;
  text-decoration: none;
}

.lf-nav a:hover {
  background: var(--lf-teal-pale);
  color: var(--lf-teal-dark-text);
  text-decoration: none;
}

.lf-menu-btn {
  display: none;
}

.lf-saved-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  min-height: 42px;
  padding: 0 var(--space-4);
  border: 1.5px solid var(--lf-line-strong);
  border-radius: 999px;
  background: var(--lf-paper);
  color: var(--lf-ink);
  font-size: var(--font-size-sm);
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}

.lf-saved-btn svg {
  width: 18px;
  height: 18px;
  color: var(--lf-red-text);
}

.lf-saved-btn:hover {
  border-color: var(--lf-teal);
}

.lf-saved-btn[aria-pressed="true"] {
  border-color: var(--lf-teal);
  background: var(--lf-teal);
  color: #fff;
}

.lf-saved-btn[aria-pressed="true"] svg {
  color: #fff;
  fill: currentColor;
}

.lf-saved-n {
  display: inline-grid;
  place-items: center;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--lf-stone);
  color: var(--lf-ink);
  font-size: var(--font-size-xs);
  font-variant-numeric: tabular-nums;
}

.lf-saved-btn[aria-pressed="true"] .lf-saved-n {
  background: var(--lf-card);
  color: var(--lf-teal-dark-text);
}

/* ---------- Search band ---------- */

.lf-search {
  position: relative;
  padding: var(--space-12) 0 var(--space-8);
  background:
    radial-gradient(ellipse 60% 90% at 88% 0%, rgba(211, 166, 74, 0.22), transparent 70%),
    linear-gradient(160deg, var(--lf-teal-dark), var(--lf-teal-deep));
  color: var(--lf-on-night);
  overflow: hidden;
}

.lf-search::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 90px;
  background: rgba(255, 250, 240, 0.05);
  clip-path: polygon(0 100%, 0 60%, 6% 60%, 6% 35%, 9% 20%, 12% 35%, 12% 60%, 22% 60%, 22% 45%, 26% 30%, 30% 45%, 30% 60%, 44% 60%, 44% 50%, 52% 50%, 52% 60%, 64% 60%, 64% 30%, 67% 16%, 70% 30%, 70% 60%, 78% 60%, 78% 42%, 83% 28%, 88% 42%, 88% 60%, 100% 60%, 100% 100%);
}

.lf-search .lf-wrap {
  position: relative;
  z-index: 1;
}

.lf-search .lf-eyebrow {
  color: var(--lf-brass);
}

.lf-search-top {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--space-6) var(--space-10);
  margin-bottom: var(--space-8);
}

.lf-hero-facts {
  display: flex;
  gap: var(--space-8);
  padding-bottom: var(--space-2);
}

.lf-hero-facts div {
  display: flex;
  flex-direction: column-reverse;
  gap: var(--space-1);
  padding-left: var(--space-4);
  border-left: 2px solid var(--lf-brass);
}

.lf-hero-facts dt {
  font-size: var(--font-size-sm);
  color: #d9e6e2;
}

.lf-hero-facts dd {
  font-family: var(--lf-display);
  font-size: 2.8rem;
  line-height: 1;
  color: #fffaf0;
}

.lf-title {
  max-width: 17ch;
  font-family: var(--lf-display);
  font-size: clamp(2.3rem, 4.6vw, 3.9rem);
  font-weight: 400;
  line-height: 1.04;
  letter-spacing: -0.01em;
  color: #fffaf0;
}

.lf-filters {
  padding: var(--space-5) var(--space-6);
  border-radius: 14px;
  background: var(--lf-paper);
  color: var(--lf-ink);
  box-shadow: 0 18px 40px rgba(4, 24, 22, 0.35);
}

.lf-filter-row {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) minmax(0, 1fr) auto auto;
  align-items: end;
  gap: var(--space-4);
}

.lf-beds .lf-seg span {
  min-width: 46px;
}

.lf-more-btn {
  min-height: 46px;
  border-radius: 8px;
}

.lf-more-btn svg {
  transition: transform var(--transition-fast);
}

.lf-more-btn[aria-expanded="true"] svg {
  transform: rotate(180deg);
}

.lf-more-n:not(:empty) {
  display: inline-grid;
  place-items: center;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--lf-teal);
  color: #fff;
  font-size: var(--font-size-xs);
}

.lf-more-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: var(--space-5) var(--space-8);
  margin-top: var(--space-5);
  padding-top: var(--space-5);
  border-top: 1px solid var(--lf-line);
}

.lf-group > legend {
  margin-bottom: var(--space-2);
}

/* ---------- Results ---------- */

.lf-results {
  padding: var(--space-8) 0 var(--space-16);
}

.lf-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--space-4) var(--space-6);
  margin-bottom: var(--space-6);
  padding-bottom: var(--space-5);
  border-bottom: 1px solid var(--lf-line);
}

.lf-results-title {
  font-family: var(--lf-display);
  font-size: clamp(1.7rem, 3vw, 2.3rem);
  font-weight: 400;
  line-height: 1.1;
  font-variant-numeric: lining-nums;
}

.lf-results-title {
  scroll-margin-top: 92px;
}

.lf-results-title:focus {
  outline: none;
}

.lf-results-title:focus-visible {
  outline: 3px solid var(--lf-teal);
}

.lf-summary {
  margin-top: var(--space-1);
  color: var(--lf-muted);
}

.lf-bar-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-3) var(--space-5);
}

.lf-sort {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.lf-page .lf-sort .lf-select {
  width: auto;
  min-height: 42px;
}

.lf-view {
  display: none;
  padding: 3px;
  border-radius: 999px;
  background: var(--lf-stone);
}

.lf-view-btn {
  min-height: 38px;
  padding: 0 var(--space-4);
  border: 0;
  border-radius: 999px;
  background: none;
  color: var(--lf-ink);
  font-size: var(--font-size-sm);
  font-weight: 700;
  cursor: pointer;
}

.lf-view-btn[aria-pressed="true"] {
  background: var(--lf-paper);
  color: var(--lf-teal-dark-text);
  box-shadow: 0 1px 3px rgba(29, 42, 42, 0.18);
}

.lf-saved-note {
  margin: calc(-1 * var(--space-2)) 0 var(--space-5);
  padding: var(--space-3) var(--space-4);
  border-radius: 8px;
  background: var(--lf-teal-pale);
  color: var(--lf-teal-dark-text);
  font-size: var(--font-size-sm);
  font-weight: 600;
}

.lf-split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 0.78fr);
  align-items: start;
  gap: var(--space-8);
}

.lf-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: var(--space-6);
}

/* ---------- Card ---------- */

.lf-card-in {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  border: 1px solid var(--lf-line);
  border-radius: 12px;
  background: var(--lf-paper);
  overflow: hidden;
  transition: box-shadow var(--transition-base), transform var(--transition-base), border-color var(--transition-base);
}

.lf-card-in:hover,
.lf-card.is-hot .lf-card-in {
  border-color: var(--lf-line-strong);
  box-shadow: var(--lf-shadow);
  transform: translateY(-2px);
}

.lf-card.is-hot .lf-card-in {
  border-color: var(--lf-teal);
  box-shadow: 0 0 0 2px var(--lf-teal), var(--lf-shadow);
}

.lf-card-in:focus-within {
  border-color: var(--lf-teal);
}

.lf-card-media {
  position: relative;
}

.lf-badge {
  position: absolute;
  top: var(--space-3);
  left: var(--space-3);
  z-index: 2;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: var(--font-size-xs);
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.lf-badge--new {
  background: var(--lf-brass);
  color: var(--lf-on-fill);
}

.lf-badge--reduced {
  background: var(--lf-red);
  color: #fff;
}

.lf-badge--offer {
  background: var(--lf-night);
  color: #fff;
}

.lf-save {
  position: absolute;
  top: var(--space-2);
  right: var(--space-2);
  z-index: 2;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: var(--lf-glass-2);
  color: var(--lf-ink);
  box-shadow: 0 1px 4px rgba(29, 42, 42, 0.2);
  cursor: pointer;
  transition: transform var(--transition-fast), color var(--transition-fast);
}

.lf-save svg {
  width: 22px;
  height: 22px;
}

.lf-save:hover {
  color: var(--lf-red-text);
  transform: scale(1.06);
}

.lf-save[aria-pressed="true"] {
  color: var(--lf-red-text);
}

.lf-save[aria-pressed="true"] svg,
.lf-d-save[aria-pressed="true"] svg {
  fill: currentColor;
}

.lf-card-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: var(--space-4) var(--space-5) var(--space-5);
}

.lf-price {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 2px var(--space-2);
  font-variant-numeric: tabular-nums;
}

.lf-qual {
  width: 100%;
  font-size: var(--font-size-xs);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--lf-brass-ink-text);
}

.lf-amount {
  font-size: 1.6rem;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.01em;
}

.lf-was {
  color: var(--lf-muted);
  font-size: var(--font-size-sm);
}

.lf-card-title {
  margin: var(--space-2) 0 var(--space-3);
  font-family: var(--lf-display);
  font-size: 1.3rem;
  font-weight: 400;
  line-height: 1.2;
}

.lf-open {
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

/* The title button stretches over the whole card; Save sits above it. */
.lf-open::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: 12px;
}

.lf-open:focus-visible {
  outline: 3px solid var(--lf-teal);
  outline-offset: 3px;
  border-radius: 2px;
}

.lf-card-in:hover .lf-open {
  color: var(--lf-teal-text);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.lf-specs {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-4);
  margin-bottom: var(--space-3);
  font-size: var(--font-size-sm);
  font-weight: 600;
}

.lf-specs li {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.lf-specs svg {
  width: 18px;
  height: 18px;
  color: var(--lf-teal-text);
}

.lf-teaser {
  margin-bottom: var(--space-4);
  color: var(--lf-muted);
  font-size: var(--font-size-sm);
  line-height: 1.5;
}

.lf-added {
  margin-top: auto;
  padding-top: var(--space-3);
  border-top: 1px dashed var(--lf-line);
  color: var(--lf-muted);
  font-size: var(--font-size-xs);
  font-weight: 600;
}

/* ---------- Drawn houses ----------
   One set of spans; each type moves them. Walls and roofs come from
   custom properties set by the lf-wall-* class. */

.lf-house {
  --wall: #cdbb96;
  --wall-dark: #b19e78;
  --roof: #3d4448;
  --trim: #fffaf0;
  --glass: #cfe2e4;
  --door: var(--lf-teal);
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background:
    radial-gradient(circle at 82% 22%, #fbe7b4 0 7%, transparent 7.5%),
    linear-gradient(180deg, #d9e8e3 0%, #eef2e6 70%, transparent 70%),
    linear-gradient(180deg, #a6bb8a 70%, #8fa877 100%);
}

.lf-house::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 42%;
  width: 16%;
  height: 30%;
  background: #e2d6bd;
  clip-path: polygon(30% 0, 70% 0, 100% 100%, 0 100%);
}

.lf-wall-brick { --wall: #b0613f; --wall-dark: #8f4a2f; }
.lf-wall-render { --wall: #f1e7d4; --wall-dark: #d8cab0; }
.lf-wall-stone { --wall: #d2c19b; --wall-dark: #b5a37b; }
.lf-wall-slate { --wall: #6d7a7f; --wall-dark: #56626a; --door: var(--lf-brass); }
.lf-wall-sage { --wall: #a9bc9f; --wall-dark: #8ea284; }

.lf-house span {
  position: absolute;
  display: block;
}

.lf-h-body {
  left: 28%;
  bottom: 30%;
  width: 44%;
  height: 34%;
  background: var(--wall);
  box-shadow: inset -10px 0 0 var(--wall-dark);
}

.lf-wall-brick .lf-h-body {
  background:
    repeating-linear-gradient(180deg, transparent 0 6px, rgba(0, 0, 0, 0.08) 6px 7px),
    var(--wall);
}

.lf-wall-stone .lf-h-body {
  background:
    repeating-linear-gradient(180deg, transparent 0 9px, rgba(90, 70, 40, 0.14) 9px 10px),
    var(--wall);
}

.lf-h-roof {
  left: 24%;
  bottom: 63.5%;
  width: 52%;
  height: 20%;
  background: var(--roof);
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
}

.lf-h-chim {
  left: 60%;
  bottom: 72%;
  width: 4.5%;
  height: 11%;
  background: var(--wall-dark);
  box-shadow: inset 0 3px 0 var(--roof);
}

.lf-h-w {
  width: 8%;
  height: 9%;
  background:
    linear-gradient(90deg, transparent 46%, var(--trim) 46% 54%, transparent 54%),
    linear-gradient(180deg, transparent 46%, var(--trim) 46% 54%, transparent 54%),
    var(--glass);
  box-shadow: 0 0 0 2px var(--trim);
}

.lf-h-w1 { left: 33%; bottom: 51%; }
.lf-h-w2 { left: 57%; bottom: 51%; }
.lf-h-w3 { left: 33%; bottom: 35%; }
.lf-h-w4 { left: 57%; bottom: 35%; }

.lf-h-door {
  left: 46%;
  bottom: 30%;
  width: 8%;
  height: 14%;
  border-radius: 40% 40% 0 0 / 22% 22% 0 0;
  background: var(--door);
  box-shadow: 0 0 0 2px var(--trim);
}

.lf-h-tree {
  left: 5%;
  bottom: 26%;
  width: 17%;
  height: 40%;
  background:
    radial-gradient(ellipse 50% 38% at 50% 38%, #6a8752 0 98%, transparent 100%),
    radial-gradient(ellipse 34% 26% at 34% 56%, #5b7746 0 98%, transparent 100%),
    linear-gradient(#6d5140, #6d5140) 50% 100% / 10% 42% no-repeat;
}

/* Cottage: low and long, deep roof with two dormers. */
.lf-house--cottage .lf-h-body { left: 22%; width: 56%; height: 24%; }
.lf-house--cottage .lf-h-roof {
  left: 19%;
  bottom: 53.5%;
  width: 62%;
  height: 22%;
  background: #6a5646;
  clip-path: polygon(14% 0, 86% 0, 100% 100%, 0 100%);
}
.lf-house--cottage .lf-h-chim { left: 70%; bottom: 70%; }
.lf-house--cottage .lf-h-w1 { left: 33%; bottom: 58%; width: 7%; height: 8%; }
.lf-house--cottage .lf-h-w2 { left: 60%; bottom: 58%; width: 7%; height: 8%; }
.lf-house--cottage .lf-h-w3 { left: 29%; bottom: 36%; width: 10%; }
.lf-house--cottage .lf-h-w4 { left: 61%; bottom: 36%; width: 10%; }
.lf-house--cottage .lf-h-door { height: 16%; border-radius: 3px 3px 0 0; }

/* Terrace: a row of three, party walls drawn with a gradient. */
.lf-house--terrace .lf-h-body {
  left: 4%;
  width: 92%;
  height: 38%;
  background:
    linear-gradient(90deg, transparent 33%, rgba(0, 0, 0, 0.18) 33% 33.6%, transparent 33.6% 66.4%, rgba(0, 0, 0, 0.18) 66.4% 67%, transparent 67%),
    repeating-linear-gradient(180deg, transparent 0 6px, rgba(0, 0, 0, 0.08) 6px 7px),
    var(--wall);
  box-shadow: none;
}
.lf-house--terrace .lf-h-roof {
  left: 2%;
  bottom: 67.5%;
  width: 96%;
  height: 11%;
  clip-path: polygon(4% 0, 96% 0, 100% 100%, 0 100%);
}
.lf-house--terrace .lf-h-chim { left: 32%; bottom: 76%; width: 5%; height: 9%; }
.lf-house--terrace .lf-h-w1 { left: 38%; bottom: 53%; }
.lf-house--terrace .lf-h-w2 { left: 54%; bottom: 53%; }
.lf-house--terrace .lf-h-w3 { left: 38%; bottom: 36%; }
.lf-house--terrace .lf-h-w4 { left: 80%; bottom: 53%; }
.lf-house--terrace .lf-h-door { left: 55%; }
.lf-house--terrace .lf-h-tree { display: none; }

/* Flat: a tall block, flat roof and a grid of windows. */
.lf-house--flat .lf-h-body {
  left: 26%;
  bottom: 26%;
  width: 48%;
  height: 62%;
  background:
    repeating-linear-gradient(180deg, var(--wall) 0 7%, transparent 7% 17%),
    linear-gradient(180deg, transparent 80%, var(--wall) 80%),
    linear-gradient(90deg, transparent 12%, var(--glass) 12% 28%, transparent 28% 42%, var(--glass) 42% 58%, transparent 58% 72%, var(--glass) 72% 88%, transparent 88%),
    var(--wall);
  box-shadow: inset -10px 0 0 var(--wall-dark), inset 0 6px 0 var(--wall-dark);
}
.lf-house--flat .lf-h-roof,
.lf-house--flat .lf-h-chim,
.lf-house--flat .lf-h-w { display: none; }
.lf-house--flat .lf-h-door { left: 45%; bottom: 26%; width: 10%; height: 11%; border-radius: 0; }
.lf-house--flat .lf-h-tree { left: 78%; bottom: 24%; width: 15%; height: 34%; }
.lf-house--flat::after { bottom: 0; height: 26%; }

/* Bungalow: single storey under a hipped roof. */
.lf-house--bungalow .lf-h-body { left: 20%; width: 60%; height: 24%; }
.lf-house--bungalow .lf-h-roof {
  left: 16%;
  bottom: 53.5%;
  width: 68%;
  height: 16%;
  background: #7a4a3a;
  clip-path: polygon(22% 0, 78% 0, 100% 100%, 0 100%);
}
.lf-house--bungalow .lf-h-chim { display: none; }
.lf-house--bungalow .lf-h-w1 { left: 27%; bottom: 37%; width: 13%; height: 10%; }
.lf-house--bungalow .lf-h-w2 { left: 60%; bottom: 37%; width: 13%; height: 10%; }
.lf-house--bungalow .lf-h-w3,
.lf-house--bungalow .lf-h-w4 { display: none; }
.lf-house--bungalow .lf-h-door { height: 16%; }
.lf-house--bungalow .lf-h-tree { left: 82%; }

/* Barn: one big dark gable with a glazed threshing door. */
.lf-house--barn .lf-h-body { left: 24%; width: 52%; height: 36%; }
.lf-house--barn .lf-h-roof {
  left: 21%;
  bottom: 65.5%;
  width: 58%;
  height: 24%;
  background: #2f3538;
}
.lf-house--barn .lf-h-chim,
.lf-house--barn .lf-h-w3,
.lf-house--barn .lf-h-w4,
.lf-house--barn .lf-h-door { display: none; }
.lf-house--barn .lf-h-w1 {
  left: 41%;
  bottom: 30%;
  width: 18%;
  height: 30%;
  background:
    linear-gradient(90deg, transparent 32%, var(--trim) 32% 36%, transparent 36% 64%, var(--trim) 64% 68%, transparent 68%),
    linear-gradient(180deg, #f8e3a8, #cfe2e4);
}
.lf-house--barn .lf-h-w2 { left: 30%; bottom: 50%; width: 6%; height: 8%; }

/* House: the base drawing, detached with a porch roof. */
.lf-house--house .lf-h-door::before {
  content: "";
  position: absolute;
  left: -30%;
  top: -22%;
  width: 160%;
  height: 16%;
  background: var(--roof);
}

/* ---------- Map ---------- */

.lf-map-col {
  position: sticky;
  top: 88px;
}

.lf-map {
  position: relative;
  height: min(640px, calc(100vh - 150px));
  min-height: 420px;
  border: 1px solid var(--lf-line-strong);
  border-radius: 14px;
  background: #ebe5d5;
  overflow: hidden;
}

.lf-map-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.lf-map-svg * {
  vector-effect: non-scaling-stroke;
}

.lf-m-wood { fill: #cfd9b8; stroke: none; }
.lf-m-town { fill: #e2d8c3; stroke: #d4c8ae; stroke-width: 1; }
.lf-m-river { stroke: #8fbcc0; stroke-width: 14; }
.lf-m-canal { stroke: #8fbcc0; stroke-width: 6; }
.lf-m-road { stroke: #fffdf9; stroke-width: 5; }
.lf-m-road--main { stroke: #f2d49a; stroke-width: 8; }
.lf-m-rail { stroke: #7d7566; stroke-width: 2; stroke-dasharray: 8 5; }

.lf-map-label {
  position: absolute;
  transform: translate(-50%, -50%);
  font-family: var(--lf-display);
  font-size: 1.05rem;
  font-style: italic;
  color: #4a4336;
  white-space: nowrap;
  pointer-events: none;
  text-shadow: 0 0 3px #ebe5d5, 0 0 6px #ebe5d5;
}

.lf-map-label--kettle { left: 20%; top: 14%; }
.lf-map-label--ashcombe { left: 51%; top: 31%; font-size: 1.3rem; }
.lf-map-label--holm { left: 83%; top: 71%; }
.lf-map-label--weald { left: 26%; top: 92%; }

.lf-map-station {
  position: absolute;
  left: 36%;
  top: 57%;
  padding: 1px 6px;
  border-radius: 4px;
  background: var(--lf-night);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  pointer-events: none;
}

.lf-pin {
  position: absolute;
  z-index: 2;
  transform: translate(-50%, -100%);
  display: block;
  padding: 4px 9px;
  border: 1.5px solid var(--lf-teal-dark);
  border-radius: 8px;
  background: var(--lf-paper);
  color: var(--lf-teal-dark-text);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.3;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(29, 42, 42, 0.22);
  transition: background-color var(--transition-fast), color var(--transition-fast), transform var(--transition-fast);
}

.lf-pin::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -7px;
  width: 10px;
  height: 10px;
  margin-left: -5px;
  border-right: 1.5px solid var(--lf-teal-dark);
  border-bottom: 1.5px solid var(--lf-teal-dark);
  background: inherit;
  transform: rotate(45deg);
}

.lf-pin--offer {
  border-style: dashed;
}

.lf-pin:hover,
.lf-pin.is-hot,
.lf-pin[aria-pressed="true"] {
  z-index: 3;
  background: var(--lf-teal);
  color: #fff;
  transform: translate(-50%, -100%) scale(1.08);
}

.lf-pin[aria-pressed="true"] {
  background: var(--lf-brass);
  color: var(--lf-on-fill);
  border-color: var(--lf-ink);
}

.lf-pin[aria-pressed="true"]::after {
  border-color: var(--lf-ink);
}

.lf-peek {
  position: absolute;
  right: var(--space-3);
  bottom: var(--space-3);
  left: var(--space-3);
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding: var(--space-4);
  border-radius: 12px;
  background: var(--lf-paper);
  box-shadow: 0 10px 30px rgba(29, 42, 42, 0.25);
}

.lf-peek-price {
  font-size: 1.2rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.lf-peek-name {
  font-family: var(--lf-display);
  font-size: 1.1rem;
}

.lf-peek-specs {
  color: var(--lf-muted);
  font-size: var(--font-size-sm);
}

.lf-peek .lf-btn {
  flex: none;
}

.lf-map-note {
  margin-top: var(--space-2);
  color: var(--lf-muted);
  font-size: var(--font-size-xs);
  line-height: 1.5;
}

/* ---------- Empty state ---------- */

.lf-empty {
  display: grid;
  justify-items: center;
  padding: var(--space-10) var(--space-6);
  border: 2px dashed var(--lf-line-strong);
  border-radius: 14px;
  text-align: center;
}

.lf-empty-art {
  width: 180px;
  margin-bottom: var(--space-5);
  border-radius: 10px;
  filter: grayscale(0.7);
  opacity: 0.8;
}

.lf-empty h3 {
  margin-bottom: var(--space-2);
  font-family: var(--lf-display);
  font-size: 1.6rem;
  font-weight: 400;
}

.lf-empty p {
  max-width: 42ch;
  margin-bottom: var(--space-5);
  color: var(--lf-muted);
}

/* ---------- Area guide ---------- */

.lf-areas {
  padding: var(--space-16) 0;
  background: var(--lf-stone);
}

.lf-section-head {
  max-width: 640px;
  margin-bottom: var(--space-10);
}

.lf-section-head h2,
.lf-val-copy h2 {
  margin-bottom: var(--space-3);
  font-family: var(--lf-display);
  font-size: clamp(2rem, 3.6vw, 2.9rem);
  font-weight: 400;
  line-height: 1.08;
}

.lf-section-head p:last-child {
  color: var(--lf-muted);
  font-size: var(--font-size-md);
}

.lf-area-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--space-5);
}

.lf-area {
  display: flex;
  flex-direction: column;
  padding: 0 var(--space-5) var(--space-5);
  border-radius: 12px;
  background: var(--lf-paper);
  overflow: hidden;
}

.lf-area::before {
  content: "";
  display: block;
  height: 96px;
  margin: 0 calc(-1 * var(--space-5)) var(--space-5);
}

.lf-area--ashcombe::before {
  background:
    linear-gradient(180deg, transparent 55%, #9aa98a 55%),
    linear-gradient(90deg, transparent 8%, #b0613f 8% 18%, transparent 18% 22%, #d2c19b 22% 30%, transparent 30% 33%, #6d7a7f 33% 36%, transparent 36% 40%, #b0613f 40% 58%, transparent 58% 62%, #f1e7d4 62% 74%, transparent 74% 78%, #d2c19b 78% 92%, transparent 92%) 0 100% / 100% 60% no-repeat,
    linear-gradient(180deg, #cfe1dc, #eef0e4);
}

.lf-area--kettle::before {
  background:
    radial-gradient(ellipse 30% 40% at 72% 60%, #6a8752 0 96%, transparent 100%),
    radial-gradient(ellipse 60% 30% at 40% 100%, #8fad6a 0 99%, transparent 100%),
    linear-gradient(180deg, transparent 62%, #a6bb8a 62%),
    linear-gradient(180deg, #d9e8e3, #eef2e6);
}

.lf-area--holm::before {
  background:
    linear-gradient(180deg, transparent 58%, #8fbcc0 58% 76%, #a6bb8a 76%),
    linear-gradient(90deg, transparent 60%, #6d7a7f 60% 82%, transparent 82%) 0 58% / 100% 30% no-repeat,
    linear-gradient(180deg, #d4e3e6, #eef2ef);
}

.lf-area--weald::before {
  background:
    radial-gradient(ellipse 70% 60% at 30% 100%, #8fa877 0 99%, transparent 100%),
    radial-gradient(ellipse 60% 70% at 85% 100%, #a6bb8a 0 99%, transparent 100%),
    radial-gradient(circle at 80% 30%, #fbe7b4 0 10%, transparent 11%),
    linear-gradient(180deg, #e7d9b8, #f2ece0);
}

.lf-area h3 {
  margin-bottom: var(--space-2);
  font-family: var(--lf-display);
  font-size: 1.5rem;
  font-weight: 400;
}

.lf-area p {
  margin-bottom: var(--space-4);
  color: var(--lf-muted);
  font-size: var(--font-size-sm);
  line-height: 1.55;
}

.lf-area dl {
  display: grid;
  gap: var(--space-2);
  margin-bottom: var(--space-5);
  padding-top: var(--space-3);
  border-top: 1px solid var(--lf-line);
}

.lf-area dl div {
  display: flex;
  justify-content: space-between;
  gap: var(--space-3);
  font-size: var(--font-size-sm);
}

.lf-area dt {
  color: var(--lf-muted);
}

.lf-area dd {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.lf-area .lf-btn {
  margin-top: auto;
}

/* ---------- Valuation ---------- */

.lf-valuation {
  padding: var(--space-16) 0;
  background:
    radial-gradient(ellipse 50% 80% at 0% 100%, rgba(211, 166, 74, 0.18), transparent 70%),
    var(--lf-teal-dark);
  color: var(--lf-on-night);
}

.lf-val-in {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  align-items: center;
  gap: var(--space-12);
}

.lf-eyebrow--dark {
  color: var(--lf-brass);
}

.lf-val-copy h2 {
  color: #fffaf0;
}

.lf-val-copy > p {
  max-width: 52ch;
  margin-bottom: var(--space-8);
  font-size: var(--font-size-md);
  line-height: 1.6;
}

.lf-val-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-4);
}

.lf-val-stats div {
  display: flex;
  flex-direction: column-reverse;
  gap: var(--space-1);
  padding-top: var(--space-3);
  border-top: 2px solid var(--lf-brass);
}

.lf-val-stats dt {
  font-size: var(--font-size-sm);
  line-height: 1.4;
}

.lf-val-stats dd {
  font-family: var(--lf-display);
  font-size: 2.4rem;
  line-height: 1;
  color: #fffaf0;
}

.lf-val-form {
  display: grid;
  gap: var(--space-4);
  padding: var(--space-8);
  border-radius: 14px;
  background: var(--lf-paper);
  color: var(--lf-ink);
  box-shadow: 0 18px 40px rgba(4, 24, 22, 0.35);
}

.lf-val-form h3 {
  font-family: var(--lf-display);
  font-size: 1.6rem;
  font-weight: 400;
}

.lf-val-form .lf-status:not(:empty) {
  margin-top: 0;
}

/* ---------- Footer ---------- */

.lf-footer {
  padding: var(--space-12) 0 var(--space-8);
  background: var(--lf-night);
  color: #e7e1d4;
}

.lf-footer-in {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: var(--space-8);
  padding-bottom: var(--space-8);
}

.lf-footer p {
  line-height: 1.7;
}

.lf-footer-brand {
  margin-bottom: var(--space-3);
  font-family: var(--lf-display);
  font-size: 1.8rem;
  color: #fffaf0;
}

.lf-footer .lf-footer-brand span {
  color: var(--lf-brass);
}

.lf-footer-title {
  margin-bottom: var(--space-3);
  font-size: var(--font-size-xs);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--lf-brass);
}

.lf-hours div {
  display: flex;
  justify-content: space-between;
  gap: var(--space-4);
  padding: var(--space-2) 0;
  border-bottom: 1px solid rgba(231, 225, 212, 0.16);
}

.lf-hours dd {
  text-align: right;
}

.lf-footer-nav li + li {
  margin-top: var(--space-2);
}

.lf-footer-nav a {
  color: #fffaf0;
  text-decoration: underline;
  text-decoration-color: rgba(211, 166, 74, 0.6);
  text-underline-offset: 4px;
}

.lf-footer-nav a:hover {
  color: var(--lf-brass);
}

.lf-footer :focus-visible,
.lf-valuation .lf-val-copy :focus-visible {
  outline-color: var(--lf-brass);
}

.lf-small {
  max-width: var(--lf-wrap);
  margin: 0 auto;
  padding: var(--space-5) var(--space-6) 0;
  border-top: 1px solid rgba(231, 225, 212, 0.16);
  color: #c9c2b3;
  font-size: var(--font-size-xs);
  line-height: 1.6;
}

/* ---------- Toast ---------- */

.lf-toast {
  position: fixed;
  left: 50%;
  bottom: var(--space-6);
  z-index: 60;
  display: flex;
  align-items: center;
  gap: var(--space-3);
  width: max-content;
  max-width: calc(100vw - 32px);
  padding: var(--space-3) var(--space-3) var(--space-3) var(--space-5);
  border-radius: 12px;
  background: var(--lf-night);
  color: #fff;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  transform: translateX(-50%);
  animation: lf-rise var(--transition-base) both;
}

.lf-toast p {
  font-size: var(--font-size-sm);
  line-height: 1.45;
}

.lf-toast-close {
  flex: none;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  cursor: pointer;
}

.lf-toast-close svg {
  width: 16px;
  height: 16px;
}

.lf-toast :focus-visible {
  outline-color: var(--lf-brass);
}

@keyframes lf-rise {
  from { opacity: 0; transform: translate(-50%, 12px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

/* ---------- Detail dialog ---------- */

.lf-detail {
  width: min(1100px, calc(100% - 32px));
  max-width: none;
  max-height: calc(100vh - 32px);
  padding: 0;
  border: 0;
  border-radius: 16px;
  background: var(--lf-paper);
  color: var(--lf-ink);
  box-shadow: 0 30px 80px rgba(4, 24, 22, 0.45);
}

.lf-detail::backdrop {
  background: rgba(8, 30, 28, 0.62);
}

.lf-detail[open] {
  display: flex;
  flex-direction: column;
  animation: lf-pop var(--transition-base) both;
}

@keyframes lf-pop {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}

.lf-d-head {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-4) var(--space-5) var(--space-4) var(--space-6);
  border-bottom: 1px solid var(--lf-line);
}

.lf-d-head-text {
  flex: 1;
  min-width: 0;
}

.lf-d-head .lf-price {
  gap: 0 var(--space-2);
}

.lf-d-head .lf-qual {
  width: auto;
}

.lf-d-head .lf-amount {
  font-size: 1.35rem;
}

.lf-d-title {
  font-family: var(--lf-display);
  font-size: clamp(1.4rem, 2.6vw, 1.9rem);
  font-weight: 400;
  line-height: 1.15;
}

.lf-d-save {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  min-height: 42px;
  padding: 0 var(--space-4);
  border: 1.5px solid var(--lf-line-strong);
  border-radius: 999px;
  background: var(--lf-paper);
  color: var(--lf-ink);
  font-size: var(--font-size-sm);
  font-weight: 700;
  cursor: pointer;
}

.lf-d-save svg {
  width: 20px;
  height: 20px;
  color: var(--lf-red-text);
}

.lf-d-save:hover {
  border-color: var(--lf-teal);
}

.lf-close {
  flex: none;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: var(--lf-stone);
  color: var(--lf-ink);
  cursor: pointer;
}

.lf-close:hover {
  background: var(--lf-line);
}

.lf-close svg {
  width: 20px;
  height: 20px;
}

.lf-d-body {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  align-items: start;
  gap: var(--space-8);
  padding: var(--space-6);
  overflow-y: auto;
  overscroll-behavior: contain;
}

.lf-gallery {
  position: sticky;
  top: 0;
}

.lf-g-stage {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  background: var(--lf-stone);
}

.lf-g-stage .lf-house,
.lf-scene {
  width: 100%;
}

.lf-g-cap {
  position: absolute;
  left: var(--space-3);
  bottom: var(--space-3);
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(29, 42, 42, 0.78);
  color: #fff;
  font-size: var(--font-size-xs);
  font-weight: 700;
}

.lf-g-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  margin: var(--space-3) 0;
}

.lf-g-btn {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1.5px solid var(--lf-line-strong);
  border-radius: 50%;
  background: var(--lf-paper);
  color: var(--lf-ink);
  cursor: pointer;
}

.lf-g-btn:hover {
  border-color: var(--lf-teal);
  color: var(--lf-teal-text);
}

.lf-g-btn svg {
  width: 20px;
  height: 20px;
}

.lf-g-count {
  font-size: var(--font-size-sm);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.lf-g-thumbs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-2);
}

.lf-g-thumb {
  padding: 0;
  border: 2px solid transparent;
  border-radius: 8px;
  background: none;
  overflow: hidden;
  cursor: pointer;
  opacity: 0.72;
  transition: opacity var(--transition-fast), border-color var(--transition-fast);
}

.lf-g-thumb:hover {
  opacity: 1;
}

.lf-g-thumb[aria-pressed="true"] {
  border-color: var(--lf-teal);
  opacity: 1;
}

.lf-g-thumb > * {
  pointer-events: none;
}

/* Kitchen and garden scenes for the gallery, drawn like the houses. */
.lf-scene {
  --wall: #d2c19b;
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
}

.lf-scene span {
  position: absolute;
  display: block;
}

.lf-scene--kitchen {
  background:
    linear-gradient(180deg, #efe6d4 0 62%, #b99870 62% 64%, #d9c4a2 64%);
}

.lf-k-window {
  left: 38%;
  top: 10%;
  width: 24%;
  height: 32%;
  background:
    linear-gradient(90deg, transparent 47%, #fffaf0 47% 53%, transparent 53%),
    linear-gradient(180deg, #cfe2e4, #a6bb8a);
  box-shadow: 0 0 0 5px #fffaf0;
}

.lf-k-units {
  left: 6%;
  right: 6%;
  top: 46%;
  height: 26%;
  background:
    repeating-linear-gradient(90deg, var(--lf-teal) 0 calc(20% - 3px), #0a4943 calc(20% - 3px) 20%);
  box-shadow: 0 -8px 0 #efe9dd;
}

.lf-k-upper {
  left: 6%;
  width: 26%;
  top: 8%;
  height: 22%;
  background: repeating-linear-gradient(90deg, var(--lf-teal) 0 calc(50% - 2px), #0a4943 calc(50% - 2px) 50%);
}

.lf-k-upper2 {
  right: 6%;
  width: 26%;
  top: 8%;
  height: 22%;
  background: repeating-linear-gradient(90deg, var(--lf-teal) 0 calc(50% - 2px), #0a4943 calc(50% - 2px) 50%);
}

.lf-k-lamp {
  top: 0;
  width: 7%;
  height: 26%;
  background:
    linear-gradient(var(--lf-ink), var(--lf-ink)) 50% 0 / 4% 70% no-repeat,
    radial-gradient(ellipse 50% 40% at 50% 100%, var(--lf-brass) 0 98%, transparent 100%);
}

.lf-k-lamp1 { left: 30%; }
.lf-k-lamp2 { left: 63%; }

.lf-k-island {
  left: 22%;
  right: 22%;
  bottom: 6%;
  height: 22%;
  background: linear-gradient(180deg, #f5efe2 0 22%, #6d7a7f 22%);
  border-radius: 3px;
}

.lf-scene--garden {
  background:
    linear-gradient(180deg, #d9e8e3 0 44%, #9db57f 44% 100%);
}

.lf-g-back {
  left: 8%;
  top: 8%;
  width: 56%;
  height: 40%;
  background: var(--wall);
  clip-path: polygon(0 30%, 50% 0, 100% 30%, 100% 100%, 0 100%);
  box-shadow: inset 0 0 0 999px rgba(0, 0, 0, 0.06);
}

.lf-g-doors {
  left: 26%;
  top: 30%;
  width: 20%;
  height: 18%;
  background:
    linear-gradient(90deg, transparent 48%, #fffaf0 48% 52%, transparent 52%),
    #cfe2e4;
  box-shadow: 0 0 0 3px #fffaf0;
}

.lf-g-patio {
  left: 0;
  top: 48%;
  width: 70%;
  height: 12%;
  background: repeating-linear-gradient(90deg, #d8ccb4 0 18%, #c9bb9f 18% 19%);
}

.lf-g-path {
  left: 30%;
  top: 60%;
  width: 16%;
  height: 40%;
  background: #e2d6bd;
  clip-path: polygon(30% 0, 70% 0, 100% 100%, 0 100%);
}

.lf-g-fence {
  right: 0;
  top: 32%;
  width: 34%;
  height: 16%;
  background: repeating-linear-gradient(90deg, #8a6a4c 0 9%, #a3825f 9% 18%);
}

.lf-g-tree {
  right: 8%;
  top: 10%;
  width: 24%;
  height: 56%;
  background:
    radial-gradient(ellipse 50% 36% at 50% 36%, #5b7746 0 98%, transparent 100%),
    radial-gradient(ellipse 30% 24% at 30% 54%, #6a8752 0 98%, transparent 100%),
    linear-gradient(#6d5140, #6d5140) 50% 100% / 9% 44% no-repeat;
}

.lf-g-bed {
  left: 4%;
  bottom: 8%;
  width: 22%;
  height: 14%;
  border-radius: 50% 50% 0 0;
  background:
    radial-gradient(circle at 20% 40%, #e3a6a0 0 8%, transparent 9%),
    radial-gradient(circle at 55% 30%, #f2d49a 0 8%, transparent 9%),
    radial-gradient(circle at 80% 50%, #e3a6a0 0 8%, transparent 9%),
    #6a8752;
}

.lf-d-main {
  display: grid;
  gap: var(--space-6);
  min-width: 0;
}

.lf-d-offer {
  padding: var(--space-3) var(--space-4);
  border-radius: 8px;
  background: var(--lf-stone);
  font-size: var(--font-size-sm);
  font-weight: 600;
}

.lf-specs--lg {
  margin: 0;
  padding: var(--space-4) 0;
  border-top: 1px solid var(--lf-line);
  border-bottom: 1px solid var(--lf-line);
  font-size: var(--font-size-base);
}

.lf-specs--lg svg {
  width: 22px;
  height: 22px;
}

.lf-d-desc {
  display: grid;
  gap: var(--space-4);
}

.lf-d-desc .lf-more-desc {
  font-size: var(--font-size-md);
  line-height: 1.6;
}

.lf-d-desc .lf-more-feats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-2) var(--space-4);
}

.lf-d-desc .lf-more-feats li {
  position: relative;
  padding-left: 22px;
  font-size: var(--font-size-sm);
  line-height: 1.45;
}

.lf-d-desc .lf-more-feats li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 5px;
  width: 10px;
  height: 6px;
  border-left: 2px solid var(--lf-teal);
  border-bottom: 2px solid var(--lf-teal);
  transform: rotate(-45deg);
}

.lf-d-desc .lf-more-facts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--space-3);
}

.lf-d-desc .lf-more-facts div {
  padding: var(--space-3);
  border-radius: 8px;
  background: var(--lf-stone);
}

.lf-d-desc .lf-more-facts dt {
  color: var(--lf-muted);
  font-size: var(--font-size-xs);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.lf-d-desc .lf-more-facts dd {
  font-weight: 700;
}

.lf-epc h3,
.lf-calc h3,
.lf-viewing h3 {
  margin-bottom: var(--space-3);
  font-family: var(--lf-display);
  font-size: 1.4rem;
  font-weight: 400;
}

.lf-epc-scale {
  display: grid;
  gap: 3px;
}

.lf-epc-scale li {
  --bar: 30%;
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-size: var(--font-size-xs);
  font-weight: 800;
}

.lf-epc-scale span {
  display: flex;
  align-items: center;
  width: var(--bar);
  height: 20px;
  padding-left: 8px;
  color: var(--lf-ink);
  clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 50%, calc(100% - 10px) 100%, 0 100%);
}

.lf-epc-scale [data-band="A"] { --bar: 30%; }
.lf-epc-scale [data-band="B"] { --bar: 38%; }
.lf-epc-scale [data-band="C"] { --bar: 46%; }
.lf-epc-scale [data-band="D"] { --bar: 54%; }
.lf-epc-scale [data-band="E"] { --bar: 62%; }
.lf-epc-scale [data-band="F"] { --bar: 70%; }
.lf-epc-scale [data-band="G"] { --bar: 78%; }
.lf-epc-scale [data-band="A"] span { background: #1b7f4c; color: #fff; }
.lf-epc-scale [data-band="B"] span { background: #4aad5d; }
.lf-epc-scale [data-band="C"] span { background: #9ac74a; }
.lf-epc-scale [data-band="D"] span { background: #f3cc3c; }
.lf-epc-scale [data-band="E"] span { background: #f2a946; }
.lf-epc-scale [data-band="F"] span { background: #ee8a4c; }
.lf-epc-scale [data-band="G"] span { background: #ec6f5a; }

.lf-epc-scale li[aria-current] span {
  height: 28px;
  box-shadow: inset 0 0 0 2px var(--lf-ink);
  font-size: var(--font-size-sm);
}

.lf-epc-scale li[aria-current]::after {
  content: attr(data-label);
  font-size: var(--font-size-sm);
  font-weight: 700;
}

.lf-calc,
.lf-viewing {
  padding: var(--space-5);
  border: 1px solid var(--lf-line);
  border-radius: 12px;
  background: var(--lf-ground);
}

.lf-calc-form {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: var(--space-3);
}

.lf-calc-out {
  margin-top: var(--space-4);
  padding-top: var(--space-4);
  border-top: 1px solid var(--lf-line);
}

.lf-calc-monthly {
  font-size: 1.1rem;
}

.lf-calc-monthly strong {
  font-family: var(--lf-display);
  font-size: 2.3rem;
  font-weight: 400;
  line-height: 1;
  color: var(--lf-teal-dark-text);
  font-variant-numeric: lining-nums tabular-nums;
}

.lf-calc-line {
  margin-top: var(--space-1);
  color: var(--lf-muted);
  font-size: var(--font-size-sm);
}

.lf-calc-note {
  margin-top: var(--space-3);
  color: var(--lf-muted);
  font-size: var(--font-size-xs);
}

.lf-v-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-4);
}

.lf-v-form > .lf-field:first-child,
.lf-v-times,
.lf-v-form > .lf-btn,
.lf-v-form > .lf-status {
  grid-column: 1 / -1;
}

.lf-v-form > .lf-status:not(:empty) {
  margin-top: 0;
}

.lf-seg--times {
  flex-wrap: wrap;
}

.lf-seg--times label {
  flex: 1 0 20%;
}

/* ---------- Responsive ---------- */

@media (max-width: 1180px) {
  .lf-filter-row {
    grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
  }

  .lf-filter-row .lf-beds {
    grid-column: 1 / 3;
  }

  .lf-filter-row .lf-more-btn {
    grid-column: 3 / 5;
    justify-self: start;
  }

  .lf-area-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 1099px) {
  .lf-split {
    grid-template-columns: minmax(0, 1fr);
  }

  .lf-view {
    display: inline-flex;
  }

  .lf-map-col {
    display: none;
    position: static;
  }

  .lf-split.is-map .lf-map-col {
    display: block;
  }

  .lf-split.is-map .lf-list-col {
    display: none;
  }

  .lf-map {
    height: min(620px, 72vh);
    min-height: 380px;
  }
}

@media (max-width: 900px) {
  .lf-val-in {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--space-8);
  }

  .lf-d-body {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--space-6);
  }

  .lf-gallery {
    position: static;
  }

  .lf-footer-in {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .lf-footer-in > :first-child {
    grid-column: 1 / -1;
  }
}

/* Tablet: room for the mode toggle. The Saved label is kept for
   screen readers but drawn as heart and count only. */
@media (min-width: 761px) and (max-width: 1000px) {
  .lf-header-in {
    gap: var(--space-3);
  }

  .lf-saved-word {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }
}

@media (max-width: 760px) {
  .lf-header {
    position: static;
  }

  .lf-page section[id],
  .lf-page footer[id] {
    scroll-margin-top: 12px;
  }

  .lf-results-title {
    scroll-margin-top: 16px;
  }

  .lf-header-in {
    flex-wrap: wrap;
    gap: var(--space-3);
    min-height: 60px;
    padding: var(--space-2) var(--space-4);
  }

  .lf-menu-btn {
    display: inline-flex;
    align-items: center;
    min-height: 42px;
    margin-left: auto;
    padding: 0 var(--space-4);
    border: 1.5px solid var(--lf-line-strong);
    border-radius: 999px;
    background: var(--lf-paper);
    color: var(--lf-ink);
    font-size: var(--font-size-sm);
    font-weight: 700;
    cursor: pointer;
  }

  .lf-menu-btn[aria-expanded="true"] {
    border-color: var(--lf-teal);
    background: var(--lf-teal-pale);
  }

  .lf-nav {
    display: none;
    order: 5;
    width: 100%;
    margin: 0;
  }

  .lf-nav.is-open {
    display: block;
  }

  .lf-nav ul {
    flex-direction: column;
    padding: var(--space-2) 0 var(--space-3);
    border-top: 1px solid var(--lf-line);
  }

  .lf-nav a {
    padding: var(--space-3);
    font-size: var(--font-size-base);
  }

  .lf-wrap {
    padding: 0 var(--space-4);
  }

  .lf-search {
    padding-top: var(--space-8);
  }

  .lf-title {
    margin-bottom: var(--space-6);
  }

  .lf-filters {
    padding: var(--space-4);
  }

  .lf-filter-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .lf-filter-row .lf-field:first-child,
  .lf-filter-row .lf-beds,
  .lf-filter-row .lf-more-btn {
    grid-column: 1 / -1;
  }

  .lf-filter-row .lf-more-btn {
    justify-self: stretch;
  }

  .lf-beds .lf-seg span {
    min-width: 0;
  }

  .lf-bar {
    align-items: stretch;
  }

  .lf-bar-tools {
    width: 100%;
    justify-content: space-between;
  }

  .lf-areas,
  .lf-valuation {
    padding: var(--space-12) 0;
  }

  .lf-val-stats dd {
    font-size: 2rem;
  }

  .lf-val-form {
    padding: var(--space-5);
  }

  .lf-calc-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .lf-calc-form .lf-field:first-child {
    grid-column: 1 / -1;
  }

  .lf-d-desc .lf-more-facts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .lf-detail {
    width: 100%;
    max-height: 100%;
    height: 100%;
    margin: 0;
    border-radius: 0;
  }

  .lf-d-head {
    flex-wrap: wrap;
    gap: var(--space-2) var(--space-3);
    padding: var(--space-3) var(--space-3) var(--space-3) var(--space-4);
  }

  .lf-d-head-text {
    flex-basis: calc(100% - 60px);
  }

  .lf-d-head .lf-close {
    order: -1;
    margin-left: auto;
  }

  .lf-d-head-text {
    order: -2;
  }

  .lf-d-save {
    min-height: 38px;
  }

  .lf-d-body {
    padding: var(--space-4);
  }

  .lf-calc,
  .lf-viewing {
    padding: var(--space-4);
  }
}

@media (max-width: 560px) {
  .lf-list {
    grid-template-columns: minmax(0, 1fr);
  }

  .lf-area-list {
    grid-template-columns: minmax(0, 1fr);
  }

  .lf-val-stats {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--space-3);
  }

  .lf-val-stats div {
    flex-direction: row-reverse;
    justify-content: flex-end;
    align-items: baseline;
    gap: var(--space-3);
  }

  .lf-footer-in {
    grid-template-columns: minmax(0, 1fr);
  }

  .lf-v-form {
    grid-template-columns: minmax(0, 1fr);
  }

  .lf-d-desc .lf-more-feats {
    grid-template-columns: minmax(0, 1fr);
  }

  .lf-sort .lf-select {
    max-width: 150px;
  }

  .lf-peek {
    flex-wrap: wrap;
  }

  .lf-peek .lf-btn {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .lf-logo-text {
    font-size: 1.4rem;
  }

  .lf-logo-mark {
    width: 28px;
    height: 28px;
  }

  .lf-header-in {
    gap: var(--space-2);
  }

  .lf-saved-word {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
  }

  .lf-hero-facts {
    gap: var(--space-5);
  }

  .lf-hero-facts dd {
    font-size: 2.1rem;
  }
}

@media (max-width: 400px) {
  .lf-logo-text {
    font-size: 1.25rem;
  }

  .lf-saved-btn,
  .lf-menu-btn {
    padding: 0 var(--space-3);
  }

  .lf-seg span {
    padding: 0 var(--space-2);
  }

  .lf-calc-form {
    grid-template-columns: minmax(0, 1fr);
  }

  .lf-map-label {
    font-size: 0.9rem;
  }

  .lf-map-label--ashcombe {
    font-size: 1.05rem;
  }
}

@media (max-width: 370px) {
  .lf-logo-mark {
    display: none;
  }

  .lf-logo-text {
    font-size: 1.15rem;
  }

  .lf-saved-btn,
  .lf-menu-btn {
    padding: 0 10px;
  }
}

@media (max-width: 360px) {
  .lf-filter-row {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (prefers-reduced-motion: reduce) {
  html:has(.lf-page) {
    scroll-behavior: auto;
  }

  .lf-page *,
  .lf-page *::before,
  .lf-page *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }

  .lf-card-in:hover,
  .lf-card.is-hot .lf-card-in {
    transform: none;
  }
}
