/*
 * Independent guide theme. Colors sampled from regional-school-bus-fleet.webp:
 * bus body (700, 260) #f3b23b; chassis (500, 170) #121416;
 * sky average in (100, 5)-(350, 60) #ebeef2. Tints below derive from these.
 */
:root {
  --bus-yellow: #f3b23b;
  --asphalt: #121416;
  --cloud: #ebeef2;
  --paper: color-mix(in srgb, var(--cloud) 45%, white);
  --paper-light: #fff;
  --ink: var(--asphalt);
  --muted: color-mix(in srgb, var(--asphalt) 70%, white);
  --leaf: var(--asphalt);
  --leaf-dark: var(--asphalt);
  --moss: var(--bus-yellow);
  --sun: var(--bus-yellow);
  --soil: color-mix(in srgb, var(--bus-yellow) 45%, var(--asphalt));
  --soil-dark: var(--asphalt);
  --sky: var(--cloud);
  --line: color-mix(in srgb, var(--asphalt) 24%, transparent);
  --shadow: 0 18px 50px color-mix(in srgb, var(--asphalt) 12%, transparent);
}

body { background: var(--paper); }
.site-header { background: color-mix(in srgb, var(--paper) 95%, transparent); }
.brand { min-width: 0; }
.brand-icon { width: 48px; height: 48px; border-radius: 10px; flex: none; }
.brand strong { line-height: 1.15; }
.main-nav a:first-child { background: transparent; color: var(--ink); }
.main-nav a:hover, .main-nav a:first-child:hover { background: var(--cloud); }
.main-nav a[aria-current="page"] { background: var(--ink); color: white; }
.main-nav a[aria-current="page"]:hover { background: var(--soil); }
.home-hero { background: linear-gradient(180deg, var(--cloud), var(--paper) 85%); }
.home-hero:before { border-color: var(--line); }
.home-hero:after { background: color-mix(in srgb, var(--bus-yellow) 20%, transparent); }
.hero-copy h1 span { color: var(--ink); }
.hero-deck, .guide-deck, .guide-article p, .field-list li,
.guide-article ul.plain, .guide-article ol.steps, .source-policy > p { color: var(--muted); }
.button { box-shadow: 4px 4px color-mix(in srgb, var(--asphalt) 25%, transparent); }
.button:hover { box-shadow: 2px 2px color-mix(in srgb, var(--asphalt) 30%, transparent); }
.button-primary, .button-soil { background: var(--bus-yellow); color: var(--ink); }
.image-frame:before { color: var(--ink); }
.research-board { background: linear-gradient(135deg, color-mix(in srgb, var(--bus-yellow) 22%, transparent), transparent 48%), var(--paper-light); }
.loop-stamp { background: color-mix(in srgb, var(--asphalt) 90%, transparent); }
/* A road-edge stripe keeps the original decorative divider in the bus theme. */
.grass-line { height: 8px; clip-path: none; background: repeating-linear-gradient(90deg, var(--bus-yellow) 0 38px, var(--asphalt) 38px 52px); }
.route-card, .verification-grid article, .contents-card, .reading-time { background: var(--paper-light); }
.route-card:nth-child(2), .verification-grid article:nth-child(2) { background: var(--cloud); }
.route-card:nth-child(3), .verification-grid article:nth-child(3) { background: color-mix(in srgb, var(--bus-yellow) 16%, white); }
.odds-note, .field-note { background: color-mix(in srgb, var(--bus-yellow) 14%, white); }
.home-faq-strip, .site-footer { background: var(--asphalt); }
.guide-hero { background: linear-gradient(105deg, var(--cloud), var(--paper) 70%); }
.guide-hero:after { border-color: color-mix(in srgb, var(--bus-yellow) 20%, transparent); }
.contents-card { box-shadow: 5px 6px color-mix(in srgb, var(--asphalt) 10%, transparent); }
.field-list { background: var(--cloud); }
.field-note { box-shadow: 5px 5px color-mix(in srgb, var(--asphalt) 12%, transparent); }
.site-footer .footer-grid > div > p:last-child, .footer-grid nav a { color: var(--cloud); }

/* Notices, tables and labels retain the original guide's information hierarchy. */
.notice-card { border: 2px solid var(--soil); background: color-mix(in srgb, var(--bus-yellow) 16%, white); border-radius: 8px; padding: 22px 26px; margin: 0 0 28px; box-shadow: 5px 5px color-mix(in srgb, var(--asphalt) 12%, transparent); }
.notice-card strong.kicker { display: block; color: var(--soil); font-family: var(--font-geist-mono), monospace; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; margin-bottom: 8px; }
.notice-card h2, .notice-card h3 { margin: 0 0 10px; font-family: Georgia, serif; font-size: clamp(22px, 2.4vw, 30px); line-height: 1.15; }
.notice-card p { margin: 0 0 10px; font-size: 16px; line-height: 1.7; color: var(--ink); }
.notice-card a.button { margin-top: 6px; }
.home-notice { padding: 34px 0 0; }
.table-wrap { overflow-x: auto; margin: 0 0 24px; border: 1px solid var(--line); border-radius: 6px; background: var(--paper-light); }
table.data-table { width: 100%; border-collapse: collapse; font-size: 15px; line-height: 1.5; }
table.data-table caption { padding: 10px 12px; text-align: left; color: var(--ink); font-size: 14px; font-weight: 700; border-bottom: 1px solid var(--line); }
table.data-table th, table.data-table td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
table.data-table th { background: var(--cloud); font-family: var(--font-geist-mono), monospace; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink); }
table.data-table tr:last-child td { border-bottom: 0; }
.guide-article ul.plain, .guide-article ol.steps { margin: 0 0 22px; padding-left: 22px; font-size: 16px; line-height: 1.75; }
.guide-article ol.steps li, .guide-article ul.plain li { margin-bottom: 8px; }
.guide-article ol.steps { list-style: decimal; }
.guide-article ul.plain { list-style: disc; }
.tag { display: inline-block; padding: 1px 8px; border-radius: 99px; font-family: var(--font-geist-mono), monospace; font-size: 11px; letter-spacing: .04em; text-transform: uppercase; border: 1px solid currentColor; white-space: nowrap; }
.tag-ok { color: #1f6b3a; }
.tag-rep { color: var(--soil); }
.tag-off { color: #8a2b1a; }
.tag-none { color: var(--muted); }
.updated-line { display: block; margin-top: 10px; font-family: var(--font-geist-mono), monospace; font-size: 12px; letter-spacing: .06em; color: var(--muted); }
.stat-row { display: flex; flex-wrap: wrap; gap: 10px; margin: 14px 0 0; padding: 0; list-style: none; }
.stat-row li { background: var(--paper-light); border: 1px solid var(--line); border-radius: 6px; padding: 8px 12px; font-size: 14px; }
.stat-row b { display: block; font-size: 18px; color: var(--ink); }

/* Clear link and keyboard states remain visible on yellow and dark surfaces. */
.guide-article a:not(.button), .notice-card p a, .source-list article p a { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.guide-article a:not(.button):hover { text-decoration-thickness: 2px; }
:is(a, button, input, select, textarea, summary, [tabindex]):focus-visible { outline: 3px solid var(--ink); outline-offset: 4px; box-shadow: 0 0 0 7px var(--sun); }
.site-footer :focus-visible, .field-feature :focus-visible, .home-faq-strip :focus-visible { outline-color: var(--sun); box-shadow: 0 0 0 7px var(--ink); }
.breadcrumbs { flex-wrap: wrap; align-items: center; row-gap: 4px; }
.breadcrumbs a { display: inline-flex; align-items: center; min-height: 32px; padding: 4px 0; }
.guide-article, .source-list article > div, .footer-grid > div { min-width: 0; overflow-wrap: anywhere; }
.footer-grid nav { min-width: 0; }
.footer-grid nav a { display: inline-flex; align-items: center; min-width: 24px; min-height: 32px; padding: 4px 0; }
@media (min-width: 861px) {
  /* Both columns must share the available width as the support links wrap. */
  .footer-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); }
}
.guide-article > section, .faq-list details { scroll-margin-top: 130px; }
.contents-card ol { list-style: decimal; }
.contents-card li { break-inside: avoid; margin-block: 3px; }
.contents-card a { display: block; min-height: 32px; padding: 6px 0; }

/* The checklist is stored on this browser by the small local script. */
.route-checklist { min-inline-size: 0; border: 1px solid var(--line); border-radius: 8px; background: var(--paper-light); padding: 22px; margin: 24px 0; }
.route-checklist legend { padding: 0 8px; color: var(--ink); font-size: 14px; font-weight: 700; }
.guide-article .checklist-hint { padding: 12px 16px; border-left: 3px solid var(--sun); background: var(--paper-light); font-size: 14px; }
.route-checklist ul { list-style: none; padding: 0; margin: 0; }
.route-checklist li + li { border-top: 1px solid var(--line); }
.route-checklist label { display: flex; align-items: flex-start; gap: 12px; padding: 13px 0; cursor: pointer; color: var(--ink); line-height: 1.6; }
.route-checklist input[type="checkbox"] { accent-color: var(--asphalt); flex: none; width: 20px; height: 20px; margin-top: 3px; cursor: pointer; }
.route-checklist input:checked + span { color: var(--muted); }
.guide-article .checklist-status { font-weight: 700; color: var(--ink); margin: 0 0 12px; }
.reset-progress { border: 1px solid var(--ink); border-radius: 6px; background: var(--cloud); color: var(--ink); cursor: pointer; min-height: 44px; padding: 8px 14px; margin-top: 16px; font-size: 14px; font-weight: 700; }
.reset-progress:hover { background: var(--sun); }
.reset-progress:disabled { cursor: default; opacity: .6; }

@media (max-width: 860px) {
  .footer-grid { grid-template-columns: minmax(0, 1fr); }
  .site-header { position: static; }
  .header-inner { padding-bottom: 10px; }
  .main-nav { flex-wrap: wrap; width: 100%; margin-left: 0; padding: 0; gap: 3px; overflow: visible; }
  .main-nav a { min-height: 40px; display: inline-flex; align-items: center; padding: 8px 11px; }
  .guide-article > section, .faq-list details { scroll-margin-top: 20px; }
}
@media (max-width: 620px) {
  .home-hero:before { display: none; }
  /* A persistent scroll track and partially visible next link signal more items. */
  .header-inner { padding-bottom: 6px; }
  .main-nav { flex-wrap: nowrap; overflow-x: auto; overflow-y: hidden; gap: 6px; padding: 0 0 6px; scrollbar-width: thin; scrollbar-color: var(--soil) var(--cloud); scroll-padding-inline: 4px; }
  .main-nav::-webkit-scrollbar { display: block; height: 6px; }
  .main-nav::-webkit-scrollbar-track { background: var(--cloud); border-radius: 6px; }
  .main-nav::-webkit-scrollbar-thumb { background: var(--soil); border-radius: 6px; }
  .main-nav a { white-space: nowrap; }
  /* Inset focus remains visible within the horizontal scroll container. */
  .main-nav a:focus-visible { outline-offset: -3px; box-shadow: none; }
  .main-nav a[aria-current="page"]:focus-visible { outline-color: var(--sun); }
  .contents-card a { min-height: 40px; }
  .brand strong { font-size: 16px; }
  .brand small { letter-spacing: .1em; }
  .hero-copy h1, .guide-hero h1, .compact-hero h1 { font-size: clamp(36px, 10.5vw, 60px); overflow-wrap: anywhere; }
  .notice-card { padding: 20px; }
  .route-checklist { padding: 16px; }
  table.data-table { font-size: 14px; }
  table.data-table th, table.data-table td { padding: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  .button:hover, .route-card:hover, .related-card:hover { transform: none; }
}
