@import url('https://fonts.googleapis.com/css2?family=Sofia+Sans:wght@400;500;600;700&family=Sofia+Sans+Semi+Condensed:wght@500;600;700&family=Source+Serif+4:ital,opsz,wght@0,8..60,400;0,8..60,600;1,8..60,400&display=swap');

/* Wohnatlas: a survey sheet with a register beside it.
   Ink on cool paper; highlighter yellow marks what is new or under the pointer.
   Sans = the atlas speaking. Serif = text quoted from the court's listing. */
:root {
  color-scheme: light;
  --paper: #eef1f2;
  --sheet: #fff;
  --ink: #10202b;
  --ink-2: #44545e;
  --ink-3: #66757e;
  --rule: #d3dadd;
  --rule-soft: #e6eaec;
  --mark: #ffe24a;
  --mark-soft: #fff7c7;
  --stop: #b3261e;
  --ui: 'Sofia Sans', 'Bahnschrift', 'Segoe UI', system-ui, sans-serif;
  --fig: 'Sofia Sans Semi Condensed', 'Bahnschrift', 'Arial Narrow', 'Segoe UI', system-ui, sans-serif;
  --source: 'Source Serif 4', 'Iowan Old Style', 'Palatino Linotype', Georgia, serif;
  --topbar-h: 56px;
  --radius: 6px;
  --cols: minmax(0, 1fr) 80px 112px 145px 112px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 15px/1.45 var(--ui); -webkit-font-smoothing: antialiased; }
h1, h2, h3, p, dl, dd { margin: 0; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .45; }
a { color: inherit; }
[hidden] { display: none !important; }
svg:not([class^='leaflet']) { fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; box-shadow: 0 0 0 5px var(--mark); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; z-index: 3000; top: -60px; left: 16px; background: var(--mark); color: var(--ink); padding: 10px 16px; border-radius: var(--radius); font-weight: 700; }
.skip-link:focus { top: 8px; }
.unknown { color: var(--ink-3); font-style: italic; font-weight: 400; }

/* ---------- Buttons and form controls ---------- */

.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 0 14px; border: 1px solid var(--rule); border-radius: var(--radius); background: var(--sheet); color: var(--ink); font-size: 14.5px; font-weight: 600; white-space: nowrap; text-decoration: none; }
.button:hover:not(:disabled) { border-color: var(--ink); }
.button svg { width: 17px; height: 17px; }
.button.primary { background: var(--ink); border-color: var(--ink); color: #fff; }
.button.primary:hover { background: #1f3848; }
.text-button { border: 0; padding: 4px 0; background: none; font-size: 14px; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.text-button:hover { text-decoration-thickness: 2px; }
.icon-button { display: inline-grid; place-items: center; width: 38px; height: 38px; border: 1px solid var(--rule); border-radius: var(--radius); background: var(--sheet); }
.icon-button:hover:not(:disabled) { border-color: var(--ink); }
.icon-button svg { width: 18px; height: 18px; }

.segmented { display: inline-flex; gap: 2px; padding: 3px; border-radius: var(--radius); background: #dce3e6; }
.segmented button { min-height: 36px; padding: 0 12px; border: 0; border-radius: 4px; background: none; color: var(--ink-2); font-size: 14.5px; font-weight: 600; white-space: nowrap; }
.segmented button:hover { color: var(--ink); }
.segmented button.active { background: var(--sheet); color: var(--ink); box-shadow: 0 1px 2px #10202b33; }
.seg-count { margin-left: 6px; color: var(--ink-3); font: 500 14px var(--fig); font-variant-numeric: tabular-nums; }
.segmented button.active .seg-count { color: var(--ink-2); }
.segmented button:focus-visible { box-shadow: 0 0 0 5px var(--mark); }
.period-buttons button { padding: 0 10px; }

.select { display: inline-flex; align-items: center; gap: 8px; }
select { appearance: none; min-height: 42px; max-width: 100%; padding: 0 34px 0 12px; border: 1px solid var(--rule); border-radius: var(--radius); background: var(--sheet) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='m1 1.5 5 5 5-5' fill='none' stroke='%2310202b' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 12px center / 11px; font-size: 14.5px; font-weight: 600; }
select:hover { border-color: var(--ink); }
.checkbox-label { display: inline-flex; align-items: center; gap: 8px; min-height: 42px; font-size: 14.5px; }
.checkbox-label input { width: 18px; height: 18px; margin: 0; accent-color: var(--ink); }

/* ---------- Top bar ---------- */

.topbar { position: sticky; top: 0; z-index: 1200; display: flex; align-items: center; gap: 18px; height: var(--topbar-h); padding: 0 20px; background: var(--ink); color: #fff; }
.topbar :focus-visible { outline-color: #fff; }
.brand { display: inline-flex; align-items: center; gap: 9px; color: #fff; font: 700 23px/1 var(--fig); text-decoration: none; }
.brand svg { width: 26px; height: 26px; color: var(--mark); stroke-width: 2.2; }
.scope { min-width: 0; overflow: hidden; color: #fff; font: 600 15px/1.2 var(--ui); white-space: nowrap; text-overflow: ellipsis; }
.scope span { color: #c3ced4; font-weight: 400; }
.topbar-actions { display: flex; align-items: center; gap: 8px; min-width: 0; margin-left: auto; }
.status-button { display: inline-flex; flex: 0 1 auto; align-items: center; gap: 10px; min-width: 0; min-height: 40px; padding: 0 10px; border: 0; border-radius: var(--radius); background: none; color: #fff; font-size: 14px; text-align: left; }
.status-button:hover .status-more { text-decoration-thickness: 2px; }
.status-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.2; }
#collection-status { font-weight: 600; }
#collection-status, .status-time { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.status-time { color: #c3ced4; font-size: 13px; }
.topbar .button, .status-more { flex: 0 0 auto; }
.status-more { text-decoration: underline; text-underline-offset: 3px; font-weight: 600; }
.status-dot { width: 9px; height: 9px; border-radius: 50%; background: #e9b949; flex-shrink: 0; }
.status-dot.ready { background: #62d394; }
.status-dot.error { background: #ff8a7a; }
.button.on-dark { background: transparent; border-color: #ffffff59; color: #fff; }
.button.on-dark:hover:not(:disabled) { border-color: #fff; }

/* ---------- Workspace ---------- */

.workspace { display: grid; grid-template-columns: minmax(560px, min(60%, 980px)) minmax(0, 1fr); align-items: start; }
.list-pane { min-width: 0; padding: 18px 24px 36px; }
.side { position: sticky; top: var(--topbar-h); display: flex; flex-direction: column; min-width: 0; height: calc(100vh - var(--topbar-h)); height: calc(100dvh - var(--topbar-h)); border-left: 1px solid var(--rule); background: var(--sheet); }

/* ---------- Controls ---------- */

.controls { display: grid; gap: 10px; }
.control-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.property-controls { gap: 8px; }
.property-presets { flex: 1 1 auto; }
.property-presets button { flex: 1; white-space: nowrap; }
.type-picker-button { min-height: 40px; gap: 7px; }
.type-picker-button[aria-expanded='true'] { border-color: var(--ink); background: var(--mark-soft); }
.property-picker { padding: 12px; border: 1px solid var(--rule); border-radius: var(--radius); background: var(--sheet); }
.property-picker-heading { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 4px 12px; margin-bottom: 8px; color: var(--ink-2); font-size: 13px; }
.property-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 10px; }
.property-option { display: flex; align-items: flex-start; gap: 8px; padding: 9px 7px; border: 1px solid transparent; border-radius: 4px; cursor: pointer; }
.property-option:hover { background: var(--paper); }
.property-option:has(input:checked) { border-color: var(--rule); background: #f6f8f9; }
.property-option input { flex: 0 0 auto; margin: 3px 0 0; accent-color: var(--ink); }
.property-option-text { flex: 1; min-width: 0; }
.property-option-name { display: block; color: var(--ink); font-weight: 600; line-height: 1.3; }
.property-option-source { display: block; margin-top: 3px; color: var(--ink-3); font-size: 11.5px; line-height: 1.3; overflow-wrap: anywhere; }
.property-option-count { font: 600 15px var(--fig); color: var(--ink-2); }
.property-note { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--rule-soft); color: var(--ink-3); font-size: 12.5px; line-height: 1.45; }
.search-field { flex: 1 1 250px; display: flex; align-items: center; gap: 9px; height: 42px; padding: 0 12px; border: 1px solid var(--rule); border-radius: var(--radius); background: var(--sheet); }
.search-field:hover { border-color: var(--ink); }
.search-field:focus-within { border-color: var(--ink); outline: 2px solid var(--ink); outline-offset: 2px; box-shadow: 0 0 0 5px var(--mark); }
.search-field svg { width: 18px; height: 18px; color: var(--ink-2); }
.search-field input { flex: 1; min-width: 0; height: 100%; border: 0; background: none; outline: none; box-shadow: none; font-size: 15px; }
.search-field input::placeholder { color: var(--ink-3); opacity: 1; }
.seen-group { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-right: auto; }
.period-select { display: none; }
.filter-toggle[aria-expanded='true'] { border-color: var(--ink); background: var(--sheet); box-shadow: inset 0 -3px 0 var(--mark); }
.filter-toggle[aria-expanded='true']:focus-visible { box-shadow: inset 0 -3px 0 var(--mark), 0 0 0 5px var(--mark); }
.filter-count { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px; background: var(--mark); color: var(--ink); font: 700 13px/1 var(--fig); }
.seen-note { color: var(--ink-2); font-size: 13.5px; }
.additional-filters { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px 18px; padding: 14px 16px; border: 1px solid var(--rule); border-radius: var(--radius); background: var(--sheet); }
.field { display: flex; flex-direction: column; gap: 4px; color: var(--ink-2); font-size: 13.5px; font-weight: 600; }
.field select { min-width: 190px; }
.additional-filters .text-button { margin-left: auto; min-height: 42px; }

.results-bar { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 10px 20px; margin-top: 20px; }
.results-text { flex: 1 1 260px; min-width: 0; }
#results-count { font: 700 24px/1.15 var(--fig); }
#results-summary { margin-top: 2px; color: var(--ink-2); font-size: 14.5px; }
.results-controls { display: flex; flex: 0 0 auto; flex-wrap: wrap; align-items: center; gap: 10px; }
.unit-switch button { min-height: 34px; padding: 0 10px; }
.sort-label { color: var(--ink-2); font-size: 14px; font-weight: 600; }
.active-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 12px; }
.chip { display: inline-flex; align-items: center; gap: 4px; min-height: 32px; padding: 0 6px 0 12px; border: 1px solid var(--ink); border-radius: 999px; background: var(--mark-soft); font-size: 14px; font-weight: 600; }
.chip:hover { background: var(--mark); }
.chip svg { width: 18px; height: 18px; }

/* ---------- Register (the list) ---------- */

.listings { container: list / inline-size; margin-top: 14px; outline: none; }
.list-head, .row { display: grid; grid-template-columns: var(--cols); column-gap: 16px; }
.c-dates { display: contents; }
.list-head { position: sticky; top: var(--topbar-h); z-index: 5; padding: 0 14px; border-bottom: 2px solid var(--ink); background: var(--paper); }
.list-head button { display: inline-flex; align-items: center; gap: 4px; min-height: 36px; padding: 0; border: 0; background: none; color: var(--ink-2); font-size: 13.5px; font-weight: 600; text-align: left; white-space: nowrap; }
.list-head button:hover, .list-head button.active { color: var(--ink); }
.list-head button.active { font-weight: 700; }
.list-head button:nth-child(2), .list-head button:nth-child(3) { justify-content: flex-end; }
.sort-arrow { width: 10px; font-family: var(--fig); }
.listing-list { border: 1px solid var(--rule); border-top: 0; background: var(--sheet); }
.row { position: relative; align-items: start; padding: 12px 14px 13px; border-top: 1px solid var(--rule-soft); cursor: pointer; scroll-margin: calc(var(--topbar-h) + 44px) 0 84px; }
.row:first-child { border-top: 0; }
.row:hover { background: #f5f7f8; }
.row.hot { background: #f5f7f8; box-shadow: inset 4px 0 0 var(--mark); }
.row.selected { background: var(--mark-soft); box-shadow: inset 4px 0 0 var(--ink); }
.row-title { display: flex; align-items: center; gap: 8px; min-width: 0; font: 600 18.5px/1.25 var(--fig); }
.row-open { min-width: 0; padding: 0; border: 0; border-radius: 2px; background: none; overflow: hidden; text-align: left; text-overflow: ellipsis; white-space: nowrap; font: inherit; }
.row:hover .row-open { text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
.row-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 3px 10px; margin-top: 5px; color: var(--ink-2); font-size: 14px; line-height: 1.35; }
.where { color: var(--ink); font-variant-numeric: tabular-nums; }
.tag { display: inline-block; padding: 2px 6px; border: 1px solid var(--ink); border-radius: 3px; background: var(--sheet); color: var(--ink); font: 600 12.5px/1.25 var(--ui); white-space: nowrap; flex-shrink: 0; }
.tag.g34 { background: var(--ink); color: #fff; }
.tag.flat { background: #d9e4ec; }
.tag.house { border-color: #8d4f32; background: #f6e2d4; color: #693a24; }
.tag.other { border-color: #4c6657; background: #e1ece5; color: #354b3d; }
.row-meta .tag { white-space: normal; max-width: 100%; overflow-wrap: anywhere; }
.tag.new { border-color: var(--mark); background: var(--mark); font-weight: 700; }
.tag.cancelled { border-color: var(--stop); color: var(--stop); }
.pin-note { display: inline-flex; align-items: center; gap: 3px; color: var(--ink-3); font-size: 13px; }
.pin-note svg { width: 14px; height: 14px; }
.pin-note.approx svg { stroke-dasharray: 2.4 2; }
.cell-label { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }
.fig { display: block; font: 600 17px/1.3 var(--fig); font-variant-numeric: tabular-nums; white-space: nowrap; }
.fig.unknown { font-size: 15px; font-weight: 400; white-space: normal; }
.fig.cancelled, .status-cancelled, .figure-value.cancelled { color: var(--stop); }
.sub { display: block; margin-top: 1px; color: var(--ink-2); font-size: 13.5px; font-variant-numeric: tabular-nums; }
.sub.struck { text-decoration: line-through; }
.c-area, .c-value { text-align: right; }
.c-value .value-text { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; line-clamp: 3; max-height: 3.9em; overflow: hidden; overflow-wrap: anywhere; }
time.fig.seen-date { font-weight: 500; }
.seen-date.recovered { text-decoration: underline dotted var(--ink-3); text-underline-offset: 3px; }
.load-more { width: 100%; margin-top: 12px; }
.data-note { margin-top: 16px; color: var(--ink-2); font-size: 13.5px; }
.analysis-coverage { margin-top: 8px; color: var(--ink-3); font-size: 12.5px; line-height: 1.4; }
.summary-toggle { min-height: 36px; font-size: 13.5px; }
.summary-toggle input { width: 16px; height: 16px; }
.row-insights { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: baseline; gap: 5px 14px; min-width: 0; margin-top: 5px; padding-top: 7px; border-top: 1px solid var(--rule-soft); color: var(--ink-2); font-size: 12.5px; line-height: 1.35; }
.analysis-badge { display: inline-block; flex: 0 0 auto; padding: 2px 6px; border: 1px solid #b7c6d0; border-radius: 3px; color: #344e60; background: #f0f5f8; font-size: 11.5px; font-weight: 600; line-height: 1.35; }
.analysis-badge.review { border-color: #dac199; color: #765324; background: #fff5e6; }
.comparison-fact { min-width: 0; }
.comparison-label { color: var(--ink-3); }
.inference-mark { color: #765324; font-size: 11.5px; }
.cost-flag { color: #765324; }
.row-summary { flex: 1 1 100%; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; color: var(--ink-2); font-size: 13.5px; line-height: 1.45; }
.draft-label { color: #765324; font-weight: 600; }

/* Tight register: keep the columns, shorten the auction date. */
@container list (min-width: 700.02px) and (max-width: 790px) {
  .list-head, .row { --cols: minmax(0, 1fr) 78px 108px 120px 110px; column-gap: 12px; }
  .c-auction .weekday { display: none; }
}

/* Narrow register: each row becomes a compact card that carries its own labels. */
@container list (max-width: 700px) {
  .list-head { display: none; }
  .listing-list { border-top: 1px solid var(--rule); }
  .row { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: 'place value' 'place area' 'dates dates' 'insights insights'; grid-template-rows: auto 1fr auto auto; row-gap: 2px; padding: 13px 14px 14px; }
  .c-place { grid-area: place; }
  .c-value { grid-area: value; }
  .c-area { grid-area: area; }
  .c-area .fig { font-size: 15px; font-weight: 500; }
  .c-dates { grid-area: dates; display: flex; flex-wrap: wrap; gap: 2px 22px; margin-top: 7px; }
  .c-auction, .c-seen { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 6px; }
  .c-dates .cell-label, .c-area:has(.unknown) .cell-label { position: static; width: auto; height: auto; margin: 0; overflow: visible; clip: auto; color: var(--ink-2); font-size: 13.5px; }
  .c-dates .fig { font-size: 15px; }
  .c-dates .sub { margin: 0; }
  .row-insights { grid-area: insights; margin-top: 7px; }
}

.empty-state { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 320px; padding: 48px 28px; text-align: center; }
.empty-icon { display: grid; place-items: center; width: 56px; height: 56px; margin-bottom: 16px; border: 1.5px dashed var(--ink-3); border-radius: 50%; color: var(--ink-2); }
.empty-icon svg { width: 26px; height: 26px; }
.empty-state h3 { font: 700 21px/1.25 var(--fig); }
.empty-state p { max-width: 340px; margin: 8px 0 18px; color: var(--ink-2); }
.skeleton-row { padding: 15px 14px; border-top: 1px solid var(--rule-soft); }
.skeleton-row:first-child { border-top: 0; }
.skeleton-line { height: 12px; margin-bottom: 9px; border-radius: 3px; background: linear-gradient(90deg, #e6eaec, #f3f5f6, #e6eaec); background-size: 200% 100%; animation: shimmer 1.4s infinite; }
.skeleton-line:nth-child(1) { width: 38%; height: 16px; }
.skeleton-line:nth-child(2) { width: 64%; }
.skeleton-line:nth-child(3) { width: 24%; margin-bottom: 0; }
@keyframes shimmer { to { background-position: -200% 0; } }

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

.map-panel { position: relative; flex: 1 1 auto; min-height: 0; isolation: isolate; background: #e3e8ea; }
#map { position: absolute; inset: 0; z-index: 0; background: #e3e8ea; }
.leaflet-container { font-family: var(--ui) !important; }
.leaflet-tile-pane { filter: saturate(.3) contrast(.9) brightness(1.06); }
.leaflet-control-attribution { font-size: 11px !important; }
.leaflet-control-zoom { border: 1px solid var(--ink) !important; border-radius: var(--radius) !important; box-shadow: none !important; overflow: hidden; }
.leaflet-control-zoom a { width: 34px !important; height: 34px !important; background: var(--sheet) !important; color: var(--ink) !important; font-size: 20px !important; line-height: 32px !important; }
.leaflet-control-zoom a:hover { background: var(--mark) !important; }
.leaflet-marker-icon:focus-visible { outline: none; box-shadow: none; }
.leaflet-marker-icon:focus-visible .pin { outline: 2px solid var(--ink); outline-offset: 2px; box-shadow: 0 0 0 6px var(--mark); }
.map-types { position: absolute; top: 12px; left: 12px; right: 12px; z-index: 450; padding: 5px; border: 1px solid var(--rule); border-radius: var(--radius); background: #fffffff5; box-shadow: 0 2px 8px #10202b12; }
.map-types .property-presets { display: flex; }
.map-types .property-presets button { min-height: 36px; padding: 0 8px; font-size: 13px; }
.map-type-summary { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 3px 6px 0; }
#map-result-count { min-width: 0; color: var(--ink-2); font-size: 12px; line-height: 1.3; }
.map-type-summary .text-button { flex: 0 0 auto; min-height: 30px; padding: 0; font-size: 12px; }
.map-tools { position: absolute; top: 108px; right: 12px; z-index: 450; }
.map-button { display: inline-flex; align-items: center; gap: 7px; min-height: 36px; padding: 0 12px; border: 1px solid var(--ink); border-radius: var(--radius); background: var(--sheet); font-size: 14px; font-weight: 600; }
.map-button:hover { background: var(--mark); }
.map-button svg { width: 15px; height: 15px; }
.map-key { position: absolute; left: 12px; bottom: 26px; z-index: 450; display: flex; flex-wrap: wrap; gap: 5px 16px; max-width: calc(100% - 76px); padding: 8px 12px; border: 1px solid var(--rule); border-radius: var(--radius); background: #fffffff0; font-size: 13px; }
.map-key > span { display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; }
.key-pin { display: inline-block; width: 20px; height: 13px; border: 1.5px solid var(--ink); border-radius: 3px; background: var(--sheet); font-style: normal; }
.key-pin.g34 { background: var(--ink); }
.key-pin.flat { background: #d9e4ec; }
.key-pin.house { border-color: #8d4f32; background: #f6e2d4; }
.key-pin.other { border-color: #4c6657; background: #e1ece5; }
.key-pin.group { width: auto; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 999px; font: 700 12px/15px var(--fig); text-align: center; }
.key-pin.approx { width: 14px; height: 14px; border: 1.5px dashed var(--ink); border-radius: 50%; background: none; }
.map-unavailable { position: absolute; inset: 0; z-index: 400; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 40px; background: #e3e8ea; text-align: center; }
.map-unavailable svg { width: 44px; height: 44px; margin-bottom: 14px; color: var(--ink-2); }
.map-unavailable h3 { font: 700 19px var(--fig); }
.map-unavailable p { max-width: 280px; margin-top: 6px; color: var(--ink-2); }

.price-marker { border: 0 !important; background: none !important; }
.pin { position: relative; display: block; width: max-content; padding: 5px 7px; border: 1.5px solid var(--ink); border-radius: 4px; background: var(--sheet); color: var(--ink); font: 700 13.5px/1 var(--fig); font-variant-numeric: tabular-nums; white-space: nowrap; transform: translate(-50%, -50%); }
.pin.g34 { background: var(--ink); color: #fff; }
.pin.flat { background: #d9e4ec; }
.pin.house { border-color: #8d4f32; background: #f6e2d4; color: #693a24; }
.pin.other { border-color: #4c6657; background: #e1ece5; color: #354b3d; }
.pin.mixed, .key-pin.mixed { border-color: var(--ink); background: linear-gradient(135deg, #fff 0 45%, #f6e2d4 45% 70%, #e1ece5 70%); color: var(--ink); }
.pin.group { min-width: 30px; height: 30px; padding: 0 8px; border-width: 2px; border-radius: 999px; font-size: 15px; line-height: 26px; text-align: center; }
.pin.approx { outline: 1.5px dashed var(--ink); outline-offset: 2.5px; }
.pin.place, .pin.selected, .pin.hot { border-color: var(--ink); background: var(--mark); color: var(--ink); }
.pin.selected, .pin.hot { outline-style: solid; }
.leaflet-marker-icon:has(.pin.selected) { z-index: 9000 !important; }

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

.detail { margin: 0; padding: 0; border: 0; background: var(--sheet); color: var(--ink); }
.detail[open] { display: block; overflow-y: auto; overscroll-behavior: contain; }
.detail::backdrop, .coverage-dialog::backdrop { background: #10202b99; }
.detail-bar { position: sticky; top: 0; z-index: 3; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 14px 8px 22px; border-bottom: 1px solid var(--rule); background: var(--sheet); }
.detail-nav { display: flex; align-items: center; gap: 6px; }
.detail-position { margin-left: 8px; color: var(--ink-2); font-size: 14px; font-variant-numeric: tabular-nums; }
.detail-content { max-width: 760px; padding: 20px 22px 40px; }
.detail-head h2 { font: 700 27px/1.15 var(--fig); overflow-wrap: anywhere; outline-offset: 4px; }
.detail-where { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin-top: 8px; font-size: 15px; }
.detail-meta { margin-top: 6px; color: var(--ink-2); font-size: 14px; }
.detail-figures { display: grid; grid-template-columns: 1.15fr 1fr 1.15fr; margin-top: 18px; border-top: 2px solid var(--ink); border-bottom: 1px solid var(--rule); }
.figure { min-width: 0; padding: 12px 14px 13px; border-left: 1px solid var(--rule); }
.figure:first-child { padding-left: 0; border-left: 0; }
.figure-label { display: block; color: var(--ink-2); font-size: 13.5px; font-weight: 600; }
.figure-value { display: block; margin-top: 2px; font: 600 20px/1.25 var(--fig); font-variant-numeric: tabular-nums; }
.figure-value.detail-price { font-size: 27px; font-weight: 700; line-height: 1.15; }
.figure-value.unknown { font-size: 16px; font-weight: 400; }
.figure-note { display: block; margin-top: 3px; color: var(--ink-2); font-size: 13.5px; line-height: 1.35; }
.analysis-overview { margin-top: 16px; padding: 14px; border: 1px solid var(--rule); border-radius: var(--radius); background: #f7f9fa; }
.analysis-heading { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 12px; }
.analysis-heading h3 { font: 600 17px var(--fig); }
.analysis-summary { margin-top: 10px; color: var(--ink); font-size: 15px; line-height: 1.55; overflow-wrap: anywhere; }
.analysis-note, .analysis-meta { margin-top: 9px; color: var(--ink-3); font-size: 12.5px; line-height: 1.45; }
.analysis-meta { font-size: 11.5px; }
.analysis-alert { margin-top: 10px; padding: 9px 11px; border-left: 3px solid #c2904a; background: #fff5e6; color: #67451f; font-size: 13px; }
.analysis-review { margin-top: 10px; padding: 8px 10px; border: 1px solid #e6d2b1; border-radius: 4px; background: #fffbf4; color: #67451f; font-size: 12.5px; }
.analysis-review > summary, .unapplied-analysis > summary, .original-facts > summary { cursor: pointer; font-weight: 600; }
.analysis-review ul, .analysis-questions ul { margin: 8px 0 0; padding-left: 19px; }
.analysis-review li + li, .analysis-questions li + li { margin-top: 5px; }
.analysis-review li, .analysis-questions li { overflow-wrap: anywhere; }
.unapplied-analysis, .original-facts { margin-top: 12px; font-size: 13.5px; }
.analysis-finding { margin-top: 8px; padding: 10px 12px; border: 1px solid var(--rule); border-radius: 4px; }
.analysis-finding > summary { cursor: pointer; font-size: 14px; line-height: 1.45; }
.analysis-finding > summary .analysis-fact-status { display: block; margin-top: 3px; }
.analysis-positives .analysis-finding { border-left: 3px solid #789582; }
.analysis-risks .analysis-finding, .analysis-cost_notes .analysis-finding { border-left: 3px solid #b48a54; }
.analysis-finding.unapplied-finding { border-left-color: #b48a54; background: #fffbf4; }
.analysis-fact-group { margin-top: 10px; border: 1px solid var(--rule); border-radius: var(--radius); overflow: hidden; }
.analysis-fact-group > summary { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; padding: 12px; background: #f4f7f8; cursor: pointer; font-weight: 600; font-size: 14px; }
.analysis-fact-group > summary::before { content: '+'; font: 600 17px var(--fig); }
.analysis-fact-group[open] > summary::before { content: '−'; }
.analysis-fact-group > summary > span:first-child { flex: 1; }
.fact-group-count { color: var(--ink-3); font-size: 11.5px; font-weight: 400; white-space: nowrap; }
.analysis-fact { border-top: 1px solid var(--rule-soft); }
.analysis-fact > summary { display: grid; grid-template-columns: minmax(90px, .8fr) minmax(0, 1fr); gap: 2px 12px; padding: 10px 12px; cursor: pointer; font-size: 13.5px; }
.analysis-fact > summary:hover { background: #fafbfc; }
.analysis-fact-label { grid-row: 1 / span 2; color: var(--ink-2); }
.analysis-fact-value { font-weight: 600; overflow-wrap: anywhere; }
.analysis-fact-value.unknown { font-weight: 400; }
.analysis-fact-status { color: var(--ink-3); font-size: 11.5px; font-weight: 400; }
.analysis-fact[data-fact-status='inferred'] .analysis-fact-status, .analysis-fact[data-fact-status='conflicting'] .analysis-fact-status { color: #765324; }
.analysis-field-note, .analysis-no-evidence { margin: 0 12px 10px; color: var(--ink-2); font-size: 12.5px; line-height: 1.45; }
.analysis-quote { margin: 10px 12px 12px; padding: 0 0 0 12px; border-left: 2px solid var(--rule); font-size: 13px; line-height: 1.5; overflow-wrap: anywhere; }
.analysis-citation { display: flex; flex-wrap: wrap; align-items: baseline; gap: 5px 12px; margin-top: 5px; font: 12px var(--ui); }
.analysis-source-link { text-decoration: underline; text-underline-offset: 3px; overflow-wrap: anywhere; }
.analysis-source-link:hover { color: #2c566f; }
.evidence-warning { color: #765324; font-size: 11.5px; }
.analysis-source { display: flex; flex-direction: column; gap: 3px; padding: 11px 0; border-bottom: 1px solid var(--rule-soft); font-size: 13px; }
.analysis-source-status, .analysis-source-reason { color: var(--ink-3); font-size: 12px; }
.original-facts .analysis-note { margin-bottom: 10px; }
.detail-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.detail-features { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 18px; }
.feature-box { padding: 10px 12px 11px; border: 1px solid var(--rule); border-radius: var(--radius); background: #f7f9fa; }
.feature-label { display: block; color: var(--ink-2); font-size: 13.5px; font-weight: 600; }
.feature-value { display: block; margin-top: 2px; font: 600 18px/1.3 var(--fig); overflow-wrap: anywhere; }
.feature-value.unknown { font-size: 16px; font-weight: 400; }
.feature-status { display: block; margin-top: 2px; color: var(--ink-2); font-size: 13px; }
.detail-section { margin-top: 26px; }
.detail-section h3 { font: 700 18px/1.25 var(--fig); }
.section-note { margin-top: 2px; color: var(--ink-2); font-size: 13.5px; }
.source-text { font-family: var(--source); font-size: 16.5px; line-height: 1.6; }
.description { max-width: 68ch; margin-top: 10px; white-space: pre-wrap; overflow-wrap: anywhere; }
.description.unknown { font-family: var(--ui); font-size: 15px; }
.evidence-item { margin-top: 14px; }
.evidence-item > strong { display: block; font-size: 14px; font-weight: 700; }
.evidence-quote { max-width: 68ch; margin-top: 4px; padding-left: 12px; border-left: 3px solid var(--mark); font-size: 15.5px; overflow-wrap: anywhere; }
.evidence-unknown { margin-top: 4px; color: var(--ink-3); font-style: italic; }
.detail-dl { margin-top: 10px; border-top: 1px solid var(--rule); }
.detail-dl > div { display: grid; grid-template-columns: 190px minmax(0, 1fr); gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--rule-soft); }
.detail-dl dt { color: var(--ink-2); font-size: 14px; }
.detail-dl dd { font-size: 14.5px; overflow-wrap: anywhere; }
.observation-note, .attachment-note { max-width: 68ch; margin-top: 12px; color: var(--ink-2); font-size: 13.5px; }

.coverage-dialog { width: min(580px, calc(100% - 32px)); max-height: 90vh; padding: 28px; border: 0; border-top: 4px solid var(--mark); border-radius: var(--radius); background: var(--sheet); color: var(--ink); overflow: auto; }
.coverage-dialog .dialog-close { position: absolute; top: 14px; right: 14px; }
.coverage-dialog h2 { padding-right: 46px; font: 700 25px/1.2 var(--fig); margin-bottom: 14px; }
.coverage-status { display: inline-block; margin-bottom: 10px; padding: 3px 8px; border: 1px solid var(--ink); border-radius: 3px; font-size: 13.5px; font-weight: 700; }
.coverage-copy { margin-top: 10px; color: var(--ink-2); font-size: 14.5px; }
.coverage-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 16px 0 6px; }
.coverage-stat { padding: 11px 13px; border: 1px solid var(--rule); border-radius: var(--radius); background: #f7f9fa; }
.coverage-stat strong { display: block; font: 700 24px/1.2 var(--fig); font-variant-numeric: tabular-nums; }
.coverage-stat span { display: block; color: var(--ink-2); font-size: 13.5px; }
.coverage-errors { max-height: 190px; margin-top: 14px; padding: 12px 14px; border-left: 3px solid var(--stop); background: #fbeeed; color: #7c1d17; font-size: 14px; overflow: auto; overflow-wrap: anywhere; }
.coverage-errors p + p { margin-top: 8px; }

.toast { position: fixed; left: 50%; bottom: 24px; z-index: 4000; max-width: calc(100% - 32px); padding: 11px 18px; border-radius: var(--radius); background: var(--ink); color: #fff; font-size: 14.5px; font-weight: 600; text-align: center; transform: translateX(-50%); box-shadow: 0 8px 28px #10202b47; }
footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 24px; padding: 14px 24px 18px; border-top: 1px solid var(--rule); background: var(--paper); color: var(--ink-2); font-size: 13.5px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 4px 20px; }
.view-switch { display: none; }

/* ---------- Wide: detail sits beside the list, under a strip of map ---------- */

@media (min-width: 1024px) {
  .side.has-detail .map-panel { flex: 0 0 clamp(170px, 27vh, 250px); }
  .side.has-detail .map-key, .side.has-detail .map-tools, .side.has-detail .map-types { display: none; }
  .detail[open] { position: static; flex: 1 1 auto; width: auto; max-width: none; height: auto; max-height: none; min-height: 0; border-top: 2px solid var(--ink); }
}

/* ---------- Narrow: one pane at a time ---------- */

@media (max-width: 1023.98px) {
  .workspace { display: block; }
  .list-pane { padding: 14px 14px 96px; }
  .side { position: static; display: block; height: auto; border: 0; background: none; }
  .workspace[data-view='list'] .map-panel { display: none; }
  .workspace[data-view='map'] .list-pane { display: none; }
  .workspace[data-view='map'] .map-panel { height: calc(100vh - var(--topbar-h)); height: calc(100dvh - var(--topbar-h)); }
  .map-key { bottom: 78px; }
  .leaflet-bottom.leaflet-right .leaflet-control-zoom { margin-bottom: 78px; }
  .view-switch { position: fixed; left: 50%; bottom: 16px; z-index: 1100; display: inline-flex; gap: 2px; padding: 4px; border-radius: 999px; background: var(--ink); box-shadow: 0 6px 22px #10202b61; transform: translateX(-50%); }
  .view-switch button { display: inline-flex; align-items: center; gap: 8px; min-height: 42px; padding: 0 18px; border: 0; border-radius: 999px; background: none; color: #d5dde1; font-size: 15px; font-weight: 700; }
  .view-switch button[aria-pressed='true'] { background: var(--mark); color: var(--ink); }
  .view-switch :focus-visible { outline-color: #fff; }
  .view-switch svg { width: 17px; height: 17px; }
  .toast { bottom: 84px; }
  .detail[open] { position: fixed; inset: 0; width: 100%; max-width: none; height: 100%; max-height: none; }
  .detail-content { margin: 0 auto; }
  footer { padding-bottom: 84px; }
}

@media (max-width: 1180px) {
  .scope span { display: none; }
}

@media (max-width: 900px) {
  .scope { display: none; }
}

@media (max-width: 760px) {
  .topbar { gap: 10px; padding: 0 12px; }
  .status-time, .status-more { display: none; }
  .status-button { padding: 0 6px; }
  #collection-status { white-space: normal; }
  .topbar .button { width: 40px; padding: 0; }
  .topbar .button span { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }
  .room-filter { display: flex; flex: 1 1 100%; }
  .room-filter button { flex: 1; padding: 0 8px; }
  .property-controls .property-presets { flex-basis: 100%; display: flex; }
  .property-controls .property-presets button { padding: 0 8px; font-size: 13.5px; }
  .type-picker-button { min-height: 32px; padding: 0 10px; font-size: 13px; }
  .property-options { grid-template-columns: 1fr; }
  .property-option { padding: 9px 5px; }
  .control-row:has(.seen-group) { flex-wrap: nowrap; }
  .seen-group { flex: 1 1 0; flex-wrap: nowrap; min-width: 0; margin: 0; }
  .seen-group .select { flex: 1 1 0; min-width: 0; }
  .seen-group .select:first-child { flex-grow: 1.15; }
  .seen-group select { width: 100%; padding-left: 9px; padding-right: 27px; background-position: right 9px center; font-size: 14px; }
  .period-buttons { display: none; }
  .period-select { display: inline-flex; }
  .filter-toggle { position: relative; flex: 0 0 auto; width: 44px; min-height: 42px; padding: 0; }
  .filter-toggle-label { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }
  .filter-toggle .filter-count { position: absolute; top: -7px; right: -7px; }
  .seen-note.is-default { display: none; }
  .field { flex: 1 1 100%; }
  .field select { min-width: 0; width: 100%; }
  .additional-filters .text-button { margin-left: 0; }
  .results-bar { margin-top: 16px; }
  .sort-wrap { flex: 1 1 100%; min-width: 0; }
  .sort-wrap select { min-width: 0; width: 100%; }
  .results-controls { flex: 1 1 100%; }
  .detail-content { padding: 16px 16px 40px; }
  .detail-bar { padding: 8px 10px 8px 16px; }
  .detail-figures { grid-template-columns: 1fr 1fr; }
  .figure:first-child { grid-column: 1 / -1; border-bottom: 1px solid var(--rule); }
  .figure:nth-child(2) { padding-left: 0; border-left: 0; }
  .detail-features { grid-template-columns: 1fr; gap: 0; border: 1px solid var(--rule); border-radius: var(--radius); background: #f7f9fa; }
  .feature-box { display: grid; grid-template-columns: 92px minmax(0, 1fr); column-gap: 12px; border: 0; border-top: 1px solid var(--rule-soft); border-radius: 0; background: none; }
  .feature-box:first-child { border-top: 0; }
  .feature-label { grid-row: 1 / span 2; padding-top: 2px; }
  .feature-value { margin: 0; }
  .feature-status { grid-column: 2; }
  .detail-actions .button { flex: 1 1 calc(50% - 4px); }
  .detail-actions .primary { flex-basis: 100%; }
  .detail-dl > div { grid-template-columns: 1fr; gap: 0; }
  .coverage-dialog { padding: 22px 18px; }
}

@media (max-width: 360px) {
  .control-row:has(.seen-group) { flex-wrap: wrap; }
  .seen-group { flex-basis: 100%; }
}

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