/* Kalos Strategy — "the evening star over Elysium" (brand v6 on the v4 "Aegean dusk" palette).
   Editorial and crisp, native to Elysium: Montra's data panels and serif headlines, Kalos' marketplace
   cards, Elysium's sea and seigaiha lines, and an original oil painting for the hero.
   Type: Instrument Serif (display), DM Sans (UI), JetBrains Mono (numbers, addresses, tags).
   One spacing system (tokens below); mobile-first; nothing may scroll sideways from 360 px up. */

/* ------------------------------------------------------------------ fonts (self-hosted, OFL) */
@font-face {
  font-family: "Instrument Serif";
  src: url("assets/fonts/instrument-serif-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Instrument Serif";
  src: url("assets/fonts/instrument-serif-latin-400-italic.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "DM Sans";
  src: url("assets/fonts/dm-sans-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 1000;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("assets/fonts/jetbrains-mono-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 800;
  font-style: normal;
  font-display: swap;
}

/* ------------------------------------------------------------------ tokens */
:root {
  /* v4 "Aegean dusk": every colour is sampled from the hero painting; no neutral black or grey. */
  --sea-950: #0B1F26;   /* page */
  --sea-900: #0E252D;   /* alternate sections */
  --sea-850: #10292F;   /* cards and panels */
  --sea-800: #15333A;   /* raised and hover */
  --abyss: #07161B;     /* the deepest sea, behind NFT artwork */
  --line: #23454C;
  --line-2: #2B5159;
  --line-soft: rgba(244, 227, 191, 0.12);
  --cream: #F4E3BF;     /* headlines */
  --text: #D9CDB3;      /* body: 10.8:1 on sea-950 */
  --muted: #93A8A6;     /* labels and secondary text: 6.8:1 on sea-950, 6.1:1 on sea-850 */
  --aegean: #3F8FA6;    /* links, info: borders, icons and fills */
  --aegean-light: #8CC5D1; /* the same blue as text: 8:1 on sea-850 */
  --gold: #EBC283;
  --gold-hi: #F7DDA4;
  --gold-lo: #C9973F;
  --gold-button: linear-gradient(180deg, #F7DDA4 0%, #EBC283 46%, #C9973F 100%);
  --gold-text: linear-gradient(100deg, #F7DDA4 0%, #EBC283 42%, #C9973F 88%);
  --on-gold: #0B1F26;
  --camellia: #C8433A;      /* burn and negative states: icons, borders, fills */
  --camellia-text: #E0675D; /* camellia as small text: 5.1:1 on sea-950, 4.5:1 on sea-850 */
  --sage: #8DBF8A;          /* positive values */
  /* channels for tints */
  --sea-rgb: 11, 31, 38;
  --sea-850-rgb: 16, 41, 47;
  --sea-800-rgb: 21, 51, 58;
  --abyss-rgb: 4, 14, 18;
  --cream-rgb: 244, 227, 191;
  --foam-rgb: 255, 244, 214;
  --gold-rgb: 235, 194, 131;
  --aegean-rgb: 63, 143, 166;
  --aegean-light-rgb: 140, 197, 209;
  --camellia-rgb: 200, 67, 58;
  --sage-rgb: 141, 191, 138;
  --radius: 16px;
  --header-h: 72px;
  /* space scale: 4 8 12 16 24 32 40 48 64 96 128 */
  --s4: 4px; --s8: 8px; --s12: 12px; --s16: 16px; --s24: 24px; --s32: 32px;
  --s40: 40px; --s48: 48px; --s64: 64px; --s96: 96px; --s128: 128px;
  /* rhythm, phones first (tablet and desktop override below) */
  --section-y: 72px;      /* section padding, top = bottom: 72 / 96 / 128 */
  --head-eyebrow: 12px;   /* eyebrow -> H2: 12 / 16 */
  --head-lede: 16px;      /* H2 -> lede: 16 / 24 */
  --head-content: 40px;   /* section head -> content: 40 / 56 */
  --hero-pill: 20px;      /* pill -> H1: 20 / 28 */
  --hero-title: 20px;     /* H1 -> subline: 20 / 28 */
  --hero-ctas: 32px;      /* subline -> CTAs: 32 / 40 */
  --hero-ca: 20px;        /* CTAs -> CA notice: 20 / 24 */
  --card-pad: 20px;       /* card padding: 20 / 28 */
  --step-title: clamp(1.75rem, 1.2rem + 0.8vw, 1.95rem); /* flywheel card titles, one line 28-31 px */
  --measure: 62ch;
  --container: 1240px;
  --pad: clamp(18px, 4.4vw, 40px);
  --serif: "Instrument Serif", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --sans: "DM Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --ease: cubic-bezier(.2, .7, .2, 1);
  color-scheme: dark;
}

/* ------------------------------------------------------------------ base */
*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + var(--s16));
  background: var(--sea-950);
}
body {
  margin: 0;
  min-width: 320px;
  overflow-x: clip;
  background: var(--sea-950);
  color: var(--text);
  font: 400 16px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration-color: rgba(var(--gold-rgb), 0.45); text-underline-offset: 3px; }
a:hover { color: var(--cream); }
p, figure, dl, dd { margin: 0; }
h1, h2, h3 { margin: 0; color: var(--cream); font-weight: 400; text-wrap: balance; }
p, li { text-wrap: pretty; }
p [data-bind], li [data-bind] { white-space: nowrap; } /* "7 days", "1.20×", "30 minutes" never split */
em { font-style: italic; }
code, .mono { font-family: var(--mono); }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 6px; }
::selection { background: rgba(var(--gold-rgb), 0.3); color: var(--cream); }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: var(--s12); top: -60px; z-index: 100;
  background: var(--cream); color: var(--sea-950); padding: var(--s8) var(--s16); border-radius: 8px; font-weight: 600; text-decoration: none;
}
.skip-link:focus { top: var(--s12); }
.icon { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.container { width: 100%; max-width: calc(var(--container) + 2 * var(--pad)); margin: 0 auto; padding: 0 var(--pad); }
.gold { color: var(--gold); }
.fine { font-size: 13px; line-height: 1.5; color: var(--muted); }
.inline-code { font-size: 0.86em; color: var(--text); background: rgba(var(--cream-rgb), 0.07); padding: 1px 6px; border-radius: 6px; white-space: nowrap; }

/* One caps-label style everywhere (DM Sans 600, 11.5 px, 0.12em, muted) */
.label, .stat dt, .step-stats dt, .kv dt, .vault-summary dt, .nft-price dt, .addr-label, .lane-title, .params thead th, .ledger-head {
  font: 600 11.5px/1.3 var(--sans); letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted);
}

/* Mode switches: elements tagged data-show render only in their mode. */
html:not([data-mode="live"]) [data-show="live"],
html:not([data-mode="prelaunch"]) [data-show="prelaunch"] { display: none !important; }

/* ------------------------------------------------------------------ buttons */
.btn {
  --h: 44px;
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s8);
  min-height: var(--h); padding: 0 var(--s24);
  border: 1px solid transparent; border-radius: 999px;
  font: 600 14.5px/1 var(--sans); letter-spacing: 0.005em;
  text-decoration: none; white-space: nowrap; cursor: pointer;
  transition: transform .18s var(--ease), box-shadow .2s var(--ease), background-color .2s, border-color .2s, color .2s;
}
.btn-sm { --h: 38px; padding: 0 var(--s16); font-size: 13.5px; }
.btn-lg { --h: 52px; padding: 0 var(--s24); font-size: 15.5px; }
.btn-block { width: 100%; }
.btn-gold { background: var(--gold-button); color: var(--on-gold); box-shadow: inset 0 1px 0 rgba(var(--foam-rgb), 0.5), 0 12px 30px -14px rgba(var(--gold-rgb), 0.65); }
.btn-gold:hover { color: var(--on-gold); transform: translateY(-1px); box-shadow: inset 0 1px 0 rgba(var(--foam-rgb), 0.55), 0 16px 34px -14px rgba(var(--gold-rgb), 0.8); }
.btn-ghost { background: rgba(var(--sea-rgb), 0.28); border-color: rgba(var(--cream-rgb), 0.3); color: var(--cream); }
.btn-ghost:hover { background: rgba(var(--cream-rgb), 0.07); border-color: rgba(var(--cream-rgb), 0.55); }
.btn:disabled, .btn[aria-disabled="true"] { cursor: not-allowed; transform: none; box-shadow: none; }
.btn-gold:disabled, .btn-gold[aria-disabled="true"] { background: rgba(var(--gold-rgb), 0.09); border-color: rgba(var(--gold-rgb), 0.26); color: rgba(var(--gold-rgb), 0.82); }
.btn-ghost:disabled { opacity: 0.5; }
.btn .spinner { width: 15px; height: 15px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin .8s linear infinite; }
.soon {
  padding: var(--s4) var(--s8); border-radius: 999px; background: rgba(var(--gold-rgb), 0.16); color: var(--gold-hi);
  font: 600 10px/1 var(--mono); letter-spacing: 0.14em; text-transform: uppercase;
}
.icon-btn {
  display: inline-grid; place-items: center; width: 36px; height: 36px; flex: none;
  border: 1px solid var(--line-2); border-radius: 10px; background: transparent; color: var(--muted); cursor: pointer;
  transition: color .2s, border-color .2s, background-color .2s;
}
.icon-btn:hover { color: var(--cream); border-color: rgba(var(--gold-rgb), 0.45); background: rgba(var(--gold-rgb), 0.06); }
.icon-btn .icon { width: 17px; height: 17px; }
.copy-btn.copied { color: var(--sage); border-color: rgba(var(--sage-rgb), 0.5); }

/* ------------------------------------------------------------------ header */
.site-header {
  position: sticky; top: 0; z-index: 40;
  background: linear-gradient(180deg, rgba(var(--sea-rgb), 0.72), rgba(var(--sea-rgb), 0.48));
  -webkit-backdrop-filter: saturate(130%) blur(16px);
  backdrop-filter: saturate(130%) blur(16px);
  border-bottom: 1px solid rgba(var(--cream-rgb), 0.09);
}
.header-row { display: flex; align-items: center; gap: var(--s12); height: var(--header-h); }
/* The header lockup is one image (faceted star set like a capital, then the wordmark): 30 px on phones,
   36 px from 760 px. Its box is symmetric around the ascender-baseline midline and the star's ink starts at
   the box's left edge, so the box is simply centred in the header and sits on the hero text's grid line. */
.brand { display: inline-flex; align-items: center; flex: none; text-decoration: none; border-radius: 6px; }
.brand-lockup { display: block; height: 30px; width: auto; }
.nav { display: none; }
.nav a { color: var(--text); text-decoration: none; font-size: 14.5px; font-weight: 500; padding: var(--s8) 0; position: relative; white-space: nowrap; transition: color .2s; }
.nav a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 3px; height: 1px; background: var(--gold); transform: scaleX(0); transform-origin: left; transition: transform .25s var(--ease); }
.nav a:hover { color: var(--cream); }
.nav a:hover::after { transform: scaleX(1); }
.header-actions { margin-left: auto; display: flex; align-items: center; gap: var(--s8); }
.wallet-btn { max-width: 168px; }
.wallet-btn #wallet-label { overflow: hidden; text-overflow: ellipsis; }
.wallet-btn.connected { border-color: rgba(var(--sage-rgb), 0.4); }
.wallet-btn.connected .icon { color: var(--sage); }
.wallet-btn.wrong-net { border-color: rgba(var(--gold-rgb), 0.7); color: var(--gold); }
.net-pill {
  display: none; align-items: center; gap: var(--s8); height: 30px; padding: 0 var(--s12);
  border: 1px solid rgba(var(--cream-rgb), 0.14); border-radius: 999px; font: 500 12px/1 var(--mono); color: var(--muted);
  background: rgba(var(--sea-rgb), 0.35);
}
.net-pill .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); }
.net-pill[data-net-status="ok"] .dot { background: var(--sage); box-shadow: 0 0 0 3px rgba(var(--sage-rgb), 0.16); }
.net-pill[data-net-status="stale"] .dot { background: var(--gold); }
.menu-btn { display: inline-grid; background: rgba(var(--sea-rgb), 0.3); }
.nav.open {
  display: flex; flex-direction: column; gap: 0;
  position: absolute; top: var(--header-h); left: 0; right: 0;
  padding: var(--s8) var(--pad) var(--s24); background: rgba(var(--sea-rgb), 0.97); border-bottom: 1px solid var(--line);
}
.nav.open a { padding: var(--s16) 0; font-size: 17px; border-bottom: 1px solid var(--line); }
.nav.open a::after { display: none; }
.account-menu {
  position: absolute; right: var(--pad); top: calc(var(--header-h) - 6px); z-index: 50;
  width: min(290px, calc(100vw - 2 * var(--pad))); display: grid; gap: var(--s8); padding: var(--s16);
  background: var(--sea-800); border: 1px solid var(--line-2); border-radius: 14px; box-shadow: 0 24px 60px -20px rgba(var(--abyss-rgb), 0.85);
}
.account-menu[hidden] { display: none; }
.account-menu-addr { font: 500 13px/1.5 var(--mono); color: var(--cream); overflow-wrap: anywhere; }
.account-menu-net { font-size: 12.5px; line-height: 1.5; color: var(--muted); margin-bottom: var(--s4); }

/* ------------------------------------------------------------------ I. hero */
.hero {
  position: relative; isolation: isolate; overflow: hidden;
  margin-top: calc(-1 * var(--header-h)); padding-top: var(--header-h);
  display: flex; flex-direction: column;
}
.hero-art { position: absolute; inset: 0; z-index: -2; background: var(--sea-950); }
.hero-art img { width: 100%; height: 100%; object-fit: cover; object-position: 72% 35%; }
.hero-veil { position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(var(--sea-rgb), 0.55) 0%, rgba(var(--sea-rgb), 0) 20%); }
/* Phones: the painting is a band at the top that dissolves into the sea before the copy starts, so the
   headline always sits on near-sea (contrast measured on rendered pixels). */
@media (max-width: 759.98px) {
  .hero-art { bottom: auto; height: calc(var(--header-h) + clamp(250px, 76vw, 420px)); -webkit-mask-image: linear-gradient(180deg, #0B1F26 52%, transparent 100%); mask-image: linear-gradient(180deg, #0B1F26 52%, transparent 100%); }
  .hero-veil { bottom: auto; height: calc(var(--header-h) + 120px); }
}
.hero-inner { position: relative; display: flex; align-items: flex-end; padding-top: clamp(210px, 62vw, 380px); padding-bottom: var(--s32); }
.hero-copy { max-width: 660px; min-width: 0; }
.badge {
  display: inline-flex; align-items: center; gap: var(--s8); margin: 0 0 var(--hero-pill);
  padding: 7px var(--s16) 7px var(--s12); border-radius: 999px;
  border: 1px solid rgba(var(--cream-rgb), 0.24); background: rgba(var(--sea-rgb), 0.84);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  color: var(--text); font: 500 12.5px/1 var(--sans); letter-spacing: 0.04em;
}
.badge .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 4px rgba(var(--gold-rgb), 0.18); }
.badge-live .dot { background: var(--sage); box-shadow: 0 0 0 4px rgba(var(--sage-rgb), 0.18); animation: pulse 2.4s ease-in-out infinite; }
h1 {
  font: 400 clamp(3.1rem, 1.5rem + 6.6vw, 7.25rem)/1.04 var(--serif);
  letter-spacing: -0.01em; color: var(--cream);
}
h1 em {
  font-style: italic; padding-right: 0.03em;
  background: var(--gold-text); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.lede { margin-top: var(--hero-title); max-width: 40ch; font-size: clamp(16.5px, 1rem + 0.25vw, 19px); line-height: 1.6; color: var(--text); text-wrap: balance; }
.lede span[data-bind] { color: var(--gold); font-weight: 600; }
.cta-row { display: flex; flex-wrap: wrap; gap: var(--s12); margin-top: var(--hero-ctas); }
.ca-line {
  display: flex; align-items: center; gap: var(--s12); margin-top: var(--hero-ca); max-width: 100%; width: fit-content;
  padding: var(--s8) var(--s8) var(--s8) var(--s16); border: 1px solid rgba(var(--cream-rgb), 0.16); border-radius: 12px; background: rgba(var(--sea-rgb), 0.6);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.ca-label { font: 600 11px/1 var(--mono); letter-spacing: 0.16em; color: var(--gold); }
.ca-addr { min-width: 0; font-size: 13px; color: var(--cream); overflow-wrap: anywhere; line-height: 1.5; }
.ca-note { padding: var(--s12) var(--s16); color: var(--text); font-size: 13.5px; line-height: 1.5; align-items: flex-start; }
.ca-note .icon { color: var(--gold); margin-top: 1px; }

/* the ticker along the hero's lower edge */
.ticker { position: relative; border-top: 1px solid rgba(var(--cream-rgb), 0.1); background: rgba(var(--sea-rgb), 0.86); }
.stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 0; }
.stat { min-width: 0; padding: var(--s16) var(--s12) var(--s16) 0; border-top: 1px solid var(--line); }
.stat:nth-child(-n + 2) { border-top: 0; }
.stat:nth-child(even) { padding-left: var(--s16); border-left: 1px solid var(--line); }
.stat:last-child { grid-column: 1 / -1; padding-left: 0; border-left: 0; }
.stat-value { margin-top: var(--s8); font: 500 clamp(19px, 1.05rem + 0.7vw, 26px)/1.15 var(--mono); color: var(--cream); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.stat-accent .stat-value { color: var(--gold); }
.stat-sub { margin-top: var(--s8); font-size: 12.5px; color: var(--muted); line-height: 1.5; text-wrap: balance; }
.stat-sub span { color: var(--muted); font-family: var(--mono); font-size: 12px; }
.unit { font-size: 0.62em; font-family: var(--sans); font-weight: 600; letter-spacing: 0.06em; color: var(--muted); }
p .unit, td .unit, li .unit, .faq-body .unit { font: inherit; letter-spacing: inherit; color: inherit; }
.step-stats .unit, .kv .unit, .vault-summary .unit, .stat-sub .unit { font-size: 0.78em; }
.stats-note { margin: 0; padding: var(--s24) 0; font-size: 13px; line-height: 1.5; color: var(--muted); }
.stats-note-error { color: var(--gold); }
[data-bind].flash { animation: flash 1.1s var(--ease); }

/* ------------------------------------------------------------------ sections: one rhythm */
.section { position: relative; padding: var(--section-y) 0; }
.sec-head { margin-bottom: var(--head-content); min-width: 0; }
.eyebrow {
  display: flex; align-items: center; gap: var(--s8); margin: 0 0 var(--head-eyebrow);
  font: 600 12px/1 var(--sans); letter-spacing: 0.18em; text-transform: uppercase; color: var(--gold);
}
.eyebrow::before {
  content: ""; width: 10px; height: 10px; flex: none; background: var(--gold);
  clip-path: polygon(50% 0, 61% 39%, 100% 50%, 61% 61%, 50% 100%, 39% 61%, 0 50%, 39% 39%);
}
h2 { font: 400 clamp(2.5rem, 1.35rem + 3.6vw, 4.6rem)/1.08 var(--serif); letter-spacing: -0.01em; }
h2 em { font-style: italic; }
.section-lede { margin-top: var(--head-lede); max-width: var(--measure); color: var(--text); font-size: clamp(16px, 0.98rem + 0.15vw, 17.5px); line-height: 1.6; text-wrap: balance; }
/* split heads: H2 on the left, the aside column aligned to the bottom of the H2 */
.sec-head-split { display: grid; row-gap: var(--head-lede); column-gap: var(--s64); align-items: end; }
.sec-aside { display: grid; gap: var(--s16); min-width: 0; }
.sec-head-split .section-lede { margin-top: 0; }
.swell-divider { display: flex; justify-content: center; padding: 0 var(--pad); }
.swell-divider svg {
  width: min(760px, 100%); height: 24px;
  -webkit-mask-image: linear-gradient(90deg, transparent, #0B1F26 20%, #0B1F26 80%, transparent);
  mask-image: linear-gradient(90deg, transparent, #0B1F26 20%, #0B1F26 80%, transparent);
}

/* ------------------------------------------------------------------ II. collection */
.vault-summary { display: flex; gap: var(--s32); margin: 0; }
.vault-summary dd, .step-stats dd, .kv dd { margin: 6px 0 0; font: 500 15px/1.3 var(--mono); color: var(--cream); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.market-bar { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s12); padding-top: var(--s16); margin-bottom: var(--s24); border-top: 1px solid var(--line); }
.market-chip {
  display: inline-flex; align-items: center; gap: var(--s8); height: 34px; padding: 0 var(--s12) 0 7px;
  border: 1px solid var(--line-2); border-radius: 999px; background: var(--sea-850); color: var(--text); font: 500 13.5px/1 var(--sans);
}
.market-chip img { width: 20px; height: 20px; }
.market-chip-quiet { padding-left: var(--s12); color: var(--muted); }
.market-sort { margin-left: auto; font: 500 12.5px/1 var(--mono); color: var(--muted); }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 236px), 1fr)); gap: var(--s16); }
.gallery:empty { display: none; }
/* product tiles keep the compact Kalos-marketplace density (16 px), not the 28 px text cards */
.nft {
  display: flex; flex-direction: column; min-width: 0; overflow: hidden;
  background: var(--sea-800); border: 1px solid var(--line); border-radius: var(--radius);
  transition: transform .25s var(--ease), border-color .25s, box-shadow .25s;
}
.nft:hover { transform: translateY(-3px); border-color: rgba(var(--gold-rgb), 0.4); box-shadow: 0 26px 50px -30px rgba(var(--gold-rgb), 0.4); }
.nft-media { position: relative; aspect-ratio: 1; background: var(--abyss); overflow: hidden; }
.nft-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.nft:hover .nft-media img { transform: scale(1.04); }
.nft-chip {
  position: absolute; left: var(--s12); top: var(--s12); padding: 5px 9px; border-radius: 999px;
  background: rgba(var(--sea-rgb), 0.72); border: 1px solid rgba(var(--cream-rgb), 0.18);
  font: 600 10.5px/1 var(--mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--text);
}
.nft-body { display: grid; gap: var(--s12); padding: var(--s16); }
.nft-head { display: grid; gap: var(--s4); }
.nft-collection { display: flex; align-items: center; gap: 6px; font: 500 12.5px/1.2 var(--sans); color: var(--muted); }
.nft-collection svg { width: 11px; height: 11px; fill: var(--gold); }
.nft-head h3 { font: 600 18px/1.25 var(--sans); color: var(--text); letter-spacing: 0.005em; }
.nft-price { display: grid; grid-template-columns: 1fr auto; gap: 6px var(--s12); align-items: baseline; margin: 0; padding-top: var(--s12); border-top: 1px solid var(--line); }
.nft-price dd { margin: 0; text-align: right; font: 500 14px/1.3 var(--mono); color: var(--text); overflow-wrap: anywhere; }
.nft-price dd.now { font-size: 17px; font-weight: 600; color: var(--gold); }
.nft-price dd.when { grid-column: 1 / -1; text-align: right; font: 400 12px/1.2 var(--sans); color: var(--muted); }
.decay { height: 2px; border-radius: 2px; background: rgba(var(--cream-rgb), 0.08); overflow: hidden; }
.decay span { display: block; height: 100%; background: linear-gradient(90deg, var(--gold-lo), var(--gold-hi)); }
.nft-cost { font-size: 12px; line-height: 1.5; color: var(--muted); }
.nft-cost span { font-family: var(--mono); color: var(--muted); }
.gallery-more { display: flex; justify-content: center; margin-top: var(--s32); }
.gallery-more[hidden] { display: none; }
.vault-empty {
  display: grid; gap: var(--s24); align-items: center; padding: var(--card-pad);
  border: 1px solid var(--line); border-radius: 20px; background: linear-gradient(135deg, var(--sea-800), var(--sea-900));
}
.vault-empty[hidden] { display: none; }
.vault-empty-art { width: min(240px, 72%); margin: 0 auto; aspect-ratio: 1; border-radius: 14px; overflow: hidden; border: 1px solid var(--line); }
.vault-empty-art img { width: 100%; height: 100%; object-fit: cover; }
.vault-empty-copy .eyebrow { margin-bottom: var(--head-eyebrow); }
.vault-empty-copy h3 { font: 400 clamp(1.9rem, 1.3rem + 1.6vw, 2.6rem)/1.08 var(--serif); }
.vault-empty-copy p:not(.eyebrow) { margin-top: var(--s16); color: var(--text); max-width: var(--measure); }
.vault-empty-copy .fine { margin-top: var(--s16); color: var(--muted); }

/* ------------------------------------------------------------------ III. how the vault works: the flywheel */
.flywheel { display: grid; gap: var(--s24); }
.fw-wheel { position: relative; width: min(280px, 100%); aspect-ratio: 1; margin: 0 auto var(--s16); }
.fw-svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.fw-mark { position: absolute; left: 28.5%; top: 28.5%; width: 43%; height: 43%; } /* 430 / 1000, centred */
.fw-track { fill: none; stroke: rgba(var(--cream-rgb), 0.08); stroke-width: 2; }
.fw-arc { fill: none; stroke: var(--gold); stroke-opacity: 0.75; stroke-width: 4; stroke-linecap: round; }
.fw-arrows path { fill: var(--gold); }
.fw-node circle { fill: var(--sea-850); stroke: rgba(var(--gold-rgb), 0.6); stroke-width: 2.5; }
.fw-node-burn circle { stroke: var(--camellia); }
.fw-node text { font: 600 30px var(--mono); fill: var(--gold); text-anchor: middle; dominant-baseline: central; }
/* draw-in: armed by app.js only when motion is allowed; the arcs draw once in 1.2 s, then the arrowheads */
.fw-wheel.is-armed .fw-arc { stroke-dasharray: 1; stroke-dashoffset: 1; }
.fw-wheel.is-armed .fw-arrows path { opacity: 0; }
.fw-wheel.is-drawn .fw-arc { stroke-dashoffset: 0; transition: stroke-dashoffset 1.2s var(--ease); }
.fw-wheel.is-drawn .fw-arrows path { opacity: 1; transition: opacity .3s ease 1s; }

.step {
  display: flex; flex-direction: column; min-width: 0; padding: var(--card-pad);
  background: var(--sea-850); border: 1px solid var(--line); border-radius: var(--radius);
}
.step-head { display: flex; align-items: center; gap: var(--s12); }
.step-num {
  display: inline-grid; place-items: center; flex: none; min-width: 34px; height: 26px; padding: 0 var(--s8); border-radius: 999px;
  border: 1px solid rgba(var(--gold-rgb), 0.45); color: var(--gold); font: 600 12px/1 var(--mono); letter-spacing: 0.04em;
}
.step-burn .step-num { border-color: rgba(var(--camellia-rgb), 0.6); color: var(--camellia-text); }
.step h3 { font: 400 var(--step-title)/1.1 var(--serif); }
.fn { font-size: 12px; color: var(--aegean-light); background: rgba(var(--aegean-light-rgb), 0.07); border: 1px solid rgba(var(--aegean-light-rgb), 0.18); padding: var(--s4) var(--s8); border-radius: 7px; overflow-wrap: anywhere; }
.step .fn { align-self: flex-start; margin-top: var(--s8); }
.step > p { margin: var(--s16) 0 var(--s24); color: var(--text); font-size: 15px; line-height: 1.6; max-width: var(--measure); }
.step > p span[data-bind] { color: var(--cream); font-weight: 600; }
.step-stats { display: grid; grid-template-columns: repeat(2, minmax(max-content, 1fr)); gap: var(--s12); margin-top: auto; padding-top: var(--s16); border-top: 1px solid var(--line); }

/* ------------------------------------------------------------------ IV. drive: the vault's sea */
.section-sea {
  isolation: isolate; overflow: hidden;
  background: radial-gradient(120% 90% at 85% 0%, #17414C 0%, #10303A 46%, var(--sea-950) 100%);
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.sea-lines {
  position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: 70%; z-index: -1;
  -webkit-mask-image: linear-gradient(180deg, transparent, #0B1F26 70%);
  mask-image: linear-gradient(180deg, transparent, #0B1F26 70%);
}
.drive-layout { display: grid; gap: var(--head-content); }
.drive-intro { margin-bottom: 0; }
.drive-note { margin-top: var(--s32); padding: var(--card-pad); border: 1px dashed rgba(var(--aegean-light-rgb), 0.3); border-radius: var(--radius); background: rgba(var(--sea-850-rgb), 0.94); }
.drive-note-title { display: flex; align-items: center; gap: var(--s8); font: 600 15px/1.3 var(--sans); color: var(--cream); }
.drive-note-title .icon { color: var(--gold); }
.drive-note > p:not(.drive-note-title) { margin-top: var(--s16); color: var(--text); font-size: 14.5px; line-height: 1.6; }
.console { display: grid; gap: var(--s16); align-content: start; }
.console-panel {
  display: flex; flex-direction: column; min-width: 0; padding: var(--card-pad);
  background: rgba(var(--sea-850-rgb), 0.94); border: 1px solid rgba(var(--aegean-light-rgb), 0.2); border-radius: 18px;
  box-shadow: inset 0 1px 0 rgba(var(--cream-rgb), 0.04), 0 30px 60px -40px rgba(var(--abyss-rgb), 0.8);
}
.console-head { display: flex; align-items: center; gap: var(--s16); min-width: 0; }
.console-head > div { display: grid; gap: var(--s8); justify-items: start; min-width: 0; }
.console-head h3 { font: 600 18px/1.25 var(--sans); color: var(--cream); }
.console-icon { display: grid; place-items: center; width: 44px; height: 44px; flex: none; border-radius: 12px; border: 1px solid rgba(var(--gold-rgb), 0.4); background: rgba(var(--gold-rgb), 0.07); color: var(--gold); }
.console-icon .icon { width: 21px; height: 21px; }
.console-icon-burn { border-color: rgba(var(--camellia-rgb), 0.55); background: rgba(var(--camellia-rgb), 0.1); color: var(--camellia-text); }
.console-panel > p { margin-top: var(--s16); color: var(--text); font-size: 14.5px; line-height: 1.6; }
.console-panel .kv { margin-top: var(--s24); }
.kv { display: grid; margin: 0; border-top: 1px solid var(--line); }
.kv > div { display: flex; justify-content: space-between; align-items: baseline; gap: var(--s16); padding: var(--s12) 0; border-bottom: 1px solid var(--line); }
.kv dt { flex: none; white-space: nowrap; }
.kv dd { margin: 0; min-width: 0; text-align: right; }
.kv dd.gold { color: var(--gold); }
.kv dd.kv-text { font: 400 14px/1.3 var(--sans); color: var(--muted); }
.kv-compact { margin-top: var(--s24); }
.console-panel .btn-block { margin-top: var(--s24); }
.console-panel .tx-status { margin-top: var(--s12); }
.tx-status { min-height: 1.5em; font-size: 13px; line-height: 1.5; color: var(--muted); overflow-wrap: anywhere; }
.tx-status:empty { display: none; }
.tx-status.ok { color: var(--sage); }
.tx-status.err { color: var(--camellia-text); }
.tx-status a { color: inherit; }

/* ------------------------------------------------------------------ V. ledger */
.ledger { border: 1px solid var(--line); border-radius: var(--radius); background: var(--sea-900); overflow: hidden; }
.ledger-head { display: none; }
.activity { list-style: none; margin: 0; padding: 0; }
.activity:empty { display: none; }
.act {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "kind when" "detail detail" "amount tx";
  gap: var(--s8) var(--s16); align-items: center; padding: var(--s16); border-top: 1px solid var(--line);
}
.act:first-child { border-top: 0; }
.act-kind { grid-area: kind; display: inline-flex; align-items: center; gap: var(--s8); font: 600 13px/1 var(--sans); letter-spacing: 0.02em; color: var(--text); }
.act-kind .icon { width: 30px; height: 30px; padding: 6px; border-radius: 9px; border: 1px solid var(--line-2); color: var(--muted); }
.act[data-kind="NFTBought"] .act-kind .icon { color: var(--gold); border-color: rgba(var(--gold-rgb), 0.35); }
.act[data-kind="NFTSold"] .act-kind .icon { color: var(--sage); border-color: rgba(var(--sage-rgb), 0.35); }
.act[data-kind="Burned"] .act-kind .icon { color: var(--camellia-text); border-color: rgba(var(--camellia-rgb), 0.45); }
.act[data-kind="Harvested"] .act-kind .icon { color: var(--aegean-light); border-color: rgba(var(--aegean-light-rgb), 0.3); }
.act-detail { grid-area: detail; min-width: 0; color: var(--text); font-size: 14.5px; line-height: 1.5; overflow-wrap: anywhere; }
.act-detail b { font-weight: 600; color: var(--cream); }
.act-sub { display: block; margin-top: var(--s4); font-size: 12.5px; color: var(--muted); }
.act-sub .mono { font-size: 12px; color: var(--muted); }
.act-who { white-space: nowrap; } /* "by 0x14dC…9955" never leaves the address alone on a line */
.act-amount { grid-area: amount; font: 500 14px/1.3 var(--mono); color: var(--cream); overflow-wrap: anywhere; }
.act[data-kind="Burned"] .act-amount { color: var(--camellia-text); }
.act[data-kind="NFTSold"] .act-amount { color: var(--sage); }
.act-time { grid-area: when; font: 400 12.5px/1.2 var(--mono); color: var(--muted); text-align: right; white-space: nowrap; }
.act-tx { grid-area: tx; display: inline-flex; align-items: center; gap: 5px; justify-self: end; font: 500 12.5px/1 var(--mono); color: var(--muted); text-decoration: none; }
.act-tx:hover { color: var(--gold); }
.act-tx .icon { width: 13px; height: 13px; }
.activity-empty { padding: var(--s32) var(--s24); text-align: center; color: var(--muted); }
.activity-empty[hidden] { display: none; }

/* ------------------------------------------------------------------ VI. bounded by code */
.code-layout { display: grid; gap: var(--head-content); }
.code-aside { min-width: 0; }
.art-panel { position: relative; margin: 0 0 var(--s32); border-radius: 18px; overflow: hidden; border: 1px solid var(--line); aspect-ratio: 446 / 350; background: var(--sea-800); }
.art-panel img { width: 100%; height: 100%; object-fit: cover; }
.art-panel::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 55%, rgba(var(--sea-rgb), 0.55)); }
.code-main { display: grid; gap: var(--s16); min-width: 0; }
.data-panel { background: var(--sea-900); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; min-width: 0; }
.data-panel-head { display: flex; align-items: center; justify-content: space-between; gap: var(--s12); padding: var(--s16) var(--s24); border-bottom: 1px solid var(--line); background: var(--sea-850); }
.data-panel-head h3 { font: 600 15px/1.25 var(--sans); letter-spacing: 0.02em; color: var(--cream); }
.panel-note { font: 600 11px/1 var(--mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--gold); }
.panel-note-live { color: var(--aegean-light); }
.addr-list { list-style: none; margin: 0; padding: 0; }
.addr-list li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px var(--s12); align-items: center; padding: var(--s12) var(--s24); border-top: 1px solid var(--line); }
.addr-list li:first-child { border-top: 0; }
.addr-label { grid-column: 1 / -1; }
.addr-value { min-width: 0; font: 400 13px/1.5 var(--mono); color: var(--cream); overflow-wrap: anywhere; }
html[data-mode="prelaunch"] .addr-value { font-family: var(--sans); color: var(--muted); }
.addr-actions { display: flex; gap: 6px; }
.addr-actions .icon-btn { width: 32px; height: 32px; }
.lane-status { display: flex; gap: var(--s12); align-items: flex-start; margin-top: var(--s32); padding: var(--s16); border-radius: 14px; border: 1px solid var(--line); background: var(--sea-900); }
.lane-status .icon { color: var(--gold); margin-top: 2px; }
.lane-status.ok { border-color: rgba(var(--sage-rgb), 0.35); }
.lane-status.ok .icon { color: var(--sage); }
.lane-status.bad { border-color: rgba(var(--camellia-rgb), 0.5); }
.lane-status.bad .icon { color: var(--camellia-text); }
.lane-text { margin-top: 6px; color: var(--text); font-size: 14.5px; line-height: 1.5; }
.table-wrap { overflow-x: auto; }
.params { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.params th, .params td { text-align: left; padding: var(--s12) var(--s12) var(--s12) 0; border-top: 1px solid var(--line); vertical-align: top; line-height: 1.5; }
.params th:first-child { padding-left: var(--s24); }
.params td:last-child { padding-right: var(--s24); }
.params thead th { border-top: 0; padding-top: var(--s16); padding-bottom: var(--s8); }
.params tbody th { font-weight: 500; color: var(--text); }
.params td { color: var(--cream); font-family: var(--mono); font-size: 12.5px; }
.params td:last-child { color: var(--muted); font-family: var(--sans); font-size: 12.5px; }

/* ------------------------------------------------------------------ VII. faq */
.faq-layout { display: grid; gap: var(--s32); }
.faq-layout .art-panel { display: none; }
.faq { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  display: flex; align-items: center; justify-content: space-between; gap: var(--s16); cursor: pointer; list-style: none;
  padding: var(--s24) 2px; font: 500 17.5px/1.4 var(--sans); color: var(--text); text-wrap: balance; transition: color .2s;
}
.faq summary:hover { color: var(--cream); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; flex: none; width: 13px; height: 13px;
  background: linear-gradient(var(--gold), var(--gold)) center / 13px 1.5px no-repeat, linear-gradient(var(--gold), var(--gold)) center / 1.5px 13px no-repeat;
  transition: transform .25s var(--ease);
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq summary:focus-visible { outline-offset: 2px; }
.faq-body { padding: 0 2px var(--s24); color: var(--text); font-size: 15.5px; line-height: 1.6; max-width: var(--measure); }
.faq-body p + p { margin-top: var(--s12); }
.faq-body ul { margin: 0; padding-left: var(--s16); display: grid; gap: var(--s8); }
.faq-body strong { color: var(--cream); font-weight: 600; }
.faq-body span[data-bind] { color: var(--cream); }

/* ------------------------------------------------------------------ footer */
.site-footer { position: relative; isolation: isolate; overflow: hidden; padding: var(--section-y) 0 calc(var(--s48) + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); }
.footer-art { position: absolute; inset: 0; z-index: -2; }
.footer-art img { width: 100%; height: 100%; object-fit: cover; object-position: 30% 70%; }
.footer-art::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, var(--sea-950) 0%, rgba(var(--sea-rgb), 0.8) 30%, rgba(var(--sea-rgb), 0.9) 58%, var(--sea-950) 82%); }
.footer-inner { display: grid; justify-items: center; text-align: center; }
.footer-line { font: 400 clamp(2.6rem, 1.3rem + 4.6vw, 5.6rem)/1.08 var(--serif); color: var(--cream); letter-spacing: -0.01em; max-width: 14em; text-wrap: balance; }
.footer-line em { font-style: italic; }
.footer-center { display: grid; justify-items: center; gap: var(--s32); width: 100%; margin-top: var(--s64); padding-top: var(--s64); border-top: 1px solid var(--line-soft); }
.footer-lockup { display: block; border-radius: 12px; }
.footer-lockup img { display: block; width: 120px; height: 120px; }
.footer-links { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--s12) var(--s32); }
.footer-links a { color: var(--text); text-decoration: none; font-size: 14.5px; }
.footer-links a:hover { color: var(--gold); }
.footer-links a[hidden] { display: none; }
.footer-legal { display: grid; gap: var(--s8); margin-top: var(--s40); font-size: 13px; line-height: 1.5; color: var(--muted); max-width: var(--measure); }
.footer-meta { color: var(--muted); }

/* ------------------------------------------------------------------ toasts, dialog */
.toasts { position: fixed; z-index: 60; left: var(--s12); right: var(--s12); bottom: calc(var(--s12) + env(safe-area-inset-bottom)); display: grid; gap: var(--s12); pointer-events: none; }
.toast {
  pointer-events: auto; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: var(--s12); align-items: start;
  padding: var(--s16); border-radius: 14px; border: 1px solid var(--line-2);
  background: rgba(var(--sea-800-rgb), 0.97); box-shadow: 0 24px 60px -24px rgba(var(--abyss-rgb), 0.9);
  animation: toast-in .3s var(--ease);
}
.toast-dot { width: 9px; height: 9px; border-radius: 50%; margin-top: 6px; background: var(--gold); }
.toast.ok .toast-dot { background: var(--sage); }
.toast.err .toast-dot { background: var(--camellia); }
.toast.pending .toast-dot { animation: pulse 1.4s ease-in-out infinite; }
.toast-title { font-weight: 600; color: var(--cream); font-size: 14.5px; line-height: 1.4; }
.toast-text { margin-top: var(--s4); font-size: 13px; line-height: 1.5; color: var(--muted); overflow-wrap: anywhere; }
.toast-text a { color: var(--gold); }
.toast .icon-btn { width: 30px; height: 30px; border: 0; }
.dialog {
  width: min(440px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); padding: 0; border: 1px solid var(--line-2); border-radius: 20px;
  background: var(--sea-800); color: var(--text); box-shadow: 0 40px 120px -30px rgba(var(--abyss-rgb), 0.9);
}
.dialog::backdrop { background: rgba(var(--sea-rgb), 0.72); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.dialog-inner { padding: var(--s24); }
.dialog-head { display: flex; align-items: center; justify-content: space-between; gap: var(--s12); }
.dialog-head h2 { font: 400 30px/1.1 var(--serif); }
.dialog-text { margin-top: var(--s12); color: var(--muted); font-size: 14px; line-height: 1.5; }
.wallet-list { list-style: none; margin: var(--s16) 0 0; padding: 0; display: grid; gap: var(--s8); }
.wallet-list:empty { display: none; }
.wallet-option {
  width: 100%; display: flex; align-items: center; gap: var(--s12); padding: var(--s12) var(--s16); border-radius: 12px;
  border: 1px solid var(--line-2); background: var(--sea-850); color: var(--cream); cursor: pointer; text-align: left; font-weight: 600;
  transition: border-color .2s, background-color .2s;
}
.wallet-option:hover { border-color: rgba(var(--gold-rgb), 0.5); background: rgba(var(--gold-rgb), 0.06); }
.wallet-option img, .wallet-option .wallet-fallback { width: 30px; height: 30px; border-radius: 8px; flex: none; }
.wallet-fallback { display: grid; place-items: center; background: rgba(var(--gold-rgb), 0.1); color: var(--gold); }
.dialog-error { margin-top: var(--s16); padding: var(--s12) var(--s16); border-radius: 12px; border: 1px solid rgba(var(--camellia-rgb), 0.5); color: var(--camellia-text); font-size: 14px; line-height: 1.5; }
.dialog-error[hidden] { display: none; }
.dialog-empty { margin-top: var(--s16); padding: var(--s16); border-radius: 12px; border: 1px dashed var(--line-2); color: var(--muted); font-size: 14px; line-height: 1.5; }
.dialog-empty[hidden] { display: none; }

/* ------------------------------------------------------------------ loading shimmer (live, before the first read) */
html[data-mode="live"][data-ready="false"] :is(.stat-value, .stat-sub span, .step-stats dd, .kv dd, .vault-summary dd, .ca-addr)[data-bind] {
  color: transparent !important;
  background: linear-gradient(90deg, rgba(var(--cream-rgb), 0.05), rgba(var(--cream-rgb), 0.13), rgba(var(--cream-rgb), 0.05));
  background-size: 200% 100%; border-radius: 6px; animation: shimmer 1.4s linear infinite;
}

/* ------------------------------------------------------------------ breakpoints */
@media (min-width: 560px) {
  .stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .stat, .stat:nth-child(even) { padding: var(--s24) var(--s16); border-left: 1px solid var(--line); }
  .stat:nth-child(3n + 1) { padding-left: 0; border-left: 0; }
  .stat:nth-child(-n + 3) { border-top: 0; }
  .stat:last-child { grid-column: auto; padding-left: var(--s16); border-left: 1px solid var(--line); }
  .toasts { left: auto; right: var(--s24); bottom: var(--s24); width: 380px; }
  .vault-empty { grid-template-columns: 220px minmax(0, 1fr); }
  .vault-empty-art { width: 220px; }
  .console { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
/* tablet and up: the full rhythm */
@media (min-width: 760px) {
  :root {
    --section-y: 96px; --head-eyebrow: 16px; --head-lede: 24px; --head-content: 56px;
    --hero-pill: 28px; --hero-title: 28px; --hero-ctas: 40px; --hero-ca: 24px; --card-pad: 28px;
  }
  .brand-lockup { height: 36px; }
  .hero-art img { object-position: 64% 40%; }
  /* The copy sits on the sky: a dusk veil keeps it legible over the brightest clouds (contrast measured on
     rendered pixels: headline >= 3:1, body >= 4.5:1). Wider where the copy spans more of the painting. */
  .hero-veil {
    background:
      linear-gradient(90deg, rgba(var(--sea-rgb), 0.92) 0%, rgba(var(--sea-rgb), 0.86) 50%, rgba(var(--sea-rgb), 0.62) 64%, rgba(var(--sea-rgb), 0.2) 80%, rgba(var(--sea-rgb), 0) 92%),
      linear-gradient(180deg, rgba(var(--sea-rgb), 0.5) 0%, rgba(var(--sea-rgb), 0) 20%, rgba(var(--sea-rgb), 0) 60%, rgba(var(--sea-rgb), 0.72) 86%, var(--sea-950) 100%);
  }
  h1 { font-size: clamp(3.4rem, 1.1rem + 5.6vw, 5.6rem); }
  .hero { min-height: clamp(640px, 100svh, 960px); }
  .hero-inner { flex: 1; align-items: center; padding-top: var(--s64); padding-bottom: var(--s64); }
  .sec-head-split { grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); }
  .fw-wheel { width: 320px; }
}
@media (min-width: 1024px) {
  :root { --section-y: 128px; }
  .nav { display: flex; gap: var(--s24); margin-left: var(--s40); }
  .nav.open { position: static; flex-direction: row; padding: 0; background: none; border: 0; }
  .menu-btn { display: none; }
  html[data-mode="live"] .net-pill { display: inline-flex; }
  /* three columns: 01 and 04 on the left, the wheel, 02 and 03 on the right. The wheel spans both card rows
     and is centred on the four-card block, so nodes 01/02 sit beside the top cards and 04/03 beside the bottom
     ones, mirrored around the gap between the rows (no empty band under the wheel). */
  .flywheel {
    /* 320 px up to ~1120 px (keeps every card title on one line), 460 px from 1440 */
    --wheel: clamp(320px, 44vw - 172px, 460px);
    grid-template-columns: minmax(0, 1fr) var(--wheel) minmax(0, 1fr);
    grid-template-areas: "s1 wheel s2" "s4 wheel s3";
    column-gap: clamp(var(--s32), 3.3vw, var(--s48)); row-gap: var(--s24);
  }
  .fw-wheel { grid-area: wheel; align-self: center; width: var(--wheel); margin: 0; pointer-events: none; }
  .step-1 { grid-area: s1; }
  .step-2 { grid-area: s2; }
  .step-3 { grid-area: s3; }
  .step-4 { grid-area: s4; }
  .drive-layout { grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr); gap: var(--s64); align-items: start; }
  .code-layout { grid-template-columns: minmax(0, 0.82fr) minmax(0, 1.18fr); gap: var(--s64); align-items: start; }
  .code-aside { position: sticky; top: calc(var(--header-h) + var(--s32)); }
  .faq-layout { grid-template-columns: minmax(0, 0.62fr) minmax(0, 1.38fr); gap: var(--s64); align-items: start; }
  .faq-layout .art-panel { display: block; position: sticky; top: calc(var(--header-h) + var(--s32)); max-width: 340px; margin: 0; aspect-ratio: 386 / 434; }
}
@media (min-width: 980px) {
  .stats { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .stat, .stat:nth-child(even), .stat:nth-child(3n + 1), .stat:last-child { padding: var(--s24) var(--s24) var(--s24); border-top: 0; border-left: 1px solid var(--line); }
  .stat:first-child { padding-left: 0; border-left: 0; }
  .ledger-head {
    display: grid; grid-template-columns: 150px minmax(0, 1fr) 190px 110px 64px; gap: 0 var(--s16); padding: var(--s12) var(--s24);
    border-bottom: 1px solid var(--line); background: var(--sea-850);
  }
  .act { grid-template-columns: 150px minmax(0, 1fr) 190px 110px 64px; grid-template-areas: "kind detail amount when tx"; gap: 0 var(--s16); padding: var(--s16) var(--s24); }
  .act-time { text-align: left; }
}
@media (min-width: 1180px) {
  .hero-veil {
    background:
      linear-gradient(90deg, rgba(var(--sea-rgb), 0.92) 0%, rgba(var(--sea-rgb), 0.86) 40%, rgba(var(--sea-rgb), 0.7) 50%, rgba(var(--sea-rgb), 0.24) 66%, rgba(var(--sea-rgb), 0) 80%),
      linear-gradient(180deg, rgba(var(--sea-rgb), 0.5) 0%, rgba(var(--sea-rgb), 0) 20%, rgba(var(--sea-rgb), 0) 60%, rgba(var(--sea-rgb), 0.72) 86%, var(--sea-950) 100%);
  }
  h1 { font-size: clamp(5.6rem, 1.2rem + 5.2vw, 7.25rem); }
}
@media (max-width: 400px) {
  .btn-lg { --h: 50px; padding: 0 var(--s16); font-size: 15px; }
  .cta-row .btn { flex: 1 1 auto; }
  .wallet-btn { padding: 0 var(--s12); }
}

/* ------------------------------------------------------------------ motion */
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.45; } }
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
@keyframes flash { 0% { color: var(--gold-hi); text-shadow: 0 0 18px rgba(var(--gold-rgb), 0.55); } 100% { text-shadow: none; } }
@keyframes toast-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
  .fw-wheel .fw-arc { stroke-dasharray: none !important; stroke-dashoffset: 0 !important; }
  .fw-wheel .fw-arrows path { opacity: 1 !important; }
}
