/* FURROW — shell stylesheet. Build width 1920 (LUAT 50): 1 design px = 1 --u. Tokens from mockup/v2/DESIGN.md §0–§5, motion §10.
   BORDERS (LUAT 56): every border/outline of the site lives in THIS file, one class per component of DESIGN.md §4b.
   Route fragments use the .rule-* classes and contain zero border/outline declarations. */

/* ---------- 0. tokens ---------- */
:root {
  --u: calc(100vw / 1920);
  /* colours §3 */
  --paper: #F7EDDC;
  --atm-wine: #96382F;
  --atm-wine-2: #6E1938;
  --atm-plum: #74273B;
  --atm-plum-dark: #4A2A3A;
  --atm-dawn: #F4B860;
  --atm-peach: #E6CBB2;
  --surface: #F6EBDC;
  --surface-high: #F3F0DF;
  --surface-container: #E8E9BF;
  --surface-pill: #E1E8B0;
  --primary: #1012D1;
  --primary-hover: #0B0DA6;
  --on-primary: #FFFFFF;
  --primary-container: #3D623C;
  --on-primary-container: #F3F7E4;
  --sprout: #9BC53D;
  --ribbon: #61883B;
  --chain: #97FCE4;
  --ink: #102A56;
  --ink-wine: #5E2D2D;
  --ink-title: #7A1F2B;
  --on-ground: #FFF5E5;
  --negative: #A3323A;
  --risk-high-bg: #F3C9C4;
  --outline-ground: #B56A5A;
  --outline-tile: #F3C5A2;
  --outline-surface: #DFCDB5;
  --footer: #301E35;
  --footer-ink: #F7EDDC;
  --footer-muted: #E7D8C2;
  --footer-eyebrow: #B9D0EC;
  --footer-name: #C5DB9D;
  --footer-pill: #DFE89D;
  --footer-pill-ink: #1E4431;
  --nav-active: #D9E89A;
  --nav-link: #123C8C;

  /* rule tokens (BORDER_TABLE → DESIGN.md §4b; width @1920, hairlines never below 1px) */
  --rule-hair: max(1px, calc(1 * var(--u)));
  --rule-2: max(1px, calc(2 * var(--u)));
  --rule-3: max(1.5px, calc(3 * var(--u)));
  --rule-nav: var(--rule-hair) solid #2443E6;
  --rule-capsule: var(--rule-hair) solid #153B9C;
  --rule-social: var(--rule-hair) solid #F7EDDC;
  --rule-icon-tile: var(--rule-2) solid var(--outline-tile);
  --rule-brand-tile: var(--rule-2) solid #E1C7B3;
  --rule-card-divider: var(--rule-hair) solid #DAC3AE;
  --rule-card-divider-strong: var(--rule-2) solid #DAC3AE;
  --rule-card-rim: var(--rule-hair) solid rgba(255, 255, 255, .6);
  --rule-row: var(--rule-hair) solid var(--outline-surface);
  --rule-row-total: var(--rule-2) solid #797384;
  --rule-ledger: var(--rule-2) solid #7A7686;
  --rule-lend-row: var(--rule-hair) solid #C3967D;
  --rule-diagram-panel: var(--rule-2) solid rgba(252, 248, 247, .7);
  --rule-lane: var(--rule-2) solid #E0E2FC;
  --rule-gate: var(--rule-3) solid #BBC7DB;
  --rule-pool-tile: var(--rule-2) solid #DED9AF;
  --rule-input: var(--rule-2) solid #A3A67C;
  --rule-input-empty: var(--rule-2) solid #9C9B96;
  --rule-segmented: var(--rule-2) solid #DAC3AF;
  --rule-connector: var(--rule-2) dashed var(--outline-ground);
  --rule-footer-row: var(--rule-hair) solid #5C4258;
  --rule-footer-divider: var(--rule-hair) solid rgba(158, 188, 224, .55);
  --rule-footer-top: var(--rule-hair) solid #9EBCE0;
  --rule-card-edge: var(--rule-hair) solid #FFFCF4;
  --rule-card-contact: max(1px, calc(1 * var(--u))) solid rgba(60, 8, 30, .45);
  --rule-focus: max(2px, calc(2 * var(--u))) solid var(--primary);

  /* type §2 */
  --f-display: "Castoro", Georgia, "Times New Roman", serif;
  --f-body: "Thasadith", "Segoe UI", system-ui, sans-serif;
  --f-num: "Newsreader", Georgia, serif;
  --f-label: "Montserrat", "Segoe UI", system-ui, sans-serif;
  --fs-hero: calc(51 * var(--u));
  --fs-title: calc(55 * var(--u));
  --fs-section: calc(37 * var(--u));
  --fs-section-sm: calc(30 * var(--u));
  --fs-value: calc(33 * var(--u));
  --fs-table: max(12px, calc(17 * var(--u)));
  --fs-body: max(12px, calc(17 * var(--u)));
  --fs-small: max(12px, calc(15 * var(--u)));
  --fs-label: max(11px, calc(12 * var(--u)));
  --fs-chip: max(12px, calc(17 * var(--u)));

  /* frame (frame.json) */
  --gutter-l: calc(20 * var(--u));
  --gutter-r: calc(26 * var(--u));
  --nav-h: calc(97 * var(--u));
  --gap: calc(12 * var(--u));
  --section-gap: calc(64 * var(--u));

  /* materials §4 */
  --r-card: calc(32 * var(--u));
  --r-row-card: calc(28 * var(--u));
  --r-tile: calc(14 * var(--u));
  --r-input: calc(16 * var(--u));
  --r-pill: 999px;
  --shadow-1: 0 calc(8 * var(--u)) calc(24 * var(--u)) rgba(74, 42, 58, .18);
  --shadow-2: 0 calc(14 * var(--u)) calc(36 * var(--u)) rgba(74, 42, 58, .26);

  /* motion §10 */
  --ease-furrow: cubic-bezier(.22, .8, .24, 1);
  --ease-sprout: var(--ease-spring, cubic-bezier(.34, 1.56, .64, 1));
  --t-quick: 220ms;
  --t-draw: 400ms;
  --t-count: 700ms;
  --rt-dur: 220ms;
  --rt-nudge: calc(24 * var(--u));

  accent-color: var(--primary);
  scrollbar-color: var(--atm-plum) var(--paper);
}
html[data-rt-dir=back] { --rt-nudge: calc(-24 * var(--u)); }

/* ---------- 1. base ---------- */
*, *::before, *::after { box-sizing: border-box; }
:where(button, input, select, textarea) { border: 0; font: inherit; color: inherit; background: none; }
:where(button) { cursor: pointer; padding: 0; }
:where(a) { color: inherit; }
:where(h1, h2, h3, h4, p, ul, ol, figure, table) { margin: 0; }
:where(ul, ol) { padding: 0; list-style: none; }
:where(img, svg, video) { display: block; max-width: 100%; }
:focus-visible { outline: var(--rule-focus); outline-offset: max(2px, calc(3 * var(--u))); }
::selection { background: var(--sprout); color: var(--ink); }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--f-body);
  font-size: var(--fs-body);
  line-height: 1.45;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
}
.num, [data-num] { font-family: var(--f-num); font-variant-numeric: tabular-nums lining-nums; }
.label { font-family: var(--f-label); font-weight: 500; font-size: var(--fs-label); letter-spacing: .163em; text-transform: uppercase; }
.skip { position: absolute; left: -9999px; top: 0; z-index: 50; padding: 8px 14px; background: var(--paper); color: var(--ink); }
.skip:focus { left: 8px; top: 8px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- 2. page ground + atmosphere (DESIGN.md §3b — one for every route) ---------- */
.page {
  position: relative;
  min-height: 100vh;
  isolation: isolate;
  background-color: var(--paper);
  /* dawn wash plates (home ground tones, no art/text) per 1080 screen band, then the dawn glow + peach fade */
  background-image:
    radial-gradient(70% 46% at 12% 98%, rgba(244, 184, 96, .30), rgba(244, 184, 96, 0) 70%),
    url("assets/ground_s1.webp"),
    url("assets/ground_s2.webp"),
    linear-gradient(180deg, rgba(185, 128, 116, .0) 0, var(--paper) 100%);
  background-size: 100% calc(1080 * var(--u)), 100% calc(1080 * var(--u)), 100% calc(1080 * var(--u)), 100% 100%;
  background-position: 0 calc(1080 * var(--u)), 0 0, 0 calc(1080 * var(--u)), 0 0;
  background-repeat: no-repeat, no-repeat, repeat-y, no-repeat;
}
/* faint field grain over the wash, under the content */
.page::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; opacity: .35;
  background-image: radial-gradient(rgba(74, 42, 58, .10) 0.6px, transparent 0.8px);
  background-size: calc(5 * var(--u)) calc(5 * var(--u));
}
/* dot grid behind diagram areas (decoration; routes add .atm-dots to a diagram box) */
.atm-dots {
  background-image: radial-gradient(rgba(244, 184, 96, .22) calc(1.2 * var(--u)), transparent calc(1.4 * var(--u)));
  background-size: calc(14 * var(--u)) calc(14 * var(--u));
}
/* sweeping contour lines (home, harvest diagrams) */
.atm-contours {
  background-image: repeating-radial-gradient(120% 90% at 100% -10%, transparent 0 calc(38 * var(--u)), rgba(244, 184, 96, .18) calc(38 * var(--u)) calc(39 * var(--u)));
}

/* ONE PAGE FRAME (frame.json): gutters 20 / 26 @1920, container 1873, no sidebar. Routes never set their own max-width/padding/ground. */
.frame {
  display: block;
  min-height: calc(100vh - var(--nav-h));
  padding: 0 var(--gutter-r) var(--section-gap) var(--gutter-l);
  outline: none;
}
.frame > * + * { margin-top: var(--section-gap); }
.frame > :first-child { margin-top: calc(26 * var(--u)); }

/* ---------- 3. RULE CLASSES (one per framed component, DESIGN.md §4b) ---------- */
.rule-nav { border-bottom: var(--rule-nav); }
.rule-capsule { border: var(--rule-capsule); border-radius: var(--r-pill); }
.rule-social { border: var(--rule-social); border-radius: 50%; }
.rule-nav-tag { border-left: var(--rule-hair) solid #F7EDDC; }
.rule-icon-tile { border: var(--rule-icon-tile); border-radius: calc(12 * var(--u)); }
.rule-brand-tile { border: var(--rule-brand-tile); border-radius: var(--r-tile); }
.rule-card-divider { border-bottom: var(--rule-card-divider); }
.rule-card-divider-strong { border-bottom: var(--rule-card-divider-strong); }
.rule-divider-v { border-left: var(--rule-card-divider); }
.rule-card-rim { border-top: var(--rule-card-rim); }
.rule-row { border-bottom: var(--rule-row); }
.rule-row-top { border-top: var(--rule-row); }
/* tables drawn with border-collapse: separate ignore <tr> borders — draw the row rule on the cells */
tr.rule-row > td, tr.rule-row > th { border-bottom: var(--rule-row); }
tr.rule-row-top > td, tr.rule-row-top > th { border-top: var(--rule-row); }
.rule-row-total { border-top: var(--rule-row-total); }
.rule-ledger-frame { border: var(--rule-ledger); border-radius: var(--r-row-card); }
.rule-lend-row { border: var(--rule-lend-row); border-radius: calc(24 * var(--u)); }
.rule-diagram-panel { border: var(--rule-diagram-panel); border-radius: calc(24 * var(--u)); }
.rule-lane { border: var(--rule-lane); border-radius: calc(20 * var(--u)); }
.rule-gate { border: var(--rule-gate); border-radius: var(--r-tile); }
.rule-pool-tile { border: var(--rule-pool-tile); border-radius: var(--r-tile); }
.rule-segmented { border: var(--rule-segmented); border-radius: var(--r-pill); }
.rule-connector { border: var(--rule-connector); }
.rule-connector-t { border-top: var(--rule-connector); }
.rule-connector-l { border-left: var(--rule-connector); }
/* an input frame wraps the WHOLE control: put .rule-input on the wrapper (label + input + button live inside, padding inside) */
.rule-input { border: var(--rule-input); border-radius: var(--r-input); display: flex; align-items: center; gap: calc(10 * var(--u)); padding: 0 calc(16 * var(--u)); min-height: calc(66 * var(--u)); background: rgba(255, 255, 255, .55); }
.rule-input.is-empty, .rule-input:has(input:placeholder-shown) { border-color: #9C9B96; }
.rule-input:focus-within { border-color: var(--primary); }
.rule-input > input { flex: 1; min-width: 0; height: 100%; outline: none; background: transparent; font-size: var(--fs-body); color: var(--ink); }
/* cream/sprout card edge (mockup: dark contact line outside + bright rim inside, every side) */
.rule-card-edge { border: var(--rule-card-edge); outline: var(--rule-card-contact); outline-offset: 0; }
.rule-footer-row { border-bottom: var(--rule-footer-row); }
.rule-footer-divider { border-right: var(--rule-footer-divider); }
.rule-footer-top { border-top: var(--rule-footer-top); }
/* tables: the last row never doubles the edge of its card */
.rule-row:last-child { border-bottom: 0; }

/* ---------- 4. shared components (DESIGN.md §5) ---------- */
.card { background: var(--surface); border-radius: var(--r-card); box-shadow: var(--shadow-1); }
.card--sprout { background: var(--surface-container); border-radius: var(--r-row-card); }
.card--high { background: var(--surface-high); }
.eyebrow { display: flex; align-items: center; gap: calc(14 * var(--u)); font-family: var(--f-body); font-size: max(12px, calc(18 * var(--u))); color: var(--on-ground); }
.eyebrow::after { content: ""; width: calc(78 * var(--u)); height: calc(8 * var(--u)); min-height: 6px; background: linear-gradient(currentColor, currentColor) left center / calc(100% - 4px) max(1px, calc(1.5 * var(--u))) no-repeat, radial-gradient(circle at calc(100% - 4px) 50%, currentColor 3px, transparent 3.5px); opacity: .85; }
.title-hero { font-family: var(--f-display); font-size: var(--fs-hero); line-height: 1.08; letter-spacing: .02em; font-weight: 400; color: var(--on-ground); }
.title-route { font-family: var(--f-display); font-size: var(--fs-title); line-height: 1.05; font-weight: 400; color: var(--on-ground); }
.title-section { font-family: var(--f-display); font-size: var(--fs-section); line-height: 1.1; font-weight: 400; color: var(--ink-title); }
.on-card { color: var(--ink-title); }
.lede { font-size: var(--fs-body); color: var(--on-ground); text-wrap: pretty; }
.value { font-family: var(--f-num); font-size: var(--fs-value); line-height: 1; letter-spacing: -.02em; color: var(--ink-wine); font-variant-numeric: tabular-nums lining-nums; }
.neg { color: var(--negative); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: calc(12 * var(--u)); min-height: calc(60 * var(--u)); padding: 0 calc(30 * var(--u)); border-radius: var(--r-pill); font-family: var(--f-body); font-weight: 700; font-size: max(13px, calc(20 * var(--u))); letter-spacing: .02em; text-decoration: none; transition: background-color var(--t-quick) var(--ease-furrow), transform var(--t-quick) var(--ease-furrow); }
.btn--primary { background: var(--primary); color: var(--on-primary); }
.btn--primary:hover { background: var(--primary-hover); }
.btn--chain { background: var(--chain); color: var(--ink); }
.btn--ghost { background: rgba(255, 255, 255, .5); color: var(--ink); }
.btn .arrow { width: calc(20 * var(--u)); height: calc(20 * var(--u)); min-width: 12px; min-height: 12px; transition: transform var(--t-quick) var(--ease-furrow); }
.btn:hover .arrow { transform: translateX(calc(4 * var(--u))); }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .55; cursor: not-allowed; }
/* launched BUY (launch.js sets data-launch-done): full primary, never looks disabled */
[data-launch="buy"][data-launch-done] { opacity: 1; cursor: pointer; background: var(--primary); color: var(--on-primary); }

.chip { display: inline-flex; align-items: center; gap: calc(10 * var(--u)); min-height: calc(46 * var(--u)); padding: 0 calc(20 * var(--u)); border-radius: var(--r-pill); background: var(--surface-container); color: var(--ink-wine); font-size: var(--fs-chip); }
.chip--high { background: var(--risk-high-bg); color: var(--negative); }

/* segmented control: wrapper .seg.rule-segmented, options button[aria-pressed] */
.seg { display: inline-grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: calc(4 * var(--u)); padding: calc(4 * var(--u)); background: rgba(255, 255, 255, .35); }
.seg > button { min-height: calc(46 * var(--u)); padding: 0 calc(18 * var(--u)); border-radius: var(--r-pill); font-size: var(--fs-chip); color: var(--ink-wine); transition: background-color var(--t-quick) var(--ease-furrow), color var(--t-quick) var(--ease-furrow); }
.seg > button:hover { background: var(--surface-container); }
.seg > button[aria-pressed="true"] { background: var(--primary); color: var(--on-primary); }
.seg--preset > button[aria-pressed="true"] { background: var(--primary-container); color: var(--on-primary-container); }

/* data table */
.table { width: 100%; border-collapse: collapse; font-size: var(--fs-table); }
.table th { font-family: var(--f-label); font-weight: 700; font-size: var(--fs-label); letter-spacing: .12em; text-transform: uppercase; text-align: left; color: var(--ink); background: var(--surface-container); padding: calc(14 * var(--u)) calc(18 * var(--u)); }
.table td { padding: calc(20 * var(--u)) calc(18 * var(--u)); color: var(--ink); }
.table tr[aria-selected="true"] td { background: var(--surface-container); }
.table tr[aria-selected="true"] td:first-child { box-shadow: inset calc(4 * var(--u)) 0 0 var(--primary); }
.table .n { font-family: var(--f-num); font-variant-numeric: tabular-nums lining-nums; }
.table-wrap { overflow-x: auto; }

.info { display: flex; align-items: flex-start; gap: calc(12 * var(--u)); font-size: var(--fs-body); color: var(--ink-wine); }
.info svg { flex: none; width: calc(22 * var(--u)); height: calc(22 * var(--u)); min-width: 14px; min-height: 14px; color: var(--negative); }
.readat { display: inline-flex; align-items: center; gap: calc(8 * var(--u)); font-size: var(--fs-small); color: var(--ink-wine); }

/* art cutouts placed straight on the page (never in a box) */
.art { display: block; width: 100%; height: auto; pointer-events: none; user-select: none; }

/* ---------- 5. NAV (chrome/nav.html, scaled) ---------- */
.nav {
  position: relative; z-index: 10;
  height: var(--nav-h);
  padding: 0 calc(34 * var(--u));
  display: grid; grid-template-columns: calc(510 * var(--u)) 1fr calc(510 * var(--u)); align-items: center;
  color: #FFF8E8;
  background: linear-gradient(105deg, #96382F, #6D1839);
  font-family: var(--f-body);
}
.nav__brand { display: flex; align-items: center; gap: calc(18 * var(--u)); text-decoration: none; color: inherit; min-width: 0; }
.nav__mark { height: calc(48 * var(--u)); min-height: 40px; width: auto; aspect-ratio: 2048 / 1477; object-fit: contain; }
.nav__word { font-family: var(--f-display); font-size: calc(34 * var(--u)); letter-spacing: .04em; line-height: 1; }
.nav__tag { padding-left: calc(18 * var(--u)); font-family: var(--f-label); font-weight: 500; font-size: var(--fs-label); letter-spacing: .2em; color: #EAD4C6; white-space: nowrap; }
.nav__routes { position: relative; justify-self: center; display: flex; align-items: center; padding: calc(5 * var(--u)); background: var(--paper); }
.nav__routes a { position: relative; z-index: 1; min-width: calc(98 * var(--u)); padding: calc(10 * var(--u)) calc(16 * var(--u)); border-radius: calc(22 * var(--u)); color: var(--nav-link); text-align: center; text-decoration: none; font-family: var(--f-label); font-weight: 700; font-size: max(12px, calc(13 * var(--u))); letter-spacing: .11em; white-space: nowrap; transition: color var(--t-quick) var(--ease-furrow); }
.nav__routes a:hover { color: var(--primary); }
/* active state: the router sets .is-active + aria-current; the sliding pill (app.js) is the visual, CSS fallback below */
.nav__routes a.is-active { background: var(--nav-active); }
.nav__routes.has-pill a.is-active { background: transparent; }
.nav__pill { position: absolute; z-index: 0; top: calc(5 * var(--u)); bottom: calc(5 * var(--u)); left: 0; width: 0; border-radius: calc(22 * var(--u)); background: var(--nav-active); opacity: 0; transition: transform 320ms var(--ease-sprout), width 320ms var(--ease-furrow), opacity 160ms linear; }
.nav__routes.has-pill .nav__pill { opacity: 1; }
.nav__right { justify-self: end; display: flex; align-items: center; gap: calc(10 * var(--u)); }
.nav__social { width: calc(34 * var(--u)); height: calc(34 * var(--u)); min-width: 28px; min-height: 28px; display: grid; place-items: center; color: #FFF8E8; text-decoration: none; transition: background-color var(--t-quick) var(--ease-furrow); }
.nav__social svg { width: 52%; height: 52%; }
.nav__social:hover { background: rgba(247, 237, 220, .16); }
.nav__social.is-soon { opacity: .75; cursor: default; }
.nav__wallet { margin-left: calc(8 * var(--u)); display: inline-flex; align-items: center; gap: calc(8 * var(--u)); padding: calc(11 * var(--u)) calc(18 * var(--u)); border-radius: calc(24 * var(--u)); background: var(--paper); color: var(--nav-link); font-family: var(--f-label); font-weight: 700; font-size: max(12px, calc(14 * var(--u))); white-space: nowrap; transition: background-color var(--t-quick) var(--ease-furrow); }
.nav__wallet:hover { background: var(--nav-active); }
.nav__wallet-ico { display: none; width: 18px; height: 18px; }
.nav__wallet[data-connected] { background: var(--nav-active); }

/* ---------- 6. FOOTER (chrome/footer.html F5, scaled; mark added per DESIGN.md §9 #3) ---------- */
.foot {
  min-height: calc(278 * var(--u));
  padding: calc(24 * var(--u)) calc(38 * var(--u)) calc(18 * var(--u));
  background: var(--footer); color: var(--footer-ink);
  font-family: var(--f-body);
  display: grid; grid-template-columns: calc(370 * var(--u)) 1fr; gap: calc(34 * var(--u));
}
.foot__intro { padding-right: calc(28 * var(--u)); }
.foot__mark { height: calc(40 * var(--u)); min-height: 36px; width: auto; aspect-ratio: 2048 / 1477; margin-bottom: calc(12 * var(--u)); }
.foot__eyebrow { font-family: var(--f-label); font-weight: 500; font-size: max(11px, calc(11 * var(--u))); letter-spacing: .22em; color: var(--footer-eyebrow); }
.foot__title { font-family: var(--f-display); font-weight: 400; font-size: calc(28 * var(--u)); line-height: 1.15; margin: calc(8 * var(--u)) 0 calc(10 * var(--u)); }
.foot__lede { font-size: max(12px, calc(14 * var(--u))); line-height: 1.35; color: var(--footer-muted); }
.foot__ledger { display: grid; grid-template-rows: repeat(4, minmax(calc(42 * var(--u)), 1fr)) calc(44 * var(--u)); row-gap: 0; }
.foot__row { display: grid; grid-template-columns: calc(260 * var(--u)) 1fr; align-items: center; font-size: max(12px, calc(14 * var(--u))); }
.foot__row b { font-family: var(--f-label); font-weight: 700; font-size: max(12px, calc(13 * var(--u))); color: var(--footer-name); }
.foot__boundary { align-self: end; margin-top: calc(10 * var(--u)); padding: calc(11 * var(--u)) calc(16 * var(--u)); border-radius: calc(18 * var(--u)); background: var(--footer-pill); color: var(--footer-pill-ink); font-family: var(--f-display); font-size: max(12px, calc(15 * var(--u))); text-align: center; }

/* ---------- 7. MOTION (DESIGN.md §10) — transform/opacity only, all off under reduced motion ---------- */
/* signature 1 — FURROW DRAW: a path or bar is cut into the soil from its start, like a blade pulled through the field */
[data-draw] { stroke-dasharray: var(--len, 1000); stroke-dashoffset: 0; }
.is-drawing [data-draw], [data-draw].is-drawing { animation: furrow-draw var(--t-draw) var(--ease-furrow) both; }
@keyframes furrow-draw { from { stroke-dashoffset: var(--len, 1000); } to { stroke-dashoffset: 0; } }
[data-grow] { transform-origin: left center; }
[data-grow].is-growing { animation: furrow-grow 600ms var(--ease-furrow) both; }
@keyframes furrow-grow { from { transform: scaleX(0); } to { transform: scaleX(1); } }
/* signature 2 — SPROUT RISE: values and cards push up through the soil line with a small spring */
[data-sprout] { transform-origin: 50% 100%; }
[data-sprout].is-sprouting { animation: sprout-rise 520ms var(--ease-sprout) both; }
@keyframes sprout-rise { from { transform: translateY(calc(10 * var(--u))) scaleY(.92); opacity: .001; } to { transform: none; opacity: 1; } }
/* reveal — the PLOUGH PASS: a section's rows turn over left → right as the blade passes (content reveal = IO + 2 s timer) */
[data-reveal] > * { transition: transform 420ms var(--ease-furrow), opacity 420ms var(--ease-furrow); transition-delay: calc(var(--i, 0) * 40ms); }
[data-reveal]:not(.is-in) > * { transform: translateX(calc(-14 * var(--u))); opacity: 0; }
/* live tick — a sprout-green furrow line runs under a value when a live read replaces the snapshot */
.tick { position: relative; }
.tick::after { content: ""; position: absolute; left: 0; right: 0; bottom: -.12em; height: max(1px, calc(2 * var(--u))); background: var(--sprout); transform-origin: left; transform: scaleX(0); opacity: 0; }
.tick.is-ticked::after { animation: tick-line 1.1s var(--ease-furrow) both; }
@keyframes tick-line { 0% { transform: scaleX(0); opacity: 1; } 55% { transform: scaleX(1); opacity: 1; } 100% { transform: scaleX(1); opacity: 0; } }
/* dashed connectors flow like water along a furrow (decoration only) */
.flow-dash { stroke-dasharray: 6 6; animation: flow-dash 6s linear infinite; }
@keyframes flow-dash { to { stroke-dashoffset: -96; } }
/* hover — cards lift off the soil */
.lift { transition: transform var(--t-quick) var(--ease-furrow), box-shadow var(--t-quick) var(--ease-furrow); }
.lift:hover, .lift[data-open] { transform: translateY(calc(-4 * var(--u))); box-shadow: var(--shadow-2); }
/* art parallax (scroll-driven, art only) */
@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: entry 0% exit 100%; }
    @keyframes art-drift { from { transform: translateY(calc(18 * var(--u))); } to { transform: translateY(calc(-18 * var(--u))); } }
  }
}
/* route change (router v3 view transition): tune only */
::view-transition-old(root), ::view-transition-new(root) { animation-timing-function: var(--ease-furrow); }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; animation-iteration-count: 1 !important; transition-duration: 1ms !important; }
  [data-reveal]:not(.is-in) > * { transform: none; opacity: 1; }
  .flow-dash { animation: none; }
}

/* ---------- 8. responsive ---------- */
@media (min-width: 2561px) { :root { --u: calc(2560px / 1920); } }
@media (max-width: 1279px) and (min-width: 1024px) {
  .nav { grid-template-columns: auto 1fr auto; gap: 12px; }
  .nav__tag { display: none; }
}
@media (max-width: 1023px) {
  :root { --u: 0.72px; --gutter-l: 14px; --gutter-r: 14px; --section-gap: 40px; }
  .nav { height: auto; padding: 10px 14px; grid-template-columns: 1fr auto; grid-template-areas: "brand right" "routes routes"; row-gap: 10px; }
  .nav__brand { grid-area: brand; gap: 10px; }
  .nav__word { font-size: 24px; }
  .nav__tag { display: none; }
  .nav__right { grid-area: right; gap: 8px; }
  .nav__routes { grid-area: routes; justify-self: stretch; overflow-x: auto; scrollbar-width: none; scroll-snap-type: x proximity; padding: 4px; }
  .nav__routes::-webkit-scrollbar { display: none; }
  .nav__routes a { flex: 0 0 auto; min-width: 0; padding: 9px 14px; scroll-snap-align: center; }
  .nav__social { width: 36px; height: 36px; }
  .nav__wallet { margin-left: 0; width: 36px; height: 36px; padding: 0; justify-content: center; border-radius: 50%; }
  .nav__wallet [data-wallet-label] { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .nav__wallet-ico { display: block; }
  .page { background-size: 100% 760px, 100% 760px, 100% 760px, 100% 100%; background-position: 0 760px, 0 0, 0 760px, 0 0; }
  .frame { min-height: 60vh; }
  .foot { grid-template-columns: 1fr; padding: 24px 16px; gap: 18px; }
  .foot__intro { padding-right: 0; padding-bottom: 16px; }
  .rule-footer-divider { border-right: 0; border-bottom: var(--rule-footer-divider); }
  .foot__title { font-size: 22px; }
  .foot__row { grid-template-columns: 1fr; padding: 8px 0; gap: 2px; }
  .foot__ledger { grid-template-rows: none; }
  .title-hero { font-size: 36px; }
  .title-route { font-size: 32px; }
  .title-section { font-size: 24px; }
  .value { font-size: 24px; }
  .btn { min-height: 48px; font-size: 15px; padding: 0 20px; }
}

/* route heading block (shared look; routes reuse it) */
.route-head { display: grid; gap: calc(18 * var(--u)); padding-top: calc(10 * var(--u)); }
.route-head .lede { max-width: none; }
