:root {
  --ink: #16231d;
  --muted: #5a695f;
  --paper: #f4f1e8;
  --paper-deep: #e9e4d7;
  --white: #fffdf8;
  --forest: #1e4938;
  --forest-dark: #123127;
  --moss: #9fbd73;
  --lime: #d6ec91;
  --orange: #e8864a;
  --blue: #628d9a;
  --purple: #85729d;
  --line: rgba(22, 35, 29, 0.14);
  --line-strong: rgba(22, 35, 29, 0.22);
  --surface: #fffdf8;
  --surface-soft: #eeeadf;
  --shadow-sm: 0 8px 24px rgba(18, 49, 39, 0.08);
  --shadow: 0 24px 70px rgba(18, 49, 39, 0.13);
  --radius-sm: 12px;
  --radius-md: 18px;
  --radius-lg: 28px;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* Leaflet's structural rules live locally so the map still works if the CDN stylesheet is blocked. */
.leaflet-pane,
.leaflet-tile,
.leaflet-marker-icon,
.leaflet-marker-shadow,
.leaflet-tile-container,
.leaflet-pane > svg,
.leaflet-pane > canvas,
.leaflet-image-layer,
.leaflet-layer {
  position: absolute;
  top: 0;
  left: 0;
}

.leaflet-container {
  overflow: hidden;
  touch-action: none;
  -webkit-tap-highlight-color: transparent;
}

.leaflet-tile,
.leaflet-marker-icon,
.leaflet-marker-shadow {
  -webkit-user-drag: none;
  user-select: none;
}

.leaflet-tile {
  visibility: hidden;
}

.leaflet-tile-loaded {
  visibility: inherit;
}

.leaflet-zoom-animated {
  transform-origin: 0 0;
}

.leaflet-pane { z-index: 400; }
.leaflet-tile-pane { z-index: 200; }
.leaflet-overlay-pane { z-index: 400; }
.leaflet-shadow-pane { z-index: 500; }
.leaflet-marker-pane { z-index: 600; }
.leaflet-tooltip-pane { z-index: 650; }
.leaflet-popup-pane { z-index: 700; }

.leaflet-top,
.leaflet-bottom {
  position: absolute;
  z-index: 1000;
  pointer-events: none;
}

.leaflet-top { top: 0; }
.leaflet-right { right: 0; }
.leaflet-bottom { bottom: 0; }
.leaflet-left { left: 0; }

.leaflet-control {
  position: relative;
  z-index: 800;
  float: left;
  clear: both;
  pointer-events: auto;
}

.leaflet-right .leaflet-control { float: right; }
.leaflet-top .leaflet-control { margin-top: 10px; }
.leaflet-bottom .leaflet-control { margin-bottom: 10px; }
.leaflet-left .leaflet-control { margin-left: 10px; }
.leaflet-right .leaflet-control { margin-right: 10px; }

.leaflet-control-zoom a {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-bottom: 1px solid #ddd;
  color: var(--ink);
  background: var(--white);
  font-size: 20px;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
}

.leaflet-control-zoom a:first-child { border-radius: 7px 7px 0 0; }
.leaflet-control-zoom a:last-child { border: 0; border-radius: 0 0 7px 7px; }

.leaflet-control-attribution {
  padding: 2px 6px;
  color: #4f5a55;
  background: rgba(255, 255, 255, 0.82);
}

html {
  scroll-behavior: smooth;
  touch-action: manipulation;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

html,
body.map-app {
  height: 100%;
}

body.map-app {
  overflow: hidden;
  overscroll-behavior: none;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 88% 8%, rgba(214, 236, 145, 0.2), transparent 28rem),
    var(--paper);
  font-family: "DM Sans", sans-serif;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button,
a,
label,
select,
input {
  touch-action: manipulation;
}

button,
select,
input {
  font: inherit;
}

a {
  color: inherit;
}

:focus-visible {
  outline: 3px solid rgba(232, 134, 74, 0.72);
  outline-offset: 3px;
}

.site-header {
  position: sticky;
  z-index: 1000;
  top: 0;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  min-height: 64px;
  padding: 0 clamp(18px, 4vw, 64px);
  border-bottom: 1px solid var(--line);
  background: rgba(250, 248, 241, 0.9);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(20px) saturate(140%);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  width: fit-content;
  color: var(--forest-dark);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.brand-mark {
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  display: block;
  object-fit: contain;
  overflow: visible;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(18, 49, 39, 0.16);
}

.map-main {
  height: calc(100dvh - 64px);
  overflow: hidden;
}

nav {
  display: flex;
  gap: 4px;
  padding: 4px;
  border: 1px solid rgba(22, 35, 29, 0.08);
  border-radius: 999px;
  background: rgba(255, 253, 248, 0.62);
}

nav a {
  position: relative;
  padding: 7px 13px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: color 160ms ease, background 160ms ease;
}

nav a::after {
  display: none;
}

nav a:hover {
  color: var(--forest-dark);
  background: rgba(30, 73, 56, 0.07);
}

nav a[aria-current="page"] {
  color: var(--white);
  background: var(--forest-dark);
  box-shadow: 0 4px 12px rgba(18, 49, 39, 0.18);
}

.header-action {
  justify-self: end;
  padding: 9px 15px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--forest-dark);
  background: rgba(255, 253, 248, 0.6);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: color 160ms ease, background 160ms ease, border-color 160ms ease;
}

.header-action:hover,
.header-action[aria-current="page"] {
  border-color: var(--forest-dark);
  color: var(--white);
  background: var(--forest-dark);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(390px, 0.95fr);
  min-height: calc(100vh - 76px);
}

.hero-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 8vw 7vw;
}

.eyebrow {
  margin: 0 0 18px;
  color: var(--forest);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2 {
  font-family: "Newsreader", serif;
  font-weight: 600;
  line-height: 0.98;
  letter-spacing: -0.035em;
}

h1 {
  max-width: 760px;
  margin-bottom: 28px;
  font-size: clamp(64px, 7vw, 112px);
}

h1 em {
  color: var(--forest);
  font-weight: 500;
}

h2 {
  margin-bottom: 0;
  font-size: clamp(42px, 5vw, 72px);
}

.hero-intro {
  max-width: 620px;
  margin-bottom: 34px;
  color: var(--muted);
  font-size: clamp(17px, 1.5vw, 21px);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
  border: 0;
  border-radius: 999px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.button:hover {
  transform: translateY(-2px);
}

.button-primary {
  color: var(--white);
  background: var(--forest);
  box-shadow: 0 10px 24px rgba(30, 73, 56, 0.22);
}

.button-primary:hover {
  background: var(--forest-dark);
}

.button-quiet {
  border: 1px solid var(--line);
  color: var(--forest);
  background: rgba(255, 255, 255, 0.4);
}

.hero-stats {
  display: flex;
  gap: 28px;
  margin-top: 52px;
  color: var(--muted);
  font-size: 13px;
}

.hero-stats span {
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.hero-stats strong {
  color: var(--forest-dark);
  font-family: "Newsreader", serif;
  font-size: 30px;
}

.hero-visual {
  position: relative;
  min-height: 620px;
  overflow: hidden;
  background:
    linear-gradient(180deg, transparent 48%, rgba(12, 31, 23, 0.6) 100%),
    url("https://images.unsplash.com/photo-1448375240586-882707db888b?auto=format&fit=crop&w=1400&q=86") center/cover;
}

.hero-visual::before {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(115deg, rgba(215, 236, 145, 0.12), transparent 48%);
}

.hero-photo-credit {
  position: absolute;
  right: 22px;
  bottom: 18px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.weather-card {
  position: absolute;
  bottom: 54px;
  left: -46px;
  display: flex;
  align-items: center;
  gap: 16px;
  max-width: 360px;
  padding: 18px 22px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 18px;
  color: var(--white);
  background: rgba(18, 49, 39, 0.85);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

.weather-icon {
  color: var(--lime);
  font-size: 36px;
}

.weather-card small,
.weather-card strong {
  display: block;
}

.weather-card small {
  margin-bottom: 2px;
  opacity: 0.72;
}

.weather-card strong {
  line-height: 1.25;
}

.map-section,
.country-section,
.source-section,
.principles {
  padding: 110px 4vw;
}

.map-section {
  position: relative;
  height: 100%;
  min-height: 0;
  scroll-margin-top: 64px;
  padding: 0;
  color: var(--white);
  background: var(--forest-dark);
}

.section-heading {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(280px, 0.6fr);
  align-items: end;
  gap: 80px;
  margin-bottom: 48px;
}

.section-heading > p {
  margin-bottom: 4px;
  color: var(--muted);
}

.map-heading .eyebrow {
  color: var(--lime);
}

.map-heading > p {
  color: rgba(255, 255, 255, 0.63);
}

.map-shell {
  position: relative;
  height: 100%;
  min-height: 0;
  overflow: hidden;
  overscroll-behavior: none;
  background: #1b382d;
}

.map-sidebar {
  position: fixed;
  z-index: 1300;
  top: 136px;
  height: calc(100dvh - 156px);
  bottom: 20px;
  left: 20px;
  width: min(360px, calc(100% - 40px));
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  overflow: hidden;
  overscroll-behavior: contain;
  touch-action: pan-y pinch-zoom;
  -webkit-overflow-scrolling: touch;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 22px;
  color: var(--white);
  background: #0e2b22;
  box-shadow: 0 24px 70px rgba(4, 18, 13, 0.38);
  transform: translateX(calc(-100% - 40px));
  visibility: hidden;
  opacity: 0;
  transition: transform 220ms ease, opacity 180ms ease, visibility 220ms;
}

.map-sidebar::backdrop {
  background: rgba(5, 20, 14, 0.34);
  backdrop-filter: none;
}

.map-sidebar.is-open {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  transform: translateX(0);
  visibility: visible;
  opacity: 1;
}

.map-sidebar.no-transition {
  transition: none;
}

.overlay-panel-heading {
  position: relative;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin: 0;
  padding: 22px 22px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 22px 22px 0 0;
  background: rgba(14, 43, 34, 0.97);
  backdrop-filter: blur(22px) saturate(130%);
}

.overlay-panel-heading span,
.overlay-panel-heading strong {
  display: block;
}

.overlay-panel-heading span {
  margin-bottom: 2px;
  color: var(--lime);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.overlay-panel-heading strong {
  font-family: "Newsreader", serif;
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -0.025em;
}

.overlay-close {
  display: grid;
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.17);
  border-radius: 50%;
  color: var(--white);
  background: rgba(255, 255, 255, 0.08);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.map-actions {
  position: absolute;
  z-index: 1200;
  top: 18px;
  left: 20px;
  display: flex;
  gap: 8px;
}

.map-decision-actions {
  position: absolute;
  z-index: 1200;
  bottom: 20px;
  left: 20px;
  display: flex;
  align-items: center;
  gap: 9px;
}

.map-location-button,
.tonight-button {
  border: 1px solid rgba(255, 255, 255, 0.7);
  color: var(--white);
  background: rgba(18, 49, 39, 0.94);
  box-shadow: 0 12px 32px rgba(4, 18, 13, 0.28);
  backdrop-filter: blur(14px);
  cursor: pointer;
}

.map-location-button {
  display: grid;
  width: 46px;
  height: 46px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  font-size: 23px;
}

.map-location-button.is-loading span {
  opacity: 0.72;
}

.map-location-button.has-location {
  color: var(--forest-dark);
  border-color: var(--lime);
  background: var(--lime);
}

.map-location-button:disabled,
.candidate-location-button:disabled {
  cursor: progress;
  opacity: 0.78;
}

.location-status {
  position: absolute;
  z-index: 1200;
  bottom: 76px;
  left: 20px;
  max-width: min(410px, calc(100% - 40px));
  margin: 0;
  padding: 11px 13px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 14px;
  color: var(--white);
  background: rgba(18, 49, 39, 0.94);
  box-shadow: 0 14px 36px rgba(4, 18, 13, 0.3);
  backdrop-filter: blur(14px);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.35;
}

.location-status.is-success {
  color: var(--forest-dark);
  border-color: rgba(222, 245, 143, 0.82);
  background: rgba(222, 245, 143, 0.94);
}

.location-status.is-warning {
  border-color: rgba(246, 183, 111, 0.42);
  background: rgba(74, 50, 27, 0.96);
}








.tonight-button {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  gap: 9px;
  padding: 0 17px;
  border-radius: 999px;
}

.tonight-button > span {
  color: var(--lime);
  font-size: 18px;
}

.tonight-button strong {
  font-size: 12px;
  font-weight: 800;
}

.map-overlay-button {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  gap: 8px;
  padding: 0 16px;
  border: 1px solid rgba(255, 255, 255, 0.64);
  border-radius: 999px;
  color: var(--white);
  background: rgba(18, 49, 39, 0.92);
  box-shadow: 0 10px 30px rgba(4, 18, 13, 0.28);
  backdrop-filter: blur(14px);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 160ms ease, background 160ms ease;
}

.map-overlay-button:hover {
  transform: translateY(-1px);
  background: #0b2b22;
}

.map-overlay-button span {
  color: var(--lime);
  font-size: 18px;
}

.map-overlay-scrim {
  position: absolute;
  z-index: 1250;
  inset: 0;
  background: rgba(5, 20, 14, 0.16);
}

.filter-block {
  margin: 0 0 22px;
  padding: 0 0 22px;
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.11);
}

.filter-block > label,
.filter-block legend {
  display: block;
  margin-bottom: 12px;
  color: rgba(255, 255, 255, 0.58);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

select {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  color: var(--white);
  background: #23483a;
  outline: none;
}

.country-filter {
  display: grid;
  gap: 8px;
}

.country-note {
  margin-top: -6px;
}

.country-filter-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.country-filter-actions button {
  min-height: 32px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 10px;
  color: rgba(255, 255, 255, 0.78);
  background: rgba(255, 255, 255, 0.055);
  font-size: 10px;
  font-weight: 800;
  cursor: pointer;
}

.country-filter-actions button:hover {
  border-color: rgba(214, 236, 145, 0.42);
  color: var(--lime);
  background: rgba(214, 236, 145, 0.1);
}

.country-filter-actions button.is-active {
  border-color: rgba(214, 236, 145, 0.6);
  color: var(--forest-dark);
  background: var(--lime);
}

.country-toggle-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 5px;
}

.country-toggle-grid[hidden] {
  display: none;
}

.country-chip {
  position: relative;
  display: block;
  cursor: pointer;
}

.country-chip input {
  position: absolute;
  inset: 0;
  opacity: 0;
  z-index: 1;
  cursor: pointer;
}

.country-chip span {
  display: grid;
  min-height: 30px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 10px;
  color: rgba(255, 255, 255, 0.42);
  background: rgba(255, 255, 255, 0.035);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.04em;
  transition: color 160ms ease, background 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.country-chip input:focus-visible + span {
  outline: 3px solid rgba(232, 134, 74, 0.72);
  outline-offset: 2px;
}

.country-chip input:checked + span {
  border-color: rgba(214, 236, 145, 0.5);
  color: var(--lime);
  background: rgba(214, 236, 145, 0.1);
  box-shadow: inset 0 0 0 1px rgba(214, 236, 145, 0.08);
}

.country-chip:hover span {
  transform: translateY(-1px);
}

.check-row {
  display: flex !important;
  align-items: center;
  gap: 9px;
  min-height: 44px;
  margin: 2px 0 !important;
  color: rgba(255, 255, 255, 0.82) !important;
  font-size: 14px !important;
  font-weight: 500 !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
  cursor: pointer;
}

.check-row input {
  width: 16px;
  height: 16px;
  accent-color: var(--lime);
}

.check-row:has(input:disabled) {
  opacity: 0.48;
}

.check-row small {
  margin-left: auto;
  color: rgba(255, 255, 255, 0.48);
  font-size: 10px;
  font-weight: 500;
}

.check-row-nested {
  padding-left: 25px;
  color: rgba(255, 255, 255, 0.68) !important;
}

.legend-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
}

.legend-ring {
  width: 12px;
  height: 12px;
  border: 2px solid currentColor;
  border-radius: 50%;
  background: transparent;
}

.ring-warmshowers { color: #d58455; }
.ring-wtmg { color: #d96f9b; }
.ring-vodf { color: #4b85bd; }

.dot-wild { background: var(--moss); }
.dot-designated { background: var(--orange); }
.dot-hut { background: var(--blue); }
.dot-host { background: var(--purple); }
.dot-ask { background: #d9c990; }
.dot-camping { background: #8f6a42; }

.route-filter {
  display: grid;
  gap: 12px;
  scroll-margin-top: 12px;
  transition: background 220ms ease, box-shadow 220ms ease;
}

.route-filter.is-highlighted {
  margin-right: -12px;
  margin-left: -12px;
  padding: 14px 12px 26px;
  border-radius: 14px;
  background: rgba(214, 236, 145, 0.1);
  box-shadow: inset 0 0 0 1px rgba(214, 236, 145, 0.4);
}

.route-filter .gpx-button {
  margin-top: 0;
}

.route-distance-control {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 4px;
}

.route-distance-control label {
  color: rgba(255, 255, 255, 0.7);
  font-size: 11px;
}

.route-distance-control output {
  min-width: 50px;
  color: var(--lime);
  font-size: 12px;
  font-weight: 700;
  text-align: right;
}

.route-distance {
  width: 100%;
  accent-color: var(--lime);
  cursor: pointer;
}

.route-distance:disabled {
  cursor: default;
  opacity: 0.42;
}

.route-source-link {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--lime);
  font-size: 11px;
  font-weight: 700;
  text-decoration: none;
}

.route-source-link span {
  font-size: 15px;
}

.route-library {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.045);
}

.route-library-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: rgba(255, 255, 255, 0.56);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.route-library-heading small {
  color: var(--lime);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: none;
}

.route-list {
  display: grid;
  gap: 6px;
}

.route-list-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: center;
  padding: 8px;
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.06);
}

.route-list-item label {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px;
  align-items: center;
  min-width: 0;
  color: rgba(255, 255, 255, 0.84);
  cursor: pointer;
}

.route-list-item input {
  accent-color: var(--lime);
}

.route-list-item span {
  display: grid;
  min-width: 0;
  gap: 1px;
}

.route-list-item strong,
.route-list-item small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.route-list-item strong {
  font-size: 11px;
}

.route-list-item small {
  color: rgba(255, 255, 255, 0.5);
  font-size: 9px;
  font-weight: 700;
}

.route-list-item button {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 50%;
  color: rgba(255, 255, 255, 0.72);
  background: rgba(255, 255, 255, 0.04);
  cursor: pointer;
}

.route-list-item button:hover {
  color: var(--forest-dark);
  background: var(--lime);
}

.route-presets {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}

.route-presets button {
  min-height: 32px;
  padding: 0 4px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 9px;
  color: rgba(255, 255, 255, 0.7);
  background: rgba(255, 255, 255, 0.05);
  font-size: 10px;
  font-weight: 700;
  cursor: pointer;
}

.route-presets button:hover,
.route-presets button.is-active {
  border-color: var(--lime);
  color: var(--forest-dark);
  background: var(--lime);
}

.route-presets button:disabled {
  cursor: default;
  opacity: 0.35;
}

.route-active-row {
  margin: 0 !important;
}

.route-clear {
  width: fit-content;
  padding: 0;
  border: 0;
  color: rgba(255, 255, 255, 0.68);
  background: transparent;
  font-size: 11px;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.route-clear:disabled {
  cursor: default;
  opacity: 0.35;
}

.osm-button {
  width: 100%;
  min-height: 44px;
  padding: 0 14px;
  font-size: 12px;
  line-height: 1.3;
}

.gpx-button {
  width: 100%;
  min-height: 48px;
  margin-top: 9px;
  border-color: transparent;
  color: var(--forest-dark);
  background: var(--lime);
  font-size: 14px;
}

.source-shortcuts {
  display: grid;
  gap: 6px;
  margin: 14px 2px 0;
  color: rgba(255, 255, 255, 0.64);
  font-size: 10px;
}

.source-shortcuts summary {
  width: fit-content;
  color: var(--lime);
  font-weight: 800;
  cursor: pointer;
}

.source-shortcuts a {
  color: rgba(255, 255, 255, 0.7);
  text-underline-offset: 3px;
}

.microcopy {
  margin: 10px 2px 0;
  color: rgba(255, 255, 255, 0.5);
  font-size: 11px;
}

.network-note {
  line-height: 1.45;
}

.map-frame {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  overscroll-behavior: none;
  touch-action: none;
}

#map {
  width: 100%;
  height: 100%;
  min-height: 0;
  overscroll-behavior: none;
  touch-action: none;
  background: #d6ddd3;
}

.map-data-hint {
  position: absolute;
  z-index: 510;
  right: 16px;
  bottom: 16px;
  max-width: min(300px, calc(100% - 32px));
  padding: 8px 11px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 999px;
  color: var(--forest-dark);
  background: rgba(255, 253, 248, 0.94);
  box-shadow: 0 8px 20px rgba(18, 31, 25, 0.14);
  font-size: 9px;
  font-weight: 700;
  line-height: 1.25;
}

.map-count-cluster {
  display: grid;
  width: 100%;
  height: 100%;
  place-items: center;
  border: 2px solid var(--white);
  border-radius: 50%;
  color: var(--white);
  background: var(--forest-dark);
  font: 700 12px/1 system-ui, sans-serif;
}

.map-count-cluster strong {
  font: inherit;
  line-height: 1;
}

.host-map-pin {
  display: grid;
  width: 27px;
  height: 27px;
  place-items: center;
  border: 2px solid rgba(255, 255, 255, 0.95);
  border-radius: 50% 50% 50% 0;
  color: white;
  box-shadow: 0 5px 13px rgba(18, 31, 25, 0.3);
  font-size: 10px;
  font-weight: 800;
  transform: rotate(-45deg);
}

.host-map-pin span {
  transform: rotate(45deg);
}

.pin-vodf { background: #3978b0; }
.pin-wtmg { background: #cb5e8b; }

.coverage-label {
  display: grid;
  min-width: 34px;
  height: 34px;
  place-items: center;
  border: 2px solid rgba(255, 255, 255, 0.9);
  border-radius: 999px;
  color: white;
  box-shadow: 0 5px 14px rgba(18, 31, 25, 0.24);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.03em;
}

.coverage-warmshowers { background: #c87345; }
.coverage-wtmg { background: #cb5e8b; }
.coverage-vodf { background: #3978b0; }

.place-panel {
  position: absolute;
  z-index: 1300;
  top: 20px;
  right: 20px;
  bottom: 20px;
  width: min(380px, calc(100% - 40px));
  padding: 28px 24px;
  overflow-y: auto;
  overscroll-behavior: contain;
  touch-action: pan-y pinch-zoom;
  -webkit-overflow-scrolling: touch;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 22px;
  background: #0e2b22;
  box-shadow: 0 28px 80px rgba(4, 18, 13, 0.42);
  transform: translateX(calc(100% + 40px));
  visibility: hidden;
  opacity: 0;
  transition: transform 220ms ease, opacity 180ms ease, visibility 220ms;
}

.place-panel.is-open {
  transform: translateX(0);
  visibility: visible;
  opacity: 1;
}

.candidate-panel {
  position: absolute;
  z-index: 1310;
  bottom: 20px;
  left: 20px;
  width: min(430px, calc(100% - 40px));
  max-height: min(76vh, 720px);
  padding: 24px;
  overflow-y: auto;
  overscroll-behavior: contain;
  touch-action: pan-y pinch-zoom;
  -webkit-overflow-scrolling: touch;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 22px;
  color: var(--white);
  background: #0e2b22;
  box-shadow: 0 28px 80px rgba(4, 18, 13, 0.44);
  transform: translateY(calc(100% + 40px));
  visibility: hidden;
  opacity: 0;
  transition: transform 220ms ease, opacity 180ms ease, visibility 220ms;
}

.candidate-panel.is-open {
  transform: translateY(0);
  visibility: visible;
  opacity: 1;
}

.candidate-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.candidate-heading > div {
  display: grid;
  gap: 1px;
}

.candidate-heading span {
  color: var(--lime);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.candidate-heading strong {
  font-family: "Newsreader", serif;
  font-size: 28px;
  line-height: 1;
}

.candidate-close {
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 50%;
  color: var(--white);
  background: rgba(255, 255, 255, 0.07);
  font-size: 22px;
  cursor: pointer;
}

.candidate-intro {
  margin: 14px 0 17px;
  color: rgba(255, 255, 255, 0.58);
  font-size: 11px;
  line-height: 1.5;
}

.candidate-location-tools {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  align-items: center;
  margin-bottom: 14px;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.045);
}

.candidate-location-button {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  gap: 7px;
  padding: 0 12px;
  border: 0;
  border-radius: 999px;
  color: var(--forest-dark);
  background: var(--lime);
  font-size: 10px;
  font-weight: 900;
  cursor: pointer;
}

#candidate-location-note {
  color: rgba(255, 255, 255, 0.62);
  font-size: 10px;
  font-weight: 700;
  line-height: 1.35;
}

.candidate-horizon {
  display: grid;
  grid-template-columns: 1fr repeat(3, auto);
  gap: 6px;
  align-items: center;
  margin-bottom: 16px;
  padding: 8px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.055);
}

.candidate-horizon > span {
  padding-left: 4px;
  color: rgba(255, 255, 255, 0.55);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.candidate-horizon button {
  min-height: 30px;
  padding: 0 10px;
  border: 0;
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.66);
  background: transparent;
  font-size: 10px;
  font-weight: 800;
  cursor: pointer;
}

.candidate-horizon button.is-active {
  color: var(--forest-dark);
  background: var(--lime);
}

.candidate-list {
  display: grid;
  gap: 7px;
}

.candidate-item {
  display: grid;
  grid-template-columns: 27px 1fr 18px;
  gap: 10px;
  align-items: center;
  width: 100%;
  padding: 12px 10px;
  border: 1px solid transparent;
  border-radius: 13px;
  color: var(--white);
  background: rgba(255, 255, 255, 0.055);
  text-align: left;
  cursor: pointer;
  transition: border-color 150ms ease, background 150ms ease;
}

.candidate-item:hover {
  border-color: rgba(214, 236, 145, 0.4);
  background: rgba(255, 255, 255, 0.09);
}

.candidate-number {
  display: grid;
  width: 27px;
  height: 27px;
  place-items: center;
  border-radius: 50%;
  color: var(--forest-dark);
  background: var(--lime);
  font-size: 10px;
  font-weight: 800;
}

.candidate-copy {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.candidate-copy > strong {
  overflow: hidden;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.candidate-copy small {
  color: var(--lime);
  font-size: 10px;
  font-weight: 700;
}

.candidate-copy > span {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow: hidden;
  color: rgba(255, 255, 255, 0.5);
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.candidate-type {
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  border-radius: 50%;
}

.candidate-arrow {
  color: rgba(255, 255, 255, 0.46);
  font-size: 16px;
}

.candidate-empty {
  display: grid;
  gap: 5px;
  padding: 22px 18px;
  border: 1px dashed rgba(255, 255, 255, 0.16);
  border-radius: 13px;
  text-align: center;
}

.candidate-empty strong {
  font-size: 12px;
}

.candidate-empty span {
  color: rgba(255, 255, 255, 0.5);
  font-size: 10px;
  line-height: 1.5;
}

.place-panel-close {
  position: sticky;
  z-index: 2;
  top: 0;
  float: right;
  margin: -12px -8px 8px 10px;
}

.empty-state {
  display: grid;
  height: 100%;
  place-content: center;
  text-align: center;
}

.empty-icon {
  color: var(--lime);
  font-size: 48px;
}

.empty-state h3 {
  margin: 10px 0 6px;
}

.empty-state p {
  max-width: 220px;
  color: rgba(255, 255, 255, 0.55);
  font-size: 13px;
}

.place-photo-wrap {
  position: relative;
  width: calc(100% + 48px);
  margin: -28px -24px 24px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.06);
}

.place-photo {
  display: block;
  width: 100%;
  height: 210px;
  object-fit: cover;
}

.place-photo-wrap figcaption {
  position: absolute;
  right: 10px;
  bottom: 9px;
  margin: 0;
  padding: 4px 7px;
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.82);
  background: rgba(9, 29, 21, 0.72);
  font-size: 9px;
  backdrop-filter: blur(8px);
}

.place-panel h3 {
  margin-bottom: 6px;
  font-family: "Newsreader", serif;
  font-size: 29px;
  line-height: 1.05;
}

.place-location {
  margin-bottom: 18px;
  color: rgba(255, 255, 255, 0.56);
  font-size: 12px;
}

.place-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 20px;
}

.badge {
  padding: 5px 9px;
  border-radius: 999px;
  color: var(--ink);
  background: var(--lime);
  font-size: 10px;
  font-weight: 700;
}

.badge-muted {
  color: rgba(255, 255, 255, 0.72);
  background: rgba(255, 255, 255, 0.1);
}

.place-description {
  color: rgba(255, 255, 255, 0.74);
  font-size: 13px;
}

.place-decision {
  margin: 0 0 14px;
  padding: 11px 12px;
  border-left: 3px solid var(--lime);
  color: var(--white);
  background: rgba(215, 236, 145, 0.1);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.4;
}

.place-facts {
  margin: 22px 0;
  padding: 0;
  list-style: none;
}

.place-facts li {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 12px;
}

.place-facts span {
  color: rgba(255, 255, 255, 0.48);
}

.place-map-actions {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 7px;
  margin: -5px 0 9px;
}

.place-map-actions a {
  display: flex;
  min-height: 40px;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 0 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 11px;
  color: rgba(255, 255, 255, 0.78);
  background: rgba(255, 255, 255, 0.06);
  font-size: 10px;
  font-weight: 700;
  text-decoration: none;
}

.place-map-actions a:hover {
  border-color: var(--lime);
  color: var(--lime);
}

.place-link {
  width: 100%;
  min-height: 43px;
  font-size: 12px;
}

.place-caution {
  margin-top: 14px;
  padding: 12px;
  border-left: 3px solid var(--orange);
  color: rgba(255, 255, 255, 0.65);
  background: rgba(232, 134, 74, 0.09);
  font-size: 11px;
}

.leaflet-container {
  font-family: "DM Sans", sans-serif;
}

.leaflet-control-attribution {
  font-size: 9px;
}

.sleep-marker {
  display: grid;
  width: 32px !important;
  height: 32px !important;
  place-items: center;
  border: 2px solid var(--white);
  border-radius: 50%;
}

.sleep-marker span {
  color: white;
  font: 700 12px system-ui, sans-serif;
}

.marker-wild { background: #668c50; }
.marker-designated { background: #dc7740; }
.marker-hut { background: #4d7e8d; }
.marker-host { background: #7c6894; }
.marker-ask { background: #aa965c; }
.marker-camping { background: #7b5b35; }

.country-section {
  background: var(--paper);
}

.country-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.country-card {
  display: flex;
  min-height: 430px;
  flex-direction: column;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 253, 248, 0.56);
  transition: transform 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

.country-card:hover {
  transform: translateY(-5px);
  background: var(--white);
  box-shadow: var(--shadow);
}

.country-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 52px;
}

.country-flag {
  font-size: 26px;
}

.status-pill {
  padding: 5px 9px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
}

.status-good { color: #1d563e; background: #dcebc9; }
.status-mixed { color: #765226; background: #f4e4bf; }
.status-strict { color: #873c2e; background: #f1d3c8; }

.country-card h3 {
  margin-bottom: 10px;
  font-family: "Newsreader", serif;
  font-size: 34px;
}

.country-summary {
  color: var(--muted);
  font-size: 14px;
}

.country-rules {
  margin: 20px 0 26px;
  padding: 0;
  list-style: none;
}

.country-rules li {
  position: relative;
  margin: 9px 0;
  padding-left: 17px;
  font-size: 12px;
}

.country-rules li::before {
  position: absolute;
  top: 7px;
  left: 0;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  content: "";
  background: var(--moss);
}

.country-source {
  margin-top: auto;
  color: var(--forest);
  font-size: 12px;
  font-weight: 700;
  text-underline-offset: 4px;
}

.source-section {
  background: var(--paper-deep);
}

.source-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
}

.source-card {
  display: flex;
  min-height: 300px;
  flex-direction: column;
  padding: 24px;
  border-radius: 14px;
  color: var(--white);
  background: var(--forest);
  text-decoration: none;
  transition: transform 180ms ease, filter 180ms ease;
}

.source-card:nth-child(2) { background: #4d6758; }
.source-card:nth-child(3) { background: #6b654c; }
.source-card:nth-child(4) { background: #566e7b; }
.source-card:nth-child(5) { background: #574c68; }

.source-card:hover {
  transform: translateY(-5px);
  filter: brightness(1.08);
}

.source-icon {
  display: grid;
  width: 42px;
  height: 42px;
  margin-bottom: 48px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 50%;
  font-family: "Newsreader", serif;
  font-size: 20px;
}

.source-card h3 {
  margin-bottom: 8px;
  font-size: 20px;
  line-height: 1.2;
}

.source-card p {
  color: rgba(255, 255, 255, 0.66);
  font-size: 12px;
}

.source-meta {
  display: flex;
  justify-content: space-between;
  margin-top: auto;
  color: var(--lime);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.principles {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 9vw;
  color: var(--white);
  background: #172b23;
}

.principles .eyebrow {
  color: var(--lime);
}

.principles h2 {
  max-width: 560px;
}

.principles ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

.principles li {
  display: grid;
  grid-template-columns: 42px 1fr;
  padding: 20px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.66);
  font-size: 13px;
}

.principles li span {
  grid-row: span 2;
  color: var(--lime);
  font-family: "Newsreader", serif;
}

.principles li strong {
  color: var(--white);
  font-size: 15px;
}

footer {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 20px;
  padding: 30px 4vw;
  color: var(--muted);
  background: var(--paper);
  font-size: 10px;
}

footer p {
  margin: 0;
}

footer p:last-child {
  justify-self: end;
}

dialog {
  width: min(600px, calc(100% - 32px));
  padding: 42px;
  border: 0;
  border-radius: 18px;
  color: var(--ink);
  background: var(--white);
  box-shadow: 0 30px 100px rgba(0, 0, 0, 0.35);
}

dialog::backdrop {
  background: rgba(10, 25, 19, 0.66);
  backdrop-filter: blur(5px);
}

dialog h2 {
  margin-bottom: 22px;
  font-size: 48px;
}

.dialog-close {
  position: absolute;
  top: 14px;
  right: 16px;
  border: 0;
  color: var(--muted);
  background: transparent;
  font-size: 28px;
  cursor: pointer;
}

.dialog-note {
  margin-top: 24px;
  padding: 16px;
  border-left: 3px solid var(--moss);
  background: var(--paper);
  font-size: 13px;
}

.dialog-note strong {
  display: block;
  margin-bottom: 4px;
}

body.route-sources-page,
body.compact-page-body {
  overflow-x: clip;
}

.compact-main {
  display: grid;
  max-width: 1380px;
  min-height: calc(100dvh - 64px);
  margin: 0 auto;
  gap: 28px;
  padding: clamp(28px, 4vw, 48px) clamp(18px, 4vw, 54px) 64px;
}

.compact-header {
  display: grid;
  grid-template-columns: minmax(230px, 0.72fr) minmax(300px, 1fr);
  align-items: end;
  gap: clamp(18px, 4vw, 54px);
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(22, 35, 29, 0.12);
}

.compact-header h1 {
  margin: 0;
  font-size: clamp(34px, 4vw, 56px);
  line-height: 0.95;
}

.compact-header p:last-child {
  max-width: 760px;
  margin: 0;
  color: var(--muted);
  font-size: clamp(13px, 1.25vw, 16px);
  font-weight: 650;
  line-height: 1.45;
}

.source-table-grid {
  display: grid;
  min-height: 0;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  align-items: start;
}

.source-table-card,
.rules-principles {
  min-height: 0;
  padding: 24px;
  border: 1px solid rgba(22, 35, 29, 0.11);
  border-radius: 14px;
  background: rgba(255, 253, 248, 0.9);
  box-shadow: 0 10px 24px rgba(18, 49, 39, 0.055);
  min-width: 0;
}

.source-table-card h2,
.rules-principles h2 {
  margin: 0 0 10px;
  color: var(--forest-dark);
  font-size: 24px;
}

.source-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.source-table th,
.source-table td {
  padding: 14px 8px;
  border-bottom: 1px solid rgba(22, 35, 29, 0.09);
  text-align: left;
  vertical-align: middle;
}

.source-table th {
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.source-table td {
  color: var(--ink);
  font-weight: 650;
}

.source-table td:first-child,
.source-table th:first-child {
  padding-left: 0;
}

.source-table tr:last-child td {
  border-bottom: 0;
}

.source-table a {
  color: var(--forest-dark);
  font-weight: 900;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

.networks-page-body .source-table a {
  overflow-wrap: normal;
}

@media (max-width: 1024px) {
  .networks-page-body .source-table-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

.rules-layout {
  display: grid;
  min-height: 0;
  grid-template-columns: minmax(210px, 0.34fr) minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.rules-principles {
  background: #102f25;
  color: var(--white);
}

.rules-principles h2 {
  color: var(--lime);
}

.rules-principles ul {
  display: grid;
  gap: 10px;
  margin: 0;
  padding-left: 18px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.6;
}

.rules-table .status-chip {
  display: inline-flex;
  white-space: nowrap;
}

.info-main {
  min-height: calc(100vh - 64px);
  padding: clamp(38px, 6vw, 82px) clamp(18px, 5vw, 72px) clamp(72px, 9vw, 124px);
}

.info-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(260px, 0.8fr);
  gap: clamp(36px, 7vw, 96px);
  align-items: end;
  max-width: 1200px;
  min-height: 330px;
  margin: 0 auto clamp(22px, 3vw, 36px);
  padding: clamp(34px, 5vw, 68px);
  overflow: hidden;
  border-radius: var(--radius-lg);
  color: var(--white);
  background:
    radial-gradient(circle at 88% 18%, rgba(214, 236, 145, 0.2), transparent 14rem),
    linear-gradient(135deg, #0b2b22, #1f4b3a);
  box-shadow: var(--shadow);
}

.info-hero::after {
  position: absolute;
  right: -70px;
  bottom: -110px;
  width: 280px;
  height: 280px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 50%;
  content: "";
  box-shadow: 0 0 0 34px rgba(255, 255, 255, 0.025), 0 0 0 68px rgba(255, 255, 255, 0.018);
}

.info-hero > * {
  position: relative;
  z-index: 1;
}

.info-hero .eyebrow {
  color: var(--lime);
}

.info-hero h1 {
  margin-bottom: 0;
  max-width: 680px;
  font-size: clamp(48px, 6.4vw, 84px);
  line-height: 0.94;
}

.info-hero > p {
  margin-bottom: 8px;
  color: rgba(255, 255, 255, 0.72);
  font-size: clamp(15px, 1.5vw, 18px);
  line-height: 1.7;
}

.info-content {
  max-width: 1200px;
  margin: 0 auto;
}

.info-card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.info-card {
  display: flex;
  min-height: 330px;
  flex-direction: column;
  padding: clamp(26px, 3vw, 36px);
  border: 1px solid rgba(22, 35, 29, 0.11);
  border-radius: 22px;
  background: rgba(255, 253, 248, 0.9);
  box-shadow: 0 12px 34px rgba(18, 49, 39, 0.06);
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.info-card:hover {
  transform: translateY(-3px);
  border-color: rgba(30, 73, 56, 0.25);
  box-shadow: 0 20px 46px rgba(18, 49, 39, 0.1);
}

.card-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 30px;
}

.country-code,
.network-monogram {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 13px;
  color: var(--white);
  background: var(--forest-dark);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.network-monogram {
  border-radius: 50%;
  font-size: 15px;
  letter-spacing: 0;
}

.network-wtmg { background: #b84f7b; }
.network-vodf { background: #3978b0; }
.network-ws { background: #c66f3f; }
.network-open { background: #2f7958; }

.status-chip {
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.035em;
  text-transform: uppercase;
}

.info-card h2 {
  margin-bottom: 14px;
  font-size: clamp(31px, 3vw, 40px);
  line-height: 1;
}

.info-card h3 {
  margin: 22px 0 8px;
  color: var(--forest);
  font-size: 15px;
}

.info-card p,
.info-card li {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
}

.info-card ul {
  display: grid;
  gap: 8px;
  margin: 10px 0 8px;
  padding: 0;
  list-style: none;
}

.info-card li {
  position: relative;
  padding-left: 18px;
}

.info-card li::before {
  position: absolute;
  top: 0.72em;
  left: 0;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--moss);
  content: "";
}

.info-link {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 12px;
  margin-top: auto;
  padding-top: 22px;
  color: var(--forest-dark);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}

.info-link span {
  transition: transform 160ms ease;
}

.info-link:hover span {
  transform: translateX(3px);
}

.info-note {
  padding: clamp(30px, 5vw, 58px);
  border-radius: 24px;
  color: var(--white);
  background: var(--forest-dark);
  box-shadow: var(--shadow-sm);
}

.info-note h2 {
  margin-bottom: 18px;
  font-size: clamp(38px, 5vw, 58px);
}

.info-note p {
  color: rgba(255, 255, 255, 0.68);
  line-height: 1.75;
}

.info-note .eyebrow {
  color: var(--lime);
}

.info-note .info-link {
  color: var(--lime);
}

.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
  gap: 18px;
}

.about-principles {
  display: grid;
  gap: 12px;
}

.about-principles article {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 18px;
  align-items: start;
  padding: 24px;
  border: 1px solid rgba(22, 35, 29, 0.11);
  border-radius: 20px;
  background: rgba(255, 253, 248, 0.9);
  box-shadow: var(--shadow-sm);
}

.about-principles article > span {
  color: var(--orange);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.about-principles h3 {
  margin: 0 0 5px;
  font-family: "Newsreader", serif;
  font-size: 24px;
  letter-spacing: -0.02em;
}

.about-principles p,
.data-note p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
}

.data-note {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 0.75fr 1.25fr;
  gap: 50px;
  align-items: end;
  padding: clamp(30px, 5vw, 54px);
  border: 1px solid rgba(22, 35, 29, 0.11);
  border-radius: 24px;
  background: var(--surface-soft);
}

.data-note .eyebrow {
  grid-column: 1 / -1;
  margin-bottom: -32px;
}

.data-note h2 {
  margin: 0;
  font-size: clamp(36px, 5vw, 56px);
}

.route-sources-main {
  min-height: calc(100vh - 64px);
  padding: clamp(28px, 5vw, 64px) clamp(18px, 5vw, 72px) clamp(72px, 9vw, 118px);
}

.route-sources-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
  gap: clamp(36px, 7vw, 96px);
  align-items: end;
  max-width: 1320px;
  min-height: 360px;
  margin: 0 auto clamp(34px, 5vw, 62px);
  padding: clamp(36px, 6vw, 78px);
  overflow: hidden;
  border-radius: 30px;
  color: var(--white);
  background:
    radial-gradient(circle at 82% 14%, rgba(214, 236, 145, 0.22), transparent 18rem),
    linear-gradient(135deg, #0b2b22 0%, #1f4b3a 64%, #315e46 100%);
  box-shadow: var(--shadow);
}

.route-sources-hero::after {
  position: absolute;
  right: -55px;
  bottom: -120px;
  width: 300px;
  height: 300px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 50%;
  content: "";
  box-shadow: 0 0 0 38px rgba(255, 255, 255, 0.025), 0 0 0 76px rgba(255, 255, 255, 0.016);
}

.route-sources-hero > * {
  position: relative;
  z-index: 1;
}

.route-sources-hero .eyebrow {
  color: var(--lime);
}

.route-sources-hero h1 {
  margin: 0;
  font-size: clamp(50px, 7vw, 92px);
  line-height: 0.9;
}

.route-workflow {
  display: grid;
  gap: 12px;
}

.route-workflow span {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 13px;
  color: rgba(255, 255, 255, 0.76);
  background: rgba(255, 255, 255, 0.055);
  font-size: 13px;
  font-weight: 600;
  backdrop-filter: blur(8px);
}

.route-workflow b {
  display: grid;
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  color: var(--forest-dark);
  background: var(--lime);
  font-size: 11px;
}

.route-source-content {
  max-width: 1320px;
  margin: 0 auto;
}

.route-source-toolbar {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 28px;
  align-items: end;
  margin-bottom: 12px;
}

.route-source-toolbar h2 {
  margin: 0;
  font-size: clamp(38px, 5vw, 62px);
}

.route-source-filters {
  display: grid;
  grid-template-columns: repeat(2, minmax(170px, 1fr));
  gap: 10px;
}

.route-source-filters label {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.route-source-filters select {
  display: block;
  min-width: 180px;
  margin-top: 6px;
  border-color: rgba(22, 35, 29, 0.14);
  color: var(--ink);
  background: rgba(255, 253, 248, 0.94);
}

.route-result-count {
  margin: 0 0 22px;
  color: var(--muted);
  font-size: 12px;
}

.route-source-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.route-source-card {
  display: flex;
  min-height: 340px;
  flex-direction: column;
  padding: 28px;
  border: 1px solid rgba(22, 35, 29, 0.11);
  border-radius: 22px;
  background: rgba(255, 253, 248, 0.92);
  box-shadow: 0 12px 34px rgba(18, 49, 39, 0.055);
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.route-source-card[hidden] {
  display: none;
}

.route-source-card:hover {
  transform: translateY(-3px);
  border-color: rgba(30, 73, 56, 0.25);
  box-shadow: 0 20px 46px rgba(18, 49, 39, 0.1);
}

.route-source-featured {
  color: var(--white);
  border-color: transparent;
  background: var(--forest-dark);
}

.route-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 36px;
}

.route-source-logo {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border-radius: 14px;
  color: var(--white);
  background: var(--forest);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.route-source-featured .route-source-logo {
  color: var(--forest-dark);
  background: var(--lime);
}

.route-badge {
  padding: 6px 9px;
  border-radius: 999px;
  color: var(--forest-dark);
  background: var(--surface-soft);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.045em;
  text-transform: uppercase;
}

.badge-gpx { background: var(--lime); }
.badge-account { color: #713b1c; background: #f7d1b8; }
.badge-variable { color: #563f19; background: #ebdfb9; }
.badge-planner { color: #174560; background: #d7e9f2; }
.badge-tip { color: #3d315a; background: #e1d8f0; }

.route-source-card h3 {
  margin: 0 0 14px;
  font-family: "Newsreader", serif;
  font-size: 34px;
  line-height: 1;
  letter-spacing: -0.025em;
}

.route-source-card p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}

.route-source-featured p {
  color: rgba(255, 255, 255, 0.68);
}

.route-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 20px;
}

.route-tags span {
  padding: 5px 8px;
  border-radius: 999px;
  color: var(--muted);
  background: rgba(18, 49, 39, 0.07);
  font-size: 9px;
  font-weight: 700;
}

.route-source-featured .route-tags span {
  color: rgba(255, 255, 255, 0.68);
  background: rgba(255, 255, 255, 0.08);
}

.route-source-card > a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
  padding-top: 24px;
  color: var(--forest-dark);
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
}

.route-source-featured > a {
  color: var(--lime);
}

.route-empty {
  margin-top: 18px;
  padding: 26px;
  border: 1px dashed rgba(22, 35, 29, 0.2);
  border-radius: 18px;
  color: var(--muted);
  background: rgba(255, 253, 248, 0.6);
  text-align: center;
}

.route-import-dock {
  position: fixed;
  z-index: 1400;
  right: 24px;
  bottom: 24px;
  display: flex;
  flex-direction: column;
  padding: 13px 18px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 15px;
  color: var(--white);
  background: rgba(18, 49, 39, 0.95);
  box-shadow: 0 16px 40px rgba(4, 18, 13, 0.26);
  backdrop-filter: blur(14px);
  text-decoration: none;
  transition: transform 180ms ease, opacity 160ms ease;
}

.route-import-dock.is-hidden {
  transform: translateY(calc(100% + 34px));
  opacity: 0;
  pointer-events: none;
}

.route-import-dock span {
  color: rgba(255, 255, 255, 0.6);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.route-import-dock strong {
  color: var(--lime);
  font-size: 12px;
}

.site-footer {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
  min-height: 92px;
  padding: 22px clamp(18px, 5vw, 72px);
  border-top: 1px solid var(--line);
  color: var(--muted);
  background: rgba(255, 253, 248, 0.66);
  font-size: 12px;
}

.site-footer > span {
  color: var(--forest-dark);
  font-size: 15px;
  font-weight: 800;
}

.site-footer p {
  margin: 0;
  text-align: center;
}

.site-footer a {
  justify-self: end;
  color: var(--forest-dark);
  font-weight: 700;
  text-decoration: none;
}

@media (max-width: 1180px) {
  .country-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .source-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .route-source-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  .compact-header,
  .rules-layout,
  .source-table-grid {
    grid-template-columns: 1fr;
  }

  .compact-main {
    padding: 26px 16px 48px;
    gap: 22px;
  }

  .compact-header {
    gap: 14px;
  }

  .compact-header h1 {
    font-size: clamp(34px, 8vw, 46px);
    line-height: 1.05;
  }

  .compact-header p:last-child {
    font-size: 15px;
    line-height: 1.6;
  }

  .site-header {
    grid-template-columns: auto 1fr auto;
    gap: 12px;
  }

  .map-main {
    height: calc(100dvh - 58px);
  }

  nav {
    display: flex;
    justify-content: center;
    gap: 2px;
    padding: 3px;
  }

  nav a {
    padding: 6px 9px;
    font-size: 12px;
  }

  .brand > span:last-child {
    display: none;
  }

  .section-heading,
  .principles {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .map-sidebar {
    top: 126px;
    height: calc(100dvh - 140px);
    bottom: 14px;
    left: 14px;
    width: min(340px, calc(100% - 28px));
  }

  .source-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .about-grid {
    grid-template-columns: 1fr;
  }

  .route-sources-hero,
  .route-source-toolbar {
    grid-template-columns: 1fr;
  }

  .route-sources-hero {
    min-height: 0;
  }

  .site-footer {
    grid-template-columns: 1fr auto;
  }

  .site-footer p {
    display: none;
  }
}

@media (max-width: 560px) {
  .country-section,
  .source-section,
  .principles {
    padding: 76px 18px;
  }

  .site-header {
    min-height: 58px;
    padding: 0 14px;
  }

  .brand-mark {
    width: 34px;
    height: 34px;
  }

  .header-action {
    display: none;
  }

  nav a {
    padding: 6px 7px;
    font-size: 11px;
  }

  .map-section,
  .map-shell {
    height: 100%;
    min-height: 0;
  }

  .map-section {
    scroll-margin-top: 58px;
  }

  #map {
    min-height: 0;
  }

  .map-actions {
    top: 12px;
    left: 12px;
  }

  .map-actions {
    gap: 6px;
  }

  .map-overlay-button {
    min-height: 39px;
    padding: 0 13px;
    font-size: 12px;
  }

  .map-decision-actions {
    right: 10px;
    bottom: calc(10px + env(safe-area-inset-bottom));
    left: 10px;
  }

  .location-status {
    right: 10px;
    bottom: calc(66px + env(safe-area-inset-bottom));
    left: 10px;
    max-width: none;
  }



  .tonight-button {
    flex: 1;
    justify-content: center;
  }

  .map-sidebar {
    top: 120px;
    height: calc(100dvh - 130px);
    right: 10px;
    bottom: 10px;
    left: 10px;
    width: auto;
  }

  .place-panel {
    top: auto;
    right: 10px;
    bottom: 10px;
    left: 10px;
    width: auto;
    max-height: min(72svh, 650px);
    transform: translateY(calc(100% + 24px));
  }

  .place-panel.is-open {
    transform: translateY(0);
  }

  .candidate-panel {
    right: 10px;
    bottom: calc(10px + env(safe-area-inset-bottom));
    left: 10px;
    width: auto;
    max-height: min(78svh, 680px);
    padding: 21px 17px;
  }

  .candidate-heading strong {
    font-size: 26px;
  }

  .candidate-location-tools {
    grid-template-columns: 1fr;
  }

  .map-data-hint {
    right: 10px;
    bottom: calc(66px + env(safe-area-inset-bottom));
    left: 10px;
    max-width: none;
    border-radius: 14px;
    text-align: center;
  }

  .country-grid,
  .source-grid {
    grid-template-columns: 1fr;
  }

  .source-card {
    min-height: 250px;
  }

  .info-main {
    padding: 28px 14px 64px;
  }

  .route-sources-main {
    padding: 18px 12px 112px;
  }

  .route-sources-hero {
    gap: 28px;
    margin-bottom: 34px;
    padding: 34px 25px;
    border-radius: 22px;
  }

  .route-sources-hero h1 {
    font-size: clamp(43px, 13vw, 62px);
  }

  .route-source-toolbar {
    gap: 20px;
  }

  .route-source-filters,
  .route-source-grid {
    grid-template-columns: 1fr;
  }

  .route-source-filters select {
    min-width: 0;
  }

  .route-source-card {
    min-height: 310px;
    padding: 25px;
  }

  .route-import-dock {
    right: 10px;
    bottom: calc(10px + env(safe-area-inset-bottom));
    left: 10px;
    align-items: center;
    border-radius: 14px;
    text-align: center;
  }

  .info-hero,
  .info-card-grid {
    grid-template-columns: 1fr;
  }

  .info-hero {
    min-height: 0;
    gap: 24px;
    padding: 34px 26px;
    border-radius: 22px;
  }

  .info-hero h1 {
    font-size: clamp(44px, 13vw, 64px);
  }

  .info-card {
    min-height: 0;
    padding: 26px;
  }

  .data-note {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .data-note .eyebrow {
    margin-bottom: 0;
  }

  .about-principles article {
    grid-template-columns: 38px 1fr;
    padding: 21px;
  }

  .site-footer {
    min-height: 76px;
    padding: 18px;
  }
}

/* Spatial clusters stay legible without covering the entire map. */
.cluster-places {
  background: var(--forest-dark);
  border-width: 3px;
  font-size: 13px;
  box-shadow: 0 3px 10px rgba(18, 31, 25, 0.2);
}

.coincident-places {
  display: grid;
  gap: 8px;
  padding: 16px;
}

/* Blurring the moving map behind fixed controls forces expensive readback on
   mobile GPUs. Keep their existing surfaces without that per-frame blur. */
.map-app .site-header,
.map-app .map-overlay-button,
.map-app .map-location-button,
.map-app .tonight-button,
.map-app .location-status,
.map-app .map-data-hint {
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.map-app .site-header { background: #faf8f1; }
.map-app .map-overlay-button,
.map-app .map-location-button,
.map-app .tonight-button { background: #123127; }

/* Accessible map actions and readable source pages. */
.skip-link {
  position: fixed;
  z-index: 3000;
  top: 8px;
  left: 8px;
  padding: 12px 18px;
  border-radius: 12px;
  color: var(--white);
  background: var(--forest-dark);
  transform: translateY(-160%);
}
.skip-link:focus { transform: none; }
nav .mobile-about { display: none; }
nav a, .header-action { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; }
.map-overlay-button { min-height: 44px; }
.route-toggle { color: var(--forest-dark); background: var(--white) !important; box-shadow: var(--shadow-sm); }
.route-toggle span { color: var(--forest); }
#filter-count {
  display: grid;
  min-width: 22px;
  height: 22px;
  place-items: center;
  border-radius: 50%;
  color: var(--forest-dark);
  background: var(--lime);
  font-size: 11px;
}
#filter-count[hidden], .route-feedback[hidden], .route-undo[hidden], .map-data-hint[hidden] { display: none; }
.filter-footer {
  position: relative;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0;
  padding: 14px 22px calc(14px + env(safe-area-inset-bottom));
  border-top: 1px solid rgba(255,255,255,.16);
  background: #0e2b22;
}
.filter-content {
  position: relative;
  min-height: 0;
  padding: 22px 22px 8px;
  overflow-y: auto;
  overscroll-behavior: contain;
  touch-action: pan-y pinch-zoom;
  scroll-padding-block: 16px;
}
.filter-footer .button { flex: 1; min-height: 44px; background: var(--lime); color: var(--forest-dark); }
.filter-reset, .route-undo button, .map-data-hint button {
  min-height: 44px;
  padding: 8px;
  border: 0;
  color: var(--lime);
  background: transparent;
  font-size: 13px;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 4px;
  cursor: pointer;
}
.route-feedback, .route-undo {
  margin: 12px 0;
  padding: 12px;
  border: 1px solid rgba(214,236,145,.3);
  border-radius: 12px;
  color: var(--white);
  background: rgba(214,236,145,.08);
  font-size: 13px;
  line-height: 1.5;
}
.route-feedback.is-error { border-color: #e8a87a; color: #ffdbc0; background: rgba(232,134,74,.1); }
.route-undo { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.route-undo span { overflow-wrap: anywhere; }
.route-undo button { flex-shrink: 0; }
.route-list-item strong { font-size: 13px; }
.route-list-item small, .microcopy { font-size: 12px; }
.country-filter-actions button, .country-chip span, .route-presets button { min-height: 44px; }
.country-chip input:focus-visible + span { outline: 3px solid var(--orange); outline-offset: 2px; }
.candidate-close { min-width: 44px; min-height: 44px; }
.candidate-horizon button { min-height: 44px; }
.candidate-empty span { font-size: 13px; color: rgba(255,255,255,.75); }
.candidate-empty .button { min-height: 44px; margin-top: 8px; }
.candidate-copy > strong { font-size: 14px; }
.candidate-copy small { font-size: 13px; }
.map-data-hint { font-size: 13px; line-height: 1.5; }
.map-data-hint button { display: block; margin: 4px auto 0; }
.map-data-hint button[hidden] { display: none; }
.map-app .leaflet-control-zoom a { width: 44px; height: 44px; }
.page-callout {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 24px;
  border-radius: 18px;
  color: var(--white);
  background: var(--forest-dark);
}
.page-callout strong { display: block; font-size: 18px; }
.page-callout p { margin: 4px 0 0; color: rgba(255,255,255,.78); font-size: 14px; }
.page-callout .button { min-height: 44px; color: var(--forest-dark); background: var(--lime); text-decoration: none; }
.page-note { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.6; }
.compact-main .eyebrow { margin-bottom: 10px; }
.source-table a { display: inline-flex; min-height: 44px; align-items: center; overflow-wrap: anywhere; }
.compact-main .info-link { padding-top: 0; min-height: 44px; }
@media (max-width: 650px) {
  .source-table-card { padding: 20px; }
  .source-table, .source-table tbody { display: block; }
  .source-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }
  .source-table tbody tr {
    display: grid;
    gap: 8px;
    padding: 18px 0;
    border-bottom: 1px solid var(--line);
  }
  .source-table tbody tr:last-child { border-bottom: 0; padding-bottom: 0; }
  .source-table td, .source-table td:first-child {
    display: grid;
    grid-template-columns: 80px minmax(0,1fr);
    align-items: baseline;
    gap: 12px;
    padding: 0;
    border: 0;
    font-size: 14px;
    font-weight: 500;
    overflow-wrap: anywhere;
  }
  .source-table td::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: 12px;
    font-weight: 600;
  }
  .source-table td:first-child { display: block; font-size: 17px; font-weight: 700; }
  .source-table td:first-child::before { display: none; }
  .source-table td:first-child a { min-height: 44px; }
  .rules-table tbody tr { grid-template-columns: 1fr auto; gap: 12px; }
  .rules-table td:nth-child(2) { display: block; }
  .rules-table td:nth-child(2)::before { display: none; }
  .rules-table td:nth-child(n+3) { grid-column: 1 / -1; }
  .rules-table .status-chip { font-size: 10px; }
  .rules-principles { padding: 20px; }
  .rules-principles ul { font-size: 14px; line-height: 1.7; }
}
@media (max-width: 560px) {
  .header-action { display: none; }
  .site-header { grid-template-columns: 44px minmax(0,1fr); gap: 4px; padding: 0 6px; }
  .brand { min-height: 44px; width: 44px; justify-content: center; }
  nav { justify-content: space-between; gap: 0; padding: 2px; }
  nav a { min-width: 44px; padding: 4px; font-size: 12px; }
  nav .mobile-about { display: inline-flex; }
  .map-overlay-button { min-height: 44px; }
  .map-actions { right: 66px; flex-wrap: wrap; }
  .route-toggle { padding: 0 12px; }
  .info-hero { grid-template-columns: minmax(0,1fr); gap: 22px; }
  .info-hero h1 { overflow-wrap: anywhere; }
  .data-note { grid-template-columns: minmax(0,1fr); gap: 18px; padding: 24px; }
  .data-note .eyebrow { margin-bottom: 0; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
@media (max-height: 500px) {
  .map-sidebar { top: 12px; bottom: 12px; height: calc(100dvh - 24px); }
}

.region-guide-section {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--white);
}
.region-guide-section h2 { margin: 0 0 12px; font-size: 30px; }
.region-guide-list { display: grid; gap: 10px; margin-top: 22px; }
.region-guide { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.region-guide summary {
  min-height: 48px;
  padding: 14px 18px;
  color: var(--forest-dark);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}
.region-guide summary::marker { color: var(--forest); }
.region-guide summary:focus-visible { outline: 3px solid var(--forest); outline-offset: -4px; }
.region-guide summary:hover { background: var(--surface-soft); }
.region-guide[open] summary { border-bottom: 1px solid var(--line); }
.region-guide-content { padding: 2px 18px 18px; }
.region-guide-content p { margin: 14px 0; font-size: 14px; line-height: 1.7; }
.region-guide-location { color: var(--muted); }
.region-guide-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin: 20px 0; }
.region-guide-facts dt { color: var(--muted); font-size: 12px; }
.region-guide-facts dd { margin: 4px 0 0; font-size: 14px; line-height: 1.6; }
@media (max-width: 560px) {
  .region-guide-section { padding: 20px; }
  .region-guide-facts { grid-template-columns: 1fr; gap: 12px; }
  .region-guide summary { font-size: 14px; }
}

/* Desktop: content pages fit the viewport; overflow scrolls inside cards, not the page. */
@media (min-width: 821px) and (min-height: 560px) {
  body.route-sources-page,
  body.compact-page-body {
    display: flex;
    flex-direction: column;
    height: 100dvh;
    overflow: hidden;
  }
  .compact-main {
    flex: 1 1 auto;
    width: 100%;
    min-height: 0;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto;
    grid-auto-rows: auto;
    gap: 14px;
    padding: 20px clamp(18px, 3vw, 44px);
  }
  .compact-main > :last-child { min-height: 0; }
  .route-sources-page .compact-main { grid-template-rows: auto auto minmax(0, 1fr); }
  .networks-page-body .compact-main { grid-template-rows: auto minmax(0, 1fr); }
  .compact-header { padding-bottom: 10px; }
  .compact-header h1 { font-size: clamp(30px, 3.2vw, 44px); }
  .compact-main .eyebrow { margin-bottom: 6px; }
  .page-callout { padding: 12px 20px; border-radius: 14px; }
  .page-callout strong { font-size: 16px; }
  .page-callout p { font-size: 13px; }

  .source-table-grid { height: 100%; align-items: start; }
  .source-table-card,
  .rules-principles,
  .region-guide-section {
    display: flex;
    flex-direction: column;
    min-height: 0;
    max-height: 100%;
    padding: 16px 20px;
    overflow: auto;
    overscroll-behavior: contain;
  }
  .source-table-card h2,
  .rules-principles h2 { font-size: 20px; margin-bottom: 4px; }
  .source-table { font-size: 13px; }
  .source-table th,
  .source-table td { padding: 6px 8px; line-height: 1.35; }
  .source-table thead th { position: sticky; top: -16px; background: #fffdf8; z-index: 1; }
  .source-table a { min-height: 28px; }

  /* Regels: matrix and region guides side by side. */
  .compact-main:has(.rules-layout) {
    grid-template-columns: minmax(0, 1fr) minmax(260px, 0.36fr);
    grid-template-rows: auto minmax(0, 1fr);
  }
  .compact-main:has(.rules-layout) > .compact-header { grid-column: 1 / -1; }
  .rules-layout { height: 100%; align-items: start; grid-template-columns: minmax(180px, 0.3fr) minmax(0, 1fr); }
  .rules-principles { align-self: start; }
  .rules-principles ul { gap: 6px; font-size: 13px; line-height: 1.5; }
  .rules-table td { padding-top: 4px; padding-bottom: 4px; }
  .rules-table .status-chip { white-space: nowrap; }
  .region-guide-section { align-self: start; }
  .region-guide-section h2 { font-size: 20px; margin-bottom: 4px; }
  .region-guide-section .page-note { font-size: 12.5px; line-height: 1.45; }
  .region-guide-list { gap: 6px; margin-top: 12px; }
  .region-guide summary { min-height: 0; padding: 6px 12px; font-size: 13.5px; }
  .region-guide-content { padding: 0 12px 12px; }
  .region-guide-content p { margin: 10px 0; font-size: 13px; line-height: 1.55; }
  .region-guide-facts { grid-template-columns: 1fr; gap: 6px; margin: 10px 0; }
}
