/* The homepage. Lavender "paper": ink outlines with hard offset shadows and a
   purple highlighter, and never a warm cream or yellow tone.

   Scoped to index.html. The group, invite and legal pages keep style.css, so
   this can change without touching the pages people reach from a link. */

@font-face { font-family: "Bricolage Grotesque"; src: url("fonts/BricolageGrotesque.ttf") format("truetype"); font-weight: 200 800; font-display: swap; }
@font-face { font-family: "Hanken Grotesk"; src: url("fonts/HankenGrotesk.ttf") format("truetype"); font-weight: 100 900; font-display: swap; }

:root {
  --bg: #f7f5fc; --bg-2: #ece7f8; --surface: #fdfcff; --line: #1e1a2b;
  --ink: #1e1a2b; --muted: #5f5876;
  --accent: #1e1a2b; --accent-ink: #fff; --accent-soft: #e4dbfb;
  --hl: #cdbff6; --panel: #e4dbfb; --sticker: #cdbff6; /* label chips */
  --shadow: 5px 5px 0 #1e1a2b; --radius: 18px;
  /* One colour per person, as in the app; shared items are grey. */
  --you: #3b82f6; --p2: #8b5cf6; --p3: #e4447a; --p4: #22a06b; --split: #8a8595;
  --ok: #0f7a57;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0d0b14; --bg-2: #14111d; --surface: #1a1626; --line: #cfc4f2;
    --ink: #efebf8; --muted: #a9a1c4;
    --accent: #c3b7e8; --accent-ink: #1e1a2b; --accent-soft: #2d2550;
    --hl: #5b4a9e; --panel: #2a2248; --shadow: 5px 5px 0 #cfc4f2; --ok: #5dcaa5;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0d0b14; --bg-2: #14111d; --surface: #1a1626; --line: #cfc4f2;
  --ink: #efebf8; --muted: #a9a1c4;
  --accent: #c3b7e8; --accent-ink: #1e1a2b; --accent-soft: #2d2550;
  --hl: #5b4a9e; --panel: #2a2248; --shadow: 5px 5px 0 #cfc4f2; --ok: #5dcaa5;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: "Hanken Grotesk", system-ui, sans-serif; line-height: 1.55; -webkit-font-smoothing: antialiased; }
a { color: inherit; }
[hidden] { display: none !important; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 24px; }
h1, h2, h3 { font-family: "Bricolage Grotesque", sans-serif; letter-spacing: -.02em; margin: 0; }
/* Even line lengths, so a heading never ends on one stranded word ("No more
   calculators at the / table."). Not the hero's h1: its lines are set by hand,
   and its swapping word would re-balance the lines every few seconds. */
h2, h3 { text-wrap: balance; }

/* ── header ───────────────────────────────────────────────────────── */
header.site { position: sticky; top: 0; z-index: 10; backdrop-filter: blur(12px); background: color-mix(in srgb, var(--bg) 86%, transparent); }
header.site .wrap { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; font-family: "Bricolage Grotesque"; font-weight: 700; font-size: 20px; text-decoration: none; }
header nav { display: flex; align-items: center; gap: 26px; font-size: 15px; color: var(--muted); }
header nav a { text-decoration: none; }
header nav a:hover { color: var(--ink); }
header nav .links { display: contents; }
.sign-in { white-space: nowrap; font-weight: 650; }
.theme-slot { display: contents; }
.theme-toggle { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; padding: 0; border-radius: 12px; border: 2px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer; }
.theme-toggle:focus-visible, .btn:focus-visible { outline: 3px solid var(--hl); outline-offset: 2px; }
.theme-toggle svg { width: 18px; height: 18px; }

.btn { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; border-radius: 999px; padding: 14px 24px; font-weight: 700; font-size: 16px; text-decoration: none; border: 0; cursor: pointer; background: var(--accent); color: var(--accent-ink); transition: transform .15s ease; }
.btn:hover { transform: translateY(-2px); }
.btn.small { padding: 9px 16px; font-size: 14px; }

/* ── hero ─────────────────────────────────────────────────────────── */
/* A scroll section of fixed length. Its content is pinned under the header
   while the section scrolls past, and the scroll moves the receipt (home.js):
   so the words stay put, the receipt runs down to its foot, and the page is
   the same length whichever receipt is showing. --run is how much scrolling
   that takes. overflow: clip, not hidden, which would break the pinning. */
.hero { --run: 480px; height: calc(100vh - 68px + var(--run)); min-height: calc(620px + var(--run)); overflow: clip; }
.hero .wrap { display: grid; grid-template-columns: 1.05fr .95fr; gap: 40px; align-items: center; }
.hero-pin { position: sticky; top: 68px; height: calc(100vh - 68px); min-height: 620px; padding-top: 20px; padding-bottom: 28px; box-sizing: border-box; }
/* Grid items otherwise grow to fit their content, and a receipt is printed
   wider than a phone: it would push the column, and the page, off screen. */
.hero .wrap > * { min-width: 0; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 600; color: var(--ink); background: var(--accent-soft); border-radius: 999px; padding: 6px 12px; margin-bottom: 22px; }
.eyebrow i { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); }
/* 1.07, not tighter: a CJK word in the second line stands taller than Latin
   and otherwise meets the descender of the "y" above it. */
.hero h1 { font-weight: 800; font-size: clamp(44px, 6vw, 72px); line-height: 1.07; margin-bottom: 22px; }
.hero h1 .swap { background: linear-gradient(transparent 60%, var(--hl) 60%); }
.hero .lead { font-size: 20px; color: var(--muted); max-width: 30ch; margin: 0 0 30px; }
.launch { margin: 18px 0 0; font-size: 15px; color: var(--muted); }
.launch a { color: var(--ink); font-weight: 700; text-decoration-color: var(--hl); text-decoration-thickness: 3px; text-underline-offset: 3px; }
.launch.notify { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.close .launch.notify { justify-content: center; }
.notify-email { flex: 1 1 180px; min-width: 0; max-width: 260px; border: 2px solid var(--line); border-radius: 999px; padding: 0 14px; font: inherit; font-size: 14px; background: var(--surface); color: var(--ink); }
/* The field and its button: one height, one shape, the same 2px edge. */
.notify-email, .launch.notify .btn { box-sizing: border-box; height: 42px; }
.launch.notify .btn { border: 2px solid var(--accent); }
.notify-email:focus-visible { outline: 3px solid var(--hl); outline-offset: 2px; }
.notify-hp { position: absolute; width: 0; height: 0; padding: 0; border: 0; opacity: 0; pointer-events: none; }
.notify-msg { flex-basis: 100%; margin: 0; font-size: 13.5px; min-height: 1.3em; }
.notify-msg.ok { color: var(--ok); }
.notify-msg.err { color: var(--p3); }
/* Turnstile's box, just after the form rather than inside it: empty until the
   email field is first used, then zero-height unless the visitor has to tick
   it. As a flex row inside the form it would still take the row gap, so
   mounting the invisible widget would shift the text below it. */
.notify-ts:empty { display: none; }
.hint { font-size: 13.5px; color: var(--muted); margin-top: 8px; }
/* "Start a group" with Google's Play badge beside it. Google's artwork carries
   its own clear space (about a sixth of its height above and below, a sixteenth
   at each side), so the negative margins line the visible badge up with the
   button rather than shrinking the artwork. */
.cta { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
.close .cta { justify-content: center; }
.play-badge { display: inline-flex; margin: -14px -13px; transition: transform .15s ease; }
.play-badge:hover { transform: translateY(-2px); }
.play-badge:focus-visible { outline: 3px solid var(--hl); outline-offset: -6px; border-radius: 12px; }
.play-badge img { display: block; height: 80px; width: auto; }
footer.site .trademark { flex-basis: 100%; font-size: 12px; }

.stage { position: relative; height: 100%; display: flex; flex-direction: column; }

/* The receipt: the real demo receipt, marked up as the app marks a scan (see
   home.js). No box around it: it keeps its own paper edges, and fades out
   where the pinned area ends, top and bottom. */
#receipt { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.rview { position: relative; flex: 1; min-height: 0; overflow: hidden;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 14px, #000 calc(100% - 36px), transparent 100%);
          mask-image: linear-gradient(to bottom, transparent 0, #000 14px, #000 calc(100% - 36px), transparent 100%); }
.rwrap { position: absolute; overflow: hidden; background: #fbfaf6; border: 2px solid var(--line); box-shadow: var(--shadow); rotate: 2deg; will-change: transform; animation: arrive .45s ease both; }
.rwrap .rcpt { position: absolute; left: 0; top: 0; }
@keyframes arrive { from { opacity: 0; } to { opacity: 1; } }
.marks { position: absolute; inset: 0; pointer-events: none; }
.mark { position: absolute; border-radius: 4px; opacity: 0; transform: scale(.85); transition: opacity .25s ease, transform .3s cubic-bezier(.2, 1.4, .4, 1); }
.mark svg { position: absolute; inset: 0; overflow: visible; }
/* border-box: the receipt's own styles make everything inside it content-box,
   which added the 2.5px border on top of the measured height and pushed the
   TOTAL box into the line printed under it. */
.mark.field { border-radius: 0; border: 2.5px solid; box-sizing: border-box; }
.mark.on { opacity: 1; transform: none; }
/* The app's badge on a shared item: how many people it is split between. */
.mark .count { position: absolute; top: -7px; right: -7px; min-width: 15px; height: 15px; padding: 0 2px; box-sizing: border-box; border-radius: 999px; background: rgba(0, 0, 0, .87); color: #fff; font: 700 9px/15px "Hanken Grotesk", sans-serif; text-align: center; }
/* The legend under the scan in the app: what each box colour means. */
.legend { display: flex; gap: 14px; justify-content: center; margin-top: 16px; font-size: 12.5px; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 5px; }
.legend i { width: 10px; height: 10px; border-radius: 2px; border: 2px solid var(--c); background: color-mix(in srgb, var(--c) 32%, transparent); box-sizing: border-box; }
/* Room for two rows whether a receipt has two people or four, so the receipt
   area above does not change height with it. */
.pills { display: flex; gap: 8px; margin-top: 14px; flex-wrap: wrap; justify-content: center; align-content: flex-start; min-height: 80px; }
.pill { background: var(--surface); border: 2px solid var(--line); border-radius: 999px; padding: 5px 12px 5px 5px; display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: 14px; font-variant-numeric: tabular-nums; opacity: 0; transition: opacity .4s ease; }
.pill i { width: 22px; height: 22px; border-radius: 50%; }
.pill.on { opacity: 1; }
.enter { animation: slidein .5s ease both; }
@keyframes slidein { from { opacity: 0; transform: translateX(24px); } to { opacity: 1; transform: none; } }

/* ── sections ─────────────────────────────────────────────────────── */
section.band { padding: 88px 0; }
section.band.alt { background: var(--bg-2); }
.kicker { display: inline-block; font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; background: var(--sticker); color: #1e1a2b; padding: 2px 8px; border-radius: 6px; margin: 0 0 12px; }
.band h2 { font-size: clamp(36px, 4.6vw, 54px); font-weight: 800; line-height: 1.05; letter-spacing: -.03em; max-width: 20ch; }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 44px; }
.card { background: var(--surface); border: 2px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
/* The heavy outline is kept for the hero receipt and the illustration
   panels. On every card it stopped meaning anything, so the step cards and
   the small feature cards take a hairline edge and a soft shadow. */
.step.card, .also .card {
  border: 1px solid color-mix(in srgb, var(--line) 16%, transparent);
  box-shadow: 0 1px 2px rgba(30, 26, 43, .05), 0 10px 28px rgba(30, 26, 43, .07);
}
.step { padding: 22px; transition: transform .2s ease; }
.step:hover { transform: translateY(-4px); }
.step .vis { height: 140px; border-radius: 14px; background: var(--panel); margin-bottom: 18px; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.step .n { font-family: "Bricolage Grotesque"; font-weight: 800; font-size: 15px; }
.step h3 { font-size: 22px; margin: 4px 0 6px; }
.step p { margin: 0; color: var(--muted); }
.scan { width: 88px; height: 112px; background: #fff; border-radius: 6px; box-shadow: 0 8px 18px rgba(30, 26, 43, .14); position: relative; padding: 12px 10px; }
.scan i { display: block; height: 5px; border-radius: 3px; background: #ddd; margin: 7px 0; }
.scan::after { content: ""; position: absolute; left: -6px; right: -6px; height: 3px; background: #645a94; box-shadow: 0 0 12px #645a94; top: 10px; animation: scanline 2.2s ease-in-out infinite; }
@keyframes scanline { 50% { top: 100px; } }
.chipset { display: flex; flex-direction: column; gap: 8px; }
.chipset span { font-size: 13px; font-weight: 700; border: 2px solid; border-radius: 10px; padding: 5px 10px; background: #fff; animation: nudge 3s ease-in-out infinite; }
.chipset span:nth-child(2) { animation-delay: .3s; margin-left: 26px; }
.chipset span:nth-child(3) { animation-delay: .6s; margin-left: 10px; }
@keyframes nudge { 50% { transform: translateX(8px); } }
.payline { background: #fff; color: #1e1a2b; border-radius: 14px; padding: 12px 14px; box-shadow: 0 8px 18px rgba(30, 26, 43, .12); font-size: 14px; width: 210px; }
.payline b { display: block; font-family: "Bricolage Grotesque"; font-size: 22px; margin: 2px 0 8px; }
.payline .logos { display: flex; gap: 6px; }

.feature { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; margin-top: 72px; }
.feature.first { margin-top: 48px; }
.feature.flip .fv { order: 2; }
.feature h3 { font-size: 32px; font-weight: 800; line-height: 1.08; margin-bottom: 12px; }
.feature p { color: var(--muted); font-size: 18px; margin: 0; max-width: 40ch; }
.fv { padding: 28px; min-height: 280px; display: flex; align-items: center; justify-content: center; overflow: hidden; border-radius: calc(var(--radius) + 4px); rotate: -1deg; }
.feature.flip .fv { rotate: 1deg; }
/* Totals the scanner reads: one chip at a time falls in from above the card,
   lands in the middle with a small bounce, has its total word and amount
   highlighted in a sweep from left to right, gets its tick once the sweep is
   done, then falls out through the bottom (home.js). The card clips them. */
.drop { position: relative; width: 100%; max-width: 390px; height: 236px; }
.chip { position: absolute; left: 0; right: 0; top: 50%; transform: translateY(-50%); background: var(--bg-2); border-radius: 16px; padding: 15px 18px 13px; }
.chip .l1 { display: flex; justify-content: space-between; align-items: center; gap: 12px; font-family: ui-monospace, "SFMono-Regular", Consolas, Menlo, monospace; font-size: 20px; white-space: nowrap; }
.chip .l2 { font-size: 14px; color: var(--muted); margin-top: 4px; }
.chip .hl { border-radius: 5px; padding: 1px 6px; margin-left: -6px;
  background: linear-gradient(color-mix(in srgb, var(--hl) 60%, transparent), color-mix(in srgb, var(--hl) 60%, transparent)) no-repeat left center / 0% 100%;
  transition: background-size .55s cubic-bezier(.4, 0, .3, 1); }
/* isolate: an Arabic total word would otherwise join the amount after it in
   one right-to-left run, and its gap would land on the wrong side. */
.chip .hl i { font-style: normal; margin-right: .45em; unicode-bidi: isolate; }
.chip b { color: var(--ok); font-size: 21px; opacity: 0; transform: scale(.4); transition: opacity .25s ease .55s, transform .3s cubic-bezier(.3, 1.6, .5, 1) .55s; }
.chip.landed .hl { background-size: 100% 100%; }
.chip.landed b { opacity: 1; transform: none; }
.chip.in { animation: chip-in .75s cubic-bezier(.3, .8, .4, 1) both; }
.chip.out { animation: chip-out .5s cubic-bezier(.45, 0, .75, .6) both; }
@keyframes chip-in {
  0% { transform: translateY(calc(-50% - 210px)) rotate(-4deg); }
  70% { transform: translateY(calc(-50% + 7px)) rotate(.5deg); }
  86% { transform: translateY(calc(-50% - 3px)); }
  100% { transform: translateY(-50%); }
}
@keyframes chip-out {
  from { transform: translateY(-50%); }
  to { transform: translateY(calc(-50% + 230px)) rotate(5deg); }
}
.card-line { width: 100%; max-width: 360px; background: #fbfbfd; color: #222; font-family: ui-monospace, "SFMono-Regular", Consolas, Menlo, monospace; font-size: 14px; border-radius: 8px; padding: 18px; rotate: 1deg; box-shadow: 0 12px 28px rgba(30, 26, 43, .14); }
.card-line div { display: flex; justify-content: space-between; margin: 7px 0; }
.card-line .black span:last-child { position: relative; }
.card-line .black span:last-child::after { content: ""; position: absolute; inset: -3px -6px; background: #111; border-radius: 3px; animation: redact 3.2s ease-in-out infinite; transform-origin: left; }
@keyframes redact { 0%, 15% { transform: scaleX(0); } 35%, 100% { transform: scaleX(1); } }

/* Payment logos: the app's own files, in the app's white circles. */
.logo { width: 58px; height: 58px; border-radius: 50%; background: #fff; display: flex; align-items: center; justify-content: center; overflow: hidden; border: 2px solid #1e1a2b; box-shadow: 3px 3px 0 #1e1a2b; }
.logo img { width: 100%; height: 100%; object-fit: contain; }
.logo.pad img { width: 64%; height: 64%; }
/* PayPal and Wise are marks rather than app icons; edge to edge they crowd the circle. */
.logo.zoom img { width: 66%; height: 66%; }
.logo.mono { background: #6a5d9e; color: #fff; font-weight: 800; font-size: 16px; }
.payline .logo { width: 26px; height: 26px; box-shadow: none; border: 1px solid #eee; }

/* The payment dial: the logos on the rim of a large, unseen wheel whose centre
   is far off to the left, so the card shows only a short stretch of its arc.
   It turns clockwise one step at a time, as a rotary phone's dial does:
   logos arrive from the top, pass the place facing the headline, and leave at
   the bottom, fading at both edges. home.js places them; each keeps upright
   as it goes round. */
.dial-card { padding: 0; }
.dial { --r: 400px; --cx: 54%; position: relative; width: 100%; height: 340px; overflow: hidden;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 24%, #000 76%, transparent 100%);
          mask-image: linear-gradient(to bottom, transparent 0, #000 24%, #000 76%, transparent 100%); }
.dial-list { list-style: none; margin: 0; padding: 0; }
.dial-item { position: absolute; z-index: 1; left: calc(var(--cx) - var(--r)); top: 50%; width: 64px; height: 64px; margin: -32px 0 0 -32px;
  transform: rotate(var(--t)) translateX(var(--r)) rotate(calc(-1 * var(--t)));
  transition: transform .75s cubic-bezier(.45, 0, .25, 1), opacity .45s ease;
  opacity: .5; }
.dial-item.active { opacity: 1; }
/* Scaled on the logo, not the item: scaling the item would scale its whole
   placement and push it out from the wheel's centre. */
.dial-item .logo { width: 100%; height: 100%; box-sizing: border-box; transform: scale(.85); transition: transform .45s ease; }
.dial-item.active .logo { transform: scale(1.3); }
.dial-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
/* Pay who you can: settlement flows, as the app draws them (home.js). */
.flow-card { padding: 22px 20px 16px; }
.flow { width: 100%; display: flex; align-items: center; gap: 14px; }
.flow > svg { display: block; flex: 1; min-width: 0; width: 100%; height: auto; overflow: visible; }
/* Who can't pay whom, beside the routes: each one slides in as it is added
   and folds away as it is taken back. */
.flow-rules { list-style: none; margin: 0; padding: 0; flex: 0 0 116px; display: flex; flex-direction: column; }
.flow-rules li { display: flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 700; white-space: nowrap; overflow: hidden;
  max-height: 0; margin: 0; opacity: 0; transform: translateX(10px);
  transition: max-height .5s ease, margin .5s ease, opacity .4s ease, transform .4s ease; }
.flow-rules li.on { max-height: 30px; margin: 5px 0; opacity: 1; transform: none; }
.flow-rules li.none { color: var(--muted); font-weight: 600; }
.flow-rules .from { color: #e4447a; }
.flow-rules .to { color: #22a06b; }
.flow-rules i { position: relative; flex: none; width: 24px; height: 12px; }
.flow-rules i::before { content: ""; position: absolute; inset: 0; background: var(--muted);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 12'%3E%3Cpath d='M1 6h20M16 1.5 21.5 6 16 10.5' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 12'%3E%3Cpath d='M1 6h20M16 1.5 21.5 6 16 10.5' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat; }
.flow-rules i::after { content: ""; position: absolute; left: 50%; top: -2px; width: 2.5px; height: 16px; border-radius: 2px; background: #e4447a; transform: translateX(-50%) rotate(35deg); }
.flow text { font-family: "Hanken Grotesk", sans-serif; fill: var(--ink); }
.flow text.amt { fill: var(--muted); font-size: 12px; }
.flow text.who { font-size: 14px; font-weight: 700; }
.dial-name { display: inline-block; background: linear-gradient(transparent 60%, var(--hl) 60%); }
.dial-name.swap { animation: dial-in .45s ease both; }
@keyframes dial-in { from { opacity: 0; transform: translateY(.35em); } to { opacity: 1; transform: none; } }
.fx { width: 100%; max-width: 460px; background: var(--bg-2); border-radius: 16px; padding: 16px; }
.fx .h { display: flex; justify-content: space-between; font-size: 13px; color: var(--muted); margin-bottom: 10px; }
/* Every row stays fully opaque — nothing here fades. Only the newest
   (the one the rate readout currently reflects) is full-strength text;
   the rest sit back in grey, so it's obvious which price the rate applies
   to at a glance. */
.fx .r { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding: 9px 0; border-top: 1px solid color-mix(in srgb, var(--line) 25%, transparent); font-size: 14.5px; color: var(--muted); transition: color .3s ease; }
.fx .r.newest { color: var(--ink); }
.fx .r span { min-width: 0; }
/* A wrapped name makes that row taller than the others, and home.js sizes
   the whole list off whichever row happens to be first — a row-height
   mismatch there is what a sudden resize of the list looks like. Truncating
   keeps every row the same height regardless of name length. */
.fx .r .n { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fx .r small { display: block; color: var(--muted); font-size: 11.5px; }
.fx .r b { flex: none; font-variant-numeric: tabular-nums; }
/* The candlestick strip (left) and the purchases (right): every few
   purchases a candle slides one slot toward the past to make room for the
   next, while the newest candle grows and reshapes with each purchase in
   its group, the way a forming candle really moves; the list rises a row
   at the same moment. home.js hand-steps every one of these — not a CSS
   transition — so the timing is never at the mercy of the cascade. The
   chart fades out at the edge it scrolls through; the list does not. */
.fx-body { display: flex; align-items: stretch; gap: 16px; }
.fx-chart { flex: 0 0 146px; display: flex; flex-direction: column; }
.fx-rate { display: flex; align-items: baseline; gap: 5px; margin-bottom: 2px; }
.fx-rate b { font-size: 16px; font-variant-numeric: tabular-nums; }
.fx-rate small { color: var(--muted); font-size: 10.5px; }
/* Only the two digits that actually move take the colour, rather than a
   separate badge saying so. */
.fx-tail { transition: color .3s ease; }
.fx-tail.up { color: var(--p4); }
.fx-tail.down { color: var(--p3); }
.fx-chart svg { flex: 1; width: 100%; height: auto; overflow: hidden;
  -webkit-mask-image: linear-gradient(to right, transparent 0, #000 12%, #000 88%, transparent 100%);
          mask-image: linear-gradient(to right, transparent 0, #000 12%, #000 88%, transparent 100%); }
.fx-grid { stroke: var(--muted); stroke-opacity: .3; stroke-width: 1; stroke-dasharray: 1 3; }
.fx-candle { transition: opacity .4s ease; }
.fx-candle.up { color: var(--p4); }
.fx-candle.down { color: var(--p3); }
.fx-candle .wick { stroke: currentColor; stroke-width: 1.6; }
.fx-candle .body { fill: currentColor; }
/* The purchases: a fixed-height window (JS sets it to three rows) onto a
   column that rises by one row as each new purchase joins at the foot. Full
   opacity throughout — nothing here fades, so a row's name is always
   readable, even the one about to be carried off. */
.fx-list { flex: 1; min-width: 0; position: relative; overflow: hidden; height: 202px; }
.fx-list-track { display: flex; flex-direction: column; }

.also { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 44px; }
.also .card { padding: 18px 18px 16px; border-radius: 14px; }
.also b { display: block; font-size: 16px; margin-bottom: 4px; }
.also span { color: var(--muted); font-size: 14.5px; }
.also .ico { width: 34px; height: 34px; border-radius: 10px; background: var(--accent-soft); color: var(--ink); display: flex; align-items: center; justify-content: center; margin-bottom: 12px; }
.also .ico svg { width: 19px; height: 19px; }

.shots { display: flex; gap: 26px; margin-top: 44px; justify-content: center; }
.shot { width: 250px; border-radius: 34px; background: #1c1a22; padding: 9px; box-shadow: 0 24px 60px rgba(0, 0, 0, .3); rotate: -2deg; }
.shot:nth-child(2) { rotate: 1.5deg; transform: translateY(-24px); }
.shot img { display: block; width: 100%; height: auto; border-radius: 26px; }

.close { text-align: center; }
.close h2 { margin: 0 auto; }
.close .sub { color: var(--muted); font-size: 18px; margin: 14px auto 28px; max-width: 46ch; }

footer.site { border-top: 2px solid var(--line); padding: 28px 0 40px; color: var(--muted); font-size: 14px; }
footer.site .wrap { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
footer.site a { text-decoration: none; margin-left: 16px; }
footer.site a:hover { color: var(--ink); }

/* Sections rise in as they scroll into view. Without script, everything simply shows. */
.js .reveal { opacity: 0; transform: translateY(26px); transition: opacity .7s ease, transform .7s ease; }
.js .reveal.in { opacity: 1; transform: none; }

/* ── narrow screens ───────────────────────────────────────────────── */
/* Nothing from here on reaches a screen wider than 860px: the desktop
   layout is exactly as above. Narrower, there are two layouts:
   - a phone, under 600px: one column, with the long runs of cards made
     into a row to swipe along or a single list;
   - an unfolded foldable or a small tablet, 600 to 860px, a screen close to
     square: it takes the desktop's side-by-side arrangements wherever they
     fit, instead of the phone's column stretched across it.
   This first block is what the two share. */
@media (max-width: 860px) {
  header nav .links { display: none; }
  header nav { gap: 12px; }
  /* Compact enough that two fit on a row even with HK$ amounts. */
  .pills { gap: 6px; min-height: 72px; }
  .pill { font-size: 13px; padding: 4px 10px 4px 4px; gap: 6px; }
  .pill i { width: 18px; height: 18px; }
  .steps, .also { grid-template-columns: 1fr; }
  .feature, .feature.flip { grid-template-columns: 1fr; gap: 24px; margin-top: 56px; }
  .feature.flip .fv { order: 0; }
  /* The totals card is narrower here: smaller type keeps the longest one on a line. */
  .chip .l1 { font-size: 17px; }
  .chip .l2 { font-size: 13px; }
  /* The rules go under the routes, in a row of fixed height. */
  .flow-card { min-width: 0; }
  .flow { flex-direction: column; gap: 8px; }
  .flow-rules { flex: none; flex-direction: row; flex-wrap: wrap; justify-content: center; min-height: 24px; max-width: 100%; }
  .flow-rules li { font-size: 13px; gap: 4px; max-height: none; max-width: 0; transform: translateY(6px); transition: max-width .5s ease, margin .5s ease, opacity .4s ease, transform .4s ease; }
  .flow-rules li.on { max-height: none; max-width: 140px; margin: 0 5px; }
  /* The candlestick strip goes above the list instead of beside it. The
     list's flex: 1, its width beside the chart, would be its height here and
     outrank the three rows' height home.js gives it: the card grew by a row
     each time a purchase joined, and shrank back as the oldest left. */
  .fx-body { flex-direction: column; gap: 14px; }
  .fx-chart { flex: none; }
  .fx-list { flex: none; }
  .fx-chart svg { max-width: 220px; margin: 0 auto; }
  .shots { overflow-x: auto; justify-content: flex-start; padding: 30px 4px 10px; }
  .shot { flex: none; width: 220px; }
  .shot:nth-child(2) { transform: none; }
  section.band { padding: 64px 0; }
  footer.site a { margin: 0 16px 0 0; }
}

/* The hero in one column: on a phone, and on a screen too short to pin it: a
   narrow one, or a phone on its side however wide (a touch screen, so never
   a desktop window). The words come first and the receipt under them, so
   nothing is pinned; the receipt scrolls itself in an area of fixed height
   instead. */
@media (max-width: 719px), (max-width: 860px) and (max-height: 599px), (max-height: 599px) and (pointer: coarse) {
  .hero { height: auto; min-height: 0; padding: 28px 0 48px; }
  /* Top and bottom only: the element is also .wrap, whose side padding is
     the page gutter. "padding: 0" took that too, and the hero ran to the
     screen edge. */
  .hero-pin { position: static; height: auto; min-height: 0; padding-top: 0; padding-bottom: 0; }
  .stage { height: auto; }
  #receipt { flex: none; }
  .rview { flex: none; height: 520px; }
  .hero .wrap { grid-template-columns: 1fr; gap: 44px; }
  .hero .lead { font-size: 18px; }
  /* Two lines whichever language the headline names. The type is sized so
     the widest second line, "in any language.", fits the column: it is
     about 7.45 times the type size (a little more the smaller it is set),
     and 48px is the gutters. Three lines used to be kept free for it, a
     blank line on most phones. A name wider than that one would bring the
     third line back while it shows. */
  .hero h1 { font-size: min(44px, calc((100vw - 48px) / 7.8)); min-height: calc(2 * 1.07em); }
}
/* No receipt in the hero where it would sit under the words: there it was
   too small to read and too long to see whole. The headline's language still
   turns over (home.js), each new one rising into place. */
@media (max-width: 719px) {
  .stage { display: none; }
  .hero h1 .swap { display: inline-block; }
  .hero h1 .swap.turn { animation: dial-in .45s ease both; }
}

/* A phone on its side: the receipt's window no taller than the screen, and
   where there is the width, beside the words as on a desktop, so the first
   screen shows it. Not pinned: it runs down by itself, as on a phone. */
@media (max-width: 860px) and (max-height: 599px), (max-height: 599px) and (pointer: coarse) {
  .rview { height: clamp(280px, calc(100svh - 96px), 520px); }
}
@media (min-width: 720px) and (max-width: 860px) and (max-height: 599px), (min-width: 720px) and (max-height: 599px) and (pointer: coarse) {
  .hero { padding-top: 20px; }
  .hero .wrap { grid-template-columns: 1.05fr .95fr; gap: 32px; align-items: start; }
}

/* ── phones ── */
@media (max-width: 599px) {
  /* The receipt's window in proportion to the phone's width, as the receipt
     is: a fixed 520px left empty paper under the first one, the US diner,
     which this fits. The longer receipts still run down to their totals. */
  .rview { height: auto; aspect-ratio: 4 / 5; max-height: 520px; }
  /* "Want the app?" over its field; the field and its button on one row. */
  .launch.notify > span:not(.notify-msg) { flex-basis: 100%; }
  .close .launch.notify > span:not(.notify-msg) { text-align: center; }
  .notify-email { flex: 1 1 140px; max-width: none; }

  /* How it works: the three steps in a row to swipe along, the next one
     showing at the edge, not a column three screens long. The row runs to
     the screen's edges, and its padding keeps the cards' shadows. */
  .steps { display: flex; gap: 14px; margin: 32px -24px 0; padding: 4px 24px 28px;
    overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: 24px; scrollbar-width: none; }
  .steps::-webkit-scrollbar { display: none; }
  .step { flex: 0 0 min(82%, 320px); scroll-snap-align: start; }
  /* A card swiped into view fades in where it is; rising as well, it
     would move across the swipe. */
  .js .steps .reveal { transform: none; }

  /* The six smaller features: one list, not six cards. */
  .also { gap: 0; margin-top: 40px; background: var(--surface); border: 1px solid color-mix(in srgb, var(--line) 16%, transparent); border-radius: 16px;
    box-shadow: 0 1px 2px rgba(30, 26, 43, .05), 0 10px 28px rgba(30, 26, 43, .07); }
  .also .card { display: grid; grid-template-columns: 34px 1fr; column-gap: 14px; padding: 16px 18px;
    background: none; border: 0; border-radius: 0; box-shadow: none; }
  .also .card + .card { border-top: 1px solid color-mix(in srgb, var(--line) 12%, transparent); }
  .also .ico { grid-row: span 2; margin: 0; }
  .js .also .reveal { transform: none; }

  /* The app's screens: a row to swipe, edge to edge, with room for the
     shadows inside it rather than cut off at its edge. */
  .shots { margin: 28px -24px 0; padding: 24px 24px 44px; gap: 18px;
    scroll-snap-type: x mandatory; scroll-padding-inline: 24px; scrollbar-width: none; }
  .shots::-webkit-scrollbar { display: none; }
  .shot { width: min(64%, 240px); scroll-snap-align: start; box-shadow: 0 14px 30px rgba(0, 0, 0, .25); }
  /* With script, the three phones are fanned out as if laid on the table:
     one upright in front, one to either side behind it. A tap or a swipe
     brings the next forward, and the dots under them pick one (home.js).
     All three share one grid cell, so the fan is as tall as a phone. */
  .shots.fan { display: grid; justify-items: center; margin: 40px 0 0; padding: 0; overflow: visible; touch-action: pan-y; cursor: pointer; }
  .shots.fan .shot { grid-area: 1 / 1; width: min(58%, 230px);
    transition: transform .5s cubic-bezier(.3, .7, .3, 1), rotate .5s cubic-bezier(.3, .7, .3, 1), opacity .5s ease; }
  .shots.fan .shot[data-pos="front"] { z-index: 3; transform: none; rotate: 0deg; }
  .shots.fan .shot[data-pos="next"] { z-index: 2; transform: translateX(42%) scale(.84); rotate: 7deg; }
  .shots.fan .shot[data-pos="prev"] { z-index: 1; transform: translateX(-42%) scale(.84); rotate: -7deg; }
  .shots.fan .shot[data-pos="back"] { z-index: 0; transform: scale(.7); opacity: 0; }
  .fan-dots { display: flex; justify-content: center; gap: 2px; margin-top: 22px; }
  .fan-dots button { display: grid; place-items: center; width: 24px; height: 24px; padding: 0; border: 0; border-radius: 50%; background: none; cursor: pointer; }
  .fan-dots button::after { content: ""; width: 7px; height: 7px; border-radius: 50%; background: color-mix(in srgb, var(--ink) 25%, transparent); transition: background .2s ease; }
  .fan-dots button[aria-current="true"]::after { background: var(--ink); }
  .fan-dots button:focus-visible { outline: 3px solid var(--hl); outline-offset: 0; }

  /* Each footer link whole on its line, and tall enough to tap. */
  footer.site .wrap { flex-direction: column; gap: 4px; }
  footer.site .wrap > span:last-child { display: flex; flex-wrap: wrap; column-gap: 20px; }
  footer.site a { margin: 0; padding: 8px 0; white-space: nowrap; }
}
/* Too narrow for the field and its button side by side: one over the other. */
@media (max-width: 380px) {
  .notify-email, .launch.notify .btn { flex: 1 1 100%; }
  .launch.notify .btn { justify-content: center; }
}

/* Features in one column: the headline and its few words first, then the
   picture of them, so the card is read knowing what it shows. Each card is
   as tall as what is in it. */
@media (max-width: 639px) {
  .feature, .feature.flip { gap: 20px; }
  .feature .fv, .feature.flip .fv { order: 2; }
  .feature h3 { font-size: 28px; }
  .feature p { font-size: 17px; }
  .fv { min-height: 0; }
  .drop { height: 190px; }
  /* The payment dial turned a quarter to the right, as the headline is now
     under it: the wheel's centre far above the card, so the apps swing in
     from the right along a shallow curve, pass the low point facing the
     headline, and leave to the left. Fading at the sides, not top and foot. */
  .dial { --r: 340px; --cy: 60%; height: 180px;
    -webkit-mask-image: linear-gradient(to right, transparent 0, #000 22%, #000 78%, transparent 100%);
            mask-image: linear-gradient(to right, transparent 0, #000 22%, #000 78%, transparent 100%); }
  .dial-item { left: 50%; top: calc(var(--cy) - var(--r));
    transform: rotate(calc(var(--t) + 90deg)) translateX(var(--r)) rotate(calc(-1 * var(--t) - 90deg)); }
}

/* ── foldables and small tablets ── */
@media (min-width: 600px) and (max-width: 860px) {
  /* How it works: each step a row, its picture beside its words. */
  .steps { gap: 16px; margin-top: 36px; }
  .step { display: grid; grid-template-columns: minmax(230px, 40%) 1fr; grid-template-rows: 1fr auto auto auto 1fr;
    column-gap: 26px; padding: 18px; }
  .step .vis { grid-column: 1; grid-row: 1 / -1; margin: 0; }
  .step .n, .step h3, .step p { grid-column: 2; }
  .step .n { grid-row: 2; }
  .step h3 { grid-row: 3; }
  .step p { grid-row: 4; }
  .also { grid-template-columns: repeat(2, 1fr); }
  /* The three screens side by side, as on a desktop, as wide as there is
     room for. */
  .shots { overflow: visible; justify-content: center; gap: 22px; padding: 34px 0 10px; }
  .shot { flex: 0 1 220px; width: auto; min-width: 0; }
  .shot:nth-child(2) { transform: translateY(-20px); }
}
@media (min-width: 640px) and (max-width: 860px) {
  header nav { gap: 16px; }
  header nav .links { display: contents; }
  /* Features side by side again, alternating as on a desktop, in less room:
     a narrower gap and padding, and smaller headings and totals (the
     widest total, North Macedonia's, still fits on its line). */
  .feature, .feature.flip { grid-template-columns: 1fr 1fr; gap: 28px; margin-top: 64px; }
  .feature.first { margin-top: 44px; }
  .feature.flip .fv { order: 2; }
  .feature h3 { font-size: 26px; }
  .feature p { font-size: 16.5px; }
  .fv:not(.dial-card):not(.flow-card) { padding: 18px; }
  .fv { min-height: 260px; }
  .chip { padding: 12px 12px 10px; }
  .chip .l1 { font-size: 14px; gap: 8px; }
}
/* Under 720px the header's section links fit on one line, with the round
   theme switch round, only without "News"; the footer links to it there. */
@media (max-width: 719px) {
  header nav .nav-news { display: none; }
}
@media (min-width: 720px) and (max-width: 860px) {
  .chip .l1 { font-size: 16px; }
}
/* An unfolded foldable is tall enough for the desktop's hero: the words and
   the receipt side by side, pinned while the scroll runs the receipt down
   (home.js matches the same widths). Measured against the screen left when
   the browser's bars are showing (svh), as on a touch screen they come and
   go while it scrolls. */
@media (min-width: 720px) and (max-width: 860px) and (min-height: 600px) {
  .hero { height: calc(100svh - 68px + var(--run)); }
  .hero-pin { height: calc(100svh - 68px); }
  .hero .wrap { gap: 32px; }
  .hero .lead { font-size: 18px; }
}

/* A touch screen: no hover lift that stays put after a tap, and no field
   under 16px, which a phone zooms the page into the moment it is tapped. */
@media (hover: none) {
  .btn:hover, .step:hover, .play-badge:hover { transform: none; }
}
@media (pointer: coarse) {
  html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
  .notify-email { font-size: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .mark, .pill { opacity: 1; transform: none; }
  .js .reveal { opacity: 1; transform: none; }
}

@media (max-width: 400px) {
  .chip { padding: 12px 12px 10px; }
  .chip .l1 { font-size: 14px; gap: 8px; }
}
@media (max-width: 340px) {
  .chip .l1 { font-size: 11.5px; }
}
/* The smallest phones cannot fit the word mark, Start a group and the theme
   switch on one line: the mark alone stays, still the link home. */
@media (max-width: 360px) {
  .brand-name { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  header nav { gap: 8px; }
  .sign-in { font-size: 14px; }
  .btn.small { padding-inline: 12px; }
}
