:root {
  --blue: #0066cc;
  --blue-focus: #0071e3;
  --blue-dark: #2997ff;
  --ink: #1d1d1f;
  --muted: #6e6e73;
  --hairline: #d2d2d7;
  --soft-divider: #e8e8ed;
  --white: #ffffff;
  --parchment: #f5f5f7;
  --pearl: #fafafc;
  --black: #000000;
  --dark: #272729;
  --dark-2: #2a2a2c;
  --radius-card: 18px;
  --radius-small: 8px;
  --radius-pill: 9999px;
  --max: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--white);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", sans-serif;
  font-size: 17px;
  font-weight: 400;
  line-height: 1.47;
  letter-spacing: -0.01em;
}
button, input, select { font: inherit; }
a { color: inherit; }

.skip-link {
  position: fixed;
  z-index: 1000;
  left: 16px;
  top: -60px;
  padding: 10px 18px;
  color: var(--white);
  background: var(--blue);
  border-radius: var(--radius-pill);
}
.skip-link:focus { top: 12px; }

.global-nav {
  position: sticky;
  top: 0;
  z-index: 900;
  height: 44px;
  color: rgba(255,255,255,.86);
  background: var(--black);
  font-size: 12px;
  letter-spacing: -.01em;
}
.nav-inner, .sub-nav-inner, footer {
  width: min(calc(100% - 40px), var(--max));
  margin: 0 auto;
}
.nav-inner {
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.wordmark { display: flex; align-items: center; gap: 9px; font-weight: 600; text-decoration: none; }
.pulse-mark { width: 12px; height: 12px; border: 2px solid var(--white); border-radius: 50%; position: relative; }
.pulse-mark::after { content: ""; position: absolute; width: 3px; height: 3px; background: var(--white); border-radius: 50%; inset: 2.5px; }
.global-nav nav { display: flex; gap: 26px; }
.global-nav nav a { text-decoration: none; }
.global-nav nav a:hover { color: var(--white); }

.sub-nav {
  position: sticky;
  top: 44px;
  z-index: 850;
  height: 52px;
  border-bottom: 1px solid rgba(0,0,0,.08);
  background: rgba(245,245,247,.82);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
}
.sub-nav-inner { height: 52px; display: flex; align-items: center; justify-content: space-between; font-size: 14px; }
.sub-actions { display: flex; gap: 10px; align-items: center; }
.live-dot { display: inline-block; width: 7px; height: 7px; margin-right: 7px; border-radius: 50%; background: var(--blue); }
.text-action { border: 0; color: var(--blue); background: transparent; min-height: 44px; padding: 0 12px; cursor: pointer; }
.primary-button, .secondary-button {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-pill);
  padding: 9px 20px;
  text-decoration: none;
  cursor: pointer;
  transition: transform .15s ease;
}
.primary-button { border: 1px solid var(--blue); color: var(--white); background: var(--blue); }
.secondary-button { border: 1px solid var(--blue); color: var(--blue); background: transparent; }
.primary-button:active, .secondary-button:active, .text-action:active { transform: scale(.95); }
.primary-button:focus-visible, .secondary-button:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible { outline: 2px solid var(--blue-focus); outline-offset: 3px; }
.large { padding: 11px 23px; }

.hero {
  min-height: 680px;
  padding: 104px max(24px, calc((100vw - var(--max))/2)) 80px;
  display: grid;
  grid-template-columns: 1.35fr .65fr;
  align-items: center;
  gap: 72px;
  background: var(--white);
}
.eyebrow { margin: 0 0 14px; color: var(--muted); font-size: 14px; font-weight: 600; letter-spacing: .02em; }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { font-family: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Display", sans-serif; font-weight: 600; letter-spacing: -.025em; }
h1 { max-width: 760px; margin-bottom: 24px; font-size: clamp(48px, 7vw, 80px); line-height: 1.02; }
h2 { margin-bottom: 18px; font-size: clamp(38px, 5vw, 56px); line-height: 1.07; }
h3 { margin-bottom: 12px; font-size: 24px; line-height: 1.18; }
.hero-lead { max-width: 720px; color: var(--muted); font-size: clamp(21px, 2.3vw, 28px); line-height: 1.25; letter-spacing: -.01em; }
.hero-actions { display: flex; gap: 12px; margin-top: 34px; }
.hero-metrics { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 1px solid var(--hairline); }
.hero-metrics article { padding: 22px 0; border-bottom: 1px solid var(--hairline); }
.hero-metrics article:nth-child(odd) { padding-right: 18px; }
.hero-metrics article:nth-child(even) { padding-left: 18px; border-left: 1px solid var(--hairline); }
.hero-metrics span { display: block; font-size: 40px; font-weight: 600; line-height: 1.05; letter-spacing: -.03em; }
.hero-metrics small { color: var(--muted); font-size: 14px; }

.section { padding: 96px max(24px, calc((100vw - var(--max))/2)); }
.section.light { background: var(--white); }
.section.parchment { background: var(--parchment); }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 40px; margin-bottom: 48px; }
.section-heading > div { max-width: 760px; }
.section-lead { color: var(--muted); font-size: 21px; }
.route-controls { display: grid; grid-template-columns: repeat(2, minmax(190px, 1fr)); gap: 12px; }
.route-scope { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr; padding: 3px; border: 1px solid var(--hairline); border-radius: var(--radius-pill); background: var(--parchment); }
.scope-button { min-height: 38px; padding: 7px 14px; border: 0; border-radius: var(--radius-pill); color: var(--muted); background: transparent; cursor: pointer; font-size: 13px; }
.scope-button[aria-pressed="true"] { color: var(--ink); background: var(--white); box-shadow: 0 1px 5px rgba(0,0,0,.08); font-weight: 600; }
.route-control { display: grid; gap: 7px; min-width: 230px; color: var(--muted); font-size: 14px; }
select { width: 100%; height: 44px; padding: 0 40px 0 16px; border: 1px solid var(--hairline); border-radius: var(--radius-pill); color: var(--ink); background: var(--white); }
select:disabled { color: var(--muted); background: var(--parchment); cursor: not-allowed; }

.network-grid { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(270px, .75fr); gap: 24px; }
.map-shell, .route-focus, .context-card, .mode-card, .alternatives-panel { border: 1px solid var(--hairline); background: var(--white); border-radius: var(--radius-card); }
.map-shell { overflow: hidden; }
.map-stage { position: relative; }
#map { height: 520px; background: var(--parchment); }
.map-layer-control { position: absolute; z-index: 500; top: 14px; right: 14px; width: 172px; margin: 0; padding: 13px 14px; border: 1px solid rgba(0,0,0,.12); border-radius: 14px; background: rgba(255,255,255,.92); box-shadow: 0 8px 28px rgba(0,0,0,.12); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); }
.map-layer-control legend { padding: 0 3px; color: var(--muted); font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.map-layer-control label { display: flex; align-items: center; gap: 8px; min-height: 29px; font-size: 12px; cursor: pointer; }
.map-layer-control input { accent-color: var(--blue); }
.map-caption { min-height: 62px; padding: 12px 18px; display: flex; align-items: center; justify-content: space-between; gap: 20px; color: var(--muted); font-size: 14px; }
.map-caption span:first-child { color: var(--ink); font-weight: 600; }
.route-focus { padding: 30px; }
.focus-status { min-height: 76px; color: var(--muted); font-size: 21px; line-height: 1.3; }
.metric-list { margin: 30px 0; }
.metric-list div { padding: 13px 0; display: flex; justify-content: space-between; border-top: 1px solid var(--soft-divider); }
.metric-list dt { color: var(--muted); }
.metric-list dd { margin: 0; font-weight: 600; }
.metric-list .metric-subtext { display: block; margin-top: 2px; color: var(--muted); font-size: 11px; font-weight: 400; text-align: right; }
.issue-details { display: grid; gap: 8px; margin: -10px 0 24px; }
.issue-card { width: 100%; padding: 12px 14px; border: 1px solid #ffd7a8; border-radius: 12px; color: var(--ink); background: #fff8ed; text-align: left; }
button.issue-card { cursor: pointer; }
.issue-card strong, .issue-card span { display: block; }
.issue-card span { margin-top: 3px; color: var(--muted); font-size: 12px; }
.fine-print { color: var(--muted); font-size: 12px; line-height: 1.45; letter-spacing: 0; }
.route-list-header { margin: 72px 0 24px; display: flex; align-items: baseline; justify-content: space-between; gap: 32px; }
.route-list-header h3 { margin: 0; }
.route-list-header p { max-width: 570px; margin: 0; color: var(--muted); font-size: 14px; }
.route-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.route-card { min-height: 190px; padding: 24px; border: 1px solid var(--hairline); border-radius: var(--radius-card); background: var(--white); cursor: pointer; }
.route-card[aria-pressed="true"] { border-color: var(--blue-focus); }
.route-card:active { transform: scale(.98); }
.route-card .route-number { font-size: 32px; font-weight: 600; line-height: 1; }
.route-card .direction { color: var(--muted); font-size: 12px; }
.route-card .health { margin: 30px 0 7px; font-weight: 600; }
.route-card .detail { color: var(--muted); font-size: 14px; }
.route-card .card-action { display: inline-block; margin-top: 12px; color: var(--blue); font-size: 13px; font-weight: 600; }
.coverage-note { margin: 0 0 24px; padding: 14px 16px; border-radius: 12px; color: var(--muted); background: var(--parchment); font-size: 13px; }

.dark { color: var(--white); background: var(--dark); }
.dark .eyebrow, .dark-heading p, .dark-columns p { color: #cccccc; }
.dark-heading { max-width: 820px; margin-bottom: 64px; }
.dark-heading p:last-child { max-width: 700px; font-size: 21px; }
.dark-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 70px; }
.dark-columns h3 { margin-bottom: 24px; }
.event-item { padding: 20px 0; border-top: 1px solid rgba(255,255,255,.16); }
.event-item strong { display: block; margin-bottom: 6px; }
.event-item p { margin-bottom: 0; font-size: 14px; }
.event-scope { display: inline-block; margin: 0 0 7px; padding: 3px 8px; border: 1px solid rgba(255,255,255,.22); border-radius: var(--radius-pill); color: #d7d7dc; font-size: 11px; }
.dark .empty-state { padding: 30px 0; color: #cccccc; border-top: 1px solid rgba(255,255,255,.16); }

.journey-heading { align-items: center; }
.prototype-chip { padding: 9px 15px; border: 1px solid var(--hairline); border-radius: var(--radius-pill); color: var(--muted); background: var(--white); font-size: 14px; white-space: nowrap; }
.nearby-stops-card { margin-bottom: 24px; padding: 28px; border: 1px solid var(--hairline); border-radius: var(--radius-card); background: rgba(255,255,255,.72); }
.nearby-stops-copy { max-width: 760px; }
.nearby-stops-copy .eyebrow { margin-bottom: 7px; }
.nearby-stops-copy h3 { margin-bottom: 8px; }
.nearby-stops-copy > p:last-child { margin: 0; color: var(--muted); }
.nearby-stops-controls { display: flex; align-items: end; gap: 12px; margin-top: 22px; }
.nearby-radius-control { display: grid; gap: 7px; color: var(--muted); font-size: 14px; }
.nearby-radius-control select { min-width: 140px; height: 46px; padding: 0 38px 0 14px; border: 1px solid var(--hairline); border-radius: 12px; color: var(--ink); background: var(--white); }
.nearby-location-button { min-height: 46px; }
.nearby-location-button:disabled { opacity: .58; cursor: wait; }
.nearby-privacy { margin: 14px 0 0; color: var(--muted); font-size: 13px; }
.nearby-status { margin: 18px 0 0; color: var(--ink); font-size: 14px; font-weight: 600; }
.nearby-status.error { color: #b42318; }
.nearby-results { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 14px; }
.nearby-results:empty { display: none; }
.nearby-stop-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px 18px; padding: 18px; border: 1px solid var(--hairline); border-radius: 14px; background: var(--white); }
.nearby-stop-item h4 { margin: 0; font-size: 16px; }
.nearby-stop-item p { margin: 5px 0 0; color: var(--muted); font-size: 13px; }
.nearby-distance { color: var(--blue); font-size: 14px; white-space: nowrap; }
.nearby-stop-actions { grid-column: 1 / -1; display: flex; gap: 8px; padding-top: 3px; }
.nearby-stop-actions button { min-height: 36px; padding: 6px  10px; border: 1px solid var(--hairline); border-radius: var(--radius-pill); color: var(--blue); background: var(--white); cursor: pointer; }
.nearby-stop-actions button:hover { background: #f5faff; }
.planner-form { display: grid; grid-template-columns: minmax(0, 1fr) 48px minmax(0, 1fr) auto; align-items: end; gap: 12px; margin-bottom: 12px; padding: 24px; border: 1px solid var(--hairline); border-radius: var(--radius-card); background: var(--white); }
.planner-field { position: relative; display: grid; gap: 7px; color: var(--muted); font-size: 14px; }
.planner-field-heading { min-height: 30px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.planner-field-heading label { color: var(--muted); }
.stop-browse-button { min-height: 30px; padding: 3px 8px; border: 0; border-radius: 8px; color: var(--blue); background: transparent; font: inherit; font-weight: 600; cursor: pointer; }
.stop-browse-button:hover, .stop-browse-button[aria-expanded="true"] { background: #eaf4ff; }
.planner-field input { width: 100%; height: 48px; padding: 0 16px; border: 1px solid var(--hairline); border-radius: 12px; color: var(--ink); background: var(--white); }
.stop-suggestions { position: absolute; z-index: 800; top: calc(100% + 6px); left: 0; right: 0; max-height: 330px; overflow-y: auto; padding: 6px; border: 1px solid var(--hairline); border-radius: 14px; background: var(--white); box-shadow: 0 18px 50px rgba(0,0,0,.14); }
.stop-suggestions[hidden] { display: none; }
.stop-list-summary { position: sticky; z-index: 1; top: -6px; margin: -6px -6px 4px; padding: 10px 12px; border-bottom: 1px solid var(--soft-divider); color: var(--muted); background: rgba(255,255,255,.96); font-size: 12px; }
.stop-list-empty { margin: 0; padding: 14px 12px; color: var(--muted); }
.stop-options { display: grid; }
.stop-suggestions button { width: 100%; display: grid; gap: 2px; padding: 11px 12px; border: 0; border-radius: 9px; color: var(--ink); background: transparent; text-align: left; cursor: pointer; }
.stop-suggestions button:hover, .stop-suggestions button:focus-visible { background: var(--parchment); }
.stop-suggestions strong { font-size: 14px; }
.stop-suggestions span { color: var(--muted); font-size: 12px; }
.swap-button { width: 48px; height: 48px; border: 1px solid var(--hairline); border-radius: 50%; color: var(--blue); background: var(--white); cursor: pointer; }
.planner-submit { height: 48px; white-space: nowrap; }
.planner-submit:disabled { opacity: .58; cursor: wait; }
.example-trip-button { margin: 0 0 4px 4px; padding-left: 0; }
.planner-status { min-height: 24px; margin: 0 2px 8px; color: var(--muted); font-size: 14px; }
.planner-status.error { color: #b42318; }
.planner-update-notice { margin: 0 0 18px; padding: 12px 16px; border: 1px solid #9bc8f5; border-radius: 12px; color: #084b83; background: #edf6ff; font-size: 14px; }
.planner-update-notice[hidden] { display: none; }
.planner-retry { margin-left: 10px; padding: 4px 10px; border: 1px solid currentColor; border-radius: var(--radius-pill); color: inherit; background: transparent; cursor: pointer; }
.journey-od { margin: 0 0 24px; color: var(--ink); font-size: 21px; font-weight: 600; }
.mode-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.mode-grid[data-mode-count="2"] { grid-template-columns: repeat(2, 1fr); }
.planner-empty { grid-column: 1 / -1; padding: 28px; border: 1px dashed var(--hairline); border-radius: var(--radius-card); color: var(--muted); background: rgba(255,255,255,.58); text-align: center; }
.planner-empty-inline { grid-column: 1 / -1; margin: 0; color: var(--muted); }
.mode-card { width: 100%; padding: 28px; color: var(--ink); text-align: left; cursor: pointer; }
.mode-card.mode-preview { cursor: default; }
.mode-card.unavailable { border-style: dashed; color: var(--muted); background: rgba(255,255,255,.62); }
.mode-card:disabled { opacity: 1; cursor: not-allowed; }
.mode-card.unavailable .mode-label { color: var(--muted); }
.mode-card[aria-pressed="true"] { border: 2px solid var(--blue-focus); box-shadow: 0 10px 30px rgba(0,102,204,.09); }
.mode-card[aria-pressed="true"]::before { content: "✓"; float: right; color: var(--blue); font-weight: 700; }
.mode-label { color: var(--blue); font-size: 14px; font-weight: 600; }
.timing-badge { display: inline-flex; width: fit-content; margin-top: 12px; padding: 4px 9px; border-radius: var(--radius-pill); font-size: 12px; font-weight: 600; }
.timing-badge.live { color: #176b3a; background: #e8f7ee; }
.timing-badge.limited { color: #875c00; background: #fff5d6; }
.timing-badge.estimated { color: #55555a; background: #ededf0; }
.mode-route { margin: 20px 0 4px; font-size: 34px; font-weight: 600; line-height: 1.05; }
.mode-eta { color: var(--muted); font-size: 21px; }
.mode-card dl { margin: 28px 0 0; }
.mode-card dl div { padding: 11px 0; display: flex; justify-content: space-between; border-top: 1px solid var(--soft-divider); }
.mode-card dt { color: var(--muted); }
.mode-card dd { margin: 0; text-align: right; }
.journey-workspace { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(300px, .8fr); gap: 24px; margin-top: 24px; }
.journey-workspace[hidden], .journey-evidence-grid[hidden] { display: none; }
.journey-map-shell { min-width: 0; }
#journey-map { height: 520px; background: var(--pearl); }
.journey-detail-card, .journey-evidence-card { padding: 30px; border: 1px solid var(--hairline); border-radius: var(--radius-card); background: var(--white); }
.selected-journey-summary { color: var(--muted); }
.journey-timeline { margin: 28px 0 0; padding: 0; list-style: none; }
.journey-timeline li { position: relative; margin-left: 8px; padding: 0 0 24px 30px; border-left: 1px solid var(--hairline); }
.journey-timeline li:last-child { padding-bottom: 0; border-left-color: transparent; }
.journey-timeline li::before { content: ""; position: absolute; left: -6px; top: 4px; width: 10px; height: 10px; border: 1px solid var(--blue); border-radius: 50%; background: var(--white); }
.journey-timeline strong { display: block; }
.journey-timeline span { display: block; margin-top: 3px; color: var(--muted); font-size: 14px; }
.journey-evidence-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin-top: 24px; }
.evidence-row { display: flex; justify-content: space-between; gap: 20px; padding: 10px 0; border-top: 1px solid var(--soft-divider); font-size: 14px; }
.evidence-row span:first-child { color: var(--muted); }
.evidence-note { margin: 18px 0 0; color: var(--muted); font-size: 13px; }
.alternatives-panel { margin-top: 24px; padding: 30px; }
.alternatives-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 24px; }
.alternative-card { width: 100%; padding: 20px; border: 1px solid var(--hairline); border-radius: 14px; color: var(--ink); text-align: left; background: var(--white); cursor: pointer; }
.alternative-card[aria-pressed="true"] { border: 2px solid var(--blue-focus); background: #f5faff; }
.alternative-card-header { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; }
.alternative-card-route { font-size: 22px; font-weight: 600; }
.alternative-card-eta { color: var(--blue); font-weight: 600; white-space: nowrap; }
.alternative-card-meta { margin: 12px 0 0; color: var(--muted); font-size: 14px; }
.alternative-card-badge { display: inline-block; margin-top: 12px; padding: 4px 9px; border-radius: var(--radius-pill); color: var(--blue); background: #eaf4ff; font-size: 12px; }
.alternative-card .timing-badge { margin-right: 6px; }

.comparison-panel { margin-top: 28px; padding: 30px; border: 1px solid var(--hairline); border-radius: var(--radius-card); background: var(--pearl); }
.comparison-panel[hidden] { display: none; }
.comparison-heading { display: flex; align-items: end; justify-content: space-between; gap: 28px; }
.comparison-heading > p { max-width: 480px; color: var(--muted); }
.comparison-pickers { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin: 22px 0 16px; }
.comparison-pickers label { display: grid; gap: 7px; color: var(--muted); font-size: 14px; }
.comparison-pickers select { width: 100%; min-height: 46px; padding: 0 13px; border: 1px solid var(--hairline); border-radius: 12px; color: var(--ink); background: var(--white); }
.comparison-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.comparison-card { padding: 24px; border: 1px solid var(--hairline); border-radius: 14px; background: var(--white); }
.comparison-card h4 { margin: 0 0 4px; font-size: 26px; }
.comparison-card .comparison-eta { margin: 0 0 16px; color: var(--blue); font-size: 20px; font-weight: 600; }
.comparison-card dl { margin: 18px 0 0; }
.comparison-card dl div { display: flex; justify-content: space-between; gap: 18px; padding: 10px 0; border-top: 1px solid var(--soft-divider); font-size: 14px; }
.comparison-card dt { color: var(--muted); }
.comparison-card dd { margin: 0; text-align: right; }
.mobile-recommendation { display: none; }

.context-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.context-card { min-height: 300px; padding: 30px; }
.context-index { color: var(--blue); font-size: 14px; }
.context-card h3 { margin-top: 50px; }
.context-card > p:last-child { color: var(--muted); }
.context-value { font-size: 24px; font-weight: 600; line-height: 1.2; }
.freshness-list { margin: 18px 0; }
.freshness-list .evidence-row { padding: 8px 0; }
.freshness-list .freshness-current strong::before, .freshness-list .freshness-outdated strong::before { content: ""; display: inline-block; width: 7px; height: 7px; margin-right: 7px; border-radius: 50%; }
.freshness-list .freshness-current strong::before { background: #34a853; }
.freshness-list .freshness-outdated strong::before { background: #ff9500; }

.method { display: grid; grid-template-columns: 1fr 1fr; gap: 90px; color: var(--white); background: var(--dark-2); }
.method-copy p:last-child { color: #cccccc; font-size: 21px; }
.method-copy .method-principle { margin-top: 28px; color: var(--white); font-size: 16px; font-weight: 600; }
.method-steps { margin: 0; padding: 0; list-style: none; }
.method-steps li { display: grid; grid-template-columns: 44px 1fr; gap: 20px; padding: 22px 0; border-top: 1px solid rgba(255,255,255,.16); }
.method-steps li > span { width: 36px; height: 36px; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.4); border-radius: 50%; }
.method-steps strong { font-size: 21px; }
.method-steps p { margin: 6px 0 0; color: #cccccc; }
.method-boundaries { grid-column: 1 / -1; margin-top: 10px; padding-top: 32px; border-top: 1px solid rgba(255,255,255,.16); }
.method-boundaries ul { margin: 0; padding-left: 22px; columns: 2; column-gap: 56px; color: #cccccc; }
.method-boundaries li { margin: 0 0 12px; break-inside: avoid; }

footer { padding-top: 64px; padding-bottom: 64px; display: flex; justify-content: space-between; gap: 48px; color: #333333; background: var(--parchment); font-size: 12px; letter-spacing: 0; }
body > footer { width: 100%; max-width: none; padding-left: max(24px, calc((100vw - var(--max))/2)); padding-right: max(24px, calc((100vw - var(--max))/2)); }
footer p { margin: 8px 0 0; }
.footer-meta { display: grid; gap: 7px; text-align: right; }
.error-banner { position: fixed; z-index: 1000; right: 18px; bottom: 18px; max-width: 430px; padding: 14px 18px; border-radius: var(--radius-small); color: var(--white); background: var(--ink); font-size: 14px; }

.leaflet-control-attribution { font-size: 10px !important; }
.leaflet-bar { border: 1px solid var(--hairline) !important; box-shadow: none !important; }
.leaflet-bar a { color: var(--ink) !important; }
.vehicle-popup { font-family: system-ui, -apple-system, sans-serif; }

@media (max-width: 1023px) {
  .hero { grid-template-columns: 1fr; min-height: auto; }
  .hero-metrics { grid-template-columns: repeat(2, 1fr); }
  .hero-metrics article { border-right: 1px solid var(--hairline); padding-right: 16px; }
  .network-grid { grid-template-columns: 1fr; }
  .planner-form { grid-template-columns: 1fr 48px 1fr; }
  .planner-submit { grid-column: 1 / -1; }
  .journey-workspace { grid-template-columns: 1fr; }
  .route-grid { grid-template-columns: repeat(2, 1fr); }
  .context-grid { grid-template-columns: 1fr; }
  .context-card { min-height: 220px; }
  .context-card h3 { margin-top: 32px; }
}

@media (max-width: 833px) {
  .nav-inner { gap: 18px; }
  .global-nav nav { min-width: 0; display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
  .global-nav nav::-webkit-scrollbar { display: none; }
  .global-nav nav a { min-height: 32px; display: inline-flex; align-items: center; padding: 0 8px; white-space: nowrap; }
  .section, .hero { padding-top: 72px; padding-bottom: 72px; }
  .section-heading, .route-list-header { align-items: stretch; flex-direction: column; }
  .route-controls { width: 100%; }
  .route-control { min-width: 0; }
  .mode-grid, .journey-evidence-grid, .nearby-results, .dark-columns, .method { grid-template-columns: 1fr; }
  .comparison-heading { align-items: stretch; flex-direction: column; gap: 6px; }
  .method { gap: 48px; }
  .method-boundaries ul { columns: 1; }
  #map { height: 420px; }
}

@media (max-width: 640px) {
  body { font-size: 16px; }
  .nav-inner, .sub-nav-inner { width: calc(100% - 28px); }
  .wordmark { font-size: 0; }
  .wordmark .pulse-mark { flex: 0 0 auto; }
  .sub-nav-inner > div:first-child { max-width: 52vw; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
  .hero { padding-left: 20px; padding-right: 20px; gap: 48px; }
  h1 { font-size: 44px; }
  h2 { font-size: 36px; }
  .hero-lead { font-size: 21px; }
  .hero-actions { flex-direction: column; align-items: stretch; }
  .route-controls { grid-template-columns: 1fr; }
  .planner-form { grid-template-columns: 1fr; }
  .nearby-stops-controls { align-items: stretch; flex-direction: column; }
  .nearby-radius-control select, .nearby-location-button { width: 100%; }
  .swap-button { justify-self: center; transform: rotate(90deg); }
  .planner-submit { grid-column: auto; }
  .hero-metrics { grid-template-columns: 1fr; }
  .hero-metrics article { border-right: 0; }
  .section { padding-left: 20px; padding-right: 20px; }
  .route-grid { grid-template-columns: 1fr; }
  .map-caption { align-items: flex-start; flex-direction: column; }
  .map-layer-control { top: 10px; right: 10px; width: 154px; padding: 10px 12px; }
  #map, #journey-map { height: 360px; }
  .alternatives-list { grid-template-columns: 1fr; }
  .mode-card, .journey-detail-card, .journey-evidence-card, .alternatives-panel, .comparison-panel { padding: 20px; }
  .comparison-pickers, .comparison-grid { grid-template-columns: 1fr; }
  .mobile-recommendation:not([hidden]) { position: sticky; z-index: 840; bottom: 12px; display: flex; align-items: center; justify-content: space-between; gap: 14px; margin: 18px -8px 0; padding: 12px 14px; border: 1px solid rgba(0,0,0,.1); border-radius: 16px; background: rgba(255,255,255,.94); box-shadow: 0 12px 34px rgba(0,0,0,.16); backdrop-filter: blur(18px); }
  .mobile-recommendation div { min-width: 0; display: grid; }
  .mobile-recommendation span { color: var(--muted); font-size: 12px; }
  .mobile-recommendation strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .mobile-recommendation button { min-width: 92px; min-height: 44px; border: 0; border-radius: var(--radius-pill); color: var(--white); background: var(--blue); }
  footer { flex-direction: column; }
  .footer-meta { text-align: left; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; }
}

/* ============================================================
   UI V2 · decision first, evidence on demand
   Visual-only layer: routing, realtime, and scoring stay unchanged.
   ============================================================ */

[hidden] { display: none !important; }
body.overlay-open { overflow: hidden; }
button, a, input, select { -webkit-tap-highlight-color: transparent; }
button { min-height: 44px; }
.route-card, .context-card, .mode-card, .alternatives-panel,
.journey-detail-card, .journey-evidence-card, .comparison-panel,
.stop-suggestions, .map-layer-control { box-shadow: none; }

.hero {
  min-height: 720px;
  grid-template-columns: minmax(0, .92fr) minmax(480px, 1.08fr);
  gap: clamp(48px, 7vw, 112px);
  padding-top: 116px;
  padding-bottom: 104px;
}
.hero-copy { align-self: center; }
.hero h1 { max-width: 650px; font-size: clamp(54px, 6.1vw, 76px); }
.hero-lead { max-width: 580px; font-size: clamp(21px, 2vw, 26px); }
.hero-actions { align-items: center; gap: 24px; }
.hero-text-link {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  color: var(--blue);
  font-weight: 600;
  text-decoration: none;
}
.hero-visual {
  position: relative;
  min-height: 510px;
  overflow: hidden;
  border: 1px solid var(--hairline);
  border-radius: 28px;
  background: var(--parchment);
}
.hero-route-art { width: 100%; height: 410px; display: block; }
.hero-street { fill: none; stroke: #dedee2; stroke-width: 2; }
.hero-route-line { fill: none; stroke: var(--blue); stroke-linecap: round; stroke-width: 10; }
.hero-vehicle { fill: var(--white); stroke: var(--blue); stroke-width: 6; }
.hero-gap { fill: #fff4e8; stroke: #ff9500; stroke-width: 3; }
.hero-gap-mark { fill: none; stroke: #c04f00; stroke-linecap: round; stroke-width: 3; }
.hero-metrics {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  border-top: 1px solid var(--hairline);
  background: rgba(255,255,255,.9);
  backdrop-filter: saturate(160%) blur(18px);
  -webkit-backdrop-filter: saturate(160%) blur(18px);
}
.hero-metrics article { min-height: 100px; padding: 22px 26px; border-bottom: 0; }
.hero-metrics article:nth-child(odd) { padding-right: 26px; }
.hero-metrics article:nth-child(even) { padding-left: 26px; }
.hero-metrics span { font-size: 36px; }

.product-highlights,
.decision-story {
  padding: 110px max(24px, calc((100vw - var(--max))/2));
}
.product-highlights { background: var(--parchment); }
.story-heading { max-width: 760px; margin-bottom: 50px; }
.highlight-rail { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.highlight-rail article {
  min-height: 280px;
  padding: 30px;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-card);
  background: var(--white);
}
.highlight-rail article > span { color: var(--blue); font-size: 13px; font-weight: 600; }
.highlight-rail h3 { margin-top: 72px; }
.highlight-rail p { margin-bottom: 0; color: var(--muted); }
.decision-story { color: var(--white); background: var(--black); text-align: center; }
.decision-story > .eyebrow { color: #a1a1a6; }
.decision-story > h2 { max-width: 800px; margin-right: auto; margin-left: auto; }
.decision-comparison {
  max-width: 980px;
  margin: 54px auto 0;
  display: grid;
  grid-template-columns: 1fr 190px 1fr;
  align-items: stretch;
  gap: 18px;
  text-align: left;
}
.decision-comparison article,
.decision-comparison > div {
  min-height: 220px;
  padding: 28px;
  border: 1px solid #424245;
  border-radius: var(--radius-card);
  background: #1d1d1f;
}
.decision-comparison article { display: grid; align-content: space-between; }
.decision-comparison article > span { color: #a1a1a6; font-size: 12px; font-weight: 700; letter-spacing: .07em; }
.decision-comparison article > strong { display: block; font-size: 46px; letter-spacing: -.04em; }
.decision-comparison p { margin-bottom: 0; color: #a1a1a6; font-size: 14px; }
.decision-comparison > div { display: grid; place-content: center; text-align: center; }
.decision-comparison > div strong { color: #ff9f0a; font-size: 26px; }
.decision-comparison .recommended { border-color: var(--blue-dark); }
.decision-comparison .recommended > span { color: var(--blue-dark); }

.network-grid { display: block; }
#map { height: 650px; }
.map-detail-button {
  min-height: 44px;
  padding: 0;
  border: 0;
  color: var(--blue);
  background: transparent;
  font-weight: 600;
  cursor: pointer;
}
.map-layer-control { border-radius: 12px; background: rgba(255,255,255,.94); }
.route-list-header { margin-top: 62px; }
.route-grid-toggle { margin-top: 16px; padding-left: 0; }
.route-grid:not(.expanded) .route-card:nth-of-type(n+5) { display: none; }
.route-card { min-height: 178px; transition: border-color .18s ease, background-color .18s ease, transform .15s ease; }
.route-card:hover { background: var(--pearl); }
.route-focus {
  position: fixed;
  z-index: 990;
  top: 0;
  right: 0;
  width: min(430px, 94vw);
  height: 100dvh;
  overflow-y: auto;
  padding: 84px 32px 40px;
  border: 0;
  border-left: 1px solid var(--hairline);
  border-radius: 0;
  background: var(--white);
}
.drawer-close {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid var(--hairline);
  border-radius: 50%;
  color: var(--ink);
  background: var(--parchment);
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
}
.route-focus > .drawer-close { position: absolute; top: 22px; right: 22px; }

.disruption-details > summary { cursor: pointer; list-style: none; }
.disruption-details > summary::-webkit-details-marker { display: none; }
.disruption-details .dark-heading { max-width: none; margin-bottom: 0; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 40px; align-items: end; }
.disruption-details .dark-heading .eyebrow,
.disruption-details .dark-heading h2,
.disruption-details .dark-heading p { grid-column: 1; }
.disruption-details .dark-heading p { max-width: 720px; margin-bottom: 0; }
.details-action { grid-column: 2; grid-row: 1 / span 3; align-self: center; color: var(--blue-dark); font-weight: 600; }
.disruption-details[open] .dark-columns { margin-top: 64px; }

.journey-heading { margin-bottom: 36px; }
.nearby-stops-card { padding: 24px; background: rgba(255,255,255,.66); }
.planner-form { padding: 20px; }
.journey-loading {
  margin: 26px 0;
  padding: 34px;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-card);
  background: var(--white);
}
.journey-loading > strong { display: block; margin-bottom: 22px; font-size: 24px; }
.loading-checks { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.loading-checks span { padding: 12px 14px; border-radius: 12px; color: var(--muted); background: var(--parchment); font-size: 13px; }
.loading-checks span::before { content: "✓"; margin-right: 7px; color: var(--blue); font-weight: 700; }
.journey-recommendation {
  margin-top: 24px;
  padding: clamp(30px, 5vw, 56px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, .62fr);
  gap: 26px 70px;
  border: 1px solid var(--hairline);
  border-radius: 28px;
  background: var(--white);
}
.journey-recommendation > div:first-child { min-width: 0; }
.journey-recommendation h3 { margin-bottom: 12px; font-size: clamp(38px, 6vw, 62px); }
.recommendation-eta { margin-bottom: 2px; color: var(--blue); font-size: clamp(40px, 6vw, 64px); font-weight: 600; line-height: 1; letter-spacing: -.04em; }
.recommendation-arrival { color: var(--muted); }
.recommendation-reasons { align-self: center; display: grid; gap: 10px; }
.recommendation-reasons > span { padding: 11px 14px; border: 1px solid var(--soft-divider); border-radius: 12px; background: var(--pearl); font-size: 14px; }
.recommendation-actions { grid-column: 1 / -1; display: flex; align-items: center; gap: 14px; }
.mode-grid {
  width: fit-content;
  max-width: 100%;
  margin: 24px auto 0;
  display: flex;
  gap: 3px;
  padding: 4px;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-pill);
  background: #e8e8ed;
  overflow-x: auto;
}
.mode-grid[data-mode-count="2"] { display: flex; }
.mode-segment {
  min-width: 152px;
  min-height: 40px;
  padding: 8px 17px;
  border: 0;
  border-radius: var(--radius-pill);
  color: var(--muted);
  background: transparent;
  white-space: nowrap;
  cursor: pointer;
  transition: color .18s ease, background-color .18s ease;
}
.mode-segment[aria-pressed="true"] { color: var(--blue); background: var(--white); font-weight: 600; }
.journey-workspace { margin-top: 50px; }
.journey-detail-card { border-radius: var(--radius-card); }
.alternatives-panel { margin-top: 50px; background: rgba(255,255,255,.66); }
.comparison-open { margin-top: 22px; }

.evidence-drawer,
.comparison-panel {
  position: fixed;
  z-index: 990;
  overflow-y: auto;
  background: var(--white);
}
.evidence-drawer {
  top: 0;
  right: 0;
  width: min(470px, 96vw);
  height: 100dvh;
  margin: 0;
  padding: 0 28px 40px;
  display: block;
  border: 0;
  border-left: 1px solid var(--hairline);
}
.drawer-heading {
  position: sticky;
  z-index: 2;
  top: 0;
  min-height: 92px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border-bottom: 1px solid var(--soft-divider);
  background: rgba(255,255,255,.96);
}
.drawer-heading .eyebrow { margin-bottom: 2px; }
.drawer-heading h2 { margin-bottom: 0; font-size: 28px; }
.evidence-drawer .journey-evidence-card { padding: 28px 0; border: 0; border-bottom: 1px solid var(--soft-divider); border-radius: 0; }
.comparison-panel {
  top: 50%;
  left: 50%;
  width: min(1100px, calc(100vw - 48px));
  max-height: calc(100dvh - 48px);
  margin: 0;
  padding: 32px;
  transform: translate(-50%, -50%);
  border: 1px solid var(--hairline);
  border-radius: 22px;
}
.comparison-heading { position: relative; padding-right: 58px; }
.comparison-heading .drawer-close { position: absolute; top: 0; right: 0; }
.ui-scrim {
  position: fixed;
  z-index: 980;
  inset: 0;
  background: rgba(0,0,0,.34);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}

.context-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.data-quality-card { grid-column: 1 / -1; min-height: 360px; }
.data-quality-card { background: var(--ink); color: var(--white); }
.data-quality-card .context-index,
.data-quality-card .eyebrow { color: var(--blue-dark); }
.data-quality-card h3 { max-width: 440px; font-size: 34px; }
.data-quality-card .context-value { color: var(--white); }
.data-quality-card > p:last-child,
.data-quality-card .evidence-row span:first-child { color: #c7c7cc; }
.data-quality-card .evidence-row { border-top-color: rgba(255,255,255,.16); }
.safety-context-card { padding: 0; }
.safety-context-card > summary {
  min-height: 300px;
  padding: 30px;
  display: block;
  list-style: none;
  cursor: pointer;
}
.safety-context-card > summary::-webkit-details-marker { display: none; }
.safety-context-card > summary h3 { margin-top: 50px; }
.context-disclosure { display: inline-flex; align-items: center; min-height: 44px; color: var(--blue); font-size: 14px; font-weight: 600; }
.context-disclosure::after { content: "＋"; margin-left: 8px; }
.safety-context-card[open] .context-disclosure::after { content: "−"; }
.safety-context-card > #safety-detail { margin: 0 30px 30px; padding-top: 22px; border-top: 1px solid var(--soft-divider); color: var(--muted); }
.parking-context-card { background: var(--pearl); }
.parking-context-card .context-value { font-size: 21px; }

@media (max-width: 1023px) {
  .hero { grid-template-columns: 1fr; min-height: auto; }
  .hero-copy { max-width: 760px; }
  .hero-visual { min-height: 480px; }
  .highlight-rail { grid-template-columns: repeat(3, minmax(280px, 1fr)); overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 10px; }
  .highlight-rail article { scroll-snap-align: start; }
  .decision-comparison { grid-template-columns: 1fr 150px 1fr; }
  .context-grid { grid-template-columns: 1fr; }
  .data-quality-card { grid-column: 1; }
}

@media (max-width: 833px) {
  .hero, .product-highlights, .decision-story { padding-top: 78px; padding-bottom: 78px; }
  .hero { gap: 52px; }
  .hero-visual { min-height: 440px; }
  .hero-route-art { height: 340px; }
  #map { height: 480px; }
  .route-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .decision-comparison { grid-template-columns: 1fr; text-align: left; }
  .decision-comparison > div { min-height: 120px; }
  .loading-checks { grid-template-columns: repeat(2, 1fr); }
  .journey-recommendation { grid-template-columns: 1fr; }
  .recommendation-actions { grid-column: 1; }
  .evidence-drawer,
  .route-focus {
    top: auto;
    right: 0;
    bottom: 0;
    left: 0;
    width: 100%;
    height: auto;
    max-height: 88dvh;
    border: 0;
    border-top: 1px solid var(--hairline);
    border-radius: 22px 22px 0 0;
  }
  .route-focus { padding: 76px 24px 32px; }
  .route-focus > .drawer-close { top: 18px; right: 20px; }
  .comparison-panel { width: calc(100vw - 24px); max-height: calc(100dvh - 24px); padding: 24px; }
}

@media (max-width: 640px) {
  .hero { padding-right: 20px; padding-left: 20px; }
  .hero h1 { font-size: 42px; }
  .hero-actions { align-items: stretch; }
  .hero-text-link { justify-content: center; }
  .hero-visual { min-height: 390px; border-radius: 22px; }
  .hero-route-art { height: 292px; }
  .hero-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero-metrics article { min-height: 96px; padding: 18px; }
  .hero-metrics article:nth-child(odd), .hero-metrics article:nth-child(even) { padding: 18px; }
  .hero-metrics span { font-size: 32px; }
  .product-highlights, .decision-story { padding-right: 20px; padding-left: 20px; }
  .highlight-rail { margin-right: -20px; grid-template-columns: repeat(3, minmax(260px, 82vw)); }
  .highlight-rail article { min-height: 250px; padding: 24px; }
  .highlight-rail h3 { margin-top: 58px; }
  .decision-comparison article { min-height: 190px; }
  .route-grid { grid-template-columns: 1fr; }
  #map { height: 390px; }
  .disruption-details .dark-heading { display: block; }
  .details-action { display: inline-block; margin-top: 22px; }
  .planner-form { padding: 18px; }
  .loading-checks { grid-template-columns: 1fr; }
  .journey-recommendation { padding: 28px 22px; border-radius: 22px; }
  .journey-recommendation h3 { font-size: 38px; }
  .recommendation-eta { font-size: 46px; }
  .recommendation-actions { align-items: stretch; flex-direction: column; }
  .mode-grid { width: 100%; overflow: hidden; }
  .mode-segment { min-width: 0; flex: 1 1 0; padding: 7px 8px; font-size: 13px; line-height: 1.15; white-space: normal; }
  .journey-workspace { margin-top: 38px; }
  .alternatives-panel { margin-top: 38px; }
  .evidence-drawer { padding-right: 20px; padding-left: 20px; }
  .comparison-heading { padding-right: 0; }
  .comparison-heading .drawer-close { position: static; align-self: flex-end; }
  .comparison-pickers, .comparison-grid { grid-template-columns: 1fr; }
  .context-card { min-height: 250px; }
  .safety-context-card > summary { min-height: 250px; padding: 24px; }
  .safety-context-card > summary h3 { margin-top: 34px; }
  .safety-context-card > #safety-detail { margin: 0 24px 24px; }
  .data-quality-card h3 { font-size: 30px; }
}

@media (max-width: 419px) {
  .hero h1 { font-size: 36px; }
  .hero-lead { font-size: 19px; }
  .hero-visual { min-height: 350px; }
  .hero-route-art { height: 250px; }
  .map-layer-control { position: relative; top: auto; right: auto; width: 100%; border: 0; border-bottom: 1px solid var(--hairline); border-radius: 0; }
  #map { height: 350px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* ============================================================
   UI V2.1 · visible decision evidence
   Keeps the V2 hierarchy while returning essential trip evidence
   to the main reading path.
   ============================================================ */

.live-dot.delayed { background: #ff9500; }

.network-update-summary {
  margin: 24px 0 48px;
  padding: 26px 28px;
  display: grid;
  grid-template-columns: minmax(210px, .72fr) minmax(0, 1.45fr) auto;
  gap: 24px 36px;
  align-items: center;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-card);
  background: var(--white);
}
.network-update-summary .eyebrow { margin-bottom: 5px; }
.network-update-summary h3 { margin: 0; font-size: 23px; line-height: 1.15; }
.network-update-items { min-width: 0; display: grid; gap: 12px; }
.network-update-item { padding-left: 16px; border-left: 2px solid #ff9500; }
.network-update-item > span,
.summary-road > span { display: block; margin-bottom: 3px; color: var(--muted); font-size: 12px; font-weight: 600; }
.network-update-item strong { display: block; font-size: 15px; line-height: 1.35; }
.network-update-item p,
.network-update-empty { margin: 4px 0 0; color: var(--muted); font-size: 13px; }
.network-update-summary .text-action { white-space: nowrap; }

.recommendation-context {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--soft-divider);
  border-bottom: 1px solid var(--soft-divider);
}
.recommendation-context > div { min-width: 0; padding: 18px 22px 18px 0; }
.recommendation-context > div + div { padding-left: 22px; border-left: 1px solid var(--soft-divider); }
.recommendation-context span { display: block; margin-bottom: 5px; color: var(--muted); font-size: 12px; }
.recommendation-context strong { display: block; font-size: 14px; line-height: 1.4; }

.compact-comparison,
.journey-context-summary {
  margin-top: 32px;
  padding: clamp(24px, 4vw, 38px);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-card);
  background: var(--white);
}
.compact-comparison-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 28px;
}
.compact-comparison-heading h3,
.journey-context-heading h3 { margin: 0; font-size: clamp(25px, 3vw, 34px); line-height: 1.1; }
.compact-comparison-heading > p { max-width: 470px; margin: 0; color: var(--muted); font-size: 14px; }
.compact-comparison-grid { margin: 24px 0 8px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 1px solid var(--hairline); border-bottom: 1px solid var(--hairline); }
.compact-comparison-card { min-width: 0; padding: 24px 24px 22px; }
.compact-comparison-card + .compact-comparison-card { border-left: 1px solid var(--hairline); }
.compact-comparison-card > p { margin: 0 0 7px; color: var(--muted); font-size: 13px; font-weight: 600; }
.compact-comparison-card.featured > p { color: var(--blue); }
.compact-comparison-card h4 { margin: 0; font-size: 28px; }
.compact-comparison-eta { display: block; margin: 5px 0 18px; color: var(--blue); font-size: 22px; }
.compact-comparison-card dl { margin: 0; }
.compact-comparison-card dl div { padding: 9px 0; display: flex; justify-content: space-between; gap: 18px; border-top: 1px solid var(--soft-divider); font-size: 14px; }
.compact-comparison-card dt { color: var(--muted); }
.compact-comparison-card dd { margin: 0; text-align: right; }

.journey-context-heading { max-width: 720px; margin-bottom: 26px; }
.journey-context-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 1px solid var(--hairline); }
.journey-context-grid > article { min-width: 0; padding: 24px 28px 0 0; }
.journey-context-grid > article + article { padding-right: 0; padding-left: 28px; border-left: 1px solid var(--hairline); }
.journey-context-grid h4 { margin: 0 0 18px; font-size: 19px; }
.summary-evidence-row { padding: 11px 0; display: grid; grid-template-columns: minmax(110px, .7fr) minmax(0, 1fr); gap: 3px 18px; border-top: 1px solid var(--soft-divider); font-size: 14px; }
.summary-evidence-row:first-child { border-top: 0; }
.summary-evidence-row > span { color: var(--muted); }
.summary-evidence-row > strong { text-align: right; }
.summary-evidence-row > small { grid-column: 1 / -1; color: var(--muted); font-size: 12px; text-align: right; }
.summary-road { margin-top: 14px; padding: 14px 16px; border-radius: 12px; background: #fff8ed; }
.summary-road strong { display: block; font-size: 14px; line-height: 1.4; }
.summary-empty,
.summary-caution { color: var(--muted); font-size: 13px; }
.summary-caution { margin: 16px 0 0; padding-top: 14px; border-top: 1px solid var(--soft-divider); }

@media (max-width: 833px) {
  .network-update-summary { grid-template-columns: 1fr; align-items: start; }
  .recommendation-context { grid-template-columns: 1fr; }
  .recommendation-context > div { padding: 15px 0; }
  .recommendation-context > div + div { padding-left: 0; border-top: 1px solid var(--soft-divider); border-left: 0; }
  .compact-comparison-heading { align-items: start; flex-direction: column; gap: 10px; }
  .journey-context-grid { grid-template-columns: 1fr; }
  .journey-context-grid > article { padding: 22px 0; }
  .journey-context-grid > article + article { padding-left: 0; border-top: 1px solid var(--hairline); border-left: 0; }
}

@media (max-width: 640px) {
  body:has(.mobile-recommendation:not([hidden])) { padding-bottom: 86px; }
  .sub-nav,
  .sub-nav-inner { min-height: 52px; height: auto; }
  .sub-nav-inner { padding: 6px 0; gap: 6px; }
  .sub-nav-inner > div:first-child { min-width: 0; max-width: none; flex: 1 1 auto; font-size: 12px; }
  .sub-actions { flex: 0 0 auto; gap: 2px; }
  .sub-actions .text-action { min-width: 44px; padding: 6px 8px; }
  #refresh-button { min-height: 40px; padding: 8px 14px; white-space: nowrap; }
  .network-update-summary { margin-bottom: 38px; padding: 22px; gap: 20px; }
  .compact-comparison,
  .journey-context-summary { padding: 24px 20px; }
  .compact-comparison-grid { grid-template-columns: 1fr; }
  .compact-comparison-card { padding: 22px 0; }
  .compact-comparison-card + .compact-comparison-card { border-top: 1px solid var(--hairline); border-left: 0; }
  .summary-evidence-row { grid-template-columns: 1fr; }
  .summary-evidence-row > strong,
  .summary-evidence-row > small { grid-column: 1; text-align: left; }
  .mobile-recommendation:not([hidden]) {
    position: fixed;
    z-index: 840;
    right: 16px;
    bottom: max(12px, env(safe-area-inset-bottom));
    left: 16px;
    margin: 0;
    border: 1px solid var(--hairline);
    border-radius: 16px;
    background: rgba(255,255,255,.96);
    box-shadow: none;
  }
}

/* ============================================================
   UI v1.5 · Apple-inspired product system / 苹果风格产品规范
   中文：统一地点搜索、定位地图和表单反馈；只调整表达与界面层，
   不改变现有路线生成、实时数据或评分方法。
   English: Standardize place search, the location map, and form feedback.
   This layer changes presentation only—not routing, realtime data, or scoring.
   ============================================================ */

.nearby-radius-control select,
.planner-field input {
  border-radius: var(--radius-pill);
}

.nearby-map-shell {
  margin-top: 18px;
  overflow: hidden;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-card);
  background: var(--white);
}

#nearby-map {
  width: 100%;
  height: 340px;
  background: var(--parchment);
}

.nearby-map-caption {
  margin: 0;
  padding: 12px 16px;
  border-top: 1px solid var(--soft-divider);
  color: var(--muted);
  font-size: 13px;
}

.planner-place-note {
  max-width: 900px;
  margin: 0 2px 6px;
  color: var(--muted);
  font-size: 13px;
}

.place-match {
  margin: 0 10px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.suggestion-group-label {
  position: sticky;
  z-index: 1;
  top: -6px;
  margin: -6px -6px 4px;
  padding: 10px 12px 7px;
  border-bottom: 1px solid var(--soft-divider);
  color: var(--muted);
  background: rgba(255,255,255,.96);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.stop-options + .suggestion-group-label {
  margin-top: 6px;
}

.stop-suggestions .place-option strong::before {
  content: "⌖";
  margin-right: 7px;
  color: var(--blue);
}

.place-search-status {
  margin: 0;
  padding: 11px 12px;
  color: var(--muted);
  font-size: 12px;
}

@media (max-width: 640px) {
  #nearby-map { height: 280px; }
  .nearby-stop-actions { flex-direction: column; }
  .nearby-stop-actions button { width: 100%; min-height: 44px; }
  .planner-place-note { margin-bottom: 10px; }
}

/* ============================================================
   Mobile browser layout · 手机浏览器布局
   中文：同一个页面在手机上改成单栏、底部导航和更清楚的实时状态栏。
   所有路线计算、数据刷新和评分逻辑保持不变。
   English: Reflows the existing product into a single-column mobile app
   with reachable navigation and touch-safe controls. Routing is unchanged.
   ============================================================ */

@media (max-width: 640px) {
  html,
  body {
    max-width: 100%;
    overflow-x: hidden;
  }

  html { scroll-padding-top: 138px; }
  #network,
  #journey,
  #context,
  #method { scroll-margin-top: 138px; }

  body { padding-bottom: calc(76px + env(safe-area-inset-bottom)); }
  body:has(.mobile-recommendation:not([hidden])) { padding-bottom: calc(154px + env(safe-area-inset-bottom)); }

  .global-nav { height: 44px; }
  .nav-inner {
    width: calc(100% - 32px);
    justify-content: center;
  }
  .wordmark {
    font-size: 12px;
    white-space: nowrap;
  }
  .global-nav nav {
    position: fixed;
    z-index: 930;
    right: 12px;
    bottom: max(10px, env(safe-area-inset-bottom));
    left: 12px;
    min-width: 0;
    height: 58px;
    padding: 4px;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 2px;
    overflow: visible;
    border: 1px solid rgba(0,0,0,.12);
    border-radius: 18px;
    color: var(--ink);
    background: rgba(250,250,252,.94);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
  }
  .global-nav nav a {
    min-width: 0;
    min-height: 48px;
    padding: 5px 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    color: var(--ink);
    font-size: 12px;
    line-height: 1.15;
    text-align: center;
    white-space: normal;
  }
  .global-nav nav a:focus-visible {
    outline: 2px solid var(--blue-focus);
    outline-offset: -2px;
  }

  .sub-nav {
    top: 44px;
    min-height: 82px;
    height: auto;
  }
  .sub-nav-inner {
    width: calc(100% - 32px);
    min-height: 82px;
    height: auto;
    padding: 7px 0 8px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-rows: auto auto;
    align-content: center;
    gap: 4px 8px;
  }
  .sub-nav-inner > div:first-child {
    grid-column: 1 / -1;
    min-width: 0;
    max-width: none;
    overflow: hidden;
    font-size: 12px;
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .sub-actions {
    grid-column: 1 / -1;
    width: 100%;
    justify-content: flex-end;
    gap: 4px;
  }
  .sub-actions .text-action {
    min-width: 44px;
    min-height: 36px;
    padding: 4px 8px;
  }
  #refresh-button {
    min-height: 36px;
    padding: 6px 14px;
    font-size: 14px;
    white-space: nowrap;
  }

  .section,
  .hero,
  .product-highlights,
  .decision-story {
    padding-top: 64px;
    padding-bottom: 64px;
  }
  .hero {
    min-height: auto;
    gap: 40px;
  }
  .hero h1 {
    max-width: 330px;
    font-size: 34px;
    line-height: 1.08;
  }
  .hero-lead {
    max-width: 340px;
    font-size: 19px;
    line-height: 1.4;
  }
  .hero-actions {
    gap: 10px;
    margin-top: 28px;
  }
  .hero-actions .primary-button { width: 100%; }
  .hero-visual {
    min-height: 340px;
    border-radius: var(--radius-card);
  }
  .hero-route-art { height: 244px; }
  .hero-metrics article,
  .hero-metrics article:nth-child(odd),
  .hero-metrics article:nth-child(even) {
    min-height: 96px;
    padding: 14px;
  }
  .hero-metrics span { font-size: 28px; }
  .hero-metrics small {
    display: block;
    margin-top: 4px;
    font-size: 12px;
    line-height: 1.3;
  }

  h2 { font-size: 32px; }
  .section-heading,
  .story-heading,
  .journey-heading { margin-bottom: 32px; }
  .section-lead { font-size: 18px; }
  .prototype-chip {
    align-self: flex-start;
    max-width: 100%;
    line-height: 1.35;
    white-space: normal;
  }

  .highlight-rail {
    width: 100%;
    margin-right: 0;
    padding: 0 18px 10px 0;
    grid-template-columns: repeat(3, minmax(260px, 84vw));
    overscroll-behavior-inline: contain;
    scrollbar-width: none;
  }
  .highlight-rail::-webkit-scrollbar { display: none; }
  .highlight-rail article { min-height: 230px; }
  .highlight-rail h3 { margin-top: 44px; }

  .decision-comparison { margin-top: 36px; }
  .decision-comparison article { min-height: 170px; }
  .decision-comparison > div {
    min-height: 108px;
    padding: 22px;
  }

  .route-scope { border-radius: 16px; }
  .scope-button {
    min-width: 0;
    min-height: 44px;
    padding: 7px 9px;
    line-height: 1.2;
    white-space: normal;
  }
  .map-shell,
  .journey-map-shell,
  .planner-field,
  .nearby-stops-card,
  .journey-recommendation,
  .compact-comparison,
  .journey-context-summary,
  .alternatives-panel {
    min-width: 0;
    max-width: 100%;
  }
  #map,
  #journey-map { height: 320px; }
  .map-layer-control {
    position: relative;
    top: auto;
    right: auto;
    width: 100%;
    padding: 8px 12px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    border: 0;
    border-bottom: 1px solid var(--hairline);
    border-radius: 0;
    box-shadow: none;
  }
  .map-layer-control legend { grid-column: 1 / -1; }
  .map-layer-control label {
    min-width: 0;
    min-height: 40px;
    line-height: 1.2;
  }
  .map-caption {
    min-height: 0;
    padding: 14px 16px;
    gap: 6px;
  }

  .nearby-stops-card { padding: 20px; }
  .nearby-stops-controls { gap: 10px; }
  .planner-form {
    padding: 18px;
    border-radius: var(--radius-card);
  }
  .planner-field-heading { gap: 8px; }
  .stop-browse-button {
    min-height: 36px;
    text-align: right;
  }
  .stop-suggestions { max-height: min(45dvh, 320px); }
  .planner-submit { width: 100%; }

  .journey-loading { padding: 24px 20px; }
  .journey-recommendation {
    margin-top: 20px;
    padding: 24px 20px;
  }
  .journey-recommendation h3 { font-size: 36px; }
  .recommendation-eta { font-size: 44px; }
  .mode-grid { position: relative; }
  .mode-segment {
    min-height: 48px;
    padding: 7px 6px;
    font-size: 12px;
  }
  .journey-workspace,
  .alternatives-panel { margin-top: 32px; }
  .journey-detail-card,
  .alternatives-panel { padding: 20px; }
  .alternative-card { padding: 18px; }

  .evidence-drawer {
    max-height: 90dvh;
    padding-bottom: calc(32px + env(safe-area-inset-bottom));
  }
  .comparison-panel {
    top: auto;
    right: 0;
    bottom: 0;
    left: 0;
    width: 100%;
    max-height: 90dvh;
    padding: 24px 20px calc(28px + env(safe-area-inset-bottom));
    transform: none;
    border-right: 0;
    border-bottom: 0;
    border-left: 0;
    border-radius: 22px 22px 0 0;
  }

  .mobile-recommendation:not([hidden]) {
    right: 12px;
    bottom: calc(78px + env(safe-area-inset-bottom));
    left: 12px;
    min-height: 60px;
    padding: 10px 12px;
  }
  .mobile-recommendation button { flex: 0 0 auto; }

  footer {
    padding-top: 48px;
    padding-bottom: calc(104px + env(safe-area-inset-bottom));
    gap: 28px;
  }
}

@media (max-width: 419px) {
  .hero h1 { font-size: 32px; }
  h2 { font-size: 30px; }
  .hero-visual { min-height: 326px; }
  .hero-route-art { height: 230px; }
  .global-nav nav a { font-size: 11px; }
  .decision-comparison article { min-height: 156px; }
}
