/* Payday UI: rounded colour tiles (purple, yellow, orange, ink) on warm paper. No pure white or pure black: they glare next to the bright tiles.
   1. Tokens   2. Base   3. Buttons, pills, fields   4. Invoice ticket
   5. Pay page   6. Home page   7. Motion and print */

/* ---------- 1. Tokens ---------- */
:root {
  --bg: #f1ede5;
  --surface: #f9f6f0;
  --raise: #efe9df;
  --ink: #24212a;
  --muted: #5e5862;
  --faint: #6a646d;
  --line: #e2dbcf;
  --line-strong: #d0c8ba;

  --purple: #5b37e6;
  --purple-hover: #4c2bd1;
  --purple-soft: #ebe4fb;
  --purple-text: #5b37e6;
  --yellow: #ffd75e;
  --yellow-soft: #fbefc9;
  --orange: #ff8a3d;
  --orange-soft: #fbe3d1;
  --night: #24212a;
  --paid: #087443;
  --green-soft: #dcf3e2;
  --green-text: #067647;
  --danger: #c4320a;
  --danger-soft: #fbe9e2;

  --font: "Outfit", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "Geist Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
  --radius: 28px;
  /* Light only, by choice: the site looks the same whatever the visitor's dark-mode setting. */
  color-scheme: only light;
}

/* ---------- 2. Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 16.5px/1.55 var(--font); -webkit-font-smoothing: antialiased; }
h1, h2, h3, p, dl, dd, ol, ul { margin: 0; }
ol, ul { padding: 0; list-style: none; }
h1, h2, h3 { font-weight: 600; letter-spacing: -.03em; line-height: 1.06; text-wrap: balance; }
p { text-wrap: pretty; }
a { color: var(--purple-text); text-underline-offset: 3px; }
img, svg { max-width: 100%; }
button, input, select { font: inherit; color: inherit; }
:focus-visible { outline: 2.5px solid var(--purple-text); outline-offset: 3px; border-radius: 8px; }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.muted { color: var(--muted); }
.small { font-size: 14.5px; }
.center { text-align: center; }
.mono { font-family: var(--mono); font-size: .92em; }
.label { font-size: 14px; font-weight: 500; color: var(--muted); }

.logo { display: inline-flex; align-items: center; gap: 10px; font-size: 20px; font-weight: 600; letter-spacing: -.03em; color: inherit; text-decoration: none; }
.logo img { width: 30px; height: 30px; border-radius: 9px; display: block; flex: none; }

/* ---------- 3. Buttons, pills, fields ---------- */
.btn {
  appearance: none; cursor: pointer; border: 1.5px solid transparent;
  display: inline-flex; justify-content: center; align-items: center; gap: 8px;
  min-height: 52px; padding: 0 24px; border-radius: 999px;
  font: 600 16.5px/1.2 var(--font); text-decoration: none; text-align: center;
  background: var(--purple); color: #fff;
  transition: background-color .15s ease, border-color .15s ease, transform .15s ease;
}
.btn:hover { background: var(--purple-hover); }
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.btn.block { width: 100%; }
.btn.white { background: #faf6ee; color: #24212a; }
.btn.white:hover { background: #ece7ff; }
.btn.line { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .5); }
.btn.line:hover { background: rgba(255, 255, 255, .1); border-color: #fff; }
.btn.secondary { background: var(--surface); color: var(--ink); border-color: var(--line-strong); }
.btn.secondary:hover { border-color: var(--faint); background: var(--surface); }
.btn.quiet { background: transparent; color: var(--muted); min-height: 44px; font-weight: 500; }
.btn.quiet:hover { color: var(--ink); background: transparent; }
.btn svg { flex: none; }

.pill { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px; font-size: 13.5px; font-weight: 600; white-space: nowrap; }
.pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.pill.unpaid { background: var(--yellow); color: #24212a; }
.pill.paid { background: #faf6ee; color: #067647; }
.pill.ok { background: var(--green-soft); color: var(--green-text); }
.pill.draft { background: rgba(255, 255, 255, .18); color: #fff; }
.pill.draft::before { display: none; }

.field { display: grid; gap: 7px; min-width: 0; }
.field label { font-size: 15px; font-weight: 500; }
.field .hint { font-size: 14px; color: var(--muted); }
.input, .select {
  width: 100%; min-height: 52px; padding: 12px 16px; border-radius: 16px;
  border: 1.5px solid var(--line); background: var(--raise); color: var(--ink); font-size: 16px;
  transition: border-color .15s ease, box-shadow .15s ease, background-color .15s ease;
}
.select { appearance: none; padding-right: 38px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none' stroke='%238c8c98' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M1.5 1.5 6 6l4.5-4.5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 16px center; }
.input::placeholder { color: var(--faint); }
.input:hover, .select:hover { border-color: var(--line-strong); }
.input:focus-visible, .select:focus-visible { outline: none; border-color: var(--purple-text); background: var(--surface); border-radius: 16px; box-shadow: 0 0 0 4px color-mix(in srgb, var(--purple) 22%, transparent); }
.input.mono { font-size: 14.5px; }

.spinner { width: 22px; height: 22px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--purple-text); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- 4. Invoice ticket (pay page and home preview) ---------- */
.ticket { position: relative; background: var(--surface); color: var(--ink); border-radius: var(--radius); overflow: hidden; box-shadow: 0 1px 2px rgba(16, 16, 20, .05), 0 24px 48px -28px rgba(16, 16, 20, .25); }
.ticket-top { background: var(--purple); color: #fff; padding: 22px 22px 26px; transition: background-color .5s ease; }
/* Once paid, the top of the invoice turns green. */
.ticket:has(.pill.paid) .ticket-top { background: var(--paid); }
.ticket-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.from { display: grid; gap: 2px; min-width: 0; }
.from .label { color: rgba(255, 255, 255, .88); }
.from strong { font-size: 17.5px; font-weight: 600; overflow-wrap: anywhere; }
.amount { font-size: clamp(46px, 13vw, 60px); font-weight: 600; letter-spacing: -.045em; line-height: 1; margin-top: 28px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.amount-sub { margin-top: 8px; color: rgba(255, 255, 255, .9); font-size: 15px; font-variant-numeric: tabular-nums; min-height: 1.55em; }
.ticket-body { padding: 6px 22px 22px; }
.row { display: flex; justify-content: space-between; gap: 16px; padding: 13px 0; border-bottom: 1px solid var(--line); }
.row:last-child { border-bottom: 0; padding-bottom: 0; }
.row dt { color: var(--muted); flex: none; }
.row dd { text-align: right; font-weight: 500; overflow-wrap: anywhere; min-width: 0; }
.perf { position: relative; border-top: 2px dashed var(--line); }
.perf::before, .perf::after { content: ""; position: absolute; top: -12px; width: 22px; height: 22px; border-radius: 50%; background: var(--notch, var(--bg)); }
.perf::before { left: -11px; }
.perf::after { right: -11px; }
.stub { padding: 22px; display: grid; gap: 14px; }

/* ---------- 5. Pay page ---------- */
.wrap { max-width: 480px; margin: 0 auto; padding: 0 14px 48px; }
.topbar { max-width: 480px; margin: 0 auto; padding: 18px 16px; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.secure { display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; color: var(--muted); white-space: nowrap; }
@media (max-width: 359px) { .secure { display: none; } }

.skeleton .ticket-body { display: grid; gap: 14px; padding-top: 24px; }
.bone { display: block; height: 14px; border-radius: 8px; background: linear-gradient(90deg, var(--line) 20%, var(--raise) 40%, var(--line) 60%) 0 0 / 300% 100%; animation: shimmer 1.4s linear infinite; }
.bone.big { height: 52px; width: 58%; border-radius: 12px; }
@keyframes shimmer { to { background-position: -150% 0; } }

.notfound { padding: 40px 24px; display: grid; gap: 10px; justify-items: center; }
.notfound h1 { font-size: 26px; }
.notfound .glyph { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; background: var(--yellow); color: #24212a; font-size: 26px; font-weight: 600; margin-bottom: 6px; }

.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.seg button {
  appearance: none; cursor: pointer; text-align: left; position: relative;
  min-height: 70px; padding: 12px 36px 12px 15px; border-radius: 18px;
  background: var(--raise); border: 1.5px solid var(--line);
  transition: border-color .15s ease, background-color .15s ease;
}
.seg button:hover { border-color: var(--line-strong); }
.seg button::after { content: ""; position: absolute; top: 14px; right: 13px; width: 17px; height: 17px; border-radius: 50%; border: 1.5px solid var(--line-strong); }
.seg button[aria-pressed="true"] { border-color: var(--purple-text); background: var(--purple-soft); }
.seg button[aria-pressed="true"]::after { border-color: var(--purple-text); background: radial-gradient(circle, var(--purple-text) 0 4.5px, transparent 5px); }
.seg button:disabled { cursor: not-allowed; opacity: .6; }
.seg-title { display: block; font-weight: 600; line-height: 1.3; }
.seg-sub { display: block; font-size: 13.5px; color: var(--muted); line-height: 1.35; margin-top: 2px; }

.send-line { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 14px 16px; border-radius: 16px; background: var(--raise); }
.send-line span { color: var(--muted); }
.send-line b { font-weight: 600; font-variant-numeric: tabular-nums; text-align: right; overflow-wrap: anywhere; }

.wallet { display: grid; gap: 18px; }
.progress { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; font-size: 13.5px; color: var(--faint); }
.progress li { padding-top: 8px; border-top: 3px solid var(--line); }
/* Step 1 while the QR shows, step 2 once the wallet is connected. */
.wallet:has(#qr-wrap:not(.hidden)) .progress li:nth-child(1),
.wallet:has(#qr-wrap.hidden) .progress li:nth-child(2) { border-color: var(--purple-text); color: var(--ink); font-weight: 500; }
.wallet:has(#qr-wrap.hidden) .progress li:nth-child(1) { border-color: var(--purple-text); }

#qr-wrap { display: grid; gap: 14px; justify-items: center; }
.qr { position: relative; appearance: none; display: block; cursor: pointer; width: 232px; max-width: 100%; aspect-ratio: 1; background: #fff; padding: 12px; border-radius: 22px; border: 1px solid var(--line); }
.qr:hover { border-color: var(--purple); }
.qr-logo { position: absolute; left: 50%; top: 50%; width: 24%; aspect-ratio: 1; transform: translate(-50%, -50%); background: #fff; padding: 3px; border-radius: 8px; }
.qr svg { display: block; width: 100%; height: auto; }
.qr-help { font-size: 15px; color: var(--muted); text-align: center; max-width: 30ch; }
#qr-wrap.on-phone #copy-link { order: -2; }
#qr-wrap.on-phone .qr-help { order: -3; max-width: 36ch; }
#open-wallet { width: 100%; }
.spinner-row { display: flex; justify-content: center; }

#pay-msg { margin: 0; }
#pay-msg:empty { display: none; }
#pay-msg.error { color: var(--danger); background: var(--danger-soft); padding: 12px 16px; border-radius: 16px; text-align: left; }

.receipt { text-align: center; padding-top: 28px; }
.done-mark { width: 60px; height: 60px; border-radius: 50%; background: var(--green-soft); color: var(--green-text); display: grid; place-items: center; justify-self: center; animation: pop .45s cubic-bezier(.2, 1.3, .4, 1) both; }
@keyframes pop { from { transform: scale(.5); opacity: 0; } }
.receipt h2 { font-size: 23px; }

.pay-foot { margin-top: 24px; display: grid; gap: 6px; text-align: center; color: var(--muted); font-size: 14px; }

/* ---------- 6. Home page ---------- */
:root { --tpad: 10px; --hpad: 20px; }  /* tile gutter, and the text edge everything else lines up to */
.page { max-width: 1240px; margin: 0 auto; padding: 0 var(--tpad); }
.bento { display: grid; gap: 10px; }
.tile { border-radius: var(--radius); padding: 24px 22px; position: relative; overflow: hidden; min-width: 0; }
.t-purple { background: var(--purple); color: #fff; --notch: var(--purple); }
.t-night { background: var(--night); color: #fff; }
.t-yellow { background: var(--yellow); color: #24212a; }
.t-orange { background: var(--orange); color: #24212a; }
.t-white { background: var(--surface); color: var(--ink); }
.t-purple :focus-visible, .t-night :focus-visible { outline-color: #fff; }
.t-yellow :focus-visible, .t-orange :focus-visible { outline-color: #24212a; }

/* Hackathon banner */
.blaze { font-size: 13.5px; color: var(--muted); }
.blaze-in { max-width: 1240px; margin: 0 auto; padding: 8px var(--hpad); display: flex; flex-wrap: wrap; align-items: center; gap: 2px 18px; }
.blaze-tag { color: var(--ink); font-weight: 600; }
.blaze a { min-height: 30px; display: inline-flex; align-items: center; }
.blaze a[aria-disabled] { color: var(--muted); text-decoration: none; cursor: default; }
.ember { display: inline-flex; align-items: center; gap: 8px; min-width: 0; max-width: 100%; }
.ember code { font-family: var(--mono); font-size: 12.5px; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; max-width: 22ch; }
.ember button { appearance: none; cursor: pointer; flex: none; border: 1px solid var(--line-strong); background: var(--surface); border-radius: 999px; font-size: 12.5px; font-weight: 500; padding: 2px 10px; min-height: 28px; }

/* Hero: full-width purple section */
.hero { background: var(--purple); color: #fff; overflow-x: clip; }
.hero :focus-visible { outline-color: #fff; }
.hero-in { max-width: 1240px; margin: 0 auto; padding: 18px var(--hpad) 48px; }
.hero-body { display: grid; gap: 44px; align-items: center; padding-top: 44px; }
.hero .logo img { box-shadow: 0 0 0 2px rgba(255, 255, 255, .85); }
.hero-phone { position: relative; display: grid; place-items: center; }
.hero-phone::before { content: ""; position: absolute; inset: 8% -10%; background: radial-gradient(closest-side, rgba(255, 255, 255, .22), transparent); pointer-events: none; }
.hero-phone .phone { position: relative; }
.stats { margin-top: 14px; }
.nav { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.nav-links { display: flex; align-items: center; gap: 2px; }
.nav-links a { color: rgba(255, 255, 255, .92); text-decoration: none; font-weight: 500; font-size: 15.5px; min-height: 44px; align-items: center; padding: 0 15px; border-radius: 999px; }
.nav-links .nav-pill { display: inline-flex; }
.nav-links a:hover { color: #fff; background: rgba(255, 255, 255, .1); }
.nav-links a:not(.nav-pill) { display: none; }
.nav-links .nav-pill { background: rgba(255, 255, 255, .17); color: #fff; margin-left: 6px; }
.hero-copy { display: grid; gap: 26px; justify-items: start; }
.hero h1 { font-size: clamp(33px, 3vw + 15px, 54px); letter-spacing: -.035em; line-height: 1.08; }
.hero h1 > span { display: block; }
.hl { background: var(--yellow); color: #24212a; padding: 0 .14em; border-radius: .18em; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.hero-sub { font-size: 18.5px; color: rgba(255, 255, 255, .92); max-width: 27rem; margin-top: -8px; }
.cta { display: grid; gap: 10px; width: 100%; }
.hero-note { font-size: 14.5px; color: rgba(255, 255, 255, .74); }

/* Phone: a Telegram-style chat (Telegram's dark theme colours) that home.js plays on a loop */
.phone { width: min(100%, 300px); padding: 9px; border-radius: 48px; background: #050507; box-shadow: 0 0 0 1.5px #2a2a33, 0 40px 80px -30px rgba(20, 8, 70, .75); }
.tg { height: 620px; border-radius: 40px; overflow: hidden; display: flex; flex-direction: column; background: #0e1621; color: #f5f5f5; font-size: 14px; line-height: 1.4; }
.tg-status { position: relative; display: flex; justify-content: space-between; align-items: center; padding: 12px 24px 6px; background: #17212b; font-size: 13px; font-weight: 600; }
.tg-island { position: absolute; left: 50%; top: 9px; width: 84px; height: 22px; margin-left: -42px; border-radius: 999px; background: #000; }
.tg-icons { display: flex; gap: 3px; align-items: flex-end; }
.tg-icons i { width: 4px; border-radius: 1px; background: #f5f5f5; }
.tg-icons i:nth-child(1) { height: 6px; } .tg-icons i:nth-child(2) { height: 8px; } .tg-icons i:nth-child(3) { height: 10px; }
.tg-head { display: flex; align-items: center; gap: 10px; padding: 6px 14px 10px 8px; background: #17212b; border-bottom: 1px solid #0b1118; }
.tg-head svg { color: #6ab3f3; flex: none; }
.tg-head img { width: 36px; height: 36px; border-radius: 50%; flex: none; }
.tg-head b { display: block; font-size: 15px; font-weight: 600; line-height: 1.2; }
.tg-head span { display: block; font-size: 12.5px; color: #93a6ba; line-height: 1.3; }
.tg-head span.typing { color: #6ab3f3; }
.tg-chat { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; gap: 6px; padding: 10px 8px; overflow: hidden; transition: opacity .35s ease; }
.tg-chat.fade { opacity: 0; }
.tg-chat > * { flex: none; }
.tg-msg { max-width: 86%; padding: 7px 10px 6px; border-radius: 14px; overflow-wrap: anywhere; animation: tg-in .3s ease both; }
.tg-msg.in { align-self: flex-start; background: #182533; border-bottom-left-radius: 4px; }
.tg-msg.out { align-self: flex-end; background: #2b5278; border-bottom-right-radius: 4px; }
.tg-msg b { font-weight: 600; }
.tg-msg.tg-media { width: 200px; max-width: none; padding: 0; overflow: hidden; }
.tg-photo { display: block; width: 200px; height: 250px; }
.tg-photo-wrap { position: relative; }
.tg-stamp { position: absolute; left: 50%; top: 58%; white-space: nowrap; padding: 5px 15px 4px; border: 4px solid var(--paid); border-radius: 10px; background: rgba(255, 255, 255, .92); color: var(--paid); font-size: 31px; line-height: 1; font-weight: 800; letter-spacing: .06em; transform: translate(-50%, -50%) rotate(-8deg); animation: tg-stamp .32s cubic-bezier(.2, 1.4, .4, 1) .22s both; }
.tg-paid-pill { position: absolute; right: 14px; top: 34px; padding: 3px 7px; border-radius: 999px; background: var(--green-soft); color: var(--green-text); font-size: 8px; line-height: 1; font-weight: 700; letter-spacing: .05em; }
@keyframes tg-stamp { from { opacity: 0; transform: translate(-50%, -50%) rotate(-8deg) scale(1.5); } to { opacity: 1; transform: translate(-50%, -50%) rotate(-8deg) scale(1); } }
.tg-cap { padding: 7px 10px 6px; font-size: 13px; line-height: 1.35; }
.tg-cap .tg-link { white-space: nowrap; font-size: 12.5px; }
.tg-link { color: #6ab3f3; text-decoration: underline; }
.tg-time { float: right; margin: 6px 0 -2px 10px; font-size: 11px; color: #93a6ba; }
.tg-msg.out .tg-time { color: #a9c4e0; }
.tg-kb { align-self: flex-start; width: 200px; display: grid; grid-template-columns: 1fr 1fr; gap: 4px; animation: tg-in .3s ease both; }
.tg-kb span { display: block; text-align: center; padding: 7px; border-radius: 8px; background: rgba(255, 255, 255, .09); font-size: 13px; font-weight: 500; transition: background-color .2s ease, transform .2s ease; }
.tg-kb span.pressed { background: rgba(106, 179, 243, .35); transform: scale(.97); }
.tg-dots { align-self: flex-start; display: flex; gap: 4px; padding: 11px 12px; border-radius: 14px; border-bottom-left-radius: 4px; background: #182533; animation: tg-in .3s ease both; }
.tg-dots i { width: 6px; height: 6px; border-radius: 50%; background: #6d8aa5; animation: tg-dot 1s ease-in-out infinite; }
.tg-dots i:nth-child(2) { animation-delay: .15s; } .tg-dots i:nth-child(3) { animation-delay: .3s; }
.tg-input { display: flex; align-items: center; gap: 8px; padding: 8px 10px 16px; background: #17212b; }
.tg-field { flex: 1; min-width: 0; padding: 8px 14px; border-radius: 999px; background: #0e1621; color: #8a9bb0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tg-field.filled { color: #f5f5f5; }
.tg-field.filled::after { content: ""; display: inline-block; width: 1.5px; height: 1em; margin-left: 1px; vertical-align: -2px; background: #6ab3f3; }
.tg-send { flex: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; color: #6ab3f3; }
@keyframes tg-in { from { opacity: 0; transform: translateY(8px) scale(.98); } }
@keyframes tg-dot { 0%, 60%, 100% { opacity: .35; transform: none; } 30% { opacity: 1; transform: translateY(-2px); } }

/* Stat tiles */
.stat { display: grid; align-content: space-between; gap: 30px; min-height: 196px; }
.stat-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; font-weight: 500; }
.big { font-size: clamp(44px, 2.6vw + 22px, 60px); font-weight: 600; letter-spacing: -.045em; line-height: .95; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.stat small { display: block; font-size: 14.5px; margin-top: 10px; opacity: .78; }
.t-white.stat small, .t-white .stat-top { color: var(--muted); opacity: 1; }
.tick { width: 42px; height: 42px; border-radius: 50%; background: #24212a; color: var(--orange); display: grid; place-items: center; flex: none; }

/* Sections */
.sec { padding-top: 76px; }
.sec-head { display: grid; gap: 10px; max-width: 38rem; margin: 0 calc(var(--hpad) - var(--tpad)) 26px; }
.sec-head h2 { font-size: clamp(30px, 2.4vw + 18px, 46px); }
.sec-head p { color: var(--muted); font-size: 18px; }

/* How it works */
.step { display: grid; gap: 10px; align-content: start; }
.step-art { height: 180px; border-radius: 20px; display: grid; place-items: center; padding: 18px; margin-bottom: 12px; }
.art-purple { background: var(--purple-soft); }
.art-yellow { background: var(--yellow-soft); }
.art-orange { background: var(--orange-soft); }
.step-n { width: 32px; height: 32px; border-radius: 50%; background: var(--ink); color: var(--bg); display: grid; place-items: center; font-weight: 600; font-size: 15px; }
.step h3 { font-size: 23px; }
.step p { color: var(--muted); }
.bubble { background: var(--purple); color: #fff; padding: 10px 15px; border-radius: 20px 20px 6px 20px; font-size: 15px; max-width: 100%; overflow-wrap: anywhere; }
.bubble::after { content: ""; display: inline-block; width: 1.5px; height: 1em; margin-left: 2px; vertical-align: -2px; background: #fff; animation: blink 1.1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.mini { width: 100%; max-width: 280px; background: var(--surface); border-radius: 18px; padding: 14px 16px; display: grid; gap: 10px; font-size: 14.5px; box-shadow: 0 10px 30px -18px rgba(16, 16, 20, .35); }
.mini-link { display: flex; align-items: center; gap: 8px; color: var(--purple-text); font-family: var(--mono); font-size: 13px; overflow-wrap: anywhere; min-width: 0; }
.mini-share { display: flex; gap: 6px; }
.mini-share span { flex: 1; text-align: center; font-size: 13px; font-weight: 500; padding: 6px 4px; border-radius: 999px; background: var(--raise); color: var(--muted); }
.mini-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.mini-row b { font-weight: 600; }
.mini-row small { display: block; font-size: 13px; color: var(--muted); }

/* On-chain tiles */
.feat { display: grid; gap: 16px; align-content: space-between; min-height: 260px; }
.feat h3 { font-size: clamp(24px, 1vw + 18px, 30px); }
.feat p { opacity: .9; max-width: 30rem; }
.t-white.feat p { color: var(--muted); opacity: 1; }
.tag { justify-self: start; display: inline-flex; align-items: center; gap: 7px; font-size: 13.5px; font-weight: 500; padding: 5px 12px; border-radius: 999px; background: rgba(255, 255, 255, .15); }
.t-yellow .tag, .t-orange .tag { background: rgba(16, 16, 20, .1); }
.t-white .tag { background: var(--raise); color: var(--muted); }
.flow { display: flex; align-items: center; gap: 10px; }
.node { padding: 11px 16px; border-radius: 999px; background: rgba(255, 255, 255, .09); font-weight: 500; white-space: nowrap; }
.node.yours { background: var(--yellow); color: #24212a; }
.wire { flex: 1; min-width: 24px; height: 2px; position: relative; background: repeating-linear-gradient(90deg, rgba(255, 255, 255, .45) 0 6px, transparent 6px 12px); }
.wire::after { content: ""; position: absolute; top: -4px; left: 0; width: 10px; height: 10px; border-radius: 50%; background: var(--yellow); animation: travel 2.6s ease-in-out infinite; }
@keyframes travel { 0% { left: 0; opacity: 0; } 15% { opacity: 1; } 85% { opacity: 1; } 100% { left: calc(100% - 10px); opacity: 0; } }
.flow-note { font-size: 14.5px; opacity: .6; }
.txbox { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 16px; background: rgba(16, 16, 20, .08); font-family: var(--mono); font-size: 13.5px; }
.txbox span:last-child { font-family: var(--font); font-weight: 600; font-size: 13.5px; display: inline-flex; align-items: center; gap: 6px; }
.qr-art { width: 76px; height: 76px; border-radius: 14px; background: #faf6ee; padding: 7px; border: 1px solid var(--line); }
.qr-art svg { display: block; width: 100%; height: 100%; }

/* What if something goes wrong? */
.faq { display: grid; gap: 10px; align-content: start; }
.faq h3 { font-size: 21px; }
.faq p { color: var(--muted); }

/* Make an invoice */
.form { display: grid; gap: 18px; align-content: start; }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.money-row { display: grid; grid-template-columns: 1fr 118px; gap: 10px; }
.form-error { color: var(--danger); background: var(--danger-soft); padding: 12px 16px; border-radius: 16px; font-size: 15px; }
.form-error:empty { display: none; }
.preview-tile { display: grid; gap: 14px; align-content: start; }
.preview-tile .ticket { box-shadow: 0 0 0 1.5px rgba(255, 255, 255, .35), 0 24px 48px -24px rgba(16, 16, 20, .5); }
.preview-tile .ticket-top { background: #4524c4; }
.preview-label { font-size: 14.5px; font-weight: 500; color: rgba(255, 255, 255, .92); }
.result-link { display: block; padding: 13px 16px; border-radius: 16px; background: var(--raise); font-family: var(--mono); font-size: 14px; color: var(--ink); overflow-wrap: anywhere; text-decoration: none; }
.result-actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.result-actions .btn { padding-inline: 14px; }
.result-more { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 24px; font-size: 15px; font-weight: 500; }
.result-more a { color: var(--purple-text); }
.email-draft { display: grid; gap: 14px; }
.email-draft h1 { margin: 0; font-size: 30px; line-height: 1.1; }
.email-draft p { margin: 0; }
.email-draft pre { margin: 0; padding: 16px; overflow-wrap: anywhere; white-space: pre-wrap; border-radius: 16px; background: var(--raise); font-family: var(--mono); font-size: 13.5px; line-height: 1.5; }
.stub-empty { font-size: 15px; color: var(--muted); text-align: center; }

/* Rate check (yellow tile) */
.rates-tile { display: grid; gap: 30px; padding: 30px 22px; }
.rates-tile h2 { font-size: clamp(30px, 2.4vw + 18px, 46px); }
.rates-tile .lede { font-size: 18px; color: #4a4536; margin-top: 10px; max-width: 26rem; }
.rate-in { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: center; background: rgba(255, 255, 255, .55); border-radius: 22px; padding: 10px 10px 10px 20px; }
.rate-in:focus-within { background: rgba(255, 255, 255, .85); }
.rate-amount { display: flex; align-items: baseline; gap: 4px; min-width: 0; }
.rate-amount span { font-size: 36px; font-weight: 600; color: rgba(16, 16, 20, .62); letter-spacing: -.03em; }
.rate-amount input { appearance: textfield; -moz-appearance: textfield; width: 100%; min-width: 0; border: 0; background: transparent; padding: 0; color: #24212a; font-size: 36px; font-weight: 600; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.rate-amount input:focus { outline: none; }
.rate-amount input::-webkit-outer-spin-button, .rate-amount input::-webkit-inner-spin-button { appearance: none; margin: 0; }
.chips { display: inline-flex; gap: 2px; padding: 3px; border-radius: 999px; background: rgba(16, 16, 20, .08); }
.chips button { appearance: none; cursor: pointer; border: 0; background: transparent; color: #3d3a30; font-size: 14px; font-weight: 600; min-height: 44px; padding: 0 12px; border-radius: 999px; }
.chips button[aria-pressed="true"] { background: #24212a; color: #fff; }
.rate-out { margin-top: 12px; }
.rate-out li { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 15px 4px; border-bottom: 1px solid rgba(16, 16, 20, .14); }
.rate-out li:last-child { border-bottom: 0; }
.rate-out .cur { color: #4a4536; font-size: 15.5px; }
.rate-out .val { font-size: 24px; font-weight: 600; letter-spacing: -.025em; font-variant-numeric: tabular-nums; text-align: right; overflow-wrap: anywhere; }
.rate-note { font-size: 13.5px; color: #5e5847; padding: 4px 4px 0; }

/* Closing + footer */
.closing { display: grid; gap: 22px; justify-items: start; padding: 40px 24px; }
.closing h2 { font-size: clamp(30px, 2.4vw + 18px, 46px); max-width: 15em; }
.closing p { color: rgba(255, 255, 255, .72); max-width: 32rem; margin-top: -8px; font-size: 17.5px; }
.footer { max-width: 1240px; margin: 0 auto; padding: 30px var(--hpad) 40px; display: grid; gap: 14px; font-size: 14.5px; color: var(--muted); }
.footer .logo { color: var(--ink); }
.footer-links { display: flex; flex-wrap: wrap; gap: 2px 22px; }
.footer-links a { color: var(--muted); text-decoration: none; min-height: 32px; display: inline-flex; align-items: center; }
.footer-links a:hover { color: var(--ink); }

@media (min-width: 560px) {
  .cta { display: flex; flex-wrap: wrap; width: auto; }
  .ember code { max-width: none; }
  .tile { padding: 28px; }
  :root { --hpad: 24px; }
  .hero-in { padding-bottom: 56px; }
}
@media (min-width: 640px) {
  :root { --tpad: 14px; }
  .bento { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .bento > .wide { grid-column: 1 / -1; }
}
@media (min-width: 760px) {
  .nav-links a:not(.nav-pill) { display: inline-flex; }
  .sec { padding-top: 104px; }
  .sec-head { margin-bottom: 32px; }
  .footer { grid-template-columns: auto 1fr; align-items: center; column-gap: 40px; }
  .footer > p { grid-column: 1 / -1; }
  .closing { padding: 56px 48px; }
}
@media (min-width: 960px) {
  :root { --tpad: 18px; --hpad: 18px; }
  .bento { grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 14px; }
  .bento > * { grid-column: span 4; }
  .bento > .wide { grid-column: 1 / -1; }
  .hero-in { padding-top: 22px; padding-bottom: 72px; }
  .hero-body { grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: 48px; padding-top: 48px; }
  .hero h1 { font-size: clamp(44px, 3vw + 18px, 62px); }
  .hero-sub { font-size: 20px; }
  .stats { margin-top: 18px; }
  .bento > .span7 { grid-column: span 7; }
  .bento > .span5 { grid-column: span 5; }
  .steps > * { grid-column: span 4; }
  .preview-tile { position: sticky; top: 18px; }
  .rates-tile { grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 64px; padding: 48px 52px; align-items: center; }
  .closing { padding: 64px 56px; }
}

/* ---------- 7. Motion and print ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .tg-msg, .tg-kb, .tg-stamp, .tg-dots i, .done-mark, .bubble::after, .bone, .wire::after { animation: none; }
  .spinner { animation-duration: 2.4s; }
  .btn, .input, .select, .seg button, .ticket-top { transition: none; }
}
@media print {
  :root { --bg: #fff; --surface: #fff; --raise: #fff; --ink: #000; --muted: #444; --line: #bbb; }
  body { background: #fff; }
  .secure, .no-print, #pay-box, .pay-foot a { display: none !important; }
  .ticket { box-shadow: none; border: 1px solid #bbb; break-inside: avoid; }
  .ticket-top { print-color-adjust: exact; -webkit-print-color-adjust: exact; }
  .done-mark { animation: none; }
  #proof { border: 0; min-height: 0; padding: 0; color: #000; font-size: 12px; word-break: break-all; }
  #proof::after { content: ": " attr(href); font-weight: 400; }
}

/* Pay with any wallet: plain BCH QR with the invoice's exact amount */
#plain-panel { justify-items: center; }
#plain-panel > * { width: 100%; }
#plain-panel .plain-qr { width: 232px; }
#plain-panel .qr-help { width: auto; }
.plain-qr { cursor: default; margin: 0 auto; }
.plain-address { font-size: 13px; color: var(--muted); text-align: center; overflow-wrap: anywhere; margin: -6px 0 0; }
.plain-copy { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.share-options { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.email-actions { display: grid; gap: 10px; }
.seg-hint { margin: -4px 2px 0; font-size: 14.5px; line-height: 1.4; color: var(--muted); }
.plain-qr:hover { border-color: var(--line); }
