:root {
  color-scheme: light;
  --page: #eef2f3;
  --surface: #fbfcfc;
  --ink: #15212b;
  --muted: #52606b;
  --line: #d5dde1;
  --grid: #e3e9ec;
  --run: #2a78d6;
  --row: #eb6834;
  --walk: #1baf7a;
  --kayak: #eda100;
  --other: #9aa5ad;
  --ref: #8a96a0;
  --good: #1d8a5a;
  --warn: #b26a00;
  --head: "Barlow Condensed", "Arial Narrow", sans-serif;
  --body: "Source Sans 3", "Segoe UI", system-ui, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --page: #10181e;
    --surface: #18222a;
    --ink: #eef2f4;
    --muted: #a9b6bf;
    --line: #2c3a44;
    --grid: #23303a;
    --run: #3987e5;
    --row: #d95926;
    --walk: #199e70;
    --kayak: #c98500;
    --other: #6d7b85;
    --ref: #7d8b95;
    --good: #3fb37f;
    --warn: #e0a040;
  }
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--page); color: var(--ink); font: 16px/1.5 var(--body); }
.muted, .note { color: var(--muted); }
.note { font-size: 14px; margin: 0 0 10px; }
h1, h2, .brand, .big { font-family: var(--head); letter-spacing: .01em; }

.top { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px clamp(16px, 4vw, 40px); background: var(--ink); color: var(--page); position: sticky; top: 0; z-index: 3; }
.brand { font-size: 26px; font-weight: 700; }
.tabs { display: flex; gap: 4px; }
.tabs button { font: 600 15px var(--body); color: inherit; background: none; border: 0; padding: 6px 12px; border-radius: 6px; cursor: pointer; opacity: .72; }
.tabs button[aria-selected="true"] { opacity: 1; background: color-mix(in srgb, var(--page) 16%, transparent); }
.tabs button:focus-visible, a:focus-visible { outline: 2px solid var(--run); outline-offset: 2px; }

.road { background: var(--ink); color: var(--page); padding: 6px clamp(16px, 4vw, 40px) 18px; }
.road-head { max-width: 72ch; }
.road h1 { font-size: clamp(34px, 6vw, 56px); line-height: 1; margin: 6px 0 4px; font-weight: 700; }
.road .muted { color: color-mix(in srgb, var(--page) 70%, transparent); margin: 0; }
.road-chart { min-height: 150px; margin-top: 8px; }
.road-chart text { fill: color-mix(in srgb, var(--page) 75%, transparent); }

main, .foot { padding: 18px clamp(16px, 4vw, 40px); max-width: 1240px; margin: 0 auto; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 170px), 1fr)); gap: 12px; margin-bottom: 14px; }
.stat { background: var(--surface); border-left: 4px solid var(--run); border-radius: 4px; padding: 12px 14px; }
.stat .label { font-size: 14px; color: var(--muted); }
.stat .big { font-size: 40px; font-weight: 600; line-height: 1.05; margin: 2px 0; font-variant-numeric: tabular-nums; }
.stat .sub { font-size: 13px; color: var(--muted); }
.section-head { margin: 22px 0 10px; }
.section-head h2 { font-size: 30px; font-weight: 600; margin: 0; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 440px), 1fr)); gap: 14px; margin-bottom: 14px; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 16px; min-width: 0; }
.panel.wide { margin-bottom: 14px; }
.panel h2 { font-size: 24px; font-weight: 600; margin: 0 0 2px; }
.chart { position: relative; min-height: 200px; }
.chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart text { font: 12px var(--body); fill: var(--muted); }
.legend { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 5px; vertical-align: -1px; }
.tablewrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: 14px; font-variant-numeric: tabular-nums; }
th, td { text-align: left; padding: 7px 10px; border-bottom: 1px solid var(--line); }
th { color: var(--muted); font-weight: 600; }
.num { text-align: right; white-space: nowrap; }
td:first-child { white-space: nowrap; }
tr.now td { background: color-mix(in srgb, var(--run) 12%, transparent); }
.list { margin: 6px 0 0; padding-left: 1.1em; }
.list li { margin-bottom: 6px; }
.tip { position: fixed; pointer-events: none; z-index: 5; background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: 6px; padding: 6px 9px; font-size: 13px; box-shadow: 0 4px 14px rgba(0,0,0,.18); white-space: nowrap; }
.tip b { display: block; color: var(--muted); font-weight: 600; }
.shoe-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 18px; }
.shoe-head .big { font-size: 52px; font-weight: 600; line-height: 1; }
.meter { height: 14px; border-radius: 7px; background: var(--grid); overflow: hidden; margin: 12px 0 6px; position: relative; }
.meter span { display: block; height: 100%; background: var(--run); }
.foot { font-size: 13px; }
@media (max-width: 560px) { .brand { font-size: 22px; } .tabs button { padding: 6px 8px; font-size: 14px; } }
@media (prefers-reduced-motion: no-preference) { .road-chart path.plan { animation: draw 1.2s ease-out both; stroke-dasharray: 2000; } @keyframes draw { from { stroke-dashoffset: 2000; } to { stroke-dashoffset: 0; } } }
