/* ============================================================
   databuurt — design system (brand v1)
   ------------------------------------------------------------
   Palette: slate-teal primary + terracotta accent + warm sand
   Type:    Fraunces (display) + Inter (UI) + JetBrains Mono (num)
   Tokens:  spacing scale, radii, shadows, type ramp
   ------------------------------------------------------------
   Migrated from brand-tokens.css per
   agents/decisions/2026-05-24-brand-identity.md §7.
   ============================================================ */

:root {
  /* ---------- brand: slate teal (primary) ---------- */
  --brand-900: #0f2a28;  /* darkest — body on extreme dark surfaces */
  --brand-800: #13332f;  /* primary text on dark, headings on light */
  --brand-700: #1e4d4a;  /* PRIMARY brand color — buttons, links, logo */
  --brand-600: #2d6a66;  /* hover, secondary fills */
  --brand-500: #4a8f8a;  /* active states, mid-tone icons */
  --brand-100: #d9e8e6;  /* tints (badge-bg, table-row hover) */
  --brand-050: #ecf3f1;  /* canvas tint, very subtle backgrounds */

  /* ---------- accent: terracotta (secondary / warmth) ---------- */
  --accent-700: #a64a2e;
  --accent-600: #c2603f;  /* PRIMARY accent — chip dots, italic display */
  --accent-500: #d97757;  /* hover, secondary accent */
  --accent-100: #f6e0d4;  /* tint — light pill backgrounds */

  /* ---------- neutrals: warm sand → ink ---------- */
  --ink-900: #0c1f1c;
  --ink-700: #243936;
  --ink-600: #3a5957;
  --ink-500: #5d7975;
  --ink-400: #8a9c99;
  --ink-300: #b8c4c1;
  --ink-200: #d8cdb9;  /* warm divider — sand-leaning */
  --ink-100: #e8e0cf;
  --ink-050: #f0e9da;
  --paper:   #fbf7ef;  /* off-white warm */
  --canvas:  #f4ece1;  /* "buurt-zand" — page bg, OG hero */

  /* ---------- semantic ---------- */
  --success-700: #2a5e3c;
  --success-500: #3f8a5a;
  --success-100: #d8ead8;
  --danger-700:  #8a2e2a;
  --danger-500:  #b4453c;
  --danger-100:  #f4d4cf;
  --warn-700:    #8a5a1a;
  --warn-500:    #c2872c;
  --warn-100:    #f4e3c2;

  /* ---------- spacing scale (4px base) ---------- */
  --s-1: 4px;
  --s-2: 8px;
  --s-3: 12px;
  --s-4: 16px;
  --s-5: 20px;
  --s-6: 24px;
  --s-7: 32px;
  --s-8: 40px;
  --s-9: 56px;
  --s-10: 72px;

  /* ---------- radii ---------- */
  /* Slightly softer than v0 — Caregiver leans round. */
  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 14px;
  --r-xl: 20px;
  --r-pill: 999px;

  /* ---------- elevation ---------- */
  /* Tinted with brand-900 (teal) instead of pure black for warmth coherence. */
  --sh-1: 0 1px 2px rgba(15, 42, 40, 0.06), 0 1px 1px rgba(15, 42, 40, 0.04);
  --sh-2: 0 2px 6px rgba(15, 42, 40, 0.08), 0 1px 2px rgba(15, 42, 40, 0.05);
  --sh-3: 0 6px 18px rgba(15, 42, 40, 0.11), 0 2px 4px rgba(15, 42, 40, 0.05);
  --sh-pop: 0 14px 36px rgba(15, 42, 40, 0.16);

  /* ---------- type ---------- */
  --font-sans:    "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-display: "Fraunces", "IBM Plex Serif", Georgia, serif;
  --font-mono:    "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --font-feat-sans:    "cv11", "ss01";
  --font-feat-display: "opsz" 60;
  --font-num-tabular:  "tnum" 1;

  /* ---------- layout (unchanged) ---------- */
  --maxw: 1320px;
  --content-px: clamp(16px, 3vw, 32px);
  --header-h: 64px;
}

/* ---------- reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }
html, body {
  margin: 0; padding: 0;
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.55;
  color: var(--ink-900);
  background: var(--canvas);
  font-feature-settings: "cv11", "ss01";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: var(--brand-700);
  text-decoration: none;
  transition: color 120ms ease;
}
a:hover { color: var(--brand-800); text-decoration: underline; text-underline-offset: 2px; }
a:focus-visible {
  outline: 2px solid var(--brand-500);
  outline-offset: 2px;
  border-radius: 2px;
}

h1, h2, h3, h4 { margin: 0 0 var(--s-3); color: var(--brand-800); letter-spacing: -0.01em; }
h1 { font-size: 1.75rem; font-weight: 600; }
h2 { font-size: 1.125rem; font-weight: 600; }
p { margin: 0 0 var(--s-3); }

.display {
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.12;
  /* Fraunces optical-size axis — hero-warm at large sizes. */
  font-variation-settings: "opsz" 96;
}
h1.display { font-size: clamp(1.7rem, 2.8vw, 2.4rem); }

.eyebrow {
  margin: 0 0 var(--s-2);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brand-600);
}

.lede {
  font-size: 1.0625rem;
  color: var(--ink-600);
  max-width: 60ch;
}

.muted { color: var(--ink-500); font-size: 0.9em; }
.nowrap { white-space: nowrap; }
.num {
  font-variant-numeric: tabular-nums;
  font-family: var(--font-mono);
  text-align: right;
}
th.num { text-align: right; font-family: var(--font-sans); }

/* ---------- topbar ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--paper);
  border-bottom: 1px solid var(--ink-200);
  box-shadow: var(--sh-1);
  backdrop-filter: saturate(140%) blur(6px);
}
.topbar-inner {
  display: flex;
  align-items: center;
  gap: var(--s-6);
  height: var(--header-h);
  padding: 0 var(--content-px);
  max-width: var(--maxw);
  margin: 0 auto;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--s-3);
  color: var(--brand-700);
  font-weight: 600;
  letter-spacing: -0.01em;
}
.brand:hover { text-decoration: none; color: var(--brand-800); }
.brand-mark {
  /* SVG asset (logo-mark.svg) — sized via width/height attrs on the <img>.
     Keep the box neutral; the asset is self-contained. */
  flex: 0 0 auto;
  display: block;
}
.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}
.brand-name {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--brand-700);
}
.brand-tag {
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--ink-500);
  letter-spacing: 0.02em;
}

.topnav {
  display: flex;
  gap: var(--s-1);
  margin-left: var(--s-3);
}
.navlink {
  position: relative;
  display: inline-flex;
  align-items: center;
  padding: var(--s-2) var(--s-3);
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--ink-700);
  border-radius: var(--r-md);
  transition: background 120ms ease, color 120ms ease;
}
.navlink:hover { background: var(--ink-100); color: var(--brand-800); text-decoration: none; }
.navlink.is-active {
  color: var(--brand-800);
  background: var(--brand-050);
}
.navlink.is-active::after {
  content: "";
  position: absolute;
  left: var(--s-3); right: var(--s-3);
  bottom: -1px;
  height: 2px;
  background: var(--accent-500);
  border-radius: 2px 2px 0 0;
}

.topmeta {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: var(--s-2);
  font-size: 0.82rem;
  color: var(--ink-600);
}
.topmeta-pill {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  padding: var(--s-1) var(--s-3);
  background: var(--ink-050);
  border: 1px solid var(--ink-200);
  border-radius: var(--r-pill);
}
.topmeta-pill strong { color: var(--ink-900); font-weight: 600; }
.topmeta-sep {
  width: 1px; height: 14px; background: var(--ink-200);
}
.dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--success-500);
  box-shadow: 0 0 0 3px rgba(63, 138, 90, 0.18);
}

/* ---------- main / footer ---------- */
main {
  padding: var(--s-6) var(--content-px) var(--s-8);
  max-width: var(--maxw);
  margin: 0 auto;
}

.sitefoot {
  border-top: 1px solid var(--ink-200);
  background: var(--paper);
  margin-top: var(--s-9);
}
.sitefoot-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: var(--s-5) var(--content-px);
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-4);
  justify-content: space-between;
  font-size: 0.85rem;
  color: var(--ink-600);
}

/* ---------- breadcrumbs ---------- */
.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-2);
  align-items: center;
  font-size: 0.85rem;
  color: var(--ink-500);
  margin: 0 0 var(--s-4);
}
.breadcrumbs a { color: var(--ink-600); }
.breadcrumbs a:hover { color: var(--brand-700); }
.breadcrumbs span[aria-hidden] { color: var(--ink-400); }

/* ---------- hero (home) ---------- */
.hero {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: var(--s-6);
  padding: var(--s-6) 0 var(--s-5);
  margin-bottom: var(--s-4);
}
.hero-text { max-width: 68ch; }
.hero .display { margin: var(--s-2) 0 var(--s-3); }
.hero-stats {
  display: flex;
  gap: var(--s-3);
  margin: 0;
  padding: 0;
}
.hero-stats > div {
  background: var(--paper);
  border: 1px solid var(--ink-200);
  border-radius: var(--r-lg);
  padding: var(--s-3) var(--s-5);
  min-width: 110px;
  box-shadow: var(--sh-1);
}
.hero-stats dt {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-500);
}
.hero-stats dd {
  margin: 2px 0 0;
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--brand-800);
  font-variant-numeric: tabular-nums;
}
.hero-stats .hero-date { font-size: 1rem; }

@media (max-width: 760px) {
  .hero { grid-template-columns: 1fr; align-items: start; }
  .hero-stats { flex-wrap: wrap; }
  .hero-stats > div { flex: 1 1 30%; min-width: 0; padding: var(--s-3) var(--s-4); }
}

/* ---------- map ---------- */
.map-section {
  position: relative;
  border-radius: var(--r-lg);
  overflow: hidden;
  border: 1px solid var(--ink-200);
  box-shadow: var(--sh-2);
  background: var(--paper);
}
#map {
  height: calc(100vh - 280px);
  min-height: 480px;
  background: var(--ink-050);
}
@media (max-width: 760px) {
  #map { height: 62vh; min-height: 380px; }
}

.legend {
  position: absolute;
  right: var(--s-4); top: var(--s-4);
  z-index: 500;
  max-width: 240px;
  background: rgba(255, 255, 255, 0.97);
  padding: var(--s-3) var(--s-4);
  border-radius: var(--r-md);
  border: 1px solid var(--ink-200);
  box-shadow: var(--sh-3);
  font-size: 0.82rem;
  color: var(--ink-700);
  backdrop-filter: blur(4px);
}
.legend .row {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  margin: 3px 0;
  line-height: 1.3;
}
.legend .row strong {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-600);
  margin-bottom: var(--s-1);
}
.legend .sw {
  width: 16px; height: 12px;
  display: inline-block;
  border: 1px solid rgba(0, 0, 0, 0.18);
  border-radius: 2px;
  flex: 0 0 auto;
}
@media (max-width: 760px) {
  .legend {
    right: var(--s-2); top: var(--s-2);
    padding: var(--s-2) var(--s-3);
    font-size: 0.76rem;
    max-width: 60%;
  }
}

.hint {
  margin-top: var(--s-3);
  color: var(--ink-500);
  font-size: 0.85rem;
}

.tooltip-box { font-size: 0.85rem; line-height: 1.45; color: var(--ink-900); }
.tooltip-box .name {
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: var(--s-1);
  color: var(--brand-800);
}

/* Leaflet tooltip skin */
.leaflet-tooltip {
  background: rgba(255, 255, 255, 0.98) !important;
  border: 1px solid var(--ink-200) !important;
  border-radius: var(--r-md) !important;
  box-shadow: var(--sh-3) !important;
  padding: var(--s-2) var(--s-3) !important;
  color: var(--ink-900) !important;
}
.leaflet-tooltip-top:before,
.leaflet-tooltip-bottom:before,
.leaflet-tooltip-left:before,
.leaflet-tooltip-right:before { border-color: transparent !important; }

/* ---------- page header (list pages) ---------- */
.page-hd {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: var(--s-4);
  padding: var(--s-2) 0 var(--s-5);
  border-bottom: 1px solid var(--ink-200);
  margin-bottom: var(--s-5);
}
.page-hd h1 { margin: var(--s-2) 0 var(--s-2); }
.page-hd p { margin: 0; }
@media (max-width: 600px) {
  .page-hd { flex-direction: column; align-items: stretch; }
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  padding: var(--s-2) var(--s-4);
  font-size: 0.9rem;
  font-weight: 500;
  border-radius: var(--r-md);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 120ms ease, border-color 120ms ease, color 120ms ease;
  text-decoration: none;
}
.btn:hover { text-decoration: none; }
.btn-primary {
  background: var(--brand-700);
  color: var(--paper);
}
.btn-primary:hover { background: var(--brand-600); color: var(--paper); }
.btn-secondary {
  background: var(--paper);
  color: var(--brand-700);
  border-color: var(--ink-200);
}
.btn-secondary:hover { background: var(--brand-050); border-color: var(--brand-100); color: var(--brand-800); }

/* ---------- card ---------- */
.card {
  background: var(--paper);
  border: 1px solid var(--ink-200);
  border-radius: var(--r-lg);
  padding: var(--s-5) var(--s-6);
  margin-bottom: var(--s-4);
  box-shadow: var(--sh-1);
}
.card--flush { padding: 0; overflow: hidden; }
.card--header { padding: var(--s-6); }
.card-title {
  margin: 0 0 var(--s-4);
  font-size: 1rem;
  font-weight: 600;
  color: var(--brand-800);
  letter-spacing: -0.005em;
  padding-bottom: var(--s-3);
  border-bottom: 1px solid var(--ink-100);
}
.card-count { color: var(--ink-500); font-weight: 500; font-size: 0.9em; }
.card-intro { margin-top: calc(-1 * var(--s-2)); margin-bottom: var(--s-4); }
.card-cta { margin: var(--s-4) 0 0; }

/* ---------- listing detail ---------- */
.listing-hd {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: var(--s-6);
  align-items: start;
}
.listing-hd-main h1 { margin: 0 0 var(--s-2); }
.listing-hd .listing-loc { margin: 0; }
.listing-hd .listing-loc .sep { color: var(--ink-400); margin: 0 var(--s-1); }
.price-block { text-align: right; }
.price-block .price {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 2.4vw, 2rem);
  font-weight: 600;
  color: var(--brand-800);
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
.price-block .price-meta {
  color: var(--ink-500);
  font-size: 0.85rem;
  margin-top: var(--s-1);
}
.price-block .price-meta strong { color: var(--ink-700); font-weight: 600; }
.quick-facts {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  margin-top: var(--s-3);
  justify-content: flex-end;
}
.fact {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  padding: var(--s-2) var(--s-3);
  background: var(--ink-050);
  border: 1px solid var(--ink-200);
  border-radius: var(--r-md);
  font-size: 0.8rem;
  color: var(--ink-600);
}
.fact-num { font-weight: 700; color: var(--ink-900); font-size: 0.95rem; }
.fact-unit { color: var(--ink-500); }
.fact-label { padding: 4px var(--s-2); }

@media (max-width: 720px) {
  .listing-hd { grid-template-columns: 1fr; }
  .price-block, .quick-facts { text-align: left; justify-content: flex-start; }
}

.photo-strip {
  display: flex;
  gap: var(--s-2);
  overflow-x: auto;
  margin: var(--s-4) 0;
  padding-bottom: var(--s-2);
  scrollbar-width: thin;
  scroll-snap-type: x mandatory;
}
.photo-strip img {
  height: 220px;
  flex: 0 0 auto;
  border-radius: var(--r-md);
  object-fit: cover;
  box-shadow: var(--sh-1);
  scroll-snap-align: start;
  background: var(--ink-100);
}
@media (max-width: 600px) {
  .photo-strip img { height: 180px; }
}

.grid.two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s-4);
}
@media (max-width: 900px) { .grid.two { grid-template-columns: 1fr; } }

/* ---------- tables ---------- */
table.kv {
  width: 100%;
  border-collapse: collapse;
}
table.kv th, table.kv td {
  padding: var(--s-2) 0;
  text-align: left;
  border-bottom: 1px solid var(--ink-100);
  vertical-align: top;
}
table.kv tr:last-child th, table.kv tr:last-child td { border-bottom: none; }
table.kv th {
  font-weight: 500;
  color: var(--ink-600);
  width: 38%;
  font-size: 0.85rem;
}
table.kv td { font-size: 0.92rem; color: var(--ink-900); }
table.kv-history th { font-variant-numeric: tabular-nums; color: var(--ink-500); }
table.kv-history td { font-variant-numeric: tabular-nums; font-weight: 500; }

.table-wrap {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

table.comp-table, table.reductions {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  background: var(--paper);
}
table.comp-table th, table.comp-table td,
table.reductions th, table.reductions td {
  padding: var(--s-3) var(--s-4);
  border-bottom: 1px solid var(--ink-100);
  text-align: left;
  vertical-align: middle;
}
table.comp-table thead th, table.reductions thead th {
  background: var(--ink-050);
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-600);
  border-bottom: 1px solid var(--ink-200);
  position: sticky;
  top: 0;
}
.comp-table--full thead th { border-radius: 0; }
table.comp-table tbody tr, table.reductions tbody tr { transition: background 80ms ease; }
table.comp-table tbody tr:hover, table.reductions tbody tr:hover { background: var(--brand-050); }
table.comp-table tbody tr:last-child td, table.reductions tbody tr:last-child td { border-bottom: none; }

.row-link { font-weight: 500; color: var(--brand-700); }
.row-link:hover { color: var(--brand-900); }
.row-sub { display: block; font-size: 0.78rem; margin-top: 1px; }

.iconlink {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px; height: 28px;
  border-radius: var(--r-sm);
  color: var(--ink-500);
  border: 1px solid transparent;
}
.iconlink:hover {
  color: var(--brand-700);
  background: var(--brand-050);
  border-color: var(--ink-200);
  text-decoration: none;
}

.delta-pos { color: var(--danger-700); font-weight: 600; }
.delta-neg { color: var(--success-700); font-weight: 600; }

.pill {
  display: inline-block;
  padding: 2px 8px;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: var(--r-pill);
  font-variant-numeric: tabular-nums;
}
.pill-down { background: rgba(63, 138, 90, 0.14); color: var(--success-700); }
.pill-up   { background: rgba(180, 69, 60, 0.14); color: var(--danger-700); }

/* ---------- empty state ---------- */
.empty {
  background: var(--paper);
  border: 1px dashed var(--ink-300);
  border-radius: var(--r-lg);
  padding: var(--s-8) var(--s-6);
  text-align: center;
  color: var(--ink-700);
}
.empty p { margin: var(--s-1) 0; }
.empty-icon { color: var(--brand-500); margin-bottom: var(--s-3); }
.empty-inline {
  background: var(--ink-050);
  border: 1px dashed var(--ink-300);
  border-radius: var(--r-md);
  padding: var(--s-5);
  text-align: center;
}

/* ---------- energielabel (EU-spec colors) ----------
   Order: A++++ A+++ A++ A+ A B C D E F G
   Greenest → reddest. Class selectors use escaped '+'.
*/
.label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  padding: 2px 8px 2px 8px;
  /* EU-spec colors kept; only border-radius softened per brand-guide §C
     so labels visually fit the rest of the system. */
  border-radius: 5px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  font-family: var(--font-sans);
  color: #fff;
  background: var(--ink-400);
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.12);
  position: relative;
  /* chevron right edge — subtle EU-label silhouette */
  clip-path: polygon(0 0, calc(100% - 7px) 0, 100% 50%, calc(100% - 7px) 100%, 0 100%);
  padding-right: 14px;
  line-height: 1.4;
}
.label-A\+\+\+\+ { background: #00a651; }
.label-A\+\+\+   { background: #2ab14c; }
.label-A\+\+     { background: #50b948; }
.label-A\+       { background: #8cc63f; }
.label-A         { background: #c4d600; color: #1a1a1a; text-shadow: none; }
.label-B         { background: #fff200; color: #1a1a1a; text-shadow: none; }
.label-C         { background: #fdb913; color: #1a1a1a; text-shadow: none; }
.label-D         { background: #f7941d; }
.label-E         { background: #f15a29; }
.label-F         { background: #ed1c24; }
.label-G         { background: #b51e2b; }

/* ---------- renovation step disclosure ---------- */
.reno-detail { display: inline-block; margin-top: var(--s-1); }
.reno-detail summary {
  cursor: pointer;
  font-size: 0.78rem;
  color: var(--brand-600);
  list-style: none;
}
.reno-detail summary::-webkit-details-marker { display: none; }
.reno-detail summary::before {
  content: "▸";
  display: inline-block;
  margin-right: 4px;
  transition: transform 120ms ease;
  font-size: 0.7em;
}
.reno-detail[open] summary::before { transform: rotate(90deg); }
.reno-detail ul {
  margin: var(--s-2) 0 0 var(--s-4);
  padding: 0;
  font-size: 0.8rem;
  color: var(--ink-700);
  list-style: disc;
}
.reno-detail li { margin-bottom: 2px; }

/* ---------- small util ---------- */
@media (max-width: 720px) {
  .topmeta-hide-md { display: none; }
  .brand-tag { display: none; }
}
@media (max-width: 540px) {
  .topbar-inner { gap: var(--s-3); flex-wrap: wrap; height: auto; padding: var(--s-3) var(--s-4); }
  .topnav { order: 3; width: 100%; margin-left: 0; overflow-x: auto; }
  .topmeta { font-size: 0.75rem; flex-wrap: wrap; }
  :root { --header-h: auto; }
}

/* ============================================================
   Extensions: filter bars, search, pagination, compare grid
   ============================================================ */

.filterbar { padding: var(--s-4) var(--s-5); margin-bottom: var(--s-4); }
.filter-row {
  display: flex; flex-wrap: wrap; gap: var(--s-3) var(--s-4);
  align-items: end;
}
.filter-row + .filter-row { margin-top: var(--s-3); }
.filter-row label,
.filter-row .field {
  display: flex; flex-direction: column; gap: 4px;
  font-size: 0.78rem; font-weight: 600; color: var(--ink-600);
  letter-spacing: 0.03em; text-transform: uppercase;
}
.filter-row .field-label {
  font-size: 0.78rem; font-weight: 600; color: var(--ink-600);
  letter-spacing: 0.03em; text-transform: uppercase;
}
.filter-row select,
.filter-row input[type="text"],
.filter-row input[type="number"] {
  padding: 6px 10px; min-width: 140px;
  font: inherit; color: var(--ink-900);
  background: var(--paper);
  border: 1px solid var(--ink-300); border-radius: var(--r-md);
  text-transform: none; letter-spacing: 0;
}
.filter-row select:focus,
.filter-row input:focus {
  outline: 2px solid var(--brand-500); outline-offset: 1px;
  border-color: var(--brand-500);
}

.btn {
  display: inline-flex; align-items: center; gap: var(--s-2);
  padding: var(--s-2) var(--s-4);
  font: 500 0.92rem/1.1 var(--font-sans);
  border-radius: var(--r-md);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 120ms ease, border-color 120ms ease;
  text-decoration: none;
}
.btn-primary { background: var(--brand-700); color: var(--paper); }
.btn-primary:hover { background: var(--brand-600); color: var(--paper); text-decoration: none; }
.btn-secondary { background: var(--paper); color: var(--ink-700); border-color: var(--ink-300); }
.btn-secondary:hover { background: var(--ink-100); color: var(--brand-800); text-decoration: none; }

.pagination {
  display: flex; align-items: center; gap: var(--s-4);
  justify-content: center; margin: var(--s-5) 0;
}

.compare-grid {
  display: grid; gap: var(--s-4);
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}
.compare-card { display: flex; flex-direction: column; gap: var(--s-3); }
.compare-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s-3); margin: 0; }
.compare-stats dt { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--ink-500); }
.compare-stats dd { margin: 0; font-family: var(--font-display); font-size: 1.2rem; color: var(--ink-900); }
.compare-sub { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--ink-500); margin: var(--s-3) 0 var(--s-2); }
.label-grid { display: flex; flex-wrap: wrap; gap: var(--s-2); align-items: center; }

/* ============================================================
   Monetisation: footer-nav, pricing, B2B, API, contact, upsell
   ============================================================ */

/* footer */
.sitefoot-inner { align-items: flex-start; }
.sitefoot-col { display: flex; flex-direction: column; gap: var(--s-1); }
.sitefoot-nav {
  display: flex; flex-wrap: wrap; gap: var(--s-4);
  font-size: 0.88rem;
}
.sitefoot-nav a { color: var(--ink-700); }
.sitefoot-nav a:hover { color: var(--brand-800); }

/* hero CTA cluster shared by /voor-makelaars + /api */
.hero-cta {
  display: flex; flex-wrap: wrap; gap: var(--s-3);
  margin-top: var(--s-4);
}

/* ---------- pricing cards ---------- */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--s-4);
  margin: var(--s-4) 0 var(--s-6);
}
.price-card {
  position: relative;
  display: flex; flex-direction: column;
  background: var(--paper);
  border: 1px solid var(--ink-200);
  border-radius: var(--r-lg);
  padding: var(--s-6) var(--s-5) var(--s-5);
  box-shadow: var(--sh-1);
}
.price-card--popular {
  border-color: var(--accent-500);
  box-shadow: var(--sh-3);
  transform: translateY(-2px);
}
.price-badge {
  position: absolute;
  top: -10px; left: var(--s-5);
  background: var(--accent-500);
  color: var(--ink-900);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: var(--r-pill);
  box-shadow: var(--sh-1);
}
.price-card-hd h2 {
  margin: 0 0 var(--s-1);
  font-family: var(--font-display);
  font-size: 1.25rem;
  color: var(--brand-800);
}
.price-card-sub {
  margin: 0 0 var(--s-3);
  color: var(--ink-500);
  font-size: 0.88rem;
}
.price-card-price {
  margin: var(--s-2) 0 var(--s-1);
  display: flex; align-items: baseline; gap: 4px;
  font-variant-numeric: tabular-nums;
}
.price-num {
  font-family: var(--font-display);
  font-size: 1.8rem; font-weight: 600;
  color: var(--brand-800);
  letter-spacing: -0.01em;
}
.price-unit { color: var(--ink-500); font-size: 0.92rem; }
.price-card-altprice { margin: 0 0 var(--s-3); font-size: 0.82rem; }
.price-card-feats {
  list-style: none; padding: 0; margin: var(--s-3) 0 var(--s-5);
  display: flex; flex-direction: column; gap: var(--s-2);
  font-size: 0.92rem; color: var(--ink-700);
  flex: 1;
}
.price-card-feats li {
  position: relative; padding-left: 22px; line-height: 1.45;
}
.price-card-feats li::before {
  content: "";
  position: absolute; left: 0; top: 7px;
  width: 14px; height: 8px;
  border-left: 2px solid var(--success-500);
  border-bottom: 2px solid var(--success-500);
  transform: rotate(-45deg);
}
.price-card-feats li.muted::before {
  border-color: var(--ink-400);
}
.price-card-cta { margin-top: auto; align-self: stretch; justify-content: center; }
.pricing-extra { margin-top: var(--s-6); }
.pricing-extra .grid.two > div {
  display: flex; flex-direction: column; gap: var(--s-3);
}

/* FAQ */
.faq {
  border-bottom: 1px solid var(--ink-100);
  padding: var(--s-3) 0;
}
.faq:last-of-type { border-bottom: none; }
.faq summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--ink-900);
  list-style: none;
  display: flex; align-items: center; gap: var(--s-2);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::before {
  content: "+";
  display: inline-flex;
  align-items: center; justify-content: center;
  width: 18px; height: 18px;
  background: var(--brand-050);
  border: 1px solid var(--ink-200);
  border-radius: var(--r-sm);
  color: var(--brand-700);
  font-weight: 700;
  font-size: 0.85rem;
  transition: transform 120ms ease;
}
.faq[open] summary::before { content: "−"; }
.faq p {
  margin: var(--s-2) 0 0 26px;
  color: var(--ink-700);
}

/* ---------- B2B mockup table ---------- */
.mockup-card { background: linear-gradient(180deg, var(--paper) 0%, var(--ink-050) 100%); }
.mockup-bench {
  border: 1px solid var(--ink-200);
  border-radius: var(--r-md);
  overflow: hidden;
  background: var(--paper);
  margin: var(--s-3) 0 var(--s-2);
}
.mockup-row {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 0.7fr;
  gap: var(--s-3);
  padding: var(--s-3) var(--s-4);
  border-bottom: 1px solid var(--ink-100);
  font-size: 0.92rem;
  font-variant-numeric: tabular-nums;
  align-items: center;
}
.mockup-row:last-child { border-bottom: none; }
.mockup-row--head {
  background: var(--ink-050);
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-600);
}
.mockup-row span:nth-child(n+2) { text-align: right; }
.mockup-note { margin-top: var(--s-3); font-size: 0.82rem; }
@media (max-width: 600px) {
  .mockup-row { grid-template-columns: 1.6fr 1fr 1fr 0.7fr; padding: var(--s-2) var(--s-3); font-size: 0.85rem; }
}

/* ---------- API code blocks ---------- */
.code-block {
  background: var(--brand-900);
  color: #d8e6e2;
  padding: var(--s-4) var(--s-5);
  border-radius: var(--r-md);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  line-height: 1.55;
  overflow-x: auto;
  margin: var(--s-3) 0 var(--s-4);
  border: 1px solid var(--brand-700);
}
.code-block code { background: transparent; padding: 0; color: inherit; font: inherit; }

/* ---------- contact form ---------- */
.contact-form {
  display: flex; flex-direction: column;
  gap: var(--s-4);
}
.field { display: flex; flex-direction: column; gap: 6px; }
.field-label {
  font-size: 0.78rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.04em;
  color: var(--ink-600);
}
.field input,
.field select,
.field textarea {
  font: inherit;
  padding: var(--s-2) var(--s-3);
  color: var(--ink-900);
  background: var(--paper);
  border: 1px solid var(--ink-300);
  border-radius: var(--r-md);
  width: 100%;
}
.field textarea { resize: vertical; min-height: 120px; line-height: 1.5; }
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: 2px solid var(--brand-500);
  outline-offset: 1px;
  border-color: var(--brand-500);
}
.form-error {
  background: rgba(180, 69, 60, 0.08);
  border: 1px solid rgba(180, 69, 60, 0.35);
  color: var(--danger-700);
  padding: var(--s-2) var(--s-3);
  border-radius: var(--r-md);
  font-size: 0.9rem;
  margin-bottom: var(--s-3);
}
.contact-actions {
  display: flex; flex-wrap: wrap; gap: var(--s-3) var(--s-4); align-items: center;
}
.contact-meta { margin: 0; max-width: 36ch; }
.contact-intents { padding-left: var(--s-5); margin: 0 0 var(--s-3); }
.contact-intents li { margin-bottom: var(--s-2); }

/* ---------- upsell strip on listing pages ---------- */
.upsell {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: var(--s-3) var(--s-5);
  margin: var(--s-5) 0 var(--s-3);
  padding: var(--s-4) var(--s-5);
  background: var(--brand-050);
  border: 1px solid var(--brand-100);
  border-left: 3px solid var(--accent-500);
  border-radius: var(--r-md);
}
.upsell-text { display: flex; flex-direction: column; gap: 2px; max-width: 64ch; }
.upsell-text strong { color: var(--brand-800); font-weight: 600; }
.upsell .btn { flex: 0 0 auto; }

/* ============================================================
   Photo modal (listing lightbox)
   ============================================================ */
.photo-modal {
  display: none;
  position: fixed; inset: 0; z-index: 9999;
  background: rgba(15, 42, 40, 0.92);
  padding: var(--s-4);
}
.photo-modal.is-open { display: flex; align-items: center; justify-content: center; }
.photo-modal .pm-img { max-width: 92vw; max-height: 88vh; object-fit: contain; }
.photo-modal button {
  position: absolute; background: rgba(255,255,255,0.12); color: #fff;
  border: 1px solid rgba(255,255,255,0.3); border-radius: 50%;
  width: 44px; height: 44px; font-size: 1.6rem; line-height: 1; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  backdrop-filter: blur(4px);
}
.photo-modal button:hover { background: rgba(255,255,255,0.25); }
.photo-modal .pm-close { top: var(--s-4); right: var(--s-4); }
.photo-modal .pm-prev  { left: var(--s-4); top: 50%; transform: translateY(-50%); }
.photo-modal .pm-next  { right: var(--s-4); top: 50%; transform: translateY(-50%); }
.photo-modal .pm-count {
  position: absolute; bottom: var(--s-4); left: 50%; transform: translateX(-50%);
  color: #fff; font-size: 0.85rem; opacity: 0.8;
}

/* Card-as-link variant (used by /gids index) */
.card--link { display: block; text-decoration: none; color: inherit; transition: box-shadow 120ms ease, transform 120ms ease; }
.card--link:hover { text-decoration: none; box-shadow: var(--sh-3); transform: translateY(-1px); color: inherit; }
.prose h2 { margin-top: var(--s-5); }
.prose ul { padding-left: 1.2rem; }
.prose li { margin: 0.3rem 0; }

/* ============================================================
   Listing comparison picker
   ============================================================ */
.compare-toggle {
  display: inline-block;
  font: 500 0.72rem/1 var(--font-sans);
  padding: 2px 8px;
  margin-left: var(--s-2);
  background: transparent;
  color: var(--brand-600);
  border: 1px solid var(--brand-600);
  border-radius: var(--r-pill);
  cursor: pointer;
  white-space: nowrap;
}
.compare-toggle:hover { background: var(--brand-050); }
.compare-toggle.is-on { background: var(--brand-700); color: var(--paper); border-color: var(--brand-700); }
.compare-toggle:disabled { opacity: 0.4; cursor: not-allowed; }

.compare-bar {
  display: none;
  position: fixed; bottom: var(--s-4); left: 50%; transform: translateX(-50%);
  background: var(--brand-900); color: var(--paper);
  padding: var(--s-3) var(--s-4); border-radius: var(--r-pill);
  z-index: 1500;
  align-items: center; gap: var(--s-3);
  box-shadow: var(--sh-pop);
  font-size: 0.92rem;
}
.compare-bar.is-visible { display: inline-flex; }
.compare-bar-count { font-weight: 700; }
.compare-bar-clear {
  background: rgba(255,255,255,0.12); color: var(--paper);
  border: none; border-radius: 50%; width: 28px; height: 28px;
  cursor: pointer; font-size: 1.1rem;
}

/* ============================================================
   Forms v2 — chips multi-select, inline validation, live hints
   ============================================================ */

/* chips */
.chips {
  display: flex; flex-direction: column; gap: var(--s-2);
  text-transform: none; letter-spacing: 0; font-weight: 400;
  min-width: 220px;
}
.chips-list {
  display: flex; flex-wrap: wrap; gap: var(--s-1);
  min-height: 28px;
}
.chips-list:empty::before {
  content: "Nog niets gekozen";
  color: var(--ink-400);
  font-size: 0.82rem;
  padding: 4px 0;
}
.chip {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 4px 4px 4px 10px;
  background: var(--brand-050);
  border: 1px solid var(--brand-100);
  color: var(--brand-800);
  border-radius: var(--r-pill);
  font-size: 0.82rem;
  font-weight: 500;
  line-height: 1.1;
}
.chip-x {
  width: 22px; height: 22px;          /* >= 44 with adjacent click area */
  display: inline-flex; align-items: center; justify-content: center;
  border: none; background: transparent;
  color: var(--brand-600);
  cursor: pointer; border-radius: 50%;
  font-size: 1.1rem; line-height: 1;
}
.chip-x:hover { background: var(--brand-100); color: var(--brand-900); }
.chip-x:focus-visible { outline: 2px solid var(--brand-500); outline-offset: 1px; }
.chips-adder {
  display: flex; gap: var(--s-2); flex-wrap: wrap; align-items: stretch;
}
.chips-input, .chips-select {
  padding: 8px 10px;                  /* >= 44px height with line-height */
  min-height: 40px;
  font: inherit;
  color: var(--ink-900);
  background: var(--paper);
  border: 1px solid var(--ink-300);
  border-radius: var(--r-md);
  min-width: 160px;
  text-transform: none; letter-spacing: 0;
}
.chips-input:focus, .chips-select:focus {
  outline: 2px solid var(--brand-500); outline-offset: 1px;
  border-color: var(--brand-500);
}
.chips-add { min-height: 40px; }

/* inline field errors */
.field-err {
  display: block;
  min-height: 1em;
  font-size: 0.8rem;
  color: var(--danger-700);
  margin-top: 4px;
  text-transform: none; letter-spacing: 0; font-weight: 500;
}
.field.has-error input,
.field.has-error select,
.field.has-error textarea,
label.has-error input,
label.has-error select,
label.has-error textarea {
  border-color: var(--danger-500);
  background: rgba(180, 69, 60, 0.04);
}
[aria-invalid="true"] { border-color: var(--danger-500) !important; }

/* mobile-friendly tap targets */
@media (max-width: 760px) {
  .field input,
  .field select,
  .field textarea,
  .filter-row select,
  .filter-row input[type="text"],
  .filter-row input[type="number"],
  .chips-input, .chips-select {
    min-height: 44px;
    padding: 10px 12px;
    font-size: 16px;             /* prevents iOS zoom-on-focus */
  }
  .btn { min-height: 44px; padding: 10px 16px; }
  .chip-x { width: 28px; height: 28px; }
}

/* live €/m² hint */
.live-estimate {
  margin: var(--s-3) 0 var(--s-4);
}
.live-estimate:empty { display: none; }
.live-estimate-inner {
  display: flex; flex-direction: column; gap: 2px;
  padding: var(--s-3) var(--s-4);
  background: var(--brand-050);
  border: 1px solid var(--brand-100);
  border-left: 3px solid var(--accent-500);
  border-radius: var(--r-md);
}
.live-estimate-label {
  font-size: 0.72rem; font-weight: 600;
  letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--brand-700);
}
.live-estimate-val {
  font-family: var(--font-display);
  font-size: 1.15rem; color: var(--brand-900);
  font-variant-numeric: tabular-nums;
}
.live-estimate-val strong { font-weight: 600; }
.live-estimate-meta { font-size: 0.82rem; }

/* generic AJAX success card (contact, alerts widget) */
.success-card {
  text-align: center;
  padding: var(--s-6) var(--s-4);
  animation: fs-fade-in 240ms ease-out;
}
.success-card-icon {
  color: var(--success-500);
  margin-bottom: var(--s-3);
  display: inline-flex;
}
.success-tick {
  stroke-dasharray: 40;
  stroke-dashoffset: 40;
  animation: fs-tick 420ms 80ms ease-out forwards;
}
.success-card-title {
  margin: 0 0 var(--s-2);
  font-family: var(--font-display);
  font-size: 1.4rem;
  color: var(--brand-800);
}
.success-card-msg { color: var(--ink-600); margin: 0 auto; max-width: 38ch; }
@keyframes fs-fade-in {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: none; }
}
@keyframes fs-tick {
  to { stroke-dashoffset: 0; }
}

/* sticky filter on /zoeken */
.filterbar--sticky {
  position: sticky;
  top: var(--header-h);
  z-index: 100;
  /* slight blur + opacity so table rows show through subtly */
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: saturate(140%) blur(6px);
  box-shadow: var(--sh-2);
}
@media (max-width: 540px) {
  .filterbar--sticky { position: static; }   /* avoid stealing height on small screens */
}

/* loading skeleton (trends/makelaars first paint) */
.skeleton {
  display: inline-block;
  background: linear-gradient(90deg, var(--ink-100) 0%, var(--ink-200) 50%, var(--ink-100) 100%);
  background-size: 200% 100%;
  border-radius: var(--r-sm);
  animation: fs-shimmer 1.2s linear infinite;
  color: transparent !important;
}
@keyframes fs-shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
.is-loading-overlay {
  position: relative;
}
.is-loading-overlay::after {
  content: "";
  position: absolute; inset: 0;
  background: rgba(255,255,255,0.55);
  backdrop-filter: blur(1px);
  border-radius: inherit;
}

/* navigation progress bar (heavy pages) */
#nav-progress {
  position: fixed; top: 0; left: 0; right: 0;
  height: 3px;
  background: transparent;
  z-index: 2000;
  pointer-events: none;
  overflow: hidden;
}
#nav-progress::before {
  content: "";
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--brand-500), var(--accent-500));
  transition: width 1.4s ease-out;
}
#nav-progress.is-running::before {
  width: 88%;
  /* the page navigate aborts the JS context — width animates until then */
}

/* photo modal: keyboard hint */
.photo-modal .pm-hint {
  position: absolute;
  bottom: var(--s-4); right: var(--s-4);
  color: rgba(255,255,255,0.65);
  font-size: 0.78rem; line-height: 1.4;
  text-align: right;
  pointer-events: none;
  user-select: none;
}
.photo-modal .pm-hint kbd {
  display: inline-block;
  padding: 1px 6px; margin: 0 2px;
  background: rgba(255,255,255,0.14);
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: 3px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
}
@media (max-width: 600px) { .photo-modal .pm-hint { display: none; } }

/* listing equivalent-table calmer visual */
.equiv-bars { display: inline-block; min-width: 90px; vertical-align: middle; }
.equiv-bar {
  display: inline-block; height: 6px; border-radius: 3px;
  background: var(--ink-200);
  position: relative; overflow: hidden;
  width: 80px; margin-right: 6px;
}
.equiv-bar > span {
  position: absolute; top: 0; bottom: 0; left: 0;
  background: var(--brand-500);
}

/* 404 helper list */
.notfound-suggest {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: var(--s-3);
  margin-top: var(--s-5);
  text-align: left;
}
.notfound-suggest a {
  display: block;
  padding: var(--s-3) var(--s-4);
  background: var(--paper);
  border: 1px solid var(--ink-200);
  border-radius: var(--r-md);
  color: var(--ink-700);
  font-weight: 500;
}
.notfound-suggest a:hover {
  background: var(--brand-050);
  border-color: var(--brand-100);
  color: var(--brand-800);
  text-decoration: none;
}
.notfound-suggest small { display: block; color: var(--ink-500); font-weight: 400; font-size: 0.78rem; margin-top: 2px; }

/* ============================================================
   Alerts subscribe widget
   ============================================================ */
.alerts-widget {
  display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-4);
  padding: var(--s-4) var(--s-5);
  border-left: 4px solid var(--accent-500);
}
.alerts-widget-text { flex: 1 1 320px; }
.alerts-widget-form {
  display: flex; gap: var(--s-2); align-items: center; flex-wrap: wrap;
}
.alerts-widget-form input[type="email"] {
  padding: 8px 12px; min-width: 220px;
  font: inherit; color: var(--ink-900);
  background: var(--paper);
  border: 1px solid var(--ink-300); border-radius: var(--r-md);
}
.alerts-widget-form input[type="email"]:focus { outline: 2px solid var(--brand-500); }
.alerts-widget-msg { font-size: 0.85rem; color: var(--ink-500); }
.alerts-widget-msg.is-ok { color: var(--success-700); font-weight: 500; }
.alerts-widget-msg.is-error { color: var(--danger-700); }
.alerts-widget--done { border-left-color: var(--success-500); }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* ============================================================
   Price-position bar (USP: where does this listing sit vs peers)
   ============================================================ */
.position-bar { margin: var(--s-5) 0 var(--s-3); }
.position-bar-track {
  position: relative;
  height: 14px;
  /* gradient: success-green → warm sand mid → terracotta accent.
     Hues harmonised with new brand palette (teal-success, ink-100 sand,
     accent-500 terracotta). */
  background: linear-gradient(
    to right,
    #b8d4be 0%, #b8d4be 25%,
    #ede0c4 25%, #ede0c4 50%,
    #ede0c4 50%, #ede0c4 75%,
    #ecb7a3 75%, #ecb7a3 100%);
  border-radius: var(--r-pill);
  border: 1px solid var(--ink-200);
}
.position-bar-marker {
  position: absolute;
  top: -6px;
  width: 4px; height: 26px;
  background: var(--brand-800);
  border-radius: 2px;
  transform: translateX(-50%);
  box-shadow: 0 0 0 3px rgba(255,255,255,0.7);
}
.position-bar-marker-label {
  position: absolute;
  top: -22px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--brand-800);
  background: var(--paper);
  padding: 1px 6px;
  border-radius: var(--r-pill);
  border: 1px solid var(--ink-200);
  white-space: nowrap;
  line-height: 1.3;
}
.position-bar-median {
  position: absolute;
  top: -2px;
  width: 2px; height: 18px;
  background: var(--ink-700);
  transform: translateX(-50%);
  border-radius: 1px;
}
.position-bar-labels {
  display: flex; justify-content: space-between;
  margin-top: 6px;
  font-size: 0.75rem; color: var(--ink-500);
}
.position-bar-axis {
  display: flex;
  justify-content: space-between;
  margin-top: var(--s-2);
  font-size: 0.72rem;
  color: var(--ink-500);
  font-variant-numeric: tabular-nums;
}
.position-bar-axis-cheap { color: var(--success-700); font-weight: 500; }
.position-bar-axis-pricey { color: var(--danger-700); font-weight: 500; }
.position-bar-axis-mid { color: var(--ink-600); }
@media (max-width: 520px) {
  .position-bar-axis { font-size: 0.65rem; }
  .position-bar-axis-cheap { max-width: 35%; }
  .position-bar-axis-pricey { max-width: 35%; text-align: right; }
  .position-bar-marker-label { font-size: 0.62rem; padding: 1px 4px; }
}

/* ============================================================
   Info-tip (i) — inline tooltip helper, keyboard-focusable
   ============================================================ */
.info-tip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px; height: 14px;
  margin-left: 4px;
  vertical-align: 1px;
  border-radius: 50%;
  background: var(--ink-100);
  color: var(--ink-600);
  font-size: 0.7rem;
  font-weight: 700;
  font-style: italic;
  cursor: help;
  position: relative;
  user-select: none;
}
.info-tip::before { content: "i"; line-height: 1; }
.info-tip:hover, .info-tip:focus {
  background: var(--brand-100, var(--brand-050));
  color: var(--brand-800);
  outline: none;
}
.info-tip::after {
  content: attr(data-tip);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  width: max-content;
  max-width: 280px;
  padding: var(--s-2) var(--s-3);
  background: var(--ink-900);
  color: var(--paper);
  font-size: 0.75rem;
  font-weight: 400;
  font-style: normal;
  line-height: 1.4;
  border-radius: var(--r-sm);
  box-shadow: var(--sh-2);
  opacity: 0;
  pointer-events: none;
  transition: opacity 120ms ease;
  z-index: 30;
  white-space: normal;
  text-align: left;
}
.info-tip:hover::after, .info-tip:focus::after { opacity: 1; }
@media (max-width: 600px) {
  .info-tip::after { max-width: 220px; left: 0; transform: none; }
}

/* ============================================================
   WOZ delta — keep numbers + words on one line, wrap on mobile
   ============================================================ */
.woz-delta {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  margin-left: var(--s-1);
  flex-wrap: wrap;
}

/* ============================================================
   Mortgage mini-form (income → affordability)
   ============================================================ */
.mortgage-form {
  margin-top: var(--s-4);
  padding: var(--s-4);
  background: var(--ink-050);
  border: 1px solid var(--ink-100);
  border-radius: var(--r-md);
}
.mini-form-title {
  margin: 0 0 var(--s-1);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--ink-900);
}
.mortgage-form-row {
  display: flex;
  gap: var(--s-2);
  flex-wrap: wrap;
  align-items: stretch;
}
.mortgage-form-row .btn { white-space: nowrap; }
.mortgage-form-result { margin-top: var(--s-3); }
.mortgage-form-result:empty { margin-top: 0; }
.mortgage-verdict {
  padding: var(--s-3) var(--s-4);
  border-radius: var(--r-md);
  border: 1px solid;
  font-size: 0.92rem;
}
.mortgage-verdict-ok {
  background: rgba(63, 138, 90, 0.08);
  border-color: rgba(63, 138, 90, 0.35);
  color: var(--success-700);
}
.mortgage-verdict-gap {
  background: rgba(180, 69, 60, 0.07);
  border-color: rgba(180, 69, 60, 0.30);
  color: var(--danger-700);
}
.mortgage-verdict strong { color: inherit; }
.mortgage-verdict-meta {
  display: block;
  margin-top: var(--s-1);
  font-size: 0.82rem;
  color: var(--ink-600);
  font-weight: 400;
}
.mortgage-form-error {
  color: var(--danger-700);
  font-size: 0.85rem;
  margin: var(--s-2) 0 0;
}
@media (max-width: 520px) {
  .mortgage-form-row { flex-direction: column; }
  .mortgage-form-row .btn { width: 100%; }
}

/* ============================================================
   Disclaimer pill (brand v1 §5: trust > kleine grijze letters)
   ------------------------------------------------------------
   Promote disclaimers from <p class="muted"> to this pill.
   ============================================================ */
.disclaimer {
  display: inline-flex;
  align-items: baseline;
  gap: var(--s-2);
  padding: var(--s-2) var(--s-3);
  background: var(--warn-100);
  color: var(--warn-700);
  border: 1px solid rgba(194, 135, 44, 0.30);
  border-radius: var(--r-md);
  font-size: 0.85rem;
  line-height: 1.45;
}
.disclaimer::before {
  content: "i";
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px; height: 16px;
  background: var(--warn-500);
  color: var(--paper);
  font-size: 0.72rem;
  font-weight: 700;
  font-style: italic;
  border-radius: 50%;
  flex: 0 0 auto;
  line-height: 1;
  transform: translateY(2px);
}

/* ============================================================
   Print stylesheet — brand-guide §E: terracotta loses on B/W
   ============================================================ */
@media print {
  :root {
    --accent-700: #4a3027;
    --accent-600: #4a3027;
    --accent-500: #6b4538;
  }
  .topbar, .sitefoot, .upsell, .compare-bar, .alerts-widget { display: none !important; }
  body { background: #fff; color: #000; }
}
