/* Chalo Hyd — RailRoute's system: warm paper, white cards lifted by shadow, one house-blue accent,
   tabular numerals, the journey drawn as a line. Light only. */
:root {
  --canvas: #f7f7f3; --surface: #fff; --sunken: #f1f1ec; --line: #e7e6e0; --line-strong: #c3cad6;
  --ink: #17191a; --ink-2: #474c4e; --ink-3: #6b7072;
  --accent: #1b48e0; --accent-hover: #1539b8; --accent-wash: #eef2ff;
  --clear: #0d9457; --caution: #bf8408; --danger: #c3213f;
  --bus: #474c4e;
  --shadow: 0 1px 2px rgb(20 24 24 / .05), 0 8px 24px -12px rgb(20 24 24 / .14);
  --shadow-lifted: 0 2px 6px rgb(20 24 24 / .06), 0 24px 48px -20px rgb(20 24 24 / .3);
  --radius: 20px; --radius-sm: 12px;
  --rise: cubic-bezier(.16, 1, .3, 1);
  --sans: "Onest", "Noto Sans Telugu", "Noto Sans Devanagari", "Noto Sans Tamil", system-ui, sans-serif;
  --display: "Bricolage Grotesque", var(--sans);
}
[hidden] { display: none !important; }
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; overflow: hidden; }
body { background: var(--canvas); color: var(--ink); font: 400 15px/1.45 var(--sans); font-variant-numeric: tabular-nums; -webkit-font-smoothing: antialiased; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; }
.num { font-weight: 600; letter-spacing: -.01em; }

#map { position: fixed; inset: 0; z-index: 0; background: #ecebe6; }
.leaflet-container { background: #ecebe6; font: inherit; }
.leaflet-control-attribution { background: rgb(247 247 243 / .85) !important; color: var(--ink-3) !important; font-size: 10px; }
.leaflet-control-attribution a { color: var(--ink-2) !important; }
.leaflet-control-zoom { display: none; }
.basemap { filter: grayscale(1) sepia(.12) contrast(.86) brightness(1.06); }
.meta .walkn { display: inline-flex; align-items: center; gap: 2px; } .meta .walkn svg { width: 13px; height: 13px; fill: currentColor; }
.leaflet-tooltip { background: var(--surface); color: var(--ink); border: 0; border-radius: 10px; box-shadow: var(--shadow); font: 500 12.5px var(--sans); padding: 4px 9px; }
.leaflet-tooltip::before { display: none; }

/* ---------- top bar ---------- */
.bar { position: fixed; z-index: 5; top: 0; left: 0; right: 0; display: flex; justify-content: space-between; align-items: center; padding: calc(12px + env(safe-area-inset-top)) 16px 12px; pointer-events: none; }
.bar > * { pointer-events: auto; }
.brand { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 16px 0 12px; border-radius: 999px; background: var(--surface); box-shadow: var(--shadow); color: var(--ink); text-decoration: none; font: 700 17px/1 var(--display); letter-spacing: -.02em; }
.mark { width: 26px; height: 26px; }
.mark circle { fill: var(--accent); } .mark circle.end { fill: var(--surface); stroke: var(--accent); stroke-width: 3; } .mark path { stroke: var(--accent); stroke-width: 3; stroke-linecap: round; }
.pill { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 40px; padding: 0 14px; border-radius: 999px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); font-weight: 500; font-size: 14px; white-space: nowrap; transition: background .15s, box-shadow .15s, color .15s; }
.pill:hover { background: var(--sunken); }
.lang-btn { box-shadow: var(--shadow); }
.lang-pop { position: fixed; z-index: 20; top: calc(60px + env(safe-area-inset-top)); right: 16px; width: min(340px, calc(100vw - 32px)); background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow-lifted); padding: 8px; display: grid; grid-template-columns: 1fr 1fr; gap: 2px; animation: rise .22s var(--rise); }
.lang-pop[hidden] { display: none; }
.lang-pop button { text-align: left; padding: 9px 12px; border-radius: var(--radius-sm); font-weight: 500; }
.lang-pop button small { display: block; color: var(--ink-3); font-size: 12px; font-weight: 400; }
.lang-pop button:hover { background: var(--sunken); }
.lang-pop button.on { background: var(--accent-wash); color: var(--accent); }

/* ---------- sheet ---------- */
.sheet { position: fixed; z-index: 10; left: 0; right: 0; bottom: 0; max-height: 78dvh; display: flex; flex-direction: column; background: var(--surface); border-radius: var(--radius) var(--radius) 0 0; box-shadow: var(--shadow-lifted); padding: 4px 16px calc(12px + env(safe-area-inset-bottom)); transition: max-height .4s var(--rise); }
.sheet.min { max-height: 168px; }
.sheet.min .body { display: none; }
.grip { width: 40px; height: 4px; border-radius: 4px; background: var(--line); margin: 6px auto 10px; flex: none; cursor: pointer; }
@media (min-width: 900px) {
  .sheet { left: 16px; right: auto; top: 68px; bottom: 16px; width: 440px; max-height: none; border-radius: var(--radius); padding: 16px 16px 12px; }
  .sheet.min { max-height: none; } .sheet.min .body { display: block; }
  .grip { display: none; }
  .sheet:has(#results[hidden]):has(.convo:empty) { bottom: auto; }
  .prefs { flex-wrap: wrap; overflow: visible; }
}
.body { overflow-y: auto; overscroll-behavior: contain; flex: 1 1 auto; min-height: 0; margin: 0 -16px; padding: 4px 16px 4px; scrollbar-width: thin; scrollbar-color: var(--line) transparent; }

/* search bar: the hero */
.ask { display: flex; align-items: center; gap: 8px; height: 52px; padding: 0 6px 0 14px; border-radius: var(--radius-sm); background: var(--sunken); box-shadow: inset 0 0 0 1px var(--line); transition: box-shadow .15s, background .15s; flex: none; }
.ask:focus-within { background: var(--surface); box-shadow: inset 0 0 0 1.5px var(--accent); }
.ask-ico { width: 18px; height: 18px; fill: none; stroke: var(--ink-3); stroke-width: 2; stroke-linecap: round; flex: none; }
.ask input { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: none; font-size: 16px; }
.ask input::placeholder { color: var(--ink-3); }
.mic { position: relative; width: 40px; height: 40px; border-radius: 999px; background: var(--accent); color: #fff; display: grid; place-items: center; flex: none; transition: background .15s, transform .12s; }
.mic:hover { background: var(--accent-hover); }
.mic:active { transform: scale(.95); }
.mic svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; position: relative; }
.mic svg rect { fill: currentColor; stroke: none; }
.mic .lvl { position: absolute; inset: 0; border-radius: inherit; box-shadow: 0 0 0 calc(var(--lvl, 0) * 10px) rgb(27 72 224 / .18); transition: box-shadow .08s linear; }
.mic.rec { background: var(--ink); }
.mic.rec svg rect { rx: 1.5; }
.mic.busy { pointer-events: none; background: var(--accent-wash); color: var(--accent); }
.mic.busy svg { animation: breathe 1.1s ease-in-out infinite; }
.mic.talk .lvl { animation: ring 1.2s ease-out infinite; }

.prefs { display: flex; gap: 8px; padding: 10px 0 2px; overflow-x: auto; scrollbar-width: none; flex: none; margin: 0 -16px; padding-left: 16px; padding-right: 16px; }
.prefs::-webkit-scrollbar { display: none; }
.prefs .pill { height: 36px; font-size: 13.5px; padding: 0 12px; }
.seg { display: inline-flex; gap: 2px; padding: 2px; border-radius: 999px; box-shadow: inset 0 0 0 1px var(--line); flex: none; }
.seg button { height: 32px; padding: 0 12px; border-radius: 999px; font-size: 13.5px; font-weight: 500; color: var(--ink-2); white-space: nowrap; }
.seg button.on { background: var(--accent-wash); color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.check input { position: absolute; opacity: 0; pointer-events: none; }
.check svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; }
.check:has(input:checked), #locBtn.on { background: var(--accent-wash); color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.status { min-height: 0; font-size: 13px; color: var(--ink-3); flex: none; }
.status:not(:empty) { padding-top: 8px; }

/* intro */
.intro h1 { font: 700 clamp(26px, 7vw, 32px)/1.05 var(--display); letter-spacing: -.025em; margin: 14px 0 6px; }
.sub { margin: 0 0 14px; color: var(--ink-2); }
.examples { display: flex; flex-direction: column; gap: 8px; }
.examples button { display: flex; align-items: center; gap: 12px; text-align: left; padding: 12px 14px; border-radius: var(--radius-sm); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); font-weight: 500; transition: background .15s, transform .2s var(--rise); }
.examples button::before { content: ""; width: 26px; height: 8px; flex: none; background: radial-gradient(circle at 4px 4px, var(--ink) 3px, transparent 3.5px), radial-gradient(circle at 22px 4px, var(--ink) 3px, transparent 3.5px), linear-gradient(var(--ink), var(--ink)) 4px 3.25px / 18px 1.5px no-repeat; }
.examples button:hover { background: var(--sunken); }
.facts { list-style: none; display: flex; gap: 18px; padding: 16px 0 8px; margin: 0; color: var(--ink-3); font-size: 13px; }
.facts b { display: block; color: var(--ink); font-size: 17px; }

/* conversation: what you said, what it said */
.convo { display: flex; flex-direction: column; gap: 6px; padding-top: 12px; }
.convo:empty { display: none; }
.msg { animation: rise .3s var(--rise) both; }
.msg.me { align-self: flex-end; max-width: 88%; background: var(--sunken); padding: 8px 12px; border-radius: 14px 14px 4px 14px; font-weight: 500; }
.msg.me small { display: block; color: var(--ink-3); font-weight: 400; font-size: 12.5px; }
.msg.bot { color: var(--ink); font-size: 15px; line-height: 1.5; padding: 2px 0; }
.msg.bot .say { margin-top: 6px; height: 32px; padding: 0 12px; font-size: 13px; }
.msg.bot .say svg { width: 15px; height: 15px; fill: currentColor; }
.msg.wait { color: var(--ink-3); }
.skeleton { height: 92px; border-radius: var(--radius); background: linear-gradient(90deg, var(--sunken) 0, #fafaf7 50%, var(--sunken) 100%) 0 0 / 200% 100%; animation: sweep 1.2s linear infinite; margin-top: 8px; }

/* results: rows you read */
.results { padding-top: 12px; }
.list { display: flex; flex-direction: column; gap: 10px; }
.row { display: block; width: 100%; text-align: left; background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px 16px 12px; position: relative; animation: rise .4s var(--rise) both; transition: box-shadow .2s, transform .2s var(--rise); }
.row:nth-child(2) { animation-delay: .05s; } .row:nth-child(3) { animation-delay: .1s; }
@media (hover: hover) { .row:hover { box-shadow: var(--shadow-lifted); transform: translateY(-1px); } }
.row.on { box-shadow: var(--shadow), inset 0 0 0 1.5px var(--accent); }
.row .top { display: flex; align-items: center; gap: 6px; margin-bottom: 10px; min-height: 22px; }
.label { font-size: 12.5px; font-weight: 600; color: var(--ink-2); padding: 2px 9px; border-radius: 999px; background: var(--sunken); }
.label.best { background: var(--accent-wash); color: var(--accent); }
.row .fare { margin-left: auto; font-size: 20px; font-weight: 700; letter-spacing: -.01em; }
.row .fare small { font-size: 13px; color: var(--ink-3); font-weight: 500; margin-right: 1px; }
/* the journey is a line: clock — rule with duration — clock */
.line { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px; }
.clock { font-size: 20px; font-weight: 700; letter-spacing: -.02em; line-height: 1; }
.clock small { font-size: 12px; font-weight: 600; color: var(--ink-3); margin-left: 2px; }
.rule { position: relative; height: 22px; display: flex; align-items: center; }
.rule .dur { position: absolute; left: 50%; top: -9px; transform: translateX(-50%); background: var(--surface); padding: 0 6px; font-size: 12.5px; font-weight: 600; color: var(--ink-2); white-space: nowrap; }
.bars { display: flex; width: 100%; height: 6px; gap: 2px; margin-top: 10px; }
.bars i { display: block; height: 100%; border-radius: 3px; background: var(--bus); min-width: 6px; }
.bars i.walk { background: repeating-linear-gradient(90deg, var(--line-strong) 0 3px, transparent 3px 6px); }
.chain { display: flex; flex-wrap: wrap; gap: 4px 6px; align-items: center; margin-top: 10px; font-size: 13px; color: var(--ink-2); }
.svc { display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 0 8px; border-radius: 999px; font-weight: 600; font-size: 13px; color: #fff; background: var(--bus); }
.svc svg { width: 13px; height: 13px; fill: currentColor; }
.chain .walkn { display: inline-flex; align-items: center; gap: 2px; color: var(--ink-3); }
.chain .walkn svg { width: 13px; height: 13px; fill: currentColor; }
.chain .gt { color: var(--line-strong); }
.meta { margin-top: 8px; font-size: 13px; color: var(--ink-3); }

/* detail: the sheet you open */
.detail { animation: rise .35s var(--rise) both; }
.back { height: 36px; padding: 0 12px 0 8px; font-size: 13.5px; margin-bottom: 12px; }
.back svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
#detailHead .row { box-shadow: none; padding: 0 0 12px; animation: none; border-radius: 0; border-bottom: 1px solid var(--line); }
#detailHead .row:hover { transform: none; }
.steps { list-style: none; margin: 14px 0 6px; padding: 0; }
.step { display: grid; grid-template-columns: 58px 20px 1fr; gap: 0 10px; position: relative; padding-bottom: 16px; }
.step .t { text-align: right; font-size: 13.5px; font-weight: 600; padding-top: 1px; }
.step .t.est { color: var(--ink-3); font-weight: 500; }
.step .node { position: relative; display: flex; justify-content: center; }
.step .node::after { content: ""; position: absolute; top: 16px; bottom: -18px; width: 4px; border-radius: 2px; background: var(--c, var(--bus)); }
.step.walk .node::after { width: 2px; background: repeating-linear-gradient(var(--line-strong) 0 3px, transparent 3px 7px); }
.step:last-child .node::after { display: none; }
.step .node i { width: 14px; height: 14px; margin-top: 3px; border-radius: 50%; background: var(--surface); box-shadow: inset 0 0 0 3px var(--c, var(--ink)); position: relative; z-index: 1; }
.step.walk .node i { box-shadow: inset 0 0 0 2px var(--line-strong); width: 10px; height: 10px; margin-top: 5px; }
.step.end .node i { background: var(--ink); box-shadow: none; }
.step .what { min-width: 0; }
.step .what b { display: block; font-weight: 600; }
.step .what .s { display: block; color: var(--ink-2); font-size: 14px; }
.step .what .s strong { color: var(--ink); font-weight: 600; }
.step .what .m { display: block; color: var(--ink-3); font-size: 13px; margin-top: 2px; }
.step .what .svc { margin-right: 6px; vertical-align: 1px; }
.wide { width: 100%; height: 44px; margin-top: 12px; }
.fine { color: var(--ink-3); font-size: 12px; margin: 10px 0 4px; }

/* map pins */
.pin { width: 16px; height: 16px; border-radius: 50%; background: var(--surface); box-shadow: 0 0 0 4px var(--ink), 0 2px 8px rgb(0 0 0 / .3); }
.pin.b { background: var(--ink); box-shadow: 0 0 0 3px var(--surface), 0 2px 8px rgb(0 0 0 / .35); }
.pin.me { background: var(--accent); box-shadow: 0 0 0 3px #fff, 0 0 0 9px rgb(27 72 224 / .18); }
.stn { width: 9px; height: 9px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 2.5px var(--ink); }

@keyframes rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes sweep { to { background-position: -200% 0; } }
@keyframes breathe { 50% { opacity: .35; } }
@keyframes ring { from { box-shadow: 0 0 0 0 rgb(27 72 224 / .35); } to { box-shadow: 0 0 0 12px rgb(27 72 224 / 0); } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* city switcher, weather, quick languages */
.brand { border: 0; cursor: pointer; }
.brand .caret { color: var(--ink-3); margin-left: -2px; }
.bar { gap: 8px; }
.bar .lang-btn { margin-left: auto; }
.wx { display: inline-flex; align-items: center; gap: 4px; height: 40px; padding: 0 12px; border-radius: 999px; background: var(--surface); box-shadow: var(--shadow); font-weight: 600; font-size: 14px; }
.wx svg { width: 18px; height: 18px; fill: none; stroke: var(--ink-2); stroke-width: 1.8; stroke-linecap: round; }
.city-pop { left: 16px; right: auto; grid-template-columns: 1fr 1fr; }
.city-pop a { padding: 11px 12px; border-radius: var(--radius-sm); color: var(--ink); text-decoration: none; font-weight: 500; }
.city-pop a:hover { background: var(--sunken); }
.city-pop a.on { background: var(--accent-wash); color: var(--accent); }
.quick-langs { display: flex; gap: 8px; margin-top: 14px; flex-wrap: wrap; }
.quick-langs .pill { height: 34px; font-size: 14px; }
.row .top { flex-wrap: nowrap; overflow: hidden; }
.row .top .label:nth-of-type(n+3) { display: none; }
.src { margin-top: 0; }

/* start trip + live banner */
.go { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; height: 52px; margin: 14px 0 4px; border-radius: 999px; background: var(--accent); color: #fff; font-weight: 600; font-size: 16px; transition: background .15s; }
.go:hover { background: var(--accent-hover); }
.go svg { width: 18px; height: 18px; fill: currentColor; transform: rotate(45deg); }
.live { position: fixed; z-index: 15; left: 12px; right: 12px; top: calc(64px + env(safe-area-inset-top)); background: var(--ink); color: #fff; border-radius: var(--radius); box-shadow: var(--shadow-lifted); padding: 12px 14px; animation: rise .3s var(--rise); }
@media (min-width: 900px) { .live { left: 472px; right: auto; width: 380px; top: 68px; } }
.live-top { display: flex; align-items: center; gap: 8px; }
.live-top b { font-size: 15px; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.live-top .pill { height: 32px; background: rgb(255 255 255 / .12); box-shadow: none; color: #fff; font-size: 13px; }
.live p { margin: 6px 0 0; font-size: 17px; font-weight: 600; line-height: 1.3; }
.live-dot { width: 10px; height: 10px; border-radius: 50%; background: #3ddc84; box-shadow: 0 0 0 0 rgb(61 220 132 / .6); animation: livepulse 1.6s infinite; flex: none; }
@keyframes livepulse { to { box-shadow: 0 0 0 10px rgb(61 220 132 / 0); } }
.step.now .what b { color: var(--accent); }
.step.now .node i { box-shadow: inset 0 0 0 3px var(--accent), 0 0 0 4px var(--accent-wash); }

/* the one big way in, for people who will never find a small icon */
.speak-big { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; height: 60px; border-radius: 999px; background: var(--accent); color: #fff; font-size: 18px; font-weight: 600; margin: 4px 0 16px; box-shadow: 0 10px 24px -12px rgb(27 72 224 / .6); transition: background .15s, transform .12s; }
.speak-big:hover { background: var(--accent-hover); }
.speak-big:active { transform: scale(.98); }
.speak-big svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.speak-big svg rect { fill: currentColor; stroke: none; }
.speak-big.rec { background: var(--ink); }
.or-type { font-size: 13px; color: var(--ink-3); margin: 0 0 8px; }
.sheet:has(#intro:not([hidden])) .mic { background: var(--sunken); color: var(--ink-2); box-shadow: inset 0 0 0 1px var(--line); }
.sheet:has(#results[hidden]) .prefs { display: none; }

/* multimodal: local trains, autos, ferries, estimated timings, first service */
.svc.auto { color: var(--ink); }
.svc.auto svg { fill: var(--ink); }
.bars i.auto { background: repeating-linear-gradient(90deg, #e0a100 0 7px, #f5d77a 7px 10px); }
.step.auto .node::after { background: repeating-linear-gradient(#e0a100 0 7px, transparent 7px 11px); }
.meta .autoall { color: var(--ink); font-weight: 600; }
.meta .esthint { color: var(--ink-3); font-style: italic; }
.notice { display: flex; align-items: flex-start; gap: 10px; margin: 0 0 10px; padding: 11px 14px; border-radius: var(--radius-sm); background: #fff6db; box-shadow: inset 0 0 0 1px #f0dc9c; color: var(--ink); font-weight: 500; font-size: 14.5px; line-height: 1.4; animation: rise .3s var(--rise) both; }
.notice svg { width: 20px; height: 20px; flex: none; margin-top: 1px; fill: none; stroke: var(--caution); stroke-width: 2; stroke-linecap: round; }
.step { grid-template-columns: 64px 20px 1fr; }
.step .t { white-space: nowrap; font-size: 13px; }
