﻿/* KohistanExpress.pk — independent travel information portal
   Design tokens first; dark mode via prefers-color-scheme and [data-theme]. */
:root {
  /* Kohistan Express bus colours: sky-blue body, yellow lettering, dark glass */
  --sky: #34a6dd;
  --sky-deep: #0b6aa6;
  --sky-darker: #08527f;
  --gold: #f5c016;
  --gold-deep: #e0a800;
  --navy: #0b2b4c;
  --bg: #ffffff;
  --bg-soft: #eaf6fc;
  --bg-card: #ffffff;
  --ink: #0b2b4c;
  --ink-soft: #33506b;
  --ink-mute: #5d758c;
  --line: #d3e6f2;
  --accent: #0b6aa6;
  --accent-ink: #ffffff;
  --accent-soft: #e3f3fb;
  --blue: #0a64a0;
  --warn-bg: #fff7e0;
  --warn-ink: #6b4a00;
  --warn-line: #f2d78a;
  --bad-bg: #fdecec;
  --bad-ink: #8a1c1c;
  --ok-bg: #e5f4ee;
  --ok-ink: #0b5c3f;
  --shadow: 0 1px 2px rgba(11, 31, 58, .06), 0 4px 16px rgba(11, 31, 58, .06);
  --radius: 14px;
  --radius-sm: 8px;
  --max: 1160px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-ur: "Noto Nastaliq Urdu", "Jameel Noori Nastaleeq", "Urdu Typesetting", serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #061a2d; --bg-soft: #0a2440; --bg-card: #0e2b4a; --ink: #eaf4fb; --ink-soft: #bcd3e6;
    --ink-mute: #8eaac2; --line: #1d4266; --accent: #5cc0ee; --accent-ink: #04203a; --accent-soft: #0f3456;
    --blue: #7fcdf3; --warn-bg: #2e2510; --warn-ink: #f1d48a; --warn-line: #5a4716; --bad-bg: #3a1717;
    --bad-ink: #f3b0b0; --ok-bg: #123528; --ok-ink: #9be3c4; --shadow: 0 1px 2px rgba(0,0,0,.3), 0 4px 16px rgba(0,0,0,.25);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #061a2d; --bg-soft: #0a2440; --bg-card: #0e2b4a; --ink: #eaf4fb; --ink-soft: #bcd3e6;
  --ink-mute: #8eaac2; --line: #1d4266; --accent: #5cc0ee; --accent-ink: #04203a; --accent-soft: #0f3456;
  --blue: #7fcdf3; --warn-bg: #2e2510; --warn-ink: #f1d48a; --warn-line: #5a4716; --bad-bg: #3a1717;
  --bad-ink: #f3b0b0; --ok-bg: #123528; --ok-ink: #9be3c4; --shadow: 0 1px 2px rgba(0,0,0,.3), 0 4px 16px rgba(0,0,0,.25);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 80px; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.65 var(--font); }
img, svg { max-width: 100%; height: auto; }
a { color: var(--blue); text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }
h1, h2, h3, h4 { line-height: 1.25; color: var(--ink); margin: 1.6em 0 .55em; }
h1 { font-size: clamp(1.75rem, 4.2vw, 2.6rem); margin-top: .3em; letter-spacing: -.01em; }
h2 { font-size: clamp(1.35rem, 2.8vw, 1.75rem); }
h3 { font-size: 1.15rem; }
p, ul, ol { margin: 0 0 1em; }
li { margin-bottom: .35em; }
small, .muted { color: var(--ink-mute); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; inset-inline-start: 8px; top: 8px; background: var(--ink); color: var(--bg); padding: .6em 1em; z-index: 100; transform: translateY(-200%); }
.skip:focus { transform: none; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 820px; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: saturate(1.4) blur(8px); border-bottom: 1px solid var(--line); }
.hdr { display: flex; align-items: center; gap: 12px; min-height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-weight: 800; font-size: 1.05rem; white-space: nowrap; }
.brand svg { width: 34px; height: 34px; flex: none; }
.brand span small { display: block; font-weight: 500; font-size: .68rem; color: var(--ink-mute); letter-spacing: .02em; }
.nav { margin-left: auto; }
.nav ul { list-style: none; display: flex; gap: 2px; margin: 0; padding: 0; }
.nav a { display: block; padding: 8px 10px; border-radius: var(--radius-sm); color: var(--ink-soft); text-decoration: none; font-size: .92rem; font-weight: 600; }
.nav a:hover, .nav a[aria-current="page"] { background: var(--bg-soft); color: var(--ink); }
.hdr-actions { display: flex; gap: 6px; }
.icon-btn { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg-card); color: var(--ink); cursor: pointer; text-decoration: none; font: 600 .8rem var(--font); }
.icon-btn svg { width: 20px; height: 20px; }
.menu-btn { display: none; }
.install-btn { min-height: 40px; padding: 6px 12px; font-size: .85rem; }
.install-btn svg { width: 18px; height: 18px; }
.install-btn[hidden], [data-install][hidden] { display: none; }
.linklike { background: none; border: 0; padding: 0; font: inherit; color: var(--ink-soft); cursor: pointer; text-decoration: underline; }
.install-tip { position: fixed; inset-inline: 16px; bottom: 16px; z-index: 60; max-width: 420px; margin-inline: auto; background: var(--bg-card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px 16px; }
.install-tip p { margin: 0 0 8px; }
.wa-float { position: fixed; inset-inline-end: 16px; bottom: 16px; z-index: 55; display: inline-flex; align-items: center; gap: 8px; background: #25d366; color: #06301a; font-weight: 700; text-decoration: none; padding: 10px 14px; border-radius: 999px; box-shadow: var(--shadow); font-size: .9rem; }
.wa-float svg { width: 22px; height: 22px; }
@media print { .wa-float, .install-tip { display: none !important; } }

/* External-link notice */
.leave-overlay { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 16px; background: rgba(6, 14, 28, .55); }
.leave-card { width: 100%; max-width: 420px; background: var(--bg-card); color: var(--ink); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 12px 40px rgba(0,0,0,.25); padding: 22px; }
.leave-card h2 { margin: 0 0 8px; font-size: 1.2rem; }
.leave-card p { margin: 0 0 10px; color: var(--ink-soft); overflow-wrap: anywhere; }
.leave-count b { color: var(--ink); font-size: 1.1rem; }
.leave-bar { height: 6px; border-radius: 99px; background: var(--bg-soft); overflow: hidden; margin: 4px 0 16px; }
.leave-bar span { display: block; height: 100%; width: 0; background: var(--accent); transition: width linear; }
.leave-card .btn-row { margin: 0; }
@media (max-width: 1080px) {
  .menu-btn { display: inline-grid; }
  .nav { position: fixed; inset: 64px 0 auto 0; background: var(--bg); border-bottom: 1px solid var(--line); box-shadow: var(--shadow); display: none; max-height: calc(100vh - 64px); overflow: auto; }
  .nav.open { display: block; }
  .nav ul { flex-direction: column; padding: 8px 16px 16px; }
  .nav a { padding: 12px; font-size: 1rem; }
  .hdr-actions { margin-left: auto; }
}
.nav .nav-search { display: none; }
@media (max-width: 480px) {
  .hdr { gap: 8px; }
  .brand { font-size: .95rem; gap: 8px; }
  .brand svg { width: 30px; height: 30px; }
  .brand span small { display: none; }
  .icon-btn { width: 38px; height: 38px; }
  .hdr-actions .search-link { display: none; }
  .install-btn { padding: 6px 9px; }
  .install-btn span { display: none; }
  .nav .nav-search { display: block; }
}

/* Independent notice */
.notice-bar { background: var(--warn-bg); color: var(--warn-ink); border-bottom: 1px solid var(--warn-line); font-size: .86rem; }
.notice-bar .wrap { padding-block: 7px; }
.notice-bar a { color: inherit; font-weight: 700; }
.offline-bar { display: none; background: var(--bad-bg); color: var(--bad-ink); font-size: .9rem; text-align: center; padding: 8px 16px; }
body.is-offline .offline-bar { display: block; }

/* Breadcrumbs */
.crumbs { font-size: .85rem; color: var(--ink-mute); padding-top: 18px; }
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 4px; padding: 0; margin: 0; }
.crumbs li + li::before { content: "›"; margin-right: 4px; color: var(--ink-mute); }
.crumbs a { color: var(--ink-soft); text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }

/* Hero */
.hero { background: linear-gradient(180deg, var(--bg-soft), var(--bg)); border-bottom: 1px solid var(--line); }
.hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 40px; align-items: center; padding-block: 40px 48px; }
.hero p.lead { font-size: 1.12rem; color: var(--ink-soft); max-width: 60ch; }
.hero-art { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); background: var(--bg-card); }
@media (max-width: 860px) { .hero-grid { grid-template-columns: 1fr; gap: 24px; padding-top: 24px; } }
.page-hero { padding-block: 6px 22px; border-bottom: 1px solid var(--line); margin-bottom: 28px; }
.page-hero p.lead { font-size: 1.08rem; color: var(--ink-soft); max-width: 70ch; margin-bottom: 0; }

/* Forms */
.search-card { background: var(--bg-card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; align-items: end; }
label { display: block; font-weight: 600; font-size: .88rem; margin-bottom: 5px; color: var(--ink-soft); }
input, select, textarea { width: 100%; font: inherit; color: var(--ink); background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 10px 12px; min-height: 44px; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); outline: 2px solid color-mix(in srgb, var(--accent) 35%, transparent); outline-offset: 0; }
input[aria-invalid="true"] { border-color: var(--bad-ink); }
.field-err { color: var(--bad-ink); font-size: .82rem; min-height: 1.2em; margin-top: 3px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 18px; border-radius: var(--radius-sm); border: 1px solid transparent; background: var(--accent); color: var(--accent-ink); font: 700 .95rem var(--font); cursor: pointer; text-decoration: none; }
.btn:hover { filter: brightness(1.06); }
.btn.secondary { background: var(--bg-card); color: var(--ink); border-color: var(--line); }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; margin: 1em 0; }
.form-note { font-size: .82rem; color: var(--ink-mute); margin: 10px 0 0; }

/* Cards & grids */
.section { padding: 34px 0; }
.section.alt { background: var(--bg-soft); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section > .wrap > h2:first-child { margin-top: 0; }
.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.grid.two { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.card { background: var(--bg-card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); }
.card h3 { margin-top: 0; }
.card p:last-child { margin-bottom: 0; }
a.card { display: block; color: inherit; text-decoration: none; transition: transform .12s, border-color .12s; }
a.card:hover { transform: translateY(-2px); border-color: var(--accent); }
.route-card .cities { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 1.08rem; }
.route-card .cities svg { width: 18px; height: 18px; color: var(--accent); flex: none; }
.route-card .meta { font-size: .86rem; color: var(--ink-mute); margin-top: 6px; }

/* Badges */
.badge { display: inline-block; font-size: .72rem; font-weight: 700; padding: 2px 8px; border-radius: 999px; letter-spacing: .02em; vertical-align: middle; white-space: nowrap; }
.badge.unverified { background: var(--warn-bg); color: var(--warn-ink); border: 1px solid var(--warn-line); }
.badge.verified { background: var(--ok-bg); color: var(--ok-ink); }
.badge.conflicting, .badge.inactive { background: var(--bad-bg); color: var(--bad-ink); }
.badge.estimate { background: var(--accent-soft); color: var(--accent); }

/* Callouts */
.callout { border-left: 4px solid var(--accent); background: var(--accent-soft); padding: 14px 16px; border-radius: 0 var(--radius-sm) var(--radius-sm) 0; margin: 1.2em 0; }
.callout.warn { border-color: var(--warn-line); background: var(--warn-bg); color: var(--warn-ink); }
.callout.warn a { color: inherit; font-weight: 700; }
.callout p:last-child { margin-bottom: 0; }
.callout strong:first-child { display: block; margin-bottom: 2px; }

/* Tables */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-card); margin: 1em 0 1.4em; }
table { width: 100%; border-collapse: collapse; font-size: .93rem; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { background: var(--bg-soft); font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-soft); white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
@media (max-width: 640px) {
  table.stack thead { display: none; }
  table.stack tr { display: block; border-bottom: 1px solid var(--line); padding: 8px 0; }
  table.stack td { display: grid; grid-template-columns: 42% 1fr; gap: 8px; border: 0; padding: 5px 12px; }
  table.stack td::before { content: attr(data-label); font-weight: 700; color: var(--ink-soft); font-size: .8rem; }
}
.empty { padding: 18px; color: var(--ink-mute); text-align: center; }

/* Layout with sidebar */
.layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 40px; }
.layout aside .card { position: sticky; top: 84px; }
@media (max-width: 960px) { .layout { grid-template-columns: 1fr; } .layout aside .card { position: static; } }
.toc ul { padding-left: 1.1em; margin: 0; font-size: .92rem; }
article.prose { max-width: 75ch; }
article.prose h2 { padding-top: .2em; }

/* FAQ */
details.faq { border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--bg-card); margin-bottom: 10px; }
details.faq summary { cursor: pointer; padding: 14px 16px; font-weight: 700; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
details.faq summary::-webkit-details-marker { display: none; }
details.faq summary::after { content: "+"; font-weight: 800; color: var(--accent); }
details.faq[open] summary::after { content: "–"; }
details.faq > div { padding: 0 16px 14px; color: var(--ink-soft); }

/* Tools */
.tool-result { margin-top: 16px; padding: 16px; border-radius: var(--radius-sm); background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent); display: none; }
.tool-result.show { display: block; }
.tool-result .big { font-size: 1.6rem; font-weight: 800; color: var(--ink); }
.checklist { list-style: none; padding: 0; }
.checklist li { display: flex; gap: 10px; align-items: flex-start; padding: 8px 0; border-bottom: 1px solid var(--line); }
.checklist input { width: 20px; min-height: 20px; height: 20px; margin-top: 3px; flex: none; }
.checklist li.done label { text-decoration: line-through; color: var(--ink-mute); }
.checklist label { font-weight: 500; color: var(--ink); margin: 0; }
.countdown { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; text-align: center; }
.countdown div { background: var(--bg-card); border-radius: var(--radius-sm); padding: 10px 4px; border: 1px solid var(--line); }
.countdown b { display: block; font-size: 1.7rem; }
.split-rows .row { display: grid; grid-template-columns: 1fr 120px 40px; gap: 8px; margin-bottom: 8px; }

/* Ads — hidden until AdSense is configured in data/site.js */
.ad-slot { display: none; margin: 28px auto; min-height: 120px; max-width: var(--max); border: 1px dashed var(--line); border-radius: var(--radius-sm); text-align: center; font-size: .72rem; color: var(--ink-mute); padding: 6px; }
body.ads-on .ad-slot { display: block; }
.ad-slot::before { content: "Advertisement"; display: block; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 4px; }

/* Footer */
.site-footer { margin-top: 48px; background: var(--bg-soft); border-top: 1px solid var(--line); font-size: .92rem; }
.foot-grid { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 28px; padding-block: 36px 20px; }
.foot-grid h2 { font-size: .85rem; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-soft); margin: 0 0 10px; }
.foot-grid ul { list-style: none; padding: 0; margin: 0; }
.foot-grid a { color: var(--ink-soft); text-decoration: none; }
.foot-grid a:hover { color: var(--ink); text-decoration: underline; }
.foot-bottom { border-top: 1px solid var(--line); padding-block: 16px 26px; color: var(--ink-mute); font-size: .84rem; }
@media (max-width: 800px) { .foot-grid { grid-template-columns: 1fr 1fr; } .foot-grid > div:first-child { grid-column: 1 / -1; } }

/* Search results */
.results { list-style: none; padding: 0; }
.results li { padding: 14px 0; border-bottom: 1px solid var(--line); }
.results a { font-weight: 700; font-size: 1.05rem; }
.kv { display: grid; grid-template-columns: 160px 1fr; gap: 6px 16px; margin: 0 0 1em; }
.kv dt { font-weight: 700; color: var(--ink-soft); }
.kv dd { margin: 0; }
@media (max-width: 560px) { .kv { grid-template-columns: 1fr; } .kv dd { margin-bottom: 8px; } }

/* RTL (Urdu) */
[dir="rtl"] body, body[dir="rtl"] { font-family: var(--font-ur), var(--font); line-height: 2.1; }
[dir="rtl"] .nav { margin-left: 0; margin-right: auto; }
[dir="rtl"] .callout { border-left: 0; border-right: 4px solid var(--accent); border-radius: var(--radius-sm) 0 0 var(--radius-sm); }
[dir="rtl"] th, [dir="rtl"] td { text-align: right; }
[dir="rtl"] .crumbs li + li::before { content: "‹"; margin: 0 0 0 4px; }

@media print { .site-header, .site-footer, .ad-slot, .notice-bar, .hdr-actions { display: none !important; } }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }

/* ============================================================
   Brand theme — Kohistan Express bus colours
   ============================================================ */
/* Header: deep sky blue with a yellow stripe, like the bus livery */
.site-header { background: linear-gradient(90deg, var(--sky-darker), var(--sky-deep) 60%, #0d74b4); border-bottom: 0; box-shadow: 0 4px 0 var(--gold), 0 6px 16px rgba(11,43,76,.18); backdrop-filter: none; }
.brand, .brand span small { color: #fff; }
.brand span small { color: #cfeaf8; }
.nav a { color: #e6f4fc; }
.nav a:hover, .nav a[aria-current="page"] { background: rgba(255,255,255,.14); color: #fff; box-shadow: inset 0 -3px 0 var(--gold); }
.hdr-actions .icon-btn { background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.28); color: #fff; }
.hdr-actions .icon-btn:hover { background: rgba(255,255,255,.22); }
@media (max-width: 1080px) {
  .nav { background: var(--sky-darker); border-bottom: 4px solid var(--gold); }
  .nav a { color: #fff; }
}

/* Buttons: yellow like the bus lettering, navy text */
.btn { background: var(--gold); color: var(--navy); border-color: var(--gold-deep); box-shadow: 0 2px 0 var(--gold-deep); }
.btn:hover { filter: none; background: #ffcf2e; }
.btn.secondary { background: var(--bg-card); color: var(--sky-deep); border: 2px solid var(--sky); box-shadow: none; }
.btn.secondary:hover { background: var(--accent-soft); }

/* Headings get a small yellow underline accent */
main h2 { position: relative; }
.prose h2::after, .section > .wrap > h2::after, .narrow > h2::after, .extra h2::after { content: ""; display: block; width: 48px; height: 4px; border-radius: 4px; background: var(--gold); margin-top: 8px; }

/* Hero: sky gradient with the bus photo */
.hero { background: radial-gradient(1200px 400px at 85% 0%, rgba(52,166,221,.35), transparent 60%), linear-gradient(180deg, #d9f0fb 0%, #f3fafe 70%, var(--bg) 100%); border-bottom: 0; }
.hero h1 { color: var(--navy); }
.hero h1 .hl { color: var(--sky-deep); background: linear-gradient(transparent 62%, rgba(245,192,22,.55) 62%); padding: 0 .1em; }
.hero-photo { position: relative; margin: 0; border-radius: 18px; overflow: hidden; box-shadow: 0 18px 40px rgba(11,43,76,.25); border: 5px solid #fff; background: var(--sky); }
.hero-photo img { display: block; width: 100%; height: auto; aspect-ratio: 584 / 342; object-fit: cover; }
.hero-photo figcaption { position: absolute; left: 12px; bottom: 12px; background: var(--gold); color: var(--navy); font-weight: 800; font-size: .82rem; padding: 4px 10px; border-radius: 99px; }
.hero-stats { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 0; padding: 0; list-style: none; }
.hero-stats li { background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--sky); border-radius: 10px; padding: 6px 12px; font-size: .88rem; font-weight: 700; color: var(--navy); margin: 0; }
.search-card { border-top: 5px solid var(--sky); }

/* Inner page heroes: light sky band */
.page-hero { background: linear-gradient(180deg, var(--bg-soft), transparent); border-radius: 0 0 18px 18px; padding-top: 14px; border-bottom: 3px solid var(--sky); }
.page-hero h1 { color: var(--navy); }

/* Photo banner used on inner pages */
.photo-banner { margin: 0 0 24px; border-radius: 16px; overflow: hidden; position: relative; box-shadow: var(--shadow); background: var(--sky); }
.photo-banner img { display: block; width: 100%; height: 220px; object-fit: cover; object-position: 50% 60%; }
.photo-banner figcaption { position: absolute; inset: auto 0 0 0; padding: 30px 16px 12px; color: #fff; font-weight: 700; background: linear-gradient(transparent, rgba(8,82,127,.85)); }
@media (max-width: 640px) { .photo-banner img { height: 160px; } }

/* Section bands alternate white / sky */
.section.alt { background: linear-gradient(180deg, #e3f3fb, #eef8fd); border-color: var(--line); }

/* Cards */
.card { border-top: 4px solid var(--sky); }
a.card:hover { border-color: var(--gold); border-top-color: var(--gold); box-shadow: 0 8px 24px rgba(11,106,166,.18); }
.route-card .cities svg { color: var(--gold-deep); }
.route-card .meta { color: var(--sky-deep); font-weight: 600; }

/* Tables */
th { background: var(--sky-deep); color: #fff; }
tbody tr:nth-child(even) td { background: rgba(52,166,221,.06); }

/* Callouts, results, FAQ */
.callout { border-left-color: var(--sky); background: var(--accent-soft); }
.tool-result { background: #fff8dc; border-color: rgba(224,168,0,.45); }
details.faq { border-left: 4px solid var(--sky); }
details.faq summary::after { color: var(--sky-deep); }
details.faq[open] { border-left-color: var(--gold); }

/* Breadcrumbs */
.crumbs a { color: var(--sky-deep); font-weight: 600; }

/* Footer: deep navy like the bus windows, yellow headings */
.site-footer { background: linear-gradient(180deg, var(--navy), #061b31); border-top: 5px solid var(--gold); color: #cfe3f1; }
.site-footer .muted, .foot-bottom { color: #a9c4da; }
.foot-grid h2 { color: var(--gold); }
.foot-grid a, .site-footer .linklike { color: #e3f1fa; }
.foot-grid a:hover { color: #fff; }
.site-footer .brand { color: #fff; }
.foot-bottom { border-top-color: rgba(255,255,255,.12); }

/* Dark-mode tweaks for brand pieces */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .hero { background: radial-gradient(1200px 400px at 85% 0%, rgba(52,166,221,.25), transparent 60%), linear-gradient(180deg, #0a2a48, var(--bg)); }
  :root:not([data-theme="light"]) .hero h1, :root:not([data-theme="light"]) .page-hero h1 { color: var(--ink); }
  :root:not([data-theme="light"]) .hero h1 .hl { color: #8fd6f7; }
  :root:not([data-theme="light"]) .hero-stats li { background: var(--bg-card); color: var(--ink); }
  :root:not([data-theme="light"]) .section.alt { background: var(--bg-soft); }
  :root:not([data-theme="light"]) .tool-result { background: #2a2408; border-color: #6b5410; }
  :root:not([data-theme="light"]) .btn.secondary { color: var(--blue); }
  :root:not([data-theme="light"]) .crumbs a, :root:not([data-theme="light"]) .route-card .meta { color: var(--blue); }
}
:root[data-theme="dark"] .hero { background: radial-gradient(1200px 400px at 85% 0%, rgba(52,166,221,.25), transparent 60%), linear-gradient(180deg, #0a2a48, var(--bg)); }
:root[data-theme="dark"] .hero h1, :root[data-theme="dark"] .page-hero h1 { color: var(--ink); }
:root[data-theme="dark"] .hero h1 .hl { color: #8fd6f7; }
:root[data-theme="dark"] .hero-stats li { background: var(--bg-card); color: var(--ink); }
:root[data-theme="dark"] .section.alt { background: var(--bg-soft); }
:root[data-theme="dark"] .tool-result { background: #2a2408; border-color: #6b5410; }
:root[data-theme="dark"] .btn.secondary { color: var(--blue); }
:root[data-theme="dark"] .crumbs a, :root[data-theme="dark"] .route-card .meta { color: var(--blue); }

/* Stop pages: map, action buttons, stop cards */
.map-embed { position: relative; border-radius: 16px; overflow: hidden; border: 3px solid var(--sky); box-shadow: var(--shadow); background: var(--bg-soft); aspect-ratio: 16 / 10; margin: 8px 0 6px; }
.map-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
@media (max-width: 640px) { .map-embed { aspect-ratio: 4 / 3; } }
.stop-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 4px 0 18px; }
.stop-actions .btn { flex: 1 1 auto; }
.stop-card h3 a { color: var(--ink); text-decoration: none; }
.stop-card h3 a:hover { color: var(--sky-deep); text-decoration: underline; }
table th[scope="row"] { width: 32%; background: var(--bg-soft); color: var(--ink); text-transform: none; letter-spacing: 0; font-size: .9rem; }
@media (max-width: 640px) { table.stack th[scope="row"] { display: block; width: auto; border-bottom: 0; padding-bottom: 0; } table.stack tbody tr { display: block; } }
@media (max-width: 640px) { table.stack th[scope="row"] + td { display: block; padding: 2px 12px 10px; } table.stack th[scope="row"] + td::before { content: none; } }