:root {
  --bg: #f3efe6;
  --card: #fffdf8;
  --ink: #1c1914;
  --muted: #6b6458;
  --line: #ddd4c4;
  --green: #1f6b4a;
  --green-2: #15803d;
  --idea: #1d4ed8;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.45 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.wrap {
  max-width: 1100px;
  margin: auto;
  padding: 20px 18px 80px;
}

.top {
  display: flex;
  align-items: baseline;
  gap: 12px;
  font-size: 14px;
}

.top a {
  color: var(--muted);
  text-decoration: none;
}

.top a:hover { color: var(--ink); }

h1 {
  font-size: clamp(42px, 8vw, 72px);
  letter-spacing: -0.055em;
  margin: 28px 0 8px;
}

h2 {
  font-size: clamp(22px, 3vw, 28px);
  letter-spacing: -0.03em;
  margin: 36px 0 10px;
}

.sub {
  color: var(--muted);
  margin: 0 0 22px;
  max-width: 46em;
}

.lead {
  font-size: 18px;
  line-height: 1.45;
  max-width: 42em;
  margin: 0 0 18px;
}

.hero {
  margin: 8px 0 22px;
}
.hero img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 16px;
  border: 1px solid var(--line);
}
.hero figcaption {
  color: var(--muted);
  font-size: 14px;
  margin: 8px 2px 0;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin: 22px 0 8px;
}

.metric {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px 18px;
}

.metric strong {
  display: block;
  font-size: clamp(22px, 3.4vw, 34px);
  letter-spacing: -0.04em;
}

.metric span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}
.metric a { color: var(--green); }
.metrics.compare {
  grid-template-columns: 1fr 1fr;
}

.map-wrap {
  width: 100%;
  height: min(72vh, 640px);
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  background: var(--card);
}

#map { width: 100%; height: 100%; }

.map-layers {
  background: #fffdf8ee;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px 10px;
  font-size: 13px;
  line-height: 1.55;
  color: var(--ink);
  box-shadow: 0 1px 4px #0001;
}
.map-layers label {
  display: flex;
  align-items: center;
  gap: 7px;
  cursor: pointer;
  user-select: none;
}
.map-layers label + label { margin-top: 4px; }
.map-layers input { margin: 0; }
.map-layers i {
  display: inline-block;
  width: 14px;
  height: 3px;
  border-radius: 2px;
  flex: 0 0 14px;
}
.map-layers i.bike { background: #0f766e; }
.map-layers i.muni { background: #c2410c; }

.map-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 13px;
  color: var(--muted);
  margin: 10px 0 0;
}

.map-legend i {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 3px;
  margin-right: 6px;
  vertical-align: middle;
  border: 1px solid #3333;
}

.where-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 24px;
  margin: 8px 0 22px;
  align-items: start;
}
.where-split .kind-block { margin: 0; }
.where-split .buckets { grid-template-columns: 1fr; }
.kind-block { margin: 8px 0 22px; }
.kind-head {
  font-size: 16px;
  letter-spacing: -0.02em;
  margin: 8px 0 10px;
}
.kind-block.planned .kind-head { color: var(--green); }
.kind-block.idea .kind-head { color: var(--idea); }
.kind-head i {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 3px;
  margin-right: 8px;
  vertical-align: middle;
  border: 1px solid #3333;
}
.buckets {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin: 12px 0 8px;
}

.bucket {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px 18px;
  cursor: pointer;
}
.bucket b { display: block; margin-bottom: 6px; }
.bucket a { color: var(--green); }
.bucket b i {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 3px;
  margin-right: 8px;
  vertical-align: middle;
  border: 1px solid #3333;
}
.bucket p { margin: 0; color: var(--muted); font-size: 14px; }
.bucket-sketch {
  display: block;
  width: 100%;
  height: auto;
  margin: 8px 0 10px;
  border-radius: 10px;
  border: 1px solid var(--line);
}
.compare {
  --pos: 50%;
  --ratio: 16/9;
  position: relative;
  aspect-ratio: var(--ratio);
  margin: 8px 0 10px;
  border-radius: 10px;
  border: 1px solid var(--line);
  overflow: hidden;
  cursor: ew-resize;
  touch-action: none;
  background: #ddd8cc;
  container-type: size;
}
.compare > img,
.compare-clip img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  pointer-events: none;
  display: block;
}
.compare-clip {
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--pos);
  overflow: hidden;
}
.compare-clip img {
  width: 100cqw;
  height: 100cqh;
  max-width: none;
}
.compare-bar {
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--pos);
  width: 2px;
  margin-left: -1px;
  background: #fff;
  box-shadow: 0 0 0 1px #0003;
  pointer-events: none;
}
.compare-bar::after {
  content: "‹ ›";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 28px;
  height: 28px;
  margin: -14px 0 0 -14px;
  border-radius: 50%;
  background: #fff;
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: -1px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1px 4px #0003;
}
.compare-tag {
  position: absolute;
  bottom: 8px;
  z-index: 1;
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.02em;
  background: #1c1914cc;
  color: #fff;
  padding: 2px 7px;
  border-radius: 6px;
  pointer-events: none;
}
.compare-tag.now { left: 8px; }
.compare-tag.sketch { right: 8px; }
.bucket .nums {
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  margin-bottom: 8px;
}
.bucket:hover { background: #f7f1e4; }
.station-list {
  list-style: none;
  margin: 10px 0 0;
  padding: 0;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}
.station-list li {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 2px 0;
  color: var(--ink);
}
.station-list li.over span:last-child { color: var(--green); }

.table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--card);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

th, td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  text-align: right;
  font-variant-numeric: tabular-nums;
}

th:first-child, td:first-child { text-align: left; }
th { color: var(--muted); font-weight: 650; cursor: pointer; }
tr.is-park td { color: var(--muted); }
tr:hover td { background: #f7f1e4; }
.timeline {
  list-style: none;
  margin: 8px 0 24px 10.4rem;
  padding: 0;
  border-left: 2px solid var(--line);
}
.timeline li {
  position: relative;
  padding: 0 0 14px 16px;
}
.timeline li:last-child { padding-bottom: 0; }
.timeline time {
  position: absolute;
  left: -10.4rem;
  width: 9.6rem;
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-weight: 650;
  font-size: 14px;
  line-height: 1.45;
}
.timeline li::before {
  content: "";
  position: absolute;
  left: -5px;
  top: 6px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ink);
  border: 2px solid var(--bg);
}
.timeline p {
  margin: 0;
  color: var(--ink);
  font-size: 15px;
  line-height: 1.45;
}
.timeline .future,
.timeline .future time,
.timeline .future p {
  color: var(--idea);
}
.timeline .future::before {
  background: var(--idea);
}
.built-stat {
  margin: 0 0 8px;
  font-size: 15px;
  line-height: 1.45;
  max-width: 42em;
}
.built-stat strong {
  display: block;
  font-size: clamp(28px, 4vw, 40px);
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
  margin-bottom: 4px;
}

.growth {
  margin: 14px 0 28px;
}
.growth svg {
  display: block;
  width: 100%;
  height: auto;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
}
.growth figcaption {
  color: var(--ink);
  font-size: 15px;
  font-weight: 650;
  margin: 0 2px 8px;
}

.why h3 {
  font-size: 18px;
  letter-spacing: -0.025em;
  margin: 22px 0 8px;
}
.why p {
  margin: 0 0 12px;
  max-width: 46em;
}
.why a { color: var(--green); }

.note, .sources {
  color: var(--muted);
  font-size: 14px;
  max-width: 52em;
}

.sources a { color: var(--green); }
.sources ul { padding-left: 1.15em; }

.leaflet-popup-content b { display: block; font-size: 16px; margin-bottom: 6px; }
.leaflet-popup-content { font-size: 14px; line-height: 1.4; }

@media (max-width: 900px) {
  .metrics { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 700px) {
  .metrics, .buckets, .where-split { grid-template-columns: 1fr; }
  .metrics.compare { grid-template-columns: 1fr 1fr; }
  .map-wrap { height: 520px; }
  .timeline { margin-left: 8.8rem; }
  .timeline time { left: -8.8rem; width: 8rem; font-size: 13px; }
}
