:root {
  --bg: #0f1410;
  --card: #1a221c;
  --ink: #f4f1ea;
  --muted: #b8c0b4;
  --accent: #c4a35a;
  --accent-2: #3d7a5a;
  --line: rgba(244, 241, 234, 0.12);
  --radius: 16px;
  --sticky-h: 68px;
  --font: "Segoe UI", system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  font-size: 1.0625rem;
  background: radial-gradient(1200px 600px at 20% -10%, #243528, transparent),
              radial-gradient(900px 500px at 100% 0%, #2a2214, transparent),
              var(--bg);
  color: var(--ink);
  line-height: 1.55;
  min-height: 100vh;
  overflow-x: hidden;
  padding-bottom: calc(var(--sticky-h) + env(safe-area-inset-bottom));
}

.skip {
  position: absolute;
  left: 12px;
  top: -40px;
  background: var(--accent);
  color: #1a160c;
  padding: 8px 12px;
  z-index: 10;
}

.skip:focus { top: 12px; }

.hero, main, footer {
  width: min(960px, calc(100% - 2rem));
  margin-inline: auto;
}

.hero {
  padding: 2.25rem 0 0.75rem;
}

.eyebrow,
.kicker {
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.78rem;
  font-weight: 700;
  margin: 0 0 0.75rem;
}

h1 {
  font-size: clamp(2.5rem, 12vw, 3.6rem);
  line-height: 1.05;
  margin: 0 0 1rem;
  letter-spacing: -0.02em;
}

h2 {
  margin: 0;
  font-size: 1.25rem;
}

.lede {
  font-size: 1.12rem;
  color: var(--muted);
  max-width: 40rem;
  margin: 0;
}

.lede strong { color: var(--ink); }

.cards {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
  padding: 1.5rem 0 0;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.35rem 1.15rem 1.4rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.card.highlight {
  border-color: rgba(196, 163, 90, 0.45);
  box-shadow: 0 0 0 1px rgba(196, 163, 90, 0.15);
}

.card p { margin: 0; color: var(--muted); }

.cards .card > p:first-of-type { flex: 1; }

.cards .card > .btn { margin-top: auto; }

.card p strong { color: var(--ink); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  text-decoration: none;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.75rem 1.1rem;
  font-weight: 700;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.btn:hover { border-color: var(--accent); color: var(--ink); }

.btn.primary {
  background: var(--accent-2);
  border-color: transparent;
}

.btn.primary:hover { filter: brightness(1.08); }

.note {
  font-size: 0.88rem;
  color: var(--muted);
  opacity: 0.95;
}

.status,
.map-panel {
  margin-top: 1rem;
}

.status__line {
  display: flex;
  flex-direction: column;
  gap: 4px;
  color: var(--ink);
  margin: 0;
}

.status__line .dot { display: none; }

.status__state {
  display: inline-block;
  margin: 0;
  padding: 6px 10px;
  width: fit-content;
  border-radius: 999px;
  background: rgba(61, 122, 90, 0.28);
  color: #d7eadf;
  font-size: 0.92rem;
  font-weight: 600;
}

.status__note { margin: 0; }

.map-frame {
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #11160f;
}

#course-map {
  width: 100%;
  height: 320px;
  touch-action: manipulation;
}

.map-links {
  display: grid;
  gap: 10px;
}

.aid-legend {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 6px;
}

.aid-legend li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.9rem;
  color: var(--muted);
}

.story {
  border-top: 1px solid var(--line);
  padding: 1.75rem 0 2rem;
  margin-top: 1.5rem;
}

.story h2 { margin: 0 0 0.75rem; }

.story p { margin: 0; color: var(--muted); max-width: 42rem; }

footer {
  border-top: 1px solid var(--line);
  padding: 1.25rem 0 2rem;
  color: var(--muted);
  font-size: 0.9rem;
}

footer a { color: var(--accent); }

.sticky-cta {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
  padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
  background: rgba(15, 20, 16, 0.94);
  border-top: 1px solid var(--line);
  backdrop-filter: blur(10px);
}

.sticky-cta a {
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--card);
  color: var(--ink);
  text-decoration: none;
  font-weight: 700;
  border: 1px solid var(--line);
}

.sticky-cta a:first-child {
  background: var(--accent-2);
  border-color: transparent;
}

.leaflet-container {
  background: #11160f;
  font-family: var(--font);
}

.leaflet-control-zoom a {
  width: 44px !important;
  height: 44px !important;
  line-height: 44px !important;
  font-size: 20px !important;
}

.leaflet-control-attribution {
  font-size: 10px;
  max-width: 72%;
}

.leaflet-popup-content-wrapper,
.leaflet-popup-tip {
  background: var(--card);
  color: var(--ink);
}

.leaflet-popup-content { margin: 10px 12px; font-size: 0.92rem; }

.leaflet-popup-close-button { color: var(--accent) !important; }

.aid-marker,
.live-marker {
  background: transparent;
  border: 0;
}

.aid-marker__dot,
.live-marker__dot {
  display: block;
  width: 14px;
  height: 14px;
  margin: 4px;
  border-radius: 50%;
  box-sizing: border-box;
}

.aid-marker__dot {
  background: var(--accent-2);
  border: 2px solid #0f1410;
}

.live-marker { position: relative; }

.live-marker__dot {
  position: relative;
  z-index: 1;
  width: 16px;
  height: 16px;
  margin: 6px;
  background: var(--accent);
  border: 2px solid #0f1410;
}

.live-marker__pulse {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: rgba(196, 163, 90, 0.35);
  animation: pulse 1.8s ease-out infinite;
}

@keyframes pulse {
  0% { transform: scale(0.55); opacity: 0.8; }
  100% { transform: scale(1.35); opacity: 0; }
}

@media (min-width: 720px) {
  .hero { padding: 3.5rem 0 1.5rem; }

  .cards {
    grid-template-columns: repeat(3, 1fr);
    padding-bottom: 0.5rem;
  }

  .status__line { display: block; }

  .status__line .dot {
    display: inline;
    margin: 0 0.35em;
  }

  .aid-legend { grid-template-columns: 1fr 1fr; }

  .map-links { grid-template-columns: 1fr 1fr; }

  #course-map { height: 420px; }

  body { padding-bottom: 0; }

  .sticky-cta { display: none; }
}
