:root {
  color-scheme: light dark;
  --bg: #f7f5f2;
  --surface: #ffffff;
  --text: #1d1c1a;
  --muted: #6d6a65;
  --line: #e2ddd6;
  --accent: #d06a2c;
  --accent-soft: #f6e7db;
  --danger: #b3402c;
  --radius: 10px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #16181a;
    --surface: #1f2225;
    --text: #e9e6e1;
    --muted: #9a958d;
    --line: #2e3236;
    --accent: #e0894f;
    --accent-soft: #33261d;
    --danger: #d4664f;
  }
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.topbar {
  display: flex; align-items: center; gap: 24px; flex-wrap: wrap;
  padding: 14px 24px; background: var(--surface);
  border-bottom: 1px solid var(--line);
}
.brand { font-weight: 600; color: var(--text); }
.topbar nav { display: flex; gap: 18px; }
.topbar nav a { color: var(--muted); }
.topbar .who { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.topbar .who img { width: 26px; height: 26px; border-radius: 50%; }

main { max-width: 1040px; margin: 0 auto; padding: 24px 20px 60px; }

.card, .hero {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 20px 22px; margin-bottom: 20px;
}
.hero { max-width: 620px; margin: 60px auto; text-align: center; }
h1 { font-size: 22px; margin: 0 0 12px; }
h2 { font-size: 16px; margin: 22px 0 10px; }
h2:first-of-type { margin-top: 0; }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; margin-bottom: 20px; }
.stat {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 16px 18px;
  display: flex; flex-direction: column; gap: 4px;
}
.stat .value { font-size: 26px; font-weight: 600; }
.stat .label { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }

table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; font-weight: 600; color: var(--muted); font-size: 12px;
     text-transform: uppercase; letter-spacing: .04em; padding: 8px 10px 8px 0;
     border-bottom: 1px solid var(--line); }
td { padding: 9px 10px 9px 0; border-bottom: 1px solid var(--line); vertical-align: middle; }
tr:last-child td { border-bottom: none; }

.muted { color: var(--muted); }
.small { font-size: 13px; }
.nowrap { white-space: nowrap; }
.pill { background: var(--accent-soft); color: var(--accent); border-radius: 20px;
        padding: 2px 9px; font-size: 12px; font-weight: 600; }

.banner, .notice {
  background: var(--accent-soft); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 12px 16px; margin-bottom: 20px; font-size: 14px;
}
.banner.warn { border-color: var(--danger); }

#map { height: 420px; border-radius: 8px; overflow: hidden; }

button, .button {
  font: inherit; cursor: pointer; border-radius: 8px; padding: 9px 16px;
  border: 1px solid var(--line); background: var(--surface); color: var(--text);
}
button:hover { border-color: var(--accent); }
.button.strava { background: #fc4c02; border-color: #fc4c02; color: #fff; display: inline-block; }
button.link { border: none; background: none; color: var(--accent); padding: 0; }
button.danger, .card.danger h2 { color: var(--danger); }
form { display: inline; }
.check { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 6px; }
.pager { display: flex; gap: 18px; margin-top: 14px; }

footer {
  max-width: 1040px; margin: 0 auto; padding: 20px; display: flex;
  justify-content: space-between; gap: 16px; flex-wrap: wrap;
  color: var(--muted); font-size: 12px; border-top: 1px solid var(--line);
}
.powered { font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }

/* ---- Verification modal ------------------------------------------------- */
dialog.verify {
  width: min(1000px, 94vw);
  max-height: 92vh;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  overflow: auto;
}
dialog.verify::backdrop { background: rgba(0, 0, 0, .55); }

.verify-head {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  padding: 14px 18px; border-bottom: 1px solid var(--line);
  position: sticky; top: 0; background: var(--surface); z-index: 2;
}
.verify-head h2 { margin: 0; font-size: 16px; flex: 1 1 200px; }
.scope { display: flex; gap: 6px; }
.scope button { padding: 4px 10px; font-size: 13px; }
.scope button.on { border-color: var(--accent); color: var(--accent); }

#verify-map { height: 340px; }

.verify-profile { padding: 10px 18px 4px; border-top: 1px solid var(--line); }
#verify-profile { width: 100%; height: auto; display: block; }
#verify-profile .track { fill: none; stroke: var(--accent); stroke-width: 1.6; }
#verify-profile .grid { stroke: var(--line); stroke-width: 1; }
#verify-profile .axis { fill: var(--muted); font-size: 11px; }
#verify-profile .poi { stroke: var(--muted); stroke-width: 1; stroke-dasharray: 3 3; }
#verify-profile .poi.focus { stroke: var(--accent); stroke-width: 1.6; stroke-dasharray: none; }
#verify-profile .poi.target { stroke-dasharray: 4 3; }
#verify-profile .crosshair { stroke: var(--text); stroke-width: 1; opacity: .45; }
#verify-profile .dot { fill: var(--accent); stroke: var(--surface); stroke-width: 2; }

#verify-list { padding: 6px 18px 18px; display: grid; gap: 10px; }
.verify-card {
  border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px;
}
.verify-card.focus { border-color: var(--accent); }
.verify-card header { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.verify-card p { margin: 6px 0 10px; }
.verify-actions { display: flex; gap: 10px; align-items: center; }

/* Markers drawn by the modal's map. */
.poi-marker {
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--muted); border: 2px solid #fff; cursor: pointer;
}
.poi-marker.focus { background: var(--accent); width: 16px; height: 16px; }
.cursor-marker {
  width: 12px; height: 12px; border-radius: 50%;
  background: #fff; border: 3px solid var(--accent); pointer-events: none;
}

tr.settled { opacity: .45; }
