/* sparechange: shell styles (tokens · page scale · page frame · atmosphere · rule classes · nav · footer · motion)
   Build width 1920. One root unit --u = viewport/1920 from 1280 up (1:1 with the mockup at 1920); below 1280 the phone layout.
   ROUTE FILES: use the tokens + classes below. Never write border/outline, max-width, side padding or a page background in a route. */

/* ---------- 1. tokens ---------- */
:root {
  --u: 1px;
  /* colours (DESIGN.md §3) */
  --paper: #FEF4E3;
  --wash: #FEEFD5;
  --card: #FFFFFF;
  --cream-fill: #FAF0E1;
  --ink: #211B12;
  --ink-2: #3A2F20;
  --muted: #716552;
  --hairline: #E8DCC5;
  --action: #399F1B;
  --action-deep: #1E8A0E;
  --action-hover: #2E8615;
  --link: #2B7A14;
  --honey: #FCD898;
  --honey-stroke: #F6AC51;
  --honey-dark: #C5810E;
  --amber: #E3A62F;
  --amber-deep: #C88719;
  --jar-khype: #399F1B;
  --jar-wspyx: #9BE05A;
  --jar-wnvdax: #1F5E10;
  --coin: #67FD3F;
  --error: #C0392B; --error-fill: #FDE4E1; --error-stroke: #E46A5E;
  --set: #2F7A12; --set-fill: #E4F5D6;
  --pending: #7A5410; --pending-fill: #FCE3A6;
  --off: #6E6860; --off-fill: #E6E2DC;
  --disabled-fill: #E0DDD8; --disabled-ink: #9B958C;

  /* fonts (DESIGN.md §2) */
  --f-display: "Fraunces", Georgia, "Times New Roman", serif;
  --f-body: "Mulish", "Segoe UI", Arial, sans-serif;
  --f-mono: "DM Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --f-word: "Fredoka", "Mulish", sans-serif;

  /* type scale @1920 (USER FIX caps: nav 14 · labels 12–13 · body 13–16 · section 28–36 · largest 50) */
  --fs-hero: calc(50 * var(--u));
  --fs-h1: calc(48 * var(--u));
  --fs-h2: calc(36 * var(--u));
  --fs-h3: calc(28 * var(--u));
  --fs-card: calc(24 * var(--u));
  --fs-key: calc(40 * var(--u));
  --fs-body: max(13px, calc(16 * var(--u)));
  --fs-small: max(12px, calc(14 * var(--u)));
  --fs-label: max(12px, calc(13 * var(--u)));
  --fs-num: max(13px, calc(16 * var(--u)));
  --fs-nav: max(12px, calc(14 * var(--u)));
  --fs-btn: max(13px, calc(16 * var(--u)));
  --fs-chip: max(12px, calc(14 * var(--u)));

  /* page frame (DESIGN.md §0 + USER FIX: gutters 49 / 44 @1920, container 1827) */
  --gut-l: calc(49 * var(--u));
  --gut-r: calc(44 * var(--u));
  --nav-top: calc(25 * var(--u));
  --nav-h: calc(64 * var(--u));
  --head-h: calc(110 * var(--u));          /* nav band: content of a route starts below this line */
  --screen: calc(1080 * var(--u));

  /* spacing */
  --s-1: calc(8 * var(--u));
  --s-2: calc(16 * var(--u));
  --s-3: calc(24 * var(--u));
  --s-4: calc(32 * var(--u));
  --s-5: calc(48 * var(--u));
  --s-6: calc(64 * var(--u));
  --s-7: calc(80 * var(--u));
  --gap-section: calc(72 * var(--u));     /* 48–96 between sections (rule #22) */

  /* radii + shadows (DESIGN.md §4) */
  --r-card: calc(20 * var(--u));
  --r-well: calc(12 * var(--u));
  --r-pill: 999px;
  --sh-card: 0 calc(12 * var(--u)) calc(36 * var(--u)) rgba(113, 83, 32, .10);
  --sh-nav: 0 calc(6 * var(--u)) calc(24 * var(--u)) rgba(113, 83, 32, .10);
  --sh-jar: 0 calc(18 * var(--u)) calc(40 * var(--u)) rgba(170, 120, 40, .14);

  /* rules (LUAT 56): one width + colour per rule kind, hairlines never below 1px */
  --rule-hair-w: max(1px, calc(1 * var(--u)));
  --rule-hair: var(--hairline);
  --rule-nav: #EBE0CC;
  --rule-row: #F1E6DA;
  --rule-input-w: max(1px, calc(1.5 * var(--u)));
  --rule-strong-w: max(2px, calc(2 * var(--u)));
  --rule-honey: var(--honey-stroke);
  --rule-warm: #EFDCC2;
  --rule-soft: #F6ECE1;
  --rule-btn: #147410;   /* mockup: 2px deep-green rim on every green action button */
  --rule-error: var(--error-stroke);

  /* motion (DESIGN.md §10) */
  --t-quick: 240ms;
  --t-mid: 420ms;
  --t-drop: 560ms;
  --t-count: 700ms;
  --ease-settle: cubic-bezier(.2, .8, .2, 1);
  --drop-from: calc(-14 * var(--u));
  --rt-dur: 240ms;
  --rt-nudge: 14px;

  /* native controls in the brand */
  --native-accent: var(--action);
  --native-scroll-thumb: #D9C7A6;
  --native-scroll-track: var(--paper);
  --pop-backdrop: rgba(33, 27, 18, .32);
  color-scheme: light;
}
@media (min-width: 1280px) {
  :root { --u: calc(100vw / 1920); }       /* app.js refines it to clientWidth/1920 (no scrollbar error) */
}
html[data-rt-dir=back] { --rt-nudge: -14px; }

/* ---------- 2. base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { overflow-x: clip; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: var(--f-body);
  font-size: var(--fs-body);
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
  /* PAGE ATMOSPHERE (DESIGN.md §3b), shared by every route, scrolls with the page */
  background-color: var(--paper);
  background-image:
    radial-gradient(calc(1100 * var(--u)) calc(800 * var(--u)) at 78% calc(360 * var(--u)), rgba(255, 251, 243, .70), rgba(255, 251, 243, 0) 70%),
    var(--atm-edge, linear-gradient(transparent, transparent)),
    linear-gradient(180deg, #FEF5E5 0%, #FEEFD5 85%, #FEF2DE 100%),
    linear-gradient(180deg, #FEF2DE 0%, #FEF0D9 50%, #FEF4E3 100%);
  background-repeat: no-repeat;
  background-size: 100% calc(1080 * var(--u)), 100% calc(1080 * var(--u)), 100% calc(1080 * var(--u)), 100% calc(1080 * var(--u));
  background-position: 0 0, 0 0, 0 0, 0 calc(1080 * var(--u));
}
body[data-route="home"], body[data-route="jar"] {
  --atm-edge: linear-gradient(270deg, rgba(253, 237, 211, .5) 0%, rgba(253, 237, 211, 0) 25%);
}
:where(button, input, select, textarea) { border: 0; background: none; font: inherit; color: inherit; margin: 0; }
:where(button) { cursor: pointer; }
:where(button:disabled, [aria-disabled="true"]) { cursor: default; }
:where(img, svg, video) { display: block; max-width: 100%; }
:where(h1, h2, h3, h4, p, ul, ol, figure, dl, dd) { margin: 0; }
:where(ul, ol) { padding: 0; list-style: none; }
:where(a) { color: inherit; }
::selection { background: var(--honey); color: var(--ink); }
:focus-visible { outline: 2px solid var(--honey-dark); outline-offset: 2px; border-radius: 6px; }
main p, main li { text-wrap: pretty; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--card); padding: 10px 16px; border-radius: var(--r-pill); }
.skip:focus { top: 12px; }
[hidden] { display: none !important; }

/* ---------- 3. page frame (one container for every route) ---------- */
.page {
  display: block;
  position: relative;
  padding-left: var(--gut-l);
  padding-right: var(--gut-r);
  min-height: calc(100vh - var(--head-h));
}
.page > * { min-width: 0; }
/* full-bleed helper for art the mockup runs edge to edge (both layouts) */
.bleed { margin-left: calc(-1 * var(--gut-l)); margin-right: calc(-1 * var(--gut-r)); }
/* section rhythm */
.sec + .sec { margin-top: var(--gap-section); }

/* ---------- 4. type + shared pieces (routes use these) ---------- */
.mono { font-family: var(--f-mono); }
.eyebrow { font: 500 var(--fs-label)/1.2 var(--f-mono); letter-spacing: .11em; text-transform: uppercase; color: var(--ink); }
.h-hero { font: 600 var(--fs-hero)/1.02 var(--f-display); letter-spacing: -.029em; color: var(--ink); font-optical-sizing: auto; }
.h1 { font: 600 var(--fs-h1)/1.05 var(--f-display); letter-spacing: -.02em; color: var(--ink); }
.h2 { font: 600 var(--fs-h2)/1.1 var(--f-display); letter-spacing: -.02em; color: var(--ink); }
.h3 { font: 600 var(--fs-h3)/1.12 var(--f-display); letter-spacing: -.015em; color: var(--ink); }
.h-card { font: 600 var(--fs-card)/1.15 var(--f-display); letter-spacing: -.01em; color: var(--ink); }
.lede { font: 400 var(--fs-body)/1.45 var(--f-body); color: var(--ink-2); }
.body { font: 400 var(--fs-body)/1.45 var(--f-body); color: var(--muted); }
.small { font: 500 var(--fs-small)/1.35 var(--f-body); color: var(--muted); }
.num { font: 400 var(--fs-num)/1.2 var(--f-mono); letter-spacing: -.014em; font-variant-numeric: tabular-nums; }
.key { font: 500 var(--fs-key)/1 var(--f-mono); font-variant-numeric: tabular-nums; }
.th { font: 500 var(--fs-label)/1.2 var(--f-mono); letter-spacing: .11em; text-transform: uppercase; color: var(--ink); }
.text-link { color: var(--ink); text-decoration: underline; text-decoration-thickness: max(1px, calc(1.5 * var(--u))); text-underline-offset: .35em; font-weight: 500; }
.text-link:hover { color: var(--link); }

.card { background: var(--card); border-radius: var(--r-card); box-shadow: var(--sh-card); }
.well { background: var(--cream-fill); border-radius: var(--r-well); }

.btn-action {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  min-height: calc(48 * var(--u));
  padding: 0 calc(24 * var(--u));
  border-radius: var(--r-pill);
  background: var(--action);
  color: #FFFFFF;
  font: 700 var(--fs-btn)/1 var(--f-body);
  text-decoration: none; white-space: nowrap;
  box-shadow: inset 0 0 0 max(2px, calc(2 * var(--u))) var(--rule-btn);
  transition: transform var(--t-quick) var(--ease-spring), background-color var(--t-quick) var(--ease-settle);
}
.btn-action:hover { background: var(--action-hover); }
.btn-action:active { transform: translateY(max(1px, calc(2 * var(--u)))); }
.btn-action:disabled, .btn-action[aria-disabled="true"] { background: var(--disabled-fill); color: var(--disabled-ink); transform: none; box-shadow: none; }
.btn-action[data-launch-done] { background: var(--action); color: #FFFFFF; cursor: pointer; }
.btn-lg { min-height: calc(80 * var(--u)); padding: 0 calc(46 * var(--u)); font-size: max(15px, calc(24 * var(--u))); font-weight: 600; }
.btn-ghost {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  min-height: calc(44 * var(--u)); padding: 0 calc(20 * var(--u));
  border-radius: var(--r-pill); background: var(--card);
  font: 600 var(--fs-chip)/1 var(--f-body); color: var(--ink);
  transition: background-color var(--t-quick) var(--ease-settle);
}
.btn-ghost:hover { background: color-mix(in oklab, var(--honey) 40%, var(--card)); }

/* chip / segmented control: default = white + hairline; selected = honey fill, no line */
.chip {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: calc(46 * var(--u)); padding: 0 calc(18 * var(--u));
  border-radius: var(--r-pill); background: var(--card);
  font: 500 var(--fs-chip)/1 var(--f-body); color: var(--ink); white-space: nowrap;
  transition: background-color var(--t-quick) var(--ease-settle), transform var(--t-mid) var(--ease-spring);
}
.chip.mono { font-family: var(--f-mono); }
.chip:hover { background: color-mix(in oklab, var(--honey) 40%, var(--card)); }
.chip[aria-pressed="true"], .chip.is-on, .chip[aria-selected="true"] { background: var(--honey); font-weight: 600; }
.tag { display: inline-flex; align-items: center; padding: calc(6 * var(--u)) calc(16 * var(--u)); border-radius: var(--r-pill); background: color-mix(in oklab, var(--honey) 55%, var(--card)); font: 700 var(--fs-chip)/1.1 var(--f-body); }

.pill-status { display: inline-flex; align-items: center; padding: calc(5 * var(--u)) calc(12 * var(--u)); border-radius: var(--r-pill); font: 600 var(--fs-label)/1.1 var(--f-body); white-space: nowrap; }
.pill-status.is-set { background: var(--set-fill); color: var(--set); }
.pill-status.is-pending { background: var(--pending-fill); color: var(--pending); }
.pill-status.is-off { background: var(--off-fill); color: var(--off); }

.input {
  width: 100%; min-height: calc(60 * var(--u)); padding: 0 calc(18 * var(--u));
  border-radius: var(--r-well); background: var(--cream-fill);
  font: 500 max(14px, calc(20 * var(--u)))/1 var(--f-mono); color: var(--ink);
}
.input::placeholder { color: var(--muted); opacity: .8; }

/* table helpers (scroll sideways inside their card on phones) */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table { width: 100%; border-collapse: collapse; font: 400 var(--fs-small)/1.3 var(--f-mono); }
.table th { text-align: left; font: 500 var(--fs-label)/1.2 var(--f-mono); letter-spacing: .11em; text-transform: uppercase; padding: calc(14 * var(--u)) calc(20 * var(--u)); }
.table td { padding: calc(14 * var(--u)) calc(20 * var(--u)); }
.table thead th { background: color-mix(in oklab, var(--cream-fill) 70%, var(--card)); }
.table thead th:first-child { border-top-left-radius: calc(10 * var(--u)); border-bottom-left-radius: calc(10 * var(--u)); }
.table thead th:last-child { border-top-right-radius: calc(10 * var(--u)); border-bottom-right-radius: calc(10 * var(--u)); }

/* ---------- 5. RULE CLASSES (DESIGN.md §4b / BORDER_TABLE.md). The only place borders exist. ---------- */
.rule-nav { border: var(--rule-hair-w) solid var(--rule-nav); border-radius: var(--r-pill); }
.rule-page { border-bottom: var(--rule-hair-w) solid var(--rule-hair); }
.rule-page-top { border-top: var(--rule-hair-w) solid var(--rule-hair); }
.rule-page-strong { border-bottom: var(--rule-strong-w) solid var(--rule-hair); }
.rule-card { border: var(--rule-hair-w) solid var(--rule-hair); border-radius: var(--r-card); }
.rule-row { border-bottom: var(--rule-hair-w) solid var(--rule-row); }
.rule-row-top { border-top: var(--rule-hair-w) solid var(--rule-row); }
.rule-row-top-strong { border-top: var(--rule-strong-w) solid var(--rule-warm); }   /* home swap card: 2px warm divider above the result */
.rule-rows > * + * { border-top: var(--rule-hair-w) solid var(--rule-row); }   /* list/table rows: one line between, none doubled */
.rule-rows > details[open] + * { border-top-color: transparent; }   /* an open step already closes with its inner panel edge */
.rule-chip { border: var(--rule-hair-w) solid var(--rule-hair); border-radius: var(--r-pill); }
.rule-chip[aria-pressed="true"], .rule-chip.is-on, .rule-chip[aria-selected="true"] { border-color: transparent; }
.rule-input { border: var(--rule-input-w) solid var(--rule-hair); border-radius: var(--r-well); }
.rule-input:focus-within, .rule-input:focus { border-color: var(--rule-honey); outline: none; box-shadow: 0 0 0 max(2px, calc(2 * var(--u))) color-mix(in oklab, var(--honey) 70%, transparent); }
.rule-input.is-error, .rule-input[aria-invalid="true"] { border-color: var(--rule-error); background: var(--error-fill); }
.rule-drop-open { border: var(--rule-strong-w) solid var(--rule-honey); border-radius: calc(14 * var(--u)); }
.rule-drop-selected { border: var(--rule-strong-w) solid var(--rule-honey); border-radius: var(--r-well); }
.rule-phase2 { border: var(--rule-strong-w) solid var(--rule-warm); border-radius: var(--r-card); }
.rule-step-inner { border: var(--rule-strong-w) solid var(--rule-soft); border-radius: calc(14 * var(--u)); }
.rule-strip { border: var(--rule-hair-w) solid var(--rule-hair); border-radius: var(--r-pill); }
.rule-cells > * + * { border-left: var(--rule-hair-w) solid var(--rule-hair); }  /* vertical dividers inside a strip */
.rule-none { border: 0; }
/* the frame of an input wraps the whole control: give the frame to the wrapper, the input inside has none */
.rule-input > input, .rule-input > select, .rule-input > textarea { border: 0; outline: none; background: transparent; }

/* ---------- 6. NAV (N3 floating pill: mockup 00_home nav, 1821 x 64 @1920, top 25) ---------- */
.site-nav {
  position: sticky; top: 0; z-index: 50;
  padding: var(--nav-top) var(--gut-r) 0 var(--gut-l);
  height: var(--head-h);
  pointer-events: none;
}
.site-nav > * { pointer-events: auto; }
.nav {
  position: relative;
  display: grid; grid-template-columns: calc(663 * var(--u)) auto 1fr; align-items: center;   /* links start at x 735 @1920 like the mockup */
  height: var(--nav-h);
  padding: 0 calc(18 * var(--u)) 0 calc(22 * var(--u));
  background: var(--card);
  box-shadow: var(--sh-nav);
  font: 600 var(--fs-nav)/1 var(--f-body);
}
.brand { display: inline-flex; align-items: center; gap: calc(10 * var(--u)); color: var(--ink); text-decoration: none; height: 100%; position: relative; justify-self: start; }
.brand-mark { height: max(40px, calc(42 * var(--u))); width: auto; }
.brand-word { font: 600 max(17px, calc(24 * var(--u)))/1 var(--f-word); letter-spacing: -.01em; color: var(--ink); }
.routes { display: flex; justify-content: center; align-items: center; gap: calc(39 * var(--u)); height: 100%; }
.routes a, .social-link { color: var(--ink); text-decoration: none; position: relative; white-space: nowrap; }
.routes a { display: inline-flex; align-items: center; height: 100%; }
.routes a::after, .nav > .brand::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0;
  height: max(2px, calc(2 * var(--u))); background: var(--honey-dark); border-radius: 2px;
  transform: scaleX(0); transform-origin: 50% 50%;
  transition: transform var(--t-mid) var(--ease-spring);
}
.routes a.is-active::after, .nav > .brand.is-active::after { transform: scaleX(1); }
.routes a:hover { color: var(--link); }
.social { display: flex; justify-content: flex-end; align-items: center; gap: calc(28 * var(--u)); justify-self: end; }
.social-link.soon { color: var(--muted); cursor: default; }
.social-link[data-launch-done] { color: var(--ink); cursor: pointer; }
.social-link[data-launch-done]:hover { color: var(--link); }
.wallet-btn { min-height: calc(42 * var(--u)); padding: 0 calc(22 * var(--u)); font-size: max(13px, calc(15 * var(--u))); background: var(--action-deep); }
.wallet-btn:hover { background: var(--action-hover); }
.wallet-btn.is-connected { background: var(--card); color: var(--ink); box-shadow: inset 0 0 0 max(1px, calc(1 * var(--u))) var(--hairline); }
.wallet-chip { display: inline-flex; gap: calc(10 * var(--u)); align-items: center; font-size: var(--fs-label); color: var(--muted); }
.wallet-bal { color: var(--ink); }
.menu-btn { display: none; }
.drawer { display: none; }

/* ---------- 7. FOOTER (mockup F0 = no drawn footer; the shell adds a slim CA line on the same ground) ---------- */
.site-foot { margin: var(--gap-section) var(--gut-r) 0 var(--gut-l); }
.foot {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: calc(32 * var(--u));
  padding: calc(28 * var(--u)) 0 calc(40 * var(--u));
  font: 500 var(--fs-small)/1.3 var(--f-body);
}
.foot-brand .brand-mark { height: max(36px, calc(40 * var(--u))); }
.foot-ca { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: calc(16 * var(--u)); }
.foot-label { font-size: var(--fs-label); letter-spacing: .04em; color: var(--muted); }
.ca-cell { display: inline-flex; align-items: center; gap: calc(10 * var(--u)); padding: calc(6 * var(--u)) calc(8 * var(--u)) calc(6 * var(--u)) calc(16 * var(--u)); background: var(--card); font-size: var(--fs-small); white-space: nowrap; }
.ca-val { min-width: 13ch; }
.ca-copy { padding: calc(6 * var(--u)) calc(14 * var(--u)); border-radius: var(--r-pill); background: var(--cream-fill); font: 600 var(--fs-label)/1 var(--f-body); }
.ca-copy:disabled { color: var(--disabled-ink); }
.ca-copy[data-launch-done] { color: var(--ink); }
.btn-buy { min-height: calc(42 * var(--u)); font-size: max(13px, calc(15 * var(--u))); }
.foot-social { display: flex; gap: calc(24 * var(--u)); font-weight: 600; }

/* ---------- 8. dialogs + toast ---------- */
.wallet-modal, .soon-modal {
  width: min(92vw, max(340px, calc(440 * var(--u))));
  padding: calc(28 * var(--u)) calc(28 * var(--u)) calc(24 * var(--u));
  background: var(--card); color: var(--ink);
  box-shadow: var(--sh-card);
  font-size: var(--fs-body);
}
.wallet-modal { min-width: 300px; }
.wm-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.wm-title { font: 600 max(20px, calc(26 * var(--u)))/1.1 var(--f-display); }
.wm-close { width: 40px; height: 40px; border-radius: var(--r-pill); font-size: 24px; line-height: 1; }
.wm-close:hover { background: var(--cream-fill); }
.wm-note { margin-top: 10px; color: var(--muted); font-size: var(--fs-small); }
.wm-list { display: grid; gap: 8px; margin-top: 18px; }
.wm-item { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 14px; border-radius: var(--r-well); background: var(--cream-fill); font-weight: 600; text-align: left; text-decoration: none; color: var(--ink); }
.wm-item:hover { background: color-mix(in oklab, var(--honey) 50%, var(--cream-fill)); }
.wm-item img { width: 28px; height: 28px; border-radius: 6px; }
.wm-item .wm-hint { margin-left: auto; font-weight: 500; font-size: var(--fs-label); color: var(--muted); }
.wm-connected { margin-top: 18px; display: grid; gap: 10px; }
.wm-addr { word-break: break-all; font-size: var(--fs-small); }
.wm-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.soon-modal .btn-action { margin-top: 18px; }
.toast {
  position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); z-index: 90;
  padding: 12px 20px; border-radius: var(--r-pill); background: var(--ink); color: var(--paper);
  font: 600 var(--fs-small)/1 var(--f-body); box-shadow: var(--sh-card);
}

/* ---------- 9. MOTION (DESIGN.md §10: "a coin drops, the jar settles") ---------- */
/* reveal = coin drop: a block falls a few px into place and lands with a small bounce (IntersectionObserver + 2 s timer in app.js) */
html.js [data-drop]:not(.is-in) { opacity: 0; transform: translateY(var(--drop-from)); }
html.js [data-drop].is-in {
  opacity: 1; transform: none;
  transition: opacity calc(var(--t-drop) * .6) var(--ease-settle), transform var(--t-drop) var(--ease-bounce);
  transition-delay: calc(var(--sdk, 0) * 60ms);
}
/* grow-in = settle: jar layers / bars fill from the bottom */
html.js [data-fill]:not(.is-in) { transform: scaleY(0); }
[data-fill] { transform-origin: 50% 100%; }
html.js [data-fill].is-in { transform: scaleY(1); transition: transform 600ms var(--ease-spring); transition-delay: calc(var(--sdk, 0) * 40ms); }
/* live tick / count-up end = clink: the number dips 1 step and a honey underline flashes under it */
.is-clink { animation: sc-clink 420ms var(--ease-bounce); }
@keyframes sc-clink { 0% { transform: translateY(0); } 35% { transform: translateY(max(1px, calc(2 * var(--u)))); } 100% { transform: translateY(0); } }
.is-tick { animation: sc-tick 900ms var(--ease-settle); border-radius: 4px; }
@keyframes sc-tick { 0% { background-color: color-mix(in oklab, var(--honey) 80%, transparent); } 100% { background-color: transparent; } }
/* falling coin used by routes for the loop: <span class="coin-fall" style="--sdk:0"></span> */
.coin-fall { position: absolute; width: calc(22 * var(--u)); height: calc(22 * var(--u)); border-radius: 50%; background: radial-gradient(circle at 35% 35%, #FFE7A6, var(--amber) 55%, var(--amber-deep)); pointer-events: none; animation: sc-fall 900ms var(--ease-in-soft) both; }
@keyframes sc-fall { from { transform: translateY(calc(-60 * var(--u))) scale(.9); opacity: 0; } 15% { opacity: 1; } to { transform: translateY(var(--fall, calc(160 * var(--u)))) scale(1); opacity: 0; } }
/* scroll-driven decoration only (never text/numbers): art may add .sd-parallax / .sd-tilt from vendor/native.css */
@media (prefers-reduced-motion: reduce) {
  html.js [data-drop]:not(.is-in), html.js [data-fill]:not(.is-in) { opacity: 1; transform: none; }
  *, *::before, *::after { animation-duration: 1ms !important; animation-iteration-count: 1 !important; transition-duration: 1ms !important; }
  .coin-fall { display: none; }
}

/* ---------- 10. PHONE LAYOUT 360–1279 (LUAT 71): one column, content capped at 720 px, centred; ground fills the screen ---------- */
@media (max-width: 1279.98px) {
  :root {
    --u: .62px;
    --fs-hero: clamp(34px, 8.4vw, 46px);
    --fs-h1: clamp(30px, 7.2vw, 42px);
    --fs-h2: clamp(25px, 6vw, 32px);
    --fs-h3: clamp(21px, 5vw, 26px);
    --fs-card: 21px;
    --fs-key: clamp(28px, 7vw, 36px);
    --fs-body: 15px;
    --fs-small: 14px;
    --fs-label: 12px;
    --fs-num: 15px;
    --fs-nav: 15px;
    --fs-btn: 16px;
    --fs-chip: 14px;
    --gut-l: max(16px, calc((100vw - 720px) / 2));
    --gut-r: max(16px, calc((100vw - 720px) / 2));
    --nav-top: 12px;
    --nav-h: 60px;
    --head-h: 84px;
    --gap-section: 56px;
    --r-card: 18px;
    --r-well: 12px;
  }
  .site-nav { padding-left: 12px; padding-right: 12px; }
  .nav { grid-template-columns: 1fr auto auto; gap: 10px; padding: 0 8px 0 14px; max-width: 760px; margin: 0 auto; }
  .routes, .social > .social-link, .wallet-chip { display: none; }
  .brand-mark { height: 40px; }
  .brand-word { font-size: 19px; }
  .wallet-btn { min-height: 42px; padding: 0 16px; font-size: 14px; }
  .menu-btn { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: var(--r-pill); background: var(--cream-fill); }
  .menu-lines, .menu-lines::before, .menu-lines::after { display: block; width: 18px; height: 2px; border-radius: 2px; background: var(--ink); position: relative; transition: transform var(--t-quick) var(--ease-settle); }
  .menu-lines::before, .menu-lines::after { content: ""; position: absolute; left: 0; }
  .menu-lines::before { top: -6px; } .menu-lines::after { top: 6px; }
  .menu-btn[aria-expanded="true"] .menu-lines { background: transparent; }
  .menu-btn[aria-expanded="true"] .menu-lines::before { transform: translateY(6px) rotate(45deg); }
  .menu-btn[aria-expanded="true"] .menu-lines::after { transform: translateY(-6px) rotate(-45deg); }
  .drawer { display: block; max-width: 760px; margin: 8px auto 0; padding: 10px 14px 16px; background: var(--card); box-shadow: var(--sh-card); }
  .drawer[hidden] { display: none !important; }
  .drawer-routes { display: grid; }
  .drawer-routes a { display: flex; align-items: center; min-height: 48px; padding: 0 6px; font: 600 17px/1.2 var(--f-body); color: var(--ink); text-decoration: none; }
  .drawer-routes a + a { border-top: var(--rule-hair-w) solid var(--rule-row); }
  .drawer-routes a.is-active { color: var(--action-deep); }
  .drawer-social { display: flex; gap: 24px; padding: 12px 6px 0; font-weight: 600; }
  .drawer-social .social-link { min-height: 40px; display: inline-flex; align-items: center; }
  .site-foot { margin-left: var(--gut-l); margin-right: var(--gut-r); }
  .foot { grid-template-columns: 1fr; justify-items: start; gap: 16px; padding: 22px 0 32px; }
  .foot-ca { justify-content: flex-start; }
  .ca-cell { padding: 6px 6px 6px 14px; }
  .btn-buy { min-height: 44px; }
  .btn-action { min-height: 46px; padding: 0 20px; }
  .btn-lg { min-height: 54px; padding: 0 26px; font-size: 17px; }
  .chip { min-height: 40px; padding: 0 14px; }
  .input { min-height: 50px; font-size: 17px; }
  .table th, .table td { padding: 11px 12px; white-space: nowrap; }
}
@media (max-width: 519.98px) {
  .nav > .social { display: none; }
  .nav { grid-template-columns: 1fr auto; }
}
@media (min-width: 520px) { .drawer-wallet { display: none; } }
.drawer-wallet { margin-top: 12px; width: 100%; }
