/* FuelDosth — professional infinite panels + app-themed UI mocks */

@import url("https://fonts.googleapis.com/css2?family=Outfit:wght@500;600;700;800&family=Source+Sans+3:wght@400;500;600;700&display=swap");

:root {
  --red: #c95456;
  --red-action: #d05353;
  --red-soft: #e07a7c;
  --red-deep: #9e3f41;
  --navy: #2d4256;
  --navy-deep: #15202b;
  --navy-save: #34495e;
  --ink: #1a1a1a;
  --body-text: #424242;
  --mist: #757575;
  --page: #f4f4f4;
  --card: #ffffff;
  --border: #e8e8e8;
  --open: #2e7d32;
  --closed: #e53935;
  --crowd-low: #2e7d32;
  --crowd-mid: #ef6c00;
  --info: #1a73e8;
  --petrol: #1a73e8;
  --diesel: #5f6368;
  --cng: #34a853;
  --lpg: #f57c00;
  --ev: #7b1fa2;
  --gold: #f5c542;
  --silver: #c0c7ce;
  --bronze: #cd7f32;
  --display: "Outfit", ui-sans-serif, system-ui, sans-serif;
  --body: "Source Sans 3", ui-sans-serif, system-ui, sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --line: rgba(255, 255, 255, 0.12);
  --line-dark: rgba(15, 23, 32, 0.1);
  --foam: #e8eef3;
  --white: #f7f9fb;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

html:not(:has(body.legal)),
body:not(.legal) {
  overflow: hidden;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--body);
  color: var(--ink);
  background: var(--page);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
}

img {
  display: block;
  max-width: 100%;
}

/* —— Page field: same gray the app uses behind white screens —— */
.stage {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  background: var(--page);
}

.stage__base {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 55% at 72% 42%, rgba(255, 255, 255, 0.95) 0%, rgba(255, 255, 255, 0) 68%),
    linear-gradient(180deg, #ffffff 0%, #ffffff 4.5rem, var(--page) 4.5rem);
}

.stage__base::before,
.stage__base::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  pointer-events: none;
}

.stage__base::before {
  width: 46vw;
  height: 46vw;
  top: -12vw;
  right: -10vw;
  background: radial-gradient(circle, rgba(201, 84, 86, 0.12), transparent 65%);
  animation: drift-a 18s ease-in-out infinite alternate;
}

.stage__base::after {
  width: 40vw;
  height: 40vw;
  bottom: -14vw;
  left: -10vw;
  background: radial-gradient(circle, rgba(45, 66, 86, 0.1), transparent 65%);
  animation: drift-b 22s ease-in-out infinite alternate;
}

@keyframes drift-a {
  to {
    transform: translate(-6vw, 5vh) scale(1.08);
  }
}

@keyframes drift-b {
  to {
    transform: translate(5vw, -4vh) scale(1.05);
  }
}

/* Route lines: faint dashed paths flowing like a road on the map. */
.stage__route {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.stage__route-line {
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-dasharray: 2 16;
  animation: route-flow 70s linear infinite;
}

.stage__route-line--red {
  stroke: var(--red);
  opacity: 0.14;
}

.stage__route-line--navy {
  stroke: var(--navy);
  opacity: 0.1;
  animation-duration: 100s;
  animation-direction: reverse;
}

@keyframes route-flow {
  to {
    stroke-dashoffset: -1440;
  }
}

/* Floating map pins + fuel drops: brand-colored, slow, barely-there. */
.stage__floats {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.pin-wrap {
  position: absolute;
  display: block;
  animation: pin-drift var(--dur, 15s) ease-in-out var(--delay, 0s) infinite alternate;
}

.pin {
  display: block;
  width: 100%;
  height: auto;
  opacity: 0.85;
  filter: drop-shadow(0 8px 12px rgba(26, 26, 46, 0.14));
  animation: pin-bob calc(var(--dur, 15s) / 2) ease-in-out var(--delay, 0s) infinite alternate;
}

.pin-wrap--1 { width: 40px; top: 14%; left: 6%; --dur: 16s; }
.pin-wrap--2 { width: 30px; top: 56%; right: 5%; --dur: 19s; --delay: -7s; opacity: 0.8; }
.pin-wrap--3 { width: 24px; bottom: 11%; left: 13%; --dur: 13s; --delay: -4s; opacity: 0.65; }

@keyframes pin-drift {
  from {
    transform: translate(0, 0);
  }
  to {
    transform: translate(10px, -18px);
  }
}

@keyframes pin-bob {
  from {
    transform: rotate(-5deg);
  }
  to {
    transform: rotate(6deg);
  }
}

/* Location pulse under a pin, like a live map marker. */
.pulse {
  position: absolute;
  left: 50%;
  bottom: -7px;
  width: 26px;
  height: 26px;
  margin-left: -13px;
  border: 2px solid var(--red);
  border-radius: 50%;
  opacity: 0;
  animation: pulse-ring 3.8s ease-out infinite;
}

.pulse--navy {
  border-color: var(--navy);
  animation-delay: 1.9s;
}

@keyframes pulse-ring {
  0% {
    transform: scale(0.35);
    opacity: 0.3;
  }
  70% {
    opacity: 0.08;
  }
  100% {
    transform: scale(1.45);
    opacity: 0;
  }
}

.drop {
  position: absolute;
  display: block;
  border-radius: 50% 50% 50% 0;
  opacity: 0.07;
  transform: rotate(-45deg);
  animation: drop-float var(--dur, 16s) ease-in-out var(--delay, 0s) infinite alternate;
}

.drop--1 { width: 26px; height: 26px; background: var(--navy); top: 10%; right: 12%; --dur: 21s; }
.drop--2 { width: 16px; height: 16px; background: var(--red); top: 68%; left: 5%; --dur: 17s; --delay: -6s; }
.drop--3 { width: 20px; height: 20px; background: var(--gold); top: 34%; left: 44%; --dur: 15s; --delay: -3s; }
.drop--4 { width: 15px; height: 15px; background: var(--red); top: 82%; right: 22%; --dur: 19s; --delay: -11s; }

@keyframes drop-float {
  from {
    transform: rotate(-45deg) translate(0, 0);
  }
  to {
    transform: rotate(-45deg) translate(12px, -26px);
  }
}

/* —— Shell —— */
.shell {
  position: relative;
  z-index: 1;
  height: 100dvh;
  overflow-x: hidden;
  overflow-y: auto;
  scroll-snap-type: y mandatory;
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: #d5d5d5 transparent;
}

/* —— Topbar —— */
.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.7rem clamp(1rem, 3vw, 2rem);
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(12px);
  transition: box-shadow 0.3s var(--ease);
}

.topbar--scrolled {
  box-shadow: 0 10px 30px rgba(26, 26, 46, 0.08);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: var(--navy);
}

.brand img {
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 8px;
  background: #fff;
  object-fit: contain;
  box-shadow: 0 0 0 1px rgba(26, 26, 26, 0.06);
}

.brand__name {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
}

.brand__name .r {
  color: var(--red);
}

.topbar__links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.15rem 1rem;
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 0.86rem;
  font-weight: 600;
}

.topbar__links a {
  text-decoration: none;
  color: var(--mist);
  transition: color 0.2s var(--ease);
}

.topbar__links a:hover,
.topbar__links a.is-active {
  color: var(--navy);
}

.topbar__links .cta {
  color: #fff;
  background: var(--red);
  padding: 0.45rem 0.95rem;
  border-radius: 12px;
}

.topbar__links .cta:hover,
.topbar__links .cta.is-active {
  color: #fff;
}

.topbar__links .cta:hover {
  background: var(--red-deep);
  color: #fff;
}

.nav-toggle {
  display: none;
  margin-left: auto;
  align-items: center;
  gap: 0.45rem;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--navy);
  border-radius: 12px;
  padding: 0.42rem 0.75rem;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
}

.nav-toggle__bars {
  width: 0.95rem;
  height: 0.7rem;
  background:
    linear-gradient(var(--navy), var(--navy)) 0 0 / 100% 2px no-repeat,
    linear-gradient(var(--navy), var(--navy)) 0 50% / 100% 2px no-repeat,
    linear-gradient(var(--navy), var(--navy)) 0 100% / 100% 2px no-repeat;
}

@media (max-width: 980px) {
  .nav-toggle {
    display: inline-flex;
  }

  .topbar__links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0.35rem 1rem 0.9rem;
    background: #fff;
    border-bottom: 1px solid var(--border);
    box-shadow: 0 16px 32px rgba(26, 26, 46, 0.08);
  }

  .topbar.is-open .topbar__links {
    display: flex;
  }

  .topbar__links a {
    padding: 0.72rem 0.15rem;
    border-bottom: 1px solid #f2f2f2;
  }

  .topbar__links .cta {
    margin-top: 0.7rem;
    text-align: center;
    border-bottom: 0;
  }
}

/* —— Rail —— */
.rail {
  position: fixed;
  right: clamp(0.75rem, 2vw, 1.4rem);
  top: 50%;
  transform: translateY(-50%);
  z-index: 35;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.rail button {
  width: 9px;
  height: 9px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #d8d8d8;
  cursor: pointer;
  transition: height 0.28s var(--ease), background 0.28s var(--ease);
}

.rail button[aria-current="true"] {
  background: var(--red);
  height: 22px;
  border-radius: 6px;
}

@media (max-width: 640px) {
  .rail {
    display: none;
  }
}

/* —— Panels —— */
.panel {
  position: relative;
  min-height: 100dvh;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(0, 0.98fr);
  align-items: center;
  gap: clamp(1.25rem, 2.6vw, 3rem);
  width: min(1680px, calc(100% - clamp(1.25rem, 3.5vw, 4rem)));
  margin: 0 auto;
  padding: clamp(4.6rem, 8vh, 5.75rem) 0 clamp(1.4rem, 3vh, 2.25rem);
  box-sizing: border-box;
}

.panel__frame {
  width: 100%;
  max-width: 40rem;
  min-width: 0;
  justify-self: start;
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.42s var(--ease), transform 0.48s var(--ease);
}

.panel.is-active .panel__frame {
  opacity: 1;
  transform: none;
}

.panel__index {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  margin: 0 0 0.85rem;
  font-family: var(--display);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--red);
}

.panel__index::before {
  content: "";
  width: 1.75rem;
  height: 1px;
  background: var(--red);
}

.panel__title {
  position: relative;
  margin: 0 0 0.85rem;
  padding-bottom: 0.55rem;
  font-family: var(--display);
  font-size: clamp(1.7rem, 4.2vw, 2.75rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: var(--navy);
}

.panel__title::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 3rem;
  height: 3px;
  border-radius: 2px;
  background: var(--red);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.55s var(--ease) 0.2s;
}

.panel.is-active .panel__title::after {
  transform: scaleX(1);
}

.panel__copy {
  margin: 0;
  font-size: clamp(0.98rem, 1.7vw, 1.08rem);
  color: var(--body-text);
}

.panel__list {
  margin: 1rem 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.55rem;
}

.panel__list li {
  position: relative;
  padding-left: 1.1rem;
  color: var(--body-text);
  font-size: 0.95rem;
  line-height: 1.4;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.4s var(--ease), transform 0.42s var(--ease);
}

.panel.is-active .panel__list li {
  opacity: 1;
  transform: none;
}

.panel.is-active .panel__list li:nth-child(1) { transition-delay: 0.06s; }
.panel.is-active .panel__list li:nth-child(2) { transition-delay: 0.1s; }
.panel.is-active .panel__list li:nth-child(3) { transition-delay: 0.14s; }
.panel.is-active .panel__list li:nth-child(4) { transition-delay: 0.18s; }
.panel.is-active .panel__list li:nth-child(5) { transition-delay: 0.22s; }
.panel.is-active .panel__list li:nth-child(6) { transition-delay: 0.26s; }

.panel__list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.5em;
  width: 0.38rem;
  height: 0.38rem;
  border-radius: 50%;
  background: var(--red);
}

.panel__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 1rem;
}

.chip {
  display: inline-flex;
  align-items: center;
  padding: 0.28rem 0.7rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  background: #fff;
  border: 1px solid var(--border);
  color: var(--navy);
}

.chip--petrol {
  border-color: #c5daf8;
  background: #f3f8fe;
  color: var(--petrol);
}
.chip--diesel {
  border-color: #e0e0e0;
  background: #f5f5f5;
  color: var(--diesel);
}
.chip--cng {
  border-color: #c8e6c9;
  background: #f1f8f2;
  color: var(--cng);
}
.chip--lpg {
  border-color: #ffe0b2;
  background: #fff8f0;
  color: var(--lpg);
}
.chip--ev {
  border-color: #e1bee7;
  background: #faf4fc;
  color: var(--ev);
}

.panel__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 1.5rem;
}

/* Buttons and store badges share one 2-column grid, so both rows
   line up column-for-column and items in a row are equal width. */
.panel .panel__actions,
.panel .store-badges {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  width: min(100%, 28rem);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0.45rem 1.25rem;
  border-radius: 12px;
  font-family: var(--body);
  font-weight: 700;
  font-size: 0.92rem;
  line-height: 1.2;
  text-decoration: none;
  border: 1.5px solid transparent;
  transition: background 0.2s, border-color 0.2s, transform 0.2s;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn--solid {
  background: var(--red);
  color: #fff;
}

.btn--solid:hover {
  background: var(--red-deep);
  box-shadow: 0 10px 22px rgba(201, 84, 86, 0.3);
}

.btn--line {
  background: #fff;
  color: var(--navy);
  border-color: #e0e0e0;
}

.btn--line:hover {
  border-color: var(--navy);
  box-shadow: 0 8px 18px rgba(26, 26, 46, 0.08);
}

:where(a, button):focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 2px;
  border-radius: 6px;
}

::selection {
  background: rgba(201, 84, 86, 0.18);
}

/* Store badges: Google Play live, App Store pending launch. */
.store-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 0.7rem;
}

.store-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  min-height: 46px;
  padding: 0.3rem 0.95rem 0.3rem 0.75rem;
  background: var(--navy-deep);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  text-decoration: none;
  color: #fff;
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease), background 0.2s;
}

.store-badge svg {
  width: 1.35rem;
  height: 1.35rem;
  fill: #fff;
  flex-shrink: 0;
}

.store-badge span {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
  font-weight: 700;
  font-size: 0.92rem;
  letter-spacing: -0.01em;
}

.store-badge small {
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  opacity: 0.75;
}

a.store-badge:hover {
  transform: translateY(-1px);
  background: #1f2f40;
  box-shadow: 0 10px 22px rgba(21, 32, 43, 0.28);
}

.store-badge--soon {
  opacity: 0.55;
  cursor: default;
}

.panel--hero .panel__tagline {
  position: relative;
  padding-bottom: 0.6rem;
  font-size: clamp(1.85rem, 2.8vw, 2.45rem);
}

.panel--hero .panel__tagline::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 3.4rem;
  height: 3px;
  border-radius: 2px;
  background: var(--red);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.55s var(--ease) 0.35s;
}

.panel--hero.is-active .panel__tagline::after {
  transform: scaleX(1);
}

.panel--hero .panel__tagline,
.panel--hero .panel__copy,
.panel--hero .panel__actions {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.5s var(--ease), transform 0.55s var(--ease);
}

.panel--hero.is-active .panel__tagline {
  opacity: 1;
  transform: none;
  transition-delay: 0.05s;
}

.panel--hero.is-active .panel__copy {
  opacity: 1;
  transform: none;
  transition-delay: 0.16s;
}

.panel--hero.is-active .panel__actions {
  opacity: 1;
  transform: none;
  transition-delay: 0.3s;
}

.panel__tagline {
  margin: 0 0 0.75rem;
  font-family: var(--display);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.25;
  color: var(--navy);
}

.panel__tagline .accent {
  color: var(--red);
  font-weight: 700;
}

.panel--support .panel__copy a {
  color: var(--red);
  font-weight: 600;
  text-decoration: none;
}

.panel--support .panel__copy a:hover {
  text-decoration: underline;
}

/* Copyable support email — works even without a mail client. */
.email-chip {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1rem;
  padding: 0.6rem 0.8rem;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 6px 18px rgba(26, 26, 46, 0.06);
  font: inherit;
  cursor: pointer;
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease), transform 0.2s var(--ease);
}

.email-chip:hover {
  border-color: var(--red);
  box-shadow: 0 10px 22px rgba(26, 26, 46, 0.09);
  transform: translateY(-1px);
}

.email-chip svg {
  width: 1.05rem;
  height: 1.05rem;
  color: var(--red);
  flex-shrink: 0;
}

.email-chip__addr {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--navy);
  word-break: break-all;
}

.email-chip__hint {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--red);
  background: #fdf1f1;
  padding: 0.25rem 0.55rem;
  border-radius: 999px;
  transition: background 0.2s, color 0.2s;
}

.email-chip.is-copied .email-chip__hint {
  color: #fff;
  background: var(--open);
}

.panel__meta {
  margin-top: 1.75rem;
  padding-top: 1.1rem;
  border-top: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 1.35rem;
  font-size: 0.9rem;
  color: var(--mist);
}

.panel__meta a {
  color: var(--navy);
  text-decoration: none;
  font-weight: 600;
}

.panel__meta a:hover {
  color: var(--red);
}

.scroll-hint {
  position: absolute;
  bottom: 0.85rem;
  left: 0;
  right: 0;
  justify-content: center;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--mist);
  font-weight: 600;
  opacity: 0;
  animation: hint-in 0.5s var(--ease) 0.55s forwards;
}

.scroll-hint__bar {
  width: 1px;
  height: 1.6rem;
  background: var(--red);
  transform-origin: top;
  animation: hint-travel 1.5s var(--ease) infinite;
}

@keyframes hint-in {
  to {
    opacity: 1;
  }
}

@keyframes hint-travel {
  0%,
  100% {
    transform: scaleY(0.45);
    opacity: 0.35;
  }
  45% {
    transform: scaleY(1);
    opacity: 1;
  }
}

/* Hero phone: brand block with mascot, then a live-price station card. */
.ui-hero {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 0.85rem 0.85rem 0.7rem;
  text-align: center;
  box-shadow: 0 6px 18px rgba(26, 26, 46, 0.06);
  flex-shrink: 0;
  margin-bottom: 0.55rem;
}

.ui-hero__mascot {
  width: min(64%, 230px);
  height: auto;
  margin: 0 auto;
}

.ui-hero__tag {
  margin: 0.3rem 0 0;
  font-size: 0.84rem;
  line-height: 1.35;
  font-weight: 600;
  color: var(--navy);
}

.ui-hero__tag span {
  color: var(--red);
  font-weight: 700;
}

/* Support phone: link rows with chevrons. */
.ui-link-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.5rem 0.1rem;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--navy);
  border-bottom: 1px solid #f0f0f0;
}

.ui-link-row:last-child {
  border-bottom: 0;
}

.ui-link-row span {
  color: var(--mist);
  font-weight: 400;
  font-size: 1rem;
  line-height: 1;
}

.ui-card__logo--img {
  border-radius: 9px;
  background: #fff;
  object-fit: contain;
  box-shadow: 0 0 0 1px rgba(26, 26, 26, 0.06);
}

@media (min-width: 1200px) and (min-height: 880px) {
  .panel--hero .panel__tagline {
    font-size: clamp(2.15rem, 4.4vh, 3.35rem);
  }
}

/* —— Visual column (app UI mocks) —— */
.panel__visual {
  position: relative;
  width: 100%;
  min-width: 0;
  justify-self: stretch;
  opacity: 0;
  transform: translateX(28px);
  transition: opacity 0.42s var(--ease) 0.06s, transform 0.48s var(--ease) 0.06s;
}

@media (min-width: 981px) {
  .panel__frame {
    display: flex;
    flex-direction: column;
    justify-content: center;
  }
}

.panel.is-active .panel__visual {
  opacity: 1;
  transform: none;
}

@media (max-width: 980px) {
  .panel {
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
    width: min(720px, calc(100% - 1.5rem));
    gap: 1.25rem;
  }

  .panel__frame {
    max-width: none;
  }
}

@media (max-width: 980px), (max-height: 760px) {
  html:not(:has(body.legal)),
  body:not(.legal) {
    height: auto;
    overflow: auto;
  }

  .shell {
    height: auto;
    min-height: 100dvh;
    overflow-x: clip;
    overflow-y: visible;
    scroll-snap-type: none;
  }

  .panel {
    min-height: 0;
    scroll-snap-align: none;
    scroll-snap-stop: normal;
    padding-top: 5.1rem;
    padding-bottom: 2.75rem;
  }

  .scroll-hint {
    position: static;
    margin-top: 1.25rem;
    animation: none;
    opacity: 1;
  }
}

/* Screen pieces ease in from the right, matching the app's page push. */
.ui-stack > * {
  opacity: 0;
  transform: translateX(16px);
  transition: opacity 0.4s var(--ease), transform 0.46s var(--ease);
}

.panel.is-active .ui-stack > * {
  opacity: 1;
  transform: none;
}

.panel.is-active .ui-stack > *:nth-child(2) {
  transition-delay: 0.08s;
}

.panel.is-active .ui-stack > *:nth-child(3) {
  transition-delay: 0.14s;
}

/* —— App-themed UI building blocks —— */
.ui-stack {
  position: relative;
  display: grid;
  gap: 0.75rem;
}

.ui-phone {
  background: var(--page);
  border-radius: 22px;
  padding: 0.85rem 0.85rem 0.7rem;
  color: var(--ink);
  box-shadow:
    0 0 0 7px #fff,
    0 0 0 8px #e6e6e6,
    0 18px 40px rgba(26, 26, 46, 0.1);
  display: flex;
  flex-direction: column;
  width: min(100%, 560px);
  max-width: 100%;
  height: auto;
  overflow: visible;
}

.ui-phone__mail {
  margin: 0.85rem 0 0;
  font-size: 0.75rem;
  color: var(--mist);
  text-align: center;
}

.ui-tabs {
  display: flex;
  align-items: center;
  justify-content: space-around;
  margin-top: auto;
  padding: 0.75rem 0.1rem 0.2rem;
  border-top: 1px solid #eeeeee;
  flex-shrink: 0;
}

.ui-tabs span {
  width: 22px;
  height: 22px;
  background-color: #9e9e9e;
  -webkit-mask: center / contain no-repeat;
  mask: center / contain no-repeat;
}

.ui-tabs span.is-on {
  background-color: #1a1a2e;
}

.ui-tabs span.has-pulse {
  position: relative;
}

.ui-tabs span.has-pulse::after {
  content: "";
  position: absolute;
  top: -2px;
  right: -3px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--red);
  -webkit-mask: none;
  mask: none;
}

.ui-tabs span:nth-child(1) {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M12 3.2 3 11h2v9h6v-6h2v6h6v-9h2z'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M12 3.2 3 11h2v9h6v-6h2v6h6v-9h2z'/%3E%3C/svg%3E");
}
.ui-tabs span:nth-child(2) {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M7 4h10v2a5 5 0 0 1-3.2 4.7A5 5 0 0 1 17 15.2V20H7v-4.8a5 5 0 0 1 3.2-4.5A5 5 0 0 1 7 6z'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M7 4h10v2a5 5 0 0 1-3.2 4.7A5 5 0 0 1 17 15.2V20H7v-4.8a5 5 0 0 1 3.2-4.5A5 5 0 0 1 7 6z'/%3E%3C/svg%3E");
}
.ui-tabs span:nth-child(3) {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l2.1-2.1a6 6 0 0 1-7.5 7.5L7.4 19.6a1.5 1.5 0 0 1-2.1-2.1l4.9-4.9a6 6 0 0 1 7.5-7.5z'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l2.1-2.1a6 6 0 0 1-7.5 7.5L7.4 19.6a1.5 1.5 0 0 1-2.1-2.1l4.9-4.9a6 6 0 0 1 7.5-7.5z'/%3E%3C/svg%3E");
}
.ui-tabs span:nth-child(4) {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M12 22a2.2 2.2 0 0 0 2.2-2.2h-4.4A2.2 2.2 0 0 0 12 22zm7-6V11a7 7 0 0 0-5-6.7V4a2 2 0 1 0-4 0v.3A7 7 0 0 0 5 11v5l-1.6 1.6A1 1 0 0 0 4.1 19h15.8a1 1 0 0 0 .7-1.7z'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M12 22a2.2 2.2 0 0 0 2.2-2.2h-4.4A2.2 2.2 0 0 0 12 22zm7-6V11a7 7 0 0 0-5-6.7V4a2 2 0 1 0-4 0v.3A7 7 0 0 0 5 11v5l-1.6 1.6A1 1 0 0 0 4.1 19h15.8a1 1 0 0 0 .7-1.7z'/%3E%3C/svg%3E");
}
.ui-tabs span:nth-child(5) {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M5 11 6.5 6.5A2 2 0 0 1 8.4 5h7.2a2 2 0 0 1 1.9 1.5L19 11v6a1 1 0 0 1-1 1h-1a1 1 0 0 1-1-1v-1H8v1a1 1 0 0 1-1 1H6a1 1 0 0 1-1-1zm2.2 1.5a1.3 1.3 0 1 0 0-2.6 1.3 1.3 0 0 0 0 2.6zm9.6 0a1.3 1.3 0 1 0 0-2.6 1.3 1.3 0 0 0 0 2.6z'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M5 11 6.5 6.5A2 2 0 0 1 8.4 5h7.2a2 2 0 0 1 1.9 1.5L19 11v6a1 1 0 0 1-1 1h-1a1 1 0 0 1-1-1v-1H8v1a1 1 0 0 1-1 1H6a1 1 0 0 1-1-1zm2.2 1.5a1.3 1.3 0 1 0 0-2.6 1.3 1.3 0 0 0 0 2.6zm9.6 0a1.3 1.3 0 1 0 0-2.6 1.3 1.3 0 0 0 0 2.6z'/%3E%3C/svg%3E");
}

.ui-phone__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
  padding: 0 0.15rem;
  flex-shrink: 0;
}

.ui-phone__title {
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
}

.ui-phone__title .r {
  color: var(--red);
}
.ui-phone__title .n {
  color: var(--navy);
}
.ui-phone__title .k {
  color: var(--ink);
}

.ui-search {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: #f5f5f5;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.55rem 0.75rem;
  font-size: 0.8rem;
  color: var(--mist);
  margin-bottom: 0.65rem;
}

.ui-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 0.7rem;
}

.ui-pill {
  padding: 0.28rem 0.65rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
  background: var(--navy);
  color: #fff;
}

.ui-pill--red {
  background: var(--red);
}
.ui-pill--ghost {
  background: #fff;
  color: var(--navy);
  border: 1px solid var(--border);
}

/* Station card */
.ui-card {
  position: relative;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.75rem;
  overflow: hidden;
  box-shadow: 0 6px 18px rgba(26, 26, 46, 0.06);
  flex-shrink: 0;
}

.ui-card + .ui-card {
  margin-top: 0.55rem;
}

.ui-card__ribbon {
  position: absolute;
  top: 0;
  right: 0;
  background: var(--red-action);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 800;
  padding: 0.28rem 0.55rem 0.28rem 0.7rem;
  border-radius: 0 12px 0 10px;
}

.ui-card__row {
  display: flex;
  gap: 0.65rem;
  align-items: flex-start;
}

.ui-card__logo {
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 8px;
  background: var(--navy);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 0.65rem;
  font-weight: 800;
  flex-shrink: 0;
}

.ui-card__name {
  margin: 0;
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--ink);
}

.ui-card__meta {
  margin: 0.15rem 0 0;
  font-size: 0.72rem;
  color: var(--mist);
}

.ui-card__status {
  display: inline-block;
  margin-top: 0.25rem;
  font-size: 0.68rem;
  font-weight: 800;
  color: var(--open);
}

.ui-prices {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.4rem;
  margin-top: 0.65rem;
}

.ui-price {
  background: #f7f7f7;
  border-radius: 8px;
  padding: 0.4rem 0.5rem;
}

.ui-price__label {
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: var(--mist);
}

.ui-price__val {
  font-family: var(--display);
  font-weight: 800;
  font-size: 0.95rem;
  color: var(--navy);
}

.ui-price__sub {
  font-size: 0.62rem;
  color: var(--mist);
}

.ui-wait {
  margin-top: 0.55rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.72rem;
  font-weight: 700;
}

.ui-wait--low {
  color: var(--crowd-low);
}
.ui-wait--mid {
  color: var(--crowd-mid);
}

.ui-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.4rem;
  margin-top: 0.65rem;
}

.ui-btn {
  text-align: center;
  padding: 0.45rem;
  border-radius: 8px;
  font-size: 0.75rem;
  font-weight: 800;
}

.ui-btn--muted {
  background: #f0f0f0;
  color: var(--navy);
}
.ui-btn--navy {
  background: var(--navy);
  color: #fff;
}

/* Map float */
.ui-map {
  position: relative;
  height: 120px;
  border-radius: 14px;
  background: #e4edf3;
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: 0 6px 18px rgba(26, 26, 46, 0.06);
}

.ui-map__route {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.ui-map__route path {
  fill: none;
  stroke: rgba(255, 255, 255, 0.92);
  stroke-width: 8;
  stroke-linecap: round;
}

.ui-map__route path.route {
  stroke: var(--red);
  stroke-width: 2.75;
  stroke-linecap: round;
  stroke-dasharray: 280;
  stroke-dashoffset: 280;
}

.panel.is-active .ui-map__route path.route {
  animation: route-draw 0.9s var(--ease) 0.15s forwards;
}

@keyframes route-draw {
  to {
    stroke-dashoffset: 0;
  }
}

.ui-pin {
  position: absolute;
  width: 28px;
  height: 36px;
  object-fit: contain;
  filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.25));
}

/* Confirm / credits sheet */
.ui-sheet {
  background: #fff;
  border-radius: 16px;
  padding: 0.85rem;
  border: 1px solid var(--border);
  color: var(--ink);
  box-shadow: 0 6px 18px rgba(26, 26, 46, 0.06);
  flex-shrink: 0;
}

.ui-sheet__h {
  margin: 0 0 0.65rem;
  font-family: var(--display);
  font-weight: 800;
  font-size: 0.95rem;
  color: var(--navy);
}

.ui-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.45rem 0;
  border-bottom: 1px solid #f0f0f0;
  font-size: 0.8rem;
}

.ui-row:last-child {
  border-bottom: 0;
}

.ui-confirm {
  background: var(--red);
  color: #fff;
  border: 0;
  border-radius: 8px;
  padding: 0.3rem 0.65rem;
  font-size: 0.7rem;
  font-weight: 800;
}

.ui-credit {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.65rem;
  background: #fff8e7;
  color: #8a6a10;
  border-radius: 999px;
  padding: 0.35rem 0.75rem;
  font-size: 0.78rem;
  font-weight: 800;
}

/* Leaderboard podium */
.ui-podium {
  display: grid;
  grid-template-columns: 1fr 1.15fr 1fr;
  gap: 0.4rem;
  align-items: end;
  background: #fff;
  border-radius: 16px;
  padding: 0.85rem 0.65rem 0.65rem;
  border: 1px solid var(--border);
  color: var(--ink);
  box-shadow: 0 6px 18px rgba(26, 26, 46, 0.06);
  flex-shrink: 0;
}

.ui-lb-list {
  display: grid;
  gap: 0.4rem;
  margin-top: 0.55rem;
}

.ui-lb-list .ui-lb-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.45rem 0.6rem;
  font-size: 0.75rem;
  color: var(--ink);
}

.ui-lb-list .ui-lb-row span:last-child {
  margin-left: auto;
}

.ui-pod {
  text-align: center;
}

.ui-pod__avatar {
  width: 2.4rem;
  height: 2.4rem;
  margin: 0 auto 0.35rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 0.75rem;
  color: #fff;
  border: 3px solid var(--silver);
}

.ui-pod--1 .ui-pod__avatar {
  width: 2.85rem;
  height: 2.85rem;
  border-color: var(--gold);
  background: var(--navy);
}
.ui-pod--2 .ui-pod__avatar {
  background: var(--red);
  border-color: var(--silver);
}
.ui-pod--3 .ui-pod__avatar {
  background: var(--navy-save);
  border-color: var(--bronze);
}

.ui-pod__name {
  font-size: 0.68rem;
  font-weight: 700;
  margin: 0;
}

.ui-pod__pts {
  font-size: 0.65rem;
  color: var(--mist);
  margin: 0.1rem 0 0.35rem;
}

.ui-pod__block {
  height: 2.2rem;
  border-radius: 8px 8px 4px 4px;
  background: #eceff2;
}
.ui-pod--1 .ui-pod__block {
  height: 3.1rem;
  background: linear-gradient(180deg, #ffe9a8, #f5c542);
}
.ui-pod--2 .ui-pod__block {
  background: linear-gradient(180deg, #e8ecf0, #c0c7ce);
}
.ui-pod--3 .ui-pod__block {
  height: 1.7rem;
  background: linear-gradient(180deg, #e8c4a8, #cd7f32);
}

.ui-lb-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.45rem 0.6rem;
  font-size: 0.75rem;
  color: var(--ink);
  box-shadow: 0 6px 18px rgba(26, 26, 46, 0.06);
}

.ui-lb-row--you {
  border-color: var(--red);
  background: #fff5f5;
}

.ui-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  color: var(--info);
  font-size: 0.68rem;
  font-weight: 700;
}

/* Vehicles */
.ui-garage {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  flex-shrink: 0;
}

.ui-vehicle {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.55rem;
  text-align: center;
  color: var(--ink);
  box-shadow: 0 6px 18px rgba(26, 26, 46, 0.05);
}

.ui-vehicle img {
  width: 100%;
  height: 56px;
  object-fit: contain;
  margin: 0 auto 0.35rem;
}

.ui-vehicle__name {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 800;
}

.ui-vehicle__type {
  display: inline-block;
  margin-top: 0.2rem;
  font-size: 0.6rem;
  font-weight: 800;
  background: #eef2f5;
  color: var(--navy);
  padding: 0.12rem 0.4rem;
  border-radius: 999px;
}

.ui-chart {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.65rem;
  color: var(--ink);
  box-shadow: 0 6px 18px rgba(26, 26, 46, 0.06);
  margin-top: 0.55rem;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.ui-chart__tabs {
  display: flex;
  gap: 0.3rem;
  margin-bottom: 0.55rem;
}

.ui-chart__tabs span {
  font-size: 0.65rem;
  font-weight: 800;
  padding: 0.22rem 0.5rem;
  border-radius: 999px;
  background: #f0f0f0;
  color: var(--mist);
}

.ui-chart__tabs span.is-on {
  background: var(--navy);
  color: #fff;
}

.ui-bars {
  display: flex;
  align-items: flex-end;
  gap: 0.35rem;
  flex: 1;
  min-height: 72px;
  padding-top: 0.25rem;
}

.ui-bars i {
  flex: 1;
  display: block;
  border-radius: 4px 4px 0 0;
  background: var(--red);
  transform-origin: bottom;
  transform: scaleY(0);
}

.panel.is-active .ui-bars i {
  animation-name: bar-in;
  animation-duration: 0.55s;
  animation-timing-function: var(--ease);
  animation-fill-mode: forwards;
}

.ui-bars i:nth-child(1) {
  height: 45%;
}
.ui-bars i:nth-child(2) {
  height: 70%;
  animation-delay: 0.05s;
}
.ui-bars i:nth-child(3) {
  height: 55%;
  animation-delay: 0.1s;
}
.ui-bars i:nth-child(4) {
  height: 88%;
  animation-delay: 0.15s;
}
.ui-bars i:nth-child(5) {
  height: 62%;
  animation-delay: 0.2s;
}
.ui-bars i:nth-child(6) {
  height: 78%;
  animation-delay: 0.25s;
}

@keyframes bar-in {
  to {
    transform: scaleY(1);
  }
}

/* Auth */
.ui-auth {
  background: #fff;
  border-radius: 16px;
  padding: 1rem;
  border: 1px solid var(--border);
  color: var(--ink);
  text-align: center;
}

.ui-auth__logo {
  width: 3rem;
  height: 3rem;
  margin: 0 auto 0.55rem;
  border-radius: 10px;
}

.ui-auth__btn {
  display: block;
  width: 100%;
  margin-top: 0.45rem;
  padding: 0.65rem;
  border-radius: 10px;
  font-size: 0.8rem;
  font-weight: 800;
}

.ui-auth__btn--navy {
  background: var(--navy);
  color: #fff;
}
.ui-auth__btn--google {
  background: #fff;
  color: #3c4043;
  border: 1px solid #e0e0e0;
}

/* Pit stop */
.ui-wip {
  display: inline-block;
  background: #fff3e0;
  color: #ef6c00;
  font-size: 0.68rem;
  font-weight: 800;
  padding: 0.25rem 0.55rem;
  border-radius: 999px;
  margin-bottom: 0.55rem;
}

.ui-pit {
  background: #fff;
  border-radius: 16px;
  padding: 0.9rem;
  border: 1px solid var(--border);
  color: var(--ink);
  box-shadow: 0 6px 18px rgba(26, 26, 46, 0.06);
  flex-shrink: 0;
}

.ui-pit h4 {
  margin: 0 0 0.35rem;
  font-family: var(--display);
  font-size: 1rem;
}

.ui-pit h4 .n {
  color: var(--navy);
}

.ui-pit p {
  margin: 0 0 0.65rem;
  font-size: 0.78rem;
  color: var(--body-text);
}

.ui-pit__card {
  margin-top: 0.55rem;
}

.ui-pit__cta-row {
  margin-top: 0.85rem;
  text-align: center;
}

.ui-pit__cta {
  display: inline-block;
  background: var(--red);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 800;
  padding: 0.5rem 1.1rem;
  border-radius: 16px;
}

.ui-pit__social {
  margin-top: 0.55rem;
  font-size: 0.7rem;
  color: var(--mist);
  font-weight: 600;
  text-align: center;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .shell {
    scroll-behavior: auto;
  }
  .scroll-hint,
  .scroll-hint__bar,
  .ui-map__route path.route,
  .ui-bars i,
  .stage__base::before,
  .stage__base::after,
  .stage__route-line,
  .pin-wrap,
  .pin,
  .pulse,
  .drop {
    animation: none !important;
  }
  .pulse {
    display: none;
  }
  .ui-bars i {
    transform: none;
  }
  .ui-map__route path.route {
    stroke-dashoffset: 0;
  }
  .panel__title::after,
  .panel--hero .panel__tagline::after {
    transform: scaleX(1);
    transition: none;
  }
  .panel__frame,
  .panel__visual,
  .panel__list li,
  .ui-stack > *,
  .scroll-hint,
  .panel--hero .panel__tagline,
  .panel--hero .panel__copy,
  .panel--hero .panel__actions {
    opacity: 1;
    transform: none;
    translate: none;
    transition: none;
  }
}

/* —— Legal —— */
body.legal {
  height: auto;
  overflow: auto;
  background: var(--page);
  color: var(--ink);
  font-family: var(--body);
}

.legal-bar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.9rem clamp(1rem, 3vw, 2rem);
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid var(--line-dark);
  backdrop-filter: blur(10px);
}

.legal-bar h1 {
  margin: 0;
  font-family: var(--display);
  font-size: 1.2rem;
  font-weight: 700;
}

.legal-bar h1 a {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  text-decoration: none;
  color: inherit;
}

.legal-bar h1 img {
  width: 1.85rem;
  height: 1.85rem;
  border-radius: 6px;
  background: #fff;
}

.legal-bar h1 .r {
  color: var(--red);
}
.legal-bar h1 .b {
  color: var(--navy);
}

.legal-bar nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.1rem;
  font-size: 0.88rem;
  font-weight: 600;
}

.legal-bar nav a {
  color: var(--navy);
  text-decoration: none;
}

.legal-bar nav a:hover {
  color: var(--red);
}

.legal-wrap {
  max-width: 42rem;
  margin: 0 auto;
  padding: 1.25rem clamp(1rem, 3vw, 1.5rem) 3.5rem;
}

.legal-meta {
  color: var(--mist);
  font-size: 0.88rem;
  margin: 0.5rem 0 1rem;
}

.legal-toolbar {
  text-align: right;
  margin-bottom: 0.85rem;
  font-size: 0.85rem;
}

.legal-toolbar button {
  background: none;
  border: none;
  color: var(--navy);
  font-weight: 600;
  cursor: pointer;
  padding: 0 0.25rem;
  font-family: inherit;
}

.legal-toolbar button:hover {
  color: var(--red);
}

.legal-wrap details {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  margin-bottom: 0.55rem;
  padding: 0.85rem 1rem;
}

.legal-wrap summary {
  font-family: var(--display);
  font-weight: 650;
  font-size: 0.98rem;
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  color: var(--navy);
}

.legal-wrap summary::-webkit-details-marker {
  display: none;
}

.legal-wrap summary::after {
  content: "";
  width: 0.45rem;
  height: 0.45rem;
  border-right: 2px solid var(--mist);
  border-bottom: 2px solid var(--mist);
  transform: rotate(45deg);
  flex-shrink: 0;
  transition: transform 0.2s;
}

.legal-wrap details[open] summary {
  margin-bottom: 0.55rem;
}

.legal-wrap details[open] summary::after {
  transform: rotate(-135deg);
  margin-top: 0.2rem;
}

.legal-wrap details p {
  margin: 0;
  color: var(--body-text);
  font-size: 0.95rem;
}

.legal-wrap details p a {
  color: var(--red);
  font-weight: 600;
  text-decoration: none;
}

.legal-wrap details p a:hover {
  text-decoration: underline;
}

.legal-footer {
  margin-top: 1.75rem;
  font-size: 0.92rem;
  color: var(--mist);
}

.legal-footer .store-badges {
  margin: 0 0 0.85rem;
}

.legal-footer a {
  color: var(--red);
  font-weight: 600;
  text-decoration: none;
}

.legal-footer a:hover {
  text-decoration: underline;
}
