/* Knooppunt — cycling node network planner */

:root {
  --white: #FFFFFF;
  --shell: #F7F5F0;
  --ink: #16241C;
  --ink-soft: #3F5147;
  --muted: #77877D;
  --sign: #0B7A3B;
  --sign-deep: #075C2C;
  --sign-wash: #E8F3EC;
  --dune: #D8C9AC;
  --water: #2C6E8F;
  --rule: #DFDCD4;

  --shell-radius: 2px;
  --measure: 66ch;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--white);
  color: var(--ink);
  font-family: "Karla", "Helvetica Neue", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.65;
}

a { color: var(--sign); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--sign-deep); }

a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible {
  outline: 3px solid var(--water);
  outline-offset: 2px;
}

.shell { max-width: 1060px; margin: 0 auto; padding: 0 24px; }

/* ---------- node chip: the signature ---------- */

.node {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.1em;
  height: 2.1em;
  padding: 0 0.42em;
  background: var(--sign);
  color: var(--white);
  font-family: "Familjen Grotesk", "Helvetica Neue", Arial, sans-serif;
  font-weight: 700;
  font-size: 15px;
  line-height: 1;
  border-radius: var(--shell-radius);
  letter-spacing: 0.01em;
}

.node.is-ghost { background: var(--sign-wash); color: var(--sign-deep); }
.node.is-lg { font-size: 19px; }

.chain {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  list-style: none;
  padding: 0;
  margin: 0;
}
.chain li { display: flex; align-items: center; gap: 7px; }
.chain .arrow { color: var(--muted); font-size: 13px; }

/* ---------- header ---------- */

.top {
  border-bottom: 1px solid var(--rule);
  background: var(--white);
}

.top-in {
  max-width: 1060px;
  margin: 0 auto;
  padding: 18px 24px;
  display: flex;
  align-items: center;
  gap: 28px;
  flex-wrap: wrap;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: "Familjen Grotesk", sans-serif;
  font-weight: 700;
  font-size: 21px;
  letter-spacing: -0.01em;
  color: var(--ink);
  text-decoration: none;
}
.brand:hover { color: var(--ink); }

.menu { margin-left: auto; display: flex; gap: 24px; flex-wrap: wrap; }
.menu a {
  font-size: 15px;
  color: var(--ink-soft);
  text-decoration: none;
  padding-bottom: 3px;
  border-bottom: 2px solid transparent;
}
.menu a:hover { border-bottom-color: var(--dune); }
.menu a[aria-current] { color: var(--sign); border-bottom-color: var(--sign); }

/* ---------- hero ---------- */

.opening { padding: 64px 0 12px; }

.kicker {
  font-family: "Familjen Grotesk", sans-serif;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--sign);
  margin: 0 0 18px;
}

h1 {
  font-family: "Familjen Grotesk", sans-serif;
  font-weight: 700;
  font-size: clamp(36px, 5.2vw, 56px);
  line-height: 1.04;
  letter-spacing: -0.025em;
  margin: 0 0 20px;
  max-width: 16ch;
}

.standfirst {
  font-size: 19px;
  line-height: 1.55;
  color: var(--ink-soft);
  max-width: 54ch;
  margin: 0;
}

/* ---------- planner ---------- */

.planner {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 0;
  border: 1px solid var(--rule);
  border-radius: var(--shell-radius);
  overflow: hidden;
  margin: 44px 0 8px;
}

.planner-controls { padding: 26px; background: var(--shell); }
.planner-output { padding: 26px; background: var(--white); border-left: 1px solid var(--rule); }

.ctl { margin-bottom: 18px; }

.ctl label {
  display: block;
  font-family: "Familjen Grotesk", sans-serif;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 6px;
}

.ctl select, .ctl input {
  width: 100%;
  font-family: "Karla", sans-serif;
  font-size: 16px;
  padding: 10px 12px;
  border: 1px solid var(--rule);
  border-radius: var(--shell-radius);
  background: var(--white);
  color: var(--ink);
}

.ctl-hint { font-size: 13px; color: var(--muted); margin: 5px 0 0; }

.go {
  width: 100%;
  font-family: "Familjen Grotesk", sans-serif;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.02em;
  padding: 13px;
  background: var(--sign);
  color: var(--white);
  border: 0;
  border-radius: var(--shell-radius);
  cursor: pointer;
}
.go:hover { background: var(--sign-deep); }

/* output */

.out-head {
  font-family: "Familjen Grotesk", sans-serif;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 14px;
}

.out-figures {
  display: flex;
  gap: 34px;
  flex-wrap: wrap;
  margin: 20px 0 22px;
  padding: 18px 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}

.fig .fig-n {
  display: block;
  font-family: "Familjen Grotesk", sans-serif;
  font-size: 30px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.02em;
}
.fig .fig-l {
  display: block;
  font-size: 13px;
  color: var(--muted);
  margin-top: 4px;
}

.bar {
  display: flex;
  height: 9px;
  border-radius: var(--shell-radius);
  overflow: hidden;
  margin: 0 0 10px;
}
.bar span { display: block; }

/* surface colours — used by both the bar and the legend swatches */
.s-asphalt { background: var(--ink); }
.s-concrete { background: var(--water); }
.s-shell { background: var(--dune); }
.s-brick { background: #A6553C; }
.s-sand { background: #C9A227; }

.legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 13px; color: var(--muted); margin: 0 0 18px; padding: 0; list-style: none; }
.legend li { display: flex; align-items: center; gap: 6px; }
.legend i { width: 10px; height: 10px; border-radius: 2px; display: block; }

.notices { margin: 0; padding: 0; list-style: none; font-size: 14px; }
.notices li {
  padding: 9px 0 9px 16px;
  border-left: 3px solid var(--dune);
  margin-bottom: 8px;
  color: var(--ink-soft);
  background: var(--shell);
}
.notices li.is-warn { border-left-color: #C9A227; }

.out-empty { color: var(--muted); font-size: 15px; padding: 30px 0; }

/* ---------- generic sections ---------- */

.band { padding: 54px 0; }
.band.is-wash { background: var(--shell); border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }

h2 {
  font-family: "Familjen Grotesk", sans-serif;
  font-weight: 700;
  font-size: 30px;
  letter-spacing: -0.02em;
  margin: 0 0 8px;
}

h3 {
  font-family: "Familjen Grotesk", sans-serif;
  font-weight: 700;
  font-size: 20px;
  letter-spacing: -0.01em;
  margin: 30px 0 8px;
}

.band-intro { color: var(--muted); max-width: 56ch; margin: 0 0 30px; }

.copy { max-width: var(--measure); }
.copy p { margin: 0 0 16px; }

/* route cards */

.routes { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 18px; }

.route {
  border: 1px solid var(--rule);
  border-radius: var(--shell-radius);
  padding: 20px;
  background: var(--white);
  text-decoration: none;
  color: var(--ink);
  display: block;
}
.route:hover { border-color: var(--sign); color: var(--ink); }

.route h3 { margin: 10px 0 6px; font-size: 19px; }
.route p { margin: 0 0 12px; font-size: 15px; color: var(--ink-soft); }

.route-stats { display: flex; gap: 14px; font-size: 13px; color: var(--muted); font-family: "Familjen Grotesk", sans-serif; font-weight: 600; }

/* surface entries */

.surface { border-top: 1px solid var(--rule); padding: 24px 0; }
.surface:last-child { border-bottom: 1px solid var(--rule); }
.surface h3 { margin: 0 0 8px; }
.surface .dutch { color: var(--muted); font-weight: 400; font-size: 16px; }
.surface p { max-width: var(--measure); margin: 0 0 12px; }

.penalty { display: flex; gap: 26px; flex-wrap: wrap; font-size: 14px; }
.penalty b { font-family: "Familjen Grotesk", sans-serif; }

/* tables */

.table-scroll { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: 15px; min-width: 480px; }
th, td { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--rule); }
thead th {
  font-family: "Familjen Grotesk", sans-serif;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  border-bottom: 2px solid var(--ink);
}
tbody td + td, thead th + th { text-align: right; }

/* region grid */

.regions { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px; list-style: none; padding: 0; margin: 0 0 30px; }
.regions li {
  border: 1px solid var(--rule);
  border-radius: var(--shell-radius);
  padding: 13px 15px;
  font-size: 15px;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}
.regions .count { font-family: "Familjen Grotesk", sans-serif; font-size: 13px; color: var(--muted); font-weight: 600; }

/* pull quote / note */

.note {
  background: var(--sign-wash);
  border-radius: var(--shell-radius);
  padding: 20px 22px;
  max-width: var(--measure);
  margin: 26px 0;
}
.note p { margin: 0; }
.note strong { font-family: "Familjen Grotesk", sans-serif; }

/* footer */

.base {
  border-top: 1px solid var(--rule);
  padding: 34px 0 46px;
  font-size: 14px;
  color: var(--muted);
  margin-top: 20px;
}
.base-in { max-width: 1060px; margin: 0 auto; padding: 0 24px; display: flex; gap: 26px; flex-wrap: wrap; align-items: baseline; }
.base a { color: var(--ink-soft); text-decoration: none; }
.base a:hover { text-decoration: underline; }
.base-links { display: flex; gap: 20px; flex-wrap: wrap; }
.base-meta { margin-left: auto; font-family: "Familjen Grotesk", sans-serif; font-size: 13px; }

/* responsive */

@media (max-width: 880px) {
  .planner { grid-template-columns: 1fr; }
  .planner-output { border-left: 0; border-top: 1px solid var(--rule); }
}

@media (max-width: 620px) {
  body { font-size: 16px; }
  .menu { margin-left: 0; width: 100%; gap: 18px; }
  .opening { padding: 40px 0 8px; }
  .band { padding: 38px 0; }
  .out-figures { gap: 22px; }
  .base-meta { margin-left: 0; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
