/* ==========================================================================
   bikelanebumps.org — design tokens
   Dark, warm, road-hazard palette. Sequential heat ramp (pale yellow -> deep
   red) doubles as both the map legend and the brand accent family, so the
   data visualization and the UI read as one system.
   ========================================================================== */

:root {
  color-scheme: dark;

  /* surfaces */
  --page-bg:      #141311;
  --surface-1:    #1f1c18;
  --surface-2:    #262219;
  --surface-gray: #3a3a38;
  --border:       rgba(247, 244, 236, 0.10);
  --border-strong: rgba(247, 244, 236, 0.18);

  /* ink */
  --text-primary:   #f7f4ec;
  --text-secondary: #b8b1a1;
  --text-muted:     #837c6d;

  /* brand accent (warm hazard family — shared with the sequential ramp) */
  --accent-yellow: #ffc23d;
  --accent-orange: #ff8a3d;
  --accent-red:    #ff4d3d;
  --accent-red-deep: #c81d25;

  /* sequential heat ramp — low to severe, light to dark */
  --heat-100: #fff3c4;
  --heat-250: #ffd873;
  --heat-400: #ffab3d;
  --heat-550: #ff6f3c;
  --heat-700: #b0141c;

  /* bike lane overlay — cool teal family, deliberately distinct from the
     warm heat ramp so "infrastructure" and "problem" read apart at a
     glance. Steps down in strength with actual physical protection. */
  --lane-track:  #3ddc97;
  --lane-lane:   #2563eb;
  --lane-shared: #6b8f96;

  /* Ride-coverage ("ridden path") dots on the map -- deliberately purple,
     not teal, so they don't blend into the --lane-track/--lane-lane
     infrastructure colors above. Keep in sync with COVERAGE_GRADIENT's
     bright-end color in app.js. */
  --coverage-ridden: #b18cff;

  --radius-s: 10px;
  --radius-m: 16px;
  --radius-l: 24px;
  --shadow-card: 0 12px 32px rgba(0, 0, 0, 0.35);

  --font-sans: system-ui, -apple-system, "Segoe UI", sans-serif;
}

/* ==========================================================================
   Reset & base
   ========================================================================== */

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--page-bg);
  color: var(--text-primary);
  font-family: var(--font-sans);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

img, svg { display: block; max-width: 100%; }

a { color: inherit; text-decoration: none; }

.wrap {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: auto;
  background: var(--accent-yellow);
  color: #141311;
  padding: 10px 16px;
  border-radius: var(--radius-s);
  z-index: 1000;
}
.skip-link:focus {
  left: 16px;
  top: 16px;
}

h1, h2, h3 {
  font-weight: 700;
  line-height: 1.15;
  margin: 0;
  letter-spacing: -0.01em;
}

.section-head {
  max-width: 640px;
  margin: 0 0 40px;
}
.section-head h2 {
  font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.2rem);
}
.section-sub {
  color: var(--text-secondary);
  font-size: 1.05rem;
  margin: 10px 0 0;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 24px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.98rem;
  border: 1px solid transparent;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
  cursor: pointer;
}
.btn:hover { transform: translateY(-1px); }

.btn-primary {
  background: linear-gradient(135deg, var(--accent-yellow), var(--accent-orange));
  color: #1a1408;
}
.btn-primary:hover { background: linear-gradient(135deg, #ffd166, var(--accent-orange)); }

.btn-ghost {
  background: transparent;
  border-color: var(--border-strong);
  color: var(--text-primary);
}
.btn-ghost:hover { border-color: var(--accent-yellow); color: var(--accent-yellow); }

/* ==========================================================================
   Header
   ========================================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(20, 19, 17, 0.86);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--text-primary);
}
.brand-icon {
  width: 28px;
  height: 28px;
  color: var(--accent-yellow);
  flex: none;
}
.brand-dot { color: var(--text-muted); font-weight: 500; }

.site-nav {
  display: flex;
  align-items: center;
  gap: 28px;
  font-size: 0.95rem;
  font-weight: 500;
}
.site-nav a {
  color: var(--text-secondary);
  padding: 6px 0;
  border-bottom: 2px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.site-nav a:hover,
.site-nav a.active {
  color: var(--text-primary);
  border-color: var(--accent-yellow);
}
.nav-cta {
  background: var(--surface-2);
  color: var(--text-primary) !important;
  padding: 9px 18px !important;
  border-radius: 999px;
  border-bottom: none !important;
}
.nav-cta:hover { background: var(--accent-yellow) !important; color: #1a1408 !important; }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: none;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-s);
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  height: 2px;
  margin: 0 8px;
  background: var(--text-primary);
}

/* ==========================================================================
   Hero
   ========================================================================== */

.hero {
  padding: 88px 0 64px;
  background:
    radial-gradient(ellipse 60% 50% at 15% 0%, rgba(255, 138, 61, 0.16), transparent),
    radial-gradient(ellipse 50% 40% at 100% 10%, rgba(255, 194, 61, 0.10), transparent);
}
.hero-inner { max-width: 760px; }

.eyebrow {
  color: var(--accent-yellow);
  font-weight: 700;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin: 0 0 14px;
}

.hero h1 {
  font-size: clamp(2.4rem, 1.8rem + 3vw, 3.6rem);
  color: var(--text-primary);
}
.hero h1 .hl {
  background: linear-gradient(135deg, var(--accent-yellow), var(--accent-red));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-sub {
  color: var(--text-secondary);
  font-size: 1.15rem;
  max-width: 60ch;
  margin: 20px 0 0;
}

.hero-actions {
  display: flex;
  gap: 14px;
  margin-top: 32px;
  flex-wrap: wrap;
}

/* ==========================================================================
   Stats
   ========================================================================== */

.stats { padding: 0 0 72px; }

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

.stat-tile {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-m);
  padding: 26px 24px;
}

.stat-value {
  font-size: clamp(1.8rem, 1.4rem + 1.4vw, 2.4rem);
  font-weight: 700;
  margin: 0;
  font-variant-numeric: proportional-nums;
}

.stat-label {
  color: var(--text-secondary);
  font-size: 0.92rem;
  margin: 6px 0 0;
}

/* ==========================================================================
   Map
   ========================================================================== */

.map-section { padding: 0 0 96px; }

.map-filter {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0 0 20px;
}
.map-filter-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}
.map-filter-label {
  color: var(--text-secondary);
  font-size: 0.92rem;
  font-weight: 600;
}
.map-filter-select,
.map-filter-date {
  background: var(--surface-1);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-m);
  color: var(--text-primary);
  font: inherit;
  font-size: 0.92rem;
  padding: 8px 12px;
}
.map-filter-select:focus,
.map-filter-date:focus {
  outline: 2px solid var(--accent-yellow);
  outline-offset: 1px;
}
.map-filter-custom {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.map-filter-to {
  color: var(--text-secondary);
  font-size: 0.88rem;
}
.map-filter-toggle {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-left: auto;
  font-size: 0.88rem;
  color: var(--text-secondary);
  cursor: pointer;
  user-select: none;
}
.map-filter-toggle input[type="checkbox"] {
  accent-color: var(--coverage-ridden);
  width: 15px;
  height: 15px;
  cursor: pointer;
}
.coverage-swatch {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--coverage-ridden);
  flex: none;
}
.btn-small {
  padding: 8px 18px;
  font-size: 0.88rem;
}
.map-filter-summary {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin: 0;
  min-height: 1.2em;
}
.map-filter-caveat {
  color: var(--text-muted);
  font-size: 0.8rem;
  font-style: italic;
  margin: 0;
  max-width: 640px;
}

.map-frame {
  position: relative;
  border-radius: var(--radius-l);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-card);
  background: var(--surface-1);
  /* Leaflet's own panes/controls (and our .map-legend/.lane-legend/
     .map-fullscreen-btn overlays) use z-index values up to 1000 to stack
     correctly *among themselves*. Without this, .map-frame doesn't
     establish its own stacking context, so those values compare directly
     against the rest of the page -- including .site-header's z-index: 100
     -- and the map ends up drawing over the sticky navbar while scrolling
     past it. isolation: isolate scopes all of that to inside the map. */
  isolation: isolate;
}

#map {
  width: 100%;
  height: 560px;
  background: var(--surface-1);
}

.map-empty {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  max-width: 320px;
  margin: auto;
  padding: 20px 24px;
  color: var(--text-secondary);
  font-size: 1rem;
  background: rgba(20, 19, 17, 0.55);
  backdrop-filter: blur(2px);
  pointer-events: none;
}
.map-empty[hidden] { display: none; }

.map-legend {
  position: absolute;
  right: 16px;
  bottom: 16px;
  z-index: 400;
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(20, 19, 17, 0.82);
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 0.78rem;
  color: var(--text-secondary);
}

.lane-legend {
  position: absolute;
  left: 16px;
  bottom: 16px;
  z-index: 400;
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(20, 19, 17, 0.82);
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 0.78rem;
  color: var(--text-secondary);
}
.lane-legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}
.lane-swatch {
  width: 16px;
  height: 3px;
  border-radius: 999px;
  flex: none;
}
.lane-swatch-track { background: var(--lane-track); }
.lane-swatch-lane { background: var(--lane-lane); }
.lane-swatch-ridden { background: var(--coverage-ridden); }
.lane-swatch-shared {
  background: repeating-linear-gradient(90deg, var(--lane-shared) 0 4px, transparent 4px 8px);
}

@media (max-width: 640px) {
  /* Two pill legends side by side don't fit a narrow map frame -- stack
     the lane legend above the severity one instead of truncating it. */
  .lane-legend {
    left: 16px;
    right: 16px;
    bottom: 56px;
    justify-content: center;
    flex-wrap: wrap;
  }
}

.map-fullscreen-btn {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 1000;
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(20, 19, 17, 0.82);
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  color: var(--text-primary);
  cursor: pointer;
  transition: background 0.15s ease, transform 0.15s ease;
}
.map-fullscreen-btn:hover { background: rgba(38, 34, 25, 0.92); }
.map-fullscreen-btn:active { transform: scale(0.94); }
.map-fullscreen-btn[hidden] { display: none; }
.map-fullscreen-btn svg { width: 18px; height: 18px; }
.map-fullscreen-btn .fs-icon-collapse { display: none; }
.map-fullscreen-btn.is-fullscreen .fs-icon-expand { display: none; }
.map-fullscreen-btn.is-fullscreen .fs-icon-collapse { display: block; }

.map-frame:fullscreen,
.map-frame:-webkit-full-screen {
  width: 100vw;
  height: 100vh;
  border-radius: 0;
}
.map-frame:fullscreen #map,
.map-frame:-webkit-full-screen #map {
  height: 100%;
}

/* Leaflet's default popup is a plain white box -- override it to a neutral
   gray so it reads as UI chrome rather than glaring against the dark map. */
.leaflet-popup-content-wrapper {
  background: var(--surface-gray);
  color: var(--text-primary);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-m);
  box-shadow: var(--shadow-card);
}
.leaflet-popup-tip {
  background: var(--surface-gray);
  border: 1px solid var(--border-strong);
  box-shadow: none;
}
.leaflet-popup-content {
  margin: 12px 14px;
  font-family: var(--font-sans);
  line-height: 1.4;
}
.leaflet-popup-close-button {
  color: var(--text-secondary) !important;
}
.leaflet-popup-close-button:hover {
  color: var(--text-primary) !important;
}

.bump-popup-mag {
  margin: 0 0 4px;
  font-size: 1.15rem;
  font-weight: 700;
  /* color is set inline per-popup in app.js, matching that bump's marker */
}
.bump-popup-row {
  margin: 2px 0;
  font-size: 0.82rem;
  color: var(--text-secondary);
}
.bump-popup-row:last-child {
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}
.legend-bar {
  width: 90px;
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(90deg,
    var(--heat-100), var(--heat-250), var(--heat-400), var(--heat-550), var(--heat-700));
}

.map-refresh {
  margin: 14px 4px 0;
  font-size: 0.85rem;
}
.map-refresh a {
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-strong);
}
.map-refresh a:hover { color: var(--text-secondary); }

/* ==========================================================================
   Screenshots
   ========================================================================== */

.screens { padding: 0 0 96px; }

.screens-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 140px));
  justify-content: center;
  gap: 16px;
}

.screen-card {
  margin: 0;
  text-align: center;
}

.screen-card img {
  width: 100%;
  /* The <img> tags carry width/height attributes (416x496, the real
     screenshot pixels) so the browser can reserve layout space before the
     image loads -- but those attributes also act as a presentational
     height hint that beats an unset `height`, pinning it to 496px
     regardless of how narrow `width: 100%` makes the box. Explicit
     `height: auto` overrides that hint so height scales proportionally
     with the rendered width instead of stretching. */
  height: auto;
  border-radius: var(--radius-l);
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow-card);
}

.screen-card figcaption {
  margin-top: 14px;
  color: var(--text-secondary);
  font-size: 0.92rem;
}

/* ==========================================================================
   Priority stretches
   ========================================================================== */

.priority { padding: 0 0 96px; }

/* AdSense unit between "Priority stretches" and "How it works" -- a plain
   center-aligned block using the same .wrap max-width as every other
   section, so it reads as one more piece of the page rather than a
   foreign widget bolted on. min-height keeps the layout from jumping once
   the ad slot itself finishes loading and fills in above/below it. */
.ad-slot {
  padding: 0 0 96px;
  text-align: center;
}
.ad-slot .wrap {
  min-height: 100px;
}

.ranking-toggle {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  margin-bottom: 12px;
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: 999px;
}
.ranking-toggle-btn {
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
.ranking-toggle-btn:hover { color: var(--text-primary); }
.ranking-toggle-btn.is-active {
  background: var(--accent-yellow);
  color: #1a1408;
}

.ranking-note {
  margin: 0 0 16px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* One heading + <ol> pair per metro area, stacked inside #stretchesList --
   see app.js's renderStretchList(). */
.stretch-metro-heading {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 32px 0 12px;
}
.stretch-metro-heading:first-child {
  margin-top: 0;
}

.stretches-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

/* "See next 5" / "Show fewer" control below a metro's list -- see app.js's
   renderStretchList(). Dashed + ghost so it reads as "more below," not as
   another primary action competing with each stretch's own share button. */
.stretch-expand-btn {
  display: block;
  width: 100%;
  margin-top: 10px;
  padding: 10px;
  background: none;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-s);
  color: var(--text-secondary);
  font: inherit;
  font-size: 0.85rem;
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease;
}
.stretch-expand-btn:hover,
.stretch-expand-btn:focus-visible {
  border-color: var(--accent-yellow);
  color: var(--accent-yellow);
}

/* Now a plain flex container -- not itself a button -- wrapping two
   separate controls: .stretch-main (click flies the map to this stretch,
   same as the old single button used to) and .stretch-share (opens the
   Facebook/X share card; see app.js's shareStretch). A <button> can't
   nest inside another <button>, which is why this stopped being one
   button once sharing needed its own click target alongside it. */
.stretch-item {
  width: 100%;
  display: flex;
  align-items: stretch;
  gap: 4px;
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-m);
  padding: 4px;
  transition: border-color 0.15s ease, background 0.15s ease;
}

/* The stretch whose bounds the map is currently showing -- set/cleared by
   app.js as flyToBounds fires, so the list stays in sync with the map
   instead of just being a one-way trigger. */
.stretch-item.is-active {
  border-color: var(--accent-yellow);
  background: var(--surface-2);
}

.stretch-main {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 16px;
  background: none;
  border: none;
  border-radius: var(--radius-s);
  padding: 12px 16px;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.stretch-main:hover,
.stretch-main:focus-visible {
  background: var(--surface-2);
}

.stretch-share {
  flex: none;
  align-self: center;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  margin-right: 4px;
  background: none;
  border: none;
  border-radius: 999px;
  color: var(--text-muted);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.stretch-share:hover,
.stretch-share:focus-visible {
  background: var(--surface-2);
  color: var(--text-primary);
}

/* Desktop fallback share menu for browsers without the Web Share API --
   see app.js's openSharePopover. Positioned inline via style.top/left at
   creation time rather than here, since it's anchored to whichever share
   button was actually clicked. */
.share-popover {
  position: absolute;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  min-width: 170px;
  background: var(--surface-2);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-s);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}

.share-popover-link {
  padding: 10px 16px;
  color: var(--text-primary);
  text-decoration: none;
  font-size: 0.9rem;
}

.share-popover-link:hover,
.share-popover-link:focus-visible {
  background: var(--surface-1);
}

.stretch-rank {
  flex: none;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--accent-yellow);
  font-weight: 700;
  font-size: 0.9rem;
}
.stretch-item.is-active .stretch-rank {
  background: var(--accent-yellow);
  color: #1a1408;
}

.stretch-info { flex: 1; min-width: 0; }

.stretch-name {
  font-weight: 600;
  font-size: 1rem;
}

.stretch-meta {
  display: block;
  margin: 2px 0 0;
  color: var(--text-secondary);
  font-size: 0.88rem;
}

/* ==========================================================================
   How it works
   ========================================================================== */

.how { padding: 0 0 96px; }

.how-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.how-card {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-m);
  padding: 28px 24px;
}

.how-index {
  display: inline-block;
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--accent-yellow);
  background: var(--surface-2);
  border-radius: 999px;
  padding: 4px 10px;
  margin-bottom: 16px;
}

.how-card h3 {
  font-size: 1.05rem;
  margin-bottom: 8px;
}

.how-card p {
  color: var(--text-secondary);
  font-size: 0.96rem;
  margin: 0;
}

/* ==========================================================================
   Get the app
   ========================================================================== */

.get-app { padding: 0 0 100px; }

.get-app-inner {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-l);
  padding: 48px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: start;
}
.get-app-inner .section-head { margin: 0; }

.get-app-card ol {
  margin: 0 0 24px;
  padding-left: 20px;
  color: var(--text-secondary);
  display: grid;
  gap: 10px;
}
.get-app-card li::marker {
  color: var(--accent-yellow);
  font-weight: 700;
}

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer {
  border-top: 1px solid var(--border);
  padding: 40px 0;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
}

.footer-nav {
  display: flex;
  gap: 22px;
  font-size: 0.9rem;
}
.footer-nav a { color: var(--text-secondary); }
.footer-nav a:hover { color: var(--text-primary); }

.footer-copy {
  color: var(--text-muted);
  font-size: 0.82rem;
  margin: 0;
  width: 100%;
  order: 3;
}

/* ==========================================================================
   Content pages (About / Privacy Policy / Terms of Use)
   ========================================================================== */

.page-header {
  padding: 64px 0 8px;
}
.page-header h1 {
  font-size: clamp(2rem, 1.6rem + 2vw, 2.8rem);
}
.page-header .section-sub {
  max-width: 60ch;
  margin-top: 14px;
}

.content-section { padding: 32px 0 96px; }
.content-section .wrap { max-width: 720px; }

.effective-date {
  color: var(--text-muted);
  font-size: 0.88rem;
  margin: 0 0 32px;
}

.content-section h2 {
  font-size: 1.3rem;
  margin: 40px 0 12px;
}
.content-section h2:first-of-type { margin-top: 0; }

.content-section h3 {
  font-size: 1.05rem;
  margin: 24px 0 10px;
}

.content-section p {
  color: var(--text-secondary);
  font-size: 1rem;
  margin: 0 0 16px;
}

.content-section ul {
  color: var(--text-secondary);
  margin: 0 0 16px;
  padding-left: 20px;
  display: grid;
  gap: 8px;
}
.content-section li::marker { color: var(--accent-yellow); }

.content-section strong { color: var(--text-primary); }

.content-section a {
  color: var(--accent-yellow);
  border-bottom: 1px solid rgba(255, 194, 61, 0.35);
}
.content-section a:hover { border-color: var(--accent-yellow); }

.legal-toc {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-m);
  padding: 18px 22px;
  margin: 8px 0 8px;
  font-size: 0.9rem;
  list-style: none;
}
.legal-toc a { color: var(--text-secondary); border-bottom: none; }
.legal-toc a:hover { color: var(--accent-yellow); }

.disclaimer {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.about-cards {
  display: grid;
  gap: 18px;
  margin: 8px 0 8px;
}
.about-card {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-m);
  padding: 26px 28px;
}
.about-card h2 { margin: 0 0 10px; font-size: 1.15rem; }
.about-card p:last-of-type { margin-bottom: 0; }
.about-card .btn { margin-top: 16px; }

/* ==========================================================================
   Leaflet overrides (dark basemap chrome)
   ========================================================================== */

.leaflet-control-attribution {
  background: rgba(20, 19, 17, 0.75) !important;
  color: var(--text-muted) !important;
}
.leaflet-control-attribution a { color: var(--text-secondary) !important; }
.leaflet-control-zoom a {
  background: var(--surface-1) !important;
  color: var(--text-primary) !important;
  border-color: var(--border) !important;
}
.leaflet-control-zoom a:hover { background: var(--surface-2) !important; }

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 860px) {
  .get-app-inner { grid-template-columns: 1fr; padding: 32px; }
  .how-grid { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .nav-toggle { display: flex; }

  .site-nav {
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    background: var(--page-bg);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    padding: 12px 24px 20px;
    display: none;
  }
  .site-nav.open { display: flex; }
  .site-nav a { width: 100%; padding: 10px 0; }
  .nav-cta { width: auto; margin-top: 8px; }

  #map { height: 420px; }
  .hero { padding: 56px 0 48px; }
}
