@font-face {
  font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("fonts/inter-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("fonts/inter-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  color-scheme: dark;
  --ground: #000;
  --panel: #161617;
  --panel-2: #1d1d1f;
  --hair: rgba(255, 255, 255, .13);
  --text: #f5f5f7;
  --text-2: #a1a1a6;
  --text-3: #86868b;
  --green: #30d158;
  --amber: #ff9f0a;
  --red: #ff453a;
  --signal: #e9b800;
  --link: #2997ff;
  --gutter: 20px;
  --ease: cubic-bezier(.16, 1, .3, 1);
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-feature-settings: "tnum" 1;
  /* type scale: 5 steps + verdict */
  --t-xs: .78rem; --t-s: .94rem; --t-m: 1.06rem; --t-l: 1.35rem;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { background: var(--ground); }
body {
  margin: 0; min-height: 100dvh; color: var(--text); background: var(--ground);
  font-size: 17px; line-height: 1.47; letter-spacing: -.011em;
  padding-bottom: calc(104px + env(safe-area-inset-bottom));
  -webkit-font-smoothing: antialiased;
}
::selection { background: var(--signal); color: #000; }
:focus-visible { outline: 2px solid var(--link); outline-offset: 3px; border-radius: 10px; }
button, select, input { font: inherit; color: inherit; letter-spacing: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
h2 { margin: 0; }
.ico { width: 22px; height: 22px; flex: none; }
.ico--s { width: 18px; height: 18px; }
.ico--arrow { width: 16px; height: 16px; color: var(--text-3); }
.quiet { color: var(--text-3); margin: 0; }

/* top: route as a title */
.top {
  position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 12px;
  padding: calc(env(safe-area-inset-top) + 14px) var(--gutter) 14px;
  background: rgba(0, 0, 0, .72); backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--hair);
}
.route { flex: 1; min-width: 0; text-align: left; display: grid; gap: 1px; }
.brand { display: inline-flex; align-items: center; gap: 12px; font-size: var(--t-l); font-weight: 700; color: var(--text); letter-spacing: -.025em; margin-bottom: 6px; }
.brand img { border-radius: 10px; }
.route__to #from-name { white-space: nowrap; }
.intro { margin: 16px var(--gutter) 0; padding: 16px 18px 8px; border-radius: 16px; background: var(--panel); color: var(--text-2); font-size: var(--t-s); }
.intro[hidden] { display: none; }
.intro p { margin: 0; max-width: 60ch; }
.route__to { display: flex; align-items: center; gap: 6px; font-size: var(--t-m); font-weight: 700; letter-spacing: -.02em; }
.route__to #to-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.route__to .ico { color: var(--text-3); }
.round {
  width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center;
  background: var(--panel-2); color: var(--text); flex: none;
  transition: transform .4s var(--ease), background .2s;
}
.round:active { transform: scale(.94); }
#swap .ico { transition: transform .5s var(--ease); }
#swap.spin .ico { transform: rotate(180deg); }
.round--s { width: 44px; height: 44px; }

.notice { margin: 14px var(--gutter) 0; padding: 12px 16px; border-radius: 14px; font-size: var(--t-s); background: var(--panel); color: var(--text-2); }
.notice--red { color: #ffb4ae; background: #2a1110; }
.notice--amber { color: #ffd28a; background: #2a1d08; }

/* hero: the next train, stated */
.hero { padding: 34px var(--gutter) 30px; display: grid; gap: 18px; }
.verdict { margin: 0; font-size: clamp(3.2rem, 14vw, 4.2rem); font-weight: 700; letter-spacing: -.04em; line-height: 1; text-wrap: balance; }
.verdict--long { font-size: clamp(2.5rem, 10.5vw, 3.4rem); }
@keyframes settle { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.verdict.enter { animation: settle .7s var(--ease) both; }
.v-green { color: var(--green); } .v-amber { color: var(--amber); } .v-red { color: var(--red); }
.carline { margin: -6px 0 0; font-size: var(--t-l); font-weight: 400; letter-spacing: -.022em; line-height: 1.25; }
.carline strong { color: var(--signal); font-weight: 700; }
.carline span { color: var(--text-2); }
.when { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; font-size: var(--t-m); color: var(--text-2); }
.when b { color: var(--text); font-weight: 700; }
.live {
  display: inline-flex; align-items: center; gap: 7px; padding: 4px 11px 4px 9px; border-radius: 999px;
  font-size: var(--t-xs); font-weight: 500; background: var(--panel-2); color: var(--text);
}
.live i { width: 8px; height: 8px; border-radius: 50%; background: var(--green); }
.live--late i { background: var(--amber); } .live--late { color: #ffd28a; }
.live--very i { background: var(--red); } .live--very { color: #ffb4ae; }
.live--gone { color: var(--text-2); } .live--gone i { background: var(--text-3); }
.live--moving i { animation: breathe 2.4s var(--ease) infinite; }
@keyframes breathe { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .35; transform: scale(.7); } }
.seen { font-size: var(--t-s); color: var(--text-3); margin: -8px 0 0; }
.fig { margin: 0; display: grid; gap: 8px; }
.fig .carnos { margin-top: -2px; }
.fig figcaption { font-size: var(--t-xs); color: var(--text-3); }

/* the train: capsule cars, nose at the head (car 1, left), tail at the end */
.train { display: flex; gap: 4px; height: 44px; }
.car { position: relative; flex: 1; border-radius: 12px; background: var(--panel-2); overflow: hidden; }
.car:first-child { border-radius: 26px 12px 12px 12px / 32px 12px 12px 12px; }
.car:last-child { border-top-right-radius: 18px; }
.car__fill { position: absolute; left: 0; right: 0; bottom: 0; }
.car__seats { position: absolute; left: 0; right: 0; bottom: 66.67%; border-top: 1.5px dashed rgba(245, 245, 247, .55); }
.f-green { background: var(--green); } .f-amber { background: var(--amber); } .f-red { background: var(--red); }
.car--pick { box-shadow: inset 0 0 0 2.5px var(--signal); }
.carnos { display: flex; gap: 4px; margin-top: -10px; }
.carnos span { flex: 1; text-align: center; font-size: var(--t-xs); color: var(--text-3); }
.carnos .is-pick { color: var(--signal); font-weight: 700; }
.train--mini { height: 14px; gap: 2px; }
.train--mini .car { border-radius: 4px; }
.train--mini .car:first-child { border-radius: 8px 4px 4px 4px / 10px 4px 4px 4px; }
.train--mini .car:last-child { border-top-right-radius: 6px; }
.train--mini .car--pick { box-shadow: inset 0 0 0 1.5px var(--signal); }

.conf { display: inline-flex; align-items: center; gap: 8px; font-size: var(--t-s); color: var(--text-2); }
.conf__steps { display: inline-flex; gap: 2px; align-items: flex-end; height: 12px; }
.conf__steps i { width: 4px; border-radius: 1px; background: #3a3a3c; }
.conf__steps i:nth-child(1) { height: 5px; } .conf__steps i:nth-child(2) { height: 8px; } .conf__steps i:nth-child(3) { height: 12px; }
.conf__steps i.on { background: var(--text-2); }
.conf--niska { color: #ffd28a; } .conf--niska .conf__steps i.on { background: var(--amber); }
.why { margin: -6px 0 0; font-size: var(--t-s); color: var(--text-3); }
.more-btn { justify-self: start; color: var(--link); font-size: var(--t-s); display: inline-flex; align-items: center; gap: 2px; min-height: 44px; }
.more-btn .ico { transition: transform .35s var(--ease); }
.hero.is-open .more-btn .ico, .row.is-open .row__chev { transform: rotate(90deg); }

/* list */
.next { padding: 8px var(--gutter) 0; }
.next__title { font-size: var(--t-l); font-weight: 700; letter-spacing: -.022em; padding-bottom: 6px; border-bottom: 1px solid var(--hair); }
.rows { list-style: none; margin: 0; padding: 0; }
.row { border-bottom: 1px solid var(--hair); }
.row__btn { width: 100%; text-align: left; display: grid; grid-template-columns: 1fr auto 18px; gap: 6px 12px; align-items: center; padding: 16px 0; }
.row__verdict { font-size: var(--t-m); font-weight: 700; letter-spacing: -.02em; }
.row__time { text-align: right; color: var(--text-2); font-size: var(--t-s); white-space: nowrap; }
.row__time b { color: var(--text); font-weight: 700; }
.row__chev { color: var(--text-3); transition: transform .35s var(--ease); width: 18px; height: 18px; }
.row__sub { grid-column: 1 / -1; display: flex; gap: 12px; align-items: center; font-size: var(--t-s); color: var(--text-3); }
.row__sub .train { flex: 1; max-width: 46%; }
.row .live { padding: 2px 9px 2px 7px; }

.drawer { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .45s var(--ease); }
.is-open .drawer { grid-template-rows: 1fr; }
.drawer > div { overflow: hidden; }
.detail { display: grid; gap: 10px; padding: 4px 0 18px; }
.bar { display: grid; grid-template-columns: 4.8rem 1fr 3rem; gap: 10px; align-items: center; font-size: var(--t-s); color: var(--text-2); }
.bar__track { height: 6px; border-radius: 3px; background: var(--panel-2); overflow: hidden; }
.bar__val { display: block; height: 100%; border-radius: 3px; }
.bar__pct { text-align: right; }
.bar--pick .bar__name { color: var(--signal); font-weight: 700; }
.note { margin: 0; font-size: var(--t-xs); color: var(--text-3); }
.hero .detail { padding-bottom: 0; }

/* footer, dock */
.foot { padding: 34px var(--gutter) 8px; display: grid; gap: 10px; }
.link { justify-self: start; display: inline-flex; gap: 8px; align-items: center; color: var(--link); font-size: var(--t-s); min-height: 44px; }
.fine { margin: 0; max-width: 56ch; font-size: var(--t-xs); line-height: 1.5; color: var(--text-3); }
.dock {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 6;
  padding: 12px var(--gutter) calc(12px + env(safe-area-inset-bottom));
  background: rgba(0, 0, 0, .72); backdrop-filter: saturate(180%) blur(20px); border-top: 1px solid var(--hair);
}
.pill {
  width: 100%; min-height: 54px; border-radius: 999px; background: var(--text); color: #000;
  font-weight: 700; font-size: var(--t-m); letter-spacing: -.015em; transition: transform .3s var(--ease), background .2s;
}
.pill:active { transform: scale(.98); background: #d6d6db; }

/* sheets */
.scrim { position: fixed; inset: 0; z-index: 9; background: rgba(0, 0, 0, .6); backdrop-filter: blur(4px); }
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 10; max-height: 90dvh;
  display: flex; flex-direction: column; gap: 16px;
  padding: 10px var(--gutter) calc(20px + env(safe-area-inset-bottom));
  background: var(--panel); border-radius: 24px 24px 0 0;
  box-shadow: 0 -12px 40px rgba(0, 0, 0, .6);
  animation: rise .45s var(--ease);
}
.sheet[hidden], .scrim[hidden] { display: none; }
@keyframes rise { from { transform: translateY(40px); opacity: .3; } to { transform: none; opacity: 1; } }
.grab { align-self: center; width: 38px; height: 5px; border-radius: 3px; background: #48484a; }
.sheet__head { display: flex; justify-content: space-between; align-items: center; }
.sheet__head h2 { font-size: var(--t-l); font-weight: 700; letter-spacing: -.025em; }
.search { width: 100%; min-height: 48px; padding: 0 16px; border-radius: 12px; border: 0; background: var(--panel-2); font-size: var(--t-m); }
.search::placeholder { color: var(--text-3); }
.stations { list-style: none; margin: 0; padding: 0; overflow-y: auto; }
.stations button { width: 100%; text-align: left; padding: 15px 2px; border-bottom: 1px solid var(--hair); font-size: var(--t-m); }
.stations button:active { background: var(--panel-2); }

.field { display: grid; gap: 8px; font-size: var(--t-s); color: var(--text-2); }
.field em { font-style: normal; color: var(--text-3); }
.field select { min-height: 48px; padding: 0 12px; border-radius: 12px; border: 0; background: var(--panel-2); }
.seg { display: flex; gap: 4px; padding: 3px; border-radius: 12px; background: var(--panel-2); }
.seg button { flex: 1; min-height: 44px; border-radius: 9px; font-weight: 500; color: var(--text-2); transition: background .25s var(--ease), color .25s; }
.seg button[aria-pressed="true"] { background: #48484a; color: var(--text); }
#rep-car button[aria-pressed="true"] { background: var(--signal); color: #000; }
.answers { display: grid; gap: 8px; }
.answer { display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 0 18px; border-radius: 14px; background: var(--panel-2); font-weight: 500; text-align: left; }
.answer:active { background: #2c2c2e; }
.answer:disabled { opacity: .5; }
.dot { width: 12px; height: 12px; border-radius: 50%; flex: none; }
.dot--green { background: var(--green); } .dot--amber { background: var(--amber); } .dot--red { background: var(--red); }
.acc-big { font-size: clamp(3.2rem, 14vw, 4.2rem); font-weight: 700; letter-spacing: -.035em; margin: 0; }
.acc-rows { display: grid; gap: 6px; color: var(--text-2); }

* { scrollbar-color: #3a3a3c transparent; scrollbar-width: thin; }

@media (min-width: 720px) {
  body, .dock, .sheet { max-width: 680px; margin-left: auto; margin-right: auto; }
  .hero { padding-top: 56px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
.privacy summary { cursor: pointer; color: var(--link); min-height: 44px; display: flex; align-items: center; }
.privacy p { margin: 4px 0 0; }
#trust p { margin: 0; overflow-wrap: anywhere; }
#trust a { color: var(--link); }
.types { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.types button {
  display: grid; gap: 2px; text-align: left; padding: 0 0 8px; border-radius: 14px; overflow: hidden;
  background: var(--panel-2); border: 2px solid transparent; color: var(--text); min-height: 44px;
}
.types img { width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; display: block; margin-bottom: 4px; }
.types b, .types small { padding: 0 10px; }
.types b { font-size: var(--t-s); }
.types small { font-size: var(--t-xs); color: var(--text-3); }
.types button[aria-pressed="true"] { border-color: var(--signal); }
.types .types__other { grid-column: 1 / -1; padding: 12px 0; }
.types__ph {
  display: grid; place-items: center; aspect-ratio: 3 / 2; margin-bottom: 4px;
  background: linear-gradient(180deg, #e9ebee 0 58%, #1c2633 58% 72%, #e9ebee 72%);
  color: #d7262e; font-weight: 800; font-size: var(--t-m); letter-spacing: .04em;
}
.privacy p + p { margin-top: 8px; }
.privacy a { color: var(--link); }
.foot__links { display: flex; flex-wrap: wrap; align-items: center; column-gap: 16px; justify-content: space-between; }
.foot__links .link { gap: 6px; }
.foot__links .link[aria-expanded="true"] { color: var(--text); }
.foot__bottom { padding-top: 10px; border-top: 1px solid var(--hair); }
/* tall sheets (report with photos) must scroll inside, not get cut off */
.sheet { overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
#report > *, #accuracy > * { flex-shrink: 0; }
#picker { overflow: hidden; height: 88dvh; }
#picker .stations { min-height: 0; flex: 1 1 auto; overflow-y: auto; overscroll-behavior: contain; }
/* report: answer first, optional details, send button stays reachable */
.answer[aria-checked="true"] { outline: 2px solid var(--signal); outline-offset: -2px; background: var(--panel-2); }
.opt { margin: 4px 0 -6px; font-size: var(--t-xs); color: var(--text-3); text-transform: uppercase; letter-spacing: .06em; }
.send {
  position: sticky; bottom: calc(-20px - env(safe-area-inset-bottom)); margin: 0 calc(-1 * var(--gutter));
  padding: 12px var(--gutter) calc(14px + env(safe-area-inset-bottom)); background: var(--panel);
  border-top: 1px solid var(--hair); display: grid; gap: 8px;
}
.send .pill:disabled { opacity: .35; }
.send #rep-msg:empty { display: none; }
/* direction of travel above the car bar: car 1 (left) is the front */
.dir { display: flex; align-items: center; gap: 6px; margin: 0 0 8px; font-size: var(--t-xs); color: var(--text-3); }
.dir .ico { transform: scaleX(-1); }
.install { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 14px; }
.install__btns { display: flex; gap: 16px; }
/* elements with their own display (flex/grid) must still disappear when [hidden] */
[hidden] { display: none !important; }
