/* ============================================================
   GPX Tools — gedeelde stijl
   Gebruikt door homepage en alle tool-pagina's
   ============================================================ */

:root {
  --bg: #F8F5F0;
  --surface: #FFFFFF;
  --surface-2: #F0EBE2;
  --border: #E0D8C9;
  --text: #1A1816;
  --text-dim: #6B6760;
  --accent: #B91D2A;
  --accent-soft: rgba(185, 29, 42, 0.08);
  --success: #15803D;
  --warning: #B45309;
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.06);
  --shadow-md: 0 8px 28px rgba(0,0,0,0.07);
  --shadow-lg: 0 12px 40px rgba(0,0,0,0.08);
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  font-family: 'Manrope', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
}

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

/* ---------- Site header (gedeeld) ---------- */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 28px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}
.site-logo {
  font-family: 'Fraunces', serif;
  font-size: 21px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text);
  text-decoration: none;
  display: flex;
  align-items: baseline;
  gap: 2px;
}
.site-logo:hover { text-decoration: none; }
.site-logo .accent { color: var(--accent); }
.site-nav {
  display: flex;
  gap: 20px;
  align-items: center;
  font-size: 14px;
}
.site-nav a {
  color: var(--text-dim);
  font-weight: 500;
}
.site-nav a:hover { color: var(--text); text-decoration: none; }
.back-link {
  font-size: 14px;
  color: var(--text-dim);
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.back-link:hover { color: var(--text); text-decoration: none; }

/* ---------- Site footer (gedeeld) ---------- */
.site-footer {
  padding: 12px 28px;
  border-top: 1px solid var(--border);
  background: var(--surface);
  font-size: 12px;
  color: var(--text-dim);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}
.site-footer .mono { font-family: 'JetBrains Mono', monospace; }

/* ---------- Buttons ---------- */
.btn-primary {
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 14px 18px;
  border-radius: 6px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.05s;
}
.btn-primary:hover:not(:disabled) { opacity: 0.9; text-decoration: none; }
.btn-primary:active:not(:disabled) { transform: translateY(1px); }
.btn-primary:disabled {
  background: var(--surface-2);
  color: var(--text-dim);
  cursor: not-allowed;
}

/* ---------- Status meldingen ---------- */
.status {
  padding: 12px 14px;
  border-radius: 6px;
  font-size: 13px;
  display: flex;
  gap: 10px;
  align-items: flex-start;
  line-height: 1.4;
}
.status.ok    { background: rgba(21,128,61,0.08); color: var(--success); border: 1px solid rgba(21,128,61,0.22); }
.status.err   { background: rgba(185,29,42,0.08); color: var(--accent);  border: 1px solid rgba(185,29,42,0.22); }
.status.warn  { background: rgba(180,83,9,0.08);  color: var(--warning); border: 1px solid rgba(180,83,9,0.22); }
.status-icon  { font-family: 'JetBrains Mono', monospace; flex-shrink: 0; font-weight: 700; }

/* ---------- Info tiles ---------- */
.info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.info-tile {
  background: var(--surface-2);
  padding: 12px 14px;
  border-radius: 6px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.info-tile-label {
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-dim);
}
.info-tile-value {
  font-family: 'JetBrains Mono', monospace;
  font-size: 16px;
  font-weight: 500;
  color: var(--text);
}

/* ---------- File upload ---------- */
.file-input-wrap {
  position: relative;
  border: 2px dashed var(--border);
  border-radius: 10px;
  padding: 36px 20px 28px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.file-input-wrap:hover,
.file-input-wrap.dragover {
  border-color: var(--accent);
  background: var(--accent-soft);
}
.file-input-wrap input[type="file"] {
  position: absolute; inset: 0; opacity: 0; cursor: pointer;
}
.file-input-wrap .upload-icon {
  color: var(--text-dim);
  transition: color 0.2s, transform 0.2s;
}
.file-input-wrap:hover .upload-icon,
.file-input-wrap.dragover .upload-icon {
  color: var(--accent);
  transform: translateY(-2px);
}
.file-label { font-size: 15px; color: var(--text); font-weight: 500; }
.file-hint { font-size: 12px; color: var(--text-dim); }
.file-name {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: var(--accent);
  margin-top: 4px;
  word-break: break-all;
}

/* ---------- Slider ---------- */
.slider-row { display: flex; flex-direction: column; gap: 10px; }
.slider-label-row { display: flex; justify-content: space-between; align-items: baseline; font-size: 13px; color: var(--text); }
.slider-value { font-family: 'JetBrains Mono', monospace; font-weight: 500; color: var(--accent); font-size: 15px; }
input[type=range] {
  -webkit-appearance: none; appearance: none;
  width: 100%; height: 6px; border-radius: 3px;
  background: var(--surface-2); outline: none; cursor: pointer;
}
input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--accent); cursor: pointer; border: 2px solid #fff; box-shadow: var(--shadow-sm);
}
input[type=range]::-moz-range-thumb {
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--accent); cursor: pointer; border: 2px solid #fff;
}

/* ---------- Preset chips ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  font-size: 12px; padding: 6px 12px; border-radius: 100px;
  border: 1px solid var(--border); background: var(--surface);
  color: var(--text-dim); cursor: pointer; font-family: inherit;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.chip:hover { border-color: var(--accent); color: var(--accent); }
.chip.active { background: var(--accent); color: #fff; border-color: var(--accent); }

/* ---------- Secundaire knop + knoppenrij ---------- */
.btn-secondary {
  background: var(--surface); color: var(--text); border: 1px solid var(--border);
  padding: 13px 16px; border-radius: 6px; font-family: inherit; font-size: 13px;
  font-weight: 700; cursor: pointer; transition: border-color 0.15s, color 0.15s;
}
.btn-secondary:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); }
.btn-secondary:disabled { color: var(--text-dim); cursor: not-allowed; opacity: 0.6; }
.btn-row { display: flex; gap: 10px; }
.btn-row > * { flex: 1; }

/* ---------- Bestandslijst (samenvoegen) ---------- */
.file-list { display: flex; flex-direction: column; gap: 8px; }
.file-item {
  display: flex; align-items: center; gap: 9px;
  padding: 10px 12px; background: var(--surface-2); border-radius: 8px; font-size: 13px;
}
.file-item-num {
  font-family: 'JetBrains Mono', monospace; font-size: 11px; font-weight: 700;
  color: #fff; width: 20px; height: 20px; border-radius: 5px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
}
.file-item-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text); }
.file-item-dist { font-family: 'JetBrains Mono', monospace; font-size: 11px; color: var(--text-dim); flex-shrink: 0; }
.file-item-btns { display: flex; gap: 1px; flex-shrink: 0; }
.file-item-btn {
  width: 26px; height: 26px; border: none; background: transparent; cursor: pointer;
  color: var(--text-dim); border-radius: 4px; display: flex; align-items: center; justify-content: center;
  transition: background 0.12s, color 0.12s;
}
.file-item-btn:hover:not(:disabled) { background: var(--surface); color: var(--text); }
.file-item-btn:disabled { opacity: 0.25; cursor: not-allowed; }

/* ---------- Activiteiten samenvoegen ---------- */
.act-list { display: flex; flex-direction: column; gap: 0; }
.act-item {
  display: flex; align-items: center; gap: 10px; background: var(--surface-2);
  border: 1px solid var(--border); border-radius: 8px; padding: 9px 11px;
}
.act-dot { width: 12px; height: 12px; border-radius: 50%; flex-shrink: 0; }
.act-main { flex: 1; min-width: 0; }
.act-name { font-size: 13px; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.act-meta { font-size: 11.5px; color: var(--text-dim); font-family: 'JetBrains Mono', monospace; margin-top: 2px; }
.act-badge {
  display: inline-block; font-family: 'Manrope', sans-serif; font-size: 10px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.04em; color: var(--accent);
  background: var(--accent-soft); border-radius: 4px; padding: 1px 5px; margin-left: 6px;
}
.act-remove {
  flex-shrink: 0; width: 22px; height: 22px; border-radius: 50%; border: none; cursor: pointer;
  background: transparent; color: var(--text-dim); display: flex; align-items: center; justify-content: center;
}
.act-remove:hover { background: var(--accent); color: #fff; }
.act-gap {
  font-size: 11.5px; color: var(--text-dim); padding: 5px 0 5px 17px; margin-left: 5px;
  border-left: 2px dashed var(--border); font-style: italic;
}
.act-gap.warn { color: var(--accent); font-weight: 600; font-style: normal; border-left-color: var(--accent); }
.strava-steps { font-size: 12.5px; color: var(--text-dim); line-height: 1.55; }
.strava-steps ol { margin: 6px 0 0; padding-left: 18px; }
.strava-steps li { margin-bottom: 4px; }
.strava-steps p { margin: 8px 0 0; font-style: italic; }

/* ---------- Route hergebruiken (sessie) ---------- */
.route-resume-wrap { margin-bottom: 18px; }
.route-resume {
  background: var(--accent-soft); border: 1px solid var(--border); border-left: 3px solid var(--accent);
  border-radius: 10px; padding: 12px 14px;
}
.route-resume .rr-head {
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--accent);
  font-weight: 700; margin-bottom: 4px;
}
.route-resume .rr-name { font-size: 13.5px; font-weight: 600; color: var(--text); word-break: break-all; }
.route-resume .rr-meta { font-size: 12px; color: var(--text-dim); font-family: 'JetBrains Mono', monospace; margin-top: 2px; }
.route-resume .rr-use {
  margin-top: 10px; width: 100%; font-family: inherit; font-size: 13px; font-weight: 600; color: #fff;
  background: var(--accent); border: none; border-radius: 7px; padding: 8px 12px; cursor: pointer;
}
.route-resume .rr-use:hover { filter: brightness(0.95); }

/* ---------- Kilometer-mijlpalen (alle kaarten) ---------- */
.km-dot {
  background: var(--surface); color: var(--text-dim); border: 1px solid var(--border);
  border-radius: 100px; font: 600 11px/1 'JetBrains Mono', monospace; padding: 3px 6px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.12); white-space: nowrap; text-align: center;
  transform: translate(-50%, -50%); pointer-events: none;
}

/* ---------- Koffiestop-tool ---------- */
.stop-pin {
  width: 30px; height: 30px; border-radius: 50%; display: flex; align-items: center;
  justify-content: center; border: 2.5px solid #fff; box-shadow: 0 2px 6px rgba(0,0,0,0.35);
  font-size: 15px; line-height: 1;
}
.poi-dot {
  width: 24px; height: 24px; border-radius: 50%; background: #fff; border: 2px solid;
  display: flex; align-items: center; justify-content: center; font-size: 12px; line-height: 1;
  box-shadow: 0 1px 3px rgba(0,0,0,0.25); cursor: pointer; opacity: 0.95;
}
.poi-dot:hover { transform: scale(1.18); }
.type-picker { display: flex; flex-wrap: wrap; gap: 6px; }
.type-chip {
  display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; font-weight: 600;
  padding: 7px 11px; border-radius: 100px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text-dim); cursor: pointer;
}
.type-chip .tc-emoji { font-size: 14px; }
.type-chip:hover { border-color: var(--accent); }
.type-chip.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.stop-list { display: flex; flex-direction: column; gap: 8px; }
.stop-list-empty { font-size: 13px; color: var(--text-dim); font-style: italic; }
.stop-item {
  display: flex; align-items: center; gap: 9px; background: var(--surface-2);
  border: 1px solid var(--border); border-radius: 8px; padding: 7px 10px;
}
.stop-item .si-emoji { font-size: 16px; flex-shrink: 0; }
.stop-item .si-name {
  flex: 1; font-size: 13px; font-weight: 600; background: transparent; border: none;
  color: var(--text); min-width: 0; font-family: inherit; padding: 2px 4px; border-radius: 4px;
}
.stop-item .si-name:focus { outline: none; background: var(--surface); box-shadow: 0 0 0 1px var(--accent); }
.stop-item .si-dist { font-size: 11px; color: var(--text-dim); font-family: 'JetBrains Mono', monospace; flex-shrink: 0; }
.stop-item .si-remove {
  flex-shrink: 0; width: 22px; height: 22px; border-radius: 50%; border: none; cursor: pointer;
  background: transparent; color: var(--text-dim); display: flex; align-items: center; justify-content: center;
}
.stop-item .si-remove:hover { background: var(--accent); color: #fff; }
.ext-note { font-size: 11.5px; color: var(--text-dim); line-height: 1.45; margin-top: 8px; }
.btn-secondary {
  width: 100%; font-family: inherit; font-size: 14px; font-weight: 600; color: var(--text);
  background: var(--surface); border: 1px solid var(--border); border-radius: 8px;
  padding: 11px 14px; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 8px;
}
.btn-secondary:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); }
.btn-secondary:disabled { opacity: 0.5; cursor: not-allowed; }
.dl-row { display: flex; flex-direction: column; gap: 8px; }
.dist-slider { margin-top: 12px; }
.dist-slider-head { font-size: 12.5px; color: var(--text-dim); margin-bottom: 9px; }
.dist-slider-head strong { color: var(--text); font-family: 'JetBrains Mono', monospace; }
input[type=range].dist-range {
  width: 100%; -webkit-appearance: none; appearance: none; height: 4px; border-radius: 2px;
  background: var(--border); outline: none; cursor: pointer; margin: 0;
}
input[type=range].dist-range::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none; width: 18px; height: 18px; border-radius: 50%;
  background: var(--accent); cursor: pointer; border: 2px solid #fff; box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}
input[type=range].dist-range::-moz-range-thumb {
  width: 18px; height: 18px; border-radius: 50%; background: var(--accent); cursor: pointer;
  border: 2px solid #fff; box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

/* ---------- Hoogteprofiel-tool ---------- */
.profile-wrap { min-height: 0; height: 100%; display: flex; flex-direction: column; }
.profile-chart-box {
  flex-shrink: 0; height: 260px; background: var(--surface);
  border-bottom: 1px solid var(--border); position: relative; display: none;
}
.profile-chart-box.visible { display: block; }
.chart-svg { position: absolute; inset: 0; }
.profile-chart-box svg { display: block; width: 100%; height: 100%; }
.profile-wrap .map-wrap { flex: 1; height: auto; }
.profile-tooltip {
  position: absolute; pointer-events: none; z-index: 5; transform: translate(-50%, 0);
  background: var(--surface); border: 1px solid var(--border); border-radius: 7px;
  padding: 6px 9px; font-size: 11px; box-shadow: var(--shadow-sm); white-space: nowrap;
  opacity: 0; transition: opacity 0.1s ease;
}
.profile-tooltip .pt-dist { font-family: 'JetBrains Mono', monospace; color: var(--text-dim); }
.profile-tooltip .pt-ele { font-family: 'JetBrains Mono', monospace; font-weight: 600; color: var(--accent); }
.gain-compare {
  display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap;
  font-family: 'JetBrains Mono', monospace;
}
.gain-compare .from { color: var(--text-dim); text-decoration: line-through; font-size: 14px; }
.gain-compare .to { color: var(--accent); font-weight: 600; font-size: 20px; }
.gain-compare .arrow { color: var(--text-dim); }
.legend { display: flex; gap: 16px; font-size: 11px; color: var(--text-dim); margin-top: 4px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 14px; height: 3px; border-radius: 2px; display: inline-block; }
@media (max-width: 900px) {
  .profile-chart-box { height: 200px; }
  .profile-wrap .map-wrap { height: 50vh; min-height: 300px; flex: none; }
}
.convert-hero {
  max-width: 760px; margin: 0 auto; padding: 56px 28px 28px; text-align: center;
}
.convert-hero h1 {
  font-family: 'Fraunces', serif; font-size: clamp(28px, 4.5vw, 40px);
  font-weight: 600; letter-spacing: -0.02em; line-height: 1.12; margin-bottom: 16px;
}
.convert-hero h1 .accent { color: var(--accent); }
.convert-hero p { font-size: clamp(15px, 2vw, 17px); color: var(--text-dim); max-width: 560px; margin: 0 auto; line-height: 1.55; }

.converter {
  max-width: 620px; margin: 0 auto; padding: 8px 28px 0;
  display: flex; flex-direction: column; gap: 18px;
}
.direction-row {
  display: flex; align-items: center; gap: 12px; justify-content: center;
  background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 16px;
}
.direction-field { display: flex; flex-direction: column; gap: 5px; flex: 1; }
.direction-field label { font-size: 10px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-dim); font-weight: 700; }
.direction-field select, .direction-fixed {
  font-family: inherit; font-size: 14px; font-weight: 600; color: var(--text);
  padding: 10px 12px; border-radius: 6px; border: 1px solid var(--border); background: var(--surface);
  cursor: pointer; width: 100%;
}
.direction-fixed { background: var(--surface-2); cursor: default; display: flex; align-items: center; }
.direction-arrow { color: var(--accent); flex-shrink: 0; margin-top: 16px; }
.converter-map { height: 300px; border-radius: 10px; overflow: hidden; border: 1px solid var(--border); display: none; }
.converter-result { display: none; }

.convert-explain {
  max-width: 720px; margin: 0 auto; padding: 40px 28px 64px;
}
.convert-explain h2 {
  font-family: 'Fraunces', serif; font-size: 22px; font-weight: 600; letter-spacing: -0.01em;
  margin: 28px 0 10px;
}
.convert-explain h2:first-child { margin-top: 0; }
.convert-explain p { font-size: 14px; color: var(--text-dim); line-height: 1.6; margin-bottom: 12px; }
.convert-other-tools {
  display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px;
}
.convert-other-tools a {
  font-size: 13px; padding: 7px 13px; border-radius: 100px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text-dim); font-weight: 500;
}
.convert-other-tools a:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }

@media (max-width: 560px) {
  .direction-row { flex-direction: column; align-items: stretch; }
  .direction-arrow { transform: rotate(90deg); margin: 0 auto; }
  .convert-hero { padding: 40px 22px 24px; }
}

/* ---------- Tip card (koffie) ---------- */
.tip-card {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 18px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
  text-align: center;
}
.tip-title {
  font-family: 'Fraunces', serif;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.01em;
}
.tip-sub { font-size: 12px; color: var(--text-dim); line-height: 1.4; margin-top: -8px; }
.tip-qr {
  background: #FFFFFF;
  padding: 10px;
  border-radius: 6px;
  border: 1px solid var(--border);
  line-height: 0;
}
.tip-qr img { display: block; width: 132px; height: 132px; }
.tip-link {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--text-dim);
  border-bottom: 1px dotted var(--border);
  padding-bottom: 1px;
  transition: color 0.15s, border-color 0.15s;
}
.tip-link:hover { color: var(--accent); border-color: var(--accent); text-decoration: none; }

/* ============================================================
   TOOL-PAGINA layout (gedeeld)
   ============================================================ */
.app { display: flex; flex-direction: column; height: 100vh; overflow: hidden; }
.app-main { flex: 1; min-height: 0; }
.tool-page-title {
  font-family: 'Fraunces', serif;
  font-size: 17px;
  font-weight: 600;
  color: var(--text);
}
.step { display: flex; flex-direction: column; gap: 10px; }
.step-label {
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-dim);
  font-weight: 700;
}
.hint { font-size: 12px; color: var(--text-dim); line-height: 1.5; }

/* Tool layout: zijbalk + kaart (gedeeld door kaart-tools) */
.tool-layout { display: grid; grid-template-columns: 380px 1fr; min-height: 0; height: 100%; }
.tool-sidebar {
  background: var(--surface);
  border-right: 1px solid var(--border);
  padding: 24px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 22px;
  counter-reset: step;
}
.step-label.numbered::before { content: counter(step) " · "; counter-increment: step; color: var(--accent); }

/* Kaart (gedeeld) */
#map { height: 100%; width: 100%; background: var(--surface-2); }
.map-wrap { position: relative; min-height: 0; height: 100%; }
.leaflet-container { background: #EFEAE0; }
.leaflet-tooltip {
  background: #FFFFFF; color: var(--text); border: 1px solid var(--border);
  font-family: 'Manrope', sans-serif; font-size: 11px; box-shadow: var(--shadow-sm);
}

/* Welkomst-overlay (gedeeld; inhoud per tool) */
.empty-state {
  position: absolute; inset: 0; z-index: 500;
  display: flex; align-items: center; justify-content: center;
  pointer-events: none; padding: 24px;
}
.empty-state.hidden { display: none; }
.empty-state-card {
  position: relative;
  background: rgba(255,255,255,0.97);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  border: 1px solid var(--border); border-radius: 14px;
  padding: 32px 36px; max-width: 520px;
  pointer-events: auto; box-shadow: var(--shadow-lg);
}
.empty-state-close {
  position: absolute; top: 10px; right: 10px;
  width: 32px; height: 32px; border: none; background: transparent;
  border-radius: 8px; cursor: pointer; color: var(--text-dim);
  display: flex; align-items: center; justify-content: center;
  transition: background 0.15s, color 0.15s;
}
.empty-state-close:hover { background: var(--surface-2); color: var(--text); }
.empty-state-close svg { display: block; }
.empty-state-illustration { display: block; margin: 0 auto 22px; width: 240px; max-width: 100%; }
.empty-state h2 {
  font-family: 'Fraunces', serif; font-size: 24px; font-weight: 600;
  letter-spacing: -0.015em; margin-bottom: 12px; color: var(--text);
}
.empty-state p { font-size: 14px; line-height: 1.55; color: var(--text-dim); margin-bottom: 22px; }
.empty-state ol { list-style: none; counter-reset: estep; margin-bottom: 20px; }
.empty-state ol li {
  counter-increment: estep; font-size: 13.5px; padding-left: 32px;
  position: relative; margin-bottom: 10px; color: var(--text); line-height: 1.5;
}
.empty-state ol li::before {
  content: counter(estep); position: absolute; left: 0; top: 1px;
  width: 22px; height: 22px; background: var(--accent); color: #fff;
  border-radius: 50%; font-family: 'JetBrains Mono', monospace; font-size: 11px;
  display: flex; align-items: center; justify-content: center; font-weight: 700;
}
.empty-state .caveat {
  font-size: 11.5px; color: var(--text-dim);
  border-top: 1px solid var(--border); padding-top: 14px; margin-top: 18px; line-height: 1.5;
}

@media (max-width: 768px) {
  .app { height: auto; min-height: 100vh; overflow: visible; }
  .tool-layout { grid-template-columns: 1fr; grid-template-rows: auto auto; height: auto; }
  .tool-sidebar { border-right: none; border-bottom: 1px solid var(--border); max-height: none; overflow-y: visible; }
  .map-wrap { height: 65vh; min-height: 380px; }
  .empty-state-card { padding: 24px; }
  .empty-state h2 { font-size: 20px; }
  .tip-card { margin-top: 8px !important; }
}
@media (max-width: 560px) {
  .tool-page-title { display: none; }
  .tool-sidebar { padding: 20px; }
  .map-wrap { height: 60vh; min-height: 340px; }
}

/* ============================================================
   HOMEPAGE
   ============================================================ */
.page { min-height: 100vh; display: flex; flex-direction: column; }
.page-main { flex: 1; }

.hero {
  max-width: 880px;
  margin: 0 auto;
  padding: 72px 28px 48px;
  text-align: center;
}
.hero h1 {
  font-family: 'Fraunces', serif;
  font-size: clamp(32px, 5vw, 48px);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin-bottom: 20px;
}
.hero h1 .accent { color: var(--accent); }
.hero p {
  font-size: clamp(15px, 2vw, 18px);
  color: var(--text-dim);
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.55;
}
.hero .privacy-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 24px;
  padding: 7px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 100px;
  font-size: 12.5px;
  color: var(--text-dim);
  font-weight: 500;
}
.hero .privacy-badge svg { color: var(--success); }

.tool-grid {
  max-width: 1080px;
  margin: 0 auto;
  padding: 8px 28px 72px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.tool-tile {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 26px 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  text-decoration: none;
  color: var(--text);
  position: relative;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.tool-tile.active:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--accent);
  text-decoration: none;
}
.tool-tile.soon {
  cursor: default;
  opacity: 0.7;
}
.tool-tile.later {
  cursor: default;
  background: var(--surface-2);
  border-style: dashed;
}

.tool-icon {
  width: 46px;
  height: 46px;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.tool-tile.soon .tool-icon,
.tool-tile.later .tool-icon {
  background: var(--surface-2);
  color: var(--text-dim);
}
.tool-tile.later .tool-icon { background: var(--surface); }

.tool-name {
  font-family: 'Fraunces', serif;
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.tool-desc {
  font-size: 13.5px;
  color: var(--text-dim);
  line-height: 1.5;
  flex: 1;
}
.tool-badge {
  position: absolute;
  top: 18px;
  right: 18px;
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 700;
  padding: 4px 9px;
  border-radius: 100px;
}
.tool-badge.live    { background: rgba(21,128,61,0.12); color: var(--success); }
.tool-badge.soon    { background: var(--surface-2); color: var(--text-dim); }
.tool-badge.later   { background: transparent; color: var(--text-dim); border: 1px solid var(--border); }
.tool-cta {
  font-size: 13px;
  font-weight: 700;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.section-label {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 28px 14px;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--text-dim);
}

/* ---------- Homepage secties (drie paden) ---------- */
.tool-section-head {
  max-width: 1080px; margin: 0 auto; padding: 48px 28px 16px;
  display: flex; gap: 16px; align-items: baseline;
}
.tool-section-head:first-of-type { padding-top: 8px; }
.path-num {
  font-family: 'JetBrains Mono', monospace; font-size: 22px; font-weight: 500;
  color: var(--accent); flex-shrink: 0; line-height: 1; font-variant-numeric: tabular-nums;
}
.tool-section-text { min-width: 0; }
.tool-section-title {
  font-family: 'Fraunces', serif; font-size: clamp(20px, 3vw, 26px);
  font-weight: 600; letter-spacing: -0.01em; line-height: 1.15; margin-bottom: 6px;
}
.tool-section-desc { font-size: 14.5px; color: var(--text-dim); line-height: 1.55; max-width: 620px; }
.tool-grid.grouped { padding-top: 8px; padding-bottom: 8px; }

/* Uitgelichte tegel (topfunctie) */
.feature-wrap { max-width: 1080px; margin: 0 auto; padding: 8px 28px 0; }
.feature-tile {
  display: flex; align-items: center; gap: 20px;
  background: var(--surface); border: 1px solid var(--border); border-left: 4px solid var(--accent);
  border-radius: 14px; padding: 20px 24px; transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.feature-tile:hover { border-color: var(--accent); box-shadow: var(--shadow-sm); text-decoration: none; }
.feature-icon {
  width: 52px; height: 52px; border-radius: 12px; background: var(--accent-soft);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0; color: var(--accent);
}
.feature-body { flex: 1; min-width: 0; }
.feature-head { display: flex; align-items: center; gap: 10px; margin-bottom: 3px; }
.feature-title { font-family: 'Fraunces', serif; font-size: 19px; font-weight: 600; color: var(--text); }
.feature-desc { font-size: 13.5px; color: var(--text-dim); line-height: 1.5; }
.feature-cta { color: var(--accent); font-weight: 600; font-size: 14px; flex-shrink: 0; }
@media (max-width: 640px) {
  .feature-tile { flex-direction: column; align-items: flex-start; gap: 14px; }
  .feature-wrap { padding: 8px 22px 0; }
}

/* Converteren-sectie: tegel + snelkoppelingen ernaast */
.convert-feature {
  max-width: 1080px; margin: 0 auto; padding: 8px 28px 8px;
  display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: stretch;
}
.convert-feature .tool-tile { height: 100%; }
.convert-feature-links {
  background: var(--surface); border: 1px solid var(--border); border-radius: 14px;
  padding: 22px 24px; display: flex; flex-direction: column; justify-content: center;
}
.cf-label {
  font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--text-dim); font-weight: 700; margin-bottom: 8px;
}
.convert-feature-links a {
  font-size: 15px; font-weight: 600; color: var(--text);
  padding: 11px 0; border-bottom: 1px solid var(--border);
  display: flex; justify-content: space-between; align-items: center;
}
.convert-feature-links a:last-child { border-bottom: none; }
.convert-feature-links a::after { content: "→"; color: var(--text-dim); transition: transform 0.15s ease; }
.convert-feature-links a:hover { color: var(--accent); text-decoration: none; }
.convert-feature-links a:hover::after { color: var(--accent); transform: translateX(3px); }

/* Binnenkort-strip (routebuilder) */
.soon-strip { max-width: 1080px; margin: 0 auto; padding: 8px 28px 72px; }
.soon-inner {
  border: 1.5px dashed var(--border); border-radius: 14px; padding: 22px 26px;
  display: flex; align-items: center; gap: 20px;
}
.soon-icon { color: var(--text-dim); flex-shrink: 0; display: flex; }
.soon-text h3 { font-family: 'Fraunces', serif; font-size: 18px; font-weight: 600; margin-bottom: 3px; }
.soon-text p { font-size: 13.5px; color: var(--text-dim); line-height: 1.5; }
.soon-badge {
  margin-left: auto; flex-shrink: 0; font-size: 10px; font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-dim);
  border: 1px solid var(--border); border-radius: 100px; padding: 6px 13px;
}
@media (max-width: 760px) {
  .convert-feature { grid-template-columns: 1fr; }
  .soon-inner { flex-direction: column; align-items: flex-start; gap: 14px; }
  .soon-badge { margin-left: 0; }
}
@media (max-width: 600px) {
  .tool-section-head { padding: 36px 22px 14px; }
  .convert-feature { padding: 8px 22px; }
  .soon-strip { padding: 8px 22px 56px; }
}

.home-footer-cards {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 28px 72px;
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 24px;
  align-items: start;
}
.about-block h2 {
  font-family: 'Fraunces', serif;
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: 12px;
}
.about-block p {
  font-size: 14px;
  color: var(--text-dim);
  line-height: 1.6;
  margin-bottom: 12px;
  max-width: 560px;
}

@media (max-width: 860px) {
  .tool-grid { grid-template-columns: repeat(2, 1fr); }
  .home-footer-cards { grid-template-columns: 1fr; }
  .tip-card { max-width: 340px; }
}
@media (max-width: 600px) {
  .tool-grid { grid-template-columns: 1fr; gap: 14px; }
  .hero { padding: 44px 22px 32px; }
  .hero p { font-size: 15px; }
  .hero .privacy-badge {
    white-space: normal;
    border-radius: 12px;
    line-height: 1.4;
    text-align: left;
    align-items: flex-start;
    font-size: 12px;
  }
  .hero .privacy-badge svg { margin-top: 2px; flex-shrink: 0; }
  .site-header { padding: 12px 18px; }
  .site-nav { gap: 14px; font-size: 13px; }
  .section-label { padding: 0 22px 12px; }
  .tool-grid { padding: 4px 22px 56px; }
  .home-footer-cards { padding: 0 22px 56px; }
  .tool-tile { padding: 22px 20px; }
  .about-block h2 { font-size: 21px; }
}
@media (max-width: 380px) {
  .site-nav { display: none; }
}

/* ---------- Taalwisselaar ---------- */
.header-right { display: flex; align-items: center; gap: 16px; }
.lang-switch {
  display: inline-flex; align-items: center; gap: 2px;
  border: 1px solid var(--border); border-radius: 8px; padding: 2px; background: var(--surface-2);
}
.lang-opt {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 12px; font-weight: 700; letter-spacing: 0.02em; line-height: 1;
  padding: 4px 8px; border-radius: 6px; color: var(--text-dim);
}
.lang-opt.active { background: var(--surface); color: var(--text); box-shadow: 0 1px 2px rgba(0,0,0,0.07); }
a.lang-opt:hover { color: var(--text); text-decoration: none; }
.lang-flag {
  width: 17px; height: 12px; border-radius: 2px; flex-shrink: 0;
  background-size: cover; background-position: center; box-shadow: inset 0 0 0 1px rgba(0,0,0,0.10);
}
.lang-flag.nl { background-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20viewBox%3D%270%200%209%206%27%3E%3Crect%20width%3D%279%27%20height%3D%276%27%20fill%3D%27%23fff%27%2F%3E%3Crect%20width%3D%279%27%20height%3D%272%27%20fill%3D%27%23AE1C28%27%2F%3E%3Crect%20y%3D%274%27%20width%3D%279%27%20height%3D%272%27%20fill%3D%27%2321468B%27%2F%3E%3C%2Fsvg%3E"); }
.lang-flag.en { background-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20viewBox%3D%270%200%2060%2030%27%3E%3CclipPath%20id%3D%27uks%27%3E%3Cpath%20d%3D%27M0%2C0%20v30%20h60%20v-30%20z%27%2F%3E%3C%2FclipPath%3E%3CclipPath%20id%3D%27ukt%27%3E%3Cpath%20d%3D%27M30%2C15%20h30%20v15%20z%20v15%20h-30%20z%20h-30%20v-15%20z%20v-15%20h30%20z%27%2F%3E%3C%2FclipPath%3E%3Cg%20clip-path%3D%27url%28%23uks%29%27%3E%3Cpath%20d%3D%27M0%2C0%20v30%20h60%20v-30%20z%27%20fill%3D%27%23012169%27%2F%3E%3Cpath%20d%3D%27M0%2C0%20L60%2C30%20M60%2C0%20L0%2C30%27%20stroke%3D%27%23fff%27%20stroke-width%3D%276%27%2F%3E%3Cpath%20d%3D%27M0%2C0%20L60%2C30%20M60%2C0%20L0%2C30%27%20clip-path%3D%27url%28%23ukt%29%27%20stroke%3D%27%23C8102E%27%20stroke-width%3D%274%27%2F%3E%3Cpath%20d%3D%27M30%2C0%20v30%20M0%2C15%20h60%27%20stroke%3D%27%23fff%27%20stroke-width%3D%2710%27%2F%3E%3Cpath%20d%3D%27M30%2C0%20v30%20M0%2C15%20h60%27%20stroke%3D%27%23C8102E%27%20stroke-width%3D%276%27%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E"); }

/* feature-tegel: badge hoort inline naast de titel, niet absoluut wegspringen */
.feature-head .tool-badge { position: static; }

/* Checkbox-rij (route→track, etappes) */
.check-row { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--text); cursor: pointer; user-select: none; }
.check-row input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--accent); cursor: pointer; flex: 0 0 auto; margin: 0; }
.check-row span { line-height: 1.3; }
.check-row input:disabled { opacity: .4; cursor: default; }
