/* STEPDOWN — shell stylesheet (JOB shell 29/11/2026). Source: mockup/v1/DESIGN.md §0–§5, §10.
   SCALE (LUAT 50): one root unit --u = 100vw / 1920 → the 1920 build equals the mockup 1:1 (USER FIX type sizes),
   1280–2560 scale in proportion; below 1024 a fixed mobile unit. Every size is a multiple of var(--u).
   BORDERS (LUAT 56): only this file draws borders — --rule-* tokens + one .rule-* class per component of DESIGN.md §4b.
   Route bodies use the classes and never write border/outline, max-width, side padding or a page background. */

/* ---------- 1. tokens ---------- */
:root {
  --u: calc(100vw / 1920);
  /* colours (DESIGN.md §3) */
  --paper: #FDCB47;
  --surface: #FFF4D6;
  --sheet: #FDECCD;
  --surface-card: #F9EED0;
  --asphalt: #2C2F36;
  --asphalt-raised: #383C45;
  --primary: #EB19EF;
  --primary-deep: #D702CC;
  --signal: #E8561C;
  --cone: #E4572E;
  --coral: #FC9477;
  --coral-row: #FBB79D;
  --mint: #97FCE4;
  --ink: #27282D;
  --ink-muted: #5A5F6B;
  --cream: #FFF4D6;
  --outline-light: #C7C5B2;
  --outline-gold: #E09B1D;
  --rule-yellow: #FFF24A;
  --error: #E95457;

  /* fonts (DESIGN.md §2) */
  --f-display: 'Special Gothic Expanded One', 'Arial Black', system-ui, sans-serif;
  --f-body: 'Hind Vadodara', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --f-num: 'Special Gothic Condensed One', 'Arial Narrow', system-ui, sans-serif;
  --f-mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

  /* type scale @1920 (USER FIX SCALE: hero 56–64, body 15–16, nav 14–15, labels 12–14, numerals ≤80); never below 12px */
  --t-hero: calc(64 * var(--u));
  --t-title: calc(56 * var(--u));
  --t-section: max(18px, calc(36 * var(--u)));
  --t-sub: max(14px, calc(22 * var(--u)));
  --t-body: max(13px, calc(16 * var(--u)));
  --t-small: max(12px, calc(14 * var(--u)));
  --t-meta: max(12px, calc(13 * var(--u)));
  --t-nav: max(12px, calc(15 * var(--u)));
  --t-numeral: calc(76 * var(--u));
  --t-cell: max(12px, calc(19 * var(--u)));
  --t-code: max(12px, calc(14 * var(--u)));

  /* page frame (frame.json + DESIGN.md §0): full-bleed gutters 9 / 10 @1920, content inset ~46 @1920 */
  --gutter-l: calc(9 * var(--u));
  --gutter-r: calc(10 * var(--u));
  --inset: calc(46 * var(--u));
  --nav-h: calc(96 * var(--u));
  --gap-section: calc(64 * var(--u));
  --gap: calc(24 * var(--u));

  /* materials (DESIGN.md §4) */
  --r-sheet: calc(28 * var(--u));
  --r-panel: calc(24 * var(--u));
  --r-seg: calc(14 * var(--u));
  --r-pill: 999px;
  --sh-card: 0 calc(8 * var(--u)) calc(24 * var(--u)) rgba(146, 80, 30, .22);
  --sh-panel: 0 calc(10 * var(--u)) calc(28 * var(--u)) rgba(30, 20, 20, .35);
  --hi-top: inset 0 1px 0 rgba(255, 255, 255, .30);

  /* rules (BORDER TABLE, CSS px @1920 → scaled, hairlines never below 1px) */
  --rule-w-hair: max(1px, calc(1.2 * var(--u)));
  --rule-w-thin: max(1px, calc(1.6 * var(--u)));
  --rule-w-std: max(1px, calc(2.2 * var(--u)));
  --rule-w-strong: max(1px, calc(3.1 * var(--u)));
  --rule-w-final: max(2px, calc(3.4 * var(--u)));
  --rule-howto: #C7C5B2;
  --rule-howto-final: #FC876D;
  --rule-sheet-top: #EC9046;
  --rule-step-row: #A19A8C;
  --rule-sheet-divider: #E09B1D;
  --rule-table-head: #959186;
  --rule-table-row: rgba(255, 244, 214, .55);
  --rule-card-divider: #D0AB5D;
  --rule-footer: #FFF24A;
  --rule-json-box: #CEC7BB;
  --rule-creator-table: #EBE5D7;
  --rule-creator-row: #B6AFA0;
  --rule-step-card: #B2A793;
  --rule-notice: #FD983F;
  --rule-address: #95918D;
  --rule-wallet-row: #E6D2B9;
  --rule-dialog: #D7C8B3;
  --rule-feenow-row: #B6B0A3;
  --rule-token-row: #B5AA96;
  --rule-token-selected: #E34A31;
  --rule-progress: #E2CAAA;
  --rule-whatif: #F347EB;
  --rule-code-header: #FCF9EF;
  --rule-code-window: #FFFFFA;
  --rule-code-well: #D8D8D7;
  --rule-chip: #AF9C88;
  --rule-input-pill: #E4E4D8;
  --rule-feebar: #CBB998;
  --rule-lock-divider: #D2BC98;
  --rule-principle: #C9B597;
  --rule-final: #FF6609;
  --rule-focus: var(--primary);
  --rule-rim: #FFFBEF;
  --rule-dialog-edge: #F5834A;

  /* motion (DESIGN.md §10) */
  --ease-road: cubic-bezier(.2, 0, 0, 1);
  --ease-plant: cubic-bezier(.3, 1.35, .5, 1);
  --d-fast: 160ms;
  --d-step: 220ms;
  --d-flip: 420ms;
  --d-fill: 600ms;
  --rt-nudge: calc(24 * var(--u));
  --rt-dur: 260ms;

  /* native controls on a light ground */
  --native-accent: var(--signal);
  --native-scroll-thumb: #C9872F;
  --native-scroll-track: #FDE3A0;
  color-scheme: light;
}
html[data-rt-dir=back] { --rt-nudge: calc(-24 * var(--u)); }
@media (max-width: 1023.98px) {
  :root { --u: .62px; --gutter-l: 10px; --gutter-r: 10px; --inset: 16px; --nav-h: 68px; --t-hero: 40px; --t-title: 34px; }
}

/* ---------- 2. 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(h1, h2, h3, h4, p, ul, ol, figure, dl, dd) { margin: 0; }
:where(ul, ol) { padding: 0; list-style: none; }
:where(img, svg, video) { display: block; max-width: 100%; }
:where(a) { color: inherit; }
:where(a, button, input, select, textarea, [tabindex]):focus-visible { outline: max(2px, calc(3 * var(--u))) solid var(--rule-focus); outline-offset: 2px; }
::selection { background: var(--primary); color: #fff; }
html { background: var(--paper); -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--nav-h) + 12px); }
body {
  margin: 0; min-height: 100vh; overflow-x: hidden;
  font-family: var(--f-body); font-weight: 500; font-size: var(--t-body); line-height: 1.45; color: var(--ink);
  display: flex; flex-direction: column;
  /* ---------- 3. page atmosphere (DESIGN.md §3b) — every layer, repeated per 1080 screen, shared by every route ---------- */
  background-color: var(--paper);
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1920 1080' preserveAspectRatio='none'%3E%3Cdefs%3E%3CradialGradient id='g' cx='1700' cy='150' r='760' gradientUnits='userSpaceOnUse'%3E%3Cstop offset='0' stop-color='%23F88E63' stop-opacity='.4'/%3E%3Cstop offset='.55' stop-color='%23F88E63' stop-opacity='.14'/%3E%3Cstop offset='1' stop-color='%23F88E63' stop-opacity='0'/%3E%3C/radialGradient%3E%3C/defs%3E%3Crect width='1920' height='1080' fill='url(%23g)'/%3E%3Cg fill='%23FFF4D6' fill-opacity='.18'%3E%3Cpath d='M0 120 120 0h70L0 190z'/%3E%3Cpath d='M0 290 290 0h55L0 345z'/%3E%3Cpath d='M1700 300 1920 80v90L1790 300z'/%3E%3C/g%3E%3Cg fill='%23FEA665' fill-opacity='.35'%3E%3Cpath d='M0 215 215 0h45L0 260z'/%3E%3Cpath d='M1600 300 1820 80h70L1670 300z'/%3E%3Cpath d='M1860 300 1920 240v60z'/%3E%3C/g%3E%3C/svg%3E"),
    linear-gradient(100deg, #FED640 0%, #FDBD44 30%, #FEA466 75%, #FC9469 100%);
  background-size: 100% calc(1080 * var(--u)), 100% calc(1080 * var(--u));
  background-repeat: repeat-y, repeat-y;
}
.atm-grain {
  position: fixed; inset: 0; z-index: 90; pointer-events: none; opacity: .04; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0'/%3E%3C/filter%3E%3Crect width='220' height='220' filter='url(%23n)'/%3E%3C/svg%3E");
}
.skip-link { position: absolute; left: 12px; top: -80px; z-index: 200; background: var(--asphalt); color: var(--cream); padding: 10px 16px; border-radius: 10px; text-decoration: none; font-weight: 700; }
.skip-link:focus { top: 12px; }

/* ---------- 4. ONE PAGE FRAME ---------- */
.frame { padding-inline: var(--gutter-l) var(--gutter-r); }
.page { flex: 1 0 auto; display: block; width: 100%; position: relative; z-index: 1; }
.page:focus { outline: 0; }
.page > * + * { margin-top: var(--gap-section); }
.page > :last-child { margin-bottom: var(--gap-section); }
/* content block inset inside the frame (blocks drawn ~40–60 px in from the bleed) — a route uses .inset instead of its own padding */
.inset { margin-inline: calc(var(--inset) - var(--gutter-l)) calc(var(--inset) - var(--gutter-r)); }
.bleed { margin-inline: calc(-1 * var(--gutter-l)) calc(-1 * var(--gutter-r)); }

/* ---------- 5. NAV N13 (chrome/nav.html, mockup px ×1.148) ---------- */
.site-nav { position: sticky; top: 0; z-index: 50; height: var(--nav-h); padding: calc(11 * var(--u)) calc(21 * var(--u)); }
.site-nav .bar {
  height: calc(73 * var(--u)); border-radius: calc(21 * var(--u)); background: var(--surface);
  display: flex; align-items: center; gap: calc(16 * var(--u)); padding: 0 calc(21 * var(--u));
  box-shadow: 0 calc(9 * var(--u)) calc(21 * var(--u)) rgba(107, 78, 33, .19), var(--hi-top); color: var(--asphalt);
}
.brand { display: flex; align-items: center; gap: calc(12 * var(--u)); min-width: calc(282 * var(--u)); text-decoration: none; color: var(--asphalt); }
.brand-mark { width: calc(53 * var(--u)); height: calc(53 * var(--u)); min-width: 36px; min-height: 36px; object-fit: contain; }
.brand-word { font: calc(28 * var(--u))/1 var(--f-display); letter-spacing: -.01em; white-space: nowrap; }
.nav-panel { display: flex; align-items: center; flex: 1; gap: calc(30 * var(--u)); }
.routes { display: flex; align-items: center; justify-content: space-between; gap: calc(14 * var(--u)); flex: 1; }
.routes a, .social {
  font: var(--t-nav)/1 var(--f-num); color: var(--asphalt); text-decoration: none; white-space: nowrap; letter-spacing: .01em;
  padding: calc(9 * var(--u)) calc(12 * var(--u)); border-radius: calc(11 * var(--u));
  transition: background-color var(--d-fast) var(--ease-road), color var(--d-fast) var(--ease-road), transform var(--d-fast) var(--ease-road);
}
.routes a:hover { background: rgba(44, 47, 54, .08); }
.routes a.is-active, .routes a[aria-current="page"] { background: var(--asphalt); color: var(--cream); }
.socials { display: flex; align-items: center; gap: calc(6 * var(--u)); }
.social:hover { background: rgba(44, 47, 54, .08); }
.social.soon, .foot-btn.soon { cursor: default; }
.social.soon { opacity: .72; }
.menu-btn { display: none; }

/* ---------- 6. FOOTER F8 (chrome/footer.html, mockup px ×1.148) ---------- */
.site-foot { position: relative; z-index: 1; background: var(--asphalt); color: var(--cream); padding: calc(34 * var(--u)) calc(66 * var(--u)) calc(28 * var(--u)); }
.foot-top { display: flex; align-items: center; gap: calc(36 * var(--u)); padding-bottom: calc(22 * var(--u)); }
.foot-brand { display: flex; align-items: center; gap: calc(18 * var(--u)); flex: 1; min-width: 0; }
.foot-mark { width: calc(52 * var(--u)); height: calc(52 * var(--u)); min-width: 36px; min-height: 36px; object-fit: contain; }
.foot-line { font: max(22px, calc(44 * var(--u)))/1.05 var(--f-display); letter-spacing: -.01em; }
.foot-btns { display: flex; align-items: center; gap: calc(28 * var(--u)); flex-wrap: wrap; justify-content: flex-end; }
.foot-btn {
  display: inline-flex; align-items: center; justify-content: center; min-width: calc(130 * var(--u)); min-height: calc(48 * var(--u));
  padding: calc(12 * var(--u)) calc(40 * var(--u)); border-radius: calc(17 * var(--u));
  background: var(--surface); color: var(--asphalt); font: 700 var(--t-body)/1 var(--f-body); text-decoration: none; white-space: nowrap;
  box-shadow: var(--hi-top), 0 calc(3 * var(--u)) 0 rgba(0, 0, 0, .25);
  transition: transform var(--d-fast) var(--ease-road), box-shadow var(--d-fast) var(--ease-road);
}
a.foot-btn[href]:hover, .foot-btn[data-launch-done]:hover { transform: translateY(calc(-2 * var(--u))); }
.foot-ca { display: flex; flex-direction: column; align-items: center; gap: calc(6 * var(--u)); }
.foot-ca-btn { font-variant-numeric: tabular-nums; max-width: calc(260 * var(--u)); overflow: hidden; text-overflow: ellipsis; }
.foot-ca-btn:disabled { cursor: default; }
.foot-ca-label { font: 500 var(--t-meta)/1.2 var(--f-body); color: rgba(255, 244, 214, .78); white-space: nowrap; }
.foot-buy { background: var(--primary); color: #fff; box-shadow: var(--hi-top), 0 calc(4 * var(--u)) calc(10 * var(--u)) rgba(235, 25, 239, .3); }
.foot-buy.is-soon, .foot-buy:disabled { background: #6B4A6E; color: rgba(255, 244, 214, .8); box-shadow: none; cursor: default; }
.foot-buy[data-launch-done] { background: var(--primary); color: #fff; cursor: pointer; }
.foot-meta { display: flex; justify-content: space-between; gap: 16px; padding-top: calc(16 * var(--u)); font: 500 var(--t-small)/1.35 var(--f-body); color: var(--cream); }

/* ---------- 7. shared components (DESIGN.md §5) ---------- */
.h-hero { font: var(--t-hero)/.98 var(--f-display); letter-spacing: -.01em; color: var(--ink); }
.h-title { font: var(--t-title)/.98 var(--f-display); text-transform: uppercase; color: var(--ink); }
.h-section { font: var(--t-section)/1 var(--f-display); text-transform: uppercase; }
.t-sub { font: 500 var(--t-sub)/1.35 var(--f-body); }
.t-label { font: 700 var(--t-small)/1.2 var(--f-body); text-transform: uppercase; letter-spacing: .02em; }
.t-meta, .source-line { font: 500 var(--t-meta)/1.3 var(--f-body); color: var(--ink-muted); }
.t-num { font-family: var(--f-num); font-variant-numeric: tabular-nums; }
.t-numeral { font: var(--t-numeral)/.95 var(--f-num); font-variant-numeric: tabular-nums; }
.t-cell { font: var(--t-cell)/1.2 var(--f-num); font-variant-numeric: tabular-nums; }
.t-code, .code { font: 400 var(--t-code)/1.5 var(--f-mono); }
.on-dark { color: var(--cream); }

.sheet { background: var(--sheet); border-radius: var(--r-sheet); box-shadow: var(--sh-card), var(--hi-top); }
.card { background: var(--surface-card); border-radius: var(--r-sheet); box-shadow: var(--sh-card), var(--hi-top); }
.panel-dark { background: var(--asphalt); color: var(--cream); border-radius: var(--r-panel); box-shadow: var(--sh-panel); }
.panel-raised { background: var(--asphalt-raised); color: var(--cream); border-radius: var(--r-panel); }
.code-well { background: var(--asphalt-raised); color: var(--cream); border-radius: calc(16 * var(--u)); padding: calc(16 * var(--u)) calc(20 * var(--u)); font: 400 var(--t-code)/1.5 var(--f-mono); overflow-x: auto; }
.code-well .k { color: var(--signal); }
.code-well .s { color: var(--cream); }
.code-well .n { color: var(--mint); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: calc(8 * var(--u));
  min-height: calc(48 * var(--u)); padding: calc(10 * var(--u)) calc(26 * var(--u)); border-radius: var(--r-pill);
  font: 700 var(--t-body)/1 var(--f-body); text-decoration: none; white-space: nowrap;
  transition: transform var(--d-fast) var(--ease-road), box-shadow var(--d-fast) var(--ease-road), background-color var(--d-fast) var(--ease-road);
}
.btn:hover:not(:disabled) { transform: translateY(calc(-2 * var(--u))); }
.btn:active:not(:disabled) { transform: translateY(calc(1 * var(--u))); }
.btn-primary { background: var(--primary); color: #fff; box-shadow: var(--hi-top), 0 calc(4 * var(--u)) 0 var(--primary-deep), 0 calc(8 * var(--u)) calc(18 * var(--u)) rgba(235, 25, 239, .28); }
.btn-secondary { background: var(--surface); color: var(--ink); box-shadow: var(--hi-top), 0 calc(3 * var(--u)) 0 rgba(146, 80, 30, .25); }
.btn-dark { background: var(--asphalt); color: var(--cream); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .55; cursor: default; box-shadow: none; }

.seg { display: inline-flex; gap: calc(4 * var(--u)); padding: calc(4 * var(--u)); border-radius: var(--r-seg); background: var(--surface); }
.seg > button { padding: calc(8 * var(--u)) calc(18 * var(--u)); border-radius: calc(10 * var(--u)); font: 700 var(--t-small)/1 var(--f-body); color: var(--ink); transition: background-color var(--d-step) var(--ease-road), color var(--d-step) var(--ease-road); }
.seg > button[aria-pressed="true"], .seg > button.is-on { background: var(--signal); color: #fff; }
.seg.seg-primary > button[aria-pressed="true"], .seg.seg-primary > button.is-on { background: var(--primary); }

.chip { display: inline-flex; align-items: center; gap: calc(6 * var(--u)); padding: calc(6 * var(--u)) calc(14 * var(--u)); border-radius: var(--r-pill); font: 700 var(--t-small)/1 var(--f-body); background: var(--surface); }
.chip-mint { background: var(--mint); color: var(--ink); }
.chip-signal { background: var(--signal); color: #fff; }

.notice { display: flex; align-items: center; gap: calc(14 * var(--u)); min-height: calc(60 * var(--u)); padding: calc(12 * var(--u)) calc(24 * var(--u)); border-radius: calc(18 * var(--u)); background: var(--surface); font: 600 var(--t-body)/1.35 var(--f-body); }
.notice-cone { flex: none; width: calc(28 * var(--u)); height: calc(28 * var(--u)); min-width: 18px; min-height: 18px; }

/* sign badge (round road sign, red rim) — used for fee steps */
.sign { display: inline-grid; place-items: center; aspect-ratio: 1; border-radius: 50%; background: var(--surface); box-shadow: 0 0 0 calc(7 * var(--u)) var(--cone), 0 calc(6 * var(--u)) calc(14 * var(--u)) rgba(60, 30, 10, .3); font-family: var(--f-num); color: var(--ink); }

/* data tables (dark) */
.table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.table th { text-align: left; font: 700 var(--t-small)/1.2 var(--f-body); text-transform: uppercase; letter-spacing: .02em; padding: calc(12 * var(--u)) calc(16 * var(--u)); }
.table td { padding: calc(14 * var(--u)) calc(16 * var(--u)); font: var(--t-cell)/1.2 var(--f-num); }

/* live cells */
[data-cell].is-hidden-cell { visibility: hidden; }

/* ---------- 8. BORDER CLASSES (one per framed component, DESIGN.md §4b / BORDER_TABLE.md) ----------
   Sides as measured; a shared edge is drawn once (lower/next box draws nothing on the shared side). */
/* hand-over dialog: thin signal-orange edge (BORDER_TABLE schedule #31/#74) */
.rule-dialog-edge { border: max(1px, calc(1.6 * var(--u))) solid var(--rule-dialog-edge); }
/* panel rim: the mockup draws a light hairline edge on every sheet/card/panel */
.rule-rim, .panel-dark, .sheet, .card { border: max(1px, calc(2.4 * var(--u))) solid var(--rule-rim); }
.rule-howto-step { border: var(--rule-w-std) solid var(--rule-howto); border-radius: var(--r-seg); }
.rule-howto-step--final { border: var(--rule-w-std) solid var(--rule-howto-final); border-radius: var(--r-seg); }
.rule-sheet-top { border-bottom: max(2px, calc(3.9 * var(--u))) solid var(--rule-sheet-top); }
.rule-step-row { border-bottom: var(--rule-w-thin) solid var(--rule-step-row); }
.rule-sheet-divider { border-bottom: var(--rule-w-std) solid var(--rule-sheet-divider); }
.rule-table-head { border-bottom: var(--rule-w-std) solid var(--rule-table-head); }
.rule-table-row { border-bottom: var(--rule-w-hair) solid var(--rule-table-row); }
.rule-table-row:last-child { border-bottom: 0; }
.rule-card-divider { border-bottom: var(--rule-w-std) solid var(--rule-card-divider); }
.rule-footer { border-top: max(1px, calc(2.3 * var(--u))) solid var(--rule-footer); }
.rule-json-box { border: var(--rule-w-std) solid var(--rule-json-box); border-radius: var(--r-seg); }
.rule-creator-table { border: var(--rule-w-std) solid var(--rule-creator-table); border-radius: calc(10 * var(--u)); overflow: hidden; }
.rule-creator-row { border-bottom: var(--rule-w-std) solid var(--rule-creator-row); }
.rule-creator-row:last-child { border-bottom: 0; }
.rule-step-card { border: var(--rule-w-std) solid var(--rule-step-card); border-radius: var(--r-seg); }
.rule-step-card--active { border: max(2px, calc(3 * var(--u))) solid var(--signal); border-radius: var(--r-seg); }
.rule-notice-bar { border-block: var(--rule-w-hair) solid var(--rule-notice); border-radius: calc(18 * var(--u)); }
.rule-address-input { border: var(--rule-w-thin) solid var(--rule-address); border-radius: calc(10 * var(--u)); }
.rule-wallet-row { border-bottom: var(--rule-w-thin) solid var(--rule-wallet-row); }
.rule-wallet-row:last-child { border-bottom: 0; }
.rule-dialog-divider { border-bottom: var(--rule-w-hair) solid var(--rule-dialog); }
.rule-feenow-row { border-bottom: var(--rule-w-thin) solid var(--rule-feenow-row); }
.rule-feenow-row:last-child { border-bottom: 0; }
.rule-token-row { border-top: var(--rule-w-std) solid var(--rule-token-row); }
.rule-token-row:last-child { border-bottom: var(--rule-w-std) solid var(--rule-token-row); }
.rule-token-row--selected { outline: var(--rule-w-strong) solid var(--rule-token-selected); outline-offset: calc(-1 * var(--rule-w-strong)); border-radius: calc(22 * var(--u)); }
.rule-progress-card { border: var(--rule-w-strong) solid var(--rule-progress); border-radius: calc(18 * var(--u)); }
.rule-whatif-card { border: var(--rule-w-std) solid var(--rule-whatif); border-radius: calc(18 * var(--u)); }
.rule-error-card { border: var(--rule-w-thin) solid var(--error); border-radius: calc(12 * var(--u)); }
.rule-code-header { border: var(--rule-w-strong) solid var(--rule-code-header); border-radius: calc(18 * var(--u)); }
.rule-code-window { border: var(--rule-w-strong) solid var(--rule-code-window); border-radius: calc(18 * var(--u)); }
.rule-code-well { border: var(--rule-w-thin) solid var(--rule-code-well); border-radius: calc(16 * var(--u)); }
.rule-chip { border: max(1px, calc(2.6 * var(--u))) solid var(--rule-chip); border-radius: var(--r-pill); }
.rule-input-pill { border: var(--rule-w-strong) solid var(--rule-input-pill); border-radius: var(--r-pill); }
.rule-input-pill > input, .rule-address-input > input { background: transparent; min-width: 0; flex: 1; }
.rule-input-pill, .rule-address-input { display: flex; align-items: center; gap: calc(8 * var(--u)); padding: calc(8 * var(--u)) calc(16 * var(--u)); }
.rule-feebar-row { border: var(--rule-w-thin) solid var(--rule-feebar); border-radius: calc(12 * var(--u)); }
.rule-feebar-row + .rule-feebar-row { border-top: 0; border-top-left-radius: 0; border-top-right-radius: 0; }
.rule-feebar-row:has(+ .rule-feebar-row) { border-bottom-left-radius: 0; border-bottom-right-radius: 0; }
.rule-lock-divider { border-bottom: var(--rule-w-thin) solid var(--rule-lock-divider); }
.rule-principle-row { border-bottom: var(--rule-w-thin) solid var(--rule-principle); }
.rule-principle-row:last-child { border-bottom: 0; }
.rule-final-row { border: var(--rule-w-final) solid var(--rule-final); border-radius: calc(22 * var(--u)); }
.rule-call-log { border: var(--rule-w-thin) dashed var(--cream); border-radius: calc(12 * var(--u)); }
.rule-seg { border: var(--rule-w-std) solid var(--rule-howto); border-radius: var(--r-seg); }
.rule-btn-outline { border: var(--rule-w-thin) solid #B8A53A; }

/* ---------- 9. MOTION (DESIGN.md §10 — "the road moves on": signs plant, numerals flip, paint lines draw) ---------- */
/* reveal: a block plants like a road sign — rises from below with a short scale-y from its foot; ends by itself (2 s timer in app.js) */
[data-reveal] { transform-origin: 50% 100%; }
html.js [data-reveal]:not(.is-in) { opacity: 0; transform: translateY(calc(28 * var(--u))) scaleY(.94); }
html.js [data-reveal].is-in { opacity: 1; transform: none; transition: opacity var(--d-flip) var(--ease-road), transform var(--d-flip) var(--ease-plant); transition-delay: var(--rd, 0ms); }
/* grow-in: step blocks / bars grow up from the road surface */
[data-grow] { transform-origin: 50% 100%; }
html.js [data-grow]:not(.is-in) { transform: scaleY(.04); }
html.js [data-grow].is-in { transform: none; transition: transform var(--d-fill) var(--ease-plant); transition-delay: var(--rd, 0ms); }
/* paint line draw (SVG path with pathLength="1") */
html.js [data-draw] { stroke-dasharray: 1; stroke-dashoffset: 1; }
html.js [data-draw].is-in { stroke-dashoffset: 0; transition: stroke-dashoffset 900ms var(--ease-road); transition-delay: var(--rd, 0ms); }
/* split-flap sign numerals */
.flap { display: inline-block; perspective: 400px; }
.flap.is-flipping { animation: flap var(--d-flip) var(--ease-road); transform-origin: 50% 55%; }
@keyframes flap { 0% { transform: rotateX(0); } 45% { transform: rotateX(-88deg); } 55% { transform: rotateX(88deg); } 100% { transform: rotateX(0); } }
/* live tick: a fresh painted stripe sweeps across the updated value */
.tick { position: relative; }
.tick.is-ticking::after { content: ""; position: absolute; inset: -2px -4px; pointer-events: none; border-radius: 4px; background: linear-gradient(115deg, transparent 0 35%, rgba(255, 242, 74, .75) 35% 55%, transparent 55%); background-size: 260% 100%; animation: tick-sweep 700ms var(--ease-road) forwards; }
@keyframes tick-sweep { from { background-position: 100% 0; } to { background-position: 0 0; opacity: 0; } }
/* next step cone pulse (once) */
.pulse-once { animation: cone-pulse 900ms var(--ease-road) 1; }
@keyframes cone-pulse { 0% { transform: scale(1); } 35% { transform: scale(1.08); } 100% { transform: scale(1); } }
/* bolt tighten (lock) */
.bolt { transition: transform 400ms var(--ease-plant); }
.bolt.is-tight { transform: rotate(90deg); }
/* hover: lift 2 units like a sign stepping forward */
.lift { transition: transform var(--d-fast) var(--ease-road), box-shadow var(--d-fast) var(--ease-road); }
.lift:hover { transform: translateY(calc(-2 * var(--u))); }
/* loop video art */
.loop-video { width: 100%; height: 100%; object-fit: cover; }

/* art parallax — decoration only, scroll-driven, never hides content (LUAT 67) */
@supports ((animation-timeline: view()) and (animation-range: entry)) {
  @media (prefers-reduced-motion: no-preference) {
    .art-drift { animation: art-drift linear both; animation-timeline: view(); animation-range: cover; }
    @keyframes art-drift { from { translate: 0 calc(-30 * var(--u)); } to { translate: 0 calc(30 * var(--u)); } }
  }
}

/* route change (kit router v3 View Transition) — tuned only */
::view-transition-old(root), ::view-transition-new(root) { animation-timing-function: var(--ease-road); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; animation-iteration-count: 1 !important; transition-duration: 1ms !important; scroll-behavior: auto !important; }
  html.js [data-reveal]:not(.is-in), html.js [data-grow]:not(.is-in) { opacity: 1; transform: none; }
  html.js [data-draw] { stroke-dashoffset: 0; }
}

/* ---------- 10. responsive ---------- */
@media (max-width: 1279.98px) and (min-width: 1024px) {
  .brand { min-width: 0; }
}
@media (max-width: 1023.98px) {
  .site-nav { padding: 8px 10px; }
  .site-nav .bar { height: 52px; border-radius: 14px; padding: 0 10px 0 12px; position: relative; justify-content: space-between; }
  .brand { min-width: 0; gap: 8px; }
  .brand-mark { width: 38px; height: 38px; }
  .brand-word { font-size: 20px; }
  .menu-btn { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px; border-radius: 12px; background: var(--asphalt); color: var(--cream); font: 700 14px/1 var(--f-body); }
  .menu-lines, .menu-lines::before, .menu-lines::after { display: block; width: 16px; height: 2px; background: currentColor; border-radius: 2px; position: relative; transition: transform var(--d-step) var(--ease-road); }
  .menu-lines::before, .menu-lines::after { content: ""; position: absolute; left: 0; }
  .menu-lines::before { top: -5px; } .menu-lines::after { top: 5px; }
  .menu-btn[aria-expanded="true"] .menu-lines { background: transparent; }
  .menu-btn[aria-expanded="true"] .menu-lines::before { transform: translateY(5px) rotate(45deg); }
  .menu-btn[aria-expanded="true"] .menu-lines::after { transform: translateY(-5px) rotate(-45deg); }
  .nav-panel { position: absolute; left: 0; right: 0; top: calc(100% + 8px); flex-direction: column; align-items: stretch; gap: 12px; padding: 14px; border-radius: 16px; background: var(--surface); box-shadow: var(--sh-card); }
  .nav-panel:not(.is-open) { display: none; }
  .routes { flex-direction: column; align-items: stretch; gap: 4px; }
  .routes a, .social { font-size: 18px; padding: 12px 14px; }
  .socials { gap: 8px; }
  .socials .social { flex: 1; text-align: center; background: rgba(44, 47, 54, .08); }
  .site-foot { padding: 28px 18px 22px; }
  .foot-top { flex-direction: column; align-items: flex-start; gap: 20px; }
  .foot-btns { justify-content: flex-start; gap: 12px; }
  .foot-btn { min-height: 44px; padding: 10px 22px; font-size: 15px; border-radius: 12px; }
  .foot-ca { align-items: flex-start; }
  .foot-ca-btn { max-width: 70vw; }
  .foot-meta { flex-direction: column; gap: 6px; }
}
@media (max-width: 520px) {
  .foot-btns { display: grid; grid-template-columns: 1fr 1fr; width: 100%; }
  .foot-ca, .foot-buy { grid-column: 1 / -1; }
  .foot-ca-btn { width: 100%; max-width: none; }
  .foot-btn { width: 100%; }
  .foot-ca-label { white-space: normal; }
}
