/* ===================================================================
   Verkeer Live — design system (red on warm-dark; OVRealtime-style shell)
   =================================================================== */
:root {
  --brand: #ef4444;
  --brand-2: #f97362;
  --brand-ink: #ffffff;
  --danger: #fb7185;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 10px 30px -12px rgba(0, 0, 0, .5);
  --shadow-lg: 0 24px 60px -20px rgba(0, 0, 0, .6);
  --nav-h: 62px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  /* data accents (congestion / layers) */
  --c-free: #16a34a; --c-slow: #facc15; --c-jam: #ef4444;
}

/* dark (default) — warm, red-tinted */
:root, [data-theme="dark"] {
  --bg: #0c0809;
  --bg-2: #130d0f;
  --surface: #191115;
  --surface-2: #22171b;
  --surface-3: #2c1d22;
  --border: #382329;
  --border-2: #4a2e35;
  --text: #f6edef;
  --muted: #b69aa0;
  --muted-2: #886d73;
  --glass: rgba(18, 12, 14, .74);
}
[data-theme="light"] {
  --bg: #f6f0f1;
  --bg-2: #ffffff;
  --surface: #ffffff;
  --surface-2: #faf2f3;
  --surface-3: #f1e5e7;
  --border: #ecdee1;
  --border-2: #dcc8cc;
  --text: #1c1013;
  --muted: #6f5b60;
  --muted-2: #9c878c;
  --glass: rgba(255, 255, 255, .8);
  --shadow: 0 10px 30px -14px rgba(40, 15, 20, .22);
  --shadow-lg: 0 24px 60px -22px rgba(40, 15, 20, .26);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: var(--font); background: var(--bg); color: var(--text);
  -webkit-font-smoothing: antialiased; line-height: 1.55; overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
img { max-width: 100%; display: block; }
::selection { background: var(--brand); color: var(--brand-ink); }

/* ---------- Nav ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; height: var(--nav-h); z-index: 50;
  display: flex; align-items: center; gap: 20px; padding: 0 22px;
  background: var(--glass); backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--border);
}
.nav__brand { display: flex; align-items: center; gap: 10px; }
.nav__logo { color: var(--brand); display: grid; place-items: center; }
.nav__name { font-weight: 700; font-size: 19px; letter-spacing: -.02em; }
.nav__name strong { font-weight: 800; color: var(--brand); }
.nav__links { display: flex; gap: 4px; margin-left: 14px; }
.nav__links a { padding: 8px 14px; border-radius: 999px; font-size: 14.5px; font-weight: 500; color: var(--muted); transition: .15s; }
.nav__links a:hover { color: var(--text); background: var(--surface-2); }
.nav__links a.active { color: var(--brand); background: color-mix(in srgb, var(--brand) 14%, transparent); }
.nav__right { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.livepill {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 13px;
  border: 1px solid var(--border); border-radius: 999px; font-size: 13px;
  font-weight: 600; font-variant-numeric: tabular-nums; background: var(--surface); color: var(--text);
}
.livepill b { color: var(--brand); font-weight: 800; }
.livepill__dot {
  width: 8px; height: 8px; border-radius: 50%; background: var(--brand);
  box-shadow: 0 0 0 0 color-mix(in srgb, var(--brand) 70%, transparent); animation: pulse 2s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--brand) 65%, transparent); }
  70% { box-shadow: 0 0 0 7px transparent; }
  100% { box-shadow: 0 0 0 0 transparent; }
}
.nav__burger { display: none; flex-direction: column; gap: 5px; padding: 6px; }
.nav__burger span { width: 22px; height: 2px; background: var(--text); border-radius: 2px; transition: transform .22s ease, opacity .18s ease; transform-origin: center; }
.nav__burger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav__burger.open span:nth-child(2) { opacity: 0; }
.nav__burger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Content shell ---------- */
.content { padding-top: var(--nav-h); min-height: 100vh; min-height: 100dvh; }
.content[hidden] { display: none; }
.wrap { max-width: 1140px; margin: 0 auto; padding: 0 22px; }
.section { padding: 84px 0; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 9px; padding: 13px 22px; border-radius: 12px;
  font-weight: 600; font-size: 15px; transition: .18s; border: 1px solid transparent; white-space: nowrap;
}
.btn svg { width: 18px; height: 18px; }
.btn--primary { background: var(--brand); color: var(--brand-ink); }
.btn--primary:hover { background: var(--brand-2); transform: translateY(-1px); box-shadow: 0 10px 24px -10px color-mix(in srgb, var(--brand) 70%, transparent); }
.btn--ghost { background: var(--surface); border-color: var(--border); color: var(--text); }
.btn--ghost:hover { background: var(--surface-2); border-color: var(--border-2); }
.btn--lg { padding: 15px 26px; font-size: 16px; }
.btn--coffee { background: linear-gradient(120deg, #ffb24d, #f59331); color: #2a1a06; }
.btn--coffee:hover { filter: brightness(1.04); transform: translateY(-1px); box-shadow: 0 10px 24px -10px rgba(245, 147, 49, .6); }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--border); padding: 40px 0; color: var(--muted); }
.footer__row { display: flex; justify-content: space-between; align-items: center; gap: 18px; flex-wrap: wrap; }
.footer__links { display: flex; gap: 20px; }
.footer__links a:hover { color: var(--text); }

/* ===================================================================
   Homepage
   =================================================================== */
.lp-hero { position: relative; overflow: hidden; padding: clamp(40px, 7vw, 92px) 0 clamp(30px, 5vw, 58px); }
.lp-hero__glow { position: absolute; inset: 0; z-index: -1;
  background: radial-gradient(900px 460px at 86% -12%, color-mix(in srgb, var(--brand) 24%, transparent), transparent 60%),
              radial-gradient(720px 420px at -5% 8%, color-mix(in srgb, #f59331 16%, transparent), transparent 55%); }
.lp-hero__glow::after {
  content: ""; position: absolute; inset: 0;
  background-image: linear-gradient(var(--border) 1px, transparent 1px), linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 46px 46px; opacity: .3;
  mask-image: radial-gradient(circle at 60% 20%, black, transparent 72%);
}
.lp-hero__grid { display: grid; grid-template-columns: 1.12fr .88fr; gap: 48px; align-items: center; }
.hero__badge {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border: 1px solid var(--border);
  border-radius: 999px; background: var(--surface); font-size: 13px; font-weight: 600; color: var(--muted); margin-bottom: 22px;
}
.hero__badge b { color: var(--brand); }
.lp-title { font-size: clamp(33px, 5.2vw, 60px); line-height: 1.03; letter-spacing: -.035em; font-weight: 800; margin: 6px 0 0; }
.lp-title .grad { background: linear-gradient(120deg, var(--brand), #f59331); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lead { font-size: clamp(16px, 2vw, 20px); color: var(--muted); max-width: 56ch; }
.lp-hero .lead { margin: 20px 0 30px; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.lp-modes { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 30px; }
.lp-mode { display: inline-flex; align-items: center; gap: 7px; padding: 6px 13px; border: 1px solid var(--border); border-radius: 999px; font-size: 13px; font-weight: 600; background: var(--surface); }
.lp-mode__dot { width: 9px; height: 9px; border-radius: 50%; }

.lp-card { background: var(--surface); border: 1px solid var(--border); border-radius: 18px; box-shadow: var(--shadow-lg); overflow: hidden; }
.lp-card__head { display: flex; align-items: center; gap: 9px; padding: 14px 16px; font-weight: 700; font-size: 13.5px; border-bottom: 1px solid var(--border); color: var(--muted); }
.lp-card__grid { display: grid; grid-template-columns: 1fr 1fr; }
.lp-kpi { padding: 18px 16px; border-bottom: 1px solid var(--border); }
.lp-kpi:nth-child(odd) { border-right: 1px solid var(--border); }
.lp-kpi__n { font-size: 30px; font-weight: 800; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.lp-kpi__n.warn { color: var(--brand); }
.lp-kpi__l { font-size: 12.5px; color: var(--muted); font-weight: 500; margin-top: 2px; }

.lp-stats { border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); background: var(--bg-2); }
.lp-stats__row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; padding: 28px 22px; max-width: 1140px; margin: 0 auto; }
.lp-stat { display: flex; flex-direction: column; align-items: center; text-align: center; }
.lp-stat__n { font-size: clamp(24px, 3.4vw, 34px); font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.lp-stat__l { font-size: 13px; color: var(--muted); font-weight: 500; }

.lp-sec-head { margin-bottom: 34px; max-width: 60ch; }
.lp-sec-head h2 { font-size: clamp(26px, 3.6vw, 38px); letter-spacing: -.03em; font-weight: 800; }
.lp-sec-head .sub { margin-top: 8px; color: var(--muted); font-size: 17px; }
.bento { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.bento__cell { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; transition: .2s; }
.bento__cell:hover { border-color: var(--border-2); transform: translateY(-3px); box-shadow: var(--shadow); }
.bento__cell--lg { grid-row: span 2; display: flex; flex-direction: column; }
.bento__cell--wide { grid-column: span 2; }
.bento__ic { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: color-mix(in srgb, var(--brand) 15%, transparent); color: var(--brand); margin-bottom: 14px; font-size: 22px; }
.bento__ic svg { width: 23px; height: 23px; }
.bento__cell h3 { font-size: 18px; font-weight: 700; margin-bottom: 6px; letter-spacing: -.01em; }
.bento__cell p { color: var(--muted); font-size: 14.5px; }

.lp-cta { position: relative; overflow: hidden; margin-top: 24px; }
.lp-cta__map { position: absolute; inset: 0; }
.lp-cta__veil { position: absolute; inset: 0; background: linear-gradient(180deg, color-mix(in srgb, var(--bg) 52%, transparent), color-mix(in srgb, var(--bg) 86%, transparent)); }
.lp-cta__inner { position: relative; text-align: center; padding: clamp(56px, 9vw, 110px) 22px; }
.lp-cta__inner h2 { font-size: clamp(28px, 4.4vw, 44px); letter-spacing: -.03em; font-weight: 800; margin: 14px 0 12px; }
.lp-cta__inner p { color: var(--text); opacity: .9; max-width: 52ch; margin: 0 auto 26px; }

/* support / coffee */
.lp-support-wrap { padding-top: 0; }
.lp-support {
  display: grid; grid-template-columns: 1.5fr .9fr; gap: 32px; align-items: center;
  padding: clamp(26px, 4vw, 44px); border-radius: 22px;
  border: 1px solid color-mix(in srgb, #f59331 28%, var(--border));
  background: linear-gradient(120deg, color-mix(in srgb, #f59331 12%, var(--surface)), var(--surface));
}
.lp-support__tag { display: inline-flex; align-items: center; gap: 7px; font-weight: 700; font-size: 13px; text-transform: uppercase; letter-spacing: .05em; color: #e08326; }
.lp-support__tag svg { width: 16px; height: 16px; }
.lp-support h2 { font-size: clamp(22px, 3vw, 30px); letter-spacing: -.02em; margin: 10px 0 10px; }
.lp-support p { color: var(--muted); max-width: 60ch; }
.lp-support__action { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.lp-support__note { font-size: 12.5px; color: var(--muted); }

/* ===================================================================
   Over / Instellingen
   =================================================================== */
.doc { padding-top: calc(var(--nav-h) + 40px); padding-bottom: 90px; }
.doc h1 { font-size: clamp(30px, 5vw, 46px); letter-spacing: -.03em; }
.doc .sub { color: var(--muted); font-size: 18px; margin-top: 8px; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 26px; margin-top: 18px; }
.card h3 { font-size: 19px; margin-bottom: 10px; letter-spacing: -.01em; }
.card p { color: var(--muted); }
.card p + p { margin-top: 10px; }
.card a { color: var(--brand); }
.callout { border-left: 3px solid var(--brand); background: color-mix(in srgb, var(--brand) 7%, var(--surface)); }
.callout--warn { border-left-color: var(--danger); background: color-mix(in srgb, var(--danger) 8%, var(--surface)); }
.set-row { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--border); }
.set-row:last-child { border-bottom: none; }
.set-row__t { font-weight: 600; }
.set-row__d { font-size: 13.5px; color: var(--muted); }
.seg { display: flex; gap: 4px; background: var(--surface-2); padding: 4px; border-radius: 11px; flex-wrap: wrap; }
.seg button { padding: 8px 16px; border-radius: 8px; font-size: 14px; font-weight: 600; color: var(--muted); }
.seg button.active { background: var(--brand); color: var(--brand-ink); }

/* ===================================================================
   Map
   =================================================================== */
.mapwrap { position: fixed; inset: var(--nav-h) 0 0 0; }
.mapwrap[hidden] { display: none; }
#map { position: absolute; inset: 0; }
.maplibregl-ctrl-attrib { font-size: 10px; }

.mctl {
  position: absolute; z-index: 5; background: var(--glass); backdrop-filter: blur(14px) saturate(150%);
  border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); color: var(--text);
}
.mctl--layers { top: 16px; left: 16px; width: 232px; padding: 12px; }
.mctl__title { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; margin: 2px 2px 9px; }
.lyr-chip { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 9px; border-radius: 10px; font-size: 13.5px; font-weight: 600; color: var(--muted); transition: .14s; }
.lyr-chip:hover { background: var(--surface-2); color: var(--text); }
.lyr-chip[aria-pressed="true"] { color: var(--text); background: var(--surface-2); }
.lyr-chip__sw { width: 11px; height: 11px; border-radius: 50%; flex: none; box-shadow: 0 0 0 1px rgba(0,0,0,.3) inset; }
.lyr-chip__check { margin-left: auto; width: 16px; height: 16px; border-radius: 5px; border: 1.5px solid var(--border-2); display: grid; place-items: center; flex: none; }
.lyr-chip[aria-pressed="true"] .lyr-chip__check { background: var(--brand); border-color: var(--brand); }
.lyr-chip[aria-pressed="true"] .lyr-chip__check::after { content: "✓"; color: #fff; font-size: 11px; font-weight: 800; }

.legend { margin-top: 11px; padding-top: 11px; border-top: 1px solid var(--border); }
.legend__t { font-size: 11px; color: var(--muted); font-weight: 600; margin-bottom: 6px; }
.legend__bar { height: 8px; border-radius: 6px; background: linear-gradient(90deg, var(--c-free), #a3e635, var(--c-slow), #fb923c, var(--c-jam)); }
.legend__ticks { display: flex; justify-content: space-between; font-size: 10px; color: var(--muted); margin-top: 4px; }

.mctl--styles { top: 16px; right: 16px; padding: 6px; display: flex; gap: 4px; }
.stybtn { padding: 8px 13px; border-radius: 9px; font-size: 13px; font-weight: 600; color: var(--muted); }
.stybtn:hover { color: var(--text); }
.stybtn.active { background: var(--brand); color: var(--brand-ink); }

.mctl--coffee { bottom: 30px; left: 16px; display: inline-flex; align-items: center; gap: 7px; padding: 9px 13px; font-size: 13px; font-weight: 600; }
.mctl--coffee svg { width: 16px; height: 16px; color: #f59331; }
.mctl--coffee:hover { background: var(--surface-2); }

#hint {
  position: absolute; bottom: 28px; left: 50%; transform: translateX(-50%); z-index: 5;
  font-size: 12px; color: var(--muted); background: var(--glass); border: 1px solid var(--border);
  padding: 7px 14px; border-radius: 999px; pointer-events: none; transition: opacity .5s; backdrop-filter: blur(8px);
}
#hint.hide { opacity: 0; }

/* ---------- Map controls: desktop corners → mobile bottom sheet ----------
   #mapControls is transparent on desktop (display:contents) so its children
   keep their absolute corner positions; at ≤768px it becomes a bottom sheet. */
#mapControls { display: contents; }
.sheet-grip, .sheet-x, .sheet-only, .map-fab, .sheet-scrim { display: none; }

/* popups */
.maplibregl-popup-content {
  background: var(--surface); color: var(--text); border: 1px solid var(--border);
  border-radius: 12px; padding: 12px 14px; box-shadow: var(--shadow-lg); font-size: 13px;
}
.maplibregl-popup-tip { border-top-color: var(--surface) !important; border-bottom-color: var(--surface) !important; }
.maplibregl-popup-close-button { color: var(--muted); font-size: 16px; padding: 2px 7px; }
.pop-road { font-weight: 800; font-size: 15px; }
.pop-name { color: var(--muted); font-size: 11.5px; margin-bottom: 7px; }
.pop-ratio { font-weight: 700; font-size: 15px; }
.pop-row { color: var(--muted); font-size: 12px; margin-top: 2px; }

.spinner { width: 22px; height: 22px; border: 2.5px solid var(--border-2); border-top-color: var(--brand); border-radius: 50%; animation: spin .7s linear infinite; margin: 26px auto; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ===================================================================
   Animations
   =================================================================== */
@keyframes vkFadeUp { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes vkGlowDrift { from { transform: translate3d(0,0,0) scale(1); } to { transform: translate3d(-2.5%,1.5%,0) scale(1.07); } }
.lp-hero__left > * { animation: vkFadeUp .6s cubic-bezier(.2,.7,.3,1) both; }
.lp-hero__left > *:nth-child(2) { animation-delay: .06s; }
.lp-hero__left > *:nth-child(3) { animation-delay: .12s; }
.lp-hero__left > *:nth-child(4) { animation-delay: .18s; }
.lp-hero__left > *:nth-child(5) { animation-delay: .24s; }
.lp-card { animation: vkFadeUp .7s cubic-bezier(.2,.7,.3,1) .2s both; }
.lp-hero__glow { animation: vkGlowDrift 16s ease-in-out infinite alternate; }
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .6s ease, transform .65s cubic-bezier(.2,.7,.3,1); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .lp-hero__left > *, .lp-card, .lp-hero__glow, .reveal { animation: none !important; transition: none !important; opacity: 1 !important; transform: none !important; }
}

/* ===================================================================
   Responsive
   =================================================================== */
@media (max-width: 860px) {
  .nav__links {
    position: fixed; top: var(--nav-h); left: 0; right: 0; flex-direction: column; gap: 0;
    background: var(--bg-2); border-bottom: 1px solid var(--border); padding: 8px; margin: 0;
    transform: translateY(-130%); transition: .25s; z-index: 49;
  }
  .nav__links.open { transform: translateY(0); }
  .nav__links a { padding: 13px 16px; border-radius: 10px; }
  .nav__burger { display: flex; }
  .lp-hero__grid { grid-template-columns: 1fr; gap: 26px; }
  .lp-card { order: 2; }
  .lp-stats__row { grid-template-columns: repeat(2, 1fr); gap: 16px; }
  .bento { grid-template-columns: 1fr; }
  .bento__cell--lg, .bento__cell--wide { grid-column: auto; grid-row: auto; }
  .lp-support { grid-template-columns: 1fr; gap: 20px; }
}
@media (max-width: 520px) {
  .nav { padding: 0 14px; gap: 10px; }
  .nav__name { font-size: 17px; }
  .livepill { padding: 5px 10px; font-size: 12px; }
  .wrap { padding: 0 16px; }
  .section { padding: 56px 0; }
  .hero__cta { width: 100%; }
  .hero__cta .btn { flex: 1; justify-content: center; }
  /* stacked, full-width settings rows read better on a phone */
  .set2__row { flex-direction: column; align-items: stretch; gap: 11px; }
  .set2__ctrl { width: 100%; }
  .set2__ctrl .seg { width: 100%; }
  .set2__ctrl .seg button { flex: 1; text-align: center; }
  .set2__ctrl > .btn { width: 100%; justify-content: center; }
}

/* ===================================================================
   Mobile map sheet (≤768px) — FAB + draggable bottom sheet
   =================================================================== */
@media (max-width: 768px) {
  .mapwrap { overflow: hidden; }              /* clip the off-screen closed sheet */

  /* the controls wrapper becomes a real bottom sheet */
  #mapControls {
    display: flex; flex-direction: column; gap: 14px;
    position: absolute; left: 0; right: 0; bottom: 0; z-index: 30;
    max-height: min(80dvh, 620px);
    padding: 10px 18px calc(20px + env(safe-area-inset-bottom));
    background: var(--glass);
    -webkit-backdrop-filter: blur(22px) saturate(150%); backdrop-filter: blur(22px) saturate(150%);
    border-top: 1px solid var(--border-2);
    border-radius: 22px 22px 0 0;
    box-shadow: 0 -22px 60px -24px rgba(0, 0, 0, .6);
    overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch;
    transform: translateY(102%);
    transition: transform .38s cubic-bezier(.32, .72, 0, 1);
    will-change: transform;
  }
  .mapwrap.sheet-open #mapControls { transform: translateY(0); }

  /* grab handle (with an enlarged invisible hit area) */
  .sheet-grip {
    display: block; position: relative; flex: none; padding: 0;
    width: 44px; height: 5px; margin: 0 auto; border-radius: 3px; background: var(--border-2);
    touch-action: none;
  }
  .sheet-grip::before { content: ""; position: absolute; left: -60px; right: -60px; top: -14px; bottom: -14px; }

  /* close button, floating top-right of the sheet */
  .sheet-x {
    display: grid; place-items: center; position: absolute; top: 12px; right: 14px; z-index: 2;
    width: 32px; height: 32px; border-radius: 50%; color: var(--muted);
    background: var(--surface-2); border: 1px solid var(--border);
  }
  .sheet-x svg { width: 15px; height: 15px; }

  /* sub-panels flatten into sections of the single sheet surface */
  #mapControls .mctl {
    position: static; inset: auto; width: auto; max-width: none; margin: 0;
    background: transparent; border: none; box-shadow: none;
    -webkit-backdrop-filter: none; backdrop-filter: none; padding: 0; border-radius: 0;
  }
  #mapControls .mctl--styles {
    display: flex; flex-wrap: wrap; gap: 8px;
    border-top: 1px solid var(--border); padding-top: 16px;
  }
  #mapControls .mctl--coffee {
    margin-top: 2px; display: flex; justify-content: center; gap: 9px;
    padding: 13px; border-radius: 12px; background: var(--surface-2);
    font-size: 14.5px; font-weight: 600;
  }
  .sheet-only { display: block; flex-basis: 100%; }

  /* comfier, more tappable layer rows */
  .mctl--layers .mctl__title { font-size: 12px; margin: 2px 2px 6px; }
  .lyr-chip { padding: 12px; font-size: 15px; border-radius: 12px; gap: 12px; }
  .lyr-chip__sw { width: 13px; height: 13px; }
  .lyr-chip__check { width: 22px; height: 22px; border-radius: 7px; }
  .lyr-chip[aria-pressed="true"] .lyr-chip__check::after { font-size: 13px; }
  .legend { margin-top: 14px; padding-top: 14px; }

  /* style buttons fill the row, bigger targets */
  .stybtn { flex: 1; min-width: 86px; padding: 12px 10px; text-align: center; border-radius: 11px; background: var(--surface-2); }
  .stybtn:hover { background: var(--surface-2); }
  .stybtn.active { background: var(--brand); color: var(--brand-ink); }

  /* FAB that opens the sheet */
  .map-fab {
    display: inline-flex; align-items: center; gap: 8px; z-index: 20;
    position: absolute; left: 12px; bottom: calc(14px + env(safe-area-inset-bottom));
    padding: 12px 17px; border-radius: 999px; color: #fff; font-weight: 700; font-size: 14.5px;
    background: var(--brand);
    box-shadow: 0 10px 26px -8px color-mix(in srgb, var(--brand) 75%, transparent), 0 2px 6px rgba(0, 0, 0, .3);
    transition: transform .26s cubic-bezier(.32, .72, 0, 1), opacity .22s;
  }
  .map-fab:active { transform: scale(.96); }
  .map-fab svg { width: 19px; height: 19px; }
  .map-fab__count {
    min-width: 20px; height: 20px; padding: 0 5px; border-radius: 999px; background: rgba(0, 0, 0, .26);
    display: grid; place-items: center; font-size: 12px; font-weight: 800; font-variant-numeric: tabular-nums;
  }
  .map-fab__count[hidden] { display: none; }
  .mapwrap.sheet-open .map-fab { transform: translateY(24px) scale(.85); opacity: 0; pointer-events: none; }

  /* dimming scrim behind the open sheet */
  .sheet-scrim {
    display: block; position: absolute; inset: 0; z-index: 25;
    background: rgba(0, 0, 0, .42); opacity: 0; pointer-events: none; transition: opacity .3s;
  }
  .mapwrap.sheet-open .sheet-scrim { opacity: 1; pointer-events: auto; }

  /* park the tap-hint up top so it never collides with the bottom controls */
  #hint {
    top: 12px; bottom: auto; max-width: calc(100vw - 24px); text-align: center;
    font-size: 11.5px; padding: 7px 13px;
  }
}

/* ===================================================================
   Personal intro · "Hé, ik ben Kaneli"
   =================================================================== */
.lp-intro-wrap { padding-top: 28px; padding-bottom: 28px; }
.lp-intro { display: grid; grid-template-columns: 132px 1fr; gap: 32px; align-items: center; max-width: 880px; }
.lp-intro__avatar {
  width: 132px; height: 132px; border-radius: 28px;
  background: linear-gradient(140deg, var(--brand), color-mix(in srgb, var(--brand) 65%, #b91c1c));
  display: grid; place-items: center; color: #fff; font-weight: 800; font-size: 64px; letter-spacing: -.04em;
  box-shadow: 0 14px 40px color-mix(in srgb, var(--brand) 35%, transparent), inset 0 1px 0 rgba(255,255,255,.18);
  position: relative; overflow: hidden;
}
.lp-intro__avatar::after {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(circle at 30% 22%, rgba(255,255,255,.35), transparent 55%);
  pointer-events: none;
}
.lp-intro__avatar span { position: relative; z-index: 1; transform: translateY(-2px); }
.lp-intro__eye { display: inline-block; font-size: 12.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--brand); margin-bottom: 6px; }
.lp-intro__title { font-size: clamp(24px, 3.3vw, 32px); letter-spacing: -.02em; font-weight: 800; margin: 2px 0 12px; }
.lp-intro__txt p { color: var(--muted); max-width: 60ch; font-size: 16px; line-height: 1.65; }
.lp-intro__link { display: inline-block; margin-top: 14px; font-size: 14px; font-weight: 600; color: var(--brand); text-decoration: none; border-bottom: 1px dashed color-mix(in srgb, var(--brand) 55%, transparent); padding-bottom: 1px; }
.lp-intro__link:hover { border-bottom-style: solid; }

/* ===================================================================
   Behind the scenes — tech stats
   =================================================================== */
.lp-bts-wrap { padding-top: 14px; padding-bottom: 64px; }
.lp-bts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.lp-bts__row { padding: 22px 28px 22px 0; display: grid; grid-template-columns: 180px 1fr; align-items: baseline; gap: 22px; border-bottom: 1px solid var(--border); }
.lp-bts__row:nth-child(odd) { border-right: 1px solid var(--border); padding-right: 28px; padding-left: 0; }
.lp-bts__row:nth-child(even) { padding-left: 28px; }
.lp-bts__row:nth-last-child(-n+2) { border-bottom: 0; }
.lp-bts__k { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 19px; font-weight: 700; color: var(--brand); letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.lp-bts__v { color: var(--muted); font-size: 14.5px; line-height: 1.55; }

/* ===================================================================
   Essay — Over pagina
   =================================================================== */
.essay { max-width: 720px; margin: 0 auto; padding: 0 22px; }
.essay__head { margin-bottom: 28px; }
.essay__eye { display: inline-block; font-size: 12.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: var(--brand); margin-bottom: 8px; }
.essay__h1 { font-size: clamp(32px, 5vw, 46px); line-height: 1.05; letter-spacing: -.03em; font-weight: 800; margin: 0 0 12px; }
.essay__lede { color: var(--text); font-size: 19px; line-height: 1.55; opacity: .9; margin: 0; max-width: 60ch; }
.essay__sec { margin: 36px 0; padding-top: 28px; border-top: 1px solid var(--border); }
.essay__sec:first-of-type { margin-top: 30px; }
.essay__h2 { font-size: 22px; letter-spacing: -.015em; font-weight: 700; margin: 0 0 12px; }
.essay__p { color: var(--text); font-size: 16.5px; line-height: 1.72; margin: 0; max-width: 64ch; opacity: .88; }
.essay__p a { color: var(--brand); text-underline-offset: 3px; }
.essay__p code { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: .9em; background: var(--surface); padding: 1px 6px; border-radius: 5px; border: 1px solid var(--border); }

/* ===================================================================
   Settings — compact panel
   =================================================================== */
.set2-wrap { max-width: 620px; margin: 0 auto; padding: 0 22px; }
.set2-head { margin-bottom: 26px; }
.set2-title { font-size: clamp(30px, 4.5vw, 40px); letter-spacing: -.03em; font-weight: 800; margin: 0; }
.set2-sub { color: var(--muted); font-size: 15.5px; margin-top: 8px; max-width: 52ch; }
.set2-panel { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; overflow: hidden; box-shadow: var(--shadow); }
.set2__group { padding: 6px 0; }
.set2__group + .set2__group { border-top: 1px solid var(--border); }
.set2__group-h { font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); padding: 14px 20px 6px; }
.set2__row { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 12px 20px; }
.set2__row + .set2__row { border-top: 1px solid color-mix(in srgb, var(--border) 55%, transparent); }
.set2__cell { min-width: 0; }
.set2__label { font-size: 14.5px; font-weight: 600; }
.set2__hint { font-size: 12.5px; color: var(--muted); margin-top: 1px; }
.set2__ctrl { flex-shrink: 0; }
.set2-foot { text-align: center; color: var(--muted); font-size: 12.5px; margin-top: 18px; }
.set2-foot a { color: var(--muted); text-decoration: none; border-bottom: 1px dashed currentColor; }
.btn--sm { padding: 7px 14px; font-size: 13px; }

/* ===================================================================
   Map attribution — restrained ⓘ button
   =================================================================== */
.maplibregl-ctrl-attrib.maplibregl-compact { background: var(--glass); backdrop-filter: blur(10px); border: 1px solid var(--border); }
.maplibregl-ctrl-attrib.maplibregl-compact .maplibregl-ctrl-attrib-button { color: var(--text); opacity: .85; }
.maplibregl-ctrl-attrib.maplibregl-compact:not(.maplibregl-compact-show) .maplibregl-ctrl-attrib-inner { display: none; }

/* ===================================================================
   Responsive — new sections
   =================================================================== */
@media (max-width: 860px) {
  .lp-intro { grid-template-columns: 1fr; gap: 20px; }
  .lp-intro__avatar { width: 88px; height: 88px; border-radius: 22px; font-size: 44px; }
  .lp-bts { grid-template-columns: 1fr; }
  .lp-bts__row { grid-template-columns: 1fr; gap: 6px; padding: 18px 0 !important; border-right: 0 !important; }
  .lp-bts__row:nth-last-child(-n+2) { border-bottom: 1px solid var(--border); }
  .lp-bts__row:last-child { border-bottom: 0; }
}
