/* Reach map page. Scoped to body.reach; the shared ../styles.css sets the site's base. Light theme only. */
.reach {
  --r-ink: #1a1d23;
  --r-muted: #5b6270;
  --r-line: #d9dde3;
  --r-surface: #ffffff;
  --r-tint: #f4f6f9;
  --r-link: #1757ac;
  --r-dot: #f47230;
  --r-sel: #1a1d23;
  margin: 0;
  background: var(--r-surface);
  color: var(--r-ink);
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.6;
}
.reach a { color: var(--r-link); }
.reach *, .reach *::before, .reach *::after { box-sizing: border-box; }
.r-top, .r-main, .r-foot { max-width: 80rem; margin: 0 auto; padding: 0 16px; }
.r-top { padding-top: 16px; padding-bottom: 8px; }
.r-home { display: inline-flex; align-items: center; min-height: 44px; font-weight: 600; text-decoration: none; }
.r-label { margin: 24px 0 8px; font-weight: 500; color: var(--r-muted); }
.reach h1 { margin: 0 0 16px; font-size: clamp(30px, 5vw, 48px); line-height: 1.15; font-weight: 700; letter-spacing: -0.025em; max-width: 22ch; }
.reach h2 { margin: 48px 0 16px; font-size: clamp(24px, 3vw, 32px); line-height: 1.2; font-weight: 600; }
.reach h3 { margin: 32px 0 12px; font-size: 18px; font-weight: 600; }
.r-lede { margin: 0; font-size: clamp(17px, 2vw, 20px); max-width: 60ch; color: var(--r-ink); }
.r-muted, .r-note { color: var(--r-muted); }

.r-stats { display: grid; gap: 16px; grid-template-columns: 1fr; }
.r-stat { padding: 20px; border: 1px solid var(--r-line); border-radius: 12px; background: var(--r-tint); }
.r-stat p { margin: 0; }
.r-num { font-size: 36px; line-height: 1.1; font-weight: 700; letter-spacing: -0.02em; margin-bottom: 8px !important; }
.r-tablewrap { overflow-x: auto; }
.r-table { width: 100%; border-collapse: collapse; font-size: 15px; }
.r-table th, .r-table td { text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--r-line); }
.r-table th { font-weight: 600; color: var(--r-muted); font-size: 14px; }
.r-table .r-n { text-align: right; font-variant-numeric: tabular-nums; }
.r-linkbtn { font: inherit; color: var(--r-link); background: none; border: 0; padding: 0; min-height: 44px; text-align: left; text-decoration: underline; cursor: pointer; }

.r-controls { display: grid; gap: 12px; grid-template-columns: 1fr; margin-bottom: 16px; }
.r-controls label { display: flex; flex-direction: column; gap: 4px; font-weight: 500; font-size: 14px; }
.r-controls select { font: inherit; font-size: 16px; min-height: 44px; padding: 8px 10px; border: 1px solid var(--r-line); border-radius: 8px; background: var(--r-surface); color: var(--r-ink); width: 100%; }
.r-controls .r-check { flex-direction: row; align-items: center; gap: 10px; min-height: 44px; font-weight: 400; font-size: 15px; }
.r-check input { width: 22px; height: 22px; margin: 0; accent-color: var(--r-link); }

.r-layout { display: grid; gap: 24px; grid-template-columns: minmax(0, 1fr); }
.r-figure { margin: 0; position: relative; }
#map-svg { display: block; width: 100%; height: auto; background: var(--r-surface); touch-action: manipulation; }
#map-svg .c path { stroke: #ffffff; stroke-width: 0.4; vector-effect: non-scaling-stroke; cursor: pointer; }
#map-svg .s path { fill: none; stroke: #ffffff; stroke-width: 1.6; vector-effect: non-scaling-stroke; pointer-events: none; }
#map-svg .s path.on { stroke: var(--r-ink); stroke-width: 1; }
#map-svg .d circle { fill: var(--r-dot); stroke: #ffffff; stroke-width: 1.5; vector-effect: non-scaling-stroke; pointer-events: none; }
#map-svg .sel { fill: none; stroke: var(--r-sel); stroke-width: 2.5; vector-effect: non-scaling-stroke; pointer-events: none; }
.r-tip { position: absolute; pointer-events: none; background: var(--r-surface); border: 1px solid var(--r-line); border-radius: 8px; padding: 6px 10px; font-size: 14px; line-height: 1.4; box-shadow: 0 2px 8px rgba(0,0,0,.12); max-width: 260px; }
.r-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 12px; font-size: 14px; color: var(--r-ink); align-items: center; }
.r-legend .r-ltitle { width: 100%; font-weight: 600; }
.r-key { display: inline-flex; align-items: center; gap: 6px; }
.r-sw { width: 16px; height: 16px; border-radius: 4px; border: 1px solid rgba(0,0,0,.08); display: inline-block; }
.r-sw.r-dotsw { border-radius: 50%; background: var(--r-dot); width: 12px; height: 12px; border: 0; }

.r-card { border: 1px solid var(--r-line); border-radius: 12px; padding: 20px; background: var(--r-surface); align-self: start; }
.r-card h3 { margin: 0 0 4px; font-size: 22px; }
.r-card h4 { margin: 20px 0 8px; font-size: 16px; font-weight: 600; }
.r-card dl { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 16px; margin: 12px 0 0; font-size: 15px; }
.r-card dt { color: var(--r-muted); }
.r-card dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; font-weight: 500; }
.r-card ul { list-style: none; margin: 0; padding: 0; font-size: 15px; }
.r-card li { padding: 8px 0; border-bottom: 1px solid var(--r-line); }
.r-card li a { display: block; min-height: 24px; }
.r-sub { color: var(--r-muted); font-size: 14px; display: block; }
.r-tag { display: inline-block; font-size: 12px; font-weight: 500; padding: 0 6px; border-radius: 4px; background: var(--r-tint); border: 1px solid var(--r-line); color: var(--r-muted); margin-left: 4px; }
.r-more { font: inherit; font-weight: 600; min-height: 44px; margin-top: 8px; padding: 8px 16px; border-radius: 999px; border: 1px solid var(--r-line); background: var(--r-tint); color: var(--r-ink); cursor: pointer; }

.r-defs { margin: 0; }
.r-defs dt { font-weight: 600; margin-top: 16px; }
.r-defs dd { margin: 4px 0 0; max-width: 75ch; }
.r-downloads { margin-top: 24px; }
.r-downloads a { display: inline-flex; align-items: center; min-height: 44px; }
.r-foot { margin-top: 48px; padding-top: 16px; padding-bottom: 32px; border-top: 1px solid var(--r-line); color: var(--r-muted); font-size: 14px; }

@media (min-width: 768px) {
  .r-stats { grid-template-columns: repeat(3, 1fr); }
  .r-controls { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .r-controls .r-check { grid-column: 1 / -1; }
}
@media (min-width: 1100px) {
  .r-layout { grid-template-columns: minmax(0, 2fr) minmax(320px, 1fr); }
  .r-card { position: sticky; top: 16px; max-height: calc(100vh - 32px); overflow-y: auto; }
}
