:root {
  --accent: #e8772e;
  --accent-ink: #fff;
  --bg: #f6f4ef;
  --surface: #ffffff;
  --ink: #1d2327;
  --muted: #5d676e;
  --line: #e3dfd6;
  --hero-bg: #13222b;
  --hero-ink: #f3f0e8;
  --hero-muted: #a9b6bd;
  --track: rgba(255, 255, 255, .14);
  --radius: 16px;
  --shadow: 0 1px 2px rgba(0,0,0,.04), 0 6px 24px rgba(0,0,0,.06);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f171c;
    --surface: #17232a;
    --ink: #e8e6e1;
    --muted: #9aa7ae;
    --line: #26353d;
    --hero-bg: #0b1216;
    --shadow: none;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.55 Inter, system-ui, -apple-system, Segoe UI, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); }
.wrap { max-width: 1100px; margin: 0 auto; padding: 0 16px; }
h1, h2 { font-family: Fraunces, Georgia, serif; line-height: 1.15; margin: 0; }
h2 { font-size: 1.3rem; margin-bottom: 14px; }

/* Hero */
.hero { background: var(--hero-bg); color: var(--hero-ink); padding: 48px 0 40px; }
.eyebrow { text-transform: uppercase; letter-spacing: .12em; font-size: .78rem; font-weight: 600; color: var(--accent); margin: 0 0 10px; }
.hero h1 { font-size: clamp(1.9rem, 5vw, 3.2rem); max-width: 18ch; }
.hero h1 em { font-style: normal; color: var(--accent); }
.lede { color: var(--hero-muted); font-size: 1.1rem; margin: 12px 0 28px; max-width: 55ch; }
.headline-progress { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.big-number { font-family: Fraunces, Georgia, serif; font-weight: 700; font-size: clamp(2.4rem, 8vw, 4rem); line-height: 1; font-variant-numeric: tabular-nums; }
.big-number small { font-family: Inter, sans-serif; font-weight: 500; font-size: 1.05rem; color: var(--hero-muted); }
.units { display: inline-flex; background: var(--track); border-radius: 999px; padding: 3px; }
.units button { border: 0; background: none; color: var(--hero-muted); font: inherit; font-size: .85rem; font-weight: 600; padding: 6px 14px; border-radius: 999px; cursor: pointer; }
.units button.active { background: var(--hero-ink); color: var(--hero-bg); }
.bar { position: relative; height: 14px; background: var(--track); border-radius: 999px; overflow: hidden; margin: 16px 0 8px; }
.bar-fill { height: 100%; width: 0; background: var(--accent); border-radius: 999px; transition: width 1.2s cubic-bezier(.2,.8,.2,1); }
.bar-caption { color: var(--hero-muted); margin: 0; font-variant-numeric: tabular-nums; }
.bar-goal { position: absolute; top: 0; bottom: 0; width: 3px; margin-left: -1px; background: var(--hero-ink); border-radius: 2px; }
.goal-caption { color: var(--hero-muted); margin: 4px 0 0; font-variant-numeric: tabular-nums; }
.goal-caption .ahead { color: #7ddc96; font-weight: 600; }
.goal-caption .behind { color: #ffb86b; font-weight: 600; }
.mini-bar { height: 8px; max-width: 360px; margin-top: 8px; background: var(--track); border-radius: 999px; overflow: hidden; }
.mini-fill { height: 100%; width: 0; background: var(--accent); border-radius: 999px; transition: width 1.2s cubic-bezier(.2,.8,.2,1); }
.cta-row { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 26px; }
.btn { display: inline-block; padding: 12px 22px; border-radius: 999px; font-weight: 600; text-decoration: none; transition: transform .15s, opacity .15s; }
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-ghost { color: var(--hero-ink); box-shadow: inset 0 0 0 1.5px var(--track); }
.raised { margin-top: 18px; color: var(--hero-muted); }
.raised strong { color: var(--hero-ink); font-size: 1.2rem; }

/* Cards */
main { display: grid; gap: 20px; margin-top: -0px; padding-top: 24px; padding-bottom: 24px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); min-width: 0; }
main > *, .grid-2 > * { min-width: 0; }
.grid-2 { display: grid; gap: 20px; grid-template-columns: 1.4fr 1fr; }
@media (max-width: 820px) { .grid-2 { grid-template-columns: 1fr; } }

/* Map */
.map-card { padding: 0; overflow: hidden; }
#map { height: min(78vh, 720px); min-height: 380px; background: var(--line); }
.next { padding: 14px 20px; border-top: 1px solid var(--line); color: var(--muted); }
.next strong { color: var(--ink); }
.walker-pin { position: relative; width: 56px; height: 66px; }
.walker-pin img { display: block; width: 56px; height: 56px; border-radius: 50%; object-fit: cover; border: 3px solid var(--accent); background: #fff; animation: pulse 2s infinite; }
.walker-pin::after { content: ""; position: absolute; left: 50%; bottom: 0; transform: translateX(-50%); border: 7px solid transparent; border-bottom: 0; border-top: 11px solid var(--accent); }
.walker-icon { width: 22px; height: 22px; border-radius: 50%; background: var(--accent); border: 3px solid #fff; box-shadow: 0 0 0 0 var(--accent); animation: pulse 2s infinite; }
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 60%, transparent); }
  70% { box-shadow: 0 0 0 16px transparent; }
  100% { box-shadow: 0 0 0 0 transparent; }
}
.leaflet-popup-content { font: 14px/1.45 Inter, sans-serif; }

/* Stats */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow); }
.stat .label { color: var(--muted); font-size: .82rem; font-weight: 500; }
.stat .value { font-size: 1.6rem; font-weight: 700; font-variant-numeric: tabular-nums; margin-top: 2px; }
.stat .sub { color: var(--muted); font-size: .8rem; }

/* Chart */
.chart-box { position: relative; height: 300px; }

/* Milestones */
.milestones { list-style: none; margin: 0; padding: 0; max-height: 340px; overflow-y: auto; }
.milestones li { display: grid; grid-template-columns: 18px 1fr auto; gap: 10px; align-items: baseline; padding: 7px 0; border-bottom: 1px solid var(--line); color: var(--muted); }
.milestones li:last-child { border-bottom: 0; }
.milestones .dot { width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--line); align-self: center; }
.milestones li.reached { color: var(--ink); }
.milestones li.reached .dot { background: var(--accent); border-color: var(--accent); }
.milestones li.next .dot { border-color: var(--accent); }
.milestones .name { font-weight: 600; }
.milestones .note { font-size: .82rem; color: var(--muted); font-weight: 400; display: block; }
.milestones .dist { font-variant-numeric: tabular-nums; font-size: .85rem; white-space: nowrap; }

/* Support / donations / help */
.support-row:has(#donations[hidden]) { grid-template-columns: 1fr; }
.donation-list { list-style: none; margin: 0; padding: 0; max-height: 360px; overflow-y: auto; }
.donation-list li { padding: 10px 0; border-bottom: 1px solid var(--line); }
.donation-list li:last-child { border-bottom: 0; }
.donation-list .top { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.donation-list .name { font-weight: 600; }
.donation-list .amount { font-weight: 700; color: var(--accent); font-variant-numeric: tabular-nums; white-space: nowrap; }
.donation-list .msg { color: var(--ink); margin: 2px 0 0; font-size: .92rem; }
.donation-list .when { color: var(--muted); font-size: .8rem; }
.support p { max-width: 65ch; }
.charity-name { font-weight: 600; }
.help ul { margin: 0; padding-left: 18px; }
.help li { margin: 4px 0; }
.footer { color: var(--muted); font-size: .85rem; padding-bottom: 40px; }
