/* Ground Truth — shared styles, same family as flowers/flashdeck */
:root {
  --bg: #fdfcf9;
  --ink: #22222c;
  --muted: #6b6b76;
  --accent: #7c3aed;
  --line: #e6e2d8;
  --soft: #f5f2ec;
  --river: #cfe0ea;
  --good: #2e7d32;
  --bad: #c62828;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Avenir Next", Avenir, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.55;
  -webkit-tap-highlight-color: transparent;
}
.wrap { max-width: 640px; margin: 0 auto; padding: 18px 14px 60px; }
h1, h2, h3 { font-family: Georgia, "Times New Roman", serif; font-weight: 600; line-height: 1.25; }
h1 { font-size: 28px; margin: 8px 0 4px; }
h2 { font-size: 20px; margin: 22px 0 8px; }
a { color: var(--accent); }
.muted { color: var(--muted); }
.small { font-size: 13px; }

.nav { display: flex; gap: 8px; justify-content: center; margin: 4px 0 14px; }
.nav a {
  text-decoration: none; font-size: 15px; padding: 6px 14px;
  border: 1px solid var(--line); border-radius: 999px; background: #fff; color: var(--ink);
}
.nav a.active { border-color: var(--accent); color: var(--accent); }

.card {
  background: #fff; border: 1px solid var(--line); border-radius: 14px;
  padding: 16px; margin: 12px 0; box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.btn {
  display: inline-block; font: inherit; cursor: pointer;
  background: var(--accent); color: #fff; border: none;
  padding: 10px 20px; border-radius: 10px; font-size: 16px;
}
.btn:disabled { opacity: 0.4; cursor: default; }
.btn.ghost { background: #fff; color: var(--ink); border: 1px solid var(--line); }
.btn.block { display: block; width: 100%; text-align: center; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  font-size: 13px; padding: 4px 12px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--soft); color: var(--muted);
}
.chip.on { border-color: var(--accent); color: var(--accent); background: #fff; }
.chip.locked { opacity: 0.55; }

/* map */
.mapbox { position: relative; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: var(--river); }
.mapbox svg { display: block; width: 100%; height: auto; touch-action: none; }
.borough { fill: var(--soft); stroke: #d8d2c4; stroke-width: 0.8; }
.borough.dim { fill: #efece4; }

/* quiz */
.prompt { text-align: center; margin: 10px 0; }
.prompt .name { font-family: Georgia, serif; font-size: 24px; font-weight: 600; }
.qmeta { display: flex; justify-content: space-between; align-items: center; font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.opts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; }
.opt {
  font: inherit; cursor: pointer; padding: 12px 8px; border-radius: 10px;
  border: 1px solid var(--line); background: #fff; font-size: 15px;
}
.opt.correct { border-color: var(--good); background: #e8f5e9; }
.opt.wrong { border-color: var(--bad); background: #ffebee; }
.opt:disabled { cursor: default; }

.result { text-align: center; margin-top: 10px; }
.result .dist { font-family: Georgia, serif; font-size: 22px; }
.result .dist.good { color: var(--good); }
.result .dist.bad { color: var(--bad); }
.travel { font-size: 13.5px; color: var(--muted); margin-top: 4px; }
.fact {
  font-family: Georgia, serif; font-size: 14.5px; line-height: 1.45;
  color: var(--ink); text-align: left; background: var(--soft);
  border-radius: 10px; padding: 10px 14px; margin-top: 10px;
}

/* stats */
.tiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.tile { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.tile .v { font-family: Georgia, serif; font-size: 26px; font-variant-numeric: tabular-nums; }
.tile .l { font-size: 12.5px; color: var(--muted); }
table.stats { width: 100%; border-collapse: collapse; font-size: 14px; }
table.stats th { text-align: left; font-size: 12px; color: var(--muted); border-bottom: 1px solid var(--line); padding: 4px 6px; }
table.stats td { padding: 6px; border-bottom: 1px solid var(--soft); font-variant-numeric: tabular-nums; }
.bar { height: 8px; background: var(--soft); border-radius: 4px; overflow: hidden; }
.bar > div { height: 100%; background: var(--accent); border-radius: 4px; }
