:root {
  /* রিকশা আর্ট theme: teal, rickshaw red, marigold yellow */
  --night: #0b5d5b; --night-soft: #0e7a77; --lantern: #ffc53d; --lantern-deep: #e0a800;
  --red: #e2374a; --red-deep: #b8243a;
  --ok: #1f8a5b; --bad: #e2374a;
  --paper: #f4f7f6; --surface: #ffffff; --ink: #15302e; --muted: #4f6664; --line: #d6e2e0; --focus: #2d6cdf;
  --font: "Hind Siliguri", "Noto Sans Bengali", system-ui, sans-serif;
  --display: "Tiro Bangla", "Noto Serif Bengali", "Hind Siliguri", serif;
  box-sizing: border-box; padding-top: env(safe-area-inset-top, 0px);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --paper: #0d1a19; --surface: #132523; --ink: #e8f2f0; --muted: #9fb8b5; --line: #23403d; --night-soft: #14908c; }
}
*, *::before, *::after { box-sizing: inherit; }
html, body { height: 100%; margin: 0; }
body { font-family: var(--font); background: var(--paper); color: var(--ink); font-size: 17px; line-height: 1.6; display: flex; flex-direction: column; }
button { font: inherit; cursor: pointer; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }

.topbar { display: flex; align-items: center; justify-content: space-between; padding: 10px 18px; background: var(--night); color: #fff;
  border-bottom: 6px solid transparent;
  border-image: repeating-linear-gradient(90deg, #e2374a 0 16px, #ffc53d 16px 32px, #ffffff 32px 36px, #0e7a77 36px 52px, #ffc53d 52px 56px) 6; }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; }
.brand-icon { width: 36px; height: 36px; border-radius: 9px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-name { font-family: var(--display); font-size: 22px; }
.brand-tag { font-size: 12px; font-weight: 500; color: #bfe3df; }
.navlink { color: #fff; text-decoration: none; font-size: 15px; padding: 5px 12px; border: 1px solid rgba(255,255,255,.35); border-radius: 999px; }

.layout { flex: 1; display: grid; grid-template-columns: minmax(340px, 430px) 1fr; min-height: 0; }
.panel { padding: 22px 22px 30px; overflow-y: auto; background: var(--surface); border-right: 1px solid var(--line); }
.mapwrap { position: relative; min-height: 0; }
#map { position: absolute; inset: 0; background: #e8ebf2; }
.maphint { position: absolute; top: 12px; left: 50%; transform: translateX(-50%); z-index: 500; background: var(--night); color: #fff; padding: 6px 16px; border-radius: 999px; font-size: 15px; white-space: nowrap; }
.maphint[hidden] { display: none; }

h1 { font-family: var(--display); font-weight: 400; font-size: clamp(26px, 3.2vw, 34px); line-height: 1.25; margin: 0 0 16px; }
.step { margin-bottom: 20px; }
.step h2 { display: flex; align-items: center; gap: 10px; font-size: 17px; margin: 0 0 10px; }
.num { width: 26px; height: 26px; border-radius: 50%; background: var(--night); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: 14px; flex: none; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { border: 1.5px solid var(--line); background: var(--surface); color: var(--ink); border-radius: 12px; padding: 7px 12px; text-align: left; line-height: 1.25; }
.chip small { display: block; font-size: 12px; color: var(--muted); }
.chip[aria-checked="true"] { border-color: var(--night); background: rgba(11,93,91,.10); box-shadow: inset 0 0 0 1px var(--night); }
.seats { margin-top: 8px; }
.seats .chip { padding: 4px 12px; border-radius: 999px; font-size: 14px; }
.hint { font-size: 14px; color: var(--muted); margin: 6px 0; }
.route { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; font-weight: 500; margin: 4px 0 8px; }
.route .arrow { color: var(--muted); }
.pin { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; border-radius: 50%; color: #fff; font-size: 12px; font-weight: 700; }
.pin-a { background: var(--ok); } .pin-b { background: var(--bad); }
.row { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-end; margin-top: 8px; }
.field { display: flex; flex-direction: column; font-size: 14px; color: var(--muted); gap: 4px; }
.field input { font: inherit; font-size: 18px; width: 150px; padding: 7px 12px; border-radius: 10px; border: 1.5px solid var(--line); background: var(--paper); color: var(--ink); }
.field input:focus { border-color: var(--night); outline: none; }
.method { font-size: 13px; color: var(--muted); margin: 6px 0 0; }

.btn-primary, .btn-secondary, .btn-small { display: inline-flex; align-items: center; justify-content: center; border-radius: 999px; font-weight: 600; text-decoration: none; line-height: 1.3; }
.btn-primary { background: var(--red); color: #fff; border: 0; padding: 9px 18px; font-size: 15px; }
.btn-primary:hover { background: var(--red-deep); }
.btn-secondary { background: transparent; color: var(--ink); border: 1.5px solid var(--ink); padding: 8px 16px; font-size: 15px; }
.btn-small { background: var(--surface); color: var(--ink); border: 1px solid var(--line); padding: 4px 12px; font-size: 14px; font-weight: 500; }
.btn-primary:disabled { opacity: .5; cursor: default; }
.linkbtn { background: none; border: 0; color: var(--focus); text-decoration: underline; padding: 0; font-size: inherit; }

.result { background: var(--night); color: #fff; border-radius: 18px; padding: 16px 18px; margin: 4px 0 22px; }
.r-label { margin: 0; color: #bfe3df; font-size: 15px; }
.r-fare { margin: 0; }
.r-fare strong { font-family: var(--display); font-weight: 400; font-size: 56px; line-height: 1.15; color: var(--lantern); }
.r-calc { margin: 0 0 12px; font-size: 14px; color: #dff1ee; }
.result .btn-primary { background: var(--red); color: #fff; }

.verdict { border-radius: 14px; padding: 12px 14px; margin-top: 10px; font-size: 16px; }
.verdict.ok { background: rgba(47,143,91,.12); border: 1.5px solid var(--ok); }
.verdict.bad { background: rgba(212,80,42,.1); border: 1.5px solid var(--bad); }
.verdict b.big { display: block; font-family: var(--display); font-weight: 400; font-size: 30px; line-height: 1.2; }

.stats { border-top: 1px solid var(--line); padding-top: 16px; margin-top: 8px; }
.stats h2 { font-size: 17px; margin: 0 0 10px; }
.stat-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.sc { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; }
.sc .t { font-size: 13px; color: var(--muted); }
.sc .v { font-family: var(--display); font-size: 26px; line-height: 1.2; }
.sc .s { font-size: 13px; color: var(--muted); }
.areas { margin: 12px 0 0; padding-left: 22px; font-size: 15px; }
.areas li { padding: 3px 0; }
.areas .n { color: var(--muted); font-size: 13px; }
.about { margin-top: 18px; font-size: 15px; color: var(--muted); }
.about summary { color: var(--ink); font-weight: 500; cursor: pointer; }
.about a { color: var(--focus); }

.foot { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 13px; color: var(--muted); padding: 8px 18px; border-top: 1px solid var(--line); background: var(--surface); }
.foot a { color: inherit; } .foot-dev { font-size: 13px; color: var(--ink); }

/* show-the-driver: big, high contrast, screenshot friendly */
.showdriver { position: fixed; inset: 0; z-index: 2000; background: #fff; color: #111; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 24px; }
.showdriver[hidden] { display: none; }
.sd-close { position: absolute; top: calc(12px + env(safe-area-inset-top, 0px)); right: 16px; width: 48px; height: 48px; border-radius: 50%; border: 0; background: #eee; font-size: 30px; }
.sd-kicker { font-size: 26px; margin: 0; font-weight: 600; }
.sd-fare { font-family: var(--display); font-size: clamp(110px, 32vw, 220px); line-height: 1; margin: 6px 0 12px; color: #111; }
.sd-line { font-size: 22px; margin: 2px 0; }
.sd-law { font-size: 18px; margin: 18px 0 0; max-width: 520px; font-weight: 600; color: #a81c30; }
.sd-src { font-size: 15px; color: #555; margin: 14px 0 0; }

.toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); transform: translate(-50%, 20px); opacity: 0; pointer-events: none; z-index: 3000;
  background: var(--ink); color: var(--surface); padding: 10px 18px; border-radius: 12px; max-width: min(92vw, 460px); font-size: 15px; text-align: center; transition: opacity .2s, transform .2s; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.leaflet-container { font-family: var(--font); }
.mk { width: 26px; height: 26px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); border: 2px solid #fff; box-shadow: 0 2px 6px rgba(0,0,0,.35); display: flex; align-items: center; justify-content: center; }
.mk span { transform: rotate(45deg); color: #fff; font-weight: 700; font-size: 12px; }
.mk-a { background: var(--ok); } .mk-b { background: var(--bad); }

/* dialogs (shared with sibling sites) */
.dlg { border: 0; border-radius: 20px; padding: 26px 24px 22px; width: min(92vw, 420px); background: var(--surface); color: var(--ink); box-shadow: 0 20px 60px rgba(10,12,40,.35); max-height: 90vh; overflow-y: auto; }
.dlg::backdrop { background: rgba(14,16,40,.55); }
.dlg-close { position: absolute; top: 10px; right: 12px; width: 36px; height: 36px; border-radius: 50%; border: 0; background: transparent; color: var(--muted); font-size: 26px; line-height: 1; }
.dlg h2 { font-family: var(--display); font-weight: 400; font-size: 26px; margin: 0 0 4px; }
.dev { text-align: center; }
.dev-photo { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; margin: 0 auto 12px; display: block; }
.dev-initials { display: flex; align-items: center; justify-content: center; background: var(--night); color: var(--lantern); font-size: 34px; font-weight: 700; box-shadow: 0 0 0 4px rgba(226,55,74,.25); }
.dev-en { margin: 0; color: var(--muted); font-size: 15px; } .dev-role { margin: 2px 0 12px; font-weight: 500; }
.dev-about { margin: 0 0 12px; font-size: 15px; color: var(--muted); text-align: left; }
.dev-email { margin: 0 0 12px; font-size: 15px; } .dev-email a { color: var(--ink); }
.dev-social { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-bottom: 16px; }
.pill { border: 1px solid var(--line); border-radius: 999px; padding: 4px 14px; font-size: 14px; color: var(--ink); text-decoration: none; }
.dev-donate { border-top: 1px solid var(--line); padding-top: 14px; text-align: left; }
.dev-donate h3 { font-size: 17px; margin: 0 0 4px; } .dev-donate p { margin: 0 0 10px; font-size: 14px; color: var(--muted); }
.bkash { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 2px 10px; background: var(--paper); border-radius: 12px; padding: 10px 14px; }
.bkash-label { font-size: 13px; color: var(--muted); } .bkash-num { font-size: 22px; letter-spacing: .5px; }
.bkash .btn-small { grid-column: 2; grid-row: 1 / span 2; }
.btn-link { background: none; border: 0; color: var(--focus); text-decoration: underline; padding: 0; font-size: 14px; }
.card-preview img { width: 100%; height: auto; display: block; border-radius: 12px; background: var(--night); aspect-ratio: 1; margin: 10px 0 14px; }
.card-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* ticker */
.ticker { display: flex; gap: 10px; align-items: center; background: var(--lantern); color: #3b2a00; padding: 6px 18px; font-size: 14px; font-weight: 500; overflow: hidden; }
.ticker[hidden] { display: none; }
.tk-label { flex: none; background: var(--red); color: #fff; border-radius: 999px; padding: 1px 10px; font-size: 13px; }
#tickerText { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: opacity .3s; }
/* bus notice */
.notice { margin: 10px 0 0; font-size: 13px; background: rgba(255,197,61,.18); border: 1px solid rgba(224,168,0,.5); border-radius: 10px; padding: 7px 10px; }
.notice[hidden] { display: none; }
/* search */
.search { position: relative; margin-bottom: 4px; }
.seg { display: inline-flex; border: 1.5px solid var(--line); border-radius: 999px; padding: 2px; margin-bottom: 8px; }
.seg button { border: 0; background: transparent; color: var(--muted); border-radius: 999px; padding: 4px 12px; font-size: 14px; display: inline-flex; align-items: center; gap: 6px; }
.seg button[aria-checked="true"] { background: var(--night); color: #fff; }
.searchform { display: flex; gap: 8px; }
.searchform input { flex: 1; min-width: 0; font: inherit; font-size: 16px; padding: 8px 14px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--paper); color: var(--ink); }
.searchform input:focus { border-color: var(--night); outline: none; }
.suggest { position: absolute; left: 0; right: 0; top: 100%; z-index: 900; list-style: none; margin: 4px 0 0; padding: 4px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 10px 28px rgba(0,0,0,.15); max-height: 280px; overflow-y: auto; }
.suggest[hidden] { display: none; }
.suggest li button { width: 100%; text-align: left; border: 0; background: transparent; color: var(--ink); padding: 8px 10px; border-radius: 8px; font-size: 15px; }
.suggest li button:hover, .suggest li button:focus { background: var(--paper); }
.suggest li small { color: var(--muted); font-size: 12px; display: block; }
.shortcuts { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 4px; }
.shortcuts .lbl { font-size: 13px; color: var(--muted); width: 100%; }
.shortcuts button { border: 1px dashed var(--night-soft); background: transparent; color: var(--ink); border-radius: 999px; padding: 3px 10px; font-size: 13px; }
.shortcuts button:hover { background: rgba(11,93,91,.08); }
/* comparison */
.compare { margin: -6px 0 22px; }
.compare h2 { font-size: 16px; margin: 0 0 8px; }
.cmp { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.cmp .c { border: 1.5px solid var(--line); border-radius: 12px; padding: 8px 12px; }
.cmp .c.cur { border-color: var(--night); }
.cmp .c.best { border-color: var(--ok); }
.cmp .c .n { font-size: 13px; color: var(--muted); }
.cmp .c .f { font-family: var(--display); font-size: 26px; line-height: 1.2; }
.cmp .c .s { font-size: 12px; color: var(--muted); }
.cmp .tag { display: inline-block; font-size: 11px; border-radius: 999px; padding: 0 8px; margin-left: 4px; vertical-align: 2px; }
.cmp .tag.best { background: rgba(31,138,91,.15); color: var(--ok); }
.cmp .tag.cur { background: rgba(11,93,91,.12); color: var(--night); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .cmp .tag.cur, :root:not([data-theme="light"]) .seg button[aria-checked="true"] { color: #fff; } }
.mk-m { width: 18px; height: 18px; border-radius: 4px; background: var(--lantern); border: 2px solid var(--night); }

@media (max-width: 760px) {
  html, body { height: auto; }
  body { font-size: 16px; }
  .brand-tag { display: none; }
  .layout { display: flex; flex-direction: column; flex: none; }
  .panel { display: contents; }
  .panel > *, .mapwrap { flex-shrink: 0; }
  .panel > * { margin-left: 16px; margin-right: 16px; }
  .panel > h1 { margin-top: 18px; order: 1; }
  .panel > .step:first-of-type, .panel > .step:nth-of-type(2) { order: 1; }
  .mapwrap { order: 2; height: 52vh; min-height: 320px; margin-bottom: 14px; }
  .result, .compare, #paidStep, .stats, .about { order: 3; }
  .about { margin-bottom: 20px; }
  .stat-cards { grid-template-columns: 1fr 1fr; }
}
