:root {
  --app-navy: #09274a;
  --app-blue: #126bc5;
  --app-red: #d52b32;
  --app-ink: #102d4d;
  --app-muted: #5d7187;
  --app-line: #d7e2eb;
  --app-wash: #f4f8fb;
  --app-blue-wash: #edf6ff;
  --app-red-wash: #fff1f2;
  --app-green: #2d9a59;
  --app-amber: #d89a18;
  --app-purple: #8b63cc;
}

.civic-app-home { background: var(--app-wash); }
.civic-app-main {
  display: grid;
  width: min(1420px, calc(100% - 48px));
  margin: 22px auto 0;
  gap: 18px;
  font-family: Inter, "Segoe UI", Arial, sans-serif;
}
.civic-app-main :where(button, a) { -webkit-tap-highlight-color: transparent; }
.civic-app-main :where(svg) { fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.app-hero,
.app-now,
.app-journey,
.app-route,
.app-questions,
.app-evidence-drawer {
  border: 1px solid var(--app-line);
  border-radius: 14px;
  background: #fff;
}

.app-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr);
  min-height: 510px;
  overflow: hidden;
}
.app-hero-copy { align-self: center; padding: 40px 40px 38px; }
.app-hero h1 {
  max-width: 670px;
  margin: 0;
  color: var(--app-navy);
  font: 700 clamp(48px, 4vw, 64px)/.98 Georgia, "Times New Roman", serif;
  letter-spacing: -2.6px;
}
.app-hero-deck { max-width: 620px; margin: 15px 0 20px; color: #36536e; font-size: 18px; line-height: 1.45; }
.app-live-number { display: flex; align-items: end; gap: 18px; margin-top: 8px; }
.app-live-number strong { color: var(--app-red); font: 700 104px/.78 Georgia, serif; letter-spacing: -5px; }
.app-live-number span { max-width: 185px; padding-bottom: 4px; color: var(--app-navy); font-size: 20px; font-weight: 850; line-height: 1.08; }
#hero-story { max-width: 590px; margin: 20px 0 7px; color: #3f5871; font-size: 14px; line-height: 1.5; }
.app-updated { display: flex; align-items: center; gap: 7px; margin: 0; color: var(--app-muted); font-size: 12px; }
.app-updated svg { width: 17px; height: 17px; }
.app-hero-actions { display: flex; flex-wrap: wrap; gap: 11px; margin-top: 24px; }
.app-primary-action,
.app-secondary-action {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 18px;
  border: 1px solid var(--app-red);
  border-radius: 9px;
  font-size: 13px;
  font-weight: 850;
  text-decoration: none;
}
.app-primary-action { color: #fff; background: var(--app-red); box-shadow: 0 9px 20px #d52b3224; }
.app-primary-action:hover { background: #bd1f27; }
.app-secondary-action { color: var(--app-blue); border-color: #9fc6e8; background: #fff; }
.app-primary-action svg,
.app-secondary-action svg { width: 20px; height: 20px; }
.app-hero-visual { position: relative; display: grid; align-content: center; padding: 32px 32px 24px; background: linear-gradient(180deg, #fbfdff, #edf7fd); }
.app-hero-visual:before { position: absolute; inset: auto 0 0; height: 120px; background: linear-gradient(180deg, transparent, #dfeff8aa); content: ""; }
.app-mode-switch { position: relative; z-index: 2; display: grid; width: min(430px, 100%); margin: 0 auto; padding: 5px; border: 1px solid #c9d8e4; border-radius: 12px; background: #fff; grid-template-columns: 1fr 1fr; box-shadow: 0 8px 24px #09274a0e; }
.app-mode-switch button { display: grid; grid-template-columns: 32px 1fr; min-height: 62px; align-items: center; gap: 1px 9px; padding: 9px 14px; border: 0; border-radius: 8px; color: var(--app-navy); background: transparent; text-align: left; cursor: pointer; }
.app-mode-switch button[aria-pressed="true"] { color: #fff; background: var(--app-blue); }
.app-mode-switch svg { grid-row: 1 / 3; width: 25px; height: 25px; }
.app-mode-switch span { font-size: 13px; font-weight: 850; }
.app-mode-switch b { font-size: 10px; font-weight: 650; opacity: .76; }
.app-transit-art { position: relative; z-index: 1; display: block; width: 100%; margin-top: 5px; }
.app-visual-note { position: relative; z-index: 2; max-width: 580px; margin: -6px auto 0; color: var(--app-muted); font-size: 10px; line-height: 1.45; text-align: center; }

.app-now,
.app-journey,
.app-route,
.app-questions { padding: 28px; }
.app-section-heading { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 20px; }
.app-section-heading h2 { margin: 0; color: var(--app-navy); font: 700 30px/1.05 Georgia, "Times New Roman", serif; letter-spacing: -.6px; }
.app-section-heading p { margin: 5px 0 0; color: var(--app-muted); font-size: 13px; }
.app-section-heading > a,
.journey-actions > a { color: var(--app-blue); font-size: 12px; font-weight: 850; text-decoration: none; white-space: nowrap; }
.app-signal-list { display: grid; gap: 10px; }
.app-signal { display: grid; grid-template-columns: 52px minmax(230px, 1fr) minmax(360px, .9fr) 38px; min-height: 100px; align-items: center; gap: 18px; padding: 14px 16px; border: 1px solid var(--app-line); border-radius: 11px; background: #fff; }
.app-signal:hover { border-color: #aac2d5; box-shadow: 0 8px 22px #09274a0b; }
.app-signal.is-emphasized { border-color: #78afe0; box-shadow: 0 0 0 3px #dcebfa; }
.app-signal-icon { display: grid; width: 48px; height: 48px; place-items: center; border-radius: 12px; color: var(--app-red); background: var(--app-red-wash); }
.app-signal-subway .app-signal-icon { color: var(--app-blue); background: var(--app-blue-wash); }
.app-signal-icon svg { width: 27px; height: 27px; }
.app-signal h3 { margin: 0; font-size: 15px; }
.app-signal p { margin: 4px 0 7px; color: var(--app-muted); font-size: 11px; }
.app-method-label { display: inline-flex; align-items: center; gap: 5px; color: var(--app-muted); font-size: 10px; font-weight: 800; }
.app-method-label:before { width: 7px; height: 7px; border-radius: 50%; background: currentColor; content: ""; }
.app-method-label.observed { color: var(--app-green); }
.app-method-label.estimated { color: var(--app-amber); }
.app-signal dl { display: grid; grid-template-columns: repeat(3, 1fr); margin: 0; }
.app-signal dl div { padding: 3px 15px; border-left: 1px solid var(--app-line); }
.app-signal dt { color: var(--app-navy); font: 700 28px/1 Georgia, serif; }
.app-signal dd { margin: 5px 0 0; color: var(--app-muted); font-size: 10px; }
.app-signal > a { display: grid; width: 36px; height: 36px; place-items: center; border-radius: 50%; color: var(--app-blue); background: #edf5fc; font-weight: 900; text-decoration: none; }

.app-quiet-button { display: inline-flex; min-height: 40px; align-items: center; gap: 8px; padding: 9px 12px; border: 1px solid #aec1d1; border-radius: 8px; color: var(--app-navy); background: #fff; font: 800 11px/1 Inter, "Segoe UI", Arial, sans-serif; cursor: pointer; }
.app-quiet-button:hover { border-color: var(--app-blue); color: var(--app-blue); }
.app-quiet-button svg { width: 17px; height: 17px; }
.app-journey { background: linear-gradient(120deg, #fff 60%, #f0f7fc); }
.app-journey .commute-feature { display: block; max-width: none; margin: 0; border: 1px solid var(--app-line); border-radius: 12px; overflow: hidden; box-shadow: none; }
.app-journey .commute-feature-intro { display: grid; grid-template-columns: minmax(0, 1fr) 220px; gap: 28px; align-items: center; margin: 0; padding: 25px 28px; }
.app-journey .commute-feature-story { min-height: 0; padding: 0; background: transparent; }
.app-journey .commute-feature-story:after { display: none; }
.app-journey .commute-feature-meta { display: flex; align-items: center; gap: 18px; color: #9b2830; font-size: 10px; font-weight: 900; letter-spacing: .7px; text-transform: uppercase; }
.app-journey .commute-feature h3 { max-width: 820px; margin: 10px 0 7px; color: var(--app-navy); font: 700 clamp(30px, 3vw, 44px)/1.03 Georgia, serif; letter-spacing: -.7px; }
.app-journey .commute-feature-story > p { margin: 0; color: var(--app-muted); font-size: 14px; }
.app-journey .featured-time { display: grid; grid-template-columns: auto 1fr; align-items: end; padding: 14px 18px; border: 0; border-left: 1px solid var(--app-line); }
.app-journey .featured-time strong { color: var(--app-navy); font: 700 65px/.8 Georgia, serif; }
.app-journey .featured-time small { margin: 0 0 2px 6px; color: var(--app-navy); font-size: 16px; font-weight: 850; }
.app-journey .featured-time span { grid-column: 1 / -1; margin-top: 10px; color: var(--app-muted); font-size: 9px; font-weight: 850; letter-spacing: .8px; text-transform: uppercase; }
.app-journey .commute-timeline { position: relative; display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin: 0; padding: 22px 28px; border-top: 1px solid var(--app-line); border-bottom: 1px solid var(--app-line); background: #f8fafc; }
.app-journey .commute-timeline:before { right: 10%; bottom: 40px; left: 10%; height: 3px; }
.app-journey .timeline-stage { grid-template-rows: auto minmax(36px, auto) auto 50px; }
.app-journey .timeline-stage > span { font-size: 20px; }
.app-journey .timeline-stage > strong { margin-top: 4px; font-size: 14px; }
.app-journey .timeline-stage > small { font-size: 11px; }
.app-journey .timeline-stage > i { width: 46px; height: 46px; box-shadow: 0 0 0 6px #f8fafc; }
.app-journey .timeline-stage > i:before { width: 25px; height: 25px; }
.app-journey .commute-evidence { grid-template-columns: repeat(3, 1fr); border: 0; }
.app-journey .commute-evidence > div { min-height: 76px; padding: 12px 24px; }
.app-journey .commute-evidence strong { font-size: 13px; }
.app-journey .commute-evidence small { font-size: 9px; }
.app-journey .commute-feature-footer { padding: 18px 24px; border-top: 1px solid var(--app-line); }
.app-journey .commute-feature .commute-link { padding: 11px 15px; border-radius: 8px; font-size: 12px; }

.journey-actions { display: flex; align-items: center; gap: 16px; }
.app-route .route-journey { max-width: none; margin: 0; padding: 0; border: 1px solid var(--app-line); border-radius: 12px; overflow: hidden; background: #fff; }
.app-route-identity { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 16px; padding: 18px 22px; border-bottom: 1px solid var(--app-line); }
.app-route-identity > span { min-width: 76px; padding: 11px 13px; border-radius: 8px; color: #fff; background: var(--app-red); font-size: 12px; font-weight: 900; text-align: center; }
.app-route-identity h3 { margin: 0; color: var(--app-navy); font: 700 23px/1.1 Georgia, serif; }
.app-route-identity p { margin: 4px 0 0; color: var(--app-muted); font-size: 11px; }
.app-route-identity > strong { color: var(--app-navy); font: 700 32px/1 Georgia, serif; text-align: right; }
.app-route-identity > strong small { display: block; margin-top: 4px; color: var(--app-muted); font: 700 9px/1.2 Inter, sans-serif; text-transform: uppercase; }
.app-route .journey-line { display: grid; grid-template-columns: repeat(6, 1fr); min-height: 135px; gap: 0; margin: 0; padding: 18px 12px; }
.app-route .journey-line:before { display: none; }
.app-route .place { padding: 6px 10px; }
.app-route .place + .place { border-left: 1px solid var(--app-line); }
.app-route .place i { display: grid; width: 44px; height: 44px; place-items: center; border: 0; border-radius: 11px; color: var(--app-blue); background: var(--app-blue-wash); }
.app-route .place svg { width: 24px; height: 24px; }
.app-route .place b { margin-top: 7px; font-size: 24px; }
.app-route .place span { margin-top: 2px; font-size: 10px; }
.app-route .route-source { margin: 0; padding: 10px 18px; border-top: 1px solid var(--app-line); background: #f8fafc; text-align: left; }
.app-route .route-place-status { margin: 12px 18px; }

.app-question-list { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--app-line); border-bottom: 1px solid var(--app-line); }
.app-question-list a { display: grid; grid-template-columns: 42px 1fr 20px; min-height: 120px; align-items: center; gap: 15px; padding: 22px; color: var(--app-navy); text-decoration: none; }
.app-question-list a + a { border-left: 1px solid var(--app-line); }
.app-question-list a:hover { background: var(--app-wash); }
.app-question-list svg { width: 32px; height: 32px; color: var(--app-blue); }
.app-question-list b,
.app-question-list small { display: block; }
.app-question-list b { font-size: 14px; }
.app-question-list small { margin-top: 5px; color: var(--app-muted); font-size: 11px; line-height: 1.4; }
.app-question-list i { color: var(--app-blue); font-style: normal; font-weight: 900; }

.app-evidence-drawer { overflow: hidden; }
.app-evidence-drawer summary { display: flex; min-height: 62px; align-items: center; justify-content: space-between; padding: 12px 20px; cursor: pointer; list-style: none; }
.app-evidence-drawer summary::-webkit-details-marker { display: none; }
.app-evidence-drawer summary > span { display: grid; grid-template-columns: 30px 1fr; align-items: center; gap: 2px 10px; }
.app-evidence-drawer summary svg { grid-row: 1 / 3; width: 23px; height: 23px; color: var(--app-blue); }
.app-evidence-drawer summary b { font-size: 13px; }
.app-evidence-drawer summary small { color: var(--app-muted); font-size: 10px; }
.app-evidence-drawer summary:after { color: var(--app-blue); content: "+"; font-size: 23px; }
.app-evidence-drawer[open] summary:after { content: "-"; }
.app-evidence-drawer > div { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--app-line); background: #f8fafc; }
.app-evidence-drawer article { display: grid; grid-template-columns: 12px 1fr; gap: 5px 9px; padding: 18px 20px; }
.app-evidence-drawer article + article { border-left: 1px solid var(--app-line); }
.app-evidence-drawer article > i { grid-row: 1 / 3; width: 10px; height: 10px; margin-top: 3px; border-radius: 50%; }
.app-evidence-drawer .observed { background: var(--app-green); }
.app-evidence-drawer .estimated { background: var(--app-amber); }
.app-evidence-drawer .context { background: var(--app-blue); }
.app-evidence-drawer .experimental { background: var(--app-purple); }
.app-evidence-drawer article b { font-size: 12px; }
.app-evidence-drawer article p { margin: 0; color: var(--app-muted); font-size: 10px; line-height: 1.4; }

@media (max-width: 1120px) {
  .app-hero { grid-template-columns: 1.05fr .95fr; }
  .app-hero-copy { padding: 38px 34px; }
  .app-hero h1 { font-size: 54px; }
  .app-live-number strong { font-size: 84px; }
  .app-signal { grid-template-columns: 48px minmax(200px, 1fr) minmax(300px, .9fr) 36px; }
}

@media (max-width: 900px) {
  .civic-app-main { width: min(100% - 28px, 760px); margin-top: 14px; }
  .app-hero { grid-template-columns: 1fr; }
  .app-hero-visual { min-height: 360px; }
  .app-signal { grid-template-columns: 48px 1fr 36px; }
  .app-signal dl { grid-column: 1 / -1; border-top: 1px solid var(--app-line); }
  .app-signal dl div { border-left: 0; text-align: center; }
  .app-signal > a { grid-column: 3; grid-row: 1; }
  .app-question-list { grid-template-columns: 1fr; }
  .app-question-list a + a { border-top: 1px solid var(--app-line); border-left: 0; }
  .app-evidence-drawer > div { grid-template-columns: 1fr 1fr; }
  .app-evidence-drawer article:nth-child(3) { border-left: 0; }
  .app-evidence-drawer article:nth-child(n+3) { border-top: 1px solid var(--app-line); }
}

@media (max-width: 620px) {
  .civic-app-main { width: 100%; margin: 0; gap: 10px; }
  .app-hero,
  .app-now,
  .app-journey,
  .app-route,
  .app-questions,
  .app-evidence-drawer { border-right: 0; border-left: 0; border-radius: 0; }
  .app-hero-copy { padding: 28px 18px 10px; }
  .app-hero h1 { font-size: clamp(40px, 11vw, 44px); letter-spacing: -1.4px; }
  .app-hero-deck { margin: 10px 0 17px; font-size: 15px; }
  .app-live-number { display: grid; grid-template-columns: auto 1fr; gap: 10px; }
  .app-live-number strong { font-size: 78px; }
  .app-live-number span { font-size: 17px; }
  #hero-story { display: none; }
  .app-hero-actions { display: grid; margin-top: 16px; }
  .app-primary-action,
  .app-secondary-action { width: 100%; }
  .app-secondary-action { display: none; }
  .app-hero-visual { min-height: 235px; padding: 12px 12px 8px; }
  .app-mode-switch { width: 100%; }
  .app-mode-switch button { min-height: 54px; padding: 8px 10px; }
  .app-transit-art { margin: -20px 0 -34px; }
  .app-visual-note { display: none; }
  .app-now,
  .app-journey,
  .app-route,
  .app-questions { padding: 24px 16px; }
  .app-section-heading { align-items: flex-start; margin-bottom: 16px; }
  .app-section-heading h2 { font-size: 28px; }
  .app-section-heading p { font-size: 12px; }
  .app-section-heading > a { font-size: 10px; }
  .app-signal { grid-template-columns: 44px 1fr 32px; gap: 11px; padding: 13px 12px; }
  .app-signal-icon { width: 42px; height: 42px; }
  .app-signal p { font-size: 10px; }
  .app-signal dl div { padding: 12px 5px 2px; }
  .app-signal dt { font-size: 24px; }
  .app-signal dd { font-size: 9px; }
  .app-journey .app-section-heading { display: grid; }
  .app-quiet-button { width: max-content; }
  .app-journey .commute-feature-intro { grid-template-columns: 1fr; gap: 18px; padding: 20px 18px; }
  .app-journey .commute-feature-meta { align-items: flex-start; flex-direction: column; gap: 8px; }
  .app-journey .commute-feature h3 { font-size: 31px; }
  .app-journey .featured-time { border-top: 1px solid var(--app-line); border-left: 0; }
  .app-journey .commute-timeline { grid-template-columns: 1fr; gap: 0; padding: 20px 18px; }
  .app-journey .commute-timeline:before { top: 48px; right: auto; bottom: 48px; left: 28px; width: 3px; height: auto; }
  .app-journey .timeline-stage { grid-template-columns: 52px 1fr; grid-template-rows: auto auto auto; min-height: 94px; }
  .app-journey .timeline-stage > span,
  .app-journey .timeline-stage > strong,
  .app-journey .timeline-stage > small { grid-column: 2; }
  .app-journey .timeline-stage > i { grid-column: 1; grid-row: 1 / 4; align-self: center; width: 42px; height: 42px; }
  .app-journey .commute-evidence { grid-template-columns: 1fr; }
  .app-journey .commute-evidence > div + div { border-top: 1px solid var(--app-line); border-left: 0; }
  .app-journey .commute-feature-footer { align-items: stretch; flex-direction: column; }
  .app-journey .commute-feature-footer p { text-align: left; }
  .journey-actions { align-items: flex-end; flex-direction: column; gap: 8px; }
  .app-route-identity { grid-template-columns: auto 1fr; padding: 15px; }
  .app-route-identity > span { min-width: 62px; }
  .app-route-identity h3 { font-size: 19px; }
  .app-route-identity > strong { grid-column: 1 / -1; padding-top: 11px; border-top: 1px solid var(--app-line); text-align: left; }
  .app-route .journey-line { grid-template-columns: repeat(3, 1fr); padding: 12px 6px; }
  .app-route .place + .place { border-left: 0; }
  .app-route .place:nth-child(3n+2),
  .app-route .place:nth-child(3n+3) { border-left: 1px solid var(--app-line); }
  .app-route .place:nth-child(n+4) { border-top: 1px solid var(--app-line); }
  .app-question-list a { min-height: 96px; padding: 17px 6px; }
  .app-evidence-drawer { margin-bottom: 8px; }
  .app-evidence-drawer > div { grid-template-columns: 1fr; }
  .app-evidence-drawer article + article,
  .app-evidence-drawer article:nth-child(3) { border-top: 1px solid var(--app-line); border-left: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .civic-app-main * { scroll-behavior: auto !important; transition: none !important; }
}
