:root {
  --bg: #f6f5f1;
  --paneel: #ffffff;
  --tekst: #1d2330;
  --zacht: #5d6574;
  --rand: #e3e1da;
  --accent: #1d2330;
  --blauw: #1f6fd6; --rood: #d7263d; --oranje: #f07c00; --groen: #2a9d48; --geel: #e0b000;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--tekst);
}
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; background: var(--bg); }
#app { display: grid; grid-template-columns: 400px 1fr; height: 100vh; }
#kaart { height: 100%; }

#paneel {
  background: var(--paneel); border-right: 1px solid var(--rand);
  display: flex; flex-direction: column; overflow: hidden;
}
.kop { padding: 18px 20px 10px; }
.kop h1 { font-size: 20px; margin: 0 0 6px; letter-spacing: -.01em; }
.kop p { margin: 0; font-size: 13px; color: var(--zacht); line-height: 1.45; }

.tabs { display: flex; gap: 4px; padding: 0 16px; border-bottom: 1px solid var(--rand); }
.tabs button {
  flex: 1; border: 0; background: none; padding: 10px 4px; font: inherit; font-size: 13px;
  color: var(--zacht); border-bottom: 3px solid transparent; cursor: pointer;
}
.tabs button[aria-selected="true"] { color: var(--tekst); font-weight: 600; border-bottom-color: var(--accent); }

.tab { padding: 16px 20px; overflow-y: auto; flex: 1; }
.voet { padding: 10px 20px; font-size: 11px; color: var(--zacht); border-top: 1px solid var(--rand); }

.veld { display: block; margin-bottom: 10px; }
.veld > span { display: block; font-size: 12px; font-weight: 600; color: var(--zacht); margin-bottom: 4px; }
.zoekveld { position: relative; }
input[type=search], input[type=time], select {
  width: 100%; font: inherit; font-size: 15px; padding: 9px 11px;
  border: 1px solid #cfccc3; border-radius: 8px; background: #fff; color: var(--tekst);
}
input:focus, select:focus, button:focus-visible { outline: 2px solid var(--blauw); outline-offset: 1px; }
.suggesties {
  position: absolute; z-index: 1000; left: 0; right: 0; top: calc(100% + 2px); margin: 0; padding: 4px 0;
  list-style: none; background: #fff; border: 1px solid #cfccc3; border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0,0,0,.12); max-height: 300px; overflow-y: auto;
}
.suggesties li { padding: 8px 12px; cursor: pointer; font-size: 14px; display: flex; gap: 8px; align-items: center; }
.suggesties li[aria-selected="true"], .suggesties li:hover { background: #f0efe9; }
.suggesties .soort { font-size: 11px; color: var(--zacht); margin-left: auto; white-space: nowrap; }

.wissel { border: 0; background: none; color: var(--zacht); font: inherit; font-size: 12px; cursor: pointer; padding: 0 0 8px; }
.tijdrij { display: grid; grid-template-columns: 1.3fr 1fr auto; gap: 6px; }
button.primair {
  font: inherit; font-weight: 600; font-size: 14px; border: 0; border-radius: 8px; padding: 9px 14px;
  background: var(--accent); color: #fff; cursor: pointer;
}
button.klein {
  font: inherit; font-size: 12px; border: 1px solid #cfccc3; background: #fff; border-radius: 6px;
  padding: 4px 9px; cursor: pointer; color: var(--tekst);
}
.tip { font-size: 12px; color: var(--zacht); margin: 8px 0 14px; }

.chip {
  display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600;
  padding: 2px 8px 2px 6px; border-radius: 99px; color: #fff; white-space: nowrap;
}
.chip.geel { color: #3a2e00; }
.stip { width: 10px; height: 10px; border-radius: 50%; display: inline-block; flex: none; }

.kaartje { border: 1px solid var(--rand); border-radius: 10px; padding: 12px 14px; margin-bottom: 10px; background: #fff; }
.kaartje h3 { margin: 0 0 4px; font-size: 15px; }
.kaartje .sub { font-size: 12px; color: var(--zacht); }
.resultaat-kop { font-size: 13px; color: var(--zacht); margin: 4px 0 10px; }
.adres { font-weight: 600; font-size: 15px; margin-bottom: 2px; }

.lijnrij { display: grid; grid-template-columns: auto 1fr; gap: 4px 10px; align-items: start; padding: 10px 0; border-top: 1px solid var(--rand); }
.lijnrij:first-of-type { border-top: 0; }
.lijnrij .halte { font-weight: 600; font-size: 14px; }
.lijnrij .afst { font-size: 12px; color: var(--zacht); }
.tijden { font-size: 12px; color: var(--tekst); margin-top: 3px; line-height: 1.6; }
.tijden b { font-variant-numeric: tabular-nums; }
.link { background: none; border: 0; padding: 0; color: var(--blauw); font: inherit; font-size: 12px; cursor: pointer; text-decoration: underline; }

/* reisadvies */
.samenvatting { display: flex; align-items: baseline; gap: 10px; margin-bottom: 12px; }
.samenvatting .grote-tijd { font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; }
.samenvatting .duur { font-size: 13px; color: var(--zacht); }
.stappen { list-style: none; margin: 0; padding: 0; }
.stap { display: grid; grid-template-columns: 48px 22px 1fr; gap: 0 8px; }
.stap .t { font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; padding-top: 1px; }
.stap .as { position: relative; display: flex; justify-content: center; }
.stap .as::before { content: ""; position: absolute; top: 18px; bottom: -2px; width: 4px; border-radius: 2px; background: var(--kleur, #b8b5ac); }
.stap.lopen .as::before { background: none; border-left: 3px dotted #9a978e; width: 0; }
.stap:last-child .as::before { display: none; }
.stap .punt { width: 14px; height: 14px; border-radius: 50%; background: #fff; border: 3px solid var(--kleur, #6d6a62); margin-top: 2px; z-index: 1; }
.stap .inhoud { padding-bottom: 16px; font-size: 14px; }
.stap .inhoud .klein { font-size: 12px; color: var(--zacht); margin-top: 2px; }
.stap details summary { font-size: 12px; color: var(--zacht); cursor: pointer; margin-top: 4px; }
.stap details ol { margin: 4px 0 0; padding-left: 18px; font-size: 12px; color: var(--zacht); }
.overstap { display: inline-block; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; background: #fff3cd; color: #6b5200; padding: 1px 6px; border-radius: 4px; margin-bottom: 3px; }
.navknoppen { display: flex; gap: 6px; justify-content: space-between; margin-top: 6px; }
.melding { background: #f3f1ea; border-radius: 8px; padding: 10px 12px; font-size: 13px; color: var(--tekst); margin-bottom: 10px; }

/* lijnen */
.lijnlijst { list-style: none; margin: 0 0 14px; padding: 0; }
.lijnlijst li { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 8px; cursor: pointer; }
.lijnlijst li:hover, .lijnlijst li.actief { background: #f0efe9; }
.lijnlijst .balk { width: 6px; align-self: stretch; border-radius: 3px; }
.lijnlijst .naam { font-weight: 600; font-size: 14px; }
.lijnlijst .oms { font-size: 12px; color: var(--zacht); }
.lijnlijst input { margin-left: auto; width: 18px; height: 18px; }
.rtabs { display: flex; gap: 6px; margin-bottom: 8px; }
.rtabs button[aria-pressed="true"] { background: var(--accent); color: #fff; border-color: var(--accent); }
.tabelwrap { overflow-x: auto; border: 1px solid var(--rand); border-radius: 8px; }
table.dr { border-collapse: collapse; font-size: 12px; font-variant-numeric: tabular-nums; }
table.dr th, table.dr td { padding: 4px 7px; border-bottom: 1px solid #efede7; white-space: nowrap; text-align: left; }
table.dr th:first-child, table.dr td:first-child { position: sticky; left: 0; background: #fff; font-weight: 600; }
table.dr thead th { background: #faf9f5; }
table.dr tr:hover td { background: #faf9f5; }

/* kaart */
.leaflet-popup-content { margin: 12px 14px; font-family: inherit; font-size: 13px; }
.pop h4 { margin: 0 0 4px; font-size: 14px; }
.pop .info { font-size: 12px; color: var(--zacht); margin-bottom: 6px; }
.pop .rij { margin: 4px 0; }
.pop .knoppen { display: flex; gap: 6px; margin-top: 8px; }
.halte-label { background: rgba(255,255,255,.9); border: 0; box-shadow: none; font-size: 11px; font-weight: 600; padding: 1px 4px; color: #333; }
.halte-label::before { display: none; }
.pin { width: 22px; height: 22px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); border: 3px solid #fff; box-shadow: 0 1px 4px rgba(0,0,0,.4); }

@media (max-width: 760px) {
  #app { grid-template-columns: 1fr; grid-template-rows: 42vh 1fr; }
  #kaart { grid-row: 1; }
  #paneel { grid-row: 2; border-right: 0; border-top: 1px solid var(--rand); }
  .kop { padding: 12px 16px 6px; }
  .kop p { display: none; }
  .tab { padding: 12px 16px; }
  .tabs { padding: 0 8px; }
  .tabs button { font-size: 12px; }
  .tijdrij { grid-template-columns: 1fr 1fr; }
  .tijdrij .primair { grid-column: 1 / -1; }
}
