/* Coolen BrandRadar. Huisstijl Coolen Expertise (2026): donkerblauw, petrol, goud en beige, lettertype Public Sans.
   Kleuren en lettertype komen uit de huisstijlbestanden van Merkrijk. */
@font-face {
  font-family: 'Public Sans';
  src: url('/fonts/public-sans-latin.woff2') format('woff2');
  font-weight: 100 900;
  font-display: swap;
}
:root {
  /* de vier huisstijlkleuren */
  --donkerblauw: #0f383d;
  --petrol: #669398;
  --goud: #d6af67;
  --beige: #f7f4f0;
  /* afgeleide tinten */
  --petrol-900: var(--donkerblauw);
  --petrol-700: #1f5158;   /* tekst en knoppen op licht */
  --petrol-500: #3f7077;
  --petrol-200: #c2d4d6;
  --petrol-100: #dce7e8;
  --petrol-50: #edf2f2;
  --gold-600: #8a6c2a;     /* goud als tekst op licht */
  --gold-500: var(--goud);
  --gold-300: #e6cd9d;
  --gold-100: #f5ead6;
  --paper: var(--beige);
  --card: #ffffff;
  --ink: var(--donkerblauw);
  --muted: #5a7175;
  --line: #e6e0d7;
  --radius: 14px;
  --pad: 16px;
  --font: 'Public Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 400 calc(16px * var(--fs, 1))/1.45 var(--font);
  -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent;
}
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
a { color: var(--petrol-700); }
h1, h2, h3, p { margin: 0; }
:focus-visible { outline: 3px solid var(--gold-500); outline-offset: 2px; border-radius: 6px; }
[hidden] { display: none !important; }

/* ---------- kop */
.top {
  position: sticky; top: 0; z-index: 20; background: var(--petrol-900); color: #fff;
  padding: calc(var(--safe-top) + 10px) var(--pad) 12px;
}
.top-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.logo { height: 31px; width: auto; flex: none; display: block; }
.top h1 { font-size: calc(21px * min(var(--fs, 1), 1.1)); line-height: 1; font-weight: 600; letter-spacing: -0.01em; color: var(--goud); padding-left: 12px; border-left: 1.5px solid rgba(255, 255, 255, 0.28); align-self: stretch; display: flex; align-items: center; }
.refresh {
  display: flex; align-items: center; gap: 8px; color: var(--petrol-100); font-size: calc(13px * min(var(--fs, 1), 1.1)); font-weight: 500; white-space: nowrap;
  padding: 8px 10px; margin-right: -10px; border-radius: 10px; min-height: 44px; font-variant-numeric: tabular-nums;
}
.refresh svg { width: 20px; height: 20px; }
.refresh.busy svg { animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.controls { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px 12px; margin-top: 12px; }
.controls .right { display: inline-flex; align-items: center; gap: 8px; margin-left: auto; }
.seg { display: inline-flex; background: rgba(255, 255, 255, 0.1); border-radius: 10px; padding: 3px; }
.seg button { padding: 7px 18px; border-radius: 8px; font-size: calc(14.5px * var(--fs, 1)); font-weight: 600; color: var(--petrol-100); min-height: 36px; }
.seg button[aria-selected='true'] { background: #fff; color: var(--petrol-900); }
.filter-btn {
  display: inline-flex; align-items: center; gap: 7px; font-size: calc(14.5px * var(--fs, 1)); font-weight: 600; color: #fff;
  padding: 7px 12px; border-radius: 10px; border: 1.5px solid rgba(255, 255, 255, 0.28); min-height: 42px;
}
.filter-btn svg { width: 18px; height: 18px; }
.badge { background: var(--gold-500); color: var(--petrol-900); border-radius: 99px; font-size: calc(12px * var(--fs, 1)); font-weight: 700; min-width: 20px; height: 20px; display: inline-grid; place-items: center; padding: 0 6px; }

/* ---------- inhoud */
main { max-width: 760px; margin: 0 auto; padding: 0 var(--pad) calc(var(--safe-bottom) + 28px); }
.summary { font-size: calc(14px * var(--fs, 1)); color: var(--muted); padding: 14px 0 2px; }
.day {
  position: sticky; top: var(--top-h, 118px); z-index: 5; background: var(--paper);
  font-size: calc(15px * var(--fs, 1)); font-weight: 700; color: var(--petrol-700);
  padding: 14px 0 8px; display: flex; justify-content: space-between; align-items: baseline;
}
.day small { font-weight: 500; font-size: calc(13px * var(--fs, 1)); color: var(--muted); }

.fire { display: block; width: 100%; text-align: left; background: var(--card); border-radius: var(--radius); overflow: hidden; margin-bottom: 12px; border: 1px solid var(--line); }
.fire:active { background: var(--petrol-50); }
.place { font-weight: 800; letter-spacing: -0.022em; line-height: 1.06; color: var(--ink); overflow-wrap: anywhere; }
.meta { font-size: calc(13.5px * var(--fs, 1)); color: var(--muted); font-weight: 500; }
.when { font-variant-numeric: tabular-nums; font-weight: 600; color: var(--petrol-700); font-size: calc(13.5px * var(--fs, 1)); white-space: nowrap; }
.new-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--gold-500); margin-right: 6px; vertical-align: 1px; }
.story { font-size: calc(15px * var(--fs, 1)); line-height: 1.45; color: #25474c; }
.srcs { font-size: calc(13px * var(--fs, 1)); color: var(--muted); }
.srcs b { color: var(--petrol-700); font-weight: 650; }
.tag { display: inline-block; font-size: calc(12.5px * var(--fs, 1)); font-weight: 700; padding: 3px 9px; border-radius: 99px; line-height: 1.3; }
.tag.big { background: var(--goud); color: var(--donkerblauw); }
.tag.small { background: var(--petrol-100); color: var(--petrol-700); }
.prov { font-size: calc(12px * var(--fs, 1)); font-weight: 650; color: var(--petrol-700); border: 1.5px solid var(--petrol-200); border-radius: 6px; padding: 1px 6px; white-space: nowrap; }

/* grote brand: foto over de volle breedte */
.fire.lead .photo { aspect-ratio: 16 / 9; }
.fire.lead .body { padding: 13px 15px 14px; display: grid; gap: 7px; }
.fire.lead .place { font-size: calc(29px * var(--fs, 1)); }
.fire.lead .line1 { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.fire.lead .line2 { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.fire.lead .story { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
/* gewone brand: compacte regel met kleine foto */
.fire.row { display: grid; grid-template-columns: 104px 1fr; }
.fire.row .photo { height: 100%; min-height: 104px; }
.fire.row .body { padding: 10px 13px 11px; display: grid; gap: 4px; align-content: start; min-width: 0; }
.fire.row .place { font-size: calc(20px * var(--fs, 1)); }
.fire.row .line1 { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.fire.row .story { font-size: calc(14px * var(--fs, 1)); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.fire.row.nophoto { grid-template-columns: 1fr; }
.fire.minor { opacity: 0.86; }

.photo { position: relative; background: var(--petrol-50); overflow: hidden; }
.photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.photo.empty { display: grid; place-items: center; background: linear-gradient(122deg, var(--petrol-50) 0 62%, var(--goud) 62% 100%); }
.photo.empty svg { width: 30px; height: 30px; opacity: 0.55; }
.photo .tag { position: absolute; left: 10px; bottom: 10px; box-shadow: 0 1px 0 rgba(15, 56, 61, 0.25); }

.empty-state { background: var(--card); border: 1px dashed var(--petrol-200); border-radius: var(--radius); padding: 22px 18px; margin-top: 14px; font-size: calc(15px * var(--fs, 1)); color: var(--muted); }
.empty-state b { display: block; color: var(--ink); font-size: calc(17px * var(--fs, 1)); margin-bottom: 4px; }

/* ---------- kaart */
.map-wrap { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px; margin-top: 12px; }
#map { width: 100%; height: auto; display: block; max-height: 62vh; }
#map .prov-shape { fill: var(--petrol-100); stroke: #fff; stroke-width: 3; cursor: pointer; }
#map .prov-shape.on { fill: var(--petrol-200); }
#map .prov-shape.dim { fill: var(--petrol-50); }
#map .dot { cursor: pointer; }
#map .dot.l3 { fill: var(--goud); stroke: var(--donkerblauw); stroke-width: 3; }
#map .dot.l2 { fill: var(--donkerblauw); stroke: #fff; stroke-width: 3; }
#map .dot.l1 { fill: var(--petrol-200); stroke: var(--petrol-700); stroke-width: 2; }
#map .count { font: 700 30px var(--font); fill: var(--petrol-500); text-anchor: middle; pointer-events: none; opacity: 0.55; }
.map-hint { font-size: calc(13px * var(--fs, 1)); color: var(--muted); padding: 8px 2px 4px; }
.legend { display: flex; gap: 14px; font-size: calc(13px * var(--fs, 1)); color: var(--muted); padding: 6px 2px 0; align-items: center; flex-wrap: wrap; }
.legend i { display: inline-block; width: 12px; height: 12px; border-radius: 50%; margin-right: 6px; vertical-align: -1px; }
.legend .l3 { background: var(--gold-500); box-shadow: 0 0 0 2px var(--petrol-900); }
.legend .l2 { background: var(--donkerblauw); }

/* ---------- uitschuifblad */
.scrim { position: fixed; inset: 0; background: rgba(15, 56, 61, 0.55); z-index: 40; }
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; background: var(--paper);
  border-radius: 18px 18px 0 0; max-height: 92dvh; display: flex; flex-direction: column;
  box-shadow: 0 -8px 30px rgba(15, 56, 61, 0.25); animation: rise 0.22s ease-out;
}
@keyframes rise { from { transform: translateY(24px); opacity: 0.6; } to { transform: none; opacity: 1; } }
.sheet-bar { display: flex; align-items: center; justify-content: flex-end; padding: 8px 8px 0 var(--pad); min-height: 48px; flex: none; }
.sheet-bar h2 { flex: 1; font-size: calc(20px * var(--fs, 1)); font-weight: 760; }
.close { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; color: var(--petrol-700); }
.close svg { width: 22px; height: 22px; }
.sheet-body { overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 0 var(--pad) calc(var(--safe-bottom) + 20px); }

.gallery { display: flex; gap: 8px; overflow-x: auto; scroll-snap-type: x mandatory; border-radius: var(--radius); margin: 0 0 4px; scrollbar-width: none; }
.gallery::-webkit-scrollbar { display: none; }
.gallery figure { flex: 0 0 100%; margin: 0; scroll-snap-align: center; position: relative; }
.gallery.multi figure { flex-basis: 90%; }
.gallery .photo { aspect-ratio: 3 / 2; border-radius: var(--radius); }
.gallery figcaption { font-size: calc(12px * var(--fs, 1)); color: var(--muted); padding: 5px 2px 0; }
.d-head { padding: 12px 0 4px; display: grid; gap: 6px; }
.d-head .place { font-size: calc(33px * var(--fs, 1)); }
.d-tags { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.d-story { font-size: calc(16px * var(--fs, 1)); line-height: 1.5; padding: 10px 0 2px; color: #1d4046; }
.d-credit { font-size: calc(12.5px * var(--fs, 1)); color: var(--muted); padding-bottom: 6px; }
.d-actions { display: flex; gap: 10px; padding: 10px 0 6px; flex-wrap: wrap; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; background: var(--donkerblauw); color: #fff; font-weight: 650; font-size: calc(15px * var(--fs, 1)); padding: 11px 16px; border-radius: 11px; text-decoration: none; min-height: 46px; }
.btn.ghost { background: transparent; color: var(--petrol-700); border: 1.5px solid var(--petrol-200); }
.btn svg { width: 18px; height: 18px; }
.d-sub { font-size: calc(15px * var(--fs, 1)); font-weight: 700; color: var(--petrol-700); padding: 16px 0 6px; }
.arts { list-style: none; margin: 0; padding: 0; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.arts li + li { border-top: 1px solid var(--line); }
.arts a { display: grid; gap: 3px; padding: 12px 40px 12px 14px; text-decoration: none; color: inherit; position: relative; }
.arts a::after { content: ''; position: absolute; right: 16px; top: 50%; width: 8px; height: 8px; border-right: 2px solid var(--petrol-500); border-top: 2px solid var(--petrol-500); transform: translateY(-50%) rotate(45deg); }
.arts .a-src { font-size: calc(13px * var(--fs, 1)); font-weight: 700; color: var(--petrol-700); display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.arts .a-src time { font-weight: 500; color: var(--muted); font-variant-numeric: tabular-nums; }
.arts .a-title { font-size: calc(15px * var(--fs, 1)); line-height: 1.35; }
.arts .a-note { font-size: calc(11.5px * var(--fs, 1)); font-weight: 650; color: var(--gold-600); border: 1px solid var(--gold-300); border-radius: 5px; padding: 0 5px; }

fieldset { border: 0; padding: 0; margin: 0 0 18px; }
legend { font-size: calc(14px * var(--fs, 1)); font-weight: 700; color: var(--petrol-700); padding: 0 0 8px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { font-size: calc(14.5px * var(--fs, 1)); font-weight: 600; padding: 8px 13px; border-radius: 99px; background: var(--card); border: 1.5px solid var(--line); color: var(--ink); min-height: 40px; }
.chip[aria-pressed='true'] { background: var(--donkerblauw); border-color: var(--donkerblauw); color: #fff; }
.sheet-actions { display: flex; gap: 10px; justify-content: space-between; padding-top: 4px; position: sticky; bottom: 0; background: var(--paper); padding-bottom: 6px; }
.sheet-actions .btn { flex: 1; }

.foot { margin-top: 30px; padding-top: 18px; border-top: 1px solid var(--line); font-size: calc(12.5px * var(--fs, 1)); color: var(--muted); display: grid; gap: 6px; }
.foot img { height: 40px; width: auto; margin-bottom: 6px; }

/* ---------- breder scherm */
@media (min-width: 900px) {
  main { max-width: 1040px; }
  #view-list .group { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; align-items: start; }
  #view-list .group .day { grid-column: 1 / -1; }
  .sheet { left: auto; top: 0; bottom: 0; width: 520px; max-height: none; border-radius: 0; animation: slide 0.2s ease-out; }
  @keyframes slide { from { transform: translateX(30px); opacity: 0.6; } to { transform: none; opacity: 1; } }
  #view-map { display: grid; grid-template-columns: minmax(0, 460px) 1fr; grid-template-rows: auto auto auto 1fr; gap: 0 18px; align-items: start; }
  #view-map[hidden] { display: none; }
  .map-wrap, .map-hint, .legend { grid-column: 1; }
  .map-wrap { position: sticky; top: calc(var(--top-h, 118px) + 12px); }
  #map-list { grid-column: 2; grid-row: 1 / span 4; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* ---------- tekstgrootte */
.size-btn { display: inline-flex; align-items: baseline; justify-content: center; gap: 1px; color: #fff; font-weight: 700; line-height: 1; padding: 0 11px; border-radius: 10px; border: 1.5px solid rgba(255, 255, 255, 0.28); min-height: 42px; min-width: 46px; align-self: stretch; align-items: center; }
.size-btn .a1 { font-size: 12.5px; }
.size-btn .a2 { font-size: 19px; }
.toast { position: fixed; left: 50%; bottom: calc(var(--safe-bottom, 0px) + 28px); transform: translateX(-50%); z-index: 60; background: var(--donkerblauw); color: #fff; font-size: 15px; font-weight: 600; padding: 11px 18px; border-radius: 99px; box-shadow: 0 8px 24px rgba(15, 56, 61, 0.3); white-space: nowrap; }

/* ---------- adresgegevens (BAG) */
.bag { padding-top: 4px; }
.bag-line, .bag-list li { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 2px 12px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: calc(14.5px * var(--fs, 1)); }
.bag-line span, .bag-list li span { color: var(--muted); }
.bag-line b, .bag-list li b { font-weight: 650; color: var(--ink); }
.bag-list { list-style: none; margin: 0; padding: 0; }
.bag-note { font-size: calc(13px * var(--fs, 1)); color: var(--muted); padding: 0 0 4px; }
