
/* Layout: wegenkaart links, straatkaart met twee grote knoppen rechts; op de telefoon onder elkaar.
   Taal: wegmarkering en het blauwe P-bord. */
:root {
  --bg: #e8ecf0; --surface: #f8fafb; --ink: #17212b; --muted: #55636f; --line: #cbd3da;
  --sign: #0b5cad; --on-sign: #ffffff;
  --map: #dfe4e9; --block: #d2d9df; --water: #b7d0e6; --road: #aab4bd; --road-edge: #f8fafb;
  --goed: #16794a; --misschien: #a96400; --bezet: #b3261e;
  --font-display: "Barlow Condensed", "Arial Narrow", sans-serif;
  --font-body: "Overpass", "Segoe UI", system-ui, sans-serif;
  --font-data: "Overpass Mono", ui-monospace, monospace;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #12161b; --surface: #1c2229; --ink: #e9eef3; --muted: #a0adb8; --line: #333d47;
    --sign: #7ab8f7; --on-sign: #0b1b2b;
    --map: #1a2027; --block: #262e36; --water: #213a50; --road: #4a5661; --road-edge: #12161b;
    --goed: #52cf8e; --misschien: #f2b64f; --bezet: #f28b7f; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #12161b; --surface: #1c2229; --ink: #e9eef3; --muted: #a0adb8; --line: #333d47;
  --sign: #7ab8f7; --on-sign: #0b1b2b;
  --map: #1a2027; --block: #262e36; --water: #213a50; --road: #4a5661; --road-edge: #12161b;
  --goed: #52cf8e; --misschien: #f2b64f; --bezet: #f28b7f; color-scheme: dark;
}
@font-face { font-family: "Barlow Condensed"; font-weight: 700; font-display: swap; src: url(fonts/barlow-condensed-700.woff2) format("woff2"); }
@font-face { font-family: "Overpass"; font-weight: 400; font-display: swap; src: url(fonts/overpass-400.woff2) format("woff2"); }
@font-face { font-family: "Overpass"; font-weight: 700; font-display: swap; src: url(fonts/overpass-700.woff2) format("woff2"); }
@font-face { font-family: "Overpass Mono"; font-weight: 500; font-display: swap; src: url(fonts/overpass-mono-500.woff2) format("woff2"); }
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; padding-top: env(safe-area-inset-top, 0px); padding-bottom: env(safe-area-inset-bottom, 0px); }
[hidden] { display: none !important; }
body { background: var(--bg); color: var(--ink); font-family: var(--font-body); font-size: 16px; line-height: 1.45; }
.app {
  max-width: 1040px; margin: 0 auto; display: grid; gap: 16px;
  padding-block: 16px 32px;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
header { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 1 1 200px; }
.psign { flex: none; width: 44px; height: 44px; display: block; }
h1 { margin: 0; font: 700 30px/1 var(--font-display); letter-spacing: .01em; }
.tag { margin: 2px 0 0; color: var(--muted); font-size: 14px; }
.switch { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; cursor: pointer; }
.switch input { width: 20px; height: 20px; accent-color: var(--sign); margin: 0; }

.notice { margin: 0; padding: 10px 12px; border: 2px dashed var(--misschien); border-radius: 6px; font-size: 14px; }
.notice[data-kind="info"] { border-color: var(--line); color: var(--muted); }

.main { display: grid; gap: 16px; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); align-items: start; }
.mapwrap { background: var(--map); border-radius: 8px; overflow: hidden; min-width: 0; }
svg.map { display: block; width: 100%; height: auto; }
.street { cursor: pointer; outline: none; }
.street .hit { stroke: transparent; stroke-width: 13; fill: none; }
.street .edge { stroke: var(--road-edge); stroke-width: 7.5; fill: none; stroke-linecap: round; }
.street .top { stroke: var(--road); stroke-width: 5; fill: none; stroke-linecap: round; }
.street.s-goed .top { stroke: var(--goed); }
.street.s-misschien .top { stroke: var(--misschien); stroke-dasharray: 9 6; stroke-linecap: butt; }
.street.s-bezet .top { stroke: var(--bezet); stroke-dasharray: 1 8; }
.street.sel .edge, .street:focus-visible .edge { stroke: var(--ink); stroke-width: 10; }
.street text.old {
  font: 600 12px var(--font-body); fill: var(--ink); pointer-events: none;
  paint-order: stroke; stroke: var(--map); stroke-width: 3.5px; stroke-linejoin: round;
}
.metroname { font: 600 12px var(--font-body); fill: var(--muted); }
.noplace { stroke: var(--road); stroke-width: 2; fill: none; opacity: .6; }
.strname { font: 600 9.5px var(--font-body); fill: var(--ink); paint-order: stroke; stroke: var(--map); stroke-width: 3px; stroke-linejoin: round; pointer-events: none; }
.strname.main { font-weight: 700; font-size: 11px; }
.pmh { cursor: pointer; opacity: .55; }
.pmh rect { fill: var(--sign); stroke: var(--road-edge); stroke-width: 1.5; }
.pmh text { font: 700 11px var(--font-display); fill: var(--on-sign); }
.pmh-on .pmh { opacity: 1; }
.pmh:focus-visible { outline: 2px solid var(--ink); }
.pick { display: grid; gap: 4px; font-size: 13px; color: var(--muted); }
.pick select { font: inherit; font-size: 15px; color: var(--ink); background: var(--surface); border: 1.5px solid var(--line); border-radius: 6px; min-height: 42px; padding: 6px 8px; width: 100%; max-width: 100%; }
.btn:disabled { opacity: .4; cursor: not-allowed; }
.rank small { display: block; font-weight: 400; font-size: 12.5px; color: var(--muted); }
.pmhlist { list-style: none; margin: 0; padding: 0; display: grid; }
.pmhlist li { display: flex; justify-content: space-between; align-items: center; gap: 12px; border-top: 1px solid var(--line); }
.pmhlist li:first-child { border-top: 0; }
.pmhlist button { flex: 1; min-width: 0; text-align: left; background: none; border: 0; padding: 9px 2px; color: var(--ink); font-weight: 600; }
.pmhlist a { color: var(--sign); font-weight: 700; font-size: 14px; flex: none; }
.bar span { color: var(--ink); font-size: 12px; }
.mainname { font: 700 19px var(--font-display); fill: var(--ink); letter-spacing: .02em; }
.mark-p rect { fill: var(--sign); }
.mark-p text { font: 700 14px var(--font-display); fill: var(--on-sign); text-anchor: middle; }
.mark-car rect { fill: var(--ink); }
.mark-car text { font: 700 11px var(--font-display); fill: var(--bg); text-anchor: middle; letter-spacing: .03em; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; padding: 10px 12px; font-size: 13px; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend svg { width: 26px; height: 8px; flex: none; }
.legend .note { flex-basis: 100%; }

.side { display: grid; gap: 16px; min-width: 0; }
.card { background: var(--surface); border-radius: 8px; padding: 16px; display: grid; gap: 12px; min-width: 0; }
.label { margin: 0; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
h2 { margin: 0; font: 700 28px/1.05 var(--font-display); text-wrap: balance; overflow-wrap: anywhere; }
.statusline { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.chip { display: inline-block; padding: 2px 8px; border-radius: 4px; font-size: 13px; font-weight: 700; white-space: nowrap; border: 1.5px solid currentColor; }
.chip.s-goed { color: var(--goed); } .chip.s-misschien { color: var(--misschien); }
.chip.s-bezet { color: var(--bezet); } .chip.s-onbekend { color: var(--muted); }
.since { font-family: var(--font-data); font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.rule { margin: 0; font-size: 14px; color: var(--muted); }
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 0; border: 2px solid var(--ink); border-radius: 6px; overflow: hidden; }
.seg button { min-height: 42px; background: transparent; color: var(--ink); border: 0; font-weight: 700; font-size: 14px; padding: 6px; }
.seg button[aria-pressed="true"] { background: var(--ink); color: var(--bg); }
.actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
button { font: inherit; cursor: pointer; }
button:focus-visible, .switch input:focus-visible { outline: 3px solid var(--sign); outline-offset: 2px; }
.btn { min-height: 56px; border-radius: 6px; font: 700 21px/1 var(--font-display); letter-spacing: .02em; padding: 8px; }
.btn.park { background: transparent; color: var(--ink); border: 2px solid var(--ink); }
.btn.leave { background: var(--sign); color: var(--on-sign); border: 2px solid var(--sign); }
.hint { margin: 0; font-size: 13px; color: var(--muted); }

.bars { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; align-items: end; }
.bar { display: grid; gap: 4px; justify-items: stretch; font-family: var(--font-data); font-size: 11px; color: var(--muted); text-align: center; font-variant-numeric: tabular-nums; }
.bar .track { height: 56px; display: flex; align-items: flex-end; border-bottom: 1.5px solid var(--line); }
.bar i { display: block; width: 100%; background: var(--road); border-radius: 2px 2px 0 0; }
.bar.now i { background: var(--sign); }
.bar.now { color: var(--ink); }

.car { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.car p { margin: 0; min-width: 0; }
.link { background: none; border: 0; padding: 4px 0; color: var(--sign); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }

.rank { list-style: none; margin: 0; padding: 0; display: grid; }
.rank button {
  width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 8px; text-align: left;
  padding: 10px 2px; background: none; border: 0; border-top: 1px solid var(--line); color: var(--ink);
}
.rank li:first-child button { border-top: 0; }
.rank .nm { min-width: 0; font-weight: 600; }

footer { font-size: 13px; color: var(--muted); display: grid; gap: 4px; max-width: 70ch; }
footer p { margin: 0; }

.toast {
  position: fixed; left: 50%; transform: translateX(-50%); z-index: 20;
  bottom: calc(16px + env(safe-area-inset-bottom, 0px)); width: min(440px, calc(100vw - 32px));
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: var(--ink); color: var(--bg); border-radius: 6px; padding: 12px 14px; font-size: 15px;
}
.toast button { background: none; border: 0; color: inherit; font-weight: 700; text-decoration: underline; flex: none; padding: 0; }

@media (max-width: 760px) { .main { grid-template-columns: minmax(0, 1fr); } }
@media (prefers-reduced-motion: no-preference) { .street .top { transition: stroke .2s; } }

.gpsbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 12px 0; }
.gpsbtn { min-height: 44px; padding: 8px 14px; border-radius: 6px; border: 2px solid var(--sign); background: transparent; color: var(--sign); font-weight: 700; font-size: 15px; }
.gpsbtn[aria-pressed="true"] { background: var(--sign); color: var(--on-sign); }
.gpstext { flex: 1 1 180px; min-width: 0; margin: 0; font-size: 13.5px; color: var(--muted); }
.me-acc { fill: var(--sign); opacity: .16; }
.me-dot { fill: var(--sign); stroke: var(--road-edge); stroke-width: 3; }
footer a { color: inherit; }

.langs { display: flex; border: 2px solid var(--ink); border-radius: 6px; overflow: hidden; flex: none; }
.langs button { min-height: 40px; min-width: 46px; border: 0; background: transparent; color: var(--ink); font-weight: 700; }
.langs button[aria-pressed="true"] { background: var(--ink); color: var(--bg); }
.mapbox { position: relative; overflow: hidden; margin-top: 10px; }
svg.map { touch-action: pan-y; cursor: grab; user-select: none; -webkit-user-select: none; }
svg.map.zoomed { touch-action: none; }
svg.map .noplace, svg.map .street path { vector-effect: non-scaling-stroke; }
svg.map .noplace { stroke-width: 1.5px; }
svg.map .street .hit { stroke-width: 16px; }
svg.map .street .edge { stroke-width: 6.5px; }
svg.map .street .top { stroke-width: 4px; }
svg.map .street.sel .edge { stroke-width: 9px; }
svg.map.far .strname { display: none; }
svg.map.far .street .hit { stroke-width: 10px; }
svg.map.far .pmh { display: none; }
svg.map.far.hc .pmh { display: block; }
svg.map:not(.far) .street .edge { stroke-width: 8px; }
.zoom { position: absolute; right: 8px; top: 8px; display: grid; gap: 4px; justify-items: end; }
.zoom button { min-width: 42px; min-height: 42px; border-radius: 6px; border: 1.5px solid var(--line); background: var(--surface); color: var(--ink); font-size: 20px; font-weight: 700; }
.zoom .all { font-size: 13px; padding: 0 8px; min-height: 36px; }
.picks { display: grid; grid-template-columns: 1.3fr 1fr; gap: 8px; }
.picks select { min-width: 0; }
@media (max-width: 420px) { .picks { grid-template-columns: 1fr; } }
.legend b { font-weight: 400; }

#map { width: 100%; height: min(62vh, 560px); margin-top: 10px; }
.dot { width: 12px; height: 12px; border-radius: 50%; display: inline-block; }
.dot.goed { background: var(--goed); } .dot.misschien { background: var(--misschien); } .dot.bezet { background: var(--bezet); }
.sq { width: 12px; height: 12px; display: inline-block; background: var(--sign); border-radius: 2px; }
.mapwrap .maplibregl-ctrl-attrib { font-size: 11px; }
.sel-pin { width: 18px; height: 18px; border-radius: 50%; background: var(--ink); border: 3px solid var(--surface); box-shadow: 0 0 0 2px var(--ink); }
.me-pin { width: 16px; height: 16px; border-radius: 50%; background: var(--sign); border: 3px solid #fff; box-shadow: 0 0 0 6px rgba(11, 92, 173, .22); }
.car-pin { background: var(--ink); color: var(--bg); font: 700 12px var(--font-display); padding: 2px 6px; border-radius: 4px; }
.search { display: flex; gap: 8px; padding: 10px 12px 0; }
.search input { flex: 1; min-width: 0; min-height: 44px; font: inherit; font-size: 16px; color: var(--ink); background: var(--surface); border: 1.5px solid var(--line); border-radius: 6px; padding: 8px 10px; }
.search button { min-height: 44px; padding: 8px 14px; border-radius: 6px; border: 2px solid var(--sign); background: var(--sign); color: var(--on-sign); font-weight: 700; }
.search .mic { flex: none; width: 44px; padding: 0; display: inline-flex; align-items: center; justify-content: center; background: transparent; color: var(--sign); }
.search .mic[hidden] { display: none; }
.search .mic[aria-pressed="true"] { background: var(--sign); color: var(--on-sign); animation: mic 1.2s ease-in-out infinite; }
@keyframes mic { 50% { opacity: .55; } }
@media (prefers-reduced-motion: reduce) { .search .mic[aria-pressed="true"] { animation: none; } }
.results { list-style: none; margin: 6px 12px 0; padding: 0; background: var(--surface); border-radius: 6px; }
.results li + li { border-top: 1px solid var(--line); }
.results button { width: 100%; text-align: left; background: none; border: 0; padding: 10px; color: var(--ink); font-size: 14.5px; }
.results .msg { padding: 10px; font-size: 14px; color: var(--muted); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.ramp { display: inline-flex; align-items: center; gap: 8px; }
.grad { width: 96px; height: 10px; border-radius: 3px; display: inline-block; background: linear-gradient(90deg, #ffffff, #e5322d 50%, #67000d); border: 1px solid var(--line); }
