/* EaseRoute website · Asphalt Signal */

/* ---------------------------------------------------------------- header */
.top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 28px; min-height: 66px;
  padding-inline: max(20px, calc((100vw - 1320px) / 2)); background: var(--asphalt-1); border-bottom: 1px solid var(--line); }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.brand-word { font-family: var(--f-sign); font-weight: 900; font-size: 1.2rem; letter-spacing: .01em; direction: ltr; }
.brand-local { font-family: var(--f-sign); font-weight: 700; color: var(--ink-3); font-size: .95rem; padding-inline-start: 10px;
  border-inline-start: 1px solid var(--line-2); }
.top-nav { display: flex; gap: 6px; margin-inline-start: auto; }
.top-nav a, .langs a { text-decoration: none; padding: 8px 12px; border-radius: var(--r-1); color: var(--ink-2); font-weight: 600; font-size: .95rem; }
.top-nav a:hover, .langs a:hover { color: var(--ink); background: var(--asphalt-2); }
.top-nav a[aria-current] { color: var(--paint); }
.langs { display: flex; gap: 2px; padding: 3px; border-radius: var(--r-2); background: var(--asphalt-2); }
.langs a { padding: 5px 10px; font-size: .9rem; }
.langs a[aria-current] { background: var(--asphalt-3); color: var(--paint); }
.l-short { display: none; }

.wrap { width: 100%; max-width: 1240px; margin-inline: auto; padding-inline: 24px; }
section { padding-block: clamp(76px, 10vw, 140px); }
h2 { font-size: clamp(1.85rem, 3.4vw, 2.9rem); font-weight: 800; }
html[lang="en"] h1, html[lang="en"] h2 { letter-spacing: -.015em; }
.lead { margin-top: 18px; max-width: 62ch; color: var(--ink-2); font-size: 1.15rem; }

/* ---------------------------------------------------------------- hero: the same trip, twice */
.hero { display: grid; grid-template-columns: minmax(0, 47%) minmax(0, 1fr); min-height: min(calc(100svh - 66px), 920px); padding: 0; }
.hero-copy { padding-block: clamp(40px, 5vw, 72px); padding-inline-start: max(24px, calc((100vw - 1240px) / 2 + 24px)); padding-inline-end: clamp(24px, 4vw, 64px);
  display: flex; flex-direction: column; justify-content: center; }
.hero h1 { font-size: clamp(2.3rem, 3.8vw, 3.5rem); font-weight: 900; line-height: 1.18; }
.hero-sub { margin-top: 20px; color: var(--ink-2); font-size: 1.15rem; max-width: 46ch; }

.ledger { margin-top: 30px; padding: 22px 24px 20px; border-radius: var(--r-3); background: var(--asphalt-2); border: 1px solid var(--line); max-width: 560px; }
.led-row { display: grid; grid-template-columns: 1fr auto; align-items: baseline; column-gap: 16px; }
.led-name { font-family: var(--f-sign); font-weight: 700; color: var(--ink-2); }
.led-time { font-family: var(--f-sign); font-weight: 900; font-size: clamp(2.4rem, 4vw, 3.3rem); line-height: 1; display: inline-flex; align-items: baseline; gap: 10px; }
.led-time small { font-size: 1rem; font-weight: 700; color: var(--ink-3); }
.led-note { grid-column: 1 / -1; display: flex; align-items: center; gap: 10px; margin-top: 8px; color: var(--ink-2); font-size: .95rem; }
.led-note b { color: var(--l-traffic); font-family: var(--f-sign); white-space: nowrap; }
.led-chip { width: 28px; flex: none; }
.led-other s { position: relative; text-decoration: none; color: var(--ink-3); }
.led-other s::after { content: ''; position: absolute; inset-inline: -6px; top: 50%; height: 5px; border-radius: 3px; background: var(--l-traffic);
  transform-origin: right; }
html[dir="ltr"] .led-other s::after { transform-origin: left; }
.js .led-other s::after { transform: scaleX(0); }
.play-led .led-other s::after { animation: strike .45s var(--ease-out) 1.3s forwards; }
.led-real { color: var(--l-traffic); }
.js .led-real { opacity: 0; }
.play-led .led-real { animation: rise .5s var(--ease-out) 1.75s forwards; }
.led-lane { margin-block: 18px; }
.led-ease .led-name, .led-ease .led-time b { color: var(--paint); }
.js .led-ease .led-time b { opacity: 0; }
.play-led .led-ease .led-time b { animation: rise .6s var(--ease-out) 2.2s forwards; }

.hero-act { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.hero-act .btn { padding-inline: 1em; }   /* both actions fit one row in the copy column */
.demo-label { margin-top: 18px; color: var(--ink-3); font-size: .875rem; }

.hero-map { position: relative; overflow: hidden; background: #121519; }
.hero-map::before { content: ''; position: absolute; z-index: 2; inset-block: 0; inset-inline-start: 0; width: 5px;
  background: repeating-linear-gradient(180deg, var(--paint) 0 34px, transparent 34px 62px); }
.hero-map svg { position: absolute; inset: 0; width: 100%; height: 100%; direction: ltr; }   /* labels anchor the same way in every language */
.map-road, .map-route-road, .map-bridge-case { fill: none; stroke: #303740; stroke-width: 4; stroke-linejoin: round; stroke-linecap: round; }
.map-minor { stroke: #232A32; stroke-width: 1.8; }
.map-water { fill: #0D2537; stroke: none; fill-rule: evenodd; }
.map-waterway { fill: none; stroke: #15394F; stroke-width: 7; }
.map-bridge-case { stroke: #0B0D10; stroke-width: 9; }
.map-route-road { stroke: #3A424D; stroke-width: 9; }
.rt-case { stroke: #0B0D10; stroke-width: 14; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.rt-a, .rt-b { fill: none; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1; }
.js .rt-a, .js .rt-b { stroke-dashoffset: 1; }
.play-map .rt-a, .play-map .rt-b { animation: draw 1.3s var(--ease-out) forwards; }
.rt-a { stroke: #8E8B83; stroke-width: 5; }
.play-map .rt-a { animation-delay: .3s; }
.rt-b { stroke: var(--paint); stroke-width: 7; }
.play-map .rt-b { animation-delay: 2s; animation-duration: 1.6s; }
.lbl { font-family: var(--f-sign); font-weight: 700; font-size: 16px; fill: #B1B6BE; paint-order: stroke; stroke: #121519; stroke-width: 5; stroke-linejoin: round; }
.lbl-water { fill: #6BA8CC; }
.car-still { display: block; }
.car-running .car-still { display: none; }
.map-motion { position: absolute; z-index: 3; inset-inline-end: 18px; inset-block-end: 18px; min-height: 44px; padding: 8px 14px; border: 1px solid var(--line-2); border-radius: var(--r-2); background: var(--asphalt-1); color: var(--ink-2); font: 600 .875rem var(--f-text); cursor: pointer; }
.map-motion:hover { color: var(--ink); border-color: var(--ink-3); }
.map-motion:focus-visible { outline: 2px solid var(--paint); outline-offset: 3px; }
.motion-paused *, .motion-paused *::before, .motion-paused *::after { animation-play-state: paused !important; }
.hero-calm .rt-a, .hero-calm .rt-b { stroke-dashoffset: 0; animation: none; }
.hero.hero-calm .led-real, .hero.hero-calm .led-ease .led-time b, .hero.hero-calm .jam-pop, .hero.hero-calm .jam-tag { opacity: 1; animation: none; }
.hero-calm .led-other s::after { transform: none; animation: none; }
.hero-calm .car { display: none; }
.hero-calm .car-still { display: block; }
.hero-calm .jam-pulse { display: none; }
.m use { fill: none; stroke: currentColor; }
/* the jam lands on the planned route as the ledger strikes the 18 */
.jam-pulse { fill: none; stroke: var(--l-traffic); stroke-width: 3; transform-box: fill-box; transform-origin: center; opacity: 0; }
.play-map .jam-pulse { animation: ping 2.6s ease-out 1.6s infinite; }
.jam-pop, .jam-tag { transform-box: fill-box; transform-origin: center; }
.js .jam-pop, .js .jam-tag { opacity: 0; }
.play-map .jam-pop { animation: pop .5s var(--ease-out) 1.3s forwards; }
.play-map .jam-tag { animation: rise .45s var(--ease-out) 1.6s forwards; }
.jam-tag rect { fill: var(--l-traffic); }
.jam-tag text { fill: #111; font: 800 15px var(--f-sign); }

@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes strike { to { transform: scaleX(1); } }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes pop { from { opacity: 0; transform: scale(.4); } to { opacity: 1; transform: none; } }
@keyframes ping { 0% { opacity: .9; transform: scale(1); } 80%, 100% { opacity: 0; transform: scale(2.4); } }

/* ---------------------------------------------------------------- what drivers reported, along the same route */
.ribbon { list-style: none; margin: 56px auto 0; padding: 0 24px; max-width: 1240px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  column-gap: clamp(24px, 4vw, 56px); position: relative; }
.ribbon::before { content: ''; position: absolute; inset-inline: 24px; top: 23px; height: 6px; border-radius: 3px; background: var(--paint); }
.stop { position: relative; }
.stop-mk { position: relative; z-index: 1; width: 52px; margin-bottom: 22px; box-shadow: 0 0 0 7px var(--asphalt-1); }
.stop .mk-live { box-shadow: 0 0 0 2.5px var(--asphalt-1), 0 0 0 7px var(--asphalt-1); }
.stop h3 { font-size: 1.2rem; font-weight: 800; }
.stop p { margin-top: 8px; color: var(--ink-2); max-width: 38ch; }

/* ---------------------------------------------------------------- fuel: price board on a station pylon */
.fuel-sec { background: var(--asphalt-0); }
.fuel-grid { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: 56px clamp(40px, 6vw, 96px); align-items: center; }
.totem { margin: 0; display: grid; justify-items: center; width: min(100%, 440px); justify-self: center; }
.totem-board { position: relative; width: 100%; margin-bottom: 58px; padding: 20px 24px 14px; border-radius: 14px; background: #040506;
  border: 10px solid #2A2E35; box-shadow: 0 30px 60px -30px rgba(0, 0, 0, .9); }
.totem-board::after { content: ''; position: absolute; top: calc(100% + 10px); left: 50%; width: 30px; height: 48px; transform: translateX(-50%);
  background: #2A2E35; border-radius: 0 0 4px 4px; }
.totem-board::before { content: ''; position: absolute; top: calc(100% + 54px); left: 50%; width: 120px; height: 6px; transform: translateX(-50%);
  background: #2A2E35; border-radius: 3px; }
.totem-head { display: flex; align-items: center; gap: 12px; padding-bottom: 14px; margin-bottom: 4px; border-bottom: 2px dashed #22262C;
  font-family: var(--f-sign); font-weight: 800; font-size: 1rem; color: var(--ink-2); }
.totem-head .mk-sq { width: 34px; }
.board { width: 100%; border-collapse: collapse; }
.board tr + tr { border-top: 1px solid #15181C; }
.board th { text-align: start; padding-block: 10px; font-family: var(--f-sign); font-weight: 800; font-size: 1.15rem; color: var(--ink); white-space: nowrap; }
.board-price { text-align: end; white-space: nowrap; }
.board-price b { display: inline-block; font-family: var(--f-sign); font-weight: 900; font-size: clamp(1.75rem, 3vw, 2.3rem);
  line-height: 1.15; color: var(--ink); }
.board-price small { margin-inline-start: 6px; color: var(--ink-3); font-weight: 700; font-size: .8rem; }
.board-none { color: var(--ink-3); font-size: .92rem; }
.board-off { width: 1%; padding-inline-start: 14px; text-align: end; white-space: nowrap; color: var(--ink-3); font-size: .82rem; }
.totem figcaption { color: var(--ink-3); font-size: .875rem; text-align: center; max-width: 44ch; }
.board-count { display: block; }   /* own line: the note ends in a full stop, a list separator after it reads wrong */

/* ---------------------------------------------------------------- download plate, then the line for businesses */
.download { padding-block: clamp(56px, 8vw, 110px); }
.dl-plate { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 28px 36px; align-items: center; padding: 40px 44px; border-radius: 24px;
  background: var(--paint); color: var(--paint-ink); box-shadow: inset 0 0 0 7px var(--paint), inset 0 0 0 10px var(--paint-ink); width: min(1192px, calc(100% - 32px)); }
.dl-plate h2 { font-size: clamp(1.6rem, 3vw, 2.4rem); }
.dl-plate > .brand-mark { width: 88px; height: 88px; color: var(--paint-ink); }
.dl-plate p { margin-top: 8px; font-weight: 600; }
.dl-soon { font-weight: 500; }
.dl-act { display: flex; flex-direction: column; gap: 10px; }
.dl-plate .btn-paint { background: var(--paint-ink); color: var(--paint); box-shadow: none; }
.dl-plate .btn-paint:hover { background: #2A2E35; }
.dl-plate .btn-line { color: var(--paint-ink); box-shadow: inset 0 0 0 2px var(--paint-ink); }
.dl-plate .btn-line:hover { background: rgba(18, 18, 18, .08); }
.dl-plate .btn[aria-disabled="true"] { opacity: 1; background: transparent; color: var(--paint-ink); box-shadow: inset 0 0 0 2px rgba(18, 18, 18, .35); }
.biz-line { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 32px; margin-top: 40px; padding-inline: 68px; }   /* text lines up with the plate's */
.biz-line p { flex: 1 1 320px; max-width: 54ch; color: var(--ink-2); font-size: 1.1rem; }
.biz-line b { color: var(--ink); font-family: var(--f-sign); font-weight: 800; }
.biz-act { display: flex; flex-wrap: wrap; gap: 10px; }

/* ---------------------------------------------------------------- contact page (Read mode) */
.contact { padding-block: clamp(48px, 8vw, 110px); }
.contact h1 { font-size: clamp(2rem, 4vw, 3rem); font-weight: 900; }
.contact-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 56px; }
.contact-topic { margin-top: 24px; color: var(--ink-2); max-width: 52ch; }
.form { display: grid; gap: 16px; }
.form label { display: grid; gap: 6px; }
.form label > span { font-weight: 600; color: var(--ink-2); font-size: .95rem; }
.form input, .form textarea, .form select { width: 100%; padding: 12px 14px; border-radius: var(--r-2); background: var(--asphalt-2);
  border: 1.5px solid var(--line-2); transition: border-color .15s; }
.form input:hover, .form textarea:hover { border-color: var(--ink-3); }
.form input:focus, .form textarea:focus, .form select:focus { outline: 2px solid var(--paint); outline-offset: 1px; border-color: var(--paint); }
.form textarea { resize: vertical; min-height: 140px; }
.form .btn { justify-self: start; }
.hp { position: absolute !important; inset-inline-start: -9999px; }
.note { display: flex; gap: 10px; align-items: center; padding: 12px 16px; border-radius: var(--r-2); font-weight: 600; }
.note.ok { background: rgba(47, 174, 102, .14); color: #7FE0A7; }
.note.bad { background: rgba(255, 82, 71, .14); color: #FF9D96; }

/* ---------------------------------------------------------------- footer */
.foot { border-top: 1px solid var(--line); padding-block: 36px 44px; }
.foot .brand-mark { width: 32px; height: 32px; }
.foot-in { max-width: 1240px; margin-inline: auto; padding-inline: 24px; display: flex; flex-wrap: wrap; align-items: center; gap: 16px 32px; }
.foot-nav { display: flex; gap: 20px; flex-wrap: wrap; }
.foot-nav a { color: var(--ink-2); text-decoration: none; font-weight: 600; }
.foot-nav a:hover { color: var(--ink); text-decoration: underline; }
.foot-meta { flex-basis: 100%; color: var(--ink-3); font-size: .875rem; }

/* ---------------------------------------------------------------- responsive */
/* short laptop screens: tighten the hero so the download button stays in the first view */
@media (min-width: 1181px) and (max-height: 820px) {
  .hero-copy { padding-block: 28px; }
  .hero h1 { font-size: clamp(2.2rem, 3.3vw, 3rem); }
  .hero-sub { margin-top: 14px; font-size: 1.05rem; }
  .ledger { margin-top: 20px; padding-block: 16px 14px; }
  .led-time { font-size: clamp(2.2rem, 3.4vw, 2.8rem); }
  .led-lane { margin-block: 12px; }
  .hero-act { margin-top: 20px; }
  .demo-label { margin-top: 10px; }
}
@media (max-width: 1100px) {
  .top-nav { display: none; }
  .langs { margin-inline-start: auto; }
}
@media (max-width: 1180px) {
  /* narrower than this, a side-by-side map column would crop the trip: stack the copy above the map */
  .hero { grid-template-columns: 1fr; min-height: 0; }
  .hero-copy { padding-inline: 20px; padding-block: 40px 36px; }
  .hero-map { aspect-ratio: 535 / 710; max-height: 880px; }
  .hero-map::before { inset-inline: 0; inset-block: 0 auto; width: auto; height: 5px;
    background: repeating-linear-gradient(90deg, var(--paint) 0 34px, transparent 34px 62px); }
}
@media (max-width: 960px) {
  /* the route runs down the side; each report sits on it */
  .ribbon { grid-template-columns: 1fr; row-gap: 8px; padding-inline: 20px; margin-top: 40px; }
  .ribbon::before { inset-inline: auto; inset-inline-start: 43px; top: 0; bottom: 0; width: 6px; height: auto; }
  .stop { display: grid; grid-template-columns: 52px 1fr; column-gap: 20px; padding-bottom: 20px; }
  .stop-mk { grid-row: 1 / span 2; margin: 0; }
  .stop h3 { align-self: center; }
  .contact-grid, .fuel-grid { grid-template-columns: 1fr; }
  .dl-plate { grid-template-columns: 1fr; padding: 32px 28px; }
  .dl-act { flex-direction: row; flex-wrap: wrap; }
  .biz-line { padding-inline: 44px; }
}
@media (max-width: 560px) {
  .top { gap: 12px; }
  .brand-local { display: none; }
  .l-full { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .l-short { display: inline; }
  .langs a { padding: 5px 8px; }
  .ledger { padding: 18px; }
  .totem-board { padding: 16px 16px 10px; border-width: 8px; }
  .board th { font-size: 1rem; }
  .board-off { grid-column: 1 / -1; display: block; width: auto; padding: 0 0 8px; text-align: start; }
  .board tr { display: grid; grid-template-columns: 1fr auto; align-items: baseline; }
}

/* ---------------------------------------------------------------- live map page */
.pg-map { overflow: hidden; }
.livemap { display: grid; grid-template-columns: 340px minmax(0, 1fr); height: calc(100svh - 66px); }
.lm-panel { overflow-y: auto; padding: 26px 22px 28px; background: var(--asphalt-1); border-inline-end: 1px solid var(--line); display: flex; flex-direction: column; gap: 18px; }
.lm-grab { display: none; }
.lm-panel h1 { font-size: 1.6rem; font-weight: 900; }
.lm-status { display: flex; align-items: center; gap: 10px; color: var(--ink-2); font-size: .95rem; min-height: 1.8em; }
.lm-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--ok); flex: none; }
.lm-dot.tick { animation: live 1.2s ease-out 1; }
@keyframes live { 0% { box-shadow: 0 0 0 0 rgba(47, 174, 102, .55); } 70%, 100% { box-shadow: 0 0 0 9px rgba(47, 174, 102, 0); } }
.lm-sub { font-size: .95rem; font-weight: 700; color: var(--ink-3); }
.lm-chips { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: -6px; }
.chip { display: flex; align-items: center; gap: 8px; min-height: 42px; padding: 6px 10px; border-radius: var(--r-2); border: 1.5px solid var(--line-2);
  background: var(--asphalt-2); cursor: pointer; font-weight: 600; font-size: .9rem; text-align: start; transition: border-color .15s, background-color .15s, opacity .15s; }
.chip .g { color: var(--c); width: 20px; height: 20px; }
.chip b { margin-inline-start: auto; font-family: var(--f-sign); color: var(--ink-2); font-size: .85rem; }
.chip:hover { border-color: var(--ink-3); }
.chip[aria-pressed="true"] { border-color: var(--c); }
.chip[aria-pressed="false"] { opacity: .5; background: transparent; }
.chip[aria-pressed="false"] span { text-decoration: line-through; text-decoration-color: var(--ink-3); }
.lm-legend { margin: 0; display: grid; gap: 10px; padding-top: 16px; border-top: 1px dashed var(--line-2); }
.lm-legend > div { display: flex; align-items: center; gap: 12px; }
.lm-legend dt { width: 36px; display: grid; place-items: center; }
.lm-legend dd { margin: 0; color: var(--ink-2); font-size: .92rem; }
.lm-legend .mk-live { width: 32px; } .lm-legend .mk-sq { width: 28px; } .lm-legend .mk-pin { width: 26px; }
.lm-app { margin-top: auto; display: flex; align-items: center; gap: 8px; color: var(--ink-2); font-size: .92rem; }
.lm-app .g { color: var(--paint); }
.lm-app a { color: var(--paint); font-weight: 700; }
.lm-map { position: relative; background: #121519; }

/* MapLibre surfaces themed to the world */
.maplibregl-ctrl-group { background: var(--asphalt-2) !important; border-radius: var(--r-2) !important; box-shadow: 0 0 0 1px var(--line) !important; overflow: hidden; }
.maplibregl-ctrl-group button + button { border-top: 1px solid var(--line) !important; }
.maplibregl-ctrl-group button { width: 38px !important; height: 38px !important; }
.maplibregl-ctrl-icon { filter: invert(.92); }
.maplibregl-ctrl-attrib, .maplibregl-ctrl-attrib.maplibregl-compact { background: var(--asphalt-2) !important; color: var(--ink-2) !important; }
.maplibregl-ctrl-attrib a { color: var(--ink-2) !important; }
.maplibregl-ctrl-attrib-button { filter: invert(.85); }
.er-pop .maplibregl-popup-content { background: var(--asphalt-2); color: var(--ink); border-radius: 14px; padding: 14px 16px; box-shadow: 0 16px 40px -12px rgba(0, 0, 0, .8), 0 0 0 1px var(--line);
  font-family: var(--f-text); font-size: .95rem; line-height: 1.6; }
.er-pop h3 { font-size: 1.05rem; font-weight: 800; margin-bottom: 4px; padding-inline-end: 18px; }
.er-pop .pp-meta { color: var(--ink-3); font-size: .85rem; }
.er-pop .pp-fuels { display: flex; flex-wrap: wrap; gap: 6px; margin-block: 6px; }
.er-pop .pp-fuels span { padding: 2px 8px; border-radius: 6px; background: var(--asphalt-3); box-shadow: inset 0 0 0 1px var(--l-fuel); color: var(--ink); font-size: .85rem; font-weight: 600; }
.er-pop .maplibregl-popup-close-button { color: var(--ink-2); font-size: 20px; inset-inline-end: 6px; inset-inline-start: auto; top: 4px; }
.er-pop.maplibregl-popup-anchor-bottom .maplibregl-popup-tip, .er-pop.maplibregl-popup-anchor-bottom-left .maplibregl-popup-tip,
.er-pop.maplibregl-popup-anchor-bottom-right .maplibregl-popup-tip { border-top-color: var(--asphalt-2); }
.er-pop.maplibregl-popup-anchor-top .maplibregl-popup-tip, .er-pop.maplibregl-popup-anchor-top-left .maplibregl-popup-tip,
.er-pop.maplibregl-popup-anchor-top-right .maplibregl-popup-tip { border-bottom-color: var(--asphalt-2); }
.er-pop.maplibregl-popup-anchor-left .maplibregl-popup-tip { border-right-color: var(--asphalt-2); }
.er-pop.maplibregl-popup-anchor-right .maplibregl-popup-tip { border-left-color: var(--asphalt-2); }

@media (max-width: 860px) {
  .livemap { grid-template-columns: 1fr; grid-template-rows: minmax(0, 1fr) auto; }
  .lm-map { grid-row: 1; }
  .lm-panel { grid-row: 2; max-height: 42svh; border-inline-end: 0; border-top: 1px solid var(--line); border-radius: 20px 20px 0 0; padding: 10px 16px 18px; gap: 12px; }
  .lm-grab { display: block; width: 40px; height: 4px; border-radius: 2px; background: var(--line-2); margin: 0 auto 4px; }
  .lm-panel h1 { font-size: 1.25rem; }
  .lm-chips { grid-template-columns: repeat(4, max-content); overflow-x: auto; margin-inline: -16px; padding-inline: 16px; padding-bottom: 4px; }
  .lm-legend, .lm-sub { display: none; }
}

/* ---------------------------------------------------------------- shared trip page (t.php) */
.pg-trip { overflow: hidden; }
.trip { position: relative; height: calc(100svh - 66px); }
.trip > .trip-map-full { position: absolute; inset: 0; background: #121519; }   /* beats .maplibregl-map { position: relative }, which loads later */
.trip-panel { position: absolute; z-index: 2; inset-block-start: 16px; inset-inline-start: 16px; width: min(380px, calc(100% - 32px)); display: grid; gap: 10px;
  padding: 20px 22px; border-radius: 20px; background: rgba(15, 17, 20, .96); box-shadow: 0 0 0 1px var(--line), 0 30px 60px -30px rgba(0, 0, 0, .9); }
.trip-state { display: flex; align-items: center; gap: 10px; color: var(--ink-2); font-size: .92rem; }
.lm-dot.off { background: var(--ink-3); }
.lm-dot.warn { background: var(--warn); }
.lm-dot.done { background: var(--paint); }
.trip-panel h1 { font-size: 1.5rem; font-weight: 900; }
.trip-dest { margin-top: -6px; color: var(--ink-2); }
.trip-nums { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding-block: 12px; border-block: 1px dashed var(--line-2); }
.trip-nums div { display: grid; line-height: 1.25; }
.trip-nums span { color: var(--ink-2); font-size: .85rem; font-weight: 600; }
.trip-nums b { font-family: var(--f-sign); font-weight: 900; font-size: 2rem; }
.trip-nums div:first-child b { color: var(--paint); }
.trip-nums small { color: var(--ink-2); font-size: .85rem; }
.trip-note { display: flex; gap: 10px; color: var(--ink-3); font-size: .85rem; line-height: 1.6; }
.trip-note .g { width: 18px; height: 18px; margin-top: 3px; }
.trip-get { justify-self: start; min-height: 42px; }
.trip-car svg { display: block; }
.trip [hidden] { display: none !important; }
.trip-panel #t-fit { justify-self: start; min-height: 48px; }
@media (max-width: 860px) {
  .trip-panel { inset-block: auto 0; inset-inline: 0; width: 100%; border-radius: 20px 20px 0 0; padding-bottom: max(18px, env(safe-area-inset-bottom)); }
}

/* ---------------------------------------------------------------- legal (Read mode) */
.legal { padding-block: clamp(48px, 7vw, 96px); }
.legal-in { max-width: 760px; }
.legal-tabs { display: flex; gap: 6px; margin-bottom: 36px; padding: 4px; background: var(--asphalt-2); border-radius: var(--r-2); width: fit-content; }
.legal-tabs a { padding: 8px 16px; border-radius: var(--r-1); text-decoration: none; font-weight: 700; color: var(--ink-2); }
.legal-tabs a[aria-current] { background: var(--asphalt-3); color: var(--paint); }
.legal h1 { font-size: clamp(2rem, 4vw, 2.8rem); font-weight: 900; }
.legal-date { margin-top: 10px; color: var(--ink-3); font-size: .92rem; }
.legal h2 { font-size: 1.25rem; font-weight: 800; margin-top: 40px; }
.legal h2 + p { margin-top: 10px; color: var(--ink-2); max-width: 68ch; }

