:root {
  --ink: #122b3d;
  --muted: #5d6a74;
  --paper: #f7f3ea;
  --white: #fff;
  --line: #d8d5cd;
  --red: #a5213a;
  --blue: #2f6f89;
  --green: #31755b;
  --gold: #b9862d;
  --purple: #76578d;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--paper); font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; line-height: 1.62; }
a { color: var(--red); }
img { max-width: 100%; }
.topline { height: 6px; background: var(--red); }
.shell { width: min(1120px, calc(100% - 40px)); margin: 0 auto; }
.back { display: inline-flex; margin-top: 26px; color: var(--muted); font-size: 13px; font-weight: 700; text-decoration: none; }
.back:hover { color: var(--red); }
.hero { padding: 58px 0 44px; border-bottom: 1px solid var(--line); }
.eyebrow { margin: 0 0 9px; color: var(--red); font-size: 12px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
h1, h2, h3 { font-family: Georgia, "Times New Roman", serif; font-weight: 500; line-height: 1.1; }
h1 { max-width: 940px; margin: 0; font-size: clamp(45px, 7.2vw, 80px); letter-spacing: -.042em; }
.dek { max-width: 800px; margin: 22px 0 0; color: #394c59; font-size: clamp(19px, 2.2vw, 25px); line-height: 1.42; }
.byline { margin: 24px 0 0; color: var(--muted); font-size: 13px; }
.metric-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 34px; }
.metric { padding: 18px; border: 1px solid var(--line); border-radius: 10px; background: rgba(255, 255, 255, .68); }
.metric strong { display: block; color: var(--ink); font-family: Georgia, "Times New Roman", serif; font-size: 31px; font-weight: 500; line-height: 1; }
.metric span { display: block; margin-top: 7px; color: var(--muted); font-size: 12px; line-height: 1.35; }
.shift-note { max-width: 960px; margin-top: 22px; padding: 20px 22px; border-left: 5px solid var(--gold); border-radius: 0 10px 10px 0; background: var(--white); }
.shift-note .eyebrow { margin-bottom: 5px; color: #8a6526; }
.shift-note p:last-child { margin: 0; color: #3e4d58; font-size: 15px; }
.gtfs-timeline { display: grid; grid-template-columns: repeat(4, 1fr); margin-top: 24px; border-top: 2px solid var(--line); }
.gtfs-timeline article { position: relative; padding: 20px 18px 0 0; }
.gtfs-timeline article::before { position: absolute; top: -7px; left: 0; width: 12px; height: 12px; border: 2px solid var(--paper); border-radius: 50%; background: var(--blue); content: ""; }
.gtfs-timeline article.shift::before { background: var(--red); }
.gtfs-timeline time { display: block; margin-bottom: 9px; color: var(--muted); font-size: 11px; font-weight: 800; letter-spacing: .03em; text-transform: uppercase; }
.gtfs-timeline strong, .gtfs-timeline span { display: block; }
.gtfs-timeline strong { font-size: 14px; }
.gtfs-timeline span { color: #42535e; font-size: 12px; }
.gtfs-timeline p { margin: 7px 0 0; color: var(--muted); font-size: 12px; line-height: 1.45; }
.timeline-note { margin: 14px 0 0; color: var(--muted); font-size: 11px; }
.jump { position: sticky; top: 0; z-index: 4; border-bottom: 1px solid var(--line); background: rgba(247, 243, 234, .95); backdrop-filter: blur(10px); }
.jump .shell { display: flex; gap: 22px; overflow-x: auto; padding-top: 12px; padding-bottom: 12px; }
.jump a { flex: 0 0 auto; color: var(--muted); font-size: 12px; font-weight: 750; text-decoration: none; }
.jump a:hover { color: var(--red); }
.section { padding: 66px 0; border-bottom: 1px solid var(--line); }
.section h2 { max-width: 820px; margin: 0 0 16px; font-size: clamp(32px, 4.6vw, 51px); letter-spacing: -.025em; }
.section h3 { margin: 32px 0 10px; font-size: 26px; }
.section-lede { max-width: 790px; margin: 0 0 30px; color: #3e4d58; font-size: 19px; }
.narrow { max-width: 820px; }
.findings { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 34px; }
.finding { padding: 24px; border-radius: 11px; background: var(--white); box-shadow: inset 0 4px 0 var(--blue); }
.finding:nth-child(2) { box-shadow: inset 0 4px 0 var(--red); }
.finding:nth-child(3) { box-shadow: inset 0 4px 0 var(--gold); }
.finding .number { color: var(--muted); font-size: 11px; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; }
.finding h3 { margin: 14px 0 8px; font-size: 24px; }
.finding p { margin: 0; color: var(--muted); font-size: 14px; }
.caution { margin-top: 24px; padding: 16px 19px; border: 1px solid #e1c98e; border-radius: 9px; background: #fbf3df; color: #61563c; font-size: 14px; }
.permalink { display: inline-block; margin: -12px 0 28px; color: var(--red); font-size: 12px; font-weight: 750; text-decoration: none; }
.permalink:hover { text-decoration: underline; }
.callout { margin: 0 0 30px; padding: 22px 24px; border-left: 5px solid var(--red); background: var(--white); }
.callout h3 { margin: 0 0 8px; font-size: 25px; }
.callout p { max-width: 850px; margin: 0; color: #3e4d58; }
.periods { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; margin: 30px 0; border: 1px solid var(--line); border-radius: 10px; background: var(--white); overflow: hidden; }
.period { padding: 20px; border-right: 1px solid var(--line); }
.period:last-child { border: 0; }
.period strong { display: block; margin-bottom: 4px; font-size: 15px; }
.period span { color: var(--muted); font-size: 13px; }
.plot { margin: 30px 0 12px; }
.plot img { display: block; width: 100%; border: 1px solid var(--line); border-radius: 10px; background: var(--white); }
.plot figcaption { margin-top: 9px; color: var(--muted); font-size: 12px; }
.kpi-figure a { display: block; }
.kpi-figure a:hover img, .kpi-figure a:focus-visible img { border-color: var(--red); }
.statline { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 24px 0; }
.statline > div { padding: 18px 19px; border-left: 4px solid var(--blue); background: var(--white); }
.statline > div:nth-child(2) { border-color: var(--red); }
.statline > div:nth-child(3) { border-color: var(--purple); }
.statline strong { display: block; font-size: 23px; }
.statline span { color: var(--muted); font-size: 12px; }
.split { display: grid; grid-template-columns: 1.05fr .95fr; gap: 36px; align-items: start; }
.definition { padding: 20px 22px; border-radius: 10px; background: #eaf0f2; }
.definition strong { display: block; margin-bottom: 6px; }
.definition p { margin: 0; color: #43545f; font-size: 14px; }
.table-wrap { width: 100%; overflow-x: auto; margin: 24px 0; }
table { width: 100%; min-width: 700px; border-collapse: collapse; background: var(--white); font-size: 13px; }
th, td { padding: 11px 13px; border-bottom: 1px solid #e4e2dc; text-align: right; white-space: nowrap; }
th:first-child, td:first-child { text-align: left; }
th { color: #40515d; background: #efede7; font-size: 11px; letter-spacing: .04em; text-transform: uppercase; }
tr:last-child td { border-bottom: 0; }
.group-local { color: var(--blue); }
.group-transbay { color: var(--red); }
.group-night { color: var(--purple); }
.group-school { color: var(--gold); }
.group-early { color: var(--green); }
.quote { margin: 32px 0; padding: 26px 28px; border-left: 5px solid var(--red); background: var(--white); font-family: Georgia, "Times New Roman", serif; font-size: 23px; line-height: 1.4; }
.two-plots { display: grid; grid-template-columns: 1fr; gap: 22px; }
.standard-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 24px 0; }
.standard-grid > div { padding: 22px; border-top: 4px solid var(--blue); border-radius: 8px; background: var(--white); }
.standard-grid > div:nth-child(2) { border-color: var(--gold); }
.standard-grid > div:nth-child(3) { border-color: var(--purple); }
.standard-grid > div:nth-child(4) { border-color: var(--red); }
.standard-grid strong, .standard-grid span { display: block; }
.standard-grid strong { font-family: Georgia, "Times New Roman", serif; font-size: 30px; font-weight: 500; line-height: 1; }
.standard-grid span { margin-top: 12px; color: var(--muted); font-size: 13px; line-height: 1.45; }
.standard-grid b { color: var(--ink); }
.stakes { max-width: 900px; margin: 28px 0 42px; font-family: Georgia, "Times New Roman", serif; font-size: 23px; line-height: 1.45; }
.accountability-list { display: grid; grid-template-columns: repeat(5, 1fr); margin: 30px 0; border: 1px solid var(--line); border-radius: 10px; background: var(--white); overflow: hidden; }
.accountability-list > div { padding: 20px; border-right: 1px solid var(--line); }
.accountability-list > div:last-child { border-right: 0; }
.accountability-list strong, .accountability-list span { display: block; }
.accountability-list strong { font-family: Georgia, "Times New Roman", serif; font-size: 18px; font-weight: 500; line-height: 1.2; }
.accountability-list span { margin-top: 8px; color: var(--muted); font-size: 12px; line-height: 1.45; }
.outline { counter-reset: outline; margin-top: 28px; }
.outline article { display: grid; grid-template-columns: 54px 1fr; gap: 17px; padding: 20px 0; border-top: 1px solid var(--line); }
.outline article::before { counter-increment: outline; content: counter(outline, decimal-leading-zero); color: var(--red); font-family: Georgia, "Times New Roman", serif; font-size: 25px; }
.outline h3 { margin: 0 0 6px; font-size: 21px; }
.outline p { margin: 0; color: var(--muted); font-size: 14px; }
.do-dont { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 28px; }
.do-dont > div { padding: 22px; border-radius: 9px; background: var(--white); }
.do-dont h3 { margin: 0 0 8px; font-size: 21px; }
.do-dont ul { margin: 0; padding-left: 18px; color: var(--muted); font-size: 14px; }
.do-dont li { margin: 6px 0; }
.methods-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
.methods-grid h3 { margin-top: 0; }
.methods-grid ul { padding-left: 18px; }
.methods-grid li { margin: 7px 0; }
.source-list { padding-left: 18px; }
.source-list li { margin: 8px 0; }
.footer { padding: 36px 0 60px; color: var(--muted); font-size: 12px; }
.footer .shell { display: flex; justify-content: space-between; gap: 20px; }

@media (max-width: 820px) {
  .metric-grid, .findings { grid-template-columns: 1fr 1fr; }
  .statline, .periods, .standard-grid, .accountability-list { grid-template-columns: 1fr; }
  .period { border-right: 0; border-bottom: 1px solid var(--line); }
  .accountability-list > div { border-right: 0; border-bottom: 1px solid var(--line); }
  .accountability-list > div:last-child { border-bottom: 0; }
  .split, .methods-grid, .do-dont { grid-template-columns: 1fr; }
  .gtfs-timeline { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 560px) {
  .shell { width: min(100% - 26px, 1120px); }
  .hero { padding-top: 42px; }
  .metric-grid, .findings { grid-template-columns: 1fr; }
  .gtfs-timeline { grid-template-columns: 1fr; }
  .section { padding: 48px 0; }
  .footer .shell { display: block; }
}

@media print {
  .jump, .back { display: none; }
  body { background: #fff; }
  .shell { width: 100%; }
  .section { break-inside: avoid; padding: 35px 0; }
  .plot, table, .finding { break-inside: avoid; }
}
