:root {
  --bg-primary: #0A0E1A;
  --bg-secondary: #111827;
  --bg-card: #1A2235;
  --accent: #EAB308;
  --accent-hover: #CA8A04;
  --text-primary: #F9FAFB;
  --text-secondary: #9CA3AF;
  --text-muted: #6B7280;
  --border: #1F2937;
  --rood: #EF4444;
  --oranje: #F97316;
  --geel: #EAB308;
  --groen: #22C55E;
  --max-width: 1200px;
  --radius: 8px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.mono {
  font-family: 'DM Mono', monospace;
  font-feature-settings: "tnum";
}

h1, h2, h3 { font-weight: 700; line-height: 1.2; letter-spacing: -0.02em; }

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }

/* ─── Header ─── */
.site-header {
  border-bottom: 1px solid var(--border);
  background: var(--bg-primary);
  position: sticky;
  top: 0;
  z-index: 1000;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 80px;
}
.brand { display: inline-flex; align-items: center; }
.brand-lockup { height: 60px; width: auto; display: block; }

/* ─── Hero ─── */
.hero { padding: 96px 0 48px; }
.hero h1 { font-size: clamp(2rem, 5vw, 3.25rem); max-width: 14ch; }
.hero-sub {
  color: var(--text-secondary);
  font-size: 1.125rem;
  max-width: 64ch;
  margin-top: 20px;
}

/* ─── Conclusieblok ─── */
.conclusie-section {
  padding: 0 0 64px;
  border-bottom: 1px solid var(--border);
}
.conclusie-cijfers {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.conclusie-item {
  background: var(--bg-card);
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.conclusie-num {
  font-family: 'DM Mono', monospace;
  font-size: 1.625rem;
  font-weight: 500;
  color: var(--accent);
  line-height: 1.2;
}
.conclusie-lbl {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  line-height: 1.4;
  margin-top: 2px;
}
.conclusie-sub {
  font-size: 0.6875rem;
  color: var(--text-muted);
  font-style: italic;
  margin-top: 2px;
  line-height: 1.4;
}
.conclusie-bron {
  font-size: 0.6875rem;
  color: var(--text-muted);
  margin-top: 6px;
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* ─── Kaart + detailpaneel ─── */
.map-section { padding: 48px 0 56px; }

.kaart-top { margin-bottom: 16px; }

.laag-switcher {
  display: inline-flex;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-secondary);
}
.laag-btn {
  background: transparent;
  border: none;
  border-right: 1px solid var(--border);
  padding: 8px 18px;
  font-family: 'Inter', sans-serif;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  transition: background 0.12s, color 0.12s;
}
.laag-btn:last-child { border-right: none; }
.laag-btn:hover:not(.active) { color: var(--text-secondary); }
.laag-btn.active {
  background: var(--bg-card);
  color: var(--text-primary);
}
.laag-toelichting {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-top: 10px;
  max-width: 70ch;
}

.kaart-layout {
  display: flex;
  gap: 20px;
  align-items: flex-start;
}
.kaart-wrap {
  flex: 1 1 60%;
  min-width: 0;
}
#map {
  width: 100%;
  height: 520px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-secondary);
  z-index: 1;
}
#map.map-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 0.875rem;
  letter-spacing: 0.02em;
}
#map.map-loading::after {
  content: 'Kaart wordt geladen\2026';
}

/* ─── Detailpaneel ─── */
.detail-paneel {
  flex: 0 0 320px;
  width: 320px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  min-height: 520px;
  max-height: 520px;
  overflow-y: auto;
}

.detail-hint {
  font-size: 0.9375rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.detail-section-label {
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.detail-overview { margin-top: 20px; display: flex; flex-direction: column; gap: 14px; }
.detail-ov-item { display: flex; flex-direction: column; gap: 2px; }
.detail-ov-num {
  font-family: 'DM Mono', monospace;
  font-size: 1.25rem;
  font-weight: 500;
  color: var(--accent);
}
.detail-ov-lbl { font-size: 0.8125rem; color: var(--text-secondary); }

.detail-header {
  margin-bottom: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}
.detail-header h3 { font-size: 1.0625rem; margin: 6px 0 8px; }
.detail-status {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8125rem;
  color: var(--text-secondary);
}

.detail-netlagen { margin-bottom: 14px; }
.detail-netlagen-label {
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.net-rij {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 5px 0;
  border-top: 1px solid var(--border);
  font-size: 0.8125rem;
  color: var(--text-secondary);
}
.net-status {
  font-size: 0.6875rem;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 999px;
  white-space: nowrap;
  flex-shrink: 0;
}
.net-status[data-status="rood"]   { color: var(--rood);   background: rgba(239,68,68,0.12); }
.net-status[data-status="oranje"] { color: var(--oranje); background: rgba(249,115,22,0.12); }
.net-status[data-status="geel"]   { color: var(--geel);   background: rgba(234,179,8,0.12); }
.net-status[data-status="groen"]  { color: var(--groen);  background: rgba(34,197,94,0.12); }

.detail-uitleg {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  background: rgba(234,179,8,0.07);
  border-left: 2px solid var(--accent);
  padding: 8px 10px;
  margin-bottom: 14px;
  border-radius: 0 var(--radius) var(--radius) 0;
  line-height: 1.5;
}

.detail-cijfers {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 14px;
}
.detail-cijfer {
  background: var(--bg-secondary);
  border-radius: var(--radius);
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.detail-num {
  font-family: 'DM Mono', monospace;
  font-size: 1.25rem;
  font-weight: 500;
  color: var(--accent);
  display: block;
  line-height: 1.2;
}
.detail-num-sm { font-size: 0.875rem !important; }
.detail-cijfer.alert .detail-num { color: var(--rood); }
.detail-lbl {
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  display: block;
}

.detail-meta {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  margin-bottom: 6px;
}
.detail-meta strong { color: var(--text-primary); font-weight: 500; }

.detail-projecten { margin-top: 14px; }
.detail-projecten-label {
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.detail-projecten ul { list-style: none; }
.detail-projecten li {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  padding: 5px 0;
  border-top: 1px solid var(--border);
  line-height: 1.4;
}

.detail-bron {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

/* ─── Legenda ─── */
.legends {
  display: flex;
  flex-wrap: wrap;
  gap: 40px;
  margin-top: 20px;
}
.legend h3 {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  font-weight: 600;
  margin-bottom: 10px;
}
.legend ul { list-style: none; display: flex; flex-direction: column; gap: 6px; }
.legend li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 0.875rem;
  color: var(--text-secondary);
}
.legend .swatch {
  width: 14px; height: 14px;
  border-radius: 4px;
  flex-shrink: 0;
  margin-top: 3px;
}
.legend .q-tag { flex-shrink: 0; margin-top: 1px; }

.map-note {
  margin-top: 20px;
  font-size: 0.8125rem;
  color: var(--text-muted);
  max-width: 80ch;
}

/* ─── Quality tag ─── */
.q-tag {
  display: inline-block;
  font-size: 0.6875rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-secondary);
  color: var(--text-secondary);
  white-space: nowrap;
}
.q-tag.q-geverifieerd {
  background: rgba(34, 197, 94, 0.12);
  border-color: var(--groen);
  color: var(--groen);
}

/* ─── Tijdlijn ─── */
.tijdlijn-section { padding: 64px 0; border-top: 1px solid var(--border); }
.tijdlijn-section h2 { font-size: clamp(1.5rem, 3vw, 2rem); }

.tijdlijn {
  margin-top: 32px;
  position: relative;
  padding-left: 28px;
}
.tijdlijn::before {
  content: '';
  position: absolute;
  left: 4px;
  top: 6px;
  bottom: 0;
  width: 2px;
  background: var(--border);
}
.tijdlijn-item {
  position: relative;
  padding-bottom: 28px;
}
.tijdlijn-item:last-child { padding-bottom: 0; }
.tijdlijn-item::before {
  content: '';
  position: absolute;
  left: -29px;
  top: 5px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 2px solid;
}
.tijdlijn-item.verbetering::before   { background: var(--groen); border-color: var(--groen); }
.tijdlijn-item.verslechtering::before { background: var(--rood);  border-color: var(--rood); }
.tijdlijn-datum {
  font-family: 'DM Mono', monospace;
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-bottom: 3px;
}
.tijdlijn-tekst {
  font-size: 0.9375rem;
  color: var(--text-primary);
  max-width: 68ch;
  line-height: 1.55;
}
.tijdlijn-bron {
  margin-top: 4px;
  font-size: 0.75rem;
  color: var(--text-muted);
}
.tijdlijn-bron a { color: var(--text-muted); text-decoration: underline; text-underline-offset: 2px; }
.tijdlijn-bron a:hover { color: var(--accent); }
.tijdlijn-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 6px 14px;
  font-family: 'Inter', sans-serif;
  font-size: 0.8125rem;
  color: var(--text-muted);
  cursor: pointer;
  transition: border-color 0.12s, color 0.12s;
}
.tijdlijn-toggle:hover { border-color: var(--accent); color: var(--accent); }

/* ─── Intelligence ─── */
.intel-section { padding: 64px 0; border-top: 1px solid var(--border); }
.intel-section h2 { font-size: clamp(1.5rem, 3vw, 2rem); }
.section-intro {
  color: var(--text-secondary);
  max-width: 70ch;
  margin-top: 12px;
}
.intel-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-top: 32px;
}
.intel-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  transition: border-color 0.15s, transform 0.15s;
}
.intel-card:hover { border-color: #2C3950; transform: translateY(-2px); }
.intel-card .card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}
.intel-card h3 { font-size: 1.0625rem; }
.intel-card .figures {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-bottom: 16px;
}
.figure .num {
  font-family: 'DM Mono', monospace;
  font-size: 1.5rem;
  font-weight: 500;
  display: block;
}
.figure .num.sm { font-size: 1.0625rem; }
.figure .lbl {
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}
.figure.tekort .num { color: var(--rood); }
.figure.qual .num { color: var(--text-primary); }
.figure .num.vol { color: var(--accent); }
.intel-card .detail { font-size: 0.875rem; color: var(--text-secondary); margin-bottom: 8px; }
.intel-card .src { font-size: 0.75rem; color: var(--text-muted); margin-top: 12px; }
.intel-card h3 .status-dot { margin-right: 7px; }

/* ─── Prioriteringskader ─── */
.prioriteit-section { padding: 64px 0; border-top: 1px solid var(--border); }
.prioriteit-section h2 { font-size: clamp(1.5rem, 3vw, 2rem); }
.prioriteit-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 32px;
  max-width: 720px;
  margin-top: 24px;
}
.prioriteit-intro {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  margin-bottom: 20px;
}
.prioriteit-rij {
  padding: 12px 0;
  border-top: 1px solid var(--border);
  font-size: 0.9375rem;
}
.prioriteit-rij strong {
  display: block;
  color: var(--text-primary);
  font-weight: 600;
  font-size: 0.875rem;
  margin-bottom: 4px;
}
.prioriteit-rij p { color: var(--text-secondary); }
.prioriteit-bron {
  margin-top: 16px;
  font-size: 0.75rem;
  color: var(--text-muted);
  padding-top: 12px;
  border-top: 1px solid var(--border);
}
.prioriteit-bron a { color: var(--text-muted); text-decoration: underline; text-underline-offset: 2px; }

/* ─── Status dot ─── */
.status-dot {
  display: inline-block;
  width: 8px; height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* ─── Intel card: kwalitatieve status (geen MW-cijfers) ─── */
.card-status-rows { margin-bottom: 16px; }
.card-status-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  padding: 5px 0;
  border-top: 1px solid var(--border);
  font-size: 0.875rem;
}
.card-status-row .csr-lbl { color: var(--text-muted); flex-shrink: 0; }
.card-status-row .csr-val { color: var(--text-primary); font-weight: 500; text-align: right; }

/* ─── Signals ─── */
.signals-section { padding: 64px 0; border-top: 1px solid var(--border); }
.signals-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
.signal-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  display: flex;
  flex-direction: column;
  transition: border-color 0.15s;
}
.signal-card:hover { border-color: #2C3950; }
.signal-label {
  font-family: 'DM Mono', monospace;
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.signal-card h2 { font-size: 1.375rem; margin: 12px 0 12px; }
.signal-card p { color: var(--text-secondary); }
.price {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-top: 24px;
}
.price-num {
  font-family: 'DM Mono', monospace;
  font-size: 2.125rem;
  font-weight: 500;
  color: var(--text-primary);
  line-height: 1;
}
.price-unit { font-size: 0.9375rem; color: var(--text-secondary); }
.price-sub { font-size: 0.875rem; color: var(--text-muted); margin-top: 8px; }
.price-value {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-top: 6px;
  font-style: italic;
  max-width: 44ch;
}
.alerts-sub { font-size: 0.875rem; color: var(--text-muted); margin-top: 8px; }
.signal-card .btn { margin-top: 28px; align-self: flex-start; }

/* ─── Founding what-you-get ─── */
.founding-detail {
  margin-top: 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 28px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px 56px;
}
.founding-groep {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.founding-groep-label {
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-muted);
  margin-bottom: 8px;
}
.founding-groep-label--straks {
  color: var(--text-muted);
  opacity: 0.8;
}
.founding-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.founding-list li {
  font-size: 0.875rem;
  color: var(--text-secondary);
  padding-left: 14px;
  position: relative;
  line-height: 1.45;
}
.founding-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 8px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
}
.founding-list--straks li::before {
  background: var(--border);
  border: 1px solid var(--text-muted);
}

/* ─── Buttons ─── */
.btn {
  display: inline-block;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 0.9375rem;
  padding: 12px 22px;
  border-radius: var(--radius);
  border: 2px solid transparent;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.btn-primary { background: var(--accent); color: #0A0E1A; }
.btn-primary:hover { background: var(--accent-hover); color: #0A0E1A; }
.btn-secondary {
  background: transparent;
  border-color: #475569;
  color: var(--text-primary);
}
.btn-secondary:hover { border-color: var(--accent); color: var(--accent); }

/* ─── Form ─── */
.form-section { padding: 64px 0 80px; border-top: 1px solid var(--border); }
.form-container { max-width: 640px; }
.form-section h2 { font-size: clamp(1.5rem, 3vw, 2rem); margin-bottom: 16px; }
.form-intro {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  border-left: 2px solid var(--accent);
  padding-left: 12px;
  margin-bottom: 24px;
}
.form-intro[hidden] { display: none; }
.field { margin-bottom: 20px; display: flex; flex-direction: column; }
.field label, .field legend {
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 8px;
  color: var(--text-secondary);
}
.field input, .field select {
  font-family: 'Inter', sans-serif;
  font-size: 1rem;
  padding: 12px 14px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-primary);
}
.field input:focus, .field select:focus {
  outline: none;
  border-color: var(--accent);
}
.field-radio { border: none; }
.field-radio legend { margin-bottom: 12px; }
.radio {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9375rem;
  color: var(--text-primary);
  margin-bottom: 8px;
  font-weight: 400;
  cursor: pointer;
}
.radio input { width: auto; accent-color: var(--accent); }
#submit-btn { margin-top: 8px; }
.form-note { font-size: 0.8125rem; color: var(--text-muted); margin-top: 14px; }
.form-status { margin-top: 16px; font-size: 0.9375rem; min-height: 1.2em; }
.form-status.ok { color: var(--groen); }
.form-status.info { color: var(--accent); }
.form-status.error { color: var(--rood); }

/* ─── Footer ─── */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 40px 0;
  background: var(--bg-secondary);
}
.footer-lead { max-width: 70ch; color: var(--text-secondary); }
.site-footer p { margin-bottom: 12px; }
.footer-fine { font-size: 0.8125rem; color: var(--text-muted); }

/* ─── Leaflet popup (fallback, niet meer primair) ─── */
.leaflet-popup-content-wrapper {
  background: var(--bg-card);
  color: var(--text-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.leaflet-popup-tip { background: var(--bg-card); }
.leaflet-popup-content { margin: 14px 16px; font-family: 'Inter', sans-serif; }
.leaflet-container a.leaflet-popup-close-button { color: var(--text-muted); }

/* ─── Responsive ─── */
@media (max-width: 900px) {
  .kaart-layout { flex-direction: column; }
  .detail-paneel {
    flex: 1 1 auto;
    width: 100%;
    min-height: auto;
    max-height: none;
  }
}

@media (max-width: 760px) {
  .header-inner { height: auto; padding: 12px 0; flex-direction: column; align-items: flex-start; gap: 4px; }
  .site-header { position: static; }
  .hero { padding: 48px 0 32px; }
  #map { height: 380px; }
  .signals-grid { grid-template-columns: 1fr; }
  .founding-detail { grid-template-columns: 1fr; }
  .founding-groep + .founding-groep {
    border-top: 1px solid var(--border);
    padding-top: 20px;
  }
  .legends { gap: 28px; }
  .conclusie-section { padding-bottom: 40px; }
  .laag-switcher { width: 100%; }
  .laag-btn { flex: 1; text-align: center; font-size: 0.8125rem; padding: 8px 10px; }
  .tijdlijn-section, .intel-section, .prioriteit-section, .signals-section, .form-section { padding-top: 48px; padding-bottom: 48px; }
}
