/* Layout: one reading column — search at the top like a registry counter, results as ledger
   entries below; the licence "stamp" is the single bold element. */
:root {
  --paper: #f6f7f5;      /* faintly green-grey ground, like register paper */
  --sheet: #ffffff;
  --ink: #1b2230;
  --ink-2: #4c5566;
  --rule: #dfe3e0;
  --stamp: #3d3a9e;      /* official stamp ink */
  --stamp-tint: #e9e8f7;
  --ok: #1f7a4d;   --ok-tint: #e3f2ea;
  --warn: #9a5a00; --warn-tint: #fbefd9;
  --bad: #b3261e;  --bad-tint: #fbe4e2;
  --mute: #5f6673; --mute-tint: #eceeed;
  --f-display: "Spectral", "Georgia", "Times New Roman", serif;
  --f-body: "Golos Text", "Segoe UI", system-ui, -apple-system, sans-serif;
  --f-data: "JetBrains Mono", ui-monospace, "Consolas", monospace;
  --radius: 10px;
  /* The map is dark grey in both themes so the coloured pins stand out. */
  --map-sea: #202327;    /* neighbouring countries */
  --map-land: #35383d;   /* Serbia */
  --map-line: #4b4f56;
  --map-water: #46525d;
  --map-road: #575b62;
  --map-label: #c4c8ce;
  --map-tiles: grayscale(0.75) invert(0) brightness(0.6) contrast(1);   /* OSM tiles: muted and darkened */
  --pin-ok: #34c77b; --pin-warn: #f2a33a; --pin-mute: #a3aab5; --pin-bad: #ff6b5e;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #12161c; --sheet: #1a1f27; --ink: #e8ebf0; --ink-2: #a9b1be; --rule: #2b323d;
    --stamp: #a7a3ff; --stamp-tint: #26254a;
    --ok: #63cf97; --ok-tint: #173326; --warn: #f0b35a; --warn-tint: #3a2a12;
    --bad: #ff8a80; --bad-tint: #3e1c1a; --mute: #9aa2ae; --mute-tint: #252b33;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #12161c; --sheet: #1a1f27; --ink: #e8ebf0; --ink-2: #a9b1be; --rule: #2b323d;
  --stamp: #a7a3ff; --stamp-tint: #26254a;
  --ok: #63cf97; --ok-tint: #173326; --warn: #f0b35a; --warn-tint: #3a2a12;
  --bad: #ff8a80; --bad-tint: #3e1c1a; --mute: #9aa2ae; --mute-tint: #252b33;
  color-scheme: dark;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }   /* "hidden" must win over display rules such as .more { display: block } */
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--f-body); font-size: 15px; line-height: 1.5; }
.wrap { max-width: 1680px; margin: 0 auto; padding-inline: 20px; padding-block: 0 64px; }
a { color: var(--stamp); }
:focus-visible { outline: 2px solid var(--stamp); outline-offset: 2px; border-radius: 4px; }

/* The top bar stays on screen. Its height is fixed (--hdr) so the map can sit right under it and never move. */
:root { --hdr: 64px; }
html { scroll-padding-top: calc(var(--hdr) + 10px); }
header.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; height: var(--hdr); margin-bottom: 12px;
  position: sticky; top: 0; z-index: 2000; background: var(--paper);
  /* background and bottom line run edge to edge without widening the page */
  box-shadow: 0 0 0 100vmax var(--paper), 0 1px 0 100vmax var(--rule); clip-path: inset(0 -100vmax -1px); }
.brand { display: flex; align-items: baseline; gap: 10px; font-family: var(--f-display); font-weight: 700; font-size: 20px; letter-spacing: .01em; }
.brand small { font-family: var(--f-body); font-weight: 500; font-size: 12px; color: var(--ink-2); letter-spacing: .06em; text-transform: uppercase; }
.lang { display: inline-flex; border: 1px solid var(--rule); border-radius: 999px; overflow: hidden; background: var(--sheet); }
.lang button { border: 0; background: none; color: var(--ink-2); font: 500 13px var(--f-body); padding: 6px 12px; cursor: pointer; }
.lang button[aria-pressed="true"] { background: var(--stamp); color: var(--sheet); }

.hero { padding-block: 20px 8px; max-width: 860px; }
.hero h1 { font-family: var(--f-display); font-weight: 600; font-size: clamp(28px, 5vw, 40px); line-height: 1.15; margin: 0 0 10px; text-wrap: balance; }
.hero p.lede { margin: 0 0 22px; color: var(--ink-2); max-width: 62ch; }
.search { position: relative; }
.search input { width: 100%; font: 500 18px var(--f-body); color: var(--ink); background: var(--sheet); border: 1.5px solid var(--rule); border-radius: var(--radius); padding: 16px 16px 16px 48px; }
.search input:focus { border-color: var(--stamp); outline: none; box-shadow: 0 0 0 4px var(--stamp-tint); }
.search svg { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); width: 20px; height: 20px; color: var(--ink-2); }
.hint { font-size: 13px; color: var(--ink-2); margin-top: 8px; }

.facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; background: var(--rule); border: 1px solid var(--rule); border-radius: var(--radius); overflow: hidden; margin-block: 26px 10px; }
.fact { background: var(--sheet); padding: 12px 14px; }
.fact b { display: block; font: 600 22px var(--f-display); font-variant-numeric: tabular-nums; }
.fact span { font-size: 12.5px; color: var(--ink-2); }
.srcline { font-size: 12.5px; color: var(--ink-2); }

.filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-block: 26px 14px; }
.chip { border: 1px solid var(--rule); background: var(--sheet); color: var(--ink); font: 500 13px var(--f-body); padding: 7px 12px; border-radius: 999px; cursor: pointer; display: inline-flex; gap: 6px; align-items: center; }
.chip .dot { width: 8px; height: 8px; border-radius: 50%; }
.chip[aria-pressed="true"] { border-color: var(--ink); background: var(--ink); color: var(--paper); }
.selects { display: flex; gap: 8px; flex-wrap: wrap; margin-left: auto; }
select { font: 500 13px var(--f-body); color: var(--ink); background: var(--sheet); border: 1px solid var(--rule); border-radius: 8px; padding: 7px 10px; }

.count { font-size: 13px; color: var(--ink-2); margin-bottom: 8px; }
.list { display: flex; flex-direction: column; gap: 10px; }
.entry { background: var(--sheet); border: 1px solid var(--rule); border-radius: var(--radius); }
.entry > .head { all: unset; box-sizing: border-box; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 16px; width: 100%; padding: 14px 16px; }
.entry > button.head { cursor: pointer; }
.entry > button.head:focus-visible { outline: 2px solid var(--stamp); outline-offset: -2px; border-radius: var(--radius); }
.e-name { font: 600 17px var(--f-display); line-height: 1.25; }
.e-where { color: var(--ink-2); font-size: 13.5px; grid-column: 1; }
.e-meta { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 13px; color: var(--ink-2); }
.e-meta .mono { font-family: var(--f-data); font-size: 12px; }
.pill { grid-row: 1 / span 2; grid-column: 2; align-self: start; justify-self: end; font: 600 12px var(--f-body); padding: 4px 10px; border-radius: 999px; white-space: nowrap; }
.pill.valid { color: var(--ok); background: var(--ok-tint); }
.pill.warn  { color: var(--warn); background: var(--warn-tint); }
.pill.bad   { color: var(--bad); background: var(--bad-tint); }
.pill.mute  { color: var(--mute); background: var(--mute-tint); }
.soon { color: var(--warn); font-weight: 600; }

.detail { border-top: 1px dashed var(--rule); padding: 14px 16px 16px; display: grid; grid-template-columns: minmax(0, 1fr) 170px; gap: 18px; }
.detail dl { margin: 0; display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 6px 12px; font-size: 14px; }
.detail dt { color: var(--ink-2); }
.detail dd { margin: 0; overflow-wrap: anywhere; }
.detail .copy { font: 500 12px var(--f-body); border: 1px solid var(--rule); background: none; color: var(--ink-2); border-radius: 6px; padding: 1px 7px; margin-left: 6px; cursor: pointer; }
.hist { grid-column: 1 / -1; }
.hist h4, .why h4 { font: 600 12px var(--f-body); letter-spacing: .07em; text-transform: uppercase; color: var(--ink-2); margin: 4px 0 8px; }
.hist ol { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--rule); }
.hist li { position: relative; padding: 0 0 8px 14px; font-size: 13.5px; }
.hist li::before { content: ""; position: absolute; left: -6px; top: 6px; width: 10px; height: 10px; border-radius: 50%; background: var(--sheet); border: 2px solid var(--rule); }
.hist li.cur::before { border-color: var(--stamp); background: var(--stamp); }
.hist .mono { font-family: var(--f-data); font-size: 12px; }
.regnote { grid-column: 1 / -1; font-size: 13px; color: var(--ink-2); background: var(--paper); border-radius: 8px; padding: 8px 10px; }
.regnote b { color: var(--ink); font-weight: 600; }

/* The stamp: the one bold element. Licence state as an icon badge: tinted icon square, status, date, source. */
.stamp { align-self: start; justify-self: end; width: 170px; max-width: 100%; display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 10px; align-items: center; padding: 10px 12px; border-radius: 12px; background: var(--sheet); border: 1px solid var(--rule); }
.stamp .s-ico { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--t); color: var(--c); }
.stamp .s-ico svg { width: 24px; height: 24px; }
.stamp .s2 { display: block; font: 700 15px/1.2 var(--f-display); color: var(--c); }
.stamp .s3 { display: block; font: 500 11.5px var(--f-data); color: var(--ink-2); margin-top: 2px; }
.stamp .s1 { grid-column: 1 / -1; font: 600 10px var(--f-body); letter-spacing: .12em; text-transform: uppercase; color: var(--ink-2); border-top: 1px solid var(--rule); padding-top: 7px; }
.stamp.valid { --c: var(--stamp); --t: var(--stamp-tint); } .stamp.warn { --c: var(--warn); --t: var(--warn-tint); } .stamp.bad { --c: var(--bad); --t: var(--bad-tint); } .stamp.mute { --c: var(--mute); --t: var(--mute-tint); }

.empty { background: var(--sheet); border: 1px solid var(--rule); border-radius: var(--radius); padding: 18px; }
.empty h3 { font: 600 18px var(--f-display); margin: 0 0 6px; }
.empty p { margin: 0 0 8px; color: var(--ink-2); max-width: 62ch; }
.more { margin: 14px auto 0; display: block; font: 600 14px var(--f-body); color: var(--stamp); background: none; border: 1px solid var(--stamp); border-radius: 999px; padding: 9px 18px; cursor: pointer; }

.guide { margin-top: 44px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 26px; }
.guide h2 { font: 600 22px var(--f-display); margin: 0 0 10px; grid-column: 1 / -1; }
.guide h3 { font: 600 15px var(--f-body); margin: 0 0 4px; }
.guide p { margin: 0; color: var(--ink-2); font-size: 14px; }
.guide .row { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px; align-items: start; }
.guide .row .pill { grid-row: auto; grid-column: auto; }
footer { margin-top: 44px; padding-top: 16px; border-top: 1px solid var(--rule); font-size: 12.5px; color: var(--ink-2); }
footer p { margin: 0 0 6px; max-width: 75ch; }


/* ---- List + map split. The map stays in view while the list scrolls. */
.split { display: grid; grid-template-columns: clamp(360px, 36%, 560px) minmax(0, 1fr); gap: 28px; align-items: start; }
.col-list { min-width: 0; }
.col-map { position: sticky; top: calc(var(--hdr) + 12px); min-width: 0; }   /* same as its starting position: scrolling does not move it */
.mapwrap { position: relative; }
.mapnote { position: absolute; z-index: 1100; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(340px, calc(100% - 32px)); background: var(--sheet); border: 1px solid var(--rule); border-radius: var(--radius); padding: 14px 16px; font-size: 14px; color: var(--ink-2); box-shadow: 0 4px 16px rgba(0,0,0,.12); text-align: center; }
#map { height: calc(100vh - var(--hdr) - 58px); height: calc(100dvh - var(--hdr) - 58px); min-height: 420px; border: 1px solid var(--rule); border-radius: var(--radius); background: var(--map-sea); isolation: isolate; overflow: hidden; }
.map-foot { display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: center; font-size: 12.5px; color: var(--ink-2); margin-top: 8px; }
.lg { display: inline-flex; align-items: center; gap: 6px; }
.lg i { width: 12px; height: 12px; border-radius: 50%; display: inline-block; border: 2px solid #fff; box-shadow: 0 0 0 1px var(--map-sea); }
.lg i.ring { background: #fff !important; border: 3px solid var(--pin-mute); box-shadow: 0 0 0 1px var(--map-sea); }
.viewtoggle { display: none; }
.maplinks { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; }
.maplinks button { font: 600 13px var(--f-body); color: var(--stamp); background: var(--stamp-tint); border: 0; border-radius: 999px; padding: 4px 12px; cursor: pointer; }
.entry.hl { border-color: var(--stamp); box-shadow: 0 0 0 2px var(--stamp-tint); }

/* Map shapes are styled here (not in Leaflet options) so they follow the theme. */
.bm-sea { fill: var(--map-sea); stroke: var(--map-line); stroke-width: .8; }
.bm-land { fill: var(--map-land); stroke: var(--map-label); stroke-width: 1.2; }
.bm-dist { fill: none; stroke: var(--map-line); stroke-width: .8; }
.bm-water { fill: var(--map-water); stroke: none; }
.bm-river { fill: none; stroke: var(--map-water); stroke-width: 1.6; }
.bm-river.big { stroke-width: 2.6; }
.bm-road { fill: none; stroke: var(--map-road); stroke-width: .9; }
.bm-road.major { stroke-width: 1.6; }
.town-label { font: 600 12px var(--f-body); color: var(--map-label); white-space: nowrap; text-shadow: 0 0 3px var(--map-land), 0 0 3px var(--map-land); pointer-events: none; transform: translate(-50%, -50%); }
.town-label.big { font-size: 13.5px; color: #eef0f3; }

/* Home markers: a dot per home; filled = exact address, ring = approximate position. */
.leaflet-tile-pane { filter: var(--map-tiles); }
.pin { width: 16px; height: 16px; margin: -8px 0 0 -8px; border-radius: 50%; border: 2.5px solid #fff; box-shadow: 0 1px 4px rgba(0,0,0,.6); }
.pin.valid { background: var(--pin-ok); } .pin.warn { background: var(--pin-warn); } .pin.mute { background: var(--pin-mute); } .pin.bad { background: var(--pin-bad); }
.pin.approx { background: #fff !important; border-width: 3.5px; }
.pin.approx.valid { border-color: var(--pin-ok); } .pin.approx.warn { border-color: var(--pin-warn); } .pin.approx.mute { border-color: var(--pin-mute); } .pin.approx.bad { border-color: var(--pin-bad); }
.pin.sel { width: 24px; height: 24px; margin: -12px 0 0 -12px; box-shadow: 0 0 0 4px rgba(255,255,255,.35), 0 1px 6px rgba(0,0,0,.6); z-index: 1000 !important; }
.cl { display: grid; place-items: center; border-radius: 50%; background: #f6f7f5; color: #1b2230; font: 600 13px var(--f-body); border: 3px solid #1b2230; box-shadow: 0 0 0 2px rgba(255,255,255,.55), 0 1px 5px rgba(0,0,0,.6); font-variant-numeric: tabular-nums; }

/* ---- Leaflet essentials (inlined: the page may not load stylesheets from other hosts). */
.leaflet-pane, .leaflet-marker-icon, .leaflet-marker-shadow, .leaflet-tile, .leaflet-tile-container, .leaflet-pane > svg, .leaflet-pane > canvas, .leaflet-zoom-box, .leaflet-image-layer, .leaflet-layer { position: absolute; left: 0; top: 0; }
.leaflet-container { overflow: hidden; -webkit-tap-highlight-color: transparent; font-family: var(--f-body); outline-offset: 1px; }
.leaflet-tile, .leaflet-marker-icon, .leaflet-marker-shadow { user-select: none; -webkit-user-drag: none; }
.leaflet-marker-icon, .leaflet-marker-shadow { display: block; }
.leaflet-container .leaflet-overlay-pane svg { max-width: none !important; max-height: none !important; }
.leaflet-container img.leaflet-tile { max-width: none !important; max-height: none !important; width: auto; padding: 0; mix-blend-mode: normal; }
.leaflet-container.leaflet-touch-zoom { touch-action: pan-x pan-y; }
.leaflet-container.leaflet-touch-drag { touch-action: none; touch-action: pinch-zoom; }
.leaflet-container.leaflet-touch-drag.leaflet-touch-zoom { touch-action: none; }
.leaflet-tile { filter: inherit; visibility: hidden; } .leaflet-tile-loaded { visibility: inherit; }
.leaflet-pane { z-index: 400; } .leaflet-tile-pane { z-index: 200; } .leaflet-overlay-pane { z-index: 400; }
.leaflet-shadow-pane { z-index: 500; } .leaflet-marker-pane { z-index: 600; } .leaflet-tooltip-pane { z-index: 650; } .leaflet-popup-pane { z-index: 700; }
.leaflet-map-pane canvas { z-index: 100; } .leaflet-map-pane svg { z-index: 200; }
.leaflet-control { position: relative; z-index: 800; pointer-events: auto; float: left; clear: both; }
.leaflet-top, .leaflet-bottom { position: absolute; z-index: 1000; pointer-events: none; }
.leaflet-top { top: 0; } .leaflet-right { right: 0; } .leaflet-bottom { bottom: 0; } .leaflet-left { left: 0; }
.leaflet-right .leaflet-control { float: right; }
.leaflet-top .leaflet-control { margin-top: 10px; } .leaflet-bottom .leaflet-control { margin-bottom: 10px; }
.leaflet-left .leaflet-control { margin-left: 10px; } .leaflet-right .leaflet-control { margin-right: 10px; }
.leaflet-fade-anim .leaflet-popup { opacity: 0; transition: opacity .2s linear; }
.leaflet-fade-anim .leaflet-map-pane .leaflet-popup { opacity: 1; }
.leaflet-zoom-animated { transform-origin: 0 0; }
.leaflet-zoom-anim .leaflet-zoom-animated { transition: transform .25s cubic-bezier(0,0,.25,1); }
.leaflet-zoom-anim .leaflet-tile, .leaflet-pan-anim .leaflet-tile { transition: none; }
.leaflet-zoom-anim .leaflet-zoom-hide { visibility: hidden; }
.leaflet-interactive { cursor: pointer; }
.leaflet-grab { cursor: grab; } .leaflet-dragging .leaflet-grab { cursor: grabbing; }
.leaflet-marker-icon, .leaflet-marker-shadow, .leaflet-image-layer, .leaflet-pane > svg path, .leaflet-tile-container { pointer-events: none; }
.leaflet-marker-icon.leaflet-interactive, .leaflet-image-layer.leaflet-interactive, .leaflet-pane > svg path.leaflet-interactive { pointer-events: auto; }
.leaflet-bar { border-radius: 8px; border: 1px solid var(--rule); background: var(--sheet); overflow: hidden; }
.leaflet-bar a { display: block; width: 32px; height: 32px; line-height: 32px; text-align: center; text-decoration: none; color: var(--ink); background: var(--sheet); font: 600 18px var(--f-body); }
.leaflet-bar a + a { border-top: 1px solid var(--rule); }
.leaflet-bar a.leaflet-disabled { color: var(--rule); cursor: default; }
.leaflet-popup { position: absolute; text-align: center; margin-bottom: 18px; }
.leaflet-popup-content-wrapper { padding: 1px; text-align: left; border-radius: 10px; background: var(--sheet); color: var(--ink); box-shadow: 0 4px 16px rgba(0,0,0,.25); }
.leaflet-popup-content { margin: 12px 16px; line-height: 1.4; min-width: 200px; font-size: 13.5px; }
.leaflet-popup-tip-container { width: 40px; height: 20px; position: absolute; left: 50%; margin-top: -1px; margin-left: -20px; overflow: hidden; pointer-events: none; }
.leaflet-popup-tip { width: 17px; height: 17px; padding: 1px; margin: -10px auto 0; transform: rotate(45deg); background: var(--sheet); box-shadow: 0 3px 14px rgba(0,0,0,.2); }
.leaflet-popup-close-button { position: absolute; top: 2px; right: 4px; border: none; width: 24px; height: 24px; font: 18px/24px var(--f-body); color: var(--ink-2); text-decoration: none; background: transparent; text-align: center; }
.leaflet-control-attribution { background: var(--sheet); color: var(--ink-2); font-size: 11px; padding: 1px 6px; border-radius: 6px 0 0 0; margin: 0 !important; }
.leaflet-control-attribution a { color: var(--ink-2); }
.leaflet-cluster-anim .leaflet-marker-icon { transition: transform .3s ease-out, opacity .3s ease-in; }
.leaflet-cluster-spider-leg { transition: stroke-dashoffset .3s ease-out, stroke-opacity .3s ease-in; }
.pop-name { font: 600 15px var(--f-display); margin: 0 0 4px; }
.pop-meta { color: var(--ink-2); font-size: 12.5px; margin: 0 0 8px; }
.pop-open { font: 600 13px var(--f-body); color: var(--stamp); background: none; border: 1px solid var(--stamp); border-radius: 999px; padding: 4px 12px; cursor: pointer; }
.pop-pill { display: inline-block; font: 600 11.5px var(--f-body); padding: 2px 8px; border-radius: 999px; margin-bottom: 6px; }

/* Left column is narrower than the old full-width hero: 2×2 figures, filters on full rows. */
.col-list .hero { max-width: none; padding-top: 4px; }
.col-list .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.col-list .selects { margin-left: 0; width: 100%; }
.col-list .selects select { flex: 1 1 140px; min-width: 0; }
.col-list .filters { margin-top: 22px; }
.stats { margin-bottom: 18px; }
.stats .facts { margin-top: 4px; }

/* Wide screens: the left column is a scrolling panel as tall as the map, so the page stays compact.
   Search and filters stay pinned at its top; the list of homes scrolls under them; the map and its legend stay in view. */
@media (min-width: 961px) {
  .col-list { position: relative; height: calc(100vh - var(--hdr) - 30px); height: calc(100dvh - var(--hdr) - 30px); min-height: 480px;
    overflow-y: auto; scrollbar-width: thin; padding: 0 10px 16px 2px; margin-left: -2px; }
  .tools { position: sticky; top: 0; z-index: 5; background: var(--paper); padding-block: 8px 2px; box-shadow: 0 1px 0 var(--rule); }
  .col-list .filters { margin-block: 12px 10px; }
  .col-list .svcrow { margin-bottom: 10px; }
  .col-list .hero { padding-block: 4px 6px; }
  .col-list .hero p.lede { margin-bottom: 8px; }
  .col-list .stats .facts { margin-block: 16px 6px; }
  .col-list .results { margin-top: 18px; }
}

@media (max-width: 960px) {
  .split { grid-template-columns: minmax(0, 1fr); }
  .split[data-view="map"] .results { display: none; }
  .viewtoggle { display: inline-flex; margin-block: 0 12px; border: 1px solid var(--rule); border-radius: 999px; overflow: hidden; background: var(--sheet); }
  .viewtoggle button { border: 0; background: none; color: var(--ink-2); font: 600 14px var(--f-body); padding: 8px 18px; cursor: pointer; }
  .viewtoggle button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
  .split[data-view="list"] .col-map { display: none; }
  .col-map { position: static; }
  #map { height: 70vh; }
}

@media (max-width: 640px) {
  .brand small { display: none; }
  .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .detail { grid-template-columns: minmax(0, 1fr); }
  .stamp { justify-self: start; }
  .detail dl { grid-template-columns: 110px minmax(0, 1fr); }
  .guide { grid-template-columns: minmax(0, 1fr); }
  .selects { margin-left: 0; width: 100%; }
  .selects select { flex: 1 1 0; min-width: 0; }
}
@media (prefers-reduced-motion: no-preference) {
  .entry .detail { animation: open .18s ease-out; }
  @keyframes open { from { opacity: .3; transform: translateY(-3px); } to { opacity: 1; transform: none; } }
}

/* ---- Navigation, mode switch, services, nearby, owner prompt */
.brand { text-decoration: none; color: inherit; }
.top-r { display: flex; align-items: center; gap: 10px 18px; flex-wrap: wrap; justify-content: flex-end; }
.navlinks { display: flex; gap: 4px 16px; flex-wrap: wrap; font-size: 14px; }
.navlinks a { color: var(--ink-2); text-decoration: none; font-weight: 500; }
.navlinks a:hover { color: var(--stamp); text-decoration: underline; }
.modes { display: inline-flex; border: 1px solid var(--rule); border-radius: 999px; background: var(--sheet); margin: 0 0 16px; padding: 3px; gap: 2px; }
.modes button { border: 0; background: none; font: 600 14px var(--f-body); color: var(--ink-2); padding: 7px 16px; cursor: pointer; border-radius: 999px; }
.modes button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.svcrow { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: -4px 0 14px; font-size: 13px; color: var(--ink-2); }
.chip.sm { padding: 5px 10px; font-size: 12.5px; }
.split.single { grid-template-columns: minmax(0, 1fr); }
.split.single .col-map { display: none; }
.split.single .col-list { max-width: 860px; }
.split.single .col-list .facts { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.reveal { font: 600 13px var(--f-body); color: var(--stamp); background: var(--stamp-tint); border: 0; border-radius: 999px; padding: 4px 12px; cursor: pointer; }
.box { grid-column: 1 / -1; border-top: 1px dashed var(--rule); padding-top: 12px; }
.box h4 { font: 600 12px var(--f-body); letter-spacing: .07em; text-transform: uppercase; color: var(--ink-2); margin: 0 0 8px; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 8px; }
.tag { font: 500 12.5px var(--f-body); padding: 3px 10px; border-radius: 999px; background: var(--ok-tint); color: var(--ok); }
.tag.no { background: var(--mute-tint); color: var(--mute); text-decoration: line-through; }
.small { font-size: 12.5px; color: var(--ink-2); }
.quotes { font-size: 13px; color: var(--ink-2); margin: 6px 0 0; padding-left: 18px; }
details summary { cursor: pointer; }
.nearby ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; }
.nearby li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; font-size: 14px; }
.linkbtn { all: unset; cursor: pointer; color: var(--stamp); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.linkbtn:focus-visible { outline: 2px solid var(--stamp); outline-offset: 2px; border-radius: 3px; }
.pill.sm { grid-row: auto; grid-column: auto; justify-self: auto; font-size: 11px; padding: 2px 8px; }
.cta { grid-column: 1 / -1; background: var(--stamp-tint); border-radius: 8px; padding: 10px 12px; font-size: 13.5px; }
.cta a, .pagelink { font-weight: 600; }
.histban.pre { color: var(--ink-2); }
.histban.ranija { color: var(--warn); }
.histban.tekuca, .histban.posle { color: var(--bad); }
@media (max-width: 640px) {
  :root { --hdr: 84px; }
  header.top { flex-direction: column; align-items: stretch; justify-content: center; gap: 6px; }
  .top-r { justify-content: flex-start; flex-wrap: nowrap; min-width: 0; }
  .navlinks { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; white-space: nowrap; gap: 4px 16px; }
  .navlinks::-webkit-scrollbar { display: none; }
}

/* ---- Static pages (build_pages.py) */
.wrap.narrow { max-width: 1240px; }
.page { max-width: 900px; }
.page h1 { font-family: var(--f-display); font-weight: 600; font-size: clamp(26px, 4.4vw, 36px); line-height: 1.15; margin: 0 0 8px; text-wrap: balance; overflow-wrap: anywhere; }
.crumbs { font-size: 13px; color: var(--ink-2); margin: 6px 0 14px; overflow-wrap: anywhere; }
.crumbs a { color: var(--ink-2); }
.sub { color: var(--ink-2); margin: 0 0 18px; }
.sub .pill { vertical-align: 2px; }
.card { background: var(--sheet); border: 1px solid var(--rule); border-radius: var(--radius); }
.card .detail { border-top: 0; }
.mono { font-family: var(--f-data); font-size: 13px; }
.sec { margin-top: 30px; }
.sec h2 { font: 600 22px var(--f-display); margin: 0 0 10px; }
.sec h2 .small { font-family: var(--f-body); font-weight: 400; }
.sec > details > summary { font-size: 15px; margin-bottom: 10px; }
.minimap { height: 300px; border: 1px solid var(--rule); border-radius: var(--radius); background: var(--map-sea); isolation: isolate; overflow: hidden; margin-bottom: 6px; }
.minimap.tall { height: min(60vh, 520px); }
.faq details { background: var(--sheet); border: 1px solid var(--rule); border-radius: var(--radius); padding: 12px 16px; margin-bottom: 8px; }
.faq summary { font-weight: 600; }
.faq p { margin: 8px 0 0; color: var(--ink-2); }
.entry > a.head { cursor: pointer; color: inherit; text-decoration: none; }
.entry > a.head:hover .e-name { color: var(--stamp); text-decoration: underline; }
.entry > a.head:focus-visible { outline: 2px solid var(--stamp); outline-offset: -2px; border-radius: var(--radius); }
.entry .e-meta a { font-weight: 600; }
.nearby li a { font-weight: 600; }
.srclist { padding-left: 18px; font-size: 14px; color: var(--ink-2); }
.btnlink { display: inline-block; font: 600 14px var(--f-body); color: var(--stamp); border: 1px solid var(--stamp); border-radius: 999px; padding: 8px 16px; text-decoration: none; margin-top: 8px; }
.btnlink:hover { background: var(--stamp-tint); }
.toc { line-height: 1.9; }
.townfilter { display: flex; flex-wrap: wrap; gap: 6px; margin: 14px 0 6px; }
.townfilter a.chip { text-decoration: none; }
.townfilter a.chip .small { color: inherit; opacity: .7; }
.townlist { list-style: none; padding: 0; margin: 0; columns: 3 200px; column-gap: 24px; }
.townlist li { break-inside: avoid; padding: 4px 0; }
.townlist a { font-weight: 600; }
.prose { max-width: 70ch; font-size: 16px; line-height: 1.65; }
.prose h2 { font: 600 24px var(--f-display); margin: 32px 0 8px; }
.prose h3 { font: 600 18px var(--f-body); margin: 24px 0 6px; }
.prose ul, .prose ol { padding-left: 22px; }
.prose li { margin-bottom: 4px; }
.prose ul.tasks { list-style: none; padding-left: 2px; }
.prose ul.tasks li::before { content: "☐"; margin-right: 8px; color: var(--ink-2); }
.prose a { overflow-wrap: anywhere; }
.page .cta { margin-top: 30px; }
.footnav { display: flex; flex-wrap: wrap; gap: 4px 16px; }
.fresh { font-size: 13px; color: var(--ink-2); margin: 0 0 10px; }
.fresh.stale, .notice.warn { color: var(--ink); background: var(--warn-tint, #fdf3e1); border-left: 3px solid var(--warn); border-radius: 6px; padding: 10px 12px; }
.notice { font-size: 15px; margin: 0 0 16px; }
.notice a { font-weight: 600; }
.sec.prose { max-width: 70ch; }
.sec.prose li { margin-bottom: 8px; }
.phones .copy { margin-right: 8px; }
.pop-name a { color: var(--ink); }
@media (max-width: 640px) { .navlinks { font-size: 13px; gap: 4px 12px; } .minimap.tall { height: 55vh; } }
