/* Versie 3, "rustig maar compleet": warm grey-white ground, white cards
   without borders, one deep green for score and "new", ochre for things
   to watch, black for the one action that matters. Inter throughout. */

:root {
  --bg: #F4F2EE;
  --surface: #FFFFFF;
  --chip: #E9E6E0;
  --chip-hover: #E1DDD5;
  --photo: #E2DED7;
  --ink: #1D1D1F;
  --ink-2: #3A3A3C;
  --muted: #6E6E73;
  --faint: #8E8E93;
  --line: #EFEDE8;
  --accent: #2F6B55;
  --accent-soft: #E6EFEA;
  --watch: #8A5A1F;
  --watch-soft: #F5ECDF;
  --bad: #B4261A;
  --radius: 16px;
  --pill: 999px;
  font-family: Inter, -apple-system, system-ui, sans-serif;
  color: var(--ink);
  background: var(--bg);
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); font-size: 15px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
a { color: var(--ink); }
button, select, input, textarea { font: inherit; color: inherit; }
h1, h2, h3 { font-weight: 600; }
.muted { color: var(--muted); }
.accent { color: var(--accent); font-weight: 600; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---- chrome ---- */
.topbar-inner { max-width: 1280px; margin: 0 auto; padding: 20px 40px; display: flex; flex-wrap: wrap; align-items: center; gap: 12px 32px; }
.brand { font-weight: 600; font-size: 17px; letter-spacing: -0.01em; text-decoration: none; }
.mainnav { display: flex; gap: 24px; }
.mainnav a { color: var(--muted); text-decoration: none; padding: 10px 0; }
.mainnav a.active { color: var(--ink); font-weight: 600; }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 14px; }
.checked { font-size: 13px; color: var(--muted); }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: #E6E3DC; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 600; text-decoration: none; text-transform: uppercase; }
.page { max-width: 1280px; margin: 0 auto; padding: 8px 40px 72px; }
.tabbar { display: none; }

/* ---- shared ---- */
.title { margin: 0; font-size: 32px; line-height: 1.15; letter-spacing: -0.025em; }
.sub { margin: 4px 0 0; color: var(--muted); }
.card { background: var(--surface); border-radius: var(--radius); }
.pill-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 40px; padding: 0 16px; border: none; border-radius: var(--pill); background: var(--chip); color: var(--ink); font-size: 14px; text-decoration: none; cursor: pointer; }
.pill-btn:hover { background: var(--chip-hover); }
.cta { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 50px; border-radius: var(--pill); background: var(--ink); color: #fff; font-weight: 500; text-decoration: none; }
.cta:hover { color: #fff; background: #000; }
.score { font-weight: 600; color: var(--accent); background: var(--accent-soft); padding: 1px 9px; border-radius: var(--pill); font-size: 13px; }
.photo { display: block; object-fit: cover; background: var(--photo); }
.empty { padding: 48px 24px; text-align: center; color: var(--muted); }
button:disabled { opacity: 0.5; cursor: default; }

/* ---- huizen ---- */
.head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; }
.tools { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.segmented { display: flex; padding: 3px; border-radius: var(--pill); background: var(--chip); }
.segmented button { border: none; min-height: 36px; padding: 0 14px; border-radius: var(--pill); background: transparent; font-size: 14px; cursor: pointer; white-space: nowrap; }
.segmented button[aria-pressed="true"] { background: var(--surface); font-weight: 600; }
.segmented .n { color: var(--muted); font-weight: 400; margin-left: 3px; }
.search { display: flex; align-items: center; gap: 6px; min-height: 42px; padding: 0 12px; border-radius: var(--pill); background: var(--chip); color: var(--muted); }
.search input { width: 130px; border: none; background: transparent; outline: none; color: var(--ink); font-size: 14px; }
.select { min-height: 42px; padding: 0 10px; border: none; border-radius: var(--pill); background: var(--chip); font-size: 14px; }
.split { display: flex; flex-wrap: wrap; gap: 24px; margin-top: 24px; align-items: flex-start; }
.split > .main { flex: 999 1 540px; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.split > .side { flex: 1 1 380px; min-width: 0; position: sticky; top: 16px; }
.house { display: flex; gap: 18px; padding: 10px; border-radius: var(--radius); background: var(--surface); text-decoration: none; }
.house:hover { box-shadow: 0 2px 12px rgba(29, 29, 31, 0.06); }
.house .photo-wrap { position: relative; flex: 0 0 176px; height: 132px; }
.house .photo { width: 100%; height: 100%; border-radius: 10px; }
.house .badges { display: none; }
.house-body { flex: 1; min-width: 0; display: flex; flex-direction: column; padding: 4px 6px 4px 0; }
.house-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; font-size: 13px; color: var(--muted); }
.house-title { margin-top: 6px; font-size: 18px; font-weight: 600; letter-spacing: -0.01em; }
.meta { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 14px; color: var(--muted); }
.meta span { display: inline-flex; align-items: center; gap: 5px; }
.meta svg { flex: 0 0 auto; }
.house-foot { margin-top: auto; padding-top: 10px; display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.house-price { font-size: 18px; font-weight: 500; }
.house-why { font-size: 13px; color: var(--muted); text-align: right; }
.status { font-size: 12px; font-weight: 600; padding: 1px 8px; border-radius: var(--pill); background: var(--watch-soft); color: var(--watch); margin-left: 6px; }
.more { align-self: center; margin-top: 6px; }
.list-foot { margin: 14px 0 0; text-align: center; font-size: 13px; color: var(--muted); }
.list-foot a { color: var(--muted); }
.rest { padding: 64px 32px; text-align: center; }
.rest h2 { margin: 0; font-size: 26px; letter-spacing: -0.02em; }
.rest p { margin: 10px auto 18px; max-width: 380px; color: var(--muted); }

.map { height: 660px; border-radius: var(--radius); overflow: hidden; background: #ECEAE5; }
.map-full { height: calc(100vh - 170px); min-height: 420px; margin-top: 20px; }
.pin { display: inline-block; padding: 3px 8px; border-radius: var(--pill); background: var(--surface); color: var(--ink); font: 600 12px Inter, sans-serif; box-shadow: 0 1px 4px rgba(0, 0, 0, 0.14); white-space: nowrap; transform: translate(-50%, -50%); }
.pin.on { background: var(--accent); color: #fff; }
.leaflet-container { font-family: Inter, sans-serif; background: #ECEAE5; }
.leaflet-tile-pane { filter: saturate(0.3) brightness(1.05); }
.leaflet-popup-content-wrapper { border-radius: 14px; }
.leaflet-popup-content { margin: 10px 14px; }

/* ---- huis ---- */
.bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.back { display: inline-flex; align-items: center; gap: 4px; min-height: 44px; text-decoration: none; white-space: nowrap; }
.bar-actions { display: flex; gap: 8px; }
.bar-actions .pill-btn[aria-pressed="true"] svg { fill: var(--accent); stroke: var(--accent); }
.hero { width: 100%; height: 420px; border-radius: 18px; }
.house-head .meta-line { font-size: 13px; color: var(--muted); }
.house-head h1 { margin: 2px 0 0; font-size: 34px; letter-spacing: -0.025em; line-height: 1.15; }
.house-head .where { margin: 2px 0 0; color: var(--muted); font-size: 16px; }
.facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; padding: 16px 20px; }
.facts dt { font-size: 13px; color: var(--muted); }
.facts dd { margin: 0; font-size: 18px; font-weight: 600; }
.facts dd.unknown { color: var(--faint); font-weight: 500; }
.why { padding: 22px 24px; }
.why-head { display: flex; align-items: center; gap: 12px; }
.why-head .score { font-size: 20px; padding: 2px 12px; }
.why-head h2 { margin: 0; font-size: 17px; }
.why-head p { margin: 0; font-size: 14px; color: var(--muted); }
.why-cols { display: flex; flex-wrap: wrap; gap: 20px 40px; margin-top: 20px; }
.why-cols > div { flex: 1 1 280px; min-width: 0; }
.why h3 { margin: 0 0 10px; font-size: 13px; }
.why ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.why li { display: flex; gap: 10px; }
.why li b { display: block; font-weight: 500; }
.why li small { display: block; font-size: 13px; color: var(--muted); }
.mark { flex: 0 0 20px; height: 20px; border-radius: 50%; font-size: 12px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.pro h3 { color: var(--accent); }
.pro .mark { background: var(--accent-soft); color: var(--accent); }
.con h3 { color: var(--watch); }
.con .mark { background: var(--watch-soft); color: var(--watch); }
.parts { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 13px; }
.parts .chip { padding: 3px 10px; border-radius: var(--pill); background: var(--bg); }
.parts a { margin-left: auto; color: var(--muted); }
.about { padding: 18px 20px; }
.about h2, .note h2 { margin: 0 0 6px; font-size: 17px; }
.about p { margin: 0; color: var(--ink-2); white-space: pre-line; }
.about a { display: inline-block; margin-top: 6px; font-size: 14px; color: var(--muted); }
.price-card { padding: 20px; }
.price-card .big { font-size: 30px; font-weight: 600; letter-spacing: -0.02em; }
.price-card .cta { margin-top: 16px; }
.price-card .also { margin-top: 10px; text-align: center; font-size: 13px; color: var(--muted); }
.price-card .also a { color: var(--muted); }
.map-card { padding: 12px; }
.mini-map { height: 180px; border-radius: 10px; overflow: hidden; }
.map-card p { margin: 10px 6px 2px; font-size: 14px; color: var(--muted); }
.note { padding: 16px 20px; }
.note textarea { width: 100%; border: none; resize: vertical; background: transparent; outline: none; min-height: 48px; }
.note .saved { font-size: 12px; color: var(--muted); min-height: 18px; }
.sticky-cta { display: none; }

/* ---- instellingen ---- */
.settings { display: grid; grid-template-columns: repeat(auto-fit, minmax(380px, 1fr)); gap: 16px; margin-top: 24px; align-items: start; }
.settings > .card { padding: 18px 20px; }
.settings h2 { margin: 0 0 12px; font-size: 17px; }
.row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.row:first-of-type { border-top: none; }
.row label, .row > span:first-child { color: var(--ink); }
.field { min-height: 38px; padding: 0 10px; border: none; border-radius: 10px; background: var(--bg); font-size: 14px; }
.field.num { width: 120px; text-align: right; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
.chip-x { display: inline-flex; align-items: center; gap: 2px; padding: 2px 2px 2px 10px; border-radius: var(--pill); background: var(--bg); font-size: 13px; }
.chip-x button { width: 24px; height: 24px; border: none; border-radius: 50%; background: transparent; color: var(--muted); cursor: pointer; }
.weight { display: grid; grid-template-columns: 120px 1fr 110px; align-items: center; gap: 12px; font-size: 14px; padding: 6px 0; }
.weight input { width: 100%; accent-color: var(--accent); }
.weight span { text-align: right; color: var(--muted); }
.form-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 14px; }
.msg { font-size: 13px; color: var(--muted); }
.topic { font-family: ui-monospace, monospace; font-size: 12px; word-break: break-all; }
.problem { color: var(--bad); }

/* ---- bronnen ---- */
.table-wrap { overflow-x: auto; margin-top: 20px; }
table { width: 100%; min-width: 680px; border-collapse: collapse; font-size: 14px; }
th { text-align: left; color: var(--muted); font-size: 13px; font-weight: 500; padding: 14px 12px; }
td { padding: 11px 12px; border-top: 1px solid var(--line); }
th:first-child, td:first-child { padding-left: 20px; }
th:last-child, td:last-child { padding-right: 20px; }
td.num, th.num { text-align: right; }
.src { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.src img, .src i { width: 18px; height: 18px; border-radius: 4px; }

/* ---- login ---- */
.login { max-width: 360px; margin: 10vh auto; padding: 28px; }
.login .segmented { margin-top: 18px; }
.login .segmented button { flex: 1; text-transform: capitalize; }
.login input { width: 100%; margin-top: 12px; min-height: 46px; padding: 0 14px; border: none; border-radius: 12px; background: var(--bg); }
.login .cta { width: 100%; margin-top: 12px; border: none; cursor: pointer; }

/* ---- phone ---- */
@media (max-width: 760px) {
  .topbar-inner { padding: 14px 16px 4px; }
  .mainnav, .checked { display: none; }
  .page { padding: 4px 16px 110px; }
  .title { font-size: 26px; }
  .head { align-items: flex-start; }
  .tools { width: 100%; }
  .tools .segmented { width: 100%; overflow-x: auto; scrollbar-width: none; }
  .tools .search { flex: 1; }
  .tools .search input { width: 100%; }
  .split { margin-top: 14px; }
  .split > .side { display: none; }
  .house { flex-direction: column; gap: 0; padding: 8px; border-radius: 18px; }
  .house .photo-wrap { flex: none; width: 100%; height: 180px; }
  .house .photo { border-radius: 12px; }
  .house .badges { display: block; }
  .house .badges span { position: absolute; top: 8px; font-size: 12px; font-weight: 600; padding: 3px 9px; border-radius: var(--pill); background: rgba(255, 255, 255, 0.92); color: var(--accent); }
  .house .badges .b-new { left: 8px; }
  .house .badges .b-score { right: 8px; }
  .house-top { display: none; }
  /* Address and price share the first line, the meta goes under both. */
  .house-body { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 10px; padding: 12px 6px 6px; }
  .house-title { grid-area: 1 / 1; margin-top: 0; font-size: 17px; }
  .house-foot { grid-area: 1 / 2; margin: 0; padding: 0; }
  .house-price { font-size: 17px; white-space: nowrap; }
  .meta { grid-area: 2 / 1 / 3 / 3; margin-top: 8px; gap: 4px 14px; }
  .house-why { display: none; }
  .tabbar { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 1000; background: var(--surface); padding: 6px 8px calc(10px + env(safe-area-inset-bottom)); border-top: 1px solid #ECE9E3; }
  .tabbar a { flex: 1; display: flex; align-items: center; justify-content: center; min-height: 46px; font-size: 13px; color: var(--muted); text-decoration: none; }
  .tabbar a.active { color: var(--ink); font-weight: 600; }
  .hero { height: 280px; width: calc(100% + 32px); margin: 0 -16px; border-radius: 0; }
  .house-head h1 { font-size: 24px; }
  .facts { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; padding: 12px 14px; }
  .facts dt { font-size: 12px; }
  .facts dd { font-size: 15px; }
  .why { padding: 16px; }
  .price-card .cta { display: none; }
  .sticky-cta { display: block; position: fixed; left: 0; right: 0; bottom: calc(62px + env(safe-area-inset-bottom)); z-index: 999; padding: 10px 16px; background: linear-gradient(to top, var(--bg) 70%, transparent); }
  .settings { grid-template-columns: 1fr; }
  .weight { grid-template-columns: 1fr 100px; }
  .weight input { grid-column: 1 / -1; grid-row: 2; }
  .map-full { height: calc(100vh - 190px); margin: 14px -16px 0; border-radius: 0; }
  .bar .pill-btn { padding: 0 12px; }
}

/* Kandidaten (watch-list on the Makelaars page) */
.section-title { margin: 36px 0 2px; font-size: 20px; font-weight: 600; letter-spacing: -0.01em; }
.group-title { margin: 20px 0 8px; font-size: 14px; font-weight: 600; }
.candidate-add { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 12px; margin-top: 12px; }
.candidate-add .field { flex: 1 1 200px; }
.candidates { padding: 0 18px; }
.candidate { display: flex; gap: 16px; justify-content: space-between; align-items: flex-start; padding: 14px 0; border-top: 1px solid var(--line, #EFEDE8); }
.candidate:first-child { border-top: none; }
.candidate a { font-weight: 500; }
.candidate p { margin: 2px 0 0; font-size: 13px; color: var(--muted); }
