/* DUSTPAN — app.css (shell). Single source of tokens, page frame, page atmosphere, nav, footer, rule classes, motion.
   Build width 1920 (LUAT 50): 1 u = 100vw / 1920 → at 1920 × 1080 the page equals the mockup 1:1, 1280–2560 scale in proportion.
   BORDERS (LUAT 56): every border/outline of the site lives in this file (.rule-* classes). Route files never declare one. */

/* ---------- 0. tokens ---------- */
:root {
  --u: calc(100vw / 1920);
  /* colours (DESIGN.md §3) */
  --paper: #FC899B;          /* page ground, LOCKED */
  --atm-peach: #FDC0B2;
  --atm-rose-top: #FD94A0;
  --atm-rose-bottom: #FDA0B8;
  --sky: #9EDCEA;
  --forest: #0E4C33;
  --forest-top: #11573A;
  --forest-bottom: #0B4630;
  --forest-deep: #07482C;
  --forest-foot: #07552F;
  --cream: #FDF1E9;
  --cream-2: #FBE7DB;
  --nav-cream: #FFF9ED;
  --ink-deep: #0B4A2C;
  --ink-soft: #3E6B57;
  --lime: #DFFB63;
  --lime-top: #E8FD7A;
  --lime-bottom: #C8F42E;
  --coral: #FD796F;
  --coral-top: #FF8A7E;
  --coral-bottom: #F9605F;
  --coral-red: #FF5F68;
  --mint: #97FCE4;
  --lilac: #E9C8F0;
  --slate-chip: #D6DEE6;
  --outline-pink: #F3B0B9;
  --outline-green: #3F7A71;
  --bevel-green: #2FAE6E;
  --nav-active: #FF9AAB;

  /* fonts (DESIGN.md §2) */
  --f-display: "Mochiy Pop One", "Open Sans", Arial, sans-serif;
  --f-ui: "Open Sans", Arial, sans-serif;
  --f-body: "DM Sans", "Open Sans", Arial, sans-serif;
  --f-caps: "Lexend Peta", "Open Sans", Arial, sans-serif;

  /* type scale @1920 (body text never below 12 px) */
  --t-hero: calc(66 * var(--u));
  --t-hook: calc(32 * var(--u));
  --t-section: calc(44 * var(--u));
  --t-num-lg: calc(28 * var(--u));
  --t-sub: max(14px, calc(22 * var(--u)));
  --t-label: max(12px, calc(20 * var(--u)));
  --t-body: max(13px, calc(18 * var(--u)));
  --t-cell: max(12px, calc(18 * var(--u)));
  --t-nav: max(13px, calc(17 * var(--u)));
  --t-small: max(12px, calc(14 * var(--u)));
  --t-foot: max(12px, calc(13 * var(--u)));

  /* radii + spacing (DESIGN.md §4) */
  --r-nav: calc(22 * var(--u));
  --r-panel: calc(28 * var(--u));
  --r-card: calc(24 * var(--u));
  --r-row: calc(18 * var(--u));
  --r-chip: calc(14 * var(--u));
  --r-pill: 999px;
  --gap: calc(24 * var(--u));
  --section-gap: calc(64 * var(--u));

  /* page frame (frame.json: 39 / 39 gutters, container 1841 @1920, no sidebar) */
  --gutter-l: calc(39 * var(--u));
  --gutter-r: calc(39 * var(--u));

  /* shadows */
  --sh-card: 0 calc(8 * var(--u)) calc(18 * var(--u)) rgba(120, 30, 50, .18);
  --sh-panel: 0 calc(4 * var(--u)) 0 var(--bevel-green), 0 calc(12 * var(--u)) calc(24 * var(--u)) rgba(80, 20, 40, .22);
  --sh-nav: 0 calc(10 * var(--u)) calc(20 * var(--u)) #8f3e5540;

  /* ---- rule tokens (BORDER TABLE, CSS px @1920; hairlines never vanish: max(1px, …)) ---- */
  --rule-hair: max(1px, calc(1 * var(--u)));
  --rule-thin: max(1px, calc(1.4 * var(--u)));
  --rule-2: max(1px, calc(2 * var(--u)));
  --rule-2-3: max(1px, calc(2.3 * var(--u)));
  --rule-2-5: max(1px, calc(2.5 * var(--u)));
  --rule-3: max(1px, calc(3 * var(--u)));
  --rule-3-3: max(2px, calc(3.3 * var(--u)));
  --rule-c-preview: #B9CBBD;
  --rule-c-preview-v: #CFE5D3;
  --rule-c-pile: #3C7C5F;
  --rule-c-ticket: #F0DCD3;
  --rule-c-howto: #EDD8D0;
  --rule-c-facts: #A2B9A3;
  --rule-c-quote: #1E654D;
  --rule-c-receipt: #D3CBC4;
  --rule-c-anatomy: rgba(14, 76, 51, .4);
  --rule-c-lane: #A2C7B6;
  --rule-c-contains: #D6CFCA;
  --rule-c-contains-v: #066740;
  --rule-c-select: #D7F95B;
  --rule-c-lane-open: #DEFC40;
  --rule-c-lane-closed: #C3EABE;
  --rule-c-state: #DAFB34;
  --rule-c-supply: #ECDFD6;
  --rule-c-sheet: #A4C2B6;
  --rule-c-control: #B5D2C1;
  --rule-c-construction: #B8DBAF;
  --rule-c-source: #A8E298;
  --rule-c-foot: rgba(255, 255, 255, .53);
  --rule-c-brand: #FF7485;
  --rule-c-focus: var(--lime);

  /* motion (DESIGN.md §10) */
  --ease-sweep: cubic-bezier(.22, 1.2, .36, 1);   /* broom stroke: fast push, small settle */
  --ease-out: cubic-bezier(.2, .7, .2, 1);
  --d-fast: 220ms;
  --d-mid: 420ms;
  --d-count: 600ms;
  --d-print: 60ms;
  --rt-nudge: calc(24 * var(--u));
  --rt-dur: 220ms;

  /* native controls on the brand */
  --native-accent: var(--coral);
  --native-scroll-thumb: var(--forest);
  --native-scroll-track: var(--paper);
}

/* ---------- 1. reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
:where(button, input, select, textarea) { border: 0; font: inherit; color: inherit; }
:where(button) { background: none; padding: 0; cursor: pointer; }
:where(a) { color: inherit; }
:where(h1, h2, h3, h4, p, ul, ol, figure, dl, dd) { margin: 0; }
:where(ul, ol) { padding: 0; list-style: none; }
img, svg, video { display: block; max-width: 100%; }
html { overflow-x: clip; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column;
  font-family: var(--f-body); font-size: var(--t-body); line-height: 1.4; color: var(--ink-deep);
  overflow-x: clip;
  /* ---------- 2. PAGE ATMOSPHERE (DESIGN.md §3b), shared by every route, scrolls with the page ---------- */
  background-color: var(--paper);
  background-image:
    /* atm-dawn — peach glow top-left */
    radial-gradient(ellipse calc(1100 * var(--u)) calc(700 * var(--u)) at calc(300 * var(--u)) calc(260 * var(--u)), rgba(253, 192, 178, .85), rgba(253, 192, 178, 0) 70%),
    /* atm-rose — top → bottom */
    linear-gradient(180deg, var(--atm-rose-top) 0%, var(--paper) 45%, var(--atm-rose-bottom) 100%);
  background-size: 100% 100%, 100% 100%;
  background-position: 0 0, 0 0;
  background-repeat: no-repeat;
}
/* the dot patch is a 180×90 field, not a single dot: a second layer clips the repeat to the patch */
body::before {
  content: ""; position: absolute; z-index: 0; pointer-events: none;
  left: calc(40 * var(--u)); top: calc(160 * var(--u)); width: calc(180 * var(--u)); height: calc(90 * var(--u));
  background: radial-gradient(circle, rgba(255, 255, 255, .5) calc(1.3 * var(--u)), transparent calc(1.7 * var(--u))) 0 0 / calc(18 * var(--u)) calc(18 * var(--u));
}
body::after {
  content: ""; position: absolute; z-index: 0; pointer-events: none;
  right: calc(60 * var(--u)); top: calc(160 * var(--u)); width: calc(160 * var(--u)); height: calc(80 * var(--u));
  background: radial-gradient(circle, rgba(255, 255, 255, .45) calc(1.3 * var(--u)), transparent calc(1.7 * var(--u))) 0 0 / calc(18 * var(--u)) calc(18 * var(--u));
}
::selection { background: var(--lime); color: var(--ink-deep); }
:focus-visible { outline: var(--rule-3) solid var(--rule-c-focus); outline-offset: calc(3 * var(--u)); border-radius: 6px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- 3. PAGE FRAME — one container, used by every route (frame.json) ---------- */
.page {
  position: relative; z-index: 1; flex: 1 0 auto; width: 100%;
  padding: 0 var(--gutter-r) var(--section-gap) var(--gutter-l);
  display: flex; flex-direction: column; gap: var(--section-gap);
}
/* art may bleed to the right edge (DESIGN.md §0); panels never do */
.bleed-right { margin-right: calc(-1 * var(--gutter-r)); }
.page[data-route-error] { justify-content: center; }
[data-route-notice] { position: fixed; z-index: 60; left: 50%; bottom: calc(24 * var(--u)); translate: -50% 0; padding: 10px 18px; border-radius: var(--r-pill); background: var(--forest); color: var(--cream); font: 600 var(--t-small) / 1.2 var(--f-ui); }

/* ---------- 4. SiteNav (N1) — chrome/nav.html, measured: band 119, card 1842×78, r22, pad 0 32, gap 26 ---------- */
.site-head {
  position: relative; z-index: 20; height: calc(119 * var(--u));
  padding: calc(23 * var(--u)) calc(38 * var(--u)) calc(18 * var(--u));
  display: flex; align-items: center;
  background: linear-gradient(180deg, #FFFFFF 0%, #FFFBF6 100%);
}
.nav-shell {
  width: 100%; height: calc(78 * var(--u)); border-radius: var(--r-nav);
  background: var(--nav-cream); box-shadow: var(--sh-nav);
  display: flex; align-items: center; gap: calc(26 * var(--u)); padding: 0 calc(32 * var(--u));
}
.brand {
  display: flex; align-items: center; gap: calc(12 * var(--u)); padding-right: calc(28 * var(--u));
  text-decoration: none; color: var(--ink-deep);
}
.brand-mark { height: calc(44 * var(--u)); min-height: 36px; width: auto; object-fit: contain; }
.brand-name { font: 800 calc(24 * var(--u)) / 1 var(--f-ui); letter-spacing: .02em; }
.nav-links { display: flex; align-items: center; gap: calc(10 * var(--u)); }
.nav-links a {
  color: var(--ink-deep); text-decoration: none; font: 700 var(--t-nav) / 1 var(--f-ui);
  padding: calc(12 * var(--u)) calc(18 * var(--u)); border-radius: var(--r-pill);
  transition: background-color var(--d-fast) var(--ease-out), transform var(--d-fast) var(--ease-sweep);
}
.nav-links a:hover { background: rgba(255, 154, 171, .35); }
.nav-links a.is-active { background: var(--nav-active); }
.nav-spacer { flex: 1; }
.nav-utils { display: flex; align-items: center; gap: calc(19 * var(--u)); font: 800 calc(15 * var(--u)) / 1 var(--f-ui); }
.social { display: inline-flex; align-items: center; justify-content: center; width: calc(34 * var(--u)); height: calc(34 * var(--u)); color: var(--ink-deep); border-radius: var(--r-pill); text-decoration: none; }
.social svg { width: calc(22 * var(--u)); height: calc(22 * var(--u)); min-width: 16px; min-height: 16px; }
.social.is-soon { opacity: .55; cursor: default; }
.social[data-launch-done] { opacity: 1; }
.social[data-launch-done]:hover { background: rgba(255, 154, 171, .35); }
.btn-wallet {
  color: #fff; background: var(--forest-foot); padding: calc(13 * var(--u)) calc(22 * var(--u)); border-radius: var(--r-pill);
  font: 800 max(12px, calc(15 * var(--u))) / 1 var(--f-ui); box-shadow: 0 calc(6 * var(--u)) calc(14 * var(--u)) #07552f35;
  transition: transform var(--d-fast) var(--ease-sweep), background-color var(--d-fast);
}
.btn-wallet:hover { background: var(--forest-deep); transform: translateY(calc(-2 * var(--u))); }
.btn-wallet:active { transform: translateY(calc(2 * var(--u))); }
.wallet-on { display: flex; align-items: center; gap: calc(10 * var(--u)); }
.wallet-on[hidden] { display: none; }
.wallet-addr { padding: calc(11 * var(--u)) calc(16 * var(--u)); border-radius: var(--r-pill); background: var(--forest-foot); color: #fff; font: 700 max(12px, calc(14 * var(--u))) / 1 var(--f-ui); font-variant-numeric: tabular-nums; }
.wallet-bal { color: var(--ink-deep); font: 700 max(12px, calc(14 * var(--u))) / 1 var(--f-ui); font-variant-numeric: tabular-nums; }
.pill-mini { padding: calc(10 * var(--u)) calc(14 * var(--u)); border-radius: var(--r-pill); background: #fffaf1; box-shadow: 0 calc(5 * var(--u)) calc(14 * var(--u)) #356b5a24; font: 700 max(12px, calc(13 * var(--u))) / 1 var(--f-ui); color: var(--ink-deep); }
.pill-mini:hover { background: var(--lime); }
.nav-menu { display: none; }

/* ---------- 5. SiteFooter (F4) — chrome/footer.html: band 64, pad 0 38, r 20 20 0 0, forest-foot, 13 px 700 ---------- */
.site-foot { position: relative; z-index: 2; height: calc(64 * var(--u)); min-height: 52px; padding: 0 calc(38 * var(--u)); display: flex; align-items: flex-end; }
.footer-shell {
  width: 100%; height: 100%; border-radius: calc(20 * var(--u)) calc(20 * var(--u)) 0 0; background: var(--forest-foot);
  display: flex; align-items: center; gap: calc(22 * var(--u)); padding: 0 calc(24 * var(--u));
  color: #fff; font: 700 var(--t-foot) / 1.2 var(--f-ui); box-shadow: 0 calc(-5 * var(--u)) calc(14 * var(--u)) #07552f25;
}
.foot-brand img { height: calc(34 * var(--u)); min-height: 24px; width: auto; }
.foot-note { flex: 1; }
.foot-sources { flex: 1; text-align: center; padding: 0 calc(16 * var(--u)); }
.foot-links { display: flex; align-items: center; gap: calc(16 * var(--u)); white-space: nowrap; }
.foot-social { color: #fff; text-decoration: none; }
.foot-social.is-soon { opacity: .7; }
.foot-ca-label { font: 500 max(12px, calc(11 * var(--u))) / 1 var(--f-caps); letter-spacing: .04em; opacity: .85; }
.foot-ca { color: var(--ink-deep); background: var(--nav-cream); border-radius: var(--r-pill); padding: calc(8 * var(--u)) calc(16 * var(--u)); font-family: var(--f-caps); font-weight: 700; font-size: max(12px, calc(12 * var(--u))); font-variant-numeric: tabular-nums; }
.foot-copy { color: var(--ink-deep); background: var(--lime); border-radius: var(--r-pill); padding: calc(8 * var(--u)) calc(18 * var(--u)); font: 700 var(--t-foot) / 1 var(--f-ui); }
.foot-copy:disabled { opacity: .6; cursor: not-allowed; }
.foot-buy { color: #9995a1; background: #e9e6eb; border-radius: var(--r-pill); padding: calc(8 * var(--u)) calc(18 * var(--u)); font: 800 var(--t-foot) / 1 var(--f-ui); }
.foot-buy:disabled { cursor: not-allowed; }
/* launched state — must not look disabled */
.foot-buy[data-launch-done] { color: #fff; background: linear-gradient(180deg, var(--coral-top), var(--coral-bottom)); cursor: pointer; box-shadow: 0 calc(4 * var(--u)) calc(10 * var(--u)) rgba(249, 96, 95, .35); }
.foot-buy[data-launch-done]:hover { filter: brightness(1.06); }
.foot-copy[data-launch-done] { opacity: 1; cursor: pointer; }

/* ---------- 6. shared components (DESIGN.md §5) ---------- */
.btn-action {
  display: inline-flex; align-items: center; justify-content: center; gap: calc(10 * var(--u));
  min-height: calc(64 * var(--u)); padding: 0 calc(40 * var(--u)); border-radius: var(--r-pill);
  color: #fff; background: linear-gradient(180deg, var(--coral-top), var(--coral-bottom));
  font: 700 max(14px, calc(22 * var(--u))) / 1 var(--f-ui); text-decoration: none;
  box-shadow: 0 calc(5 * var(--u)) 0 #d94a4f, 0 calc(10 * var(--u)) calc(18 * var(--u)) rgba(150, 30, 40, .25);
  transition: transform var(--d-fast) var(--ease-sweep), box-shadow var(--d-fast), filter var(--d-fast);
}
.btn-action:hover { filter: brightness(1.05); transform: translateY(calc(-2 * var(--u))); }
.btn-action:active { transform: translateY(calc(4 * var(--u))); box-shadow: 0 calc(1 * var(--u)) 0 #d94a4f, 0 calc(4 * var(--u)) calc(8 * var(--u)) rgba(150, 30, 40, .25); }
.btn-action[disabled], .btn-action[aria-disabled="true"] { filter: grayscale(.6); opacity: .65; cursor: not-allowed; transform: none; }
.panel-green {
  position: relative; border-radius: var(--r-panel); color: var(--cream);
  background: linear-gradient(180deg, var(--forest-top), var(--forest-bottom));
  box-shadow: inset 0 var(--rule-hair) 0 rgba(255, 255, 255, .25), var(--sh-panel);
}
.card-paper { position: relative; border-radius: var(--r-card); background: var(--cream); color: var(--ink-deep); box-shadow: var(--sh-card); }
.card-paper--2 { background: var(--cream-2); }
.pill {
  display: inline-flex; align-items: center; justify-content: center; min-height: calc(46 * var(--u)); padding: 0 calc(20 * var(--u));
  border-radius: var(--r-pill); background: var(--cream); color: var(--ink-deep); font: 700 var(--t-cell) / 1 var(--f-ui);
  transition: background-color var(--d-fast), transform var(--d-fast) var(--ease-sweep);
}
.pill:hover { transform: translateY(calc(-2 * var(--u))); }
.pill.is-on, .pill[aria-pressed="true"], .pill[aria-selected="true"] { background: linear-gradient(180deg, var(--coral-top), var(--coral-bottom)); color: #fff; }
.pill:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.chip { display: inline-flex; align-items: center; justify-content: center; padding: calc(6 * var(--u)) calc(16 * var(--u)); border-radius: var(--r-chip); font: 700 max(12px, calc(15 * var(--u))) / 1.1 var(--f-ui); white-space: nowrap; }
.chip--swept { background: linear-gradient(180deg, var(--lime-top), var(--lime-bottom)); color: var(--ink-deep); }
.chip--v1 { background: #D9DED6; color: #42514A; }
.chip--bin { background: #FFC2CB; color: #8A1F2E; }
.chip--past { background: var(--lilac); color: #4B2A57; }
.chip--nopair { background: var(--slate-chip); color: #33414F; }
.chip--chain { background: var(--mint); color: var(--ink-deep); }
.num { font-family: var(--f-ui); font-variant-numeric: tabular-nums; }
.v-lime { color: var(--lime); }
.v-neg { color: var(--coral-red); }
.label { font: 400 var(--t-label) / 1.2 var(--f-body); letter-spacing: -.03em; }
.caps { font-family: var(--f-caps); text-transform: uppercase; letter-spacing: .22em; }
.h-display { font: 400 var(--t-hero) / 1 var(--f-display); letter-spacing: -.02em; }
.h-section { font: 400 var(--t-section) / 1.1 var(--f-display); }
.h-hook { font: 800 var(--t-hook) / 1.1 var(--f-ui); letter-spacing: -.01em; }
.boundary { font: 500 var(--t-small) / 1.3 var(--f-body); }
/* HI-VIS STRIPE — signature divider (decoration only) */
.hivis {
  height: calc(25 * var(--u)); width: 100%; pointer-events: none;
  background: repeating-linear-gradient(-60deg, transparent 0 calc(10 * var(--u)), var(--lime) calc(10 * var(--u)) calc(30 * var(--u)), transparent calc(30 * var(--u)) calc(44 * var(--u)));
  -webkit-mask: linear-gradient(90deg, #000 0 88%, transparent 100%); mask: linear-gradient(90deg, #000 0 88%, transparent 100%);
}
/* art blob plate behind every art region (route places the art inside it) */
.art-plate { position: relative; }
.art-plate > img, .art-plate > video { position: relative; width: 100%; height: auto; }
/* WEIGH TICKET scalloped bottom edge (receipt cut) */
.ticket-cut {
  -webkit-mask: radial-gradient(circle calc(9 * var(--u)) at 50% 100%, transparent 98%, #000) 0 0 / calc(24 * var(--u)) 100% repeat-x;
  mask: radial-gradient(circle calc(9 * var(--u)) at 50% 100%, transparent 98%, #000) 0 0 / calc(24 * var(--u)) 100% repeat-x;
}
/* "quote hidden — RPC did not answer" */
.cell-hidden { color: inherit; opacity: .7; font: italic 400 var(--t-small) / 1.2 var(--f-body); }

/* ---------- 7. RULE CLASSES — one per framed component of BORDER_TABLE.md / DESIGN.md §4b ---------- */
/* edges drawn as fills / bevels (no stroke) */
.rule-nav-card { box-shadow: var(--sh-nav); }
.rule-pile-panel, .rule-sign-bar { box-shadow: inset 0 var(--rule-hair) 0 rgba(255, 255, 255, .25), 0 var(--rule-3-3) 0 var(--bevel-green), 0 calc(12 * var(--u)) calc(24 * var(--u)) rgba(80, 20, 40, .22); }
.rule-facts-card { box-shadow: inset 0 var(--rule-hair) 0 rgba(255, 255, 255, .25), 0 calc(3.7 * var(--u)) 0 #789287, 0 calc(12 * var(--u)) calc(24 * var(--u)) rgba(80, 20, 40, .22); }
.rule-impact-row, .rule-manifest-row { border: 0; }              /* separated by the panel showing through the gap */
.rule-impact-row + .rule-impact-row, .rule-manifest-row + .rule-manifest-row { margin-top: var(--rule-3); }
/* single bottom hairlines — only the row above draws the shared edge, the last row draws none (no doubled lines) */
.rule-preview-rule { border-bottom: var(--rule-2-3) solid var(--rule-c-preview); }
.rule-pile-row { border-bottom: var(--rule-thin) solid var(--rule-c-pile); }
.rule-ticket-row { border-bottom: var(--rule-2-3) solid var(--rule-c-ticket); }
.rule-howto-row { border-bottom: var(--rule-2) solid var(--rule-c-howto); }
.rule-facts-row { border-bottom: var(--rule-2) solid var(--rule-c-facts); }
.rule-quote-panel-rule { border-bottom: var(--rule-2-3) solid var(--rule-c-quote); }
.rule-receipt-row { border-bottom: var(--rule-2-3) solid var(--rule-c-receipt); }
.rule-lane-row { border-bottom: var(--rule-3) solid var(--rule-c-lane); }
.rule-contains-row { border-bottom: var(--rule-2) solid var(--rule-c-contains); }
.rule-sheet-row { border-bottom: var(--rule-2) solid var(--rule-c-sheet); }
.rule-control-rule { border-bottom: var(--rule-2-3) solid var(--rule-c-control); }
.rule-pile-row:last-child, .rule-ticket-row:last-child, .rule-howto-row:last-child, .rule-facts-row:last-child,
.rule-receipt-row:last-child, .rule-lane-row:last-child, .rule-contains-row:last-child, .rule-sheet-row:last-child { border-bottom: 0; }
/* top rule variants (for the row under a header) */
.rule-preview-rule--top { border-top: var(--rule-2-3) solid var(--rule-c-preview); }
.rule-ticket-row--top { border-top: var(--rule-2-3) solid var(--rule-c-ticket); }
.rule-facts-row--top { border-top: var(--rule-2) solid var(--rule-c-facts); }
/* vertical dividers — left side only */
.rule-preview-divider { border-left: var(--rule-hair) solid var(--rule-c-preview-v); }
.rule-anatomy-divider { border-left: var(--rule-2) solid var(--rule-c-anatomy); }
.rule-contains-divider { border-left: var(--rule-2-3) solid var(--rule-c-contains-v); }
.rule-supply-divider { border-left: var(--rule-2) solid var(--rule-c-supply); }
.rule-construction-divider { border-left: var(--rule-2) solid var(--rule-c-construction); }
.rule-stat-divider { border-left: var(--rule-2) solid rgba(11, 74, 44, .25); }
.rule-preview-divider:first-child, .rule-supply-divider:first-child, .rule-stat-divider:first-child { border-left: 0; }
/* framed boxes — all four sides, one stroke per box */
.rule-coin-card--selected { border: var(--rule-3-3) solid var(--rule-c-select); border-radius: var(--r-card); }
.rule-coin-card { border: var(--rule-3-3) solid transparent; border-radius: var(--r-card); }
.rule-lane--open { border: var(--rule-2-5) solid var(--rule-c-lane-open); border-radius: var(--r-card); }
.rule-lane { border: var(--rule-2-3) solid var(--rule-c-lane-closed); border-radius: var(--r-card); }
.rule-state-card { border: var(--rule-3-3) solid var(--rule-c-state); border-radius: var(--r-card); }
.rule-source-box { border: var(--rule-2-3) solid var(--rule-c-source); border-radius: var(--r-nav); }
/* inputs: the pill fill is the frame — no stroke; the frame wraps the whole control */
.rule-input { display: flex; align-items: center; gap: calc(14 * var(--u)); border: 0; border-radius: var(--r-pill); background: var(--cream); padding: calc(6 * var(--u)) calc(6 * var(--u)) calc(6 * var(--u)) calc(24 * var(--u)); box-shadow: var(--sh-card); }
.rule-input > input { flex: 1; min-width: 0; background: transparent; padding: calc(14 * var(--u)) 0; font: 500 var(--t-sub) / 1.2 var(--f-body); color: var(--ink-deep); outline: 0; }
.rule-input:focus-within { box-shadow: 0 0 0 var(--rule-3) var(--rule-c-focus), var(--sh-card); }
/* chrome dividers */
.rule-brand-divider { border-right: var(--rule-2) solid var(--rule-c-brand); }
.rule-foot-divider { border-left: var(--rule-hair) solid var(--rule-c-foot); border-right: var(--rule-hair) solid var(--rule-c-foot); }

/* ---------- 8. MOTION (DESIGN.md §10) — transform/opacity only, all off under reduced motion ---------- */
/* signature 1 · BROOM STROKE: a block arrives with one push from the left and a small settle, like dust swept onto the pan */
[data-reveal] { transition: opacity var(--d-mid) var(--ease-out), transform var(--d-mid) var(--ease-sweep); }
html.js [data-reveal]:not(.is-in) { opacity: 0; transform: translateX(calc(-36 * var(--u))) skewX(-4deg); }
html.js [data-reveal="drop"]:not(.is-in) { transform: translateY(calc(-28 * var(--u))) rotate(-3deg); }
/* signature 2 · THERMAL PRINT: children appear line by line, top → bottom (WEIGH TICKET, receipts) */
html.js [data-print] > * { transition: opacity 120ms linear, clip-path 160ms steps(4, end); }
html.js [data-print]:not(.is-in) > * { opacity: 0; clip-path: inset(0 0 100% 0); }
html.js [data-print].is-in > * { opacity: 1; clip-path: inset(0 0 0 0); }
/* count-up: numbers land like a scale needle (spring settle on the last digit) */
.is-counting { display: inline-block; animation: dp-settle var(--d-count) var(--ease-sweep) both; }
@keyframes dp-settle { 0% { transform: translateY(calc(6 * var(--u))); } 70% { transform: translateY(calc(-2 * var(--u))); } 100% { transform: none; } }
/* live tick: a value that refreshed flashes a lime sweep under it */
.is-ticked { animation: dp-tick 700ms var(--ease-out) both; }
@keyframes dp-tick { 0% { background-size: 0 100%; } 60% { background-size: 100% 100%; } 100% { background-size: 100% 100%; opacity: 1; } }
.is-ticked { background: linear-gradient(90deg, rgba(223, 251, 99, .35), rgba(223, 251, 99, 0)) no-repeat 0 0 / 0 100%; border-radius: 4px; }
/* grow-in for gap bars / lime pills */
[data-grow] { transform-origin: left center; transition: transform var(--d-fast) var(--ease-sweep); }
html.js [data-grow]:not(.is-in) { transform: scaleX(0); }
/* hover: toy cards lift; the hi-vis stripe drifts slowly (decoration) */
.card-lift { transition: transform var(--d-fast) var(--ease-sweep), box-shadow var(--d-fast); }
.card-lift:hover { transform: translateY(calc(-4 * var(--u))); }
@keyframes dp-stripe { to { background-position: calc(88 * var(--u)) 0; } }
.hivis--drift { animation: dp-stripe 6s linear infinite; }
/* art blobs: slow parallax on scroll — art only, never content */
@supports ((animation-timeline: view()) and (animation-range: entry)) {
  @media (prefers-reduced-motion: no-preference) {
    .art-drift { animation: dp-drift linear both; animation-timeline: view(); animation-range: cover; }
    @keyframes dp-drift { from { transform: translateY(calc(30 * var(--u))); } to { transform: translateY(calc(-30 * var(--u))); } }
  }
}
/* route change: kit router v3 view transition, tuned to a short hi-vis sweep (never a second animation) */
::view-transition-new(root) { animation-timing-function: var(--ease-sweep); }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; animation-iteration-count: 1 !important; transition-duration: 1ms !important; }
  html.js [data-reveal]:not(.is-in), html.js [data-grow]:not(.is-in) { opacity: 1; transform: none; }
  html.js [data-print]:not(.is-in) > * { opacity: 1; clip-path: none; }
}

/* ---------- 9. modals + toast ---------- */
.modal {
  border: 0; padding: calc(32 * var(--u)); width: min(92vw, calc(560 * var(--u))); min-width: min(92vw, 340px);
  border-radius: var(--r-card); background: var(--cream); color: var(--ink-deep); box-shadow: 0 24px 60px rgba(60, 10, 30, .35);
}
.modal::backdrop { background: rgba(14, 76, 51, .45); }
.modal-title { font: 400 max(20px, calc(30 * var(--u))) / 1.15 var(--f-display); }
.modal-sub { margin-top: 10px; font: 400 var(--t-body) / 1.4 var(--f-body); }
.modal-hash { margin-top: 14px; font: 600 var(--t-small) / 1.3 var(--f-ui); }
.modal-hash code { font-family: var(--f-caps); font-size: .9em; letter-spacing: .04em; word-break: break-all; }
.modal-close { margin-top: 22px; padding: 12px 22px; border-radius: var(--r-pill); background: var(--forest-foot); color: #fff; font: 700 var(--t-small) / 1 var(--f-ui); }
.wallet-list { margin-top: 18px; display: grid; gap: 10px; }
.wallet-item { display: flex; align-items: center; gap: 14px; width: 100%; padding: 12px 16px; border-radius: var(--r-row); background: var(--cream-2); font: 700 var(--t-body) / 1.2 var(--f-ui); color: var(--ink-deep); text-decoration: none; text-align: left; }
.wallet-item:hover { background: var(--lime); }
.wallet-item img { width: 28px; height: 28px; border-radius: 8px; }
.wallet-item .wi-state { margin-left: auto; font: 500 var(--t-small) / 1 var(--f-body); opacity: .75; }
.ui-toast { position: fixed; z-index: 80; left: 50%; bottom: 28px; translate: -50% 0; padding: 12px 22px; border-radius: var(--r-pill); background: var(--forest); color: var(--cream); font: 700 var(--t-small) / 1 var(--f-ui); box-shadow: 0 10px 24px rgba(0, 0, 0, .2); }
.ui-toast[hidden] { display: none; }

/* ---------- 10. 1024–1279: same proportions, text floors keep it readable ---------- */
/* ---------- 11. mobile < 1024 ---------- */
@media (max-width: 1023px) {
  :root { --u: calc(100vw / 1100); --gutter-l: 16px; --gutter-r: 16px; --section-gap: 40px; }
  .site-head { height: auto; padding: 12px 12px 8px; }
  .nav-shell { height: 60px; padding: 0 14px; gap: 10px; border-radius: 18px; }
  .brand { padding-right: 0; }
  .brand.rule-brand-divider { border-right: 0; }
  .brand-mark { height: 38px; }
  .brand-name { font-size: 18px; }
  .nav-links, .social, .nav-spacer { display: none; }
  .nav-utils { margin-left: auto; gap: 8px; }
  .btn-wallet { padding: 11px 14px; font-size: 13px; }
  .wallet-bal, [data-wallet-switch] { display: none; }
  .nav-menu { display: inline-flex; align-items: center; gap: 6px; padding: 9px 12px; border-radius: var(--r-pill); background: var(--nav-active); color: var(--ink-deep); font: 700 13px / 1 var(--f-ui); }
  .nav-menu svg { width: 18px; height: 18px; }
  .nav-drawer { margin: 0 0 0 auto; height: 100dvh; max-height: none; width: min(84vw, 320px); border: 0; padding: 24px 20px; background: var(--nav-cream); border-radius: 22px 0 0 22px; }
  .nav-drawer::backdrop { background: rgba(14, 76, 51, .45); }
  .drawer-links { display: grid; gap: 8px; }
  .drawer-links a { padding: 14px 18px; border-radius: var(--r-pill); text-decoration: none; color: var(--ink-deep); font: 700 17px / 1 var(--f-ui); }
  .drawer-links a.is-active { background: var(--nav-active); }
  .drawer-close { margin-top: 18px; padding: 12px 20px; border-radius: var(--r-pill); background: var(--forest-foot); color: #fff; font: 700 14px / 1 var(--f-ui); }
  .site-foot { height: auto; padding: 0 12px; }
  .footer-shell { flex-wrap: wrap; gap: 10px 14px; padding: 16px; border-radius: 18px 18px 0 0; }
  .foot-note, .foot-sources { flex: 1 1 100%; text-align: left; padding: 0; }
  .rule-foot-divider { border-left: 0; border-right: 0; }
  .foot-links { flex-wrap: wrap; white-space: normal; }
  body::after { display: none; }
}
/* main fix 30/11/2026 (phones, 480 px and narrower): the bar was wider than the phone. "Connect wallet" kept the width of one line although
   it sets on two, and covered the end of the name "DUSTPAN" (5-23 px on every route, worst on "Burn bin" and on 360 px phones). Now the
   button is as wide as its two lines need, the two right-hand buttons keep their size and the name gets the rest; on phones narrower than
   390 px the name is one step smaller and the route name in the menu button may take two lines ("Burn / bin"). When even that is not
   enough (wallet connected on a small phone) the name steps aside whole - the mark stays - instead of being covered or cut. */
@media (max-width: 480px) {
  .nav-shell { padding: 0 10px; gap: 8px; }
  .brand { flex: 0 1 auto; min-width: 44px; height: 38px; flex-wrap: wrap; align-content: flex-start; overflow: hidden; }
  .nav-utils, .nav-menu { flex: none; }
  .btn-wallet { width: min-content; padding: 11px 12px; }
  .nav-menu { padding: 9px 10px; }
}
@media (max-width: 389px) {
  .brand-name { font-size: 16px; }
  .nav-menu-route { width: min-content; }
  .nav-menu svg { flex: none; }
}

@media (min-width: 1024px) { .nav-drawer { display: none; } }
