:root {
  color-scheme: light;
  font-family: "Avenir Next", Avenir, Aptos, "Segoe UI", sans-serif;
  background: #ffffff;
  color: #182033;
  --ink: #182033;
  --muted: #5f6879;
  --surface: #ffffff;
  --rule: #d9dee7;
  --brand: #242c4f;
}

* { box-sizing: border-box; }
html { min-width: 320px; background: #ffffff; }
body { margin: 0; min-height: 100vh; background: linear-gradient(180deg, #f8fafc 0, #ffffff 360px); }
a { color: inherit; }
.guide-header, main, .guide-footer { width: min(1120px, calc(100% - 40px)); margin-inline: auto; }
.guide-header { min-height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 24px; border-bottom: 1px solid var(--rule); }
.guide-brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-size: 18px; letter-spacing: -.02em; }
.guide-brand img { display: block; border-radius: 7px; }
.language-nav { display: flex; gap: 4px; padding: 4px; border: 1px solid var(--rule); border-radius: 999px; background: rgba(255,255,255,.72); }
.language-nav a { padding: 7px 10px; border-radius: 999px; color: var(--muted); font-size: 12px; font-weight: 700; text-decoration: none; }
.language-nav a[aria-current="page"] { color: white; background: var(--brand); }
main { padding-block: 28px 76px; }
.breadcrumbs { display: flex; align-items: center; gap: 8px; min-width: 0; color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; }
.breadcrumbs a { text-underline-offset: 3px; }
.breadcrumbs span:last-child { overflow: hidden; text-overflow: ellipsis; }
.guide-hero { max-width: 760px; padding: 72px 0 54px; }
.eyebrow { margin: 0 0 12px; color: var(--line-color); font-size: 12px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
h1 { margin: 0; max-width: 820px; font-family: "Iowan Old Style", Baskerville, Georgia, serif; font-size: clamp(42px, 7vw, 76px); font-weight: 600; letter-spacing: -.045em; line-height: .98; text-wrap: balance; }
.lede { max-width: 650px; margin: 24px 0 0; color: var(--muted); font-size: clamp(18px, 2.2vw, 23px); line-height: 1.45; }
.guide-section { margin-top: 56px; }
.guide-section.compact { margin-top: 40px; }
.guide-section h2, .source-card h2 { margin: 0 0 18px; font-size: 21px; letter-spacing: -.025em; }
.section-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 20px; border-bottom: 1px solid var(--rule); margin-bottom: 18px; }
.section-heading h2 { margin-bottom: 14px; }
.section-heading > span { color: var(--muted); font: 700 12px/1 monospace; }
.line-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.line-card { min-width: 0; display: grid; grid-template-columns: 42px minmax(0, 1fr) auto; align-items: center; gap: 14px; padding: 16px; border: 1px solid var(--rule); border-radius: 18px; background: var(--surface); text-decoration: none; box-shadow: 0 1px 0 rgba(24,32,51,.03); transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease; }
.line-card:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--card-color) 46%, var(--rule)); box-shadow: 0 12px 28px rgba(24,32,51,.08); }
.line-card:focus-visible, .directory-card:focus-visible, .entity-list a:focus-visible, .language-nav a:focus-visible, .app-cta a:focus-visible { outline: 3px solid color-mix(in srgb, var(--line-color) 55%, white); outline-offset: 3px; }
.line-card strong, .line-card small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.line-card strong { font-size: 15px; }
.line-card small { margin-top: 4px; color: var(--muted); font-size: 12px; }
.mode-icon { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 13px; background: var(--card-color); color: var(--card-ink); font: 800 12px/1 monospace; letter-spacing: .03em; }
.card-arrow { color: #8992a2; font-size: 24px; }
.fact-strip { display: grid; grid-template-columns: repeat(3, 1fr); overflow: hidden; border: 1px solid var(--rule); border-top: 4px solid var(--line-color); border-radius: 20px; background: var(--surface); }
.fact-strip.two { grid-template-columns: repeat(2, 1fr); }
.fact-strip div { min-width: 0; padding: 24px; border-right: 1px solid var(--rule); }
.fact-strip div:last-child { border-right: 0; }
.fact-strip strong, .fact-strip span { display: block; }
.fact-strip strong { overflow-wrap: anywhere; font: 600 clamp(24px, 4vw, 39px)/1 "Iowan Old Style", Baskerville, Georgia, serif; letter-spacing: -.035em; }
.fact-strip span { margin-top: 8px; color: var(--muted); font-size: 12px; }
.branch-list, .station-list { list-style: none; margin: 0; padding: 0; }
.branch-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.branch-list li { position: relative; padding: 14px 16px 14px 37px; border-radius: 14px; background: color-mix(in srgb, var(--line-color) 8%, white); }
.branch-list li::before { content: ""; position: absolute; left: 16px; top: 50%; width: 9px; height: 9px; margin-top: -5px; border: 3px solid var(--line-color); border-radius: 50%; background: white; }
.station-list { columns: 3 220px; column-gap: 32px; border-top: 1px solid var(--rule); }
.station-list li { break-inside: avoid; padding: 11px 2px; border-bottom: 1px solid var(--rule); color: #30394a; font-size: 14px; }
.source-card { margin-top: 56px; padding: 26px; border-left: 5px solid var(--line-color); border-radius: 6px 20px 20px 6px; background: #fff; box-shadow: 0 12px 34px rgba(24,32,51,.06); }
.source-card p { max-width: 720px; margin: 8px 0; color: var(--muted); line-height: 1.55; }
.source-card a { display: inline-block; margin-top: 10px; color: var(--brand); font-weight: 800; text-decoration-color: var(--line-color); text-underline-offset: 4px; }
.source-links { display: flex; flex-wrap: wrap; gap: 4px 18px; }
.directory-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.directory-card { min-width: 0; display: grid; grid-template-columns: auto 1fr; align-items: baseline; gap: 3px 16px; padding: 22px; border: 1px solid var(--rule); border-radius: 18px; background: #fff; text-decoration: none; transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease; }
.directory-card:hover { transform: translateY(-2px); border-color: #9ea7b8; box-shadow: 0 12px 28px rgba(24,32,51,.08); }
.directory-card > span { grid-row: span 2; color: var(--brand); font: 700 34px/1 "Iowan Old Style", Baskerville, Georgia, serif; }
.directory-card strong { font-size: 16px; }
.directory-card small { color: var(--muted); }
.entity-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 28px; margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--rule); }
.entity-list li { min-width: 0; display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 11px 2px; border-bottom: 1px solid var(--rule); }
.entity-list a { min-width: 0; overflow-wrap: anywhere; color: #30394a; font-size: 14px; font-weight: 650; text-decoration-color: transparent; text-underline-offset: 4px; }
.entity-list a:hover { color: var(--line-color); text-decoration-color: currentColor; }
.entity-list small { max-width: 52%; overflow: hidden; color: var(--muted); font-size: 10px; text-align: right; text-overflow: ellipsis; white-space: nowrap; }
.data-note { margin: 0; padding: 16px 18px; border: 1px solid var(--rule); border-radius: 14px; color: var(--muted); background: #f8fafc; line-height: 1.5; }
.bus-directory-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.app-cta { margin-top: 56px; display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 24px 26px; border-radius: 20px; background: var(--brand); color: white; }
.app-cta p { max-width: 650px; margin: 0; color: #d9deed; font-size: 13px; line-height: 1.5; }
.app-cta a { flex: none; padding: 12px 16px; border-radius: 12px; background: white; color: var(--brand); font-weight: 800; text-decoration: none; }
.guide-footer { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding-block: 28px 42px; border-top: 1px solid var(--rule); color: var(--muted); font-size: 12px; }
.guide-footer p { margin: 0; }
.guide-footer nav { flex: none; display: flex; gap: 18px; }
.guide-footer a { text-underline-offset: 3px; }
.transport-tool { margin-bottom: 24px; padding: 20px; border: 1px solid var(--rule); border-radius: 22px; background: #fff; box-shadow: 0 12px 34px rgba(24,32,51,.06); }
.transport-tool h2 { margin: 0 0 16px; font-size: 19px; }
.tool-controls { display: flex; align-items: end; gap: 10px; flex-wrap: wrap; }
.tool-controls label { display: grid; gap: 6px; min-width: 150px; color: var(--muted); font-size: 12px; font-weight: 700; }
.tool-controls select, .tool-controls input { min-height: 42px; max-width: 100%; padding: 0 12px; border: 1px solid var(--rule); border-radius: 12px; background: white; color: var(--ink); font: inherit; }
.tool-controls button { min-height: 42px; padding: 0 16px; border: 0; border-radius: 12px; background: var(--brand); color: white; font: inherit; font-weight: 750; cursor: pointer; }
.tool-controls button.secondary { border: 1px solid var(--rule); background: #f7f8fa; color: var(--ink); }
.tool-controls :focus-visible, .stop-list button:focus-visible { outline: 3px solid #8bb9ff; outline-offset: 2px; }
.tool-status { min-height: 18px; margin: 12px 0 0; color: var(--muted); font-size: 13px; }
.tool-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, .8fr); gap: 16px; margin-top: 14px; }
.tool-map { min-height: 300px; overflow: hidden; border: 1px solid var(--rule); border-radius: 16px; background: #eef1f5; }
.tool-stops { max-height: 290px; overflow: auto; }
.stop-list, .arrival-list { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.stop-list button { width: 100%; padding: 10px 12px; border: 1px solid transparent; border-radius: 12px; background: #f7f8fa; color: var(--ink); text-align: left; cursor: pointer; }
.stop-list button:hover { border-color: var(--line-color); }
.stop-list span, .stop-list small, .arrival-list span, .arrival-list small { display: block; }
.stop-list small { margin-top: 2px; color: var(--muted); }
.tool-arrivals { margin-top: 12px; }
.arrival-list li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px; border-bottom: 1px solid var(--rule); }
.arrival-list small { margin-top: 3px; color: #087d72; font-weight: 700; }
.arrival-list b { color: #242c4f; font-size: 18px; white-space: nowrap; }
.empty-state, .service-alert { padding: 12px; border-radius: 12px; background: #f7f8fa; color: var(--muted); }
.service-alert { background: #fff4df; color: #744500; }

@media (max-width: 700px) {
  .guide-header, main, .guide-footer { width: min(100% - 28px, 1120px); }
  .guide-header { align-items: flex-start; flex-direction: column; justify-content: center; padding-block: 16px; }
  .language-nav { width: 100%; }
  .language-nav a { flex: 1; text-align: center; }
  main { padding-top: 20px; }
  .guide-hero { padding: 48px 0 38px; }
  h1 { font-size: clamp(39px, 13vw, 58px); }
  .line-grid, .branch-list, .directory-pair { grid-template-columns: 1fr; }
  .fact-strip, .fact-strip.two { grid-template-columns: 1fr; }
  .fact-strip div { border-right: 0; border-bottom: 1px solid var(--rule); }
  .fact-strip div:last-child { border-bottom: 0; }
  .station-list { columns: 2 140px; column-gap: 20px; }
  .entity-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 18px; }
  .app-cta, .guide-footer { align-items: flex-start; flex-direction: column; }
  .app-cta a { width: 100%; text-align: center; }
  .transport-tool { padding: 15px; border-radius: 18px; }
  .tool-controls { display: grid; grid-template-columns: 1fr 1fr; }
  .tool-controls label { min-width: 0; }
  .tool-layout { grid-template-columns: 1fr; }
  .tool-map { min-height: 240px; }
}

@media (max-width: 440px) {
  .entity-list { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .line-card { transition: none; }
}
