/* Santos Logistics portal. Identity taken from santoslogistics.com.au (13 Oct 2026):
   navy base #07111E / #081B30, brand blue #087BDB, button blue #0669BF, cyan #30C5F4, grey #C9D5E2,
   Manrope for text, Marcellus + Montserrat for the wordmark, pill buttons, 20 px corners.
   Dark navy frames the portal (top bar, hero panels, sign-in); reading and working surfaces are light. */

/* Fonts: the same files the website loads (SIL Open Font License, see /fonts/OFL.txt), served by the portal itself,
   so there is no third-party request and the driver app keeps them offline. */
@font-face { font-family: "Manrope"; font-style: normal; font-weight: 400 800; font-display: swap;
  src: url("/fonts/manrope-latin.woff2") format("woff2"); }
@font-face { font-family: "Marcellus"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("/fonts/marcellus-latin.woff2") format("woff2"); }
@font-face { font-family: "Montserrat"; font-style: normal; font-weight: 700; font-display: swap;
  src: url("/fonts/montserrat-700-latin.woff2") format("woff2"); }

:root {
  /* dark frame (website) */
  --ink: #07111e;
  --navy: #081b30;
  --navy-2: #0c1d31;
  --navy-3: #10243a;
  --gray: #c9d5e2;
  --muted-d: #9fb2c6;
  --line-d: rgba(201, 213, 226, 0.14);
  --line-d2: rgba(201, 213, 226, 0.24);
  /* brand */
  --blue: #087bdb;
  --btn: #0669bf;
  --btn-h: #0774d4;
  --blue-d: #0559a6;
  --cyan: #30c5f4;
  --cyan-2: #7fe0ff;
  /* light reading surfaces */
  --surface: #f2f5f9;
  --card: #ffffff;
  --line: #e2e8f0;
  --line-2: #c9d4e1;
  --text: #0b1a2c;
  --muted: #51627a;
  --info-bg: #eaf4fd;
  --ok: #0d7343;
  --ok-bg: #e7f6ee;
  --warn: #a75207;
  --warn-bg: #fff4e2;
  --bad: #c0262d;
  --bad-bg: #fdeced;
  /* shape and depth */
  --radius: 20px;
  --radius-s: 12px;
  --shadow: 0 1px 2px rgba(8, 27, 48, 0.05), 0 12px 32px -18px rgba(8, 27, 48, 0.22);
  --shadow-l: 0 24px 60px -24px rgba(8, 27, 48, 0.45);
  --ring: 0 0 0 4px rgba(8, 123, 219, 0.18);
  --font: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --wordmark: "Marcellus", Georgia, "Times New Roman", serif;
  --label: "Montserrat", "Manrope", system-ui, sans-serif;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --spring: cubic-bezier(0.22, 1.2, 0.36, 1);
  --tap: 48px;
  --hdr: 64px;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; overflow-x: hidden; }
body {
  margin: 0;
  background: var(--surface);
  color: var(--text);
  font: 15.5px/1.55 var(--font);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  overflow-x: hidden;
  font-feature-settings: "tnum" 0;
}
img { max-width: 100%; display: block; }
a { color: var(--btn); text-decoration: none; text-underline-offset: 3px; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { font-family: var(--font); line-height: 1.18; margin: 0 0 8px; letter-spacing: -0.02em; text-wrap: balance; color: inherit; }
h1 { font-size: 28px; font-weight: 800; }
h2 { font-size: 19px; font-weight: 800; }
h3 { font-size: 16px; font-weight: 750; }
p { margin: 0 0 10px; }
small, .muted { color: var(--muted); }
.s { font-size: 13.5px; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; border-radius: 8px; }
.topbar :focus-visible, .hero :focus-visible, .auth-art :focus-visible { outline-color: var(--cyan); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--card); padding: 10px 14px; z-index: 100; border-radius: 12px; box-shadow: var(--shadow); }
.skip:focus { left: 8px; }
[hidden] { display: none !important; }
.eyebrow, .kicker { font-size: 12px; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase; color: var(--cyan); margin: 0 0 8px; }

/* ---------- brand lockup (as on the website header) ---------- */
.brand { display: inline-flex; align-items: center; gap: 11px; color: #fff; text-decoration: none !important; line-height: 1; min-width: 0; }
.brand .logo-mark { flex: none; display: block; filter: drop-shadow(0 2px 10px rgba(48, 197, 244, 0.25)); }
.brand-txt { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.brand-txt b { font-family: var(--wordmark); font-weight: 400; font-size: 1.06rem; letter-spacing: 0.06em; white-space: nowrap; color: #fff; }
.brand-txt small { font-family: var(--label); font-weight: 700; font-size: 0.6rem; letter-spacing: 0.38em; color: var(--cyan); }
.brand-mark { display: none; } /* old square mark, kept for older cached pages */

/* ---------- top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 30;
  background: rgba(7, 17, 30, 0.94);
  -webkit-backdrop-filter: saturate(140%) blur(12px); backdrop-filter: saturate(140%) blur(12px);
  color: #fff; border-bottom: 1px solid var(--line-d);
  padding-top: env(safe-area-inset-top, 0px);
}
.topbar::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px; background: linear-gradient(90deg, transparent, rgba(48, 197, 244, 0.45), transparent); opacity: 0.6; }
.topbar-in { display: flex; align-items: center; gap: 14px; padding: 0 18px; height: var(--hdr); max-width: 1440px; margin: 0 auto; }
.top-title { color: var(--muted-d); font-size: 13px; font-weight: 600; padding-left: 14px; border-left: 1px solid var(--line-d2); letter-spacing: 0.02em; }
.topbar .spacer { flex: 1; }
.who { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--muted-d); line-height: 1.25; }
.who-t { display: flex; flex-direction: column; text-align: right; }
.who b { color: #fff; font-weight: 700; }
.avatar { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 12.5px; color: var(--ink); background: linear-gradient(135deg, #bfe9ff, var(--cyan)); flex: none; }
.icon-btn { background: rgba(255, 255, 255, 0.04); border: 1px solid var(--line-d2); color: #fff; height: 38px; min-width: 38px; border-radius: 999px; padding: 0 14px; cursor: pointer; font: 600 13px var(--font); transition: border-color 0.18s, background 0.18s; }
.icon-btn:hover { border-color: var(--cyan); background: rgba(48, 197, 244, 0.08); text-decoration: none; }

.banner { padding: 9px 16px; font-size: 13.5px; display: flex; gap: 10px; align-items: center; justify-content: center; text-align: center; }
.banner.sim { background: #fff6e3; color: #6f4300; border-bottom: 1px solid #f3dcae; }
.banner.test { background: repeating-linear-gradient(135deg, #fff4d6, #fff4d6 12px, #ffecc0 12px, #ffecc0 24px); color: #5f3d00; font-weight: 700; border-radius: 12px; margin-bottom: 12px; }
.banner.offline { background: var(--bad-bg); color: var(--bad); font-weight: 700; position: sticky; top: 0; z-index: 90; }
.banner.preview { background: var(--navy-2); color: var(--gray); border-bottom: 1px solid var(--line-d); }

/* ---------- office layout ---------- */
.layout { display: grid; grid-template-columns: 248px 1fr; max-width: 1440px; margin: 0 auto; min-height: calc(100vh - var(--hdr)); }
.side { padding: 18px 12px; position: sticky; top: var(--hdr); height: calc(100vh - var(--hdr)); overflow-y: auto; }
.side a { display: flex; align-items: center; gap: 11px; padding: 10px 12px; border-radius: 12px; color: var(--text); font-weight: 650; text-decoration: none; margin-bottom: 2px; position: relative; transition: background 0.16s var(--ease), color 0.16s; }
.side a > span:first-child { width: 20px; text-align: center; color: var(--muted); }
.side a:hover { background: var(--surface); }
.side a.on { background: var(--info-bg); color: var(--blue-d); }
.side a.on > span:first-child { color: var(--blue); }
.side a.on::before { content: ""; position: absolute; left: -12px; top: 9px; bottom: 9px; width: 4px; border-radius: 0 4px 4px 0; background: linear-gradient(180deg, var(--cyan), var(--blue)); }
.side .count { margin-left: auto; background: var(--btn); color: #fff; border-radius: 999px; font-size: 12px; padding: 1px 8px; font-weight: 800; }
.side .count.warn { background: var(--warn); }
.side h4 { font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); margin: 20px 12px 6px; }
.side .find { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; margin-bottom: 12px; border: 1px solid var(--line-2); border-radius: 999px; background: var(--card); color: var(--muted); font: 600 14px var(--font); cursor: pointer; transition: border-color 0.16s, box-shadow 0.16s; }
.side .find:hover { border-color: var(--blue); box-shadow: var(--ring); }
.side .find kbd, .kbd { margin-left: auto; font: 700 11px var(--font); border: 1px solid var(--line-2); border-bottom-width: 2px; border-radius: 6px; padding: 1px 6px; color: var(--muted); background: var(--surface); }
main { padding: 24px; min-width: 0; }
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; margin-bottom: 18px; }
.page-head .grow { flex: 1; min-width: 220px; }
.page-head p { margin: 0; color: var(--muted); }
.tabbar { display: none; }
@media (min-width: 861px) { .layout { background: linear-gradient(90deg, var(--card) 248px, transparent 248px); } .side { box-shadow: 1px 0 0 var(--line); } }

/* ---------- cards ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; }
.card + .card { margin-top: 14px; }
.card h2 { display: flex; align-items: center; gap: 10px; }
.card-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.card-head h2, .card-head h3 { margin: 0; flex: 1; }
.grid { display: grid; gap: 14px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.split { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.stack > * + * { margin-top: 14px; }
.split > *, .grid > *, .stack > * { min-width: 0; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.grow { flex: 1; }

.stat { padding: 16px 16px 14px; border-radius: 16px; background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow); text-decoration: none !important; color: var(--text); display: block; position: relative; overflow: hidden; transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease), border-color 0.2s; }
a.stat:hover { transform: translateY(-2px); box-shadow: var(--shadow-l); border-color: var(--line-2); }
.stat .n { font-size: 30px; font-weight: 800; line-height: 1; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.stat .l { color: var(--muted); font-size: 13px; margin-top: 7px; font-weight: 600; }
.stat.hot { border-color: #f3cf92; background: linear-gradient(180deg, #fff9ee, #fff 70%); }
.stat.hot::after { content: ""; position: absolute; right: 14px; top: 16px; width: 8px; height: 8px; border-radius: 50%; background: var(--warn); box-shadow: 0 0 0 4px rgba(167, 82, 7, 0.14); }
.stat.hot .n { color: var(--warn); }

/* Dark presentation panel, same language as the website hero. */
.hero {
  background:
    radial-gradient(900px 340px at 8% -30%, rgba(8, 123, 219, 0.45), transparent 60%),
    radial-gradient(600px 260px at 100% 0%, rgba(48, 197, 244, 0.18), transparent 60%),
    linear-gradient(180deg, var(--navy), var(--ink));
  color: #fff; border-radius: var(--radius); padding: 24px; position: relative; overflow: hidden; border: 1px solid var(--line-d);
  isolation: isolate;
}
.hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background-image: linear-gradient(rgba(48, 197, 244, 0.06) 1px, transparent 1px), linear-gradient(90deg, rgba(48, 197, 244, 0.06) 1px, transparent 1px); background-size: 40px 40px; -webkit-mask-image: linear-gradient(90deg, transparent, #000 40%, #000); mask-image: linear-gradient(90deg, transparent, #000 40%, #000); }
.hero h1 { color: #fff; }
.hero p, .hero .muted { color: var(--gray); }
.hero .badge.dark { background: rgba(255, 255, 255, 0.06); border-color: var(--line-d2); color: #fff; }
.hero-map { position: absolute; inset: 0; z-index: -1; opacity: 0.55; -webkit-mask-image: linear-gradient(90deg, transparent 20%, #000 75%); mask-image: linear-gradient(90deg, transparent 20%, #000 75%); }
.hero-map svg { width: 100%; height: 100%; display: block; }

/* ---------- lists ---------- */
.list { list-style: none; margin: 0; padding: 0; }
.item { display: flex; gap: 12px; align-items: center; padding: 13px 8px; border-bottom: 1px solid var(--line); color: var(--text); text-decoration: none !important; border-radius: 12px; transition: background 0.14s; }
.list > li:last-child > .item, .item:last-child { border-bottom-color: transparent; }
a.item:hover { background: var(--surface); }
.item .main { flex: 1; min-width: 0; }
.item .t { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.item .s { color: var(--muted); font-size: 13px; }
.item .end { text-align: right; font-size: 13px; color: var(--muted); display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.ref { font-weight: 800; letter-spacing: 0.01em; color: var(--text); font-variant-numeric: tabular-nums; }
.hit { background: #fff1b8; color: inherit; border-radius: 3px; padding: 0 1px; }

table.t { width: 100%; border-collapse: collapse; font-size: 14px; }
table.t th { text-align: left; color: var(--muted); font-weight: 700; font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; padding: 8px; border-bottom: 1px solid var(--line); }
table.t td { padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.t tr:last-child td, table.t tr:last-child th { border-bottom: 0; }
.num { text-align: right; font-variant-numeric: tabular-nums; }

/* ---------- badges ---------- */
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; background: var(--surface); color: var(--muted); border: 1px solid var(--line); white-space: nowrap; }
.badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; opacity: 0.85; }
.badge.plain::before { display: none; }
.badge.blue { background: var(--info-bg); color: var(--blue-d); border-color: #c4def6; }
.badge.ok { background: var(--ok-bg); color: var(--ok); border-color: #bde3cc; }
.badge.warn { background: var(--warn-bg); color: var(--warn); border-color: #f2d3a2; }
.badge.bad { background: var(--bad-bg); color: var(--bad); border-color: #f3c0c3; }
.badge.dark { background: var(--navy); color: #fff; border-color: var(--navy); }
.badge.test { background: #fff1c9; color: #5f3d00; border-color: #efd286; }
.badge.live { background: var(--ink); color: var(--cyan); border-color: var(--ink); }
.badge.live::before { animation: pulse 1.6s infinite; }

/* ---------- buttons (website style: pill, blue, soft glow) ---------- */
.btn {
  appearance: none; border: 1px solid transparent; border-radius: 999px; min-height: var(--tap); padding: 0 22px;
  font: 700 15px/1 var(--font); letter-spacing: 0.01em; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--btn); color: #fff; position: relative; overflow: hidden; isolation: isolate;
  box-shadow: 0 8px 24px -10px rgba(8, 123, 219, 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.18);
  transition: transform 0.14s var(--ease), box-shadow 0.2s var(--ease), background 0.2s, border-color 0.2s, color 0.2s;
  text-decoration: none !important; white-space: nowrap; -webkit-tap-highlight-color: transparent; touch-action: manipulation;
}
.btn::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, 0.22) 50%, transparent 70%); transform: translateX(-120%); transition: transform 0.6s var(--ease); }
.btn:hover { background: var(--btn-h); box-shadow: 0 10px 30px -10px rgba(48, 197, 244, 0.75), inset 0 1px 0 rgba(255, 255, 255, 0.22); }
.btn:hover::after { transform: translateX(120%); }
.btn:active { transform: scale(0.97); }
.btn[disabled] { opacity: 0.55; cursor: not-allowed; box-shadow: none; }
.btn.busy { cursor: progress; opacity: 0.9; color: transparent !important; }
.btn.busy::before { content: ""; position: absolute; left: 50%; top: 50%; width: 18px; height: 18px; margin: -9px 0 0 -9px; border: 2.5px solid #fff; border-right-color: transparent; border-radius: 50%; animation: spin 0.7s linear infinite; }
.btn.sec.busy::before, .btn.ghost.busy::before, .btn.danger.busy::before { border-color: var(--btn); border-right-color: transparent; }
.btn.done { animation: doneflash 1.2s var(--ease); }
.btn.done::before { content: "✓"; font-weight: 800; animation: pop 0.35s var(--spring); }
.btn.sec { background: var(--card); color: var(--text); border-color: var(--line-2); box-shadow: none; }
.btn.sec:hover { border-color: var(--blue); color: var(--blue-d); box-shadow: var(--ring); }
.btn.sec::after, .btn.ghost::after, .btn.danger::after { display: none; }
.btn.ghost { background: transparent; color: var(--btn); box-shadow: none; padding: 0 12px; }
.btn.ghost:hover { background: var(--info-bg); }
.btn.danger { background: var(--card); color: var(--bad); border-color: #efb7bb; box-shadow: none; }
.btn.danger:hover { background: var(--bad-bg); }
.btn.dark { background: var(--ink); color: #fff; box-shadow: none; border-color: var(--line-d2); }
.btn.cyan { background: linear-gradient(180deg, #5ad3f7, var(--cyan)); color: var(--ink); box-shadow: 0 8px 24px -10px rgba(48, 197, 244, 0.9), inset 0 1px 0 rgba(255, 255, 255, 0.4); }
.btn.cyan:hover { background: linear-gradient(180deg, #7fe0ff, #45cdf6); }
.btn.big { min-height: 62px; font-size: 17.5px; width: 100%; }
.btn.small { min-height: 36px; font-size: 13.5px; padding: 0 14px; }
.btn.block { width: 100%; }
.linkish { background: none; border: 0; padding: 4px 0; font: 700 13.5px var(--font); color: var(--btn); cursor: pointer; }
.linkish:hover { text-decoration: underline; }

/* ---------- forms ---------- */
label.f { display: block; margin-bottom: 14px; }
label.f > span { display: block; font-weight: 700; font-size: 13.5px; margin-bottom: 6px; }
label.f > span em, .f2 label em { font-style: normal; color: var(--muted); font-weight: 500; }
input, select, textarea {
  width: 100%; min-height: var(--tap); border: 1px solid var(--line-2); border-radius: 12px; padding: 10px 14px;
  font: 500 15.5px var(--font); color: var(--text); background: #fff; transition: border-color 0.16s, box-shadow 0.16s, background 0.16s;
}
input::placeholder, textarea::placeholder { color: #8b9ab0; }
textarea { min-height: 96px; resize: vertical; line-height: 1.5; }
input:hover, select:hover, textarea:hover { border-color: #a9b9cc; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--blue); box-shadow: var(--ring); }
input[aria-invalid="true"], textarea[aria-invalid="true"] { border-color: var(--bad); box-shadow: 0 0 0 4px rgba(192, 38, 45, 0.1); }
input[type="search"] { padding-left: 40px; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' fill='none' stroke='%2351627a' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='8' cy='8' r='6'/%3E%3Cpath d='m13 13 4 4'/%3E%3C/svg%3E") 14px 50% no-repeat; border-radius: 999px; }
input[type="checkbox"], input[type="radio"] { width: 20px; height: 20px; min-height: 0; padding: 0; accent-color: var(--btn); flex: none; box-shadow: none; }
label.row { gap: 8px; font-weight: 650; cursor: pointer; }
.check { display: flex; gap: 12px; align-items: flex-start; padding: 13px; border: 1px solid var(--line); border-radius: 14px; margin-bottom: 10px; cursor: pointer; background: #fff; transition: border-color 0.16s, background 0.16s; }
.check input { width: 22px; height: 22px; margin: 1px 0 0; }
.check:hover { border-color: var(--line-2); }
.check:has(input:checked) { border-color: #9cc9f2; background: var(--info-bg); }
.seg { display: inline-flex; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 4px; gap: 4px; flex-wrap: wrap; }
.seg button { border: 0; background: transparent; padding: 8px 16px; border-radius: 999px; font: 700 13.5px var(--font); color: var(--muted); cursor: pointer; min-height: 38px; transition: background 0.18s var(--ease), color 0.18s, box-shadow 0.18s; }
.seg button:hover { color: var(--text); }
.seg button[aria-pressed="true"] { background: #fff; color: var(--text); box-shadow: 0 1px 2px rgba(8, 27, 48, 0.08), 0 4px 12px -6px rgba(8, 27, 48, 0.25); }
.chip { border: 1px solid var(--line-2); background: #fff; border-radius: 999px; padding: 6px 12px; min-height: 36px; font: 700 13px var(--font); color: var(--muted); cursor: pointer; display: inline-flex; align-items: center; gap: 6px; transition: all 0.16s var(--ease); }
.chip[aria-pressed="true"] { background: var(--navy); border-color: var(--navy); color: #fff; }
.hint { font-size: 13px; color: var(--muted); margin-top: 5px; }
.err { color: var(--bad); font-size: 13.5px; margin-top: 6px; font-weight: 650; }
.form-err { background: var(--bad-bg); color: var(--bad); border: 1px solid #f3c0c3; padding: 11px 14px; border-radius: 12px; margin-bottom: 14px; font-weight: 650; animation: shake 0.35s var(--ease); }
.note { background: var(--info-bg); border: 1px solid #c4def6; color: #0d3c6b; padding: 11px 14px; border-radius: 14px; font-size: 14px; }
.note.warn { background: var(--warn-bg); border-color: #f2d3a2; color: #6e3a00; }
.note.ok { background: var(--ok-bg); border-color: #bde3cc; color: #0c5530; }
.note.bad { background: var(--bad-bg); border-color: #f3c0c3; color: #85181d; }
.note.ok h2 { color: #0c5530; }

/* live-validated fields (sign-in, create account) */
.f2 { margin-bottom: 14px; }
.f2 > label { display: block; font-weight: 700; font-size: 13.5px; margin-bottom: 6px; }
.f2-box { position: relative; display: flex; align-items: center; }
.f2-box input { padding-right: 44px; }
.f2-ok { position: absolute; right: 14px; color: var(--ok); font-weight: 800; opacity: 0; transform: scale(0.6); transition: opacity 0.2s, transform 0.25s var(--spring); pointer-events: none; }
.f2.valid .f2-ok { opacity: 1; transform: none; }
.f2-eye { position: absolute; right: 6px; height: 36px; border: 0; background: transparent; color: var(--btn); font: 700 13px var(--font); border-radius: 999px; padding: 0 10px; cursor: pointer; }
.f2-box:has(.f2-eye) .f2-ok { display: none; }
.f2-box:has(.f2-eye) input { padding-right: 70px; }
.field-msg { color: var(--bad); font-size: 13px; font-weight: 650; margin-top: 6px; min-height: 0; }
.field-msg:empty { display: none; }

/* ---------- timeline ---------- */
.steps { list-style: none; margin: 0; padding: 0; position: relative; }
.steps li { position: relative; padding: 0 0 20px 40px; }
.steps li::before { content: ""; position: absolute; left: 12px; top: 26px; bottom: -2px; width: 2px; background: var(--line); border-radius: 2px; }
.steps li:last-child::before { display: none; }
.steps .dot { position: absolute; left: 0; top: 0; width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--line-2); background: #fff; display: grid; place-items: center; font-size: 12px; font-weight: 800; }
.steps li.done .dot { background: var(--btn); border-color: var(--btn); color: #fff; }
.steps li.done::before { background: linear-gradient(180deg, var(--btn), var(--blue)); }
.steps li.current .dot { border-color: var(--cyan); background: var(--ink); box-shadow: 0 0 0 6px rgba(48, 197, 244, 0.2); }
.steps li.current .dot::after { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--cyan); animation: pulse 1.6s infinite; }
.steps li.current .lbl { color: var(--text); font-weight: 800; }
.steps .lbl { font-weight: 700; }
.steps li.todo .lbl { color: var(--muted); font-weight: 600; }
.steps .when { font-size: 13px; color: var(--muted); }
.steps li.fresh .dot { animation: freshdot 1.2s var(--spring) 0.15s both; }
.steps li.fresh .lbl { background: linear-gradient(90deg, rgba(48, 197, 244, 0.22), rgba(48, 197, 244, 0)); border-radius: 8px; padding: 2px 8px; margin-left: -8px; animation: freshlbl 2.4s var(--ease) both; }
.steps .new-tag { display: inline-block; margin-left: 8px; font-size: 11px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--blue-d); background: var(--info-bg); border: 1px solid #c4def6; border-radius: 999px; padding: 1px 8px; vertical-align: 2px; }

.events { list-style: none; padding: 0; margin: 0; font-size: 14px; }
.events li { display: grid; grid-template-columns: 112px 1fr; gap: 10px; padding: 9px 0; border-bottom: 1px dashed var(--line); }
.events li:last-child { border-bottom: 0; }
.events time { color: var(--muted); font-size: 12.5px; font-weight: 600; }

.bubble { max-width: 85%; padding: 10px 14px; border-radius: 18px; margin: 6px 0; font-size: 14.5px; white-space: pre-wrap; }
.bubble.me { background: var(--btn); color: #fff; margin-left: auto; border-bottom-right-radius: 6px; }
.bubble.them { background: var(--surface); border: 1px solid var(--line); border-bottom-left-radius: 6px; }
.bubble small { display: block; opacity: 0.8; font-size: 11.5px; margin-top: 4px; }
.bubble.me small { color: rgba(255, 255, 255, 0.88); opacity: 1; }

/* ---------- customer pages ---------- */
.public { max-width: 760px; margin: 0 auto; padding: 20px 16px 64px; }
.track-hero .status { font-size: 32px; font-weight: 800; margin: 6px 0 6px; letter-spacing: -0.025em; line-height: 1.1; }
.eta-big { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-top: 16px; padding: 14px 16px; background: rgba(255, 255, 255, 0.05); border: 1px solid var(--line-d2); border-radius: 16px; }
.eta-big .w { font-size: 26px; font-weight: 800; color: #fff; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.eta-big .muted, .eta-big .s { color: var(--muted-d); }
.contact-card { display: flex; align-items: center; gap: 14px; }
.contact-card .grow b { display: block; }
.map { position: relative; height: 240px; border-radius: 16px; overflow: hidden; background: #dfe7f1; border: 1px solid var(--line); }
.map .tiles { position: absolute; display: grid; grid-template-columns: repeat(3, 256px); }
.map .tiles img { width: 256px; height: 256px; max-width: none; }
.map .pin { position: absolute; width: 22px; height: 22px; margin: -11px 0 0 -11px; border-radius: 50%; background: var(--btn); border: 3px solid #fff; box-shadow: 0 0 0 6px rgba(8, 123, 219, 0.25); }
.map .acc { position: absolute; border-radius: 50%; background: rgba(8, 123, 219, 0.12); border: 1px solid rgba(8, 123, 219, 0.35); transform: translate(-50%, -50%); }
.map .attr { position: absolute; right: 0; bottom: 0; background: rgba(255, 255, 255, 0.88); font-size: 10.5px; padding: 2px 6px; }
.map .age { position: absolute; left: 10px; top: 10px; background: rgba(7, 17, 30, 0.86); color: #fff; font-size: 12.5px; font-weight: 700; padding: 5px 10px; border-radius: 999px; }
.loc-time { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; }
.money { font-weight: 800; font-variant-numeric: tabular-nums; }
.lines td:last-child { text-align: right; }
.totals { margin-left: auto; width: min(320px, 100%); }
.totals div { display: flex; justify-content: space-between; padding: 4px 0; }
.totals .grand { border-top: 2px solid var(--text); margin-top: 6px; padding-top: 8px; font-weight: 800; font-size: 18px; }
.foot { text-align: center; color: var(--muted); font-size: 13px; margin-top: 28px; }
.foot .logo-mark { margin: 0 auto 8px; opacity: 0.9; }

/* ---------- driver (phone, outdoors: big, high contrast, little else) ---------- */
.driver { --tap: 54px; }
.driver main { padding: 14px; max-width: 640px; margin: 0 auto; }
.driver body, .driver { font-size: 16px; }
.job-card { display: block; background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 16px 16px 16px 20px; box-shadow: var(--shadow); color: var(--text); text-decoration: none !important; margin-bottom: 12px; position: relative; overflow: hidden; transition: transform 0.16s var(--ease), box-shadow 0.16s; }
.job-card:active { transform: scale(0.99); }
.job-card::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; background: var(--line-2); }
.job-card.go::before { background: linear-gradient(180deg, var(--cyan), var(--btn)); }
.job-card.hold::before { background: var(--warn); }
.job-card .next { margin-top: 12px; font-weight: 800; color: #fff; background: var(--btn); border-radius: 999px; padding: 10px 16px; display: flex; gap: 8px; align-items: center; justify-content: space-between; font-size: 15px; }
.job-card .next.hold { background: var(--warn-bg); color: var(--warn); }
.next-stop { border-radius: 20px; padding: 18px; background: var(--card); border: 2px solid var(--btn); box-shadow: var(--shadow); margin-top: 14px; }
.next-stop .lbl { font-size: 12px; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; color: var(--btn); }
.next-stop h2 { font-size: 24px; margin: 4px 0 2px; }
.next-stop .addr { font-size: 16px; font-weight: 600; }
.stop-now { border-left: 4px solid var(--btn); padding-left: 12px; margin-left: -16px; }
.stop-now h3 { font-size: 20px; }
.driver .hero h1 { font-size: 30px; }
.driver .job-card .ref { font-size: 16px; }
.route { display: grid; grid-template-columns: 18px 1fr; gap: 2px 10px; margin: 10px 0 4px; }
.route .a, .route .b { width: 12px; height: 12px; border-radius: 50%; margin-top: 5px; }
.route .a { border: 3px solid var(--btn); }
.route .b { background: var(--ink); }
.route .ln { width: 2px; background: var(--line-2); margin: 0 auto; min-height: 14px; }
.action-bar { position: sticky; bottom: 0; background: linear-gradient(180deg, rgba(242, 245, 249, 0), var(--surface) 30%); padding: 18px 0 calc(10px + env(safe-area-inset-bottom)); z-index: 5; }
.contact-row { display: flex; gap: 10px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.contact-row:last-child { border-bottom: 0; }
.call { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; background: var(--ok-bg); color: var(--ok); border: 1px solid #bde3cc; font-size: 21px; text-decoration: none !important; flex: none; transition: transform 0.14s var(--ease); }
.call:active { transform: scale(0.94); }
.thumbs { display: flex; gap: 8px; flex-wrap: wrap; }
.thumbs img { width: 84px; height: 84px; object-fit: cover; border-radius: 12px; border: 1px solid var(--line); }
.sigpad { width: 100%; height: 180px; border: 2px dashed var(--line-2); border-radius: 14px; background: #fff; touch-action: none; display: block; }
.eta-picks { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.eta-picks button { min-height: 54px; border-radius: 14px; border: 1px solid var(--line-2); background: #fff; font: 700 15px var(--font); cursor: pointer; color: var(--text); transition: all 0.14s var(--ease); }
.eta-picks button[aria-pressed="true"] { background: var(--navy); color: #fff; border-color: var(--navy); box-shadow: 0 6px 16px -8px rgba(8, 27, 48, 0.6); }

/* ---------- overlays ---------- */
.sheet-back { position: fixed; inset: 0; background: rgba(7, 17, 30, 0.55); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); z-index: 60; display: flex; align-items: flex-end; justify-content: center; animation: fade 0.2s var(--ease); }
.sheet { background: var(--card); width: min(640px, 100%); max-height: 92vh; overflow-y: auto; overscroll-behavior: contain; border-radius: 24px 24px 0 0; padding: 22px 20px calc(22px + env(safe-area-inset-bottom)); animation: sheetup 0.32s var(--spring); box-shadow: var(--shadow-l); }
.sheet-back.closing { animation: fadeout 0.18s var(--ease) forwards; }
.sheet-back.closing .sheet { animation: sheetdown 0.18s var(--ease) forwards; }
.sheet h2 { margin-bottom: 4px; }
.sheet .grab { width: 44px; height: 5px; border-radius: 9px; background: var(--line-2); margin: -8px auto 16px; }
@media (min-width: 760px) { .sheet-back { align-items: center; } .sheet { border-radius: 24px; } .sheet .grab { display: none; } }
.toasts { position: fixed; left: 50%; bottom: calc(20px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 80; display: flex; flex-direction: column; gap: 8px; width: min(520px, calc(100% - 24px)); pointer-events: none; }
.toast { pointer-events: auto; background: var(--ink); color: #fff; padding: 13px 16px; border-radius: 16px; box-shadow: var(--shadow-l); display: flex; gap: 12px; align-items: flex-start; animation: toastin 0.32s var(--spring); font-size: 14.5px; font-weight: 600; border: 1px solid var(--line-d2); }
.toast > span:first-child { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; flex: none; font-weight: 800; font-size: 13px; }
.toast.ok > span:first-child { background: #2fbf71; color: var(--ink); }
.toast.bad > span:first-child { background: #ff6b6b; color: var(--ink); }
.toast.info > span:first-child { background: var(--cyan); color: var(--ink); }
.toast.leaving { animation: toastout 0.22s var(--ease) forwards; }

.skel { background: linear-gradient(90deg, #e8edf4 25%, #f4f7fb 50%, #e8edf4 75%); background-size: 200% 100%; animation: shimmer 1.2s infinite; border-radius: 10px; height: 16px; margin: 9px 0; }
.skel.block { height: 112px; border-radius: var(--radius); margin: 0; }
.skel.tile { height: 84px; border-radius: 16px; margin: 0; }
.skel.dark { background: linear-gradient(90deg, #0c1d31 25%, #12304d 50%, #0c1d31 75%); background-size: 200% 100%; }
.empty { text-align: center; padding: 34px 16px; color: var(--muted); }
.empty .ico { width: 56px; height: 56px; margin: 0 auto 10px; border-radius: 50%; display: grid; place-items: center; font-size: 24px; background: var(--surface); border: 1px solid var(--line); color: var(--btn); }
.empty h3 { color: var(--text); }
.fade-in, .page-enter { animation: rise 0.32s var(--ease) both; }
.boot { min-height: 60vh; display: grid; place-items: center; }
.spinner { width: 28px; height: 28px; border-radius: 50%; border: 3px solid rgba(8, 123, 219, 0.2); border-top-color: var(--btn); animation: spin 0.8s linear infinite; display: inline-block; }
.stage-strip { list-style: none; margin: 0; padding: 14px 16px; display: flex; gap: 0; background: var(--card); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); overflow-x: auto; }
.stage-strip li { flex: 1 0 auto; min-width: 82px; position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; color: var(--muted); text-align: center; }
.stage-strip li::before { content: ""; position: absolute; top: 7px; left: -50%; right: 50%; height: 2px; background: var(--line-2); z-index: 0; }
.stage-strip li:first-child::before { display: none; }
.stage-strip li.done::before, .stage-strip li.now::before, .stage-strip li.hold::before { background: var(--btn); }
.stage-strip .d { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--line-2); background: #fff; position: relative; z-index: 1; }
.stage-strip li.done .d { background: var(--btn); border-color: var(--btn); }
.stage-strip li.done { color: var(--text); }
.stage-strip li.now { color: var(--blue-d); }
.stage-strip li.now .d { background: var(--ink); border-color: var(--cyan); box-shadow: 0 0 0 5px rgba(48, 197, 244, 0.22); }
.stage-strip li.hold { color: var(--warn); }
.stage-strip li.hold .d { background: var(--warn); border-color: var(--warn); }
.office-content { transition: opacity 0.2s var(--ease); }
.office-content.reloading { opacity: 0.6; }
.live-count { font-size: 13px; color: var(--muted); font-weight: 600; }

/* ---------- office: find anything ---------- */
.find-sheet .results { list-style: none; margin: 10px 0 0; padding: 0; max-height: 52vh; overflow-y: auto; }
.find-sheet .results a { display: flex; gap: 10px; align-items: center; padding: 11px 10px; border-radius: 12px; color: var(--text); text-decoration: none; }
.find-sheet .results a:hover, .find-sheet .results a:focus-visible, .find-sheet .results a.sel { background: var(--info-bg); outline: none; }
.find-sheet .results .k { font-size: 11px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); width: 64px; flex: none; }
.next-up { display: flex; align-items: center; gap: 16px; padding: 16px 18px; border-radius: var(--radius); background: var(--card); border: 1px solid #c4def6; box-shadow: var(--shadow); position: relative; overflow: hidden; }
.next-up::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; background: linear-gradient(180deg, var(--cyan), var(--btn)); }
.next-up .lbl { font-size: 11.5px; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; color: var(--btn); }
.next-up .t { font-size: 17px; font-weight: 800; }

/* ---------- sign in / create account ---------- */
.auth2 { min-height: 100vh; min-height: 100dvh; display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(420px, 0.88fr); background: var(--ink); }
.auth-art { position: relative; overflow: hidden; color: #fff; isolation: isolate; background: var(--ink); }
.auth-map { position: absolute; inset: 0; z-index: -2; }
.auth-map svg { width: 100%; height: 100%; display: block; }
.auth-map.phone { display: none; }
.auth-art::after { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(180deg, rgba(7, 17, 30, 0.9) 0%, rgba(7, 17, 30, 0.2) 22%, rgba(7, 17, 30, 0.1) 60%, rgba(7, 17, 30, 0.92) 100%), linear-gradient(90deg, rgba(7, 17, 30, 0.92) 0%, rgba(7, 17, 30, 0.74) 36%, rgba(7, 17, 30, 0.12) 68%, transparent 85%); }
.auth-art-in { position: relative; height: 100%; display: flex; flex-direction: column; justify-content: space-between; gap: 28px; padding: 40px clamp(28px, 4vw, 56px); }
.auth-art .brand-txt b { font-size: 1.16rem; }
.auth-copy { max-width: 30rem; position: relative; }
.auth-copy::before { content: ""; position: absolute; inset: -40px -60px -40px -80px; z-index: -1; background: radial-gradient(closest-side, rgba(7, 17, 30, 0.82), rgba(7, 17, 30, 0)); pointer-events: none; }
.auth-copy h1, .auth-copy .lead { text-shadow: 0 2px 16px rgba(7, 17, 30, 0.9); }
.auth-copy h1 { font-size: clamp(34px, 3.6vw, 52px); line-height: 1.04; letter-spacing: -0.03em; margin-bottom: 14px; }
.auth-copy .lead { color: var(--gray); font-size: 17px; line-height: 1.6; max-width: 26rem; }
.auth-foot { max-width: 34rem; }
.rm-legend { list-style: none; margin: 0 0 10px; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 16px; font-size: 13px; color: var(--gray); }
.rm-legend li { display: inline-flex; align-items: center; gap: 7px; }
.rm-legend b { color: #fff; font-weight: 700; }
.rm-legend span:last-child { color: var(--muted-d); }
.rm-legend .sw { width: 18px; height: 3px; border-radius: 3px; background: linear-gradient(90deg, var(--cyan), #7fe0ff); box-shadow: 0 0 10px rgba(48, 197, 244, 0.8); }
.rm-legend .sw.dashed { background: repeating-linear-gradient(90deg, var(--cyan) 0 4px, transparent 4px 7px); box-shadow: none; }
.rm-note { font-size: 12px; color: var(--muted-d); margin: 0; max-width: 32rem; }

.auth-panel { background: var(--surface); display: flex; align-items: center; justify-content: center; padding: 40px clamp(20px, 4vw, 56px); border-left: 1px solid var(--line-d); }
.auth-panel-in { width: min(440px, 100%); }
.auth-card { background: var(--card); border: 1px solid var(--line); border-radius: 24px; box-shadow: var(--shadow-l); padding: 28px; }
.auth-title { font-size: 26px; margin: 22px 0 4px; letter-spacing: -0.025em; }
.auth-title:focus { outline: none; }
.auth-tabs { position: relative; display: grid; grid-template-columns: 1fr 1fr; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 4px; }
.auth-tab { position: relative; z-index: 1; text-align: center; padding: 10px 8px; border-radius: 999px; font-weight: 800; font-size: 14px; color: var(--muted); text-decoration: none !important; transition: color 0.2s; }
.auth-tab.on { color: var(--text); }
.auth-tab-ink { position: absolute; z-index: 0; top: 4px; bottom: 4px; left: 4px; width: calc(50% - 4px); border-radius: 999px; background: #fff; box-shadow: 0 1px 2px rgba(8, 27, 48, 0.08), 0 6px 16px -8px rgba(8, 27, 48, 0.3); transition: transform 0.35s var(--spring); }
.auth-tab-ink.right { transform: translateX(100%); }
.seg.who { display: flex; width: 100%; margin: 14px 0 18px; }
.seg.who button { flex: 1; }
.auth-form { margin-top: 2px; }
.auth-form .btn.block { margin-top: 6px; }
.fine { font-size: 13px; color: var(--muted); margin: 12px 0 0; }
.fine.center { text-align: center; }
.auth-bottom { margin-top: 18px; text-align: center; }
.back-site { font-size: 13.5px; font-weight: 700; color: var(--muted); }
.back-site:hover { color: var(--btn); }
.sent { text-align: left; }
.sent-ico { width: 72px; height: 72px; border-radius: 22px; display: grid; place-items: center; background: linear-gradient(160deg, var(--navy), var(--ink)); box-shadow: 0 12px 30px -14px rgba(8, 27, 48, 0.8); margin-top: 6px; color: #fff; font-size: 30px; font-weight: 800; }
.sent-ico.warn { background: linear-gradient(160deg, #b45a0a, #7a3a03); }
.sent-ico svg .env-b { fill: none; stroke: var(--gray); stroke-width: 2.5; }
.sent-ico svg .env-f { fill: none; stroke: var(--gray); stroke-width: 2.5; stroke-linejoin: round; stroke-dasharray: 60; stroke-dashoffset: 60; animation: draw 0.7s var(--ease) 0.15s forwards; }
.sent-ico svg .env-c { fill: var(--cyan); transform-origin: 50px 46px; transform: scale(0); animation: pop 0.45s var(--spring) 0.7s forwards; }
.sent-ico svg .env-t { fill: none; stroke: var(--ink); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 14; stroke-dashoffset: 14; animation: draw 0.35s var(--ease) 1s forwards; }
.sent-steps { margin: 14px 0 18px; padding-left: 20px; color: var(--text); }
.sent-steps li { margin: 4px 0; }
.sent-steps li::marker { color: var(--btn); font-weight: 800; }
.consume { text-align: center; padding: 18px 0; }
.consume .auth-title { margin-top: 14px; }

/* the map itself */
.route-map .rm-coast { stroke: rgba(48, 197, 244, 0.55); stroke-width: 1.6; filter: drop-shadow(0 0 6px rgba(48, 197, 244, 0.35)); }
.route-map .rm-islands > * { fill: #122c45; stroke: rgba(48, 197, 244, 0.45); stroke-width: 1; }
.route-map .rm-regions text { fill: rgba(201, 213, 226, 0.34); font: 700 13px var(--font); letter-spacing: 0.32em; }
.route-map .rm-base { fill: none; stroke: rgba(48, 197, 244, 0.16); stroke-width: 7; stroke-linecap: round; }
.route-map .rm-base.dashed { stroke: rgba(48, 197, 244, 0.1); }
.route-map .rm-line { fill: none; stroke: var(--cyan); stroke-width: 2.6; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 1; filter: drop-shadow(0 0 5px rgba(48, 197, 244, 0.6)); }
.route-map .rm-line.dashed { stroke: rgba(127, 224, 255, 0.7); stroke-width: 2; }
.route-map.rm-ready .rm-line { animation: draw 1.9s var(--ease) calc(0.25s + var(--i) * 0.22s) forwards; }
.route-map.rm-ready .rm-line.dashed { animation: draw 1.9s var(--ease) 1.6s forwards, fadedash 0.01s linear 3.6s forwards; }
.route-map .rm-town .rm-dot { fill: #e9f8ff; stroke: var(--cyan); stroke-width: 1.6; }
.route-map .rm-town.home .rm-dot { fill: var(--cyan); stroke: #fff; stroke-width: 2.2; }
.route-map .rm-town .rm-pulse { fill: rgba(48, 197, 244, 0.35); transform-box: fill-box; transform-origin: center; opacity: 0; }
.route-map.rm-ready .rm-town .rm-pulse { animation: ping 3.6s var(--ease) calc(1.2s + var(--i) * 0.31s) infinite; }
.route-map .rm-town { opacity: 0; }
.route-map.rm-ready .rm-town { animation: fade 0.6s var(--ease) calc(0.4s + var(--i) * 0.06s) forwards; }
.route-map .rm-label { fill: rgba(233, 248, 255, 0.82); font: 700 13px var(--font); letter-spacing: 0.04em; paint-order: stroke; stroke: rgba(7, 17, 30, 0.85); stroke-width: 4px; }
.route-map .rm-town.home .rm-label { fill: #fff; font: 800 15px var(--font); letter-spacing: 0.16em; }
.route-map .rm-light .halo { fill: rgba(127, 224, 255, 0.22); }
.route-map .rm-light .core { fill: #eafaff; }
.route-map .rm-light .tail1 { fill: rgba(127, 224, 255, 0.55); }
.route-map .rm-light .tail2 { fill: rgba(127, 224, 255, 0.3); }
.route-map .rm-light { opacity: 0; }
.route-map.rm-still .rm-line, .route-map.rm-still .rm-town { animation: none !important; stroke-dashoffset: 0; opacity: 1; }
.route-map.rm-still .rm-pulse { display: none; }

/* ---------- motion ---------- */
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeout { to { opacity: 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes up { from { transform: translateY(14px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes sheetup { from { transform: translateY(32px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes sheetdown { to { transform: translateY(24px); opacity: 0; } }
@keyframes toastin { from { transform: translateY(16px) scale(0.98); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes toastout { to { transform: translateY(8px); opacity: 0; } }
@keyframes shimmer { to { background-position: -200% 0; } }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes fadedash { to { stroke-dasharray: 0.012 0.01; } }
@keyframes ping { 0% { opacity: 0.7; transform: scale(0.4); } 70%, 100% { opacity: 0; transform: scale(2.4); } }
@keyframes pop { from { transform: scale(0); } to { transform: scale(1); } }
@keyframes doneflash { 0% { box-shadow: 0 0 0 0 rgba(47, 191, 113, 0.55); } 100% { box-shadow: 0 0 0 14px rgba(47, 191, 113, 0); } }
@keyframes shake { 0%, 100% { transform: none; } 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }
@keyframes freshdot { 0% { transform: scale(0.6); box-shadow: 0 0 0 0 rgba(48, 197, 244, 0.7); } 60% { transform: scale(1.12); } 100% { transform: none; box-shadow: 0 0 0 6px rgba(48, 197, 244, 0.2); } }
@keyframes freshlbl { 0% { background-color: rgba(48, 197, 244, 0.35); } 100% { background-color: transparent; } }

/* Animations rest while the tab is hidden, and are off for people who ask for less motion. */
.motion-paused *, .motion-paused *::before, .motion-paused *::after { animation-play-state: paused !important; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; animation-delay: 0s !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
  .route-map .rm-pulse, .rm-light { display: none; }
  .btn::after { display: none; }
}

/* ---------- responsive ---------- */
@media (max-width: 1100px) { .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .split { grid-template-columns: 1fr; } }
@media (max-width: 959px) {
  .auth2 { grid-template-columns: 1fr; grid-template-rows: auto 1fr; background: var(--surface); }
  .auth-art { min-height: 0; }
  .auth-map.desk { display: none; }
  .auth-map.phone { display: block; }
  .auth-art::after { background: linear-gradient(90deg, rgba(7, 17, 30, 0.85) 0%, rgba(7, 17, 30, 0.45) 50%, rgba(7, 17, 30, 0.05) 100%), linear-gradient(180deg, transparent 55%, rgba(7, 17, 30, 0.6)); }
  .auth-art-in { padding: calc(18px + env(safe-area-inset-top)) 18px 46px; gap: 14px; }
  .auth-copy h1 { font-size: 24px; margin-bottom: 0; }
  .auth-copy .eyebrow, .auth-copy .lead, .auth-foot { display: none; }
  .auth-panel { padding: 0 14px 28px; border-left: 0; align-items: flex-start; }
  .auth-panel-in { margin-top: -28px; position: relative; }
  .auth-card { padding: 20px 18px; border-radius: 22px; }
  .auth-title { font-size: 22px; margin-top: 18px; }
}
@media (max-width: 860px) {
  .layout { grid-template-columns: 1fr; }
  .side { display: none; }
  main { padding: 14px 14px 96px; }
  .g2, .g3 { grid-template-columns: 1fr; }
  .tabbar { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; background: rgba(255, 255, 255, 0.96); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); border-top: 1px solid var(--line); z-index: 40; padding-bottom: env(safe-area-inset-bottom); }
  .tabbar a { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 8px 2px; font-size: 11px; color: var(--muted); text-decoration: none; font-weight: 700; position: relative; min-height: 58px; justify-content: center; }
  .tabbar a.on { color: var(--btn); }
  .tabbar a.on::before { content: ""; position: absolute; top: 0; left: 30%; right: 30%; height: 3px; border-radius: 0 0 3px 3px; background: var(--btn); }
  .tabbar a .i { font-size: 19px; line-height: 1; }
  .tabbar a .dotn { position: absolute; top: 6px; left: 56%; background: var(--warn); color: #fff; border-radius: 99px; font-size: 10px; padding: 0 5px; font-weight: 800; }
  h1 { font-size: 24px; }
  .events li { grid-template-columns: 1fr; gap: 2px; }
  .eta-picks { grid-template-columns: repeat(2, 1fr); }
  .hide-m { display: none !important; }
  .banner { display: block; }
  .item { flex-wrap: wrap; }
  .item .end { max-width: 48%; }
  .item .end .badge { white-space: normal; }
  .card { overflow-x: auto; }
  .who-t { display: none; }
  .hero { padding: 20px; }
}
@media (max-width: 520px) {
  .brand-txt b { font-size: 0.92rem; letter-spacing: 0.05em; }
  .brand-txt small { font-size: 0.52rem; }
  .brand .logo-mark { height: 24px; width: auto; }
  .topbar-in { gap: 10px; padding: 0 12px; }
  .avatar { display: none; }
  .icon-btn { height: 34px; font-size: 12.5px; padding: 0 12px; }
  .track-hero .status { font-size: 27px; }
}
@media (max-width: 420px) { .g4 { grid-template-columns: 1fr 1fr; } .stat .n { font-size: 25px; } }
@media print { .topbar, .side, .tabbar, .btn, .banner { display: none !important; } body { background: #fff; } .card { box-shadow: none; } }
