/* Milo landing. Light by default; :root[data-theme="dark"] is the visitor's own choice (web/site.js). Tokens follow the app (src/ui/theme.ts): ink on ice-white, green only for the main action and money.
   Shape rule: cards and images 28px, the phone 46px (a device), every button a full pill. */
@font-face { font-family: "Inter Tight"; font-weight: 400; font-display: swap; src: url(fonts/InterTight_400Regular.ttf) format("truetype"); }
@font-face { font-family: "Inter Tight"; font-weight: 500; font-display: swap; src: url(fonts/InterTight_500Medium.ttf) format("truetype"); }
@font-face { font-family: "Inter Tight"; font-weight: 600; font-display: swap; src: url(fonts/InterTight_600SemiBold.ttf) format("truetype"); }
@font-face { font-family: "Inter Tight"; font-weight: 700; font-display: swap; src: url(fonts/InterTight_700Bold.ttf) format("truetype"); }

:root {
  --bg: #F4F4F1; --surface: #FFFFFF; --sunk: #ECECE7; --fg: #151514; --muted: #5E5D57; --line: rgba(21,21,20,.08);
  --green: #0E7A42; --green-ink: #0A5A31; --on-green: #FFFFFF; --mint: #E3F1E8; --ink: #151514; --on-ink: #F4F4F1;
  --shadow: 0 1px 0 rgba(21,21,20,.04), 0 24px 60px -24px rgba(21,40,28,.22);
  --glass: rgba(244,244,241,.72);
  --ease: cubic-bezier(.16,1,.3,1);
  --font: "Inter Tight", ui-sans-serif, system-ui, -apple-system, sans-serif;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #0F1311; --surface: #171C19; --sunk: #1E2420; --fg: #EFEFEA; --muted: #A3A39B; --line: rgba(255,255,255,.08);
  --green: #3DBF78; --green-ink: #7FD9A6; --on-green: #08130D; --mint: #17301F; --ink: #EFEFEA; --on-ink: #0F1311;
  --shadow: 0 1px 0 rgba(255,255,255,.04), 0 24px 60px -24px rgba(0,0,0,.7);
  --glass: rgba(15,19,17,.7); color-scheme: dark; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 80px; }
body { margin: 0; background: var(--bg); color: var(--fg); font-family: var(--font); font-size: 17px; line-height: 1.55;
  -webkit-font-smoothing: antialiased; font-feature-settings: "ss01", "cv11"; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: -.035em; line-height: 1.04; text-wrap: balance; }
h2 { font-size: clamp(2rem, 4vw, 3.25rem); }
h3 { font-size: 1.375rem; letter-spacing: -.02em; line-height: 1.15; }
p { margin: 0; text-wrap: pretty; }
.wrap { width: min(1200px, 100% - 32px); margin-inline: auto; }
.muted { color: var(--muted); }
.lede { color: var(--muted); font-size: 1.125rem; max-width: 34ch; }
.num { font-variant-numeric: tabular-nums; }
.eyebrow { font-size: .8125rem; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: var(--green); }
:focus-visible { outline: 2px solid var(--green); outline-offset: 3px; border-radius: 8px; }

/* Buttons */
.btn { display: inline-flex; align-items: center; gap: .55rem; height: 52px; padding: 0 1.5rem; border-radius: 999px; border: 0;
  font: 600 1rem/1 var(--font); letter-spacing: -.01em; text-decoration: none; white-space: nowrap; cursor: pointer;
  transition: transform .2s var(--ease), background-color .2s var(--ease), box-shadow .2s var(--ease); }
.btn:active { transform: scale(.98); }
.btn i { font-size: 1.25rem; }
.btn-primary { background: var(--green); color: var(--on-green); box-shadow: 0 10px 30px -12px rgba(14,122,66,.6); }
.btn-primary:hover { background: var(--green-ink); }
.btn-ink { background: var(--ink); color: var(--on-ink); height: 42px; padding: 0 1.1rem; font-size: .9375rem; }
.btn-ink:hover { transform: translateY(-1px); }
.link { display: inline-flex; align-items: center; gap: .4rem; font-weight: 500; text-decoration: none; color: var(--fg); }
.link i { transition: transform .25s var(--ease); }
.link:hover i { transform: translateX(3px); }

/* Nav (floating control, so glass is allowed) */
.nav { position: fixed; inset: 0 0 auto; z-index: 10; background: var(--glass); border-bottom: 1px solid var(--line);
  -webkit-backdrop-filter: saturate(160%) blur(18px); backdrop-filter: saturate(160%) blur(18px); }
.nav .wrap { height: 64px; display: flex; align-items: center; gap: 2rem; }
.brand { display: inline-flex; align-items: center; gap: .55rem; font-weight: 700; font-size: 1.125rem; letter-spacing: -.02em; text-decoration: none; }
.nav ul { display: flex; gap: 1.75rem; list-style: none; margin: 0 0 0 auto; padding: 0; font-size: .9375rem; }
.nav ul a { text-decoration: none; color: var(--muted); transition: color .2s; }
.nav ul a:hover { color: var(--fg); }
@media (prefers-reduced-transparency: reduce) { .nav { background: var(--bg); backdrop-filter: none; -webkit-backdrop-filter: none; } }

/* Hero */
.hero { padding: 112px 0 72px; min-height: min(100dvh, 920px); display: grid; align-items: center; position: relative; overflow: hidden; }
.hero::before { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(40rem 32rem at 78% 55%, color-mix(in srgb, var(--green) 14%, transparent), transparent 70%); }
.hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 3rem; align-items: center; position: relative; }
.hero h1 { font-size: clamp(2.75rem, 6vw, 5.25rem); letter-spacing: -.045em; line-height: .98; margin: 1rem 0 1.5rem; max-width: 11ch; }
.hero .lede { font-size: 1.25rem; max-width: 30ch; }
.hero-ctas { display: flex; flex-wrap: wrap; align-items: center; gap: 1.5rem; margin-top: 2.25rem; }
.stage { position: relative; justify-self: center; }
.phone { width: clamp(250px, 23vw, 310px); padding: 9px; border-radius: 46px; background: #121413; box-shadow: var(--shadow), inset 0 0 0 1.5px #2b2e2c; }
.phone img { border-radius: 38px; }
/* Hero stage: the phone plays the app demo; Milo explains each step beside it. */
.phone { position: relative; z-index: 2; }

/* Apple's official App Store badge, unmodified (Apple's minimum on screen is 40px tall). */
.app-badge { display: inline-flex; flex: none; line-height: 0; border-radius: 9px; transition: transform .2s var(--ease), box-shadow .2s var(--ease); }
.app-badge img { height: 48px; width: auto; }
.app-badge-lg img { height: 56px; }
.nav .app-badge img { height: 40px; }
.app-badge:hover { transform: translateY(-1px); box-shadow: 0 12px 26px -14px rgba(0,0,0,.55); }
.app-badge:active { transform: scale(.98); }
.app-badge:focus-visible { outline: 2px solid var(--green); outline-offset: 3px; }

/* Rates marquee: the one marquee on the page */
.rates { border-block: 1px solid var(--line); background: var(--surface); }
.rates .wrap { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 2rem; height: 76px; }
.rates-label { text-decoration: none; font-weight: 600; font-size: .9375rem; letter-spacing: -.01em; white-space: nowrap; }
.marquee { overflow: hidden; scrollbar-width: none; mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); }
.track { display: flex; width: max-content; animation: slide 48s linear infinite; }
.marquee:hover .track, .marquee:focus-within .track { animation-play-state: paused; }
.rate-list { display: flex; gap: 2.75rem; padding-right: 2.75rem; list-style: none; margin: 0; }
.rate-list li { white-space: nowrap; font-size: .9375rem; color: var(--muted); }
.rate-list b { color: var(--fg); font-weight: 600; margin-left: .45rem; font-variant-numeric: tabular-nums; }
@keyframes slide { to { transform: translateX(-50%); } }

/* How it works: sticky phone, steps scroll past */
/* How it works: a pinned scene. The copy and the phone stay put; scrolling through .how-pin moves the active step. */
.how { padding-top: 60px; overflow-x: clip; } /* clip, not hidden: hidden would break the sticky scene */
.how-pin { position: relative; height: 300vh; }
.how-sticky { position: sticky; top: 0; height: 100dvh; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: clamp(2rem, 6vw, 6rem); align-items: center; padding-top: 64px; }
.how-sticky::before { content: ""; position: absolute; inset: 10% -10% 0 40%; pointer-events: none; z-index: -1;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--green) 16%, transparent), transparent); }
.how-head { max-width: 15ch; margin-bottom: 2.5rem; }
.how-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .25rem; max-width: 34rem; }
.step { position: relative; padding: .5rem 0 .5rem 1.75rem; }
.step::before { content: ""; position: absolute; left: 0; top: .9rem; bottom: .9rem; width: 2px; border-radius: 2px; background: var(--line); transition: background-color .6s var(--ease); }
.step.on::before { background: var(--green); }
.step-title { appearance: none; border: 0; background: none; padding: .35rem 0; margin: 0; font: inherit; color: inherit; text-align: left; cursor: pointer; }
.step-title:focus-visible { outline: 2px solid var(--green); outline-offset: 4px; border-radius: 8px; }
.step h3 { font-size: clamp(1.75rem, 3vw, 2.5rem); letter-spacing: -.04em; opacity: .3; filter: blur(1.5px); transition: opacity .8s var(--ease), filter .8s var(--ease); }
.step.on h3 { opacity: 1; filter: none; }
/* The paragraph folds open with grid rows, fading out of a blur as it grows. */
.step-body { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .8s var(--ease); }
.step-body > div { overflow: hidden; }
.step.on .step-body { grid-template-rows: 1fr; }
.step p { color: var(--muted); font-size: 1.125rem; max-width: 36ch; padding: .25rem 0 .75rem; opacity: 0; filter: blur(4px); transform: translateY(8px);
  transition: opacity .7s var(--ease) .1s, filter .7s var(--ease) .1s, transform .9s var(--ease) .1s; }
.step.on p { opacity: 1; filter: none; transform: none; }
.step-shot { display: none; }
/* Triggers cover only the pinned stretch (the screen's middle line runs from 50vh to 250vh), so each step gets an equal share. */
.how-triggers { position: absolute; inset: 50vh 0 50vh; display: grid; grid-template-rows: repeat(3, 1fr); pointer-events: none; }
.how-phone { position: relative; }
.how-phone .phone { width: min(30vw, 360px, calc((100dvh - 150px) * .46)); }
.screens { position: relative; border-radius: 38px; overflow: hidden; }
.screens img { border-radius: 0; }
.screens img + img { position: absolute; inset: 0; }
/* Screens crossfade: the next one rises out of a blur while the last one drifts up and softens. */
.screens img { opacity: 0; filter: blur(10px); transform: translateY(28px) scale(1.04);
  transition: opacity .9s var(--ease), filter .9s var(--ease), transform 1.2s var(--ease); will-change: opacity, transform; }
.screens img.past { transform: translateY(-20px) scale(.97); }
.screens img.on { opacity: 1; filter: none; transform: none; }

/* Bento: five things, five cells */
.features { padding: 120px 0; }
.features h2 { max-width: 18ch; margin-bottom: 3rem; }
.bento { display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; }
.cell { border-radius: 28px; background: var(--surface); box-shadow: var(--shadow); padding: 2rem; display: flex; flex-direction: column; gap: .75rem; overflow: hidden; position: relative; }
.cell p { color: var(--muted); max-width: 36ch; }
/* Live Activity: a phone mock that steps through the widget's real layouts (src/widgets/drive-activity.tsx). */
.c-live { grid-column: span 4; grid-row: span 2; background: radial-gradient(60rem 30rem at 85% 110%, #2D6A4C 0%, transparent 60%), #10201A;
  color: #F4F4F1; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2rem; align-items: center; min-height: 600px; }
.c-live p { color: rgba(244,244,241,.72); }
.live-copy { display: grid; gap: .75rem; align-self: start; }
.live-tabs { display: grid; gap: .25rem; margin-top: 1.25rem; }
.live-tabs button { appearance: none; border: 0; background: transparent; font: inherit; text-align: left; cursor: pointer; display: grid; gap: .15rem;
  padding: .8rem 1rem; border-radius: 16px; color: rgba(244,244,241,.55); font-weight: 600; transition: background-color .5s var(--ease), color .5s var(--ease); }
.live-tabs button small { font-weight: 400; font-size: .875rem; color: rgba(244,244,241,.5); }
.live-tabs button[aria-selected="true"] { background: rgba(255,255,255,.08); color: #F4F4F1; }
.live-tabs button[aria-selected="true"] small { color: rgba(244,244,241,.75); }
.live-tabs button:focus-visible { outline: 2px solid #3DBF78; outline-offset: 2px; }
.lphone { width: 290px; aspect-ratio: 720 / 1564; padding: 9px; border-radius: 46px; background: #0B0C0B; box-shadow: 0 50px 90px -40px rgba(0,0,0,.8), inset 0 0 0 1.5px #2E322F; }
.lscreen { position: relative; height: 100%; border-radius: 37px; overflow: hidden; color: #fff; font-variant-numeric: tabular-nums;
  background: linear-gradient(172deg, #1F4A36 0%, #2D6A4C 40%, #6E7F4F 75%, #B89A5E 100%); }
/* Milo's car, the frames the Live Activity draws at each slot's size. */
.lcar { width: 46px; height: auto; }
.i-compact .lcar { width: 36px; }
.lpill { background: #fff; color: #151514; font-weight: 600; font-size: .75rem; padding: .35rem .8rem; border-radius: 999px; white-space: nowrap; }
.ie-money { color: #34C759; }
.ie-r { display: grid; justify-items: end; gap: .3rem; }
/* Lock Screen layer */
.llock { position: absolute; inset: 58px 0 auto; text-align: center; transition: opacity .6s var(--ease), filter .6s var(--ease), transform .9s var(--ease); }
.ldate { display: block; font-size: .8125rem; font-weight: 600; opacity: .85; }
.lclock { display: block; font-size: 4.25rem; font-weight: 600; letter-spacing: -.04em; line-height: 1; }
.lbanner { position: absolute; left: 10px; right: 10px; bottom: 150px; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: .55rem;
  padding: .75rem .8rem; border-radius: 22px; background: rgba(20,24,21,.82); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  transition: opacity .6s var(--ease), filter .6s var(--ease), transform .9s var(--ease); }
.lbanner b, .lbanner small { white-space: nowrap; }
.lbanner b { display: block; font-size: 1.25rem; font-weight: 600; letter-spacing: -.02em; line-height: 1.1; }
.lbanner small { font-size: .6875rem; }
/* Home Screen, drawn as a wireframe */
.lhome { position: absolute; inset: 64px 20px auto; display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px 16px; opacity: 0; transform: scale(1.06);
  transition: opacity .6s var(--ease), transform .9s var(--ease), filter .6s var(--ease); }
.lhome span { aspect-ratio: 1; border-radius: 13px; border: 1px dashed rgba(255,255,255,.45); background: rgba(255,255,255,.08); }
/* The first slot is Milo's real app icon, copied from app.json's icon by the site build. */
.lhome .lapp { border: 0; background: none; overflow: hidden; box-shadow: 0 6px 14px -6px rgba(0,0,0,.5); }
.lhome .lapp img { width: 100%; height: 100%; display: block; }
/* Dynamic Island */
.dyn-island { position: absolute; top: 9px; left: 50%; width: 86px; height: 26px; border-radius: 20px; background: #000; transform: translateX(-50%); overflow: hidden;
  transition: width .7s cubic-bezier(.34,1.25,.5,1), height .7s cubic-bezier(.34,1.25,.5,1), border-radius .7s var(--ease); }
.i-compact, .i-expanded { position: absolute; opacity: 0; filter: blur(6px); transition: opacity .35s var(--ease), filter .35s var(--ease); }
.i-compact { inset: 0 12px; display: flex; align-items: center; justify-content: space-between; font-size: .8125rem; }
.i-expanded { inset: 0; padding: 16px 18px; display: grid; align-content: space-between; }
.ie-row { display: flex; justify-content: space-between; align-items: flex-start; }
.ie-row small { display: block; font-size: .75rem; color: #9A9A96; }
.ie-big { font-size: 2rem; font-weight: 600; letter-spacing: -.03em; line-height: 1; }
.ie-time { font-size: 1.25rem; font-weight: 500; }
.ie-bottom { align-items: center; }
/* States */
.lphone:not([data-state="lock"]) .llock, .lphone:not([data-state="lock"]) .lbanner { opacity: 0; filter: blur(8px); transform: translateY(-24px) scale(.96); }
.lphone:not([data-state="lock"]) .lhome { opacity: 1; transform: none; }
.lphone[data-state="expanded"] .lhome { filter: blur(6px); opacity: .5; }
.lphone[data-state="compact"] .dyn-island { width: 176px; height: 32px; }
.lphone[data-state="expanded"] .dyn-island { width: calc(100% - 14px); height: 140px; border-radius: 34px; }
.lphone[data-state="compact"] .i-compact, .lphone[data-state="expanded"] .i-expanded { opacity: 1; filter: none; transition-delay: .25s; }
.c-trail { grid-column: span 2; background: var(--mint); }
.c-trail img { margin-top: auto; border-radius: 16px; }
.c-gap { grid-column: span 2; padding-bottom: 0; }
.c-gap img { margin: .5rem -2rem 0; width: calc(100% + 4rem); max-width: none; mask-image: linear-gradient(#000 70%, transparent); }
.c-countries { grid-column: span 3; background: var(--green); color: var(--on-green); padding: 0; min-height: 300px; }
.c-countries p { color: color-mix(in srgb, var(--on-green) 78%, transparent); }
.countries-copy { position: relative; padding: 2rem; max-width: 58%; display: grid; gap: .6rem; align-content: end; height: 100%; }
/* Flags drift up through the right side of the card, each column at its own pace. */
.flag-field { position: absolute; inset: 0 0 0 auto; width: 46%; overflow: hidden; pointer-events: none;
  mask-image: linear-gradient(transparent, #000 24%, #000 76%, transparent); -webkit-mask-image: linear-gradient(transparent, #000 24%, #000 76%, transparent); }
.flag { position: absolute; left: var(--x); top: 100%; width: 54px !important; height: 40px; border-radius: 10px; background-size: cover !important;
  box-shadow: 0 10px 24px -10px rgba(0,0,0,.55), inset 0 0 0 1px rgba(255,255,255,.28); animation: flag-rise var(--t) linear var(--d) infinite; }
@keyframes flag-rise {
  0% { transform: translate(0, 0) rotate(-6deg); }
  50% { transform: translate(12px, -180px) rotate(5deg); }
  100% { transform: translate(0, -360px) rotate(-6deg); } }
.big-num { font-size: clamp(4.5rem, 9vw, 7rem); font-weight: 600; letter-spacing: -.06em; line-height: .9; font-variant-numeric: tabular-nums; }
.c-private { grid-column: span 3; }
.c-private i, .c-trail i { font-size: 1.75rem; color: var(--green); }


/* Claim showcase */
.claim { padding: 60px 0 120px; }
.claim-grid { display: grid; grid-template-columns: .8fr 1.2fr; gap: 4rem; align-items: center; }
.claim h2 { margin-bottom: 1.25rem; }
.facts { list-style: none; margin: 2rem 0 0; padding: 0; display: grid; gap: 1.1rem; }
.facts li { display: grid; grid-template-columns: 2rem 1fr; gap: .25rem; align-items: start; }
.facts i { font-size: 1.375rem; color: var(--green); line-height: 1.3; }
.paper { border-radius: 28px; overflow: hidden; background: #fff; box-shadow: var(--shadow); transform: rotate(1.25deg); }

/* Web log band */
.weblog { padding: 0 0 120px; }
.weblog-card { border-radius: 28px; background: var(--mint); padding: clamp(2.5rem, 6vw, 5rem); text-align: center; display: grid; justify-items: center; gap: 1.25rem; }
.weblog-card p { color: var(--muted); max-width: 46ch; font-size: 1.125rem; }
.weblog-card .btn { margin-top: .5rem; }
.btn-outline { background: var(--surface); color: var(--fg); box-shadow: inset 0 0 0 1px var(--line); }
.btn-outline:hover { transform: translateY(-1px); }

/* Pricing */
.pricing { padding: 0 0 120px; }
.pricing-head { text-align: left; margin-bottom: 3rem; }
.pricing-head h2 { margin: .75rem 0 0; max-width: 16ch; }
.plans { display: grid; grid-template-columns: 1fr 1.25fr; gap: 16px; align-items: stretch; }
.plan { border-radius: 28px; padding: 2.25rem; background: var(--surface); box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 1rem; }
.plan.pro { background: var(--ink); color: var(--on-ink); }
.plan.pro .muted { color: color-mix(in srgb, var(--on-ink) 70%, transparent); }
.plan .price { font-size: 3rem; font-weight: 600; letter-spacing: -.05em; line-height: 1; font-variant-numeric: tabular-nums; }
.plan .price small { font-size: 1rem; font-weight: 500; letter-spacing: 0; margin-left: .35rem; opacity: .7; }
.plan ul { list-style: none; padding: 0; margin: .5rem 0 0; display: grid; gap: .65rem; }
.plan li { display: flex; gap: .65rem; align-items: baseline; }
.plan li i { color: var(--green); transform: translateY(2px); }
.plan.pro li i { color: #3DBF78; }
.price-note { margin-top: 1.5rem; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; color: var(--muted); font-size: .9375rem; }

/* Questions */
.faq { padding: 0 0 120px; }
.faq-grid { display: grid; grid-template-columns: .8fr 1.2fr; gap: 4rem; }
.faq h2 { position: sticky; top: 104px; align-self: start; }
details { border-bottom: 1px solid var(--line); }
details:first-child { border-top: 1px solid var(--line); }
summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; gap: 1.5rem; padding: 1.4rem 0; font-weight: 600; font-size: 1.125rem; letter-spacing: -.015em; }
summary::-webkit-details-marker { display: none; }
summary i { font-size: 1.25rem; transition: transform .3s var(--ease); flex: none; margin-top: .15rem; }
details[open] summary i { transform: rotate(45deg); }
details p { color: var(--muted); padding: 0 2.5rem 1.5rem 0; max-width: 62ch; }

/* Closing */
.closing { padding: 40px 0 140px; text-align: center; display: grid; justify-items: center; gap: 1.25rem; }
.closing h2 { font-size: clamp(2.5rem, 5vw, 4rem); letter-spacing: -.045em; }
.closing p { color: var(--muted); font-size: 1.125rem; }
.closing .btn { margin-top: .75rem; }
.milo-float { position: relative; display: grid; justify-items: center; animation: bob 5s ease-in-out infinite; }
.milo-shadow { width: 70%; height: 10px; margin-top: 6px; border-radius: 50%; background: rgba(21,40,28,.14); transition: transform .3s var(--ease); }

/* Milo's face (web/milo.js): blink, smile, hop. */
.milo { overflow: visible; cursor: pointer; transform-origin: 50% 100%; }
.milo .milo-open, .milo .milo-happy { transform-box: fill-box; transform-origin: center; }
.milo .milo-open { transition: transform .12s ease-out, opacity .25s var(--ease); }
.milo.blink .milo-open { transform: scaleY(.08); }
.milo .milo-happy { opacity: 0; transform: translateY(6px) scale(.8); transition: transform .25s var(--ease), opacity .2s var(--ease); }
.milo.is-happy .milo-open { opacity: 0; transform: scale(.6); }
.milo.is-happy .milo-happy { opacity: 1; transform: none; transition: transform .5s cubic-bezier(.34,1.56,.64,1), opacity .2s var(--ease); }
.milo.hop { animation: milo-hop .75s cubic-bezier(.34,1.3,.5,1); }
@keyframes milo-hop {
  0% { transform: none; }
  22% { transform: translateY(2px) scale(1.07, .9); }
  55% { transform: translateY(-16px) scale(.95, 1.06); }
  80% { transform: translateY(0) scale(1.04, .96); }
  100% { transform: none; } }
@keyframes bob { 50% { transform: translateY(-6px); } }

footer { border-top: 1px solid var(--line); padding: 2rem 0 3rem; font-size: .875rem; color: var(--muted); }
footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; align-items: center; }
footer nav { display: flex; gap: 1.5rem; flex-wrap: wrap; }
footer a { text-decoration: none; }
footer a:hover { color: var(--fg); }

/* Entrance and reveal motion (only with JS and without reduced motion) */
@media (prefers-reduced-motion: no-preference) {
  .js .rise { opacity: 0; transform: translateY(20px); animation: rise .9s var(--ease) forwards; animation-delay: calc(var(--i, 0) * 90ms + 80ms); }
  .js .island { opacity: 0; transform: translate(-24px, 16px) scale(.96); animation: rise 1s var(--ease) .75s forwards; }
  .js .reveal { opacity: 0; transform: translateY(28px); transition: opacity .9s var(--ease), transform .9s var(--ease); transition-delay: calc(var(--i, 0) * 70ms); }
  .js .reveal.in { opacity: 1; transform: none; }
}
@keyframes rise { to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .milo-float { animation: none; }
  .track { animation-duration: 90s; } /* the rates strip keeps moving, slower, and pauses on hover */
  /* Reduced motion: the same blur crossfade, but nothing slides or scales. */
  .screens img, .screens img.past, .step p { transform: none; }
  .step-body { transition: none; }
}

/* Tablet and phone: everything collapses to one column */
@media (max-width: 960px) {
  .nav ul { display: none; }
  .nav .btn-ink, .nav .app-badge { margin-left: auto; }
  .hero { min-height: 0; padding-top: 104px; }
  .hero-grid, .how-grid, .claim-grid, .faq-grid, .plans { grid-template-columns: 1fr; }
  .stage { margin-top: 1rem; }
  .how { padding-top: 96px; }
  .how-pin { height: auto; }
  .how-sticky { position: static; height: auto; display: block; padding-top: 0; }
  .how-sticky::before, .how-triggers, .how-phone { display: none; }
  .how-head { margin-bottom: 1rem; }
  .step { padding: 2rem 0 2rem 1.5rem; }
  .step::before { background: var(--green); }
  .step-title { cursor: default; }
  .step-body { grid-template-rows: 1fr; }
  .step h3, .step p { opacity: 1; filter: none; transform: none; }
  .step-shot { display: block; width: min(300px, 80%); margin-top: 2rem; padding: 8px; border-radius: 40px; background: #121413; box-shadow: var(--shadow); }
  .step-shot img { border-radius: 32px; }
  .bento { grid-template-columns: 1fr; }
  .bento > .cell { grid-column: auto; grid-row: auto; }
  .c-live { grid-template-columns: 1fr; justify-items: center; }
  .live-copy { justify-self: stretch; }
  .faq h2 { position: static; }
  .paper { transform: none; }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  .rates .wrap { grid-template-columns: 1fr; gap: .25rem; height: auto; padding: 1rem 0; }
  .cell, .plan { padding: 1.5rem; }
  .c-gap img { margin-inline: -1.5rem; width: calc(100% + 3rem); }
  .countries-copy { max-width: 62%; }
  .lphone { width: 240px; }
  details p { padding-right: 0; }
}

/* ---------- Inner pages (generated by web/src/build.ts) ---------- */
:root { --danger: #B4321F; }
:root[data-theme="dark"] { --danger: #F08A78; }

.doc { padding: 112px 0 112px; }
.doc-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 4rem; align-items: start; }
.doc h1 { font-size: clamp(2.25rem, 4.6vw, 3.5rem); letter-spacing: -.04em; margin: .75rem 0 1.25rem; max-width: 20ch; }
.doc h2 { font-size: 1.5rem; letter-spacing: -.025em; margin: 3rem 0 1rem; }
.doc-main > p, .doc-main li, .doc .no-print li { max-width: 65ch; }
.crumbs { font-size: .875rem; color: var(--muted); }
.crumbs a { color: var(--muted); }
.answer { font-size: 1.25rem; line-height: 1.5; max-width: 60ch; }
.checked { margin-top: 1rem; font-size: .875rem; color: var(--muted); max-width: 65ch; }
.checked a { color: var(--green); }
ul.plain { padding-left: 1.1rem; display: grid; gap: .6rem; margin: 0; }
.card { border-radius: 28px; background: var(--surface); box-shadow: var(--shadow); padding: 2rem; }
.card h2 { margin: 0; font-size: 1.25rem; }

/* Forms: label above, helper below */
.field { display: grid; gap: .45rem; align-content: start; }
.field label, .label, legend { font-size: .875rem; font-weight: 500; color: var(--muted); }
input:not([type="checkbox"]):not([type="radio"]), select {
  font: inherit; color: var(--fg); background: var(--bg); border: 1px solid color-mix(in srgb, var(--fg) 18%, transparent);
  border-radius: 14px; height: 48px; padding: 0 .9rem; width: 100%; min-width: 0; }
input:focus-visible, select:focus-visible { outline: 2px solid var(--green); outline-offset: 1px; }
input[type="checkbox"] { width: 1.15rem; height: 1.15rem; accent-color: var(--green); }
.check-row { display: flex; align-items: center; gap: .6rem; font-size: .9375rem; color: var(--fg); align-self: end; height: 48px; }
.help { font-size: .8125rem; color: var(--muted); }
.error { color: var(--danger); font-size: .9375rem; min-height: 1.4em; margin: -.25rem 0; }
.field.is-optional { opacity: .5; }

/* Calculator */
.calc { margin-top: 2.5rem; display: grid; gap: 1.25rem; }
.calc-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1rem; }
.calc-result { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; padding-top: 1.25rem; border-top: 1px solid var(--line); }
.calc output { font-size: clamp(2rem, 4vw, 2.75rem); font-weight: 600; letter-spacing: -.04em; color: var(--green); font-variant-numeric: tabular-nums; }
.calc-note { font-size: .875rem; color: var(--muted); }

/* Tables */
.table-wrap { overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; font-size: .9375rem; font-variant-numeric: tabular-nums; }
table.data th { text-align: left; font-weight: 500; color: var(--muted); padding: 0 1.25rem .75rem 0; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.data td { padding: .85rem 1.25rem .85rem 0; vertical-align: top; }
table.data tbody tr + tr td { border-top: 1px solid var(--line); }
table.data a { color: var(--fg); font-weight: 600; text-decoration-color: color-mix(in srgb, var(--green) 50%, transparent); text-underline-offset: 3px; }
.table-card { margin-top: 2rem; padding: 1.5rem 2rem; }

/* Side card and country chips */
.side { position: sticky; top: 96px; }
.side-card { display: grid; gap: 1rem; justify-items: start; }
.side-card .btn { width: 100%; justify-content: center; }
.chips { display: flex; flex-wrap: wrap; gap: .5rem; }
.chips a { padding: .55rem 1rem; border-radius: 999px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); text-decoration: none; font-size: .9375rem; transition: box-shadow .2s; }
.chips a:hover { box-shadow: inset 0 0 0 1px var(--green); }

/* Web log */
.log-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 1.5rem; align-items: start; margin-top: 2.5rem; }
.form { display: grid; gap: 1.1rem; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.row3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.seg { border: 0; padding: 0; margin: 0; display: grid; gap: .45rem; min-width: 0; }
.seg legend { padding: 0; margin-bottom: .45rem; }
.seg > div { display: flex; background: var(--sunk); border-radius: 999px; padding: 4px; height: 48px; }
.seg label { flex: 1; display: grid; place-items: center; border-radius: 999px; cursor: pointer; color: var(--muted); font-weight: 500; font-size: .875rem; position: relative; transition: background-color .2s, color .2s; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg label:has(input:checked) { background: var(--surface); color: var(--fg); box-shadow: 0 1px 3px rgba(21,21,20,.1); }
.seg label:has(input:focus-visible) { outline: 2px solid var(--green); outline-offset: 1px; }
.dist { height: 48px; display: flex; align-items: center; font-weight: 600; font-size: 1.125rem; font-variant-numeric: tabular-nums; }
.month { margin-top: 2.5rem; }
.month-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; padding: 0 .25rem .75rem; color: var(--muted); font-size: .9375rem; }
.month-head h2 { margin: 0; font-size: 1.25rem; color: var(--fg); }
.month-head b { color: var(--green); margin-left: .5rem; }
.trip-list { list-style: none; margin: 0; padding: .25rem 1.5rem; }
.trip { display: grid; grid-template-columns: 4.5rem minmax(0, 1fr) auto auto; gap: 1rem; align-items: center; padding: 1rem 0; }
.trip + .trip { border-top: 1px solid var(--line); }
.trip small { display: block; color: var(--muted); font-size: .8125rem; font-weight: 400; }
.trip .when { font-weight: 600; }
.trip .what { overflow-wrap: anywhere; }
.trip .amt { text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.icon-btn { width: 40px; height: 40px; border-radius: 999px; border: 0; background: transparent; color: var(--muted); cursor: pointer; display: grid; place-items: center; font-size: 1.2rem; }
.icon-btn:hover { background: var(--sunk); color: var(--fg); }
.empty { margin-top: 2rem; text-align: center; color: var(--muted); padding: 3rem 1.5rem; }
.empty b { color: var(--fg); }
.log-side { display: grid; gap: 1rem; position: sticky; top: 88px; }
.export { display: grid; gap: 1rem; }
.export .btn { justify-content: center; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.upsell { background: var(--mint); box-shadow: none; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 1.5rem; align-items: center; margin-top: 2rem; padding: 1.5rem 2rem; }
.upsell h2 { margin-bottom: .25rem; }
.upsell p { color: var(--muted); max-width: 60ch; }
dialog { border: 0; border-radius: 28px; padding: 2rem; width: min(420px, calc(100% - 32px)); background: var(--surface); color: var(--fg); box-shadow: var(--shadow); }
dialog[open] { display: grid; gap: 1rem; justify-items: start; }
dialog h2 { margin: 0; font-size: 1.375rem; }
dialog::backdrop { background: rgba(10,14,12,.5); }
.dialog-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: .5rem; }

/* Printable template */
.template-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1.5rem; margin-top: 2rem; }
.sheet { background: #fff; color: #151514; border-radius: 28px; padding: 2rem; box-shadow: var(--shadow); margin: 2.5rem 0 1rem; overflow-x: auto; }
.sheet-top { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; }
.sheet-top h2 { margin: 0; font-size: 1.375rem; }
.sheet-top span, .sheet-meta, .sheet-foot { font-size: .75rem; color: #5E5D57; }
.sheet-meta { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; margin: 1.25rem 0 1.5rem; }
.sheet-meta div { border-bottom: 1px solid #151514; padding-bottom: 1.5rem; }
.sheet table { width: 100%; min-width: 820px; border-collapse: collapse; font-size: .75rem; }
.sheet th { text-align: left; font-weight: 600; color: #5E5D57; padding: .4rem .5rem; border-bottom: 1.5px solid #151514; }
.sheet td { height: 30px; padding: 0 .5rem; border-bottom: 1px solid #DAD9D3; }
.sheet td + td, .sheet th + th { border-left: 1px solid #ECEBE6; }
.sheet tfoot td { font-weight: 600; border-bottom: 0; }
.sheet-foot { display: flex; justify-content: space-between; gap: 2rem; margin-top: 1.25rem; }

@media (max-width: 960px) {
  .doc-grid, .log-grid { grid-template-columns: minmax(0, 1fr); } /* minmax: a wide table scrolls inside its box instead of widening the page */
  .side, .log-side { position: static; }
  .upsell { grid-template-columns: auto minmax(0, 1fr); }
  .upsell .btn { grid-column: 1 / -1; justify-self: start; }
}
@media (max-width: 560px) {
  .row2, .row3 { grid-template-columns: 1fr; }
  .card { padding: 1.5rem; }
  .trip-list { padding: .25rem 1.25rem; }
  .trip { grid-template-columns: minmax(0, 1fr) auto auto; }
  .trip .when { grid-column: 1 / -1; display: flex; gap: .5rem; align-items: baseline; }
  .month-head { flex-direction: column; gap: .25rem; }
  .sheet-meta { grid-template-columns: 1fr 1fr; }
}
@media print {
  @page { size: A4 landscape; margin: 10mm; }
  body { background: #fff; }
  .nav, footer, .no-print { display: none !important; }
  .doc { padding: 0; }
  .sheet { box-shadow: none; border-radius: 0; padding: 0; margin: 0; overflow: visible; }
  .sheet table { min-width: 0; }
}

/* ---------- Hero demo: the Logbook screen in use (drawn at the app's 440×956 pt and scaled to the phone) ----------
   The app is light only, so these colours are fixed and don't follow the site's dark mode. */
.app-screen { position: relative; aspect-ratio: 440 / 956; border-radius: 38px; overflow: hidden; background: #F4F4F1; }
.app { position: absolute; top: 0; left: 0; width: 440px; height: 956px; transform-origin: 0 0; color: #151514; background: #F4F4F1;
  font-family: var(--font); font-variant-numeric: tabular-nums; transition: opacity .5s var(--ease); }
.app.fade { opacity: 0; }
.app small { display: block; color: #6E6D66; font-size: 15px; font-weight: 400; }
.app b { font-weight: 600; }
.a-status { display: flex; justify-content: space-between; align-items: center; padding: 18px 34px 0 42px; font-size: 17px; height: 54px; }
.a-status span { display: flex; gap: 6px; font-size: 19px; }
.a-head { display: flex; justify-content: space-between; align-items: flex-end; padding: 18px 20px 14px; }
.a-head small { font-size: 14px; }
.a-head h3 { margin: 4px 0 0; font-size: 36px; font-weight: 700; letter-spacing: -1.4px; line-height: 1; }
.a-btns { display: flex; gap: 10px; }
.a-btns span { width: 44px; height: 44px; border-radius: 50%; background: #FBFBF8; box-shadow: 0 2px 10px rgba(21,21,20,.08); display: grid; place-items: center; font-size: 20px; }
.a-card { background: #fff; border-radius: 28px; box-shadow: 0 1px 0 rgba(21,21,20,.04), 0 8px 30px -18px rgba(21,40,28,.25); }
.a-claim { margin: 0 16px; padding: 20px 22px; }
.a-claim-top { display: flex; justify-content: space-between; align-items: center; }
.a-total { display: block; font-size: 50px !important; font-weight: 700 !important; letter-spacing: -2px; line-height: 1.1; margin: 4px 0 2px; }
.a-ring { position: relative; width: 86px; height: 86px; }
.a-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.a-ring circle { fill: none; stroke-width: 9; }
.a-track { stroke: #ECECE7; }
.a-fill { stroke: #0E7A42; stroke-linecap: round; stroke-dasharray: 72 100; }
.a-ring span { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.a-ring b { font-size: 19px; }
.a-ring small { font-size: 11px; }
.a-bar { display: flex; gap: 3px; height: 7px; margin: 18px 0 14px; }
.a-bar i { border-radius: 4px; }
.a-bar i:nth-child(1) { flex: 548; background: #0E7A42; } .a-bar i:nth-child(2) { flex: 162; background: #8E95A8; } .a-bar i:nth-child(3) { flex: 48; background: #D9A04E; }
.a-legend { display: grid; grid-template-columns: repeat(3, 1fr); }
.a-legend small { display: flex; align-items: center; gap: 6px; font-size: 13px; }
.a-legend em { width: 8px; height: 8px; border-radius: 50%; }
.a-g { background: #0E7A42; } .a-p { background: #8E95A8; } .a-c { background: #D9A04E; }
.a-legend b { font-size: 16px; }
/* Employer rate note: folds open when the employer rate is set */
.a-gap { display: grid; grid-template-columns: auto 1fr; gap: 10px; align-items: start; overflow: hidden; max-height: 0; margin-top: 0; padding: 0 14px;
  border-radius: 16px; background: #F1F1EC; color: #6E6D66; font-size: 13px; line-height: 1.4; opacity: 0;
  transition: max-height .6s var(--ease), padding .6s var(--ease), margin .6s var(--ease), opacity .4s var(--ease); }
.a-gap b { color: #151514; }
.a-gap i { font-size: 16px; margin-top: 1px; }
.app.employer .a-gap { max-height: 90px; padding: 12px 14px; margin-top: 16px; opacity: 1; }
/* Recording card */
.a-rec { margin: 14px 16px 0; height: 0; padding: 0 18px; overflow: hidden; display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: center;
  border-radius: 28px; background: #151514; color: #F4F4F1; opacity: 0; transition: height .55s var(--ease), opacity .4s var(--ease), margin .55s var(--ease); }
.app.rec .a-rec { height: 72px; opacity: 1; }
.app:not(.rec) .a-rec { margin-top: 0; }
.a-rec small { color: rgba(244,244,241,.6); font-size: 13px; }
.a-rec b { font-size: 21px; }
.a-dot { width: 12px; height: 12px; border-radius: 50%; background: #34C759; box-shadow: 0 0 0 6px rgba(52,199,89,.18); animation: a-pulse 1.6s ease-in-out infinite; }
@keyframes a-pulse { 50% { box-shadow: 0 0 0 10px rgba(52,199,89,.06); } }
.a-arrow { width: 40px; height: 40px; border-radius: 50%; background: #2A2A28; display: grid; place-items: center; font-size: 18px; }
.a-day { display: flex; justify-content: space-between; padding: 20px 26px 10px; color: #6E6D66; font-size: 15px; }
.a-list { margin: 0 16px; padding: 0 20px; }
.a-trip { display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: center; padding: 14px 0; }
.a-trip + .a-trip { border-top: 1px solid #EEEEE9; }
.a-ic { width: 42px; height: 42px; border-radius: 50%; background: #F1F1EC; display: grid; place-items: center; font-size: 19px; }
.a-t b { display: block; font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.a-t small { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.a-t { min-width: 0; }
.a-amt { text-align: right; }
.a-amt b { font-size: 16px; }
.a-amt small { color: #0E7A42; font-size: 15px; }
/* The new trip drops in once it is saved */
.a-new { max-height: 0; padding: 0; opacity: 0; overflow: hidden; transform: translateY(-10px);
  transition: max-height .6s var(--ease), padding .6s var(--ease), opacity .5s var(--ease) .1s, transform .6s var(--ease); }
.app.saved .a-new { max-height: 80px; padding: 14px 0; opacity: 1; transform: none; }
.app:not(.saved) .a-new + .a-trip { border-top: 0; }
.a-tabs { position: absolute; left: 24px; right: 24px; bottom: 26px; height: 66px; border-radius: 33px; background: rgba(251,251,248,.92);
  box-shadow: 0 8px 30px -10px rgba(21,21,20,.18), inset 0 0 0 1px rgba(21,21,20,.05); display: grid; grid-template-columns: repeat(3, 1fr); align-items: center; }
.a-tabs span { display: grid; justify-items: center; gap: 2px; font-size: 12px; color: #8A8981; }
.a-tabs i { font-size: 22px; }
.a-tabs .on { color: #151514; }
/* Sheets */
.a-scrim { position: absolute; inset: 0; background: rgba(21,21,20,.28); opacity: 0; pointer-events: none; transition: opacity .45s var(--ease); }
.app.classify .a-scrim, .app.employer-sheet .a-scrim { opacity: 1; }
.a-sheet { position: absolute; left: 0; right: 0; bottom: 0; padding: 12px 22px 36px; border-radius: 34px 34px 0 0; background: #F4F4F1;
  box-shadow: 0 -20px 60px -20px rgba(0,0,0,.35); transform: translateY(105%); transition: transform .6s cubic-bezier(.32,.72,0,1); }
.app.classify .a-classify, .app.employer-sheet .a-employer { transform: none; }
.a-grab { width: 40px; height: 5px; border-radius: 3px; background: #D5D5CF; margin: 0 auto 14px; }
.a-sheet h4 { margin: 0 0 16px; text-align: center; font-size: 19px; font-weight: 600; }
.a-seg { display: grid; grid-template-columns: repeat(3, 1fr); padding: 4px; border-radius: 999px; background: #E9E9E4; margin-bottom: 14px; }
.a-seg span { text-align: center; padding: 10px 0; border-radius: 999px; font-size: 15px; color: #6E6D66; }
.a-seg .on { background: #fff; color: #151514; font-weight: 600; box-shadow: 0 1px 4px rgba(21,21,20,.1); }
.a-route { padding: 16px 18px; display: grid; gap: 12px; }
.a-stop { display: grid; grid-template-columns: 14px 1fr; gap: 12px; align-items: start; }
.a-stop em { width: 12px; height: 12px; border-radius: 50%; border: 2.5px solid #151514; margin-top: 5px; }
.a-to em { background: #0E7A42; border-color: #0E7A42; }
.a-stop small { font-size: 12px; }
.a-stop b { font-size: 15px; }
.a-odo { display: flex; justify-content: space-between; padding-top: 12px; border-top: 1px solid #EEEEE9; font-size: 14px; }
.a-odo small { font-size: 14px; color: #151514; }
.a-label { margin: 16px 2px 8px; font-size: 14px !important; }
.a-input { display: flex; align-items: center; gap: 2px; height: 52px; padding: 0 16px; border-radius: 16px; border: 1px solid #DCDCD6; background: #fff; font-size: 17px; }
.a-caret { width: 2px; height: 22px; background: #0E7A42; animation: a-blink 1s steps(1) infinite; }
@keyframes a-blink { 50% { opacity: 0; } }
.a-save { margin-top: 18px; height: 54px; border-radius: 999px; background: #0E7A42; color: #fff; display: flex; align-items: center; justify-content: center; gap: 8px;
  font-size: 18px; font-weight: 600; transition: transform .15s ease, filter .15s ease; }
.a-save.pressed { transform: scale(.97); filter: brightness(.9); }
.a-help { margin: -4px 4px 0; font-size: 14px; color: #6E6D66; text-align: center; line-height: 1.4; }
/* A fingertip shows each tap */
.a-touch { position: absolute; width: 46px; height: 46px; margin: -23px 0 0 -23px; border-radius: 50%; background: rgba(21,21,20,.18); border: 2px solid rgba(255,255,255,.7);
  opacity: 0; pointer-events: none; }
.a-touch.on { animation: a-tap .55s ease-out; }
@keyframes a-tap { 0% { opacity: 0; transform: scale(1.4); } 30% { opacity: 1; transform: scale(1); } 100% { opacity: 0; transform: scale(.8); } }
/* The floating Live Activity disappears when the trip ends */

/* ---------- Hero demo, part two: Lock Screen, Export, PDF ---------- */
/* Lock Screen sits on top of the app and slides up to unlock. */
.a-lock { position: absolute; inset: 0; z-index: 5; color: #fff; text-align: center;
  background: linear-gradient(172deg, #1F4A36 0%, #2D6A4C 42%, #6E7F4F 76%, #B89A5E 100%);
  transition: transform .8s cubic-bezier(.32,.72,0,1), opacity .8s var(--ease); }
.app:not(.lock) .a-lock { transform: translateY(-100%); opacity: .6; }
.a-lock-status { display: flex; justify-content: flex-end; padding: 22px 34px 0; font-size: 19px; }
.a-lock-status span { display: flex; gap: 6px; }
.a-date { display: block; margin-top: 44px; font-size: 21px; font-weight: 600; color: rgba(255,255,255,.88) !important; }
.a-clock { display: block; font-size: 112px !important; font-weight: 600 !important; letter-spacing: -4px; line-height: 1; }
.a-la { position: absolute; left: 14px; right: 14px; bottom: 250px; display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: center;
  padding: 18px 20px; border-radius: 30px; text-align: left; background: rgba(28,32,28,.82); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px);
  opacity: 0; transform: translateY(30px) scale(.94); transition: opacity .5s var(--ease), transform .7s cubic-bezier(.34,1.3,.5,1); }
.app.live .a-la { opacity: 1; transform: none; }
.a-la-car { width: 60px; height: auto; }
.a-la b { display: block; font-size: 32px; letter-spacing: -.5px; line-height: 1.1; }
.a-la small { color: #34C759 !important; font-size: 15px !important; }
.a-la-r { display: grid; justify-items: end; gap: 8px; }
.a-la-r small { color: rgba(255,255,255,.85) !important; font-size: 17px !important; }
.a-la-r span { background: #fff; color: #151514; font-weight: 600; font-size: 16px; padding: 8px 16px; border-radius: 999px; }
.a-lock-foot { position: absolute; left: 48px; right: 48px; bottom: 58px; display: flex; justify-content: space-between; }
.a-lock-foot span { width: 58px; height: 58px; border-radius: 50%; background: rgba(0,0,0,.22); display: grid; place-items: center; font-size: 24px; }
.a-home { position: absolute; left: 50%; bottom: 14px; width: 150px; height: 5px; margin-left: -75px; border-radius: 3px; background: rgba(255,255,255,.85); }
/* Export sheet */
.app.export-sheet .a-scrim, .app.pdf .a-scrim { opacity: 1; }
.app.export-sheet .a-export, .app.pdf .a-pdf { transform: none; }
.a-xsum { padding: 18px 22px; margin-bottom: 14px; }
.a-xsum b { display: block; font-size: 44px; letter-spacing: -1.5px; line-height: 1.15; }
.a-periods { padding: 4px 18px; }
.a-periods div { display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: center; padding: 12px 0; }
.a-periods div + div { border-top: 1px solid #EEEEE9; }
.a-periods i { width: 40px; height: 40px; border-radius: 50%; background: #F1F1EC; display: grid; place-items: center; font-size: 19px; }
.a-periods b { display: block; font-size: 16px; }
.a-periods small { font-size: 13px; }
.a-periods em { width: 22px; height: 22px; border-radius: 50%; border: 2px solid #C9C9C2; }
.a-periods .on em { border: 0; background: #0E7A42; box-shadow: inset 0 0 0 6px #0E7A42, inset 0 0 0 9px #fff; }
/* PDF preview, as the share sheet opens it */
.a-pdf { padding-bottom: 24px; }
.a-doc { margin: 0 6px; padding: 22px 22px 20px; border-radius: 12px; background: #fff; box-shadow: 0 10px 30px -14px rgba(21,21,20,.35); text-align: left; }
.a-doc-top { display: flex; justify-content: space-between; align-items: center; padding-bottom: 12px; border-bottom: 1px solid #EEEEE9; }
.a-doc-top span { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 15px; }
.a-doc-top small { font-size: 12px; }
.a-doc h5 { margin: 18px 0 4px; font-size: 24px; font-weight: 700; letter-spacing: -.6px; }
.a-doc > small { font-size: 12px; }
.a-doc-amt { margin-top: 16px; }
.a-doc-amt small { font-size: 12px; }
.a-doc-amt b { display: block; font-size: 46px; font-weight: 700; color: #0E7A42; letter-spacing: -1.6px; line-height: 1.1; }
.a-doc-check { margin-top: 14px; padding: 10px 12px; border-radius: 10px; background: #EEF5F0; font-size: 12px; color: #3D4A41; line-height: 1.4; }
.a-doc-check b { color: #151514; }
.a-doc-sign { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 28px; }
.a-doc-sign span { padding-top: 6px; border-top: 1.5px solid #151514; font-size: 11px; color: #8A8981; }
.a-pdf-bar { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 18px; }
.a-pdf-bar span { display: grid; justify-items: center; gap: 6px; font-size: 12px; color: #6E6D66; }
.a-pdf-bar i { width: 52px; height: 52px; border-radius: 16px; background: #fff; display: grid; place-items: center; font-size: 22px; color: #151514; box-shadow: 0 2px 8px rgba(21,21,20,.08); }
.a-btns span { transition: transform .15s ease; }
.a-btns span.pressed { transform: scale(.9); }

/* ---------- Milo beside the phone, saying what each step means ---------- */
/* Sits in the gap left of the phone and never overlaps the screen. */
/* Anchored at Milo's feet: a longer line grows the bubble upward, so Milo himself never moves. */
.hero-milo { position: absolute; z-index: 3; right: calc(100% + 28px); bottom: 34%; width: 200px; display: grid; justify-items: end; gap: 8px; }
.hero-say { position: relative; margin: 0; padding: 10px 13px; border-radius: 16px 16px 6px 16px; font-size: .8125rem; line-height: 1.45; font-weight: 450;
  color: var(--muted); background: color-mix(in srgb, var(--surface) 82%, transparent); box-shadow: inset 0 0 0 1px var(--line);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.hero-say span { display: block; transition: opacity .35s var(--ease), filter .35s var(--ease); }
.hero-say.swap span { opacity: 0; filter: blur(3px); }
.hero-face { width: 52px; height: 49px; margin-right: 4px; }
/* Expressions change softly: no bounce */
.hero-face .milo-open, .hero-face .milo-happy, .hero-face .milo-wide, .hero-face .milo-wink, .hero-face .milo-focus { transition: opacity .35s var(--ease), transform .35s var(--ease) !important; }
/* Expressions: one eye set shows at a time */
.milo .milo-wide, .milo .milo-wink, .milo .milo-focus { opacity: 0; transform-box: fill-box; transform-origin: center; transition: opacity .2s var(--ease), transform .35s cubic-bezier(.34,1.56,.64,1); transform: scale(.7); }
.milo.is-wide .milo-open, .milo.is-wink .milo-open, .milo.is-focus .milo-open { opacity: 0; transform: scale(.6); }
.milo.is-wide .milo-wide, .milo.is-wink .milo-wink, .milo.is-focus .milo-focus { opacity: 1; transform: none; }
.milo.is-happy.is-wide .milo-wide, .milo.is-happy.is-wink .milo-wink, .milo.is-happy.is-focus .milo-focus { opacity: 0; }
.milo.blink .milo-wide, .milo.blink .milo-focus { transform: scaleY(.08); }
@media (max-width: 960px) {
  .hero-milo { width: 180px; }
}
@media (max-width: 560px) {
  /* Phones: Milo and his line sit under the phone, never on it */
  .hero-milo { position: relative; right: auto; bottom: auto; width: 100%; margin-top: 18px; grid-template-columns: auto 1fr; justify-items: start; align-items: start; }
  .hero-say { min-height: calc(3 * 1.45em + 20px); } /* room for the longest line, so nothing below shifts */
  .hero-face { order: -1; width: 44px; height: 41px; }
  .hero-say { border-radius: 16px 16px 16px 6px; }
}

/* ---------- Day/night switch and the App Store QR panel (web/site.js) ---------- */
.nav-actions { display: flex; align-items: center; gap: .5rem; flex: none; }
.theme-toggle { width: 40px; height: 40px; border-radius: 999px; border: 0; background: transparent; color: var(--fg); display: grid; place-items: center;
  font-size: 1.25rem; cursor: pointer; transition: background-color .2s var(--ease), transform .2s var(--ease); }
.theme-toggle:hover { background: var(--sunk); }
.theme-toggle:active { transform: scale(.94); }
.theme-toggle .ph-sun, :root[data-theme="dark"] .theme-toggle .ph-moon { display: none; }
:root[data-theme="dark"] .theme-toggle .ph-sun { display: block; }
dialog.qr-dialog[open] { justify-items: center; text-align: center; width: min(360px, calc(100% - 32px)); padding: 2.25rem 2rem 1.75rem; }
.qr-dialog img { width: 196px; height: 196px; padding: 10px; border-radius: 18px; background: #fff; box-shadow: inset 0 0 0 1px rgba(21,21,20,.08); }
.qr-dialog h2 { font-size: 1.25rem; }
.qr-dialog p { max-width: 30ch; }
.qr-close { position: absolute; top: 12px; right: 12px; width: 36px; height: 36px; border-radius: 999px; border: 0; background: var(--sunk); color: var(--fg);
  display: grid; place-items: center; font-size: 1rem; cursor: pointer; }
@media (max-width: 960px) { .nav-actions { margin-left: auto; } .nav .nav-actions .app-badge { margin-left: 0; } }
