@font-face {
  font-family: 'Alte Haas';
  src: url('/fonts/altehaas-bold.woff2') format('woff2');
  font-weight: 700;
  font-display: swap;
}

:root {
  --red: #DA291C;
  --yellow: #FFC72C;
  --yellow-ink: #27251F;
  --green: #1F8A3B;
  --bg: #FFFFFF;
  --surface: #F6F5F2;
  --raise: #FFFFFF;
  --line: #E7E4DD;
  --ink: #27251F;
  --muted: #6E695F;
  --shadow: 0 1px 2px rgba(39, 37, 31, .06), 0 8px 24px rgba(39, 37, 31, .07);
  --head: 'Alte Haas', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --body: system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --r: 18px;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121110;
    --surface: #1B1A18;
    --raise: #22211E;
    --line: #2F2D29;
    --ink: #F4F2EC;
    --muted: #A39E92;
    --green: #3CB05C;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .35);
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.45 var(--body);
  -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent;
}
button, input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; }
h1, h2, h3, .head { font-family: var(--head); font-weight: 700; letter-spacing: -0.02em; line-height: 1.02; margin: 0; }
h1 { font-size: clamp(34px, 9vw, 46px); }
h2 { font-size: 26px; }
h3 { font-size: 19px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.wrap { max-width: 560px; margin: 0 auto; padding: 0 16px; }
.stack > * + * { margin-top: 12px; }
.row { display: flex; align-items: center; gap: 10px; }
.between { justify-content: space-between; }
.grow { flex: 1; min-width: 0; }
.hide { display: none !important; }

/* top bar */
.bar { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.bar .wrap { display: flex; align-items: center; justify-content: space-between; height: 58px; gap: 10px; }
.mark { font-family: var(--head); font-size: 22px; letter-spacing: -0.03em; text-decoration: none; white-space: nowrap; }
.mark b { color: var(--red); }
.pill { display: inline-flex; align-items: center; gap: 7px; padding: 6px 12px; border-radius: 99px; background: var(--surface); font-size: 13px; font-weight: 600; white-space: nowrap; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
.dot.on { background: var(--green); box-shadow: 0 0 0 4px color-mix(in srgb, var(--green) 22%, transparent); }

/* buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; padding: 0 22px;
  border: 0; border-radius: 99px; background: var(--yellow); color: var(--yellow-ink); font-family: var(--head);
  font-size: 18px; letter-spacing: -0.01em; cursor: pointer; text-decoration: none; transition: transform .12s ease, filter .12s;
}
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .45; cursor: default; }
.btn.block { width: 100%; }
.btn.red { background: var(--red); color: #fff; }
.btn.ghost { background: var(--surface); color: var(--ink); }
.btn.line { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line); }
.btn.sm { min-height: 40px; padding: 0 16px; font-size: 15px; }
.btn.xs { min-height: 32px; padding: 0 12px; font-size: 13px; }
.link { background: none; border: 0; padding: 0; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; color: var(--muted); font-size: 14px; }

/* cards */
.card { background: var(--raise); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; }
.card.flat { background: var(--surface); border-color: transparent; }
.card.lift { box-shadow: var(--shadow); border-color: transparent; }
.note { border-radius: 14px; padding: 12px 14px; background: color-mix(in srgb, var(--yellow) 22%, var(--bg)); font-size: 14px; }
.note.red { background: color-mix(in srgb, var(--red) 12%, var(--bg)); }

/* forms */
label.f { display: block; }
label.f > span { display: block; font-size: 13px; font-weight: 600; margin: 0 0 6px 4px; color: var(--muted); }
.in {
  width: 100%; min-height: 52px; padding: 13px 16px; border-radius: 14px; border: 1.5px solid var(--line);
  background: var(--raise); font-size: 16px; outline: none; transition: border-color .15s;
}
.in:focus { border-color: var(--ink); }
textarea.in { min-height: 76px; resize: vertical; }
.seg { display: flex; padding: 4px; gap: 4px; border-radius: 99px; background: var(--surface); }
.seg button { flex: 1; min-height: 44px; border: 0; border-radius: 99px; background: transparent; font-weight: 700; cursor: pointer; font-size: 15px; }
.seg button.on { background: var(--raise); box-shadow: var(--shadow); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { min-height: 40px; padding: 0 14px; border-radius: 99px; border: 1.5px solid var(--line); background: var(--raise); cursor: pointer; font-size: 14px; font-weight: 600; }
.chip.on { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.chip:disabled { opacity: .4; text-decoration: line-through; }
.toggle { appearance: none; width: 50px; height: 30px; border-radius: 99px; background: var(--line); position: relative; cursor: pointer; transition: background .2s; flex: none; margin: 0; }
.toggle::after { content: ''; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .2s; }
.toggle:checked { background: var(--green); }
.toggle:checked::after { transform: translateX(20px); }

/* stepper */
.step { display: inline-flex; align-items: center; gap: 4px; }
.step button { width: 36px; height: 36px; border-radius: 50%; border: 1.5px solid var(--line); background: var(--raise); font-size: 20px; line-height: 1; cursor: pointer; }
.step button:disabled { opacity: .35; }
.step b { min-width: 22px; text-align: center; font-family: var(--head); font-size: 18px; }

/* sheet */
.scrim { position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 50; opacity: 0; transition: opacity .2s; }
.scrim.in { opacity: 1; }
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 51; max-height: 92vh; overflow: auto; background: var(--bg);
  border-radius: 24px 24px 0 0; padding: 10px 0 calc(18px + env(safe-area-inset-bottom)); transform: translateY(100%);
  transition: transform .28s cubic-bezier(.2,.8,.2,1);
}
.sheet.in { transform: none; }
.sheet .grab { width: 40px; height: 5px; border-radius: 9px; background: var(--line); margin: 0 auto 12px; }
@media (min-width: 640px) { .sheet { left: 50%; right: auto; width: 560px; margin-left: -280px; } }

/* sticky bottom action */
.dock { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; padding: 12px 0 calc(12px + env(safe-area-inset-bottom)); background: linear-gradient(transparent, var(--bg) 30%); }
.spacer { height: 110px; }

/* toast */
.toast { position: fixed; left: 50%; top: 14px; z-index: 99; transform: translate(-50%, -140%); background: var(--ink); color: var(--bg); padding: 12px 18px; border-radius: 99px; font-weight: 600; font-size: 14px; transition: transform .25s; max-width: 92vw; text-align: center; }
.toast.in { transform: translate(-50%, 0); }
.toast.bad { background: var(--red); color: #fff; }

.price { font-family: var(--head); font-size: 20px; }
.big-price { font-family: var(--head); font-size: 40px; letter-spacing: -0.03em; }
.hr { height: 1px; background: var(--line); margin: 14px 0; }
.sumrow { display: flex; justify-content: space-between; padding: 3px 0; }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }

/* ---------- the chat (customer side) ---------- */
.thread { display: flex; flex-direction: column; gap: 8px; padding: 18px 0 8px; }
.msg { display: flex; gap: 8px; align-items: flex-end; animation: rise .32s cubic-bezier(.2,.8,.2,1) both; }
.msg.u { justify-content: flex-end; }
.ava { width: 32px; height: 32px; border-radius: 50%; background: var(--red); color: #fff; flex: none; display: flex; align-items: center; justify-content: center; font: 700 13px/1 var(--head); letter-spacing: -0.04em; white-space: nowrap; }
.ava b { color: var(--yellow); }
.ava.ghost { visibility: hidden; }
.bub { max-width: 82%; padding: 11px 15px; border-radius: 20px; font-size: 16px; line-height: 1.38; overflow-wrap: anywhere; }
.msg.k .bub { background: var(--surface); border-bottom-left-radius: 6px; }
.msg.u .bub { background: var(--yellow); color: var(--yellow-ink); border-bottom-right-radius: 6px; font-weight: 600; }
.bub strong { font-family: var(--head); font-weight: 700; letter-spacing: -0.01em; }
.who { font-size: 12px; color: var(--muted); margin: 10px 0 0 40px; font-weight: 600; }
.w { margin-left: 40px; animation: rise .36s cubic-bezier(.2,.8,.2,1) both; }
.w.done { pointer-events: none; opacity: .5; }
.typing { display: inline-flex; gap: 4px; padding: 15px 16px; }
.typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); animation: blink 1.1s infinite; }
.typing i:nth-child(2) { animation-delay: .15s; }
.typing i:nth-child(3) { animation-delay: .3s; }
@keyframes blink { 0%, 60%, 100% { opacity: .25; transform: none; } 30% { opacity: 1; transform: translateY(-3px); } }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } }

.plate { display: flex; gap: 14px; align-items: center; width: 100%; text-align: left; padding: 14px; border-radius: var(--r); border: 1px solid var(--line); background: var(--raise); cursor: pointer; transition: transform .12s, box-shadow .2s; }
.plate:hover { box-shadow: var(--shadow); }
.plate:active { transform: scale(.985); }
.plate:disabled { opacity: .45; cursor: default; }
.plate .em { width: 60px; height: 60px; border-radius: 16px; background: var(--yellow); display: grid; place-items: center; font-size: 32px; flex: none; }
.plate h3 { font-size: 18px; }
.opt { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.opt:last-child { border-bottom: 0; }
.choice { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.choice button { min-height: 92px; border-radius: var(--r); border: 1.5px solid var(--line); background: var(--raise); cursor: pointer; text-align: left; padding: 14px; display: flex; flex-direction: column; justify-content: space-between; gap: 6px; }
.choice button:active { transform: scale(.98); }
.choice .t { font-family: var(--head); font-size: 18px; }
.choice .d { font-size: 13px; color: var(--muted); }
.paydot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.trust { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; color: var(--muted); }

/* live tracker card */
.live { padding: 0; overflow: hidden; }
.live .top { padding: 16px 16px 0; }
.live .eta { font-family: var(--head); font-size: 34px; letter-spacing: -0.03em; }
.scene { display: block; width: 100%; height: auto; }
.scene .road { fill: none; stroke: var(--line); stroke-width: 10; stroke-linecap: round; }
.scene .trail { fill: none; stroke: var(--yellow); stroke-width: 10; stroke-linecap: round; transition: stroke-dashoffset .2s; }
.scene .dash { fill: none; stroke: var(--bg); stroke-width: 1.5; stroke-dasharray: 6 8; }
.scene .bob { animation: bob .5s ease-in-out infinite alternate; }
.scene .puff { fill: var(--muted); opacity: 0; animation: puff 1.2s ease-out infinite; }
.scene .puff:nth-of-type(2) { animation-delay: .4s; }
.scene .puff:nth-of-type(3) { animation-delay: .8s; }
.scene.still .bob, .scene.still .puff { animation: none; }
.scene .ping { fill: var(--red); opacity: .25; transform-origin: center; transform-box: fill-box; animation: ping 1.6s ease-out infinite; }
@keyframes bob { to { transform: translateY(-1.5px); } }
@keyframes puff { 0% { opacity: .35; transform: translate(0, 0) scale(.6); } 100% { opacity: 0; transform: translate(-14px, -6px) scale(1.4); } }
@keyframes ping { 0% { transform: scale(.6); opacity: .45; } 100% { transform: scale(2.2); opacity: 0; } }
.steps4 { display: flex; gap: 6px; padding: 0 16px 16px; }
.steps4 span { flex: 1; height: 4px; border-radius: 9px; background: var(--line); }
.steps4 span.on { background: var(--ink); }
.pill.compact span:last-child { display: none; }
.pill.compact { padding: 6px 9px; }
.mark { display: inline-flex; align-items: center; gap: 8px; }
.mark .logo { height: 40px; width: auto; display: block; }
.ava { background: #fff; overflow: hidden; box-shadow: 0 0 0 1px var(--line); }
.ava img { width: 100%; height: 100%; display: block; }
img.thanks { width: 180px; height: auto; display: block; margin: 4px 0 2px; filter: drop-shadow(0 6px 16px rgba(39,37,31,.15)); animation: rise .5s cubic-bezier(.2,.8,.2,1) both; }
.ava { width: 40px; height: 40px; }
.who { margin-left: 48px; }
.w { margin-left: 48px; }
.mark .logo { height: 46px; }
