/* DaewooExpress.pk — base styles (mobile-first). Original design. */
:root {
  --blue: #0b3a82; --blue-700: #082c63; --blue-50: #eaf1fb; --blue-100: #d3e2f7;
  --red: #d0202a; --red-700: #a8151e; --red-50: #fdecee;
  --ink: #142033; --ink-2: #3f4b5e; --muted: #5f6b7d; --line: #dde3ec;
  --bg: #ffffff; --bg-2: #f4f6fa; --card: #ffffff;
  --ok: #157347; --ok-50: #e7f5ee; --warn: #8a5a00; --warn-50: #fff5df;
  --radius: 14px; --radius-sm: 9px; --shadow: 0 1px 2px rgba(16,24,40,.06), 0 4px 16px rgba(16,24,40,.06);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  color-scheme: light;
}
html[data-theme="dark"] {
  --blue: #6ea2ff; --blue-700: #9cc0ff; --blue-50: #13213a; --blue-100: #1c2e4f;
  --red: #ff6b72; --red-700: #ff8f94; --red-50: #3a1418;
  --ink: #e8edf5; --ink-2: #c3ccd9; --muted: #9aa6b8; --line: #2a3446;
  --bg: #0d1320; --bg-2: #121a2a; --card: #151e30;
  --ok: #5fd39a; --ok-50: #0f2a1e; --warn: #ffc65a; --warn-50: #2e2410;
  --shadow: 0 1px 2px rgba(0,0,0,.4); color-scheme: dark;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; font-family: var(--font); font-size: 1rem; line-height: 1.65; color: var(--ink); background: var(--bg); overflow-x: hidden; }
img, svg { max-width: 100%; }
a { color: var(--blue); text-decoration: none; transition: color .15s; }
a:hover { color: var(--red-700); }
.prose a, .faq-a a, .lead a, td a, .kv a, p a, li a { font-weight: 600; }
:focus-visible { outline: 3px solid var(--red); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3 { line-height: 1.25; color: var(--ink); letter-spacing: -.01em; }
h1 { font-size: clamp(1.7rem, 4.5vw, 2.6rem); margin: .2em 0 .4em; }
h2 { font-size: clamp(1.3rem, 3vw, 1.7rem); margin: 1.8em 0 .6em; }
h3 { font-size: 1.12rem; margin: 1.4em 0 .4em; }
p { margin: 0 0 1em; }
.small { font-size: .875rem; color: var(--muted); }
.lead { font-size: 1.1rem; color: var(--ink-2); max-width: 70ch; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 0; background: var(--blue); color: #fff; padding: .6rem 1rem; z-index: 100; }
.skip:focus { left: 1rem; }
.wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 16px; }
.main { padding-bottom: 3rem; min-height: 60vh; }
.prose { max-width: 76ch; }
.prose ul, .prose ol { padding-left: 1.3rem; }
.prose li { margin: .3em 0; }

/* icons */
.i { width: 1.25em; height: 1.25em; flex: none; vertical-align: -.25em; }
.i-sm { width: 1em; height: 1em; vertical-align: -.15em; margin-left: .25em; }

/* top bar + header */
.topbar { background: var(--blue-700); color: #fff; font-size: .82rem; }
html[data-theme="dark"] .topbar { background: #0a1a36; }
.topbar .wrap { display: flex; gap: .5rem; align-items: flex-start; padding-top: .45rem; padding-bottom: .45rem; }
.topbar a { color: #fff; font-weight: 600; }
.site-header { background: var(--bg); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 50; }
.hdr { display: flex; align-items: center; gap: 1rem; min-height: 64px; }
.logo { display: flex; align-items: center; gap: .6rem; text-decoration: none; color: var(--ink); margin-right: auto; }
.logo-mark { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 11px; background: linear-gradient(135deg, var(--blue) 0 62%, var(--red) 62%); color: #fff; }
html[data-theme="dark"] .logo-mark { background: linear-gradient(135deg, #1d4fa8 0 62%, #c51f28 62%); }
.logo-text { font-weight: 800; font-size: 1.15rem; letter-spacing: -.02em; line-height: 1.1; }
.logo-text small { display: block; font-weight: 500; font-size: .7rem; color: var(--muted); letter-spacing: .02em; }
.logo-tld { color: var(--red); }
.nav ul { list-style: none; margin: 0; padding: 0; }
.nav a { text-decoration: none; color: var(--ink-2); font-weight: 600; font-size: .93rem; }
.nav a[aria-current="page"] { color: var(--blue); }
.hdr-actions { display: flex; gap: .25rem; }
.icon-btn { display: inline-grid; place-items: center; width: 44px; height: 44px; border: 0; background: transparent; color: var(--ink); border-radius: 10px; cursor: pointer; }
.icon-btn:hover { background: var(--bg-2); }
.t-sun, html[data-theme="dark"] .t-moon { display: none; }
html[data-theme="dark"] .t-sun { display: inline; }
.m-close { display: none; }
.menu-open .m-close { display: inline; } .menu-open .m-open { display: none; }

/* buttons */
.btn { display: inline-flex; align-items: center; gap: .5rem; padding: .75rem 1.15rem; border-radius: 10px; font-weight: 700; font-size: .95rem; text-decoration: none; border: 2px solid transparent; cursor: pointer; font-family: inherit; line-height: 1.2; min-height: 44px; }
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--blue-700); color: #fff; }
html[data-theme="dark"] .btn-primary { color: #0d1320; }
.btn-official { background: var(--red); color: #fff; }
.btn-official:hover { background: var(--red-700); color: #fff; }
html[data-theme="dark"] .btn-official { color: #1a0507; }
.btn-ghost { background: transparent; color: var(--blue); border-color: var(--blue-100); }
.btn-ghost:hover { background: var(--blue-50); }
.btn-sm { padding: .5rem .85rem; font-size: .88rem; min-height: 40px; }
.btn-row { display: flex; flex-wrap: wrap; gap: .6rem; margin: 1rem 0; }

/* hero */
.hero { background: linear-gradient(160deg, var(--blue-700), var(--blue) 70%); color: #fff; padding: 2.5rem 0 3rem; position: relative; overflow: hidden; }
html[data-theme="dark"] .hero { background: linear-gradient(160deg, #081a3a, #0f2c63 70%); }
.hero::after { content: ""; position: absolute; right: -80px; bottom: -120px; width: 360px; height: 360px; border-radius: 50%; border: 40px solid rgba(208,32,42,.35); pointer-events: none; }
.hero h1 { color: #fff; max-width: 22ch; }
.hero p { color: #dbe6f8; max-width: 62ch; }
.hero .badge { background: rgba(255,255,255,.12); color: #fff; }
.page-hero { background: var(--bg-2); border-bottom: 1px solid var(--line); padding: 1.6rem 0 1.4rem; }
.page-hero h1 { margin-top: .2rem; }

/* search panel */
.search-panel { position: relative; z-index: 1; background: var(--card); color: var(--ink); border-radius: var(--radius); box-shadow: 0 10px 40px rgba(4,20,50,.25); padding: 1.1rem; margin-top: 1.4rem; }
.search-panel h2 { margin: 0 0 .2rem; font-size: 1.1rem; }
.search-panel .note { font-size: .82rem; color: var(--muted); margin: 0 0 .8rem; }
.form-grid { display: grid; gap: .8rem; grid-template-columns: 1fr; }
label { display: block; font-weight: 600; font-size: .88rem; margin-bottom: .3rem; color: var(--ink-2); }
input, select, textarea { width: 100%; min-height: 46px; padding: .6rem .75rem; border: 1.5px solid var(--line); border-radius: var(--radius-sm); font: inherit; color: var(--ink); background: var(--bg); }
input:focus, select:focus, textarea:focus { border-color: var(--blue); outline: 3px solid var(--blue-100); outline-offset: 0; }
.field-hint { font-size: .8rem; color: var(--muted); margin-top: .25rem; }
.result { margin-top: 1rem; padding: 1rem; border-radius: var(--radius-sm); background: var(--blue-50); border: 1px solid var(--blue-100); }
.result:empty { display: none; }
.result .big { font-size: 1.5rem; font-weight: 800; color: var(--blue); display: block; }

/* cards & grids */
.grid { display: grid; gap: 1rem; grid-template-columns: 1fr; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem; box-shadow: var(--shadow); }
.card h3 { margin-top: 0; }
.card-link { display: flex; gap: .85rem; text-decoration: none; color: var(--ink); transition: border-color .15s, transform .15s; }
.card-link:hover { border-color: var(--blue); color: var(--ink); transform: translateY(-1px); }
.card-ic { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 10px; background: var(--blue-50); color: var(--blue); flex: none; }
.card-body { display: flex; flex-direction: column; gap: .2rem; min-width: 0; }
.card-body span { color: var(--muted); font-size: .9rem; }
.card-meta { font-size: .8rem !important; color: var(--ink-2) !important; }
.route-card .card-ic { background: var(--red-50); color: var(--red); }
.section { padding: 1rem 0; }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 1rem; flex-wrap: wrap; }
.section-head h2 { margin-bottom: .2rem; }
.kv { display: grid; grid-template-columns: 1fr; gap: .1rem 1rem; margin: 0; }
.kv dt { font-weight: 700; color: var(--ink-2); font-size: .85rem; margin-top: .6rem; }
.kv dd { margin: 0; }
.facts { display: grid; grid-template-columns: repeat(2, 1fr); gap: .75rem; margin: 1rem 0; }
.fact { background: var(--bg-2); border-radius: var(--radius-sm); padding: .8rem; }
.fact b { display: block; font-size: 1.1rem; color: var(--blue); }
.fact span { font-size: .8rem; color: var(--muted); }

/* badges & notices */
.badge { display: inline-flex; align-items: center; gap: .3rem; font-size: .78rem; font-weight: 700; padding: .25rem .6rem; border-radius: 999px; }
.badge .i-sm { margin: 0; }
.badge-ok { background: var(--ok-50); color: var(--ok); }
.badge-warn { background: var(--warn-50); color: var(--warn); }
.badge-blue { background: var(--blue-50); color: var(--blue); }
.notice { display: flex; gap: .7rem; padding: .9rem 1rem; border-radius: var(--radius-sm); margin: 1.2rem 0; border: 1px solid var(--blue-100); background: var(--blue-50); }
.notice > .i { color: var(--blue); margin-top: .2rem; }
.notice-warn { background: var(--warn-50); border-color: #f0d99b; }
html[data-theme="dark"] .notice-warn { border-color: #5a4515; }
.notice-warn > .i { color: var(--warn); }
.notice p:last-child { margin: 0; }

/* tables */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius-sm); margin: 1rem 0; -webkit-overflow-scrolling: touch; }
table { width: 100%; border-collapse: collapse; font-size: .92rem; }
th, td { padding: .65rem .75rem; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
th { background: var(--bg-2); font-weight: 700; color: var(--ink-2); white-space: nowrap; }
tr:last-child td { border-bottom: 0; }

/* breadcrumbs */
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: .35rem; padding: 0; margin: 1rem 0 .4rem; font-size: .85rem; color: var(--muted); }
.crumbs li + li::before { content: "›"; margin-right: .35rem; }
.crumbs a { color: var(--muted); }

/* FAQ */
.faq details { border: 1px solid var(--line); border-radius: var(--radius-sm); margin: .6rem 0; background: var(--card); }
.faq summary { cursor: pointer; padding: .9rem 1rem; font-weight: 700; list-style: none; display: flex; justify-content: space-between; gap: 1rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 1.3rem; line-height: 1; color: var(--blue); }
.faq details[open] summary::after { content: "–"; }
.faq-a { padding: 0 1rem 1rem; color: var(--ink-2); }

/* ads — manual slots appear only once filled with a configured unit (Auto ads place themselves) */
.ad-slot { display: none; }
.ad-slot.ad-filled, html.ads-preview .ad-slot { display: block; position: relative; margin: 2rem auto; padding-top: 18px; background: var(--bg-2); border-radius: var(--radius-sm); max-width: 970px; overflow: hidden; }
.ad-filled.ad-rect, html.ads-preview .ad-rect { min-height: 280px; }
.ad-filled.ad-wide, html.ads-preview .ad-wide { min-height: 120px; }
.ad-filled.ad-tall, html.ads-preview .ad-tall { min-height: 600px; margin: 1rem 0; }
html.ads-preview .ad-slot { border: 1px dashed var(--line); }
.ad-label { position: absolute; top: 3px; left: 8px; font-size: .66rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
ins.adsbygoogle[data-ad-status="unfilled"] { display: none !important; }

/* footer */
.site-footer { background: var(--blue-700); color: #d8e2f3; padding: 2.5rem 0 1.5rem; font-size: .92rem; }
html[data-theme="dark"] .site-footer { background: #091327; }
.site-footer a { color: #fff; }
.site-footer .small { color: #b8c6de; }
.foot-grid { display: grid; gap: 1.5rem; grid-template-columns: 1fr; }
.foot-h { color: #fff; font-size: 1rem; margin: 0 0 .5rem; }
.foot-logo { color: #fff; margin-bottom: .4rem; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin: .3rem 0; }
.foot-official { border-top: 1px solid rgba(255,255,255,.15); margin-top: 1.5rem; padding-top: 1rem; }
.copy { margin-top: 1rem; }
.site-footer .btn-ghost { color: #fff; border-color: rgba(255,255,255,.35); }

/* toast */
.toast { position: fixed; left: 50%; bottom: 16px; transform: translateX(-50%); background: var(--ink); color: var(--bg); padding: .75rem 1rem; border-radius: 10px; box-shadow: var(--shadow); z-index: 90; display: flex; gap: .75rem; align-items: center; max-width: calc(100% - 32px); }
.toast button { background: var(--red); color: #fff; border: 0; border-radius: 8px; padding: .45rem .8rem; font-weight: 700; cursor: pointer; }

/* misc components */
.pill-list { display: flex; flex-wrap: wrap; gap: .5rem; list-style: none; padding: 0; }
.pill-list a { display: inline-block; padding: .4rem .8rem; border: 1px solid var(--line); border-radius: 999px; text-decoration: none; font-size: .88rem; background: var(--card); }
.pill-list a:hover { border-color: var(--blue); }
.steps { counter-reset: s; list-style: none; padding: 0; }
.steps li { counter-increment: s; position: relative; padding: 0 0 1rem 2.6rem; }
.steps li::before { content: counter(s); position: absolute; left: 0; top: 0; width: 1.9rem; height: 1.9rem; border-radius: 50%; background: var(--blue); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: .9rem; }
html[data-theme="dark"] .steps li::before { color: #0d1320; }
.toc { background: var(--bg-2); border-radius: var(--radius-sm); padding: 1rem 1.2rem; margin: 1rem 0; }
.toc ol { margin: .3rem 0 0; padding-left: 1.2rem; }
.checklist { list-style: none; padding: 0; }
.checklist li { display: flex; gap: .6rem; align-items: center; padding: .45rem 0; border-bottom: 1px solid var(--line); }
.checklist input { width: 20px; height: 20px; min-height: 0; flex: none; }
.checklist label { margin: 0; font-weight: 500; color: var(--ink); }
.legs-row { display: grid; grid-template-columns: 1fr 1fr auto; gap: .5rem; align-items: end; margin-bottom: .5rem; }
.empty { color: var(--muted); font-style: italic; }
.hidden { display: none !important; }
.tool-box { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.2rem; box-shadow: var(--shadow); margin: 1rem 0 1.5rem; }
.tool-box h2 { margin-top: 0; font-size: 1.2rem; }
.byline { font-size: .85rem; color: var(--muted); display: flex; flex-wrap: wrap; gap: .4rem 1rem; align-items: center; }

/* ---- booking hand-off panel ---- */
.book-panel { background: linear-gradient(160deg, var(--blue-50), var(--card)); border: 2px solid var(--blue-100); border-radius: var(--radius); padding: 1.4rem; margin: 1rem 0 2rem; text-align: center; scroll-margin-top: 90px; }
.book-panel h2 { margin: 0 0 .5rem; display: flex; gap: .5rem; justify-content: center; align-items: center; }
.book-trip { font-weight: 700; color: var(--blue); background: var(--card); display: inline-block; padding: .4rem .9rem; border-radius: 999px; border: 1px solid var(--blue-100); }
.book-actions { margin: 1rem 0 .5rem; }
.btn-lg { font-size: 1.15rem; padding: .95rem 2.2rem; min-height: 54px; }
.btn[disabled] { opacity: .75; cursor: wait; }
.book-timer { margin-top: 1rem; }
.timer-ring { position: relative; width: 88px; height: 88px; margin: 0 auto .5rem; }
.timer-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.timer-ring circle { fill: none; stroke-width: 4; }
.ring-bg { stroke: var(--line); }
.ring-fg { stroke: var(--red); stroke-linecap: round; transition: stroke-dashoffset 1s linear; }
.timer-ring b { position: absolute; inset: 0; display: grid; place-items: center; font-size: 1.8rem; color: var(--ink); }
.timer-text { margin: 0 0 .3rem; }
.timer-links { font-size: .9rem; margin: 0; }
.linkish { background: none; border: 0; padding: 0; font: inherit; font-weight: 600; color: var(--muted); cursor: pointer; }
.linkish:hover { color: var(--red-700); }

/* ---- layout with sidebar ---- */
.layout { display: grid; gap: 2rem; grid-template-columns: minmax(0, 1fr); align-items: start; }
.content { min-width: 0; }
.content > h1:first-child { margin-top: .4rem; }
.sidebar { min-width: 0; }
.side-sticky { display: grid; gap: 1rem; }
.side-card { padding: 1rem; }
.side-card h2 { font-size: 1rem; margin: 0 0 .6rem; }
.side-list { list-style: none; margin: 0 0 .6rem; padding: 0; }
.side-list li + li { border-top: 1px solid var(--line); }
.side-list a { display: flex; justify-content: space-between; gap: .5rem; padding: .5rem 0; color: var(--ink); font-size: .9rem; font-weight: 500; }
.side-list a:hover { color: var(--blue); }
.side-list b { color: var(--red-700); white-space: nowrap; }
.side-more, .more { font-weight: 700; font-size: .9rem; white-space: nowrap; }
.side-book .btn { width: 100%; justify-content: center; }
.side-book p { margin: 0 0 .6rem; }

/* ---- hero ---- */
.hero-grid { display: grid; gap: 1.5rem; align-items: center; }
.hero-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: .5rem; margin-top: 1.2rem; max-width: 520px; }
.hero-stats div { background: rgba(255,255,255,.1); border-radius: 10px; padding: .6rem .5rem; text-align: center; }
.hero-stats b { display: block; font-size: 1.25rem; color: #fff; }
.hero-stats span { font-size: .72rem; color: #cfdcf3; }
.hero .search-panel { margin-top: 0; }
.span-2 { grid-column: 1 / -1; }
.btn-block { width: 100%; justify-content: center; }
.res-title { margin-bottom: .2rem; }
.result p:last-child { margin-bottom: 0; }

/* ---- fares ---- */
.price { color: var(--red-700); font-weight: 800; }
.fare-note { display: flex; gap: .35rem; align-items: center; margin: .4rem 0 1rem; }
.tabs { display: flex; gap: .4rem; overflow-x: auto; padding-bottom: .3rem; margin: 1rem 0 .6rem; scrollbar-width: thin; }
.tab { flex: none; border: 1.5px solid var(--line); background: var(--card); color: var(--ink-2); font: inherit; font-weight: 600; font-size: .88rem; padding: .5rem .9rem; border-radius: 999px; cursor: pointer; min-height: 40px; }
.tab[aria-selected="true"] { background: var(--blue); border-color: var(--blue); color: #fff; }
html[data-theme="dark"] .tab[aria-selected="true"] { color: #0d1320; }
.filter-bar { margin: .6rem 0 1rem; max-width: 420px; }
.fare-table td:not(:first-child), .fare-table th:not(:first-child) { text-align: right; white-space: nowrap; }
.fare-table td:first-child { font-weight: 600; }
.group-row th { background: var(--blue-50); color: var(--blue); text-align: left !important; font-size: .9rem; }
.row-hl td { background: var(--warn-50); }
.hidden-group { display: none; }
table tbody tr:nth-child(even) td { background: color-mix(in srgb, var(--bg-2) 55%, transparent); }
.matrix td:not(:first-child), .matrix th:not(:first-child) { text-align: center; }
.matrix .yes { color: var(--ok); font-weight: 800; }
.matrix .no { color: var(--muted); }
.class-card h2, .class-card h3 { margin: 0 0 .3rem; }
.price-line { margin: 0 0 .4rem; color: var(--ink-2); }
.price-line b { color: var(--red-700); }
.card h3 { margin-top: 0; }
.steps-grid { display: grid; gap: .5rem 1.5rem; }
.search-row { grid-template-columns: 1fr auto; align-items: end; }
.sitemap-list { columns: 2 260px; }
.pad { padding: 2rem 0; }
.section { padding: .5rem 0 1rem; }
.section-head .fare-note { margin-bottom: 0; }
