/* HEDGEROW shell — app.css (JOB shell, 29/11/2026). Tokens = DESIGN.md §0/§3/§4; borders = DESIGN.md §4b / BORDER_TABLE.md.
   SCALE (LUAT 50): one root unit --u = 100vw/1920. At 1920 every size equals the mockup ×1.148 (1672 → 1920); 1280–2560 scale
   in proportion; below 1024 a mobile layout with --u = 1px. Route bodies use calc(N * var(--u)) for every size and NEVER set
   border/outline, max-width, side padding or a page background — the classes below do that. */

/* ---------- 1. tokens ---------- */
:root {
  --u: calc(100vw / 1920);
  /* colours (DESIGN.md §3) */
  --paper: #9BAE73;
  --atm-sun: #FBE5C5;
  --atm-sun-2: #F6D7A7;
  --surface: #FFF5E5;
  --surface-2: #FEF0DD;
  --surface-container: #2B2440;
  --board-top: #3A2246;
  --primary-a: #F87765;
  --primary-b: #5702AE;
  --secondary: #E8476B;
  --hedge: #687544;
  --outline-green: #5E9A70;
  --outline-purple: #7F647A;
  --branch: #825331;
  --ink: #2B2440;
  --on-board: #F4EEF8;
  --tg-plate: #5B4F7A;
  --grad-primary: linear-gradient(90deg, #F87765, #5702AE);
  /* fonts (DESIGN.md §2) */
  --f-display: "Belanosima", "Outfit", system-ui, sans-serif;
  --f-ui: "Kiwi Maru", Georgia, serif;
  --f-label: "Antic Slab", Georgia, serif;
  --f-num: "Source Serif 4", Georgia, serif;
  /* type scale @1920 (DESIGN.md §2 + §9 #1) — body never below 12px */
  --t-hero: calc(68 * var(--u));
  --t-h2: calc(40 * var(--u));
  --t-h3: calc(28 * var(--u));
  --t-big: calc(72 * var(--u));
  --t-lead: max(14px, calc(20 * var(--u)));
  --t-label: max(12px, calc(18 * var(--u)));
  --t-body: max(12px, calc(16 * var(--u)));
  --t-ui: max(12px, calc(15 * var(--u)));
  --t-small: max(12px, calc(14 * var(--u)));
  --t-tiny: max(12px, calc(13 * var(--u)));
  /* page frame (frame.json: gutters 54 / 52 @1920, no sidebar) */
  --gutter-l: calc(54 * var(--u));
  --gutter-r: calc(52 * var(--u));
  --gap-section: calc(64 * var(--u));
  --gap-block: calc(32 * var(--u));
  --nav-h: calc(80 * var(--u));
  /* materials (DESIGN.md §4) */
  --r-card: calc(28 * var(--u));
  --r-board: calc(36 * var(--u));
  --r-input: calc(12 * var(--u));
  --r-tag: calc(14 * var(--u));
  --r-pill: 999px;
  --shadow-card: 0 calc(6 * var(--u)) calc(18 * var(--u)) rgba(80, 50, 20, .18);
  --shadow-rim: 0 calc(12 * var(--u)) calc(24 * var(--u)) rgba(58, 60, 24, .32);
  --highlight: inset 0 max(1px, calc(2 * var(--u))) 0 #FFFBEE;
  /* ---- rule tokens: width + colour per rule kind (BORDER_TABLE.md, DESIGN.md §4b). Hairlines never vanish: max(1px, …) ---- */
  --rule-nav-tab-w: max(1px, calc(1.1 * var(--u)));  --rule-nav-tab-c: #F76A58;
  --rule-input-w: max(1px, calc(2.3 * var(--u)));    --rule-input-c: #C5B0AA;
  --rule-chip-w: max(1px, calc(2.2 * var(--u)));     --rule-chip-c: #BFB392;
  --rule-seg-w: max(1px, calc(2.3 * var(--u)));      --rule-seg-c: #C4AFAE;
  --rule-board-w: max(1px, calc(2.3 * var(--u)));    --rule-board-c: #8A7488;  --rule-board-c-hi: #C6B7C2;
  --rule-token-w: max(1px, calc(2.3 * var(--u)));    --rule-token-c: #7F647A;
  --rule-ticket-w: max(1px, calc(1.5 * var(--u)));   --rule-ticket-c: #85707A;
  --rule-ready-w: max(1px, calc(2.3 * var(--u)));    --rule-ready-c: #97944C;
  --rule-sign-w: max(1px, calc(1.1 * var(--u)));     --rule-sign-c: #E9CDB1;
  --rule-min-w: max(1px, calc(2.3 * var(--u)));      --rule-min-c: #B19F99;
  --rule-qhead-w: max(1px, calc(2.3 * var(--u)));    --rule-qhead-c: #AA9698;
  --rule-row-w: max(1px, calc(1.5 * var(--u)));      --rule-row-c: #A08A94;
  --rule-detail-w: max(1px, calc(2.2 * var(--u)));   --rule-detail-c: #A88B95;
  --rule-soft-w: max(1px, calc(1.1 * var(--u)));     --rule-soft-c: #DECAB3;
  --rule-lexp-w: max(1px, calc(2.1 * var(--u)));     --rule-lexp-c: #886C86;
  --rule-ltab-w: max(1px, calc(1.5 * var(--u)));     --rule-ltab-c: #D0C2A0;
  --rule-paper-w: max(1px, calc(2 * var(--u)));      --rule-paper-c: #F1C7A0;
  --rule-read-w: max(1px, calc(3 * var(--u)));       --rule-read-c: #FFFFF1;
  --rule-violet-w: max(1px, calc(1.7 * var(--u)));   --rule-violet-c: #8B7199;
  --rule-scen-w: max(1px, calc(2.3 * var(--u)));     --rule-scen-c: #DEC3AE;
  --rule-formula-w: max(1px, calc(2 * var(--u)));    --rule-formula-c: #B295AE;
  --rule-locked-w: max(1px, calc(1.5 * var(--u)));   --rule-locked-c: #C4AEB7;
  --rule-branch-w: max(1px, calc(1.1 * var(--u)));   --rule-branch-c: #825331;
  --rule-footer-w: max(1px, calc(1.1 * var(--u)));   --rule-footer-c: #CCBAA3;
  --rule-bound-w: max(1px, calc(1.1 * var(--u)));    --rule-bound-c: #82787D;
  /* motion (DESIGN.md §10) */
  --ease-garden: cubic-bezier(.22, .9, .24, 1);
  --dur-quick: 220ms; --dur-base: 320ms; --dur-grow: 600ms; --dur-count: 900ms;
  --rt-nudge: 16px; --rt-dur: 240ms;
  /* native controls */
  --native-accent: #F87765; --native-scroll-thumb: #687544; --native-scroll-track: #FEF0DD;
}
@media (max-width: 1023.98px) { :root { --u: 1px; --gutter-l: 16px; --gutter-r: 16px; --gap-section: 40px; --nav-h: 60px; --t-hero: 40px; --t-h2: 28px; --t-big: 48px; } }

/* ---------- 2. reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
:where(button, input, select, textarea) { border: 0; font: inherit; color: inherit; }
:where(button) { background: none; cursor: pointer; padding: 0; }
:where(h1, h2, h3, h4, p, ul, ol, dl, dd, figure) { margin: 0; }
:where(ul, ol) { padding: 0; list-style: none; }
img, svg, video { display: block; max-width: 100%; }
a { color: inherit; }
:focus-visible { outline: max(2px, calc(2.3 * var(--u))) solid var(--primary-b); outline-offset: 2px; }
::selection { background: #F8776555; color: var(--ink); }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: var(--nav-h); }
body {
  margin: 0; min-height: 100vh; overflow-x: hidden; color: var(--ink);
  font: 400 var(--t-body)/1.45 var(--f-ui);
  font-variant-numeric: tabular-nums;
  display: flex; flex-direction: column;
  position: relative; isolation: isolate;
}
main p, main li { text-wrap: pretty; }

/* ---------- 3. page atmosphere (DESIGN.md §3b — one ground for every route; routes never set a page background) ---------- */
body {
  background-color: var(--paper);
  background-image:
    /* atm-sun: sunlit limestone path wash, strongest top-left, fading into the lawn */
    radial-gradient(ellipse calc(1100 * var(--u)) calc(760 * var(--u)) at 12% calc(180 * var(--u)), #FBE5C5 0%, rgba(246, 215, 167, .82) 46%, rgba(246, 215, 167, 0) 100%),
    linear-gradient(180deg, rgba(251, 229, 197, .92) 0, rgba(246, 215, 167, .62) calc(520 * var(--u)), rgba(246, 215, 167, 0) calc(1030 * var(--u))),
    /* atm-lawn: lower half of every route */
    linear-gradient(180deg, rgba(173, 179, 112, 0) calc(1080 * var(--u)), rgba(173, 179, 112, .4) calc(1400 * var(--u)), rgba(159, 158, 101, .4) 70%, rgba(104, 117, 68, .4) 100%);
  background-repeat: no-repeat;
}
/* atm-leafshadow (dappled shade from the top-right) + atm-grain — decoration only, behind all content */
body::before, body::after { content: ""; position: absolute; left: 0; right: 0; pointer-events: none; z-index: -1; }
body::before {
  /* inset 10%/25% (route-hedge fix 29/11): the rotated + scaled shade box at left/right 0 widened the page to 2176 px at 1920 */
  left: 10%; right: 25%;
  top: 0; height: calc(1100 * var(--u));
  background:
    radial-gradient(ellipse calc(260 * var(--u)) calc(90 * var(--u)) at 78% 22%, rgba(58, 34, 70, .06), transparent 70%),
    radial-gradient(ellipse calc(340 * var(--u)) calc(110 * var(--u)) at 62% 46%, rgba(58, 34, 70, .06), transparent 70%),
    radial-gradient(ellipse calc(200 * var(--u)) calc(70 * var(--u)) at 90% 58%, rgba(58, 34, 70, .1), transparent 70%),
    radial-gradient(ellipse calc(300 * var(--u)) calc(100 * var(--u)) at 38% 8%, rgba(58, 34, 70, .06), transparent 70%),
    radial-gradient(ellipse calc(240 * var(--u)) calc(80 * var(--u)) at 24% 72%, rgba(58, 34, 70, .06), transparent 70%);
  transform: rotate(-8deg) scale(1.15); transform-origin: 70% 0;
}
body::after {
  top: 0; bottom: 0; opacity: .3; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .3 0 0 0 0 .28 0 0 0 0 .2 0 0 0 .12 0'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- 4. ONE page frame ---------- */
.page { flex: 1 0 auto; width: 100%; padding: 0 var(--gutter-r) 0 var(--gutter-l); display: flow-root; position: relative; z-index: 1; }
/* full-bleed band (art plates, path band) — cancels the gutters exactly; nothing else may run edge-to-edge */
.bleed { margin-left: calc(-1 * var(--gutter-l)); margin-right: calc(-1 * var(--gutter-r)); }
.section + .section { margin-top: var(--gap-section); }
.art { display: block; width: 100%; height: auto; pointer-events: none; user-select: none; }

/* shared type */
.h1 { font: 600 var(--t-hero)/1 var(--f-display); letter-spacing: -.02em; color: var(--ink); }
.h2 { font: 600 var(--t-h2)/1.1 var(--f-display); letter-spacing: -.01em; }
.h3 { font: 600 var(--t-h3)/1.15 var(--f-display); }
.lead { font: 400 var(--t-lead)/1.3 var(--f-num); }
.label { font: 400 var(--t-label)/1.2 var(--f-label); }
.big { font: 400 var(--t-big)/1 var(--f-num); letter-spacing: -.02em; font-variant-numeric: lining-nums tabular-nums; }
.caption { font: italic 400 var(--t-small)/1.4 var(--f-num); }
.note-indep { font: italic 400 var(--t-small)/1.4 var(--f-ui); }
.num { font-family: var(--f-num); font-variant-numeric: tabular-nums lining-nums; }

/* shared surfaces (look only; frames come from .rule-*) */
.paper-card { background: var(--surface); border-radius: var(--r-card); box-shadow: var(--shadow-card), var(--highlight); }
.board { background: linear-gradient(180deg, var(--board-top), var(--surface-container)); color: var(--on-board); border-radius: var(--r-board); box-shadow: var(--shadow-rim), inset 0 0 calc(60 * var(--u)) rgba(0, 0, 0, .22); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: calc(8 * var(--u)); min-height: max(36px, calc(44 * var(--u))); padding: 0 calc(24 * var(--u)); border-radius: var(--r-pill); font: 400 var(--t-ui)/1 var(--f-ui); text-decoration: none; transition: transform var(--dur-quick) var(--ease-spring), filter var(--dur-quick); }
.btn-coral { background: var(--primary-a); color: #fff; }
.btn-grad { background: var(--grad-primary); color: #fff; }
.btn-ghost { background: transparent; }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; filter: saturate(.4); }
.btn:not(:disabled):not([aria-disabled="true"]):hover { transform: translateY(calc(-2 * var(--u))); filter: brightness(1.04); }
.btn[data-launch-done] { opacity: 1; filter: none; cursor: pointer; }

/* ---------- 5. BORDERS — one class per framed component (DESIGN.md §4b). Route files contain ZERO border/outline declarations. ----------
   Row rules draw the BOTTOM edge only and the last row drops it, so stacked rows never double a line. */
.rule-nav-tab { border-bottom: var(--rule-nav-tab-w) solid color-mix(in oklab, var(--rule-nav-tab-c) 40%, transparent); }
.rule-nav-pill { border: var(--rule-nav-tab-w) solid var(--rule-nav-tab-c); }
.rule-input { border: var(--rule-input-w) solid var(--rule-input-c); border-radius: var(--r-input); }
.rule-chip { border: var(--rule-chip-w) solid var(--rule-chip-c); border-radius: var(--r-pill); }
.rule-seg { border: var(--rule-seg-w) solid var(--rule-seg-c); border-radius: var(--r-pill); }
.rule-board-divider { border-bottom: var(--rule-board-w) solid var(--rule-board-c); }
.rule-board-divider-hi { border-bottom: var(--rule-board-w) solid var(--rule-board-c-hi); }
.rule-token-row { border: var(--rule-token-w) solid var(--rule-token-c); border-radius: calc(18 * var(--u)); }
.rule-ticket-row { border-bottom: var(--rule-ticket-w) solid var(--rule-ticket-c); }
.rule-ready { border: var(--rule-ready-w) solid var(--rule-ready-c); border-radius: var(--r-pill); }
.rule-sign { border-top: var(--rule-sign-w) solid var(--rule-sign-c); }
.rule-min-row { border-bottom: var(--rule-min-w) solid var(--rule-min-c); }
.rule-quote-head { border-bottom: var(--rule-qhead-w) solid var(--rule-qhead-c); }
.rule-quote-row { border-bottom: var(--rule-row-w) solid var(--rule-row-c); }
.rule-quote-detail { border: var(--rule-detail-w) solid var(--rule-detail-c); border-radius: calc(16 * var(--u)); }
.rule-filter { border-top: var(--rule-soft-w) solid var(--rule-soft-c); }
.rule-ledger-expanded { border-bottom: var(--rule-lexp-w) solid var(--rule-lexp-c); }
.rule-ledger-tab { border-bottom: var(--rule-ltab-w) solid var(--rule-ltab-c); }
.rule-ledger-tab.is-active, .rule-ledger-tab[aria-selected="true"] { border-bottom-color: var(--primary-a); }
.rule-ledger-toolbar { border-top: var(--rule-paper-w) solid var(--rule-paper-c); border-bottom: var(--rule-paper-w) solid var(--rule-paper-c); border-radius: calc(22 * var(--u)); }
.rule-read-row { border: var(--rule-read-w) solid var(--rule-read-c); border-radius: var(--r-pill); }
.rule-verdict-row { border-bottom: var(--rule-violet-w) solid var(--rule-violet-c); }
/* scenario table: the OUTER frame is drawn once; inner rows draw only a top edge (shared edges never doubled) */
.rule-scenario { border: var(--rule-scen-w) solid var(--rule-scen-c); border-radius: calc(18 * var(--u)); overflow: hidden; }
.rule-scenario > * + * { border-top: var(--rule-scen-w) solid var(--rule-scen-c); }
.rule-formula-row { border-bottom: var(--rule-formula-w) solid var(--rule-formula-c); }
.rule-locked { border: var(--rule-locked-w) solid var(--rule-locked-c); border-radius: var(--r-input); }
.rule-locked-pill { border: var(--rule-locked-w) solid var(--rule-locked-c); border-radius: var(--r-pill); }
.rule-footer { border-top: var(--rule-footer-w) solid var(--rule-footer-c); }
.rule-boundary { border-top: var(--rule-bound-w) solid var(--rule-bound-c); }
/* stacked rows: the last row of a group never draws its bottom rule */
:is(.rule-board-divider, .rule-board-divider-hi, .rule-ticket-row, .rule-min-row, .rule-ledger-expanded, .rule-verdict-row, .rule-formula-row):last-child { border-bottom-color: transparent; }
/* an input frame wraps the whole control: the frame sits on the wrapper, padding inside */
.field { display: flex; align-items: center; gap: calc(10 * var(--u)); padding: 0 calc(16 * var(--u)); min-height: max(40px, calc(51 * var(--u))); background: var(--surface-2); }
.field > input, .field > select { flex: 1; min-width: 0; height: 100%; background: transparent; font: 400 var(--t-lead)/1.2 var(--f-num); color: var(--ink); }
.field > input:focus-visible, .field > select:focus-visible { outline: 0; }
.field:focus-within { box-shadow: 0 0 0 max(2px, calc(3 * var(--u))) #F8776566; }

/* ---------- 6. NAV (chrome/nav.html, measured: 80 high, gutters 53, tabs from x 315, 129×60, active coral) ---------- */
.nav {
  position: sticky; top: 0; z-index: 50; height: var(--nav-h);
  display: flex; align-items: flex-end; gap: 0;
  padding: 0 calc(53 * var(--u)) 0 calc(53 * var(--u));
  background: var(--surface); color: var(--ink); font-family: var(--f-ui);
  box-shadow: 0 calc(8 * var(--u)) calc(24 * var(--u)) rgba(43, 36, 64, .14);
}
.nav-brand { align-self: stretch; display: flex; align-items: center; gap: calc(12 * var(--u)); width: calc(262 * var(--u)); flex: none; text-decoration: none; color: var(--ink); }
.nav-mark { height: max(40px, calc(46 * var(--u))); width: auto; aspect-ratio: 2048 / 1130; object-fit: contain; }
.nav-word { font: 600 max(18px, calc(26 * var(--u)))/1 var(--f-display); letter-spacing: .03em; }
.nav-tabs { display: flex; align-items: flex-end; gap: calc(6 * var(--u)); flex: 1; height: 100%; }
.nav-tab {
  width: calc(129 * var(--u)); height: calc(60 * var(--u)); display: flex; align-items: center; justify-content: center;
  border-radius: calc(24 * var(--u)) calc(24 * var(--u)) 0 0; background: transparent; color: var(--ink);
  font: 400 var(--t-ui)/1 var(--f-ui); text-decoration: none; white-space: nowrap;
  transition: transform var(--dur-quick) var(--ease-spring), background-color var(--dur-quick);
}
.nav-tab:hover { transform: translateY(calc(-2 * var(--u))); background: var(--surface-2); }
.nav-tab.is-active { background: var(--primary-a); color: #fff; border-bottom-color: #E8476B; transform: none; animation: tab-settle var(--dur-grow) var(--ease-spring); }
@keyframes tab-settle { from { transform: translateY(calc(6 * var(--u))); } to { transform: none; } }
.nav-end { align-self: stretch; margin-left: auto; display: flex; align-items: center; gap: calc(18 * var(--u)); }
.soc { display: grid; place-items: center; color: var(--ink); text-decoration: none; flex: none; }
.soc svg { width: calc(24 * var(--u)); height: calc(24 * var(--u)); min-width: 18px; min-height: 18px; fill: currentColor; }
.soc-tg { width: max(28px, calc(34 * var(--u))); height: max(28px, calc(34 * var(--u))); border-radius: 50%; background: var(--tg-plate); color: #fff; }
.soc-tg svg { width: calc(18 * var(--u)); height: calc(18 * var(--u)); min-width: 14px; min-height: 14px; }
.soc.soon { opacity: .55; cursor: default; }
.soc[data-launch-done] { opacity: 1; cursor: pointer; }
.soc[data-launch-done]:hover { transform: translateY(calc(-2 * var(--u))); }
.nav-wallet { height: max(34px, calc(41 * var(--u))); padding: 0 calc(22 * var(--u)); border-radius: var(--r-pill); background: var(--primary-a); color: #fff; font: 400 var(--t-ui)/1 var(--f-ui); white-space: nowrap; transition: transform var(--dur-quick) var(--ease-spring); }
.nav-wallet:hover { transform: translateY(calc(-2 * var(--u))); }
.nav-wallet.is-on { background: var(--surface-2); color: var(--ink); }
.nav-menu { display: none; }
.nav-wallet-m { display: none; }

/* ---------- 7. FOOTER (F9 hanging tags; measured: branch bar x 53–1868, tags 326×109 pitch 350, clips 18×28) ---------- */
.foot { position: relative; z-index: 1; background: var(--surface); color: var(--ink); padding: calc(10 * var(--u)) calc(53 * var(--u)) 0; box-shadow: 0 calc(-12 * var(--u)) calc(30 * var(--u)) rgba(43, 36, 64, .12); }
.foot-branch { height: calc(10 * var(--u)); min-height: 6px; border-radius: 999px; background: linear-gradient(180deg, #9A6A45, var(--branch) 60%, #6E4429); }
.foot-tags { display: grid; grid-template-columns: repeat(5, calc(326 * var(--u))); justify-content: space-between; padding: calc(48 * var(--u)) calc(43 * var(--u)) calc(2 * var(--u)); }
.foot-tag {
  position: relative; height: calc(111 * var(--u)); min-height: 64px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: calc(4 * var(--u)); padding-bottom: calc(10 * var(--u));
  border-radius: var(--r-tag); background: var(--surface-2); color: var(--ink); text-decoration: none; text-align: center;
  box-shadow: 0 calc(8 * var(--u)) calc(18 * var(--u)) rgba(43, 36, 64, .12), var(--highlight);
  transform-origin: 50% calc(-40 * var(--u));
  transition: transform var(--dur-base) var(--ease-spring);
}
.foot-tag::before { content: ""; position: absolute; top: calc(-46 * var(--u)); left: 50%; width: calc(18 * var(--u)); height: calc(28 * var(--u)); margin-left: calc(-9 * var(--u)); border-radius: calc(5 * var(--u)); background: var(--secondary); box-shadow: inset 0 calc(-4 * var(--u)) 0 rgba(0, 0, 0, .12); }
.foot-tag b { font: 500 max(13px, calc(18 * var(--u)))/1.2 var(--f-ui); letter-spacing: .02em; }
.foot-tag span { font: 400 var(--t-tiny)/1.3 var(--f-ui); opacity: .85; }
.foot-tag:hover { transform: rotate(-1.5deg); }
.foot-tag.is-active { background: #fff; box-shadow: 0 calc(10 * var(--u)) calc(22 * var(--u)) rgba(43, 36, 64, .18); }
.foot-line { display: flex; align-items: center; gap: calc(30 * var(--u)); margin-top: calc(2 * var(--u)); padding: calc(14 * var(--u)) 0 calc(20 * var(--u)); font: 400 var(--t-tiny)/1.35 var(--f-ui); }
.foot-brand { display: flex; align-items: center; gap: calc(10 * var(--u)); flex: none; }
.foot-mark { height: max(40px, calc(44 * var(--u))); width: auto; aspect-ratio: 2048 / 1130; }
.foot-brand b { font: 600 max(14px, calc(18 * var(--u)))/1 var(--f-display); letter-spacing: .03em; }
.foot-bound { flex: 1; }
.foot-soc { display: flex; align-items: center; gap: calc(16 * var(--u)); }

/* ---------- 8. sheets (wallet + Demo), toast ---------- */
.sheet { padding: 0; border: 0; background: transparent; max-width: min(92vw, calc(520 * var(--u) + 120px)); width: 100%; color: var(--ink); --pop-backdrop: rgb(43 36 64 / .5); }
.sheet-card { background: var(--surface); border-radius: var(--r-card); box-shadow: var(--shadow-card), var(--highlight); padding: max(18px, calc(28 * var(--u))); }
.sheet-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.sheet-head h2 { font: 600 max(22px, calc(30 * var(--u)))/1.1 var(--f-display); }
.sheet-x { font-size: 26px; line-height: 1; width: 36px; height: 36px; border-radius: 50%; }
.sheet-x:hover { background: var(--surface-2); }
.sheet-body { display: grid; gap: 12px; font-size: max(14px, calc(15 * var(--u))); }
.sheet-note { font-family: var(--f-num); }
.sheet-row { display: flex; justify-content: space-between; gap: 16px; }
.sheet-row b { font-weight: 500; font-family: var(--f-num); }
.sheet-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 4px; }
.wallet-list { display: grid; gap: 8px; }
.wallet-item { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 48px; padding: 8px 14px; border-radius: 14px; background: var(--surface-2); text-align: left; text-decoration: none; transition: transform var(--dur-quick) var(--ease-spring); }
.wallet-item:hover { transform: translateX(3px); }
.wallet-item img { width: 28px; height: 28px; border-radius: 8px; }
.wallet-item .wi-name { flex: 1; }
.wallet-item .wi-act { font-size: 13px; color: var(--primary-b); }
.wallet-item[aria-disabled="true"] { opacity: .6; cursor: default; }
.demo-list { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; font-family: var(--f-num); }
.demo-list dt { opacity: .75; }
.demo-list dd { text-align: right; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 80; padding: 10px 18px; border-radius: var(--r-pill); background: var(--ink); color: var(--surface); font-size: max(13px, calc(15 * var(--u))); box-shadow: var(--shadow-card); }

/* ---------- 9. MOTION (DESIGN.md §10 — "the garden grows back": clipped growth + berry pop + drifting shade) ---------- */
/* grow-in: a block rises from its own root like a clipped hedge regrowing (origin bottom, spring settle). JS adds .is-in. */
.grow { transform-origin: 50% 100%; }
html.motion .grow:not(.is-in) { opacity: 0; transform: translateY(calc(18 * var(--u))) scaleY(.94); }
html.motion .grow.is-in { opacity: 1; transform: none; transition: opacity var(--dur-base) var(--ease-garden), transform var(--dur-grow) var(--ease-spring); transition-delay: calc(var(--i, 0) * 70ms); }
/* berry pop: data-berry-pop elements bounce from 0 */
html.motion [data-berry-pop]:not(.is-in) { transform: scale(0); }
html.motion [data-berry-pop].is-in { transform: scale(1); transition: transform 520ms var(--ease-bounce); transition-delay: calc(var(--i, 0) * 60ms + 200ms); }
/* curve draw: an SVG path with pathLength="1" and data-draw */
html.motion [data-draw]:not(.is-in) { stroke-dasharray: 1; stroke-dashoffset: 1; }
html.motion [data-draw].is-in { stroke-dasharray: 1; stroke-dashoffset: 0; transition: stroke-dashoffset var(--dur-grow) var(--ease-garden); }
/* live tick: a value read live ripens — one berry dot pulses beside it */
.ripe { position: relative; }
.ripe::after { content: ""; position: absolute; right: calc(-12 * var(--u)); top: 50%; width: calc(7 * var(--u)); height: calc(7 * var(--u)); min-width: 5px; min-height: 5px; margin-top: calc(-3.5 * var(--u)); border-radius: 50%; background: var(--secondary); animation: ripe 900ms var(--ease-bounce) both; }
@keyframes ripe { 0% { transform: scale(0); opacity: 0; } 40% { transform: scale(1.5); opacity: 1; } 100% { transform: scale(1); opacity: 0; } }
/* shade drift: the dappled leaf shadows move slowly with the afternoon (decoration only) */
@media (prefers-reduced-motion: no-preference) {
  body::before { animation: shade-drift 26s ease-in-out infinite alternate; }
  @keyframes shade-drift { from { transform: rotate(-8deg) scale(1.15) translateX(0); } to { transform: rotate(-6deg) scale(1.15) translateX(calc(40 * var(--u))); } }
  /* hedge sway: art marked .sway breathes like foliage in a light breeze */
  .sway { animation: sway 7s ease-in-out infinite alternate; transform-origin: 50% 100%; }
  @keyframes sway { from { rotate: -.5deg; } to { rotate: .5deg; } }
  @supports ((animation-timeline: view()) and (animation-range: entry)) {
    .art-drift { animation: art-drift linear both; animation-timeline: view(); animation-range: cover; }
    @keyframes art-drift { from { translate: 0 calc(-24 * var(--u)); } to { translate: 0 calc(24 * var(--u)); } }
  }
}
/* route change (kit router v3 view transition) — short, soft, garden easing */
::view-transition-old(root), ::view-transition-new(root) { animation-timing-function: var(--ease-garden); }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  html.motion .grow:not(.is-in), html.motion [data-berry-pop]:not(.is-in) { opacity: 1; transform: none; }
  html.motion [data-draw]:not(.is-in) { stroke-dashoffset: 0; }
}

/* ---------- 10. MOBILE (< 1024: menu drawer, X/Telegram stay in the top row; 390 no horizontal scroll) ---------- */
@media (max-width: 1023.98px) {
  .nav { align-items: center; padding: 0 16px; gap: 10px; }
  .nav-brand { width: auto; gap: 8px; }
  .nav-word { font-size: 20px; }
  .nav-menu { display: inline-flex; align-items: center; gap: 8px; order: 3; height: 38px; padding: 0 12px; border-radius: var(--r-pill); background: var(--surface-2); font-size: 14px; }
  .nav-menu-bars { width: 16px; height: 2px; background: currentColor; box-shadow: 0 -5px 0 currentColor, 0 5px 0 currentColor; }
  .nav-end { order: 2; gap: 10px; }
  .nav-wallet { display: none; }
  .nav-tabs {
    position: absolute; top: 100%; left: 0; right: 0; height: auto; flex-direction: column; align-items: stretch; gap: 4px;
    padding: 10px 16px 16px; background: var(--surface); box-shadow: 0 14px 24px rgba(43, 36, 64, .18);
    visibility: hidden; opacity: 0; transform: translateY(-8px); transition: opacity .2s, transform .24s var(--ease-garden), visibility .24s;
  }
  .nav.is-open .nav-tabs { visibility: visible; opacity: 1; transform: none; }
  .nav-tab { width: 100%; height: 46px; border-radius: 14px; justify-content: flex-start; padding: 0 16px; font-size: 16px; }
  .nav-tabs .nav-wallet-m { display: flex; background: var(--primary-a); color: #fff; }
  .foot { padding: 10px 16px 0; }
  .foot-tags { grid-template-columns: 1fr 1fr; gap: 40px 12px; padding: 40px 0 12px; }
  .foot-tag { height: auto; padding: 14px 8px; }
  .foot-tag::before { top: -40px; width: 12px; height: 22px; margin-left: -6px; }
  .foot-line { flex-wrap: wrap; gap: 10px 16px; }
  .foot-bound { flex-basis: 100%; }
}
@media (max-width: 1023.98px) and (min-width: 600px) { .foot-tags { grid-template-columns: repeat(3, 1fr); } }
