/* ShareARide web — design tokens drawn from the logo (coral #F98475, teal #429588). */
:root {
  --coral: #f47b6b;
  --coral-soft: #fde9e5;
  --teal: #2f7d71;
  --teal-strong: #23655b;
  --teal-soft: #e3f1ee;
  --ink: #142824;
  --ink-2: #3d504c;
  --muted: #6b7a76;
  --bg: #ffffff;
  --surface: #ffffff;
  --surface-2: #f4f6f5;
  --line: #e4e8e6;
  --ok: #1f8a5b;
  --ok-soft: #e1f4ea;
  --warn: #b26a00;
  --warn-soft: #fff1d9;
  --danger: #c43d2f;
  --danger-soft: #fce8e5;
  --info: #2f62c4;
  --info-soft: #e5edfb;

  --radius: 16px;
  --radius-sm: 10px;
  --shadow-sm: 0 1px 2px rgba(20, 40, 36, 0.06);
  --shadow: 0 1px 2px rgba(20, 40, 36, 0.04), 0 8px 24px rgba(20, 40, 36, 0.07);
  --shadow-lg: 0 2px 6px rgba(20, 40, 36, 0.05), 0 24px 60px rgba(20, 40, 36, 0.12);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --nav-h: 68px;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
#root { flex: 1; display: flex; flex-direction: column; }
h1, h2, h3 { line-height: 1.15; letter-spacing: -0.02em; margin: 0 0 0.4em; }
h1 { font-size: clamp(1.75rem, 3.5vw, 2.4rem); font-weight: 800; }
h2 { font-size: clamp(1.3rem, 2.4vw, 1.6rem); font-weight: 750; }
h3 { font-size: 1.1rem; font-weight: 700; }
p { margin: 0 0 1em; }
a { color: var(--teal); text-decoration: none; font-weight: 600; }
a:hover { color: var(--teal-strong); }
img { max-width: 100%; display: block; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--teal) 45%, transparent); outline-offset: 2px; border-radius: 8px; }

.container { width: 100%; max-width: 1140px; margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 760px; }
.page { padding-top: 28px; padding-bottom: 72px; }
.muted { color: var(--muted); }
.small { font-size: 0.875rem; }
.mono { font-family: ui-monospace, 'SF Mono', Menlo, monospace; letter-spacing: 0.02em; }
.ta-right { text-align: right; }
.text-warn { color: var(--warn); font-weight: 600; }
.eyebrow { text-transform: uppercase; letter-spacing: 0.12em; font-size: 0.75rem; font-weight: 700; color: var(--coral); margin: 0 0 8px; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.row-end { display: flex; justify-content: flex-end; }
.row-between { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.icon { flex-shrink: 0; }
hr { border: 0; border-top: 1px solid var(--line); margin: 16px 0; }

/* Route transition */
/* backwards (not both): a retained transform would trap position:fixed children like .mobilebar */
.view { flex: 1; animation: routeIn 0.45s var(--ease) backwards; }
.view:has(.mobilebar) { animation-name: fadeIn; }
@keyframes routeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes fadeIn { from { opacity: 0; } }
.reveal { animation: routeIn 0.6s var(--ease) both; animation-delay: var(--d, 0ms); }

/* ---------- Splash ---------- */
.splash {
  position: fixed; inset: 0; z-index: 1000;
  display: grid; place-items: center;
  background: var(--bg);
  transition: opacity 0.5s var(--ease), visibility 0.5s;
}
.splash--leaving { opacity: 0; visibility: hidden; }
.splash--leaving .splash__inner { transform: scale(1.04); }
.splash__inner { position: relative; display: flex; flex-direction: column; align-items: center; gap: 14px; transition: transform 0.5s var(--ease); }
.splash__mark { width: 92px; height: 92px; color: var(--coral); animation: pop 0.7s var(--ease) both; }
.splash__s { stroke-dasharray: 220; stroke-dashoffset: 220; animation: draw 0.9s 0.25s var(--ease) forwards; }
@keyframes pop { from { transform: scale(0.4) rotate(-20deg); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes draw { to { stroke-dashoffset: 0; } }
.splash__word { font-size: 2.1rem; font-weight: 800; letter-spacing: -0.03em; color: #429588; animation: routeIn 0.6s 0.35s var(--ease) both; }
.splash__word span { color: var(--coral); }
.splash__road { width: 160px; height: 4px; border-radius: 4px; background: var(--line); overflow: hidden; animation: routeIn 0.5s 0.5s var(--ease) both; }
.splash__road span { display: block; height: 100%; width: 40%; border-radius: 4px; background: linear-gradient(90deg, var(--teal), var(--coral)); animation: drive 1.1s ease-in-out infinite; }
@keyframes drive { from { transform: translateX(-100%); } to { transform: translateX(260%); } }
.splash__tag { margin: 0; color: var(--muted); font-size: 0.9rem; animation: routeIn 0.5s 0.6s var(--ease) both; }

/* ---------- Buttons & inputs ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 18px; border-radius: 12px;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  font-weight: 700; font-size: 0.95rem; cursor: pointer; white-space: nowrap;
  transition: transform 0.15s var(--ease), background 0.2s, box-shadow 0.2s, border-color 0.2s, color 0.2s;
}
.btn:hover:not(:disabled) { border-color: color-mix(in srgb, var(--ink) 25%, var(--line)); }
.btn:active:not(:disabled) { transform: scale(0.97); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn--primary { background: var(--teal); border-color: var(--teal); color: #fff; box-shadow: var(--shadow-sm); }
.btn--primary:hover:not(:disabled) { background: var(--teal-strong); border-color: var(--teal-strong); color: #fff; }
.btn--danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn--danger-ghost { background: transparent; border-color: color-mix(in srgb, var(--danger) 35%, transparent); color: var(--danger); }
.btn--danger-ghost:hover:not(:disabled) { background: var(--danger-soft); border-color: var(--danger); }
.btn--ghost { background: transparent; }
.btn--ghost:hover:not(:disabled) { background: var(--surface-2); }
.btn--light { background: #fff; color: var(--teal-strong); border-color: #fff; }
.btn--lg { min-height: 52px; padding: 0 24px; font-size: 1rem; border-radius: 14px; }
.btn--sm { min-height: 36px; padding: 0 14px; font-size: 0.875rem; border-radius: 10px; }
.btn--block { width: 100%; }
.linkbtn { background: none; border: 0; padding: 0; color: var(--teal); font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; gap: 4px; }
.linkbtn:disabled { color: var(--muted); cursor: default; }

.field { display: flex; flex-direction: column; gap: 6px; }
.field__label { font-size: 0.8rem; font-weight: 700; color: var(--ink-2); letter-spacing: 0.01em; }
.field__hint { font-size: 0.8rem; color: var(--muted); margin: 0; }
.field__error { font-size: 0.8rem; color: var(--danger); margin: 0; font-weight: 600; }
.input {
  width: 100%; min-height: 48px; padding: 0 14px;
  border: 1.5px solid var(--line); border-radius: 12px;
  background: var(--surface); color: var(--ink); font: inherit;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.input:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 4px color-mix(in srgb, var(--teal) 15%, transparent); }
.has-error .input { border-color: var(--danger); }
.input-wrap { position: relative; display: flex; }
.input-wrap .input { padding-right: 64px; }
.input-wrap__btn { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); background: none; border: 0; color: var(--teal); font-weight: 700; font-size: 0.8rem; padding: 8px; cursor: pointer; }
.input-wrap--prefix .input { padding-left: 62px; padding-right: 14px; }
.input-wrap__prefix { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); font-weight: 600; pointer-events: none; }
.otp { text-align: center; font-size: 1.8rem; letter-spacing: 0.5em; font-weight: 700; min-height: 64px; padding-left: 0.5em; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-grid > :first-child:nth-last-child(odd) { grid-column: 1 / -1; }
.form-error { color: var(--danger); font-size: 0.875rem; font-weight: 600; margin: 0; }

.spinner { width: 20px; height: 20px; border-radius: 50%; border: 2.5px solid currentColor; border-right-color: transparent; display: inline-block; animation: spin 0.7s linear infinite; opacity: 0.85; }
@keyframes spin { to { transform: rotate(360deg); } }
.page-loader { display: grid; place-items: center; min-height: 40vh; color: var(--teal); }
.page-loader .spinner { width: 32px; height: 32px; }

.badge { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 999px; font-size: 0.75rem; font-weight: 700; white-space: nowrap; }
.badge--ok { background: var(--ok-soft); color: var(--ok); }
.badge--warn { background: var(--warn-soft); color: var(--warn); }
.badge--danger { background: var(--danger-soft); color: var(--danger); }
.badge--info { background: var(--info-soft); color: var(--info); }
.badge--muted { background: var(--surface-2); color: var(--muted); }

.alert { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; font-size: 0.9rem; font-weight: 600; margin-bottom: 16px; animation: routeIn 0.3s var(--ease); }
.stack > .alert { margin-bottom: 0; }
.alert--danger { background: var(--danger-soft); color: var(--danger); }
.alert--ok { background: var(--ok-soft); color: var(--ok); }
.note { display: flex; gap: 10px; align-items: center; padding: 12px 14px; border-radius: 12px; background: var(--teal-soft); color: var(--ink-2); font-size: 0.9rem; margin: 0 0 20px; }
.note--warn { background: var(--warn-soft); color: var(--warn); font-weight: 600; margin: 16px 0 0; }

/* ---------- Nav ---------- */
.nav { position: sticky; top: 0; z-index: 50; height: var(--nav-h); background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: saturate(1.6) blur(14px); -webkit-backdrop-filter: saturate(1.6) blur(14px); border-bottom: 1px solid transparent; transition: border-color 0.25s, box-shadow 0.25s; }
.nav--scrolled { border-bottom-color: var(--line); box-shadow: var(--shadow-sm); }
.nav__inner { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.nav__brand img { height: 30px; width: auto; }
.nav__links { display: flex; align-items: center; gap: 6px; }
.nav__links > a:not(.btn), .nav__logout { padding: 8px 12px; border-radius: 10px; color: var(--ink-2); font-weight: 600; font-size: 0.95rem; white-space: nowrap; transition: background 0.2s, color 0.2s; }
.nav__links > a:not(.btn):hover, .nav__logout:hover { background: var(--surface-2); color: var(--ink); }
.nav__links > a.active:not(.btn) { color: var(--teal); background: var(--teal-soft); }
.nav__account { display: inline-flex; align-items: center; gap: 8px; }
.nav__logout { background: none; border: 0; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.nav__toggle { display: none; background: none; border: 0; padding: 8px; cursor: pointer; border-radius: 10px; }
.avatar { width: 28px; height: 28px; border-radius: 50%; display: inline-grid; place-items: center; background: var(--coral); color: #fff; font-weight: 800; font-size: 0.8rem; text-transform: uppercase; }
.avatar--lg { width: 64px; height: 64px; font-size: 1.6rem; }

/* ---------- Hero / home ---------- */
.hero { position: relative; padding: 56px 0 40px; }
@keyframes dash { to { stroke-dashoffset: -800; } }
.hero__inner { position: relative; }
.hero h1 { font-size: clamp(2.2rem, 5.5vw, 3.4rem); max-width: 14ch; }
.hero__lead { font-size: clamp(1rem, 1.6vw, 1.1rem); color: var(--muted); max-width: 46ch; margin-bottom: 28px; }
.hero__card { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 22px; }

.search { display: grid; grid-template-columns: minmax(0, 2.2fr) minmax(0, 1fr) auto; gap: 14px; align-items: end; position: relative; }
.search__places { display: grid; grid-template-columns: 1fr auto 1fr; gap: 8px; align-items: end; }
.search__swap { width: 40px; height: 40px; margin-bottom: 4px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); display: grid; place-items: center; cursor: pointer; color: var(--teal); transition: transform 0.4s var(--ease), background 0.2s; }
.search__swap:hover { background: var(--teal-soft); }
.search__swap.is-spun { transform: rotate(180deg); }
.search__date { position: relative; display: flex; flex-direction: column; gap: 6px; }
.search__date .chips { position: absolute; top: calc(100% + 8px); left: 0; }
.search__go { height: 52px; }
.search__error { grid-column: 1 / -1; }
.search:not(.search--compact) { padding-bottom: 34px; }
.place { position: relative; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.place.is-open { z-index: 30; }
.place__control { display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 0 14px; border: 1.5px solid var(--line); border-radius: 14px; background: var(--surface); color: var(--muted); transition: border-color 0.2s, box-shadow 0.2s; }
.place__control:focus-within { border-color: var(--teal); box-shadow: 0 0 0 4px color-mix(in srgb, var(--teal) 15%, transparent); color: var(--teal); }
.place__control input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font: inherit; font-weight: 600; color: var(--ink); height: 48px; }
.place__control input::placeholder { color: color-mix(in srgb, var(--muted) 70%, transparent); font-weight: 500; }
.place__list { position: absolute; z-index: 20; top: calc(100% + 6px); left: 0; right: 0; margin: 0; padding: 6px; list-style: none; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-lg); max-height: 300px; overflow: auto; animation: pop-in 0.18s var(--ease); }
@keyframes pop-in { from { opacity: 0; transform: translateY(-4px) scale(0.98); } }
.place__list--up { top: auto; box-shadow: 0 -8px 30px rgba(20, 40, 36, 0.12); }
.place__list li { display: flex; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 10px; cursor: pointer; font-weight: 600; color: var(--ink-2); }
.place__list li .icon { color: var(--muted); }
.place__list li.is-active { background: var(--teal-soft); color: var(--ink); }
.place__list li.place__head { position: sticky; top: -6px; z-index: 1; margin: -6px -6px 4px; padding: 10px 18px 8px; border-radius: 14px 14px 0 0; background: var(--surface); border-bottom: 1px solid var(--line); font-size: 0.75rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); cursor: default; }
.place__list li.place__empty { color: var(--muted); font-weight: 500; cursor: default; }
.chips { display: flex; gap: 6px; }
.chip { border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 4px 12px; font-size: 0.8rem; font-weight: 600; cursor: pointer; color: var(--ink-2); transition: all 0.2s; }
.chip.is-active { background: var(--ink); border-color: var(--ink); color: var(--bg); }

/* The divider is drawn inside the padding so it lines up with the content, not the container edge. */
.section { padding: 0 20px 44px; }
.section::before { content: ''; display: block; border-top: 1px solid var(--line); margin-bottom: 40px; }
.section__head { margin-bottom: 22px; }
.section__head p { color: var(--muted); margin: 0; }

.routes { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.route { display: flex; flex-direction: column; gap: 14px; padding: 20px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); color: var(--ink); transition: transform 0.25s var(--ease), box-shadow 0.25s, border-color 0.25s; }
.route:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: transparent; color: var(--ink); }
.route__ends { display: flex; align-items: center; gap: 10px; font-weight: 750; font-size: 1.05rem; }
.route__line { flex: 1; height: 2px; min-width: 20px; background: repeating-linear-gradient(90deg, var(--coral) 0 6px, transparent 6px 11px); position: relative; }
.route__line::before, .route__line::after { content: ''; position: absolute; top: -3px; width: 8px; height: 8px; border-radius: 50%; border: 2px solid var(--coral); background: var(--surface); }
.route__line::before { left: -4px; } .route__line::after { right: -4px; background: var(--coral); }
.route__meta { display: flex; align-items: center; gap: 14px; color: var(--muted); font-size: 0.85rem; font-weight: 600; }
.route__meta span { display: inline-flex; align-items: center; gap: 5px; }
.route__go { margin-left: auto; color: var(--teal); transition: transform 0.25s var(--ease); }
.route:hover .route__go { transform: translateX(4px); }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.step { position: relative; }
.step__icon { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--teal-soft); color: var(--teal); margin-bottom: 14px; }
.step__n { display: none; }
.step p { color: var(--muted); margin: 0; font-size: 0.95rem; }

.cta { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 28px; border-radius: var(--radius); background: var(--surface-2); color: var(--ink); }
.cta h2 { font-size: 1.25rem; } .cta p { color: var(--muted); margin: 0; }
.cta .btn--light { background: var(--teal); border-color: var(--teal); color: #fff; }
.cta .btn--light:hover { background: var(--teal-strong); border-color: var(--teal-strong); color: #fff; }
.quicklink { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 18px; border: 1px solid var(--line); border-radius: var(--radius); color: var(--ink); font-weight: 500; }
.quicklink strong { font-weight: 700; }
.quicklink > .icon { color: var(--teal); }
.quicklink:hover { color: var(--ink); border-color: color-mix(in srgb, var(--teal) 40%, var(--line)); }
.refine-btn { display: none; }

.promos { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 14px; }
.promo { display: flex; gap: 14px; align-items: flex-start; padding: 16px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); color: var(--ink); min-width: 0; }
.promo--link { transition: border-color 0.2s, transform 0.2s var(--ease); }
.promo--link:hover { color: var(--ink); border-color: color-mix(in srgb, var(--teal) 40%, var(--line)); transform: translateY(-2px); }
.promo__img { width: 72px; height: 72px; flex: none; border-radius: 12px; object-fit: cover; background: var(--surface-2); }
.promo__icon { width: 48px; height: 48px; flex: none; display: grid; place-items: center; border-radius: 12px; background: var(--coral-soft); color: var(--coral); }
.promo__text { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.promo__text strong { font-size: 1rem; }
.promo__text span { font-size: 0.875rem; color: var(--ink-2); }
.promo__text .promo__cta { display: inline-flex; align-items: center; gap: 4px; margin-top: 6px; font-weight: 700; color: var(--teal); }
.promos-bar { margin-bottom: 16px; }
.promo__text .promo__route { display: inline-flex; align-items: center; gap: 4px; flex-wrap: wrap; margin: 2px 0; color: var(--teal); font-weight: 700; font-size: 0.8rem; }
.promo-group { margin-bottom: 28px; }
.promo-group:not([hidden]) ~ .promo-group { padding-top: 28px; border-top: 1px solid var(--line); }
.promo-group > h2 { font-size: 1.15rem; margin: 0 0 14px; }
.deal__cta { font-size: 0.85rem; font-weight: 700; color: var(--teal); }
.promos--compact .promo { padding: 12px 14px; }
.promos--compact .promo__img { width: 52px; height: 52px; }
.promos--compact .promo__icon { width: 40px; height: 40px; }
#book { scroll-margin-top: calc(var(--nav-h) + 16px); }
.price-off { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 999px; background: var(--ok-soft); color: var(--ok); font-size: 0.75rem; font-weight: 700; }
.summary__discount dt, .summary__discount dd { color: var(--ok); font-weight: 600; }
.summary__discount dt { display: inline-flex; align-items: center; gap: 4px; }

/* ---------- Results ---------- */
.results-head { background: var(--surface); border-bottom: 1px solid var(--line); padding: 18px 0; }
.daybar { display: flex; gap: 8px; overflow-x: auto; padding: 20px 0 6px; scrollbar-width: none; }
.daybar::-webkit-scrollbar { display: none; }
.daybar__day { flex: 0 0 auto; display: flex; flex-direction: column; align-items: center; min-width: 84px; padding: 8px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; transition: all 0.2s var(--ease); }
.daybar__day span { font-size: 0.75rem; color: var(--muted); font-weight: 600; }
.daybar__day strong { font-size: 0.9rem; }
.daybar__day.is-active { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.daybar__day.is-active span { color: color-mix(in srgb, var(--bg) 70%, transparent); }
.results-bar { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin: 18px 0 20px; padding-bottom: 18px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.results-title { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: clamp(1.4rem, 3vw, 1.9rem); margin: 0 0 2px; }
.results-title .icon { color: var(--coral); }
.results-bar p { margin: 0; }
.segmented { display: inline-flex; padding: 4px; border-radius: 12px; background: var(--surface-2); }
.segmented button { border: 0; background: none; padding: 8px 14px; border-radius: 9px; font-weight: 700; font-size: 0.85rem; cursor: pointer; color: var(--muted); transition: all 0.2s; }
.segmented button.is-active { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm); }

.trips { display: flex; flex-direction: column; gap: 12px; }
.trip { display: grid; grid-template-columns: 110px 1fr auto auto; gap: 20px; align-items: center; padding: 20px 22px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); animation: routeIn 0.5s var(--ease) both; animation-delay: calc(var(--i, 0) * 50ms); transition: box-shadow 0.25s, transform 0.25s var(--ease), border-color 0.25s; }
.trip:hover:not(.trip--full) { box-shadow: var(--shadow); border-color: transparent; transform: translateY(-2px); }
.trip--full { opacity: 0.6; }
.trip__time strong { display: block; font-size: 1.5rem; font-weight: 800; letter-spacing: -0.02em; }
.trip__time span { font-size: 0.85rem; }
.trip__op { font-weight: 750; margin-bottom: 4px; }
.trip__meta { display: flex; flex-wrap: wrap; gap: 6px 14px; color: var(--muted); font-size: 0.85rem; }
.trip__meta span, .trip__seats span { display: inline-flex; align-items: center; gap: 5px; }
.trip__seats { font-size: 0.875rem; color: var(--ink-2); }
.trip__buy { display: flex; align-items: center; gap: 16px; }
.trip__price { font-size: 1.35rem; font-weight: 800; }
.trip__fare { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.trip__fare s { font-size: 0.875rem; margin-right: 6px; }
.skeleton { min-height: 96px; background: linear-gradient(90deg, var(--surface) 0%, var(--surface-2) 50%, var(--surface) 100%); background-size: 200% 100%; animation: shimmer 1.3s ease-in-out infinite; border: 1px solid var(--line); border-radius: var(--radius); }
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: -100% 0; } }

.empty { text-align: center; padding: 56px 20px; }
.empty__icon { width: 64px; height: 64px; border-radius: 20px; margin: 0 auto 16px; display: grid; place-items: center; background: var(--teal-soft); color: var(--teal); }
.empty p { color: var(--muted); max-width: 40ch; margin: 0 auto 20px; }

/* ---------- Checkout ---------- */
.backlink { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-weight: 600; margin-bottom: 16px; }
.backlink:hover { color: var(--ink); }
.stepper { display: flex; gap: 8px; list-style: none; padding: 0; margin: 0 0 24px; }
.stepper li { flex: 1; }
.stepper button { width: 100%; display: flex; align-items: center; gap: 10px; padding: 0 0 12px; background: none; border: 0; border-bottom: 3px solid var(--line); font-weight: 700; color: var(--muted); cursor: default; text-align: left; transition: border-color 0.3s, color 0.3s; }
.stepper .is-current button { border-color: var(--teal); color: var(--ink); }
.stepper .is-done button { border-color: var(--teal); color: var(--teal); cursor: pointer; }
.stepper__dot { width: 26px; height: 26px; border-radius: 50%; display: inline-grid; place-items: center; font-size: 0.8rem; background: var(--surface-2); flex-shrink: 0; }
.stepper .is-current .stepper__dot, .stepper .is-done .stepper__dot { background: var(--teal); color: #fff; }
.checkout__grid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 24px; align-items: start; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 26px; margin-bottom: 20px; }
.panel__head { margin-bottom: 20px; } .panel__head p { margin: 0; }
.panel__title { font-size: 1.15rem; margin: 0; }
.panel__actions { display: flex; justify-content: space-between; gap: 12px; margin-top: 26px; padding-top: 20px; border-top: 1px solid var(--line); }
.panel__actions > :only-child { margin-left: auto; }
.step-panel { animation: routeIn 0.4s var(--ease) both; }

.coach { max-width: 340px; margin: 0 auto; padding: 18px 20px 20px; border: 2px solid var(--line); border-radius: 40px 40px 18px 18px; background: var(--bg); }
.coach__front { display: flex; justify-content: space-between; font-size: 0.75rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; padding: 4px 6px 14px; margin-bottom: 14px; border-bottom: 2px dashed var(--line); }
.coach__wheel { display: inline-flex; gap: 4px; align-items: center; }
.coach__grid { display: flex; flex-direction: column; gap: 10px; }
.coach__row { display: grid; grid-template-columns: 1fr 1fr 22px 1fr 1fr; gap: 10px; }
.coach--5, .coach--6 { max-width: 400px; }
.coach--5 .coach__row, .coach--6 .coach__row { gap: 8px; }
.seat { aspect-ratio: 1; border-radius: 10px 10px 6px 6px; border: 1.5px solid var(--line); background: var(--surface); font-weight: 700; font-size: 0.8rem; display: grid; place-items: center; cursor: pointer; color: var(--ink-2); transition: transform 0.15s var(--ease), background 0.2s, border-color 0.2s, color 0.2s; }
.seat--free:hover:not(:disabled) { border-color: var(--teal); color: var(--teal); transform: translateY(-2px); }
.seat--selected { background: var(--coral); border-color: var(--coral); color: #fff; animation: seatPop 0.3s var(--ease); }
@keyframes seatPop { 50% { transform: scale(1.12); } }
.seat--taken, .seat--blocked { background: var(--surface-2); color: color-mix(in srgb, var(--muted) 50%, transparent); cursor: not-allowed; border-color: transparent; }
.seat--blocked { background-image: repeating-linear-gradient(45deg, transparent 0 4px, var(--line) 4px 6px); }
.seat:disabled.seat--free { opacity: 0.45; cursor: not-allowed; }
.seat--ghost { visibility: hidden; }
.legend { display: flex; justify-content: center; gap: 16px; margin-top: 18px; font-size: 0.8rem; color: var(--muted); font-weight: 600; flex-wrap: wrap; }
.legend span { display: inline-flex; gap: 6px; align-items: center; }
.legend .seat { width: 16px; height: 16px; aspect-ratio: auto; border-radius: 4px; display: inline-block; animation: none; cursor: default; }

.methods { display: grid; gap: 10px; }
.method, .insure { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 14px; border: 1.5px solid var(--line); cursor: pointer; transition: border-color 0.2s, background 0.2s; }
.method input, .insure input { position: absolute; opacity: 0; pointer-events: none; }
.method:hover, .insure:hover { border-color: color-mix(in srgb, var(--teal) 40%, var(--line)); }
.method.is-active, .insure.is-active { border-color: var(--teal); background: var(--teal-soft); }
.method:has(input:focus-visible), .insure:has(input:focus-visible) { outline: 3px solid color-mix(in srgb, var(--teal) 45%, transparent); }
.method__icon, .insure__icon { width: 40px; height: 40px; border-radius: 12px; background: var(--surface-2); display: grid; place-items: center; color: var(--teal); flex-shrink: 0; }
.method.is-active .method__icon { background: var(--surface); }
.method__text, .insure > span:nth-of-type(2) { flex: 1; display: flex; flex-direction: column; }
.method small, .insure small { color: var(--muted); font-size: 0.8rem; }
.method__radio { width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--line); transition: all 0.2s; }
.method.is-active .method__radio { border: 6px solid var(--teal); }
.insure { margin-top: 18px; }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.paybox { margin-top: 16px; padding: 18px; border-radius: 14px; background: var(--surface-2); display: grid; gap: 14px; }
.paybox h3 { margin: 0; font-size: 1.05rem; }
.paybox > p { margin: 0; font-size: 0.9rem; }
.paybox .note { margin: 0; }
.accounts { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; }
.account { display: grid; align-content: start; gap: 10px; padding: 14px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--surface); cursor: pointer; transition: border-color 0.2s; }
.account input { position: absolute; opacity: 0; pointer-events: none; }
.account:hover { border-color: color-mix(in srgb, var(--teal) 40%, var(--line)); }
.account.is-active { border-color: var(--teal); }
.account:has(input:focus-visible) { outline: 3px solid color-mix(in srgb, var(--teal) 45%, transparent); }
.account__head { display: flex; align-items: center; gap: 10px; }
.account__head strong { flex: 1; }
.account__head .method__icon { width: 34px; height: 34px; background: var(--surface-2); }
.account__head .method__radio { flex: none; }
.account.is-active .method__radio { border: 6px solid var(--teal); }
.account__fields { margin: 0; display: grid; gap: 8px; font-size: 0.9rem; }
.account__fields dt { color: var(--muted); font-size: 0.75rem; }
.account__fields dd { margin: 0; display: flex; justify-content: space-between; align-items: center; gap: 6px; font-weight: 700; }
.account__fields dd span { min-width: 0; overflow-wrap: break-word; }
.copy-btn { display: inline-grid; place-items: center; width: 28px; height: 28px; flex: none; border: 0; border-radius: 8px; background: none; color: var(--teal); cursor: pointer; }
.copy-btn:hover { background: var(--teal-soft); }
.proof { display: grid; gap: 12px; }
.proof__drop { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 12px; border: 1.5px dashed color-mix(in srgb, var(--teal) 45%, var(--line)); background: var(--surface); cursor: pointer; }
.proof__drop:hover, .proof:has(input:focus-visible) .proof__drop { border-color: var(--teal); }
.proof__drop > span:nth-child(2) { display: grid; gap: 2px; flex: 1; min-width: 0; }
.proof__drop strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.proof__drop small { font-size: 0.8rem; }
.proof__icon { width: 40px; height: 40px; flex: none; display: grid; place-items: center; border-radius: 10px; background: var(--teal-soft); color: var(--teal); }
.proof.has-file .proof__drop { border-style: solid; border-color: var(--teal); }
.proof.has-file .proof__icon { background: var(--teal); color: #fff; }
.ticket__pay { padding: 0 26px 24px; }
.ticket__pay .paybox, [data-proof-slot] .paybox { margin: 0; }
[data-confirmation] > [data-proof-slot] .paybox { margin-top: 24px; }
.insure__icon { color: var(--coral); }
.switch { width: 42px; height: 24px; border-radius: 999px; background: var(--line); position: relative; flex-shrink: 0; transition: background 0.25s; }
.switch::after { content: ''; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: var(--shadow-sm); transition: transform 0.25s var(--ease); }
.insure.is-active .switch { background: var(--teal); }
.insure.is-active .switch::after { transform: translateX(18px); }

.summary { position: sticky; top: calc(var(--nav-h) + 20px); }
.summary__card { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 22px; box-shadow: var(--shadow); }
.summary__route { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.summary__route > div { display: flex; flex-direction: column; }
.summary__route strong { font-size: 1.3rem; font-weight: 800; }
.summary__route span { font-weight: 600; color: var(--ink-2); }
.summary__dash { flex: 1; display: flex; justify-content: center; align-items: center; color: var(--coral); background: linear-gradient(var(--line), var(--line)) center / 100% 2px no-repeat; }
.summary__dash .icon { background: var(--surface); padding: 0 6px; box-sizing: content-box; }
.facilities { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.facilities span { font-size: 0.75rem; font-weight: 600; padding: 3px 9px; border-radius: 999px; background: var(--surface-2); color: var(--ink-2); }
.summary__lines { margin: 0; display: flex; flex-direction: column; gap: 10px; }
.summary__lines div, .kv div { display: flex; justify-content: space-between; gap: 12px; }
.summary__lines dt, .kv dt { color: var(--muted); font-size: 0.9rem; }
.summary__lines dd, .kv dd { margin: 0; font-weight: 600; text-align: right; }
.summary__total { display: flex; justify-content: space-between; align-items: baseline; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); }
.summary__total strong { font-size: 1.6rem; font-weight: 800; letter-spacing: -0.02em; }
.mobilebar { display: none; }

/* ---------- Tickets ---------- */
.success { text-align: center; margin: 12px 0 28px; }
.success__check { width: 76px; height: 76px; margin: 0 auto 16px; }
.success__check circle { fill: var(--ok-soft); stroke: var(--ok); stroke-width: 2.5; stroke-dasharray: 160; stroke-dashoffset: 160; animation: drawc 0.6s var(--ease) forwards; }
.success__check path { fill: none; stroke: var(--ok); stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 40; stroke-dashoffset: 40; animation: drawc 0.4s 0.45s var(--ease) forwards; }
@keyframes drawc { to { stroke-dashoffset: 0; } }
.ticket { background: var(--surface); border: 1px solid var(--line); border-radius: 22px; box-shadow: var(--shadow); overflow: hidden; animation: routeIn 0.5s 0.15s var(--ease) both; }
.ticket__top { padding: 24px 26px 20px; }
.ticket__top h2 { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 0 0 4px; }
.ticket__top h2 .icon { color: var(--coral); }
.ticket__top p { margin: 0; }
.ticket__tear { position: relative; height: 0; border-top: 2px dashed var(--line); margin: 0 18px; }
.ticket__tear::before, .ticket__tear::after { content: ''; position: absolute; top: -13px; width: 24px; height: 24px; border-radius: 50%; background: var(--bg); border: 1px solid var(--line); }
.ticket__tear::before { left: -32px; } .ticket__tear::after { right: -32px; }
.ticket__refs { list-style: none; margin: 0; padding: 12px 26px; }
.ticket__refs li { display: flex; justify-content: space-between; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.ticket__refs li:last-child { border-bottom: 0; }
.ticket__refs li > div { display: flex; flex-direction: column; gap: 2px; align-items: flex-start; }
.ref { display: inline-flex; align-items: center; gap: 8px; background: none; border: 0; padding: 0; cursor: pointer; font-family: ui-monospace, 'SF Mono', Menlo, monospace; font-weight: 700; font-size: 1.05rem; color: var(--ink); }
.ref .icon { color: var(--muted); }
.ticket__foot { display: flex; justify-content: space-between; align-items: center; padding: 16px 26px; background: var(--surface-2); font-weight: 600; }
.ticket__foot strong { font-size: 1.3rem; }
.actions-row { display: flex; gap: 12px; justify-content: center; margin-top: 28px; flex-wrap: wrap; }

.ticket--full { animation-delay: 0s; }
.ticket--void { opacity: 0.75; }
.ticket--void .ticket__journey strong { text-decoration: line-through; text-decoration-color: var(--danger); }
.ticket__brand { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; }
.ticket__brand img { height: 22px; width: auto; }
.ticket__journey { display: flex; align-items: center; gap: 14px; }
.ticket__journey > div { display: flex; flex-direction: column; }
.ticket__journey strong { font-size: 1.6rem; font-weight: 800; letter-spacing: -0.02em; }
.ticket__journey span { font-weight: 600; color: var(--ink-2); }
.ticket__line { flex: 1; display: flex; justify-content: center; color: var(--coral); background: linear-gradient(var(--line), var(--line)) center / 100% 2px no-repeat; }
.ticket__line .icon { background: var(--surface); padding: 0 8px; box-sizing: content-box; }
.ticket__body { padding: 20px 26px 24px; }
.ticket__ref { width: 100%; display: grid; grid-template-columns: 1fr auto; text-align: left; gap: 2px 12px; align-items: center; padding: 14px 16px; margin-bottom: 18px; border-radius: 14px; border: 1.5px dashed color-mix(in srgb, var(--teal) 40%, var(--line)); background: var(--teal-soft); cursor: pointer; }
.ticket__ref small { grid-column: 1; color: var(--muted); font-weight: 600; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.08em; }
.ticket__ref span { grid-column: 1; font-family: ui-monospace, 'SF Mono', Menlo, monospace; font-weight: 800; font-size: 1.25rem; letter-spacing: 0.03em; }
.ticket__ref .icon { grid-column: 2; grid-row: 1 / 3; color: var(--teal); }
.kv { margin: 0; display: flex; flex-direction: column; gap: 10px; }
.kv__total { padding-top: 12px; border-top: 1px solid var(--line); }
.kv__total dd { font-size: 1.2rem; font-weight: 800; }
.ticket__actions { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; padding: 16px 26px; border-top: 1px solid var(--line); background: var(--surface-2); }

.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 24px; padding-bottom: 20px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.page-head:has(+ .tabs) { padding-bottom: 0; border-bottom: 0; margin-bottom: 16px; }
.page-head h1 { margin: 0; }
.page-head p { margin: 4px 0 0; }
.profile-head { display: flex; align-items: center; gap: 16px; }
.profile-head p { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 20px; overflow-x: auto; scrollbar-width: none; }
.tabs button { position: relative; background: none; border: 0; padding: 12px 14px; font-weight: 700; color: var(--muted); cursor: pointer; display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.tabs button::after { content: ''; position: absolute; left: 10px; right: 10px; bottom: -1px; height: 3px; border-radius: 3px 3px 0 0; background: var(--teal); transform: scaleX(0); transition: transform 0.3s var(--ease); }
.tabs button:first-child { padding-left: 0; }
.tabs button:first-child::after { left: 0; }
.tabs button.is-active { color: var(--ink); }
.tabs button.is-active::after { transform: scaleX(1); }
.tabs__count { font-size: 0.75rem; padding: 1px 8px; border-radius: 999px; background: var(--surface-2); color: var(--muted); }
.list { display: flex; flex-direction: column; gap: 10px; }
.list__item { animation: routeIn 0.45s var(--ease) both; animation-delay: calc(var(--i, 0) * 45ms); }

.tcard { display: grid; grid-template-columns: 64px 1fr auto 18px; gap: 16px; align-items: center; padding: 14px 16px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); color: var(--ink); transition: box-shadow 0.25s, transform 0.25s var(--ease), border-color 0.25s; }
.tcard.skeleton { min-height: 86px; }
.tcard:hover { color: var(--ink); box-shadow: var(--shadow); border-color: transparent; transform: translateY(-2px); }
.tcard--muted { opacity: 0.7; }
.tcard__date { display: flex; flex-direction: column; align-items: center; padding: 8px 0; border-radius: 12px; background: var(--coral-soft); line-height: 1.1; }
.tcard__date span { font-size: 0.7rem; font-weight: 700; text-transform: uppercase; color: var(--coral); }
.tcard__date strong { font-size: 1.4rem; font-weight: 800; }
.tcard__route { display: flex; align-items: center; gap: 8px; font-weight: 750; flex-wrap: wrap; }
.tcard__route .icon { color: var(--coral); }
.tcard__meta { display: flex; gap: 6px 14px; flex-wrap: wrap; color: var(--muted); font-size: 0.85rem; margin-top: 4px; }
.tcard__meta span { display: inline-flex; align-items: center; gap: 4px; }
.tcard__side { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.tcard__chev { color: var(--muted); transition: transform 0.25s var(--ease); }
.tcard:hover .tcard__chev { transform: translateX(3px); color: var(--teal); }
.lookup { display: grid; grid-template-columns: 1fr 1fr auto; gap: 14px; align-items: end; }

/* Dialog */
.dialog { border: 0; border-radius: 20px; padding: 26px; width: min(420px, calc(100vw - 32px)); background: var(--surface); color: var(--ink); box-shadow: var(--shadow-lg); }
.dialog[open] { animation: pop-in 0.25s var(--ease); }
.dialog::backdrop { background: rgba(10, 20, 18, 0.45); backdrop-filter: blur(3px); }
.dialog__body { color: var(--ink-2); margin-bottom: 22px; }
.dialog__actions { display: flex; justify-content: flex-end; gap: 10px; }

/* Toasts */
.toasts { position: fixed; z-index: 900; left: 50%; bottom: 24px; transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; width: max-content; max-width: calc(100vw - 32px); }
.toast { display: flex; gap: 10px; align-items: center; padding: 12px 18px; border-radius: 14px; background: var(--ink); color: var(--bg); font-weight: 600; font-size: 0.9rem; box-shadow: var(--shadow-lg); animation: toastIn 0.35s var(--ease); }
.toast--ok .icon { color: #6fe0a8; } .toast--danger .icon { color: #ff9b8f; }
@keyframes toastIn { from { opacity: 0; transform: translateY(12px) scale(0.96); } }

/* ---------- Auth ---------- */
.auth { flex: 1; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); min-height: 100vh; }
.auth__art { position: relative; overflow: hidden; background: linear-gradient(150deg, #23655b, #2f7d71 60%, #3a8f82); color: #fff; padding: 48px; display: flex; }
.auth__art-inner { position: relative; display: flex; flex-direction: column; width: 100%; }
.auth__logo { height: 34px; width: auto; align-self: flex-start; filter: brightness(0) invert(1); margin-bottom: auto; }
.auth__art h2 { font-size: clamp(2rem, 3.5vw, 2.8rem); color: #fff; max-width: 12ch; margin-top: 48px; }
.auth__art ul { list-style: none; padding: 0; margin: 20px 0 auto; display: flex; flex-direction: column; gap: 14px; font-weight: 600; color: rgba(255,255,255,0.9); }
.auth__art li { display: flex; gap: 12px; align-items: center; }
.auth__road { position: absolute; left: -48px; right: -48px; bottom: -48px; height: 200px; width: calc(100% + 96px); }
.auth__road path { fill: none; stroke: rgba(255,255,255,0.25); stroke-width: 2; stroke-dasharray: 10 12; animation: dash 30s linear infinite; }
.auth__main { display: grid; place-items: center; padding: 40px 24px; }
.auth__card { width: 100%; max-width: 400px; animation: routeIn 0.5s var(--ease) both; }
.auth__mobile-logo { display: inline-block; margin-bottom: 36px; }
.auth__mobile-logo img { height: 28px; width: auto; }
.auth__sub { margin-bottom: 28px; }
.auth__footer { margin-top: 28px; text-align: center; color: var(--muted); font-size: 0.9rem; }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--line); background: var(--surface-2); padding: 44px 0 28px; margin-top: auto; }
.footer__grid { display: grid; grid-template-columns: 1.6fr repeat(3, 1fr); gap: 32px; }
.footer img { height: 24px; width: auto; margin-bottom: 14px; }
.footer__brand { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.footer__brand p { color: var(--muted); font-size: 0.9rem; max-width: 34ch; margin: 0 0 6px; }
.footer__brand a { display: inline-flex; align-items: center; gap: 8px; color: var(--ink-2); font-size: 0.9rem; }
.footer nav { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.footer nav h2 { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.12em; color: var(--ink); margin: 0 0 4px; }
.footer nav a { color: var(--muted); font-weight: 600; font-size: 0.9rem; }
.footer a:hover { color: var(--teal); }
.footer__bottom { margin: 36px 0 0; padding-top: 20px; border-top: 1px solid var(--line); color: var(--muted); font-size: 0.8rem; }

/* ---------- Info pages (About, Contact, FAQ, legal) ---------- */
.page-hero { padding: 56px 0 44px; background: linear-gradient(180deg, var(--teal-soft), var(--bg)); }
.page-hero h1 { font-size: clamp(2rem, 4.5vw, 3rem); max-width: 20ch; margin: 0; }
.page-hero__lead { font-size: clamp(1rem, 1.5vw, 1.1rem); color: var(--ink-2); max-width: 58ch; margin: 14px 0 0; }

.split { display: grid; grid-template-columns: 1.2fr 1fr; gap: 40px; align-items: start; }
.split--center { align-items: center; }
.about-quote { display: flex; flex-direction: column; gap: 14px; margin: 0; background: var(--coral-soft); border-color: transparent; color: var(--coral); }
.about-quote p { margin: 0; font-size: 1.15rem; font-weight: 600; line-height: 1.5; color: var(--ink); }

.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.cards--contact { grid-template-columns: repeat(4, 1fr); }
.card { display: block; padding: 24px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.card h3 { margin-bottom: 6px; }
.card p { color: var(--muted); margin: 0; font-size: 0.95rem; font-weight: 500; }
.card__icon { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; background: var(--teal-soft); color: var(--teal); margin-bottom: 16px; }
.card--link { color: var(--ink); transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s var(--ease); }
.card--link:hover { color: var(--ink); border-color: color-mix(in srgb, var(--teal) 40%, var(--line)); box-shadow: var(--shadow); transform: translateY(-2px); }

.checklist { list-style: none; margin: 0; padding: 24px; display: grid; gap: 14px; border-radius: var(--radius); background: var(--surface-2); }
.checklist li { display: flex; gap: 12px; align-items: center; font-weight: 600; }
.checklist .icon { color: #fff; background: var(--teal); border-radius: 50%; padding: 4px; width: 26px; height: 26px; }

select.input { appearance: none; padding-right: 40px; cursor: pointer; background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' fill='none' stroke='%236b7a76' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m4.5 7 4.5 4.5L13.5 7'/%3E%3C/svg%3E") no-repeat right 14px center; }
textarea.input { min-height: 132px; padding: 12px 14px; resize: vertical; line-height: 1.5; }

.panel h3 { display: flex; align-items: center; gap: 8px; }
.panel--alert { background: var(--danger-soft); border-color: transparent; }
.panel--alert h3 { color: var(--danger); }
.panel--alert p { color: var(--ink-2); }
.emergency { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.emergency a { display: flex; flex-direction: column; align-items: center; padding: 10px 6px; border-radius: 12px; background: var(--surface); color: var(--ink-2); font-size: 0.8rem; }
.emergency strong { font-size: 1.25rem; color: var(--danger); }

.faq-layout { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 48px; align-items: start; }
.faq-nav, .legal__toc { position: sticky; top: calc(var(--nav-h) + 24px); }
.faq-nav { display: flex; flex-direction: column; gap: 2px; }
.faq-nav a { padding: 8px 12px; border-radius: 10px; color: var(--muted); font-size: 0.9rem; }
.faq-nav a:hover { background: var(--surface-2); color: var(--ink); }
.faq-group { margin-bottom: 36px; scroll-margin-top: calc(var(--nav-h) + 16px); }
.faq-group h2 { font-size: 1.2rem; }
.faq { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.faq details + details { border-top: 1px solid var(--line); }
.faq summary { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 18px 20px; cursor: pointer; font-weight: 700; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary:hover { background: var(--surface-2); }
.faq summary .icon { color: var(--teal); transition: transform 0.25s var(--ease); }
.faq details[open] summary .icon { transform: rotate(45deg); }
.faq__answer { padding: 0 20px 18px; color: var(--ink-2); animation: routeIn 0.3s var(--ease) both; }
.faq__answer p { margin: 0; }
.faq-cta { margin-top: 12px; }

.legal { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 56px; align-items: start; }
.legal__toc ol { margin: 0; padding: 0 0 0 20px; display: grid; gap: 8px; font-size: 0.875rem; color: var(--muted); }
.legal__toc a { color: var(--muted); font-weight: 500; }
.legal__toc a:hover { color: var(--teal); }
.prose { max-width: 70ch; color: var(--ink-2); }
.prose section { scroll-margin-top: calc(var(--nav-h) + 16px); margin-top: 32px; }
.prose h2 { font-size: 1.25rem; color: var(--ink); }
.prose h2 span { color: var(--coral); }
.prose ul { padding-left: 20px; margin: 0 0 1em; display: grid; gap: 8px; }
.prose strong { color: var(--ink); }
.legal-note { margin: 0; font-size: 0.8rem; color: var(--muted); text-align: center; }
[data-step="2"] .legal-note { margin-top: 16px; text-align: left; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .search { grid-template-columns: 1fr 1fr; }
  .search__places { grid-column: 1 / -1; }
  .search:not(.search--compact) { padding-bottom: 0; }
  .search__date .chips { position: static; }
  .checkout__grid { grid-template-columns: 1fr; }
  .summary { position: static; order: -1; }
  .steps { grid-template-columns: 1fr; }
  .auth { grid-template-columns: 1fr; }
  .auth__art { display: none; }
  .split { grid-template-columns: 1fr; gap: 24px; }
  .cards, .cards--contact { grid-template-columns: 1fr 1fr; }
  .footer__grid { grid-template-columns: repeat(3, 1fr); }
  .footer__brand { grid-column: 1 / -1; }
  .faq-layout, .legal { grid-template-columns: 1fr; gap: 24px; }
  .faq-nav { position: static; flex-direction: row; flex-wrap: wrap; gap: 8px; }
  .faq-nav a { border: 1px solid var(--line); border-radius: 999px; padding: 8px 14px; }
  .legal__toc { position: static; padding: 18px 20px; border-radius: var(--radius); background: var(--surface-2); }
}
@media (min-width: 961px) { .auth__mobile-logo { display: none; } }
@media (min-width: 761px) and (max-width: 1120px) {
  .nav__links { gap: 2px; }
  .nav__links > a:not(.btn), .nav__logout { padding: 8px 9px; font-size: 0.9rem; }
  .nav__logout span { display: none; }
}

@media (max-width: 760px) {
  :root { --nav-h: 60px; }
  .container { padding: 0 16px; }
  .nav__toggle { display: inline-grid; }
  .nav__links {
    position: absolute; top: var(--nav-h); left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 2px; padding: 8px 4px 16px;
    background: var(--bg); border-bottom: 1px solid var(--line); box-shadow: var(--shadow);
    opacity: 0; visibility: hidden; transform: translateY(-8px);
    transition: opacity 0.25s var(--ease), transform 0.25s var(--ease), visibility 0.25s;
  }
  .nav__links.is-open { opacity: 1; visibility: visible; transform: none; }
  .nav__links > a:not(.btn), .nav__logout { padding: 12px; border-radius: 0; }
  .nav__links .btn { margin: 8px 12px 0; min-height: 48px; }
  .nav__links > * + * { border-top: 1px solid var(--line); }
  .nav__links > .btn { border-top: 0; }

  .page { padding-top: 16px; padding-bottom: 48px; }
  .hero { padding: 20px 0 24px; }
  .hero h1 { font-size: 1.9rem; margin-bottom: 18px; }
  .hero__lead { display: none; }
  .hero__card { padding: 0; border: 0; border-radius: 0; }
  .search, .search--compact { grid-template-columns: 1fr; }
  .search__places { grid-template-columns: minmax(0, 1fr) 44px; grid-template-rows: auto auto; gap: 10px; align-items: stretch; }
  .search__places .place { grid-column: 1; }
  /* Centred between the two inputs (offset by the label height), not on the whole block. */
  .search__swap { grid-column: 2; grid-row: 1 / 3; align-self: center; width: 44px; height: 44px; margin: 26px 0 0; }
  .search__swap .icon { transform: rotate(90deg); }
  .search__places.is-from-only { grid-template-columns: minmax(0, 1fr); }
  .search__places.is-from-only .search__swap,
  .search__places.is-from-only .place--to { display: none; }
  .search__places .place--to { animation: routeIn 0.35s var(--ease) backwards; }
  .search--compact .search__date { display: grid; }
  .results-head { display: none; padding: 14px 0; }
  .results-head.is-open { display: block; }
  .refine-btn { display: inline-flex; }
  .results-bar { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 2px 12px; margin: 14px 0 16px; padding-bottom: 14px; }
  .results-bar > div:first-child { display: contents; }
  .results-title { grid-column: 1 / -1; font-size: 1.3rem; gap: 6px; }
  .results-bar p { font-size: 0.9rem; }
  .results-bar .segmented { grid-column: 1 / -1; justify-self: start; margin-top: 10px; }
  .daybar { padding-top: 12px; }
  .daybar__day { min-width: 66px; padding: 6px 10px; }
  .promos-bar { display: none; }

  .section { padding: 0 16px 24px; }
  .section::before { margin-bottom: 22px; }
  .section--steps { display: none; }
  .section__head { margin-bottom: 12px; }
  .section__head h2 { font-size: 1.1rem; margin: 0; }
  .section__head p { display: none; }
  .cta { flex-direction: column; align-items: flex-start; padding: 20px; gap: 14px; }
  .cta .btn { width: 100%; }
  .quicklink { padding: 14px 16px; font-size: 0.9rem; }

  .routes { display: block; border: 1px solid var(--line); border-radius: var(--radius); }
  .route { flex-direction: row; align-items: center; padding: 14px 16px; border: 0; border-radius: 0; background: none; }
  .route + .route { border-top: 1px solid var(--line); }
  .route:hover { transform: none; box-shadow: none; }
  .route__ends { flex: 1; min-width: 0; font-size: 0.95rem; gap: 8px; }
  .route__line { flex: none; min-width: 0; height: auto; background: none; }
  .route__line::before { content: '→'; position: static; width: auto; height: auto; border: 0; background: none; color: var(--coral); }
  .route__line::after { display: none; }
  .route__meta > span { display: none; }

  .promos { gap: 10px; }
  .promo { padding: 12px 14px; }
  .promo__icon { display: none; }
  .promo__img { width: 48px; height: 48px; }
  .promo__body { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

  .trip { grid-template-columns: 1fr auto; gap: 8px 14px; padding: 14px 16px; }
  .trip__time { display: flex; align-items: baseline; gap: 10px; }
  .trip__time span, .trip__meta .trip__line { display: none; }
  .trip__mid { grid-column: 1 / -1; order: 3; }
  .trip__seats { grid-column: 2; grid-row: 1; text-align: right; }
  .trip__buy { grid-column: 1 / -1; order: 4; justify-content: space-between; padding-top: 12px; border-top: 1px solid var(--line); }
  .trip__fare { align-items: flex-start; }

  .panel { padding: 18px; border-radius: 18px; }
  .form-grid { grid-template-columns: 1fr; }
  .stepper button { font-size: 0.85rem; gap: 6px; }
  .checkout { padding-bottom: 110px; }
  .checkout .summary { order: 0; }
  .checkout .panel[data-panel] { padding: 0; border: 0; border-radius: 0; margin-bottom: 8px; }
  .checkout .panel__head h2 { font-size: 1.2rem; }
  .checkout .stepper { margin-bottom: 18px; }
  .checkout .panel__actions { display: none; }
  .checkout .panel .alert { margin-top: 16px; }
  .mobilebar {
    display: flex; justify-content: space-between; align-items: center; gap: 12px;
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
    background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(12px);
    border-top: 1px solid var(--line); box-shadow: 0 -8px 24px rgba(20,40,36,0.08);
  }
  .mobilebar div { display: flex; flex-direction: column; line-height: 1.2; }
  .mobilebar strong { font-size: 1.25rem; font-weight: 800; }
  .mobilebar .btn { min-width: 140px; min-height: 48px; }
  .summary__card { padding: 18px; }
  .coach { padding: 14px; }
  .coach__row { gap: 8px; }
  .coach--5 .coach__row, .coach--6 .coach__row { gap: 6px; }

  .tcard { grid-template-columns: 56px 1fr; gap: 12px; }
  .tcard__side { grid-column: 2; flex-direction: row; justify-content: space-between; align-items: center; }
  .tcard__chev { display: none; }
  .lookup { grid-template-columns: 1fr; }
  .tabs button { padding: 12px 10px; gap: 6px; }
  .ticket__top, .ticket__body { padding-left: 18px; padding-right: 18px; }
  .ticket__pay { padding: 0 18px 20px; }
  .paybox { padding: 14px; }
  .ticket__actions { padding: 14px 18px; }
  .ticket__actions .btn { flex: 1; }
  .ticket__journey strong { font-size: 1.3rem; }
  .toasts { bottom: 90px; }

  .page-hero { padding: 36px 0 28px; }
  .cards { grid-template-columns: 1fr; }
  .cards--contact { grid-template-columns: 1fr 1fr; gap: 10px; }
  .cards--contact .card { padding: 16px; }
  .cards--contact .card__icon { width: 40px; height: 40px; margin-bottom: 12px; }
  .cards--contact .card p { font-size: 0.85rem; overflow-wrap: anywhere; }
  .card { padding: 20px; }
  .faq summary { padding: 16px; }
  .faq__answer { padding: 0 16px 16px; }
  .legal__toc ol { gap: 4px; }
  .legal__toc a { display: inline-block; padding: 6px 0; }
  .footer { padding: 20px 0 16px; background: var(--bg); }
  .footer__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
  .footer nav, .footer__brand { display: contents; }
  .footer nav h2, .footer__brand img, .footer__brand p, .footer nav[aria-label="Travel"] { display: none; }
  .footer nav a, .footer__brand a { padding: 8px 0; font-size: 0.85rem; }
  .footer__brand a { color: var(--muted); min-width: 0; overflow-wrap: anywhere; }
  .footer__brand a .icon { display: none; }
  .footer__bottom { margin-top: 10px; padding-top: 12px; font-size: 0.75rem; }

  .chip { min-height: 36px; padding: 6px 14px; }
  .backlink { min-height: 40px; margin-bottom: 8px; }
  .auth__footer a, .row-end > a { display: inline-block; padding: 10px 4px; margin: -10px -4px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}

@media print {
  .nav, .footer, .no-print, .toasts, .backlink { display: none !important; }
  body { background: #fff; }
  .ticket { box-shadow: none; border-color: #ccc; }
  .view { animation: none; }
}

/* ---------- Server-rendered pages ---------- */
[hidden] { display: none !important; }
/* <html class="is-authed"> is set from the saved session before first paint. */
html:not(.is-authed) [data-when="authed"],
html.is-authed [data-when="guest"] { display: none !important; }
a.daybar__day { color: var(--ink); }
