:root {
  --bg: #fbf8f3;
  --surface: #ffffff;
  --ink: #1d1a16;
  --muted: #6b645b;
  --line: #e7e0d5;
  --brand: #e2553d;
  --brand-ink: #ffffff;
  --ok: #1f7a4d;
  --ok-bg: #e3f4ea;
  --warn: #8a5a00;
  --warn-bg: #fdf0d3;
  --bad: #a42b1a;
  --bad-bg: #fbe4df;
  --radius: 14px;
  --shadow: 0 1px 2px rgb(0 0 0 / 0.05), 0 8px 24px rgb(0 0 0 / 0.06);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #15130f;
    --surface: #1f1c17;
    --ink: #f3eee6;
    --muted: #a8a094;
    --line: #36312a;
    --brand: #f2735c;
    --brand-ink: #1a0f0c;
    --ok: #7fd6a6;
    --ok-bg: #173325;
    --warn: #f3c46b;
    --warn-bg: #3a2c10;
    --bad: #ff9a88;
    --bad-bg: #3d1a14;
    --shadow: none;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.55 ui-sans-serif, -apple-system, "Segoe UI", Roboto, sans-serif;
}
a { color: var(--brand); }
.wrap { max-width: 980px; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 640px; }

header.site {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 0; gap: 12px;
}
.logo { font-weight: 800; font-size: 20px; color: var(--ink); text-decoration: none; letter-spacing: -0.02em; }
.logo span { color: var(--brand); }
nav a { color: var(--muted); text-decoration: none; margin-left: 18px; font-size: 15px; }
nav a:hover { color: var(--ink); }

.hero { padding: 56px 0 40px; }
.hero h1 { font-size: clamp(34px, 6vw, 56px); line-height: 1.05; letter-spacing: -0.03em; margin: 0 0 16px; }
.hero p { font-size: 19px; color: var(--muted); max-width: 560px; margin: 0 0 28px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--brand); color: var(--brand-ink); border: 0; border-radius: 999px;
  padding: 12px 22px; font: inherit; font-weight: 650; cursor: pointer; text-decoration: none;
}
.btn:hover { filter: brightness(1.05); }
.btn:disabled { opacity: 0.55; cursor: progress; }
.btn.ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); }
.btn.small { padding: 7px 14px; font-size: 14px; }
.btn.ok { background: var(--ok); color: var(--surface); }
.btn.bad { background: transparent; color: var(--bad); border: 1px solid currentColor; }

.grid3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; margin: 8px 0 56px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
.card h3 { margin: 0 0 6px; font-size: 18px; }
.card p { margin: 0; color: var(--muted); }
.num { font-size: 28px; font-weight: 800; color: var(--brand); display: block; margin-bottom: 4px; }

h2 { font-size: 26px; letter-spacing: -0.02em; margin: 0 0 12px; }
.muted { color: var(--muted); }
.small { font-size: 14px; }

form .field { margin-bottom: 18px; }
label { display: block; font-weight: 600; margin-bottom: 6px; }
.hint { display: block; font-weight: 400; color: var(--muted); font-size: 14px; margin-top: 4px; }
input, textarea, select {
  width: 100%; font: inherit; color: var(--ink); background: var(--surface);
  border: 1px solid var(--line); border-radius: 10px; padding: 11px 12px;
}
input:focus, textarea:focus, select:focus { outline: 2px solid var(--brand); outline-offset: 1px; border-color: transparent; }
textarea { min-height: 110px; resize: vertical; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 560px) { .row2 { grid-template-columns: 1fr; } nav a { margin-left: 12px; } }

.notice { border-radius: 10px; padding: 12px 14px; margin: 14px 0; }
.notice.ok { background: var(--ok-bg); color: var(--ok); }
.notice.bad { background: var(--bad-bg); color: var(--bad); }
.notice.warn { background: var(--warn-bg); color: var(--warn); }
.hidden { display: none !important; }

.pill { display: inline-block; border-radius: 999px; padding: 2px 10px; font-size: 13px; font-weight: 650; }
.pill.pending { background: var(--warn-bg); color: var(--warn); }
.pill.approved, .pill.sent { background: var(--ok-bg); color: var(--ok); }
.pill.rejected, .pill.failed, .pill.unknown { background: var(--bad-bg); color: var(--bad); }
.pill.suspended, .pill.sending { background: var(--line); color: var(--muted); }

.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin: 16px 0; }
.tabs button { font: inherit; background: none; border: 1px solid var(--line); color: var(--muted); border-radius: 999px; padding: 6px 14px; cursor: pointer; }
.tabs button[aria-selected="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }

.app-item { display: grid; grid-template-columns: 1fr auto; gap: 8px 16px; }
.app-item h3 { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.app-item dl { display: grid; grid-template-columns: max-content 1fr; gap: 4px 14px; margin: 10px 0 0; font-size: 14px; }
.app-item dt { color: var(--muted); }
.app-item dd { margin: 0; overflow-wrap: anywhere; }
.actions { display: flex; flex-direction: column; gap: 8px; min-width: 150px; }
.actions textarea { min-height: 60px; font-size: 14px; }
@media (max-width: 640px) { .app-item { grid-template-columns: 1fr; } .actions { min-width: 0; } }
.stack > * + * { margin-top: 14px; }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin: 16px 0; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 14px; }
.stat b { display: block; font-size: 22px; }
.stat span { color: var(--muted); font-size: 13px; }

table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 9px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 600; }
.table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }

code { font: 13px ui-monospace, Menlo, monospace; background: var(--line); padding: 1px 5px; border-radius: 5px; }
footer { color: var(--muted); font-size: 14px; padding: 40px 0; }

/* ==========================================================================
   Landing page (index.html)
   Everything below is scoped to body.lp or carries an lp- prefix, so apply,
   status, admin, privacy and support are untouched.
   ========================================================================== */

.lp {
  --lp-sans: ui-sans-serif, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  --lp-serif: Georgia, "Iowan Old Style", "Palatino Linotype", "Times New Roman", serif;
  --lp-mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  --lp-brand-deep: #b3361f;   /* coral for small text on paper, 5.7:1 */
  --lp-brand-soft: #fdeae6;   /* coral tint, the app's balance pill */
  --lp-on-brand: #1d1a16;     /* text on a coral fill, 4.6:1 */
  --lp-coin: #e2553d;
  --lp-coin-ink: rgb(255 255 255 / 0.66);
  --lp-amber: #d59100;
  --lp-panel: #1d1a16;
  --lp-panel-ink: #fbf8f3;
  --lp-panel-muted: #bdb4a7;
  --lp-panel-line: #3d372f;
  --lp-panel-brand: #f2735c;
  --lp-stamp: #3ddc84;        /* the app's GIVE stamp */
  --lp-gutter: clamp(16px, 4.4vw, 40px);
  font-size: 17px;
  line-height: 1.6;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .lp {
    --lp-brand-deep: #ff937e;
    --lp-brand-soft: #33211b;
    --lp-on-brand: #1a0f0c;
    --lp-coin: #c94a33;
    --lp-coin-ink: rgb(255 255 255 / 0.5);
    --lp-amber: #f3c46b;
    --lp-panel: #221e19;
    --lp-panel-ink: #f3eee6;
    --lp-panel-muted: #a8a094;
    --lp-panel-line: #3d372f;
  }
}
@media (prefers-reduced-motion: no-preference) {
  html:has(> .lp) { scroll-behavior: smooth; }
}

.lp ::selection { background: var(--brand); color: var(--lp-on-brand); }
.lp [id] { scroll-margin-top: 28px; }
.lp main :where(p, dd, li) { text-wrap: pretty; }
.lp-wrap { max-width: 1160px; margin-inline: auto; padding-inline: var(--lp-gutter); }
.lp-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.lp-ico { width: 1.05em; height: 1.05em; flex: none; fill: currentColor; }

.lp-skip {
  position: absolute; left: 12px; top: -80px; z-index: 20;
  padding: 10px 16px; border-radius: 10px;
  background: var(--ink); color: var(--bg); font-weight: 700; text-decoration: none;
}
.lp-skip:focus { top: 12px; }

.lp a:focus-visible,
.lp .btn:focus-visible,
.lp-pause-input:focus-visible ~ .lp-pause {
  outline: 3px solid var(--lp-focus, var(--ink)); outline-offset: 3px;
}
.lp a:not(.btn):focus-visible { border-radius: 5px; }

/* Links inside running text: ink with a coral underline. :where() keeps the
   specificity at zero so any class on a link wins. */
:where(.lp main) :where(p, dd) a {
  color: inherit; font-weight: 600;
  text-decoration: underline; text-decoration-color: var(--brand);
  text-decoration-thickness: 2px; text-underline-offset: 3px;
}
:where(.lp main) :where(p, dd) a:hover { color: var(--lp-brand-deep); }

/* ---- header ---- */
.lp-header { flex-wrap: wrap; gap: 8px 20px; padding-block: 20px; }
.lp .logo { display: inline-flex; align-items: center; font-size: 21px; }
.lp-mark { width: 28px; height: 28px; margin-right: 9px; flex: none; fill: var(--brand); }
.lp-mark-heart { fill: #fff; }
.lp-nav { display: flex; flex-wrap: wrap; gap: 2px; margin-right: -12px; }
.lp-nav a {
  margin-left: 0; padding: 8px 12px; border-radius: 999px;
  color: var(--ink); font-size: 15px; font-weight: 600;
}
.lp-nav a:hover { background: var(--line); }

/* ---- buttons ---- */
.lp-btn {
  gap: 9px; padding: 14px 22px; font-size: 1rem; font-weight: 700; line-height: 1.25;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.lp-btn:hover { transform: translateY(-1px); }
.lp-btn:active { transform: translateY(0); }
.lp-btn-primary { background: var(--brand); color: var(--lp-on-brand); }
.lp-btn-dark { background: var(--ink); color: var(--bg); }
.lp-btn-line { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--ink); }
.lp-btn-line:hover { background: var(--surface); }

/* ---- hero ---- */
.lp-hero {
  display: grid; grid-template-columns: minmax(0, 1.18fr) minmax(0, 0.82fr);
  align-items: center; gap: clamp(28px, 4vw, 56px);
  padding-block: clamp(20px, 4vw, 52px) clamp(64px, 9vw, 116px);
}
.lp-kicker { margin: 0 0 24px; }
.lp-kicker a {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 7px 14px 7px 11px; border: 1px solid var(--line); border-radius: 999px;
  background: var(--surface); color: var(--ink); text-decoration: none;
  font: 600 12.5px/1.3 var(--lp-mono);
}
.lp-kicker a:hover { border-color: var(--ink); }
.lp-dot {
  width: 8px; height: 8px; flex: none; border-radius: 50%;
  background: var(--lp-amber); box-shadow: 0 0 0 3px color-mix(in srgb, var(--lp-amber) 28%, transparent);
}
.lp-title {
  margin: 0; font: 800 clamp(3rem, 8.4vw, 5.9rem)/0.95 var(--lp-sans); letter-spacing: -0.04em;
}
.lp-title em, .lp-h2 em {
  font-family: var(--lp-serif); font-style: italic; font-weight: 700; letter-spacing: -0.03em;
  color: var(--brand);
}
.lp-lede { margin: 28px 0 0; max-width: 33em; font-size: clamp(1.06rem, 1.45vw, 1.22rem); line-height: 1.55; }
/* Four buttons as two rows of two: the demo on top, the code and charities under it. */
.lp-cta { display: grid; grid-template-columns: repeat(2, max-content); gap: 10px; margin-top: 30px; }
.lp-facts {
  display: flex; flex-wrap: wrap; gap: 6px 20px; margin: 28px 0 0; padding: 0; list-style: none;
  color: var(--muted); font: 500 12.5px/1.5 var(--lp-mono);
}
.lp-facts li { position: relative; padding-left: 14px; }
.lp-facts li::before {
  content: ""; position: absolute; left: 0; top: 0.75em; width: 6px; height: 6px; margin-top: -3px;
  border-radius: 50%; background: var(--brand);
}

.lp-hero-art {
  position: relative; isolation: isolate;
  display: grid; justify-items: center; align-content: center; gap: 20px;
}
.lp-coin {
  position: absolute; z-index: -1; left: 50%; top: 46%;
  width: min(112%, 520px); transform: translate(-50%, -50%);
}
.lp-coin-face { fill: var(--lp-coin); }
.lp-coin-ring { fill: none; stroke: var(--lp-coin-ink); stroke-width: 1.4; opacity: 0.55; }
.lp-coin-text { fill: var(--lp-coin-ink); font: 800 17px var(--lp-sans); letter-spacing: 1.2px; }

/* ---- the phone, drawn in CSS. 1em is a thirtieth of its width. ---- */
.lp-phone {
  --pw: 320px;
  position: relative; display: grid; width: var(--pw); aspect-ratio: 30 / 61;
  padding: 1em; border-radius: 4.9em;
  background: #14110e; color: #1d1a16;
  font: 500 calc(var(--pw) / 30) / 1.3 -apple-system, ui-sans-serif, "Segoe UI", Roboto, sans-serif;
  box-shadow:
    inset 0 0 0 0.16em #5a534b, inset 0 0 0 0.36em #0b0907,
    0 3.2em 5em -2.2em rgb(92 38 14 / 0.55), 0 1em 2em -1em rgb(92 38 14 / 0.3);
  -webkit-user-select: none; user-select: none;
}
.lp-phone-screen {
  position: relative; isolation: isolate; overflow: hidden; min-height: 0;
  display: flex; flex-direction: column; border-radius: 3.9em; background: #fff;
}
/* A real screenshot can replace the drawn screen: one <img> inside .lp-phone-screen. */
.lp-phone-screen > img { display: block; flex: 1 1 auto; width: 100%; height: 100%; min-height: 0; object-fit: cover; object-position: top; }
.lp-phone svg { fill: currentColor; }

.lp-app-status {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.35em 2.5em 0.15em; font-size: 1.1em; font-weight: 650;
}
.lp-app-island {
  position: absolute; left: 50%; top: 0.9em; width: 7.8em; height: 2.2em; margin-left: -3.9em;
  border-radius: 2em; background: #0b0907;
}
.lp-app-sys { width: 4.2em; height: 1.1em; }
.lp-app-head { display: flex; align-items: center; justify-content: space-between; padding: 1em 1.6em 0.5em; }
.lp-app-logo { font-size: 1.75em; font-weight: 800; letter-spacing: -0.02em; }
.lp-app-logo b { font-weight: inherit; color: #e2553d; }
.lp-app-balance {
  padding: 0.38em 0.95em; border-radius: 99em; background: #fdeae6; color: #b3361f;
  font-size: 1.14em; font-weight: 700;
}

.lp-deck { position: relative; flex: 1 1 auto; min-height: 0; margin: 0.5em 1.4em 0; }
.lp-card {
  position: absolute; inset: 0; overflow: hidden;
  display: flex; flex-direction: column; justify-content: flex-end;
  border-radius: 1.5em; background: #222; color: #fff;
  box-shadow: 0 0.15em 0.4em rgb(0 0 0 / 0.25);
  backface-visibility: hidden;
}
/* The same gradients the app picks for these names when a charity has no photo. */
.lp-card-a { background-image: linear-gradient(#e2a33d, #c3552a); }
.lp-card-b { background-image: linear-gradient(#2a8fbd, #2fbfa0); }
.lp-card-c { background-image: linear-gradient(#2f9e6e, #1d5f7a); }
.lp-card-art { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.lp-card-initial {
  position: absolute; left: 0; right: 0; top: 12%; text-align: center;
  font-size: 13em; font-weight: 800; line-height: 1; color: rgb(255 255 255 / 0.35);
}
.lp-card-info {
  position: relative; display: flex; flex-direction: column;
  padding: 5.6em 1.45em 1.45em;
  background: linear-gradient(rgb(0 0 0 / 0), rgb(0 0 0 / 0.85));
}
.lp-card-cat {
  margin-bottom: 0.3em; font-size: 0.93em; font-weight: 700; letter-spacing: 0.08em;
  text-transform: uppercase; color: rgb(255 255 255 / 0.8);
}
.lp-card-name { font-size: 2.1em; font-weight: 700; line-height: 1.12; letter-spacing: -0.01em; }
.lp-card-domain {
  display: flex; align-items: center; gap: 0.3em; margin-top: 0.3em;
  font-size: 1em; font-weight: 600; color: #9be7b8;
}
.lp-card-domain svg { width: 1.1em; height: 1.1em; }
.lp-card-mission { margin-top: 0.5em; font-size: 1.12em; line-height: 1.38; }
.lp-card-hint { margin-top: 0.9em; font-size: 0.92em; color: rgb(255 255 255 / 0.7); }

.lp-stamp {
  display: inline-block; padding: 0.12em 0.42em;
  border: 0.14em solid currentColor; border-radius: 0.34em;
  color: var(--lp-stamp); font-weight: 900; letter-spacing: 0.04em; line-height: 1.15; white-space: nowrap;
}
.lp-card .lp-stamp { position: absolute; left: 0.8em; top: 1.3em; font-size: 2.1em; transform: rotate(-14deg); opacity: 0; }

.lp-touch {
  position: absolute; z-index: 5; left: 40%; top: 60%; width: 3.4em; height: 3.4em; margin: -1.7em 0 0 -1.7em;
  border: 0.14em solid rgb(255 255 255 / 0.95); border-radius: 50%;
  background: rgb(255 255 255 / 0.42); box-shadow: 0 0.1em 0.6em rgb(0 0 0 / 0.3);
  pointer-events: none;
}

.lp-app-actions { display: flex; justify-content: center; gap: 2.6em; padding: 1.3em 0 1.1em; }
.lp-round {
  display: grid; place-items: center; width: 4.6em; height: 4.6em; border-radius: 50%;
  box-shadow: 0 0.15em 0.6em rgb(0 0 0 / 0.16);
}
.lp-round svg { width: 2.1em; height: 2.1em; }
.lp-round-pass { background: #fff; color: #e2553d; }
.lp-round-give { background: #e2553d; color: #fff; }
.lp-app-tabs {
  position: relative; display: flex; padding: 0.7em 0 2em;
  border-top: 1px solid #ebe6dd; color: #687076; font-size: 0.95em; font-weight: 600;
}
.lp-app-tabs span { flex: 1; display: grid; justify-items: center; gap: 0.2em; }
.lp-app-tabs svg { width: 2.1em; height: 2.1em; }
.lp-app-tabs .is-on { color: #e2553d; }
.lp-app-tabs::after {
  content: ""; position: absolute; left: 50%; bottom: 0.65em; width: 10em; height: 0.45em; margin-left: -5em;
  border-radius: 1em; background: #14110e;
}

/* Without motion the phone shows one frame: the top card caught mid-swipe. */
.lp-card-a { z-index: 3; transform: translate3d(4.6em, -0.4em, 0) rotate(6deg); }
.lp-card-a .lp-stamp { opacity: 1; }
.lp-card-b { z-index: 2; transform: scale(0.955); opacity: 0.62; }
.lp-card-c { z-index: 1; opacity: 0; }
.lp-touch { transform: translate3d(4.6em, -0.4em, 0); }

.lp-pause-input {
  position: absolute; left: 50%; bottom: 0; width: 1px; height: 1px; margin: 0; padding: 0;
  border: 0; opacity: 0; pointer-events: none;
}
.lp-pause { display: none; }

@media (prefers-reduced-motion: no-preference) {
  /* Three cards take turns on top, four seconds each. */
  .lp-card { animation: lp-card 12s var(--lp-d, 0s) infinite both; }
  .lp-card .lp-stamp { animation: lp-stamp 12s var(--lp-d, 0s) infinite both; }
  .lp-card-a { --lp-d: -0.6s; }
  .lp-card-b { --lp-d: -8.6s; }
  .lp-card-c { --lp-d: -4.6s; }
  .lp-touch { animation: lp-touch 4s -0.6s infinite both; }
  .lp-pause-input:checked ~ .lp-phone .lp-card,
  .lp-pause-input:checked ~ .lp-phone .lp-stamp,
  .lp-pause-input:checked ~ .lp-phone .lp-touch { animation-play-state: paused; }

  .lp-pause {
    display: inline-flex; align-items: center; gap: 7px; margin: 0;
    padding: 7px 14px 7px 10px; border: 1px solid var(--line); border-radius: 999px;
    background: var(--surface); color: var(--muted); cursor: pointer;
    font: 600 12px/1 var(--lp-mono); -webkit-user-select: none; user-select: none;
  }
  .lp-pause:hover { border-color: var(--ink); color: var(--ink); }
  .lp-pause-input:checked ~ .lp-pause { border-color: var(--ink); background: var(--ink); color: var(--bg); }
  /* Nothing to pause once a screenshot has replaced the drawn cards. */
  .lp-phone:not(:has(.lp-card)) ~ .lp-pause { display: none; }
}

@keyframes lp-card {
  0%, 12% {
    transform: translate3d(0, 0, 0) rotate(0deg) scale(1); opacity: 1; z-index: 3;
    animation-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  }
  20% {
    transform: translate3d(5.2em, -0.5em, 0) rotate(6deg) scale(1); opacity: 1; z-index: 3;
    animation-timing-function: ease-in-out;
  }
  23% {
    transform: translate3d(5.8em, -0.6em, 0) rotate(6.6deg) scale(1); opacity: 1; z-index: 3;
    animation-timing-function: cubic-bezier(0.5, 0, 0.9, 0.5);
  }
  28% {
    transform: translate3d(36em, -1em, 0) rotate(15deg) scale(1); opacity: 1; z-index: 3;
    animation-timing-function: step-end;
  }
  28.01%, 66.66% {
    transform: translate3d(0, 0, 0) rotate(0deg) scale(0.955); opacity: 0; z-index: 1;
    animation-timing-function: step-end;
  }
  66.67%, 78.67% {
    transform: translate3d(0, 0, 0) rotate(0deg) scale(0.955); opacity: 0.55; z-index: 2;
    animation-timing-function: ease-in-out;
  }
  86.67%, 89.67% {
    transform: translate3d(0, 0, 0) rotate(0deg) scale(0.962); opacity: 0.66; z-index: 2;
    animation-timing-function: ease-out;
  }
  94.67%, 100% { transform: translate3d(0, 0, 0) rotate(0deg) scale(1); opacity: 1; z-index: 2; }
}
@keyframes lp-stamp {
  0%, 13% { opacity: 0; }
  20%, 28% { opacity: 1; }
  28.01%, 100% { opacity: 0; }
}
@keyframes lp-touch {
  0%, 27% { opacity: 0; transform: translate3d(0, 0, 0) scale(0.6); }
  34%, 36% {
    opacity: 1; transform: translate3d(0, 0, 0) scale(1);
    animation-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  }
  60% { opacity: 1; transform: translate3d(5.2em, -0.5em, 0) scale(1); animation-timing-function: ease-in-out; }
  69% { opacity: 1; transform: translate3d(5.8em, -0.6em, 0) scale(1); }
  77%, 100% { opacity: 0; transform: translate3d(9em, -0.8em, 0) scale(1.15); }
}

/* ---- sections ---- */
.lp-section { padding-block: clamp(64px, 9vw, 120px); border-top: 1px solid var(--line); }
.lp-eyebrow {
  margin: 0 0 16px; color: var(--lp-brand-deep);
  font: 600 12.5px/1.2 var(--lp-mono); letter-spacing: 0.14em; text-transform: uppercase;
}
.lp-h2 {
  margin: 0; max-width: 15em; text-wrap: balance;
  font: 800 clamp(2.1rem, 5vw, 3.5rem)/1.02 var(--lp-sans); letter-spacing: -0.035em;
}
.lp-sub { margin: 20px 0 0; max-width: 35em; color: var(--muted); font-size: 1.14rem; }
.lp-label {
  margin: 0 0 14px; color: var(--muted);
  font: 600 12px/1.3 var(--lp-mono); letter-spacing: 0.12em; text-transform: uppercase;
}
.lp-step {
  display: inline-grid; place-items: center; flex: none; width: 22px; height: 22px; border-radius: 50%;
  background: var(--brand); color: var(--lp-on-brand); font: 700 12px/1 var(--lp-mono);
}
.lp-more {
  display: inline-flex; align-items: center; gap: 6px; color: var(--ink); font-weight: 700;
  text-decoration: underline; text-decoration-color: var(--brand);
  text-decoration-thickness: 2px; text-underline-offset: 4px;
}
.lp-more:hover { color: var(--lp-brand-deep); }

/* ---- why ecash ---- */
.lp-why {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(32px, 5vw, 72px); margin-top: clamp(36px, 5vw, 60px);
}
.lp-rows, .lp-answers { margin: 0; padding: 0; list-style: none; border-top: 1.5px solid var(--ink); }
.lp-rows li { display: grid; gap: 4px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.lp-row-key { display: flex; align-items: center; gap: 10px; font-weight: 700; }
.lp-row-key .lp-ico { width: 16px; height: 16px; color: var(--bad); }
.lp-row-val { padding-left: 26px; color: var(--muted); }
.lp-answers { counter-reset: lp-a; }
.lp-answers li {
  position: relative; counter-increment: lp-a;
  padding: 18px 0 18px 54px; border-bottom: 1px solid var(--line); color: var(--muted);
}
.lp-answers li::before {
  content: counter(lp-a); position: absolute; left: 4px; top: 13px;
  color: var(--brand); font: italic 700 34px/1 var(--lp-serif);
}
.lp-answers strong { display: block; color: var(--ink); font-size: 1.12rem; }

.lp-batch {
  display: grid; gap: 24px; margin: clamp(36px, 5vw, 64px) 0 0;
  padding: clamp(24px, 4vw, 48px); border-radius: 28px; background: var(--lp-brand-soft);
}
.lp-batch-art { display: flex; align-items: center; justify-content: center; gap: clamp(16px, 3vw, 44px); }
.lp-batch-side { display: grid; justify-items: center; gap: 14px; }
.lp-nickels { display: grid; grid-template-columns: repeat(10, 1fr); gap: 7px; width: min(46vw, 440px); }
.lp-nickels i {
  aspect-ratio: 1; border-radius: 50%; background: var(--brand);
  box-shadow: inset 0 0 0 2px rgb(255 255 255 / 0.4);
}
.lp-batch-arrow { position: relative; flex: none; width: clamp(36px, 7vw, 96px); height: 2px; margin-bottom: 30px; background: var(--ink); }
.lp-batch-arrow::after {
  content: ""; position: absolute; right: 1px; top: 50%; width: 10px; height: 10px;
  border: solid var(--ink); border-width: 2px 2px 0 0; transform: translateY(-50%) rotate(45deg);
}
.lp-dollar {
  display: grid; place-items: center; width: clamp(92px, 12vw, 132px); aspect-ratio: 1; border-radius: 50%;
  background: var(--ink); color: var(--bg); font: italic 700 clamp(32px, 4.6vw, 50px)/1 var(--lp-serif);
  box-shadow: inset 0 0 0 3px var(--ink), inset 0 0 0 5px color-mix(in srgb, var(--bg) 40%, transparent);
}
.lp-batch-cap { font: 600 12.5px/1.2 var(--lp-mono); letter-spacing: 0.08em; text-transform: uppercase; }
.lp-batch figcaption { text-align: center; font-size: 1.14rem; font-weight: 650; text-wrap: balance; }

/* ---- how the money moves ---- */
.lp-flow-fig { margin: clamp(36px, 5vw, 60px) 0 0; }
.lp-flow {
  display: grid; align-items: center; margin: 0; padding: 0; list-style: none;
  grid-template-columns: minmax(0, 0.94fr) minmax(200px, 1fr) minmax(0, 1.5fr) minmax(200px, 1fr) minmax(0, 0.94fr);
}
.lp-node {
  display: grid; gap: 7px; padding: 20px;
  border: 1.5px solid var(--ink); border-radius: 18px; background: var(--surface);
}
.lp-node-pool { padding: 22px; box-shadow: 7px 7px 0 var(--brand); }
.lp-node-kicker {
  color: var(--lp-brand-deep); font: 600 11.5px/1.2 var(--lp-mono);
  letter-spacing: 0.12em; text-transform: uppercase;
}
.lp-node-title { margin: 0; font-size: 1.22rem; line-height: 1.15; letter-spacing: -0.015em; }
.lp-node-note { margin: 0; color: var(--muted); font-size: 0.9rem; line-height: 1.45; }

.lp-link { display: grid; gap: 12px; }
.lp-link-out { padding-left: 7px; }   /* clears the pool's offset shadow */
.lp-lane { display: grid; gap: 7px; }
.lp-lane-text {
  display: flex; align-items: flex-start; gap: 8px; margin-inline: 14px 16px;
  font-size: 0.875rem; font-weight: 700; line-height: 1.3;
}
.lp-nut {
  justify-self: start; margin-inline: 14px; padding: 5px 8px; border-radius: 6px;
  background: var(--ink); color: var(--bg); white-space: nowrap;
  font: 600 11.5px/1 var(--lp-mono); letter-spacing: 0.03em;
}
.lp-arrow { position: relative; display: block; height: 2px; margin-top: 3px; background: var(--ink); }
.lp-arrow::after {
  content: ""; position: absolute; right: 1px; top: 50%; width: 10px; height: 10px;
  border: solid var(--ink); border-width: 2px 2px 0 0; transform: translateY(-50%) rotate(45deg);
}
.lp-or { justify-self: center; color: var(--muted); font: italic 700 15px/1 var(--lp-serif); }
/* A lane under the centre line carries its arrow on top, so the two arrows of a
   link sit close together and both land on the boxes beside them. */
.lp-lane-under .lp-arrow { margin: 0 0 3px; }
.lp-lane-back { margin-top: 4px; }
/* Change comes back from the mint, not from the charity, so this arrow starts part-way. */
.lp-lane-back .lp-arrow { width: 62%; background: repeating-linear-gradient(90deg, var(--ink) 0 6px, transparent 6px 11px); }
.lp-lane-back .lp-arrow::after { left: 1px; right: auto; transform: translateY(-50%) rotate(-135deg); }
.lp-lane-back .lp-lane-text { font-weight: 500; color: var(--muted); }

.lp-ledger {
  margin: 6px 0; overflow: hidden; border: 1px solid var(--line); border-radius: 12px;
  background: var(--bg); font: 500 12px/1.55 var(--lp-mono);
}
.lp-ledger p { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0; padding: 9px 12px; }
.lp-ledger-head {
  border-bottom: 1px solid var(--line); color: var(--muted);
  font-size: 11.5px; letter-spacing: 0.09em; text-transform: uppercase;
}
.lp-ledger-head span { display: flex; align-items: center; gap: 8px; }
.lp-ledger ul { margin: 0; padding: 7px 12px; list-style: none; }
.lp-ledger li { display: flex; justify-content: space-between; gap: 12px; }
.lp-ledger li span { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.lp-ledger li b { color: var(--ok); }
.lp-ledger-foot { border-top: 1px solid var(--line); background: var(--lp-brand-soft); font-weight: 700; }

.lp-steps {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 28px clamp(20px, 3vw, 36px);
  margin: clamp(40px, 5vw, 64px) 0 0; padding: 0; list-style: none;
}
.lp-steps h3 { display: flex; align-items: center; gap: 10px; margin: 0 0 8px; font-size: 1.06rem; line-height: 1.25; }
.lp-steps p { margin: 0; color: var(--muted); font-size: 0.95rem; }

.lp-spec {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 3fr); gap: 8px 32px;
  margin-top: clamp(40px, 5vw, 64px); padding-top: 20px; border-top: 1.5px solid var(--ink);
}
.lp-spec .lp-label { margin: 0; padding-top: 4px; color: var(--ink); }
.lp-spec dl { margin: -12px 0 0; }
.lp-spec dl > div {
  display: grid; grid-template-columns: 190px minmax(0, 1fr); gap: 2px 20px;
  padding: 12px 0; border-bottom: 1px solid var(--line);
}
.lp-spec dt { color: var(--muted); font: 600 12px/1.9 var(--lp-mono); letter-spacing: 0.08em; text-transform: uppercase; }
.lp-spec dd { margin: 0; font-size: 0.97rem; }

/* ---- donors and charities ---- */
.lp-who { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(18px, 3vw, 32px); margin-top: clamp(36px, 5vw, 60px); }
.lp-side {
  display: flex; flex-direction: column; padding: clamp(22px, 3.4vw, 40px);
  border: 1px solid var(--line); border-radius: 26px; background: var(--surface); box-shadow: var(--shadow);
}
.lp-side-title { margin: 0 0 20px; font: 800 clamp(1.7rem, 3vw, 2.2rem)/1.05 var(--lp-sans); letter-spacing: -0.03em; }
.lp-terms { margin: 0; border-top: 1.5px solid var(--ink); }
.lp-terms > div {
  display: grid; grid-template-columns: 128px minmax(0, 1fr); gap: 2px 18px;
  padding: 14px 0; border-bottom: 1px solid var(--line);
}
.lp-terms dt { color: var(--lp-brand-deep); font: 600 12px/1.9 var(--lp-mono); letter-spacing: 0.07em; text-transform: uppercase; }
.lp-terms dd { margin: 0; }
.lp-side-note { margin: auto 0 0; padding-top: 22px; color: var(--muted); font-size: 0.95rem; }
.lp-side-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 24px; margin-top: auto; padding-top: 24px; }
.lp-aside {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2.4fr); gap: 8px 32px; align-items: baseline;
  margin-top: clamp(18px, 3vw, 32px); padding: clamp(20px, 3vw, 30px) clamp(22px, 3.4vw, 40px);
  border: 1.5px dashed var(--muted); border-radius: 22px;
}
.lp-aside h3 { margin: 0; font-size: 1.12rem; letter-spacing: -0.01em; }
.lp-aside p { margin: 0; color: var(--muted); }

/* ---- demo ---- */
.lp-section-flush { padding-top: 0; border-top: 0; }
.lp-demo {
  --lp-focus: #fff;
  position: relative; overflow: hidden;
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); align-items: center;
  gap: clamp(24px, 4vw, 56px); padding: clamp(28px, 5.4vw, 68px);
  border: 1px solid var(--lp-panel-line); border-radius: 32px;
  background: var(--lp-panel); color: var(--lp-panel-ink);
}
.lp-demo .lp-eyebrow { color: var(--lp-panel-brand); }
.lp-demo .lp-h2 em { color: var(--lp-panel-brand); }
.lp-demo-copy p:not(.lp-eyebrow) { margin: 18px 0 26px; max-width: 26em; color: var(--lp-panel-muted); font-size: 1.1rem; }
.lp-demo .lp-btn-primary { background: var(--lp-panel-brand); color: #1a0f0c; }
/* The media slot holds only a comment until a video is wired in. :empty ignores
   comments, so the slot stays hidden and the stamps after it are shown instead. */
.lp-demo-media { display: grid; place-items: center; gap: 14px; min-width: 0; }
.lp-demo-media:empty { display: none; }
.lp-demo-media:not(:empty) + .lp-demo-art { display: none; }
.lp-demo-media video, .lp-demo-media img {
  display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover;
  border-radius: 18px; background: #000;
}
/* <a class="lp-demo-poster" href="…"><img src="/img/….png" alt="…"></a> gets a play badge. */
.lp-demo-poster { position: relative; display: block; width: 100%; border-radius: 18px; }
.lp-demo-poster::after {
  content: ""; position: absolute; left: 50%; top: 50%; width: 76px; height: 76px; margin: -38px 0 0 -38px;
  border-radius: 50%; background: var(--lp-panel-brand) center / 30px no-repeat;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%231a0f0c' d='M8 5.5v13l11-6.5Z'/%3E%3C/svg%3E");
  box-shadow: 0 8px 30px rgb(0 0 0 / 0.45); transition: transform 0.15s ease;
}
.lp-demo-poster:hover::after { transform: scale(1.06); }
.lp-demo-art { position: relative; min-height: clamp(170px, 24vw, 280px); }
.lp-demo-art .lp-stamp { position: absolute; }
.lp-stamp-give { right: 0; top: 6%; font-size: clamp(34px, 5.6vw, 72px); transform: rotate(-12deg); }
.lp-stamp-pass { left: 0; bottom: 4%; font-size: clamp(24px, 3.8vw, 48px); transform: rotate(9deg); color: #ff6b5b; opacity: 0.55; }

/* ---- open source ---- */
.lp-source { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: center; gap: clamp(32px, 5vw, 72px); }
.lp-source-copy p:not(.lp-eyebrow) { margin: 18px 0 0; max-width: 33em; }
.lp-source-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 24px; margin-top: 28px; }
.lp-term {
  --lp-focus: #fff;
  overflow: hidden; border: 1px solid var(--lp-panel-line); border-radius: 18px;
  background: #1d1a16; color: #f3eee6; box-shadow: var(--shadow);
}
.lp-term-bar {
  display: flex; align-items: center; gap: 10px; margin: 0; padding: 13px 18px;
  border-bottom: 1px solid #3d372f; color: #bdb4a7;
  font: 600 12px/1.2 var(--lp-mono); letter-spacing: 0.1em; text-transform: uppercase;
}
.lp-term-bar span { width: 9px; height: 9px; border-radius: 50%; background: #f2735c; }
/* One span per line. Long lines wrap with a hanging indent instead of scrolling sideways. */
.lp-term pre { margin: 0; padding: 18px 20px 22px; font: 13px/1.75 var(--lp-mono); white-space: pre-wrap; overflow-wrap: anywhere; }
.lp-term code { display: grid; padding: 0; border-radius: 0; background: none; font: inherit; }
.lp-ln { display: block; padding-left: 2ch; text-indent: -2ch; }
.lp-ln:empty::before { content: "\200b"; }
.lp-c { color: #a39a8d; }
.lp-nb { white-space: nowrap; }
.lp main code { color: var(--ink); }
.lp .lp-term code { color: inherit; }

/* ---- status ---- */
.lp-status {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 3fr); gap: 8px 32px;
  padding: clamp(20px, 3vw, 30px) clamp(22px, 3.4vw, 40px);
  border: 1.5px solid var(--ink); border-radius: 22px;
}
.lp-status .lp-label { display: flex; align-items: center; align-self: start; gap: 10px; margin: 0; padding-top: 6px; color: var(--ink); }
.lp-status p { margin: 0; }
.lp-status p + p { margin-top: 8px; color: var(--muted); }

/* ---- footer ---- */
.lp-footer { padding: 0; border-top: 1px solid var(--line); font-size: 15px; }
.lp-footer-in {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 32px;
  padding-block: 30px 44px;
}
.lp-footer-brand { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; margin: 0; }
.lp-footer .logo { font-size: 19px; }
.lp-footer nav { display: flex; flex-wrap: wrap; gap: 6px 24px; }
.lp-footer nav a { margin-left: 0; color: var(--ink); font-size: 15px; font-weight: 600; text-decoration: underline; text-decoration-color: var(--line); text-decoration-thickness: 2px; text-underline-offset: 4px; }
.lp-footer nav a:hover { text-decoration-color: var(--brand); }

/* ---- dark theme adjustments ---- */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .lp-phone {
    box-shadow: inset 0 0 0 0.16em #6a6259, inset 0 0 0 0.36em #0b0907, 0 0 0 1px #3d372f, 0 2.4em 4em -2em rgb(0 0 0 / 0.8);
  }
  :root:not([data-theme="light"]) .lp-nickels i { box-shadow: inset 0 0 0 2px rgb(0 0 0 / 0.25); }
  :root:not([data-theme="light"]) .lp-term { background: #100e0b; }
}

/* ---- narrower screens ---- */
@media (max-width: 1040px) {
  .lp-phone { --pw: 290px; }
}
/* Below this the diagram runs top to bottom. */
@media (max-width: 1139px) {
  .lp-flow { grid-template-columns: minmax(0, 1fr); gap: 0; max-width: 560px; margin-inline: auto; }
  .lp-node-pool { box-shadow: 6px 6px 0 var(--brand); }
  .lp-link { grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: end; gap: 0 8px; padding-top: 14px; }
  .lp-link-out { grid-template-columns: repeat(2, minmax(0, 1fr)); padding-left: 0; }
  .lp-lane { justify-items: center; align-content: end; gap: 7px; text-align: center; }
  .lp-lane-text { margin-inline: 0; flex-direction: column; align-items: center; gap: 6px; }
  .lp-nut { justify-self: center; margin-inline: 0; }
  .lp-or { align-self: center; }
  .lp-arrow, .lp-lane-under .lp-arrow { order: 3; width: 2px; height: 34px; margin: 4px 0 0; }
  .lp-arrow::after { right: auto; left: 50%; top: auto; bottom: 1px; transform: translateX(-50%) rotate(135deg); }
  .lp-lane-text { order: 1; }
  .lp-nut { order: 2; }
  .lp-lane-back { margin-top: 0; }
  .lp-lane-back .lp-arrow { background: repeating-linear-gradient(0deg, var(--ink) 0 6px, transparent 6px 11px); }
  .lp-lane-back .lp-arrow::after { left: 50%; top: 1px; bottom: auto; transform: translateX(-50%) rotate(-45deg); }
  .lp-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .lp-hero { grid-template-columns: minmax(0, 1fr); gap: 56px; }
  .lp-coin { width: min(100%, 470px); }
  .lp-why, .lp-who, .lp-source, .lp-demo { grid-template-columns: minmax(0, 1fr); }
  .lp-spec, .lp-status, .lp-aside { grid-template-columns: minmax(0, 1fr); }
  .lp-spec dl { margin-top: 0; }
  .lp-demo-art { min-height: 150px; }
}
@media (max-width: 640px) {
  .lp-batch-art { flex-direction: column; }
  .lp-batch-side:first-child { width: 100%; }
  .lp-nickels { width: 100%; max-width: 360px; gap: 6px; }
  .lp-batch-arrow { width: 2px; height: 30px; margin: 0; }
  .lp-batch-arrow::after { right: auto; left: 50%; top: auto; bottom: 1px; transform: translateX(-50%) rotate(135deg); }
  .lp-spec dl > div, .lp-terms > div { grid-template-columns: minmax(0, 1fr); }
  .lp-spec dt, .lp-terms dt { line-height: 1.4; }
  .lp-steps { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 560px) {
  .lp-header { padding-block: 16px 6px; }
  .lp-nav { width: 100%; justify-content: space-between; margin-right: 0; }
  .lp-nav a { padding: 9px 0; font-size: 14px; }
  .lp-nav a:hover { background: none; text-decoration: underline; }
  .lp-phone { --pw: min(290px, 78vw); }
  .lp-cta { grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); }
  .lp-cta .lp-btn { padding-inline: 14px; white-space: nowrap; }
  .lp-cta .lp-btn-primary, .lp-cta .lp-btn:last-child { grid-column: 1 / -1; }
  .lp-btn { padding-block: 15px; }
  .lp-demo, .lp-batch { border-radius: 24px; }
  .lp-term pre { padding-inline: 16px; font-size: 12.5px; }
}
@media (max-width: 380px) {
  .lp-nav a { font-size: 13.5px; }
}
@media (max-width: 349px) {
  .lp-cta { grid-template-columns: minmax(0, 1fr); }
}
