:root {
  color-scheme: light;
  --ink: #17212b;
  --paper: #f7f1e5;
  --paper-deep: #eee4d2;
  --yellow: #f4c95d;
  --blue: #3d5a80;
  --green: #6a994e;
  --coral: #e76f51;
  --muted: #5b6872;
  --line: rgba(23, 33, 43, 0.16);
  --max: 1240px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  overflow-x: hidden;
  background: var(--paper);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.55;
}
a { color: inherit; }
a:hover { color: var(--blue); }
.skip-link {
  position: absolute;
  left: 1rem;
  top: -5rem;
  z-index: 5;
  padding: .7rem 1rem;
  border-radius: .4rem;
  background: var(--yellow);
  color: var(--ink);
  font-weight: 800;
}
.skip-link:focus { top: 1rem; }
.site-shell { width: min(100% - 2rem, var(--max)); margin: 0 auto; }
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 5rem;
  border-bottom: 1px solid var(--line);
}
.brand, .site-nav a, .toc a, .button, .kicker, .eyebrow, .route-tag, .stamp, .metric-label, .source-facts dt, .timeline-date, .receipt-line span, .receipt-status span, .boundary-icon, .gap-mark, .question-list > li > span {
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .11em;
  text-transform: uppercase;
}
.brand { display: inline-flex; align-items: center; gap: .65rem; min-height: 2.75rem; text-decoration: none; letter-spacing: .04em; }
.brand-mark { display: grid; place-items: center; width: 2.25rem; height: 2.25rem; background: var(--ink); color: var(--yellow); font-size: .7rem; letter-spacing: .08em; }
.site-nav, .footer-nav { display: flex; flex-wrap: wrap; gap: 1.15rem; align-items: center; }
.site-nav a, .footer-nav a { display: inline-flex; align-items: center; min-width: 2.75rem; min-height: 2.75rem; text-decoration: none; }
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(360px, .98fr);
  gap: clamp(2rem, 5vw, 6.5rem);
  align-items: center;
  padding: clamp(3.5rem, 8vw, 7rem) 0 clamp(2.5rem, 6vw, 5rem);
}
.hero-copy { max-width: 720px; }
.eyebrow { margin: 0 0 1rem; color: var(--blue); }
.audience-line { margin: 0 0 1.25rem; color: var(--muted); font-size: .96rem; font-weight: 650; }
h1, h2, h3, p { text-wrap: pretty; }
h1, h2, h3 { line-height: 1.03; letter-spacing: -.04em; }
h1 { max-width: 10ch; margin: 0; font-size: clamp(3.1rem, 7.8vw, 7.4rem); }
h2 { margin: 0; font-size: clamp(2rem, 4vw, 4.25rem); }
h3 { margin: .6rem 0 .7rem; font-size: clamp(1.3rem, 2vw, 1.8rem); }
.dek { max-width: 60ch; margin: 1.6rem 0 0; font-size: clamp(1.1rem, 1.8vw, 1.34rem); line-height: 1.45; }
.answer-line { display: grid; grid-template-columns: 9rem 1fr; gap: 1rem; max-width: 64ch; margin: 1.5rem 0 0; padding: 1rem 0 1rem 1rem; border-left: .36rem solid var(--yellow); background: rgba(244, 201, 93, .15); }
.answer-line strong { font-size: .72rem; text-transform: uppercase; letter-spacing: .11em; }
.answer-line span { grid-column: 2; color: var(--blue); font-weight: 700; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; margin-top: 1.7rem; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 2.75rem; padding: .8rem 1.1rem; border: 2px solid var(--ink); background: var(--ink); color: var(--paper); text-decoration: none; }
.button:hover { background: var(--blue); color: white; }
.text-link { min-height: 2.75rem; display: inline-flex; align-items: center; padding: .7rem 0; font-weight: 750; }
.trust-line { margin: 1.3rem 0 0; color: var(--muted); font-size: .77rem; }
.receipt-figure { margin: 0; }
.figure-top { display: flex; justify-content: space-between; gap: 1rem; align-items: start; margin-bottom: .7rem; color: var(--blue); }
.figure-top p { margin: 0; text-align: right; color: var(--ink); font-size: 1.15rem; line-height: 1.05; }
.figure-top strong { font-size: 1.5rem; }
.receipt-paper { position: relative; padding: clamp(1.1rem, 3vw, 2rem); background: #fffaf0; border: 1px solid var(--line); box-shadow: .65rem .65rem 0 var(--yellow); }
.receipt-paper::before, .receipt-paper::after { content: ""; position: absolute; left: 0; right: 0; height: 7px; background: repeating-linear-gradient(135deg, transparent 0 9px, var(--paper-deep) 9px 13px); }
.receipt-paper::before { top: -7px; }
.receipt-paper::after { bottom: -7px; }
.receipt-line { display: flex; justify-content: space-between; gap: 1rem; padding: .45rem 0; border-bottom: 1px dotted var(--line); }
.receipt-line strong { text-align: right; }
.receipt-label strong { color: var(--coral); font-size: 1.1rem; }
.receipt-divider { height: 1px; margin: 1rem 0; border-top: 2px dashed var(--line); }
.route-block { padding: .85rem 1rem; border-left: .35rem solid var(--blue); background: rgba(61, 90, 128, .11); }
.route-block.route-census { border-left-color: var(--green); background: rgba(106, 153, 78, .14); }
.route-block strong { display: block; margin: .22rem 0; font-size: 1.08rem; line-height: 1.2; }
.route-block small, .receipt-note, figcaption { color: var(--muted); font-size: .82rem; }
.route-gap { display: grid; grid-template-columns: auto 1fr; gap: .7rem; align-items: center; padding: .55rem 0; color: var(--coral); }
.route-gap span { display: grid; place-items: center; width: 1.7rem; height: 1.7rem; border: 2px solid var(--coral); border-radius: 50%; font-weight: 900; }
.route-gap small { color: var(--coral); font-weight: 750; }
.receipt-status { margin-top: 1rem; border: 0; }
.receipt-status strong { color: var(--blue); }
.receipt-note { margin: 0; }
figcaption { display: block; margin-top: 1.3rem; line-height: 1.4; }
.toc { display: flex; flex-wrap: wrap; gap: .45rem; padding: .65rem 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.toc a { min-width: 2.75rem; min-height: 2.75rem; display: inline-flex; align-items: center; padding: .45rem .75rem; color: var(--muted); text-decoration: none; letter-spacing: .08em; }
.toc a:hover, .toc a:focus { background: var(--yellow); color: var(--ink); }
.content-section { padding: clamp(4rem, 8vw, 8rem) 0; border-bottom: 1px solid var(--line); scroll-margin-top: 1.5rem; }
.section-heading { display: grid; grid-template-columns: minmax(7rem, .22fr) minmax(0, .78fr); gap: 2rem; align-items: start; }
.section-heading .kicker { margin: .35rem 0 0; color: var(--coral); }
.section-heading p:not(.kicker) { max-width: 66ch; margin: 1rem 0 0; color: var(--muted); font-size: 1.05rem; }
.finding-grid, .code-grid, .boundary-grid, .source-grid, .route-grid { display: grid; gap: 1rem; margin-top: 2.5rem; }
.finding-grid { grid-template-columns: repeat(3, 1fr); }
.finding-card, .code-card, .route-card, .boundary-grid article, .source-group { min-width: 0; padding: 1.2rem; border: 1px solid var(--line); background: rgba(255, 250, 240, .72); }
.finding-card { min-height: 15rem; border-top: .45rem solid var(--ink); }
.finding-record { border-top-color: var(--green); }
.finding-retention { border-top-color: var(--blue); }
.finding-gap { border-top-color: var(--coral); }
.stamp { display: inline-flex; color: var(--muted); }
.finding-card strong { display: block; margin-top: 2.5rem; font-size: 1.45rem; line-height: 1.1; }
.finding-card p { margin-bottom: 0; color: var(--muted); }
.code-grid { grid-template-columns: repeat(4, 1fr); }
.code-card { min-height: 11rem; display: flex; flex-direction: column; justify-content: space-between; border-left: .45rem solid var(--blue); }
.code-card.code-attended { border-left-color: var(--green); }
.code-card.code-closed { border-left-color: var(--coral); }
.code-card > span { font-size: 1.2rem; font-weight: 900; color: var(--blue); }
.code-card strong { margin-top: 1.2rem; font-size: 1.1rem; }
.code-card small { color: var(--muted); }
.formula-note, .source-note, .limit-box { margin-top: 1.3rem; padding: 1rem 1.2rem; border-left: .35rem solid var(--yellow); background: rgba(244, 201, 93, .16); }
.formula-note strong:first-child { color: var(--blue); }
.comparison-table-wrap { margin-top: 2.5rem; overflow-x: auto; border: 1px solid var(--line); background: rgba(255, 250, 240, .72); }
.code-table { width: 100%; min-width: 42rem; border-collapse: collapse; }
.code-table caption { padding: 1rem 1.2rem; text-align: left; color: var(--muted); font-size: .84rem; }
.code-table th, .code-table td { padding: .8rem 1.1rem; border-top: 1px solid var(--line); text-align: left; vertical-align: top; }
.code-table thead th { background: var(--ink); color: var(--paper); font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; }
.code-table tbody th { width: 7rem; color: var(--coral); font-size: 1.05rem; }
.code-table tbody td { color: var(--muted); }
.code-table tbody tr:nth-child(even) { background: rgba(244, 201, 93, .1); }
.route-grid { grid-template-columns: repeat(2, 1fr); }
.route-card { display: grid; grid-template-columns: auto 1fr; gap: 1rem; border-top: .45rem solid var(--blue); }
.route-card.route-census { border-top-color: var(--green); }
.route-number { display: grid; place-items: center; width: 2.4rem; height: 2.4rem; border-radius: 50%; background: var(--blue); color: white; font-weight: 900; }
.route-census .route-number { background: var(--green); }
.route-tag { color: var(--muted); }
.route-card p { color: var(--muted); }
.source-label { padding-top: .7rem; border-top: 1px dotted var(--line); font-weight: 750; }
.gap-box { display: grid; grid-template-columns: auto 1fr; gap: 1rem; align-items: start; margin-top: 1.4rem; padding: 1.3rem; border: 2px solid var(--coral); background: rgba(231, 111, 81, .1); }
.gap-mark { display: grid; place-items: center; width: 2.6rem; height: 2.6rem; border: 2px solid var(--coral); border-radius: 50%; color: var(--coral); font-size: 1.25rem; }
.gap-box p { margin: .35rem 0 0; }
.retention-panel { display: grid; grid-template-columns: .9fr 1.1fr; gap: 1rem; margin-top: 2.5rem; }
.retention-quote, .retention-boundary { padding: clamp(1.4rem, 3vw, 2.2rem); }
.retention-quote { display: flex; flex-direction: column; justify-content: center; min-height: 17rem; background: var(--ink); color: var(--paper); }
.retention-quote span, .retention-boundary > span { font-size: .72rem; font-weight: 850; letter-spacing: .11em; }
.retention-quote strong { margin: 1.5rem 0; color: var(--yellow); font-size: clamp(2rem, 4vw, 4rem); line-height: .95; letter-spacing: -.05em; }
.retention-quote small { color: #cbd1d4; }
.retention-boundary { background: var(--paper-deep); }
.retention-boundary > span:nth-of-type(2) { display: block; margin-top: 1.8rem; color: var(--coral); }
.retention-boundary p { max-width: 50ch; }
.timeline { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; margin-top: 2.5rem; border-top: 2px solid var(--ink); }
.timeline-item { min-height: 15rem; padding: 1.25rem; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.timeline-item:last-child { border-right: 0; }
.timeline-item.timeline-current { background: var(--yellow); }
.timeline-date { color: var(--blue); }
.timeline-item strong { display: block; margin: 2rem 0 .6rem; font-size: 1.35rem; line-height: 1.1; }
.timeline-item p { margin-bottom: 0; color: var(--muted); }
.boundary-grid { grid-template-columns: repeat(4, 1fr); }
.boundary-grid article { min-height: 14rem; border-top: .45rem solid var(--ink); }
.boundary-grid article:nth-child(2) { border-top-color: var(--coral); }
.boundary-grid article:nth-child(3) { border-top-color: var(--blue); }
.boundary-grid article:nth-child(4) { border-top-color: var(--green); }
.boundary-icon { color: var(--coral); }
.boundary-grid strong { display: block; margin: 2.3rem 0 .6rem; font-size: 1.15rem; }
.boundary-grid p { margin-bottom: 0; color: var(--muted); }
.question-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 1.5rem; margin: 2.5rem 0 0; padding: 0; list-style: none; counter-reset: questions; }
.question-list li { display: grid; grid-template-columns: auto 1fr; gap: 1rem; padding: 1.4rem 0; border-top: 1px solid var(--line); }
.question-list > li > span { display: grid; place-items: center; width: 2.5rem; height: 2.5rem; background: var(--yellow); color: var(--ink); }
.question-list strong { display: block; margin-top: .25rem; font-size: 1.2rem; line-height: 1.15; }
.question-list p { margin: .45rem 0 0; color: var(--muted); }
.source-grid { grid-template-columns: 1.25fr .75fr; }
.source-group h3 { margin-top: 0; }
.source-list { margin: 0; padding: 0; list-style: none; }
.source-list li { padding: .85rem 0; border-top: 1px dotted var(--line); }
.source-list a { display: inline-flex; align-items: center; min-width: 2.75rem; min-height: 2.75rem; font-weight: 800; }
.source-list small { display: block; margin-top: .2rem; color: var(--muted); }
.source-facts { margin: 0; }
.source-facts div { display: grid; grid-template-columns: .8fr 1.2fr; gap: .75rem; padding: .75rem 0; border-top: 1px dotted var(--line); }
.source-facts dt { color: var(--blue); }
.source-facts dd { margin: 0; }
.limit-box { border-left-color: var(--coral); background: rgba(231, 111, 81, .1); }
.limit-box p { margin: .45rem 0 0; }
.site-footer { display: flex; justify-content: space-between; gap: 2rem; padding: 2.5rem 0 4rem; color: var(--muted); font-size: .9rem; }
.site-footer p { margin: 0; }
.site-footer p a { display: inline-flex; align-items: center; min-height: 2.75rem; }
.not-found { min-height: 70vh; display: grid; align-content: center; max-width: 42rem; }
.not-found h1 { max-width: 12ch; }
.not-found p { color: var(--muted); }

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; gap: 3rem; }
  .hero-copy { max-width: 70ch; }
  .receipt-figure { max-width: 680px; }
  .finding-grid, .boundary-grid { grid-template-columns: repeat(2, 1fr); }
  .code-grid { grid-template-columns: repeat(2, 1fr); }
  .section-heading { grid-template-columns: 1fr; gap: .8rem; }
  .section-heading .kicker { margin: 0; }
}

@media (max-width: 620px) {
  .site-shell { width: min(100% - 1.1rem, var(--max)); }
  .site-header { min-height: 4.3rem; }
  .site-nav { gap: .6rem; }
  h1 { max-width: 12ch; font-size: clamp(2.75rem, 15vw, 5rem); }
  h2 { font-size: clamp(2rem, 10vw, 3rem); }
  .hero { padding-top: 2.7rem; }
  .answer-line { grid-template-columns: 1fr; gap: .5rem; }
  .answer-line span { grid-column: auto; }
  .figure-top p { font-size: .95rem; }
  .receipt-paper { box-shadow: .35rem .35rem 0 var(--yellow); }
  .receipt-line { align-items: start; font-size: .9rem; }
  .receipt-line strong { max-width: 58%; }
  .toc { gap: .15rem; }
  .toc a { padding: .35rem .45rem; font-size: .63rem; }
  .content-section { padding: 3.4rem 0; }
  .finding-grid, .code-grid, .route-grid, .retention-panel, .timeline, .boundary-grid, .question-list, .source-grid { grid-template-columns: 1fr; }
  .finding-card, .code-card, .boundary-grid article { min-height: auto; }
  .finding-card strong, .timeline-item strong, .boundary-grid strong { margin-top: 1.3rem; }
  .route-card { grid-template-columns: 1fr; }
  .timeline-item, .timeline-item:last-child { min-height: auto; border-right: 0; }
  .question-list { gap: 0; }
  .source-facts div { grid-template-columns: 1fr; gap: .2rem; }
  .site-footer { display: grid; gap: 1.3rem; }
}

:focus-visible { outline: 3px solid var(--coral); outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
