/* ===========================================================================
   FLAPARENA - theme.css
   The complete design system. Single source of truth for all six pages.
   Identity: neon arcade broadcast. Esports stream overlay x trading terminal.
   Author: FLAPARENA repo. Original work. No third-party CSS.
   ---------------------------------------------------------------------------
   SECTION MAP
     01  TOKENS ................ colour, type, spacing, radius, z-index, motion
     02  RESET & BASE .......... normalise, box model, selection, scrollbars
     03  BACKDROP .............. page vignette, scanline overlay, grid wash
     04  TYPOGRAPHY ............ display / mono scales, micro-labels, links
     05  LAYOUT ................ shell, container, section, section head, grids
     06  NAV ................... sticky bar, wordmark, links, chain pill, burger
     07  BUTTONS ............... primary, ghost, danger, sizes, icon, groups
     08  PANELS ................ card, raised, framed media, hero frame, rule
     09  STAT TILES ............ figure blocks, big figures, kv rows
     10  TABLES ................ dense data tables, zebra, numeric, scroll wrap
     11  BADGES & PILLS ........ status, chain, rarity chips, odds pills, delta
     12  BARS .................. stamina, split bars, progress, meter legend
     13  COUNTDOWN ............. gate timer, digit blocks
     14  STEPS & CLASS CARDS ... numbered loop cards, bird class cards
     15  FORMS ................. inputs, selects, amount field, segmented ctrl
     16  MODALS ................ overlay, dialog, header, body, footer
     17  TOASTS ................ stack, variants
     18  STATES ................ empty, loading, skeleton, not-deployed notice
     19  DISCLOSURE ............ FAQ accordion, details/summary
     20  FOOTER ................ columns, address slots, risk note
     21  UTILITIES ............. spacing, text, flex, visibility, a11y
     22  RESPONSIVE ............ 1920 / 1280 / 1024 / 768 / 560 / 360
     23  MOTION PREFERENCES .... reduced-motion global guards
   =========================================================================== */


/* ===========================================================================
   01  TOKENS
   =========================================================================== */

:root {
  /* --- palette ---------------------------------------------------------- */
  --night:    #0f1216;
  --panel:    #171c22;
  --panel-2:  #1e242c;
  --line:     #2a323c;
  --gold:     #ccfa01;
  --gold-hi:  #e4ff4d;
  --cyan:     #3ec9dd;
  --violet:   #a855f7;
  --crimson:  #ff5c5c;
  --lime:     #4ade80;
  --bone:     #e7e2d4;
  --muted:    #8b93a1;

  /* BNB Chain identity only. Never a general accent. */
  --bnb:      #F0B90B;

  /* --- derived surfaces -------------------------------------------------- */
  --panel-3:      #242b34;
  --line-soft:    #212831;
  --line-strong:  #3a4450;
  --ink-dim:      #626b78;

  /* --- tinted washes (rgba so they layer over panels) --------------------- */
  --gold-wash:    rgba(204, 250, 1, 0.10);
  --gold-wash-2:  rgba(204, 250, 1, 0.18);
  --cyan-wash:    rgba(62, 201, 221, 0.12);
  --cyan-wash-2:  rgba(62, 201, 221, 0.22);
  --violet-wash:  rgba(168, 85, 247, 0.12);
  --crimson-wash: rgba(255, 92, 92, 0.12);
  --lime-wash:    rgba(74, 222, 128, 0.12);
  --night-70:     rgba(15, 18, 22, 0.70);
  --night-90:     rgba(15, 18, 22, 0.92);

  /* --- type -------------------------------------------------------------- */
  --font-display: "Press Start 2P", "Courier New", ui-monospace, monospace;
  --font-mono:    "VT323", "Courier New", ui-monospace, monospace;

  --fs-micro:  13px;
  --fs-xs:     15px;
  --fs-sm:     17px;
  --fs-base:   19px;
  --fs-md:     21px;
  --fs-lg:     25px;
  --fs-xl:     31px;
  --fs-2xl:    40px;
  --fs-3xl:    52px;
  --fs-4xl:    68px;
  --fs-5xl:    92px;

  /* Press Start 2P is roughly twice as wide per character as a normal face,
     so display text needs its own, much smaller scale. Never use --fs-* with
     --font-display. */
  --fd-xs:   9px;
  --fd-sm:  11px;
  --fd-md:  13px;
  --fd-lg:  16px;
  --fd-xl:  21px;
  --fd-2xl: 27px;
  --fd-3xl: 36px;

  --lh-tight:  1.05;
  --lh-snug:   1.25;
  --lh-body:   1.6;

  --ls-micro:  0;
  --ls-wide:   0.06em;

  /* --- spacing ----------------------------------------------------------- */
  --s-1:   4px;
  --s-2:   8px;
  --s-3:  12px;
  --s-4:  16px;
  --s-5:  20px;
  --s-6:  24px;
  --s-7:  32px;
  --s-8:  40px;
  --s-9:  56px;
  --s-10: 72px;
  --s-11: 96px;
  --s-12: 128px;

  /* --- geometry ---------------------------------------------------------- */
  --r-0:  0px;
  --r-1:  1px;
  --r-2:  2px;
  --bw:   1px;
  --bw-2: 2px;

  --wrap:      1320px;
  --wrap-wide: 1560px;
  --wrap-text: 780px;

  --nav-h:     64px;
  --nav-h-sm:  56px;

  /* --- z-index ----------------------------------------------------------- */
  --z-scan:    1;
  --z-raise:   5;
  --z-nav:    60;
  --z-drawer: 70;
  --z-modal:  80;
  --z-toast:  90;

  /* --- motion ------------------------------------------------------------ */
  --dur-1: 90ms;
  --dur-2: 160ms;
  --dur-3: 260ms;
  --dur-4: 420ms;
  --ease:      cubic-bezier(0.2, 0.7, 0.2, 1);
  --ease-out:  cubic-bezier(0.16, 1, 0.3, 1);
  --ease-step: steps(6, end);

  /* --- focus ------------------------------------------------------------- */
  --focus: 0 0 0 var(--bw-2) var(--cyan);

  color-scheme: dark;
  font-synthesis: none;
}


/* ===========================================================================
   02  RESET & 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(--nav-h) + var(--s-6));
}

body {
  margin: 0;
  min-height: 100%;
  background-color: var(--night);
  color: var(--bone);
  font-family: var(--font-mono);
  font-size: var(--fs-base);
  font-weight: 500;
  line-height: var(--lh-body);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, h5, h6, p, figure, blockquote, dl, dd { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }

img, svg, canvas, video {
  display: block;
  max-width: 100%;
}

canvas { image-rendering: pixelated; }

a {
  color: var(--cyan);
  text-decoration: none;
  transition: color var(--dur-2) var(--ease);
}
a:hover { color: var(--bone); }

hr {
  border: 0;
  border-top: var(--bw) solid var(--line);
  margin: var(--s-6) 0;
}

button, input, select, textarea {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
}

button { cursor: pointer; }

table { border-collapse: collapse; border-spacing: 0; width: 100%; }

::selection {
  background: var(--gold);
  color: var(--night);
}

:focus-visible {
  outline: none;
  box-shadow: var(--focus);
  border-radius: var(--r-1);
}

/* scrollbars (WebKit + Firefox) */
* { scrollbar-width: thin; scrollbar-color: var(--line-strong) var(--night); }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--night); }
::-webkit-scrollbar-thumb {
  background: var(--line-strong);
  border: 2px solid var(--night);
}
::-webkit-scrollbar-thumb:hover { background: var(--muted); }


/* ===========================================================================
   03  BACKDROP - vignette, scanlines, grid wash
   =========================================================================== */

.fx-backdrop {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: var(--z-scan);
}

/* soft radial vignette: the only place gradients carry weight */
.fx-vignette {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(1100px 620px at 50% -8%, rgba(240, 185, 11, 0.08), transparent 62%),
    radial-gradient(900px 620px at 92% 6%, rgba(34, 211, 238, 0.055), transparent 60%),
    radial-gradient(760px 520px at 4% 40%, rgba(168, 85, 247, 0.045), transparent 62%);
}

/* horizontal scanlines, held at 4% */
.fx-scan {
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(
    to bottom,
    rgba(232, 234, 237, 0.04) 0px,
    rgba(232, 234, 237, 0.04) 1px,
    transparent 1px,
    transparent 3px
  );
  mix-blend-mode: overlay;
}

/* faint terminal grid */
.fx-grid {
  position: absolute;
  inset: 0;
  opacity: 0.30;
  background-image:
    linear-gradient(to right, rgba(38, 46, 58, 0.55) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(38, 46, 58, 0.55) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: radial-gradient(1200px 700px at 50% 0%, #000 0%, transparent 78%);
          mask-image: radial-gradient(1200px 700px at 50% 0%, #000 0%, transparent 78%);
}


/* ===========================================================================
   04  TYPOGRAPHY
   =========================================================================== */

.d1, .d2, .d3, .d4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: var(--lh-tight);
  letter-spacing: -0.01em;
  color: var(--bone);
}

.d1 { font-size: clamp(20px, 3.4vw, var(--fd-3xl)); text-transform: uppercase; }
.d2 { font-size: clamp(16px, 2.6vw, var(--fd-2xl)); text-transform: uppercase; }
.d3 { font-size: clamp(13px, 1.8vw, var(--fd-xl)); text-transform: uppercase; }
.d4 { font-size: var(--fd-md); }

.lede {
  font-size: clamp(15px, 1.5vw, var(--fs-md));
  line-height: var(--lh-body);
  color: var(--muted);
  max-width: 62ch;
}

.body { color: var(--muted); max-width: 68ch; }
.body strong { color: var(--bone); font-weight: 600; }

/* mono is mandatory for every number, label, address and table cell */
.mono,
.num,
.addr,
.label,
.sec-num,
table { font-family: var(--font-mono); }

.num {
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1, "zero" 1;
  letter-spacing: -0.01em;
}

.addr {
  font-size: var(--fs-sm);
  color: var(--muted);
  word-break: break-all;
}

/* uppercase mono micro-label on every stat */
.label {
  display: block;
  font-size: var(--fs-micro);
  font-weight: 700;
  letter-spacing: var(--ls-micro);
  text-transform: uppercase;
  color: var(--muted);
  line-height: 1.4;
}
.label--cyan { color: var(--cyan); }
.label--gold { color: var(--gold); }

/* numbered section marker: 01 / 02 / 03 */
.sec-num {
  display: block;
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: var(--ls-wide);
  color: var(--muted);
  margin-bottom: var(--s-2);
}
.sec-num::after {
  content: "";
  display: inline-block;
  width: 28px;
  height: 1px;
  background: var(--line-strong);
  vertical-align: middle;
  margin-left: var(--s-3);
}

.link-arrow::after {
  content: " \2192";
  font-family: var(--font-mono);
}

.text-gold    { color: var(--gold); }
.text-cyan    { color: var(--cyan); }
.text-violet  { color: var(--violet); }
.text-lime    { color: var(--lime); }
.text-crimson { color: var(--crimson); }
.text-muted   { color: var(--muted); }
.text-bone    { color: var(--bone); }


/* ===========================================================================
   05  LAYOUT
   =========================================================================== */

.shell {
  position: relative;
  z-index: var(--z-raise);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main { flex: 1 0 auto; }

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--s-6);
}
.wrap--wide { max-width: var(--wrap-wide); }
.wrap--text { max-width: var(--wrap-text); }

.section {
  padding-block: var(--s-10);
  border-top: var(--bw) solid var(--line-soft);
}
.section--flush { border-top: 0; }
.section--tight { padding-block: var(--s-8); }

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--s-5);
  margin-bottom: var(--s-7);
}
.section-head__text { min-width: 0; }
.section-head__aside {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  flex-wrap: wrap;
}

/* generic grid helpers */
.grid { display: grid; gap: var(--s-4); }
.grid--2  { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--3  { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--4  { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid--5  { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.grid--auto { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.grid--gap-6 { gap: var(--s-6); }

.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: var(--s-8);
  align-items: start;
}
.split--hero { grid-template-columns: minmax(0, 0.86fr) minmax(0, 1.14fr); }


/* ===========================================================================
   06  NAV
   =========================================================================== */

.nav {
  position: sticky;
  top: 0;
  z-index: var(--z-nav);
  height: var(--nav-h);
  background: var(--night-90);
  backdrop-filter: saturate(140%) blur(6px);
  -webkit-backdrop-filter: saturate(140%) blur(6px);
  border-bottom: var(--bw) solid var(--line);
}

.nav__inner {
  height: 100%;
  display: flex;
  align-items: center;
  gap: var(--s-6);
}

/* wordmark */
.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--s-3);
  color: var(--bone);
  flex: 0 0 auto;
}
.brand:hover { color: var(--bone); }
.brand__mark {
  width: 26px;
  height: 26px;
  flex: 0 0 auto;
  display: block;
}
.brand__word {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--fd-lg);
  letter-spacing: 0.02em;
  text-transform: uppercase;
  line-height: 1;
}
.brand__word em {
  font-style: normal;
  color: var(--gold);
}

.nav__links {
  display: flex;
  align-items: center;
  gap: var(--s-1);
  margin-left: var(--s-2);
  flex: 1 1 auto;
  min-width: 0;
}

.nav__link {
  position: relative;
  display: inline-block;
  padding: 8px var(--s-3);
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: var(--ls-micro);
  text-transform: uppercase;
  color: var(--muted);
  border: var(--bw) solid transparent;
  transition: color var(--dur-2) var(--ease), border-color var(--dur-2) var(--ease);
}
.nav__link:hover { color: var(--bone); border-color: var(--line); }
.nav__link[aria-current="page"] {
  color: var(--gold);
  border-color: var(--line-strong);
}
.nav__link[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: -1px; right: -1px; bottom: -1px;
  height: 2px;
  background: var(--gold);
}

.nav__side {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  flex: 0 0 auto;
  margin-left: auto;
}

.nav__burger {
  display: none;
  width: 38px;
  height: 34px;
  border: var(--bw) solid var(--line);
  background: var(--panel);
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 4px;
}
.nav__burger span {
  display: block;
  width: 16px;
  height: 1.5px;
  background: var(--bone);
}


/* ===========================================================================
   07  BUTTONS
   =========================================================================== */

.btn {
  --btn-fg: var(--night);
  --btn-bg: var(--gold);
  --btn-bd: var(--gold);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-2);
  padding: 11px var(--s-5);
  border: var(--bw) solid var(--btn-bd);
  border-radius: var(--r-2);
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-family: var(--font-mono);
  font-size: var(--fs-sm);
  font-weight: 700;
  letter-spacing: var(--ls-micro);
  text-transform: uppercase;
  white-space: nowrap;
  transition:
    background-color var(--dur-2) var(--ease),
    border-color var(--dur-2) var(--ease),
    color var(--dur-2) var(--ease),
    transform var(--dur-1) var(--ease);
}
.btn:hover { --btn-bg: var(--gold-hi); --btn-bd: var(--gold-hi); color: var(--night); }
.btn:active { transform: translateY(1px); }
.btn[disabled],
.btn[aria-disabled="true"] {
  cursor: not-allowed;
  opacity: 0.45;
  transform: none;
}

.btn--ghost {
  --btn-bg: transparent;
  --btn-bd: var(--line-strong);
  --btn-fg: var(--bone);
}
.btn--ghost:hover {
  --btn-bg: var(--panel-2);
  --btn-bd: var(--cyan);
  color: var(--bone);
}

.btn--cyan {
  --btn-bg: transparent;
  --btn-bd: var(--cyan);
  --btn-fg: var(--cyan);
}
.btn--cyan:hover { --btn-bg: var(--cyan-wash); color: var(--cyan); }

.btn--danger {
  --btn-bg: transparent;
  --btn-bd: var(--crimson);
  --btn-fg: var(--crimson);
}
.btn--danger:hover { --btn-bg: var(--crimson-wash); color: var(--crimson); }

.btn--quiet {
  --btn-bg: var(--panel);
  --btn-bd: var(--line);
  --btn-fg: var(--muted);
}
.btn--quiet:hover { --btn-bd: var(--line-strong); color: var(--bone); }

.btn--lg { padding: 15px var(--s-7); font-size: var(--fs-base); }
.btn--sm { padding: 7px var(--s-3); font-size: var(--fs-xs); }
.btn--block { display: flex; width: 100%; }

.btn__dot {
  width: 6px;
  height: 6px;
  background: currentColor;
  flex: 0 0 auto;
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-3);
}

.btn-group {
  display: inline-flex;
  border: var(--bw) solid var(--line);
}
.btn-group .btn {
  border: 0;
  border-right: var(--bw) solid var(--line);
  border-radius: 0;
}
.btn-group .btn:last-child { border-right: 0; }


/* ===========================================================================
   08  PANELS
   =========================================================================== */

.panel {
  position: relative;
  background: var(--panel);
  border: var(--bw) solid var(--line);
  border-radius: var(--r-2);
}
.panel--raised { background: var(--panel-2); }
.panel--pad    { padding: var(--s-6); }
.panel--pad-sm { padding: var(--s-4); }
.panel--pad-lg { padding: var(--s-7); }

.panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-3);
  padding: var(--s-3) var(--s-4);
  border-bottom: var(--bw) solid var(--line);
  background: var(--panel-2);
}
.panel__title {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: var(--ls-micro);
  text-transform: uppercase;
  color: var(--bone);
}
.panel__body { padding: var(--s-5); }
.panel__foot {
  padding: var(--s-3) var(--s-4);
  border-top: var(--bw) solid var(--line);
  background: var(--panel-2);
}

/* corner ticks - the broadcast-frame detail */
.panel--ticked::before,
.panel--ticked::after {
  content: "";
  position: absolute;
  width: 10px;
  height: 10px;
  border: var(--bw-2) solid var(--gold);
  pointer-events: none;
}
.panel--ticked::before { top: -1px; left: -1px; border-right: 0; border-bottom: 0; }
.panel--ticked::after  { bottom: -1px; right: -1px; border-left: 0; border-top: 0; }

.panel--accent-cyan   { border-color: var(--cyan); }
.panel--accent-gold   { border-color: var(--gold); }
.panel--accent-violet { border-color: var(--violet); }

/* 16:9 broadcast frame for the race mount */
.frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #05070B;
  border: var(--bw) solid var(--line-strong);
  border-radius: var(--r-2);
  overflow: hidden;
}
.frame > canvas,
.frame > svg,
.frame > .frame__mount {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.frame__hud {
  position: absolute;
  inset: 0;
  padding: var(--s-3);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  pointer-events: none;
}
.frame__hud-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-3);
  flex-wrap: wrap;
}
/* what the frame shows before the engine mounts, or when it cannot run */
.frame__idle {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--s-3);
  text-align: center;
  padding: var(--s-5);
}
.frame__idle svg { width: min(210px, 46%); height: auto; opacity: 0.9; }
.frame__tag {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  padding: 4px var(--s-2);
  background: var(--night-70);
  border: var(--bw) solid var(--line);
  font-family: var(--font-mono);
  font-size: var(--fs-micro);
  font-weight: 700;
  letter-spacing: var(--ls-micro);
  text-transform: uppercase;
  color: var(--muted);
}

/* thin rule with a label baked in */
.rule {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  margin: var(--s-6) 0;
}
.rule::before,
.rule::after {
  content: "";
  flex: 1 1 auto;
  height: 1px;
  background: var(--line);
}


/* ===========================================================================
   09  STAT TILES
   =========================================================================== */

.stat {
  padding: var(--s-4);
  background: var(--panel);
  border: var(--bw) solid var(--line);
  border-radius: var(--r-2);
  min-width: 0;
}
.stat--raised { background: var(--panel-2); }
.stat__value {
  display: block;
  margin-top: var(--s-2);
  font-family: var(--font-mono);
  font-size: var(--fs-xl);
  font-weight: 700;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
  color: var(--bone);
  overflow-wrap: anywhere;
}
.stat__value--gold  { color: var(--gold); }
.stat__value--cyan  { color: var(--cyan); }
.stat__value--lime  { color: var(--lime); }
.stat__note {
  display: block;
  margin-top: var(--s-1);
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  color: var(--muted);
}

/* oversized figures - used by the 90 / 5 / 5 rake block */
.figure-big {
  padding: var(--s-6) var(--s-5);
  background: var(--panel);
  border: var(--bw) solid var(--line);
  border-radius: var(--r-2);
  text-align: left;
}
.figure-big__num {
  display: block;
  font-family: var(--font-mono);
  font-size: clamp(44px, 7vw, var(--fs-4xl));
  font-weight: 700;
  line-height: 0.95;
  font-variant-numeric: tabular-nums;
  color: var(--gold);
}
.figure-big__num sup {
  font-size: 0.42em;
  vertical-align: super;
  margin-left: 2px;
  color: var(--muted);
}
.figure-big__cap {
  display: block;
  margin-top: var(--s-3);
  font-family: var(--font-display);
  font-size: var(--fd-md);
  font-weight: 600;
  color: var(--bone);
}
.figure-big__sub {
  display: block;
  margin-top: var(--s-2);
  font-size: var(--fs-sm);
  line-height: 1.55;
  color: var(--muted);
}
.figure-big--cyan   .figure-big__num { color: var(--cyan); }
.figure-big--violet .figure-big__num { color: var(--violet); }

/* key/value rows for tokenomics and specs */
.kv { display: block; }
.kv__row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--s-4);
  padding: 10px 0;
  border-bottom: var(--bw) solid var(--line-soft);
}
.kv__row:last-child { border-bottom: 0; }
.kv__k {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: var(--ls-micro);
  text-transform: uppercase;
  color: var(--muted);
}
.kv__v {
  font-family: var(--font-mono);
  font-size: var(--fs-base);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--bone);
  text-align: right;
  overflow-wrap: anywhere;
}


/* ===========================================================================
   10  TABLES - dense data
   =========================================================================== */

.table-wrap {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  border: var(--bw) solid var(--line);
  border-radius: var(--r-2);
  background: var(--panel);
}

/* borderless variant, for a table already sitting inside a .panel */
.table-wrap--bare { border: 0; border-radius: 0; background: transparent; }

.table {
  width: 100%;
  min-width: 640px;
  font-family: var(--font-mono);
  font-size: var(--fs-sm);
  font-variant-numeric: tabular-nums;
}
.table--fit { min-width: 0; }
.table--wide { min-width: 880px; }

.table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  padding: 10px var(--s-4);
  text-align: left;
  white-space: nowrap;
  background: var(--panel-2);
  border-bottom: var(--bw) solid var(--line-strong);
  font-size: var(--fs-micro);
  font-weight: 700;
  letter-spacing: var(--ls-micro);
  text-transform: uppercase;
  color: var(--muted);
}
.table--static thead th { position: static; }

.table tbody td {
  padding: 11px var(--s-4);
  border-bottom: var(--bw) solid var(--line-soft);
  color: var(--bone);
  vertical-align: middle;
}
.table tbody tr:nth-child(even) td { background: var(--panel-2); }
.table tbody tr:hover td { background: var(--panel-3); }
.table tbody tr:last-child td { border-bottom: 0; }

.table th.num,
.table td.num { text-align: right; }
.table th.mid,
.table td.mid { text-align: center; }

.table td.dim { color: var(--muted); }
.table td.strong { color: var(--bone); font-weight: 700; }
.table caption {
  caption-side: bottom;
  padding: var(--s-3) var(--s-4);
  text-align: left;
  font-size: var(--fs-xs);
  color: var(--muted);
  border-top: var(--bw) solid var(--line);
}

/* two-line cell: value over micro-label */
.cell-stack { display: flex; flex-direction: column; gap: 2px; }
.cell-stack small {
  font-size: var(--fs-micro);
  letter-spacing: var(--ls-micro);
  text-transform: uppercase;
  color: var(--muted);
}

/* The em-dash every un-readable figure renders as.
   The dash is drawn only while the element is empty, so JS can write a real
   value into the same node with textContent and the placeholder disappears
   on its own. Never hardcode an em-dash into markup for a chain figure. */
.nodata {
  font-family: var(--font-mono);
}
.nodata:empty { color: var(--ink-dim); }
.nodata:empty::after { content: "\2014"; }


/* ===========================================================================
   11  BADGES, PILLS, CHIPS
   =========================================================================== */

.pill {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  padding: 5px var(--s-3);
  border: var(--bw) solid var(--line);
  border-radius: var(--r-2);
  background: var(--panel);
  font-family: var(--font-mono);
  font-size: var(--fs-micro);
  font-weight: 700;
  letter-spacing: var(--ls-micro);
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}
.pill--chain { border-color: var(--gold); color: var(--gold); background: var(--gold-wash); }
.pill--live  { border-color: var(--cyan); color: var(--cyan); background: var(--cyan-wash); }
.pill--warn  { border-color: var(--crimson); color: var(--crimson); background: var(--crimson-wash); }
.pill--ok    { border-color: var(--lime); color: var(--lime); background: var(--lime-wash); }
.pill--idle  { border-color: var(--line-strong); color: var(--muted); }

.pill__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  flex: 0 0 auto;
}

/* rarity chips - the one place a gradient is allowed on a small surface */
.chip {
  display: inline-flex;
  align-items: center;
  padding: 4px 9px;
  border: var(--bw) solid var(--line-strong);
  border-radius: var(--r-2);
  font-family: var(--font-mono);
  font-size: var(--fs-micro);
  font-weight: 700;
  letter-spacing: var(--ls-micro);
  text-transform: uppercase;
  color: var(--bone);
}
.chip--common {
  background: linear-gradient(180deg, var(--panel-3), var(--panel));
  color: var(--muted);
}
.chip--rare {
  background: linear-gradient(180deg, rgba(34, 211, 238, 0.22), rgba(34, 211, 238, 0.06));
  border-color: var(--cyan);
  color: var(--cyan);
}
.chip--epic {
  background: linear-gradient(180deg, rgba(168, 85, 247, 0.26), rgba(168, 85, 247, 0.07));
  border-color: var(--violet);
  color: #D8B4FE;
}
.chip--legendary {
  background: linear-gradient(180deg, rgba(240, 185, 11, 0.30), rgba(240, 185, 11, 0.08));
  border-color: var(--gold);
  color: var(--gold-hi);
}

/* odds pill - pari-mutuel multiplier */
.odds {
  display: inline-flex;
  align-items: baseline;
  gap: 3px;
  padding: 4px var(--s-2);
  border: var(--bw) solid var(--line-strong);
  border-radius: var(--r-2);
  background: var(--panel-2);
  font-family: var(--font-mono);
  font-size: var(--fs-sm);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--bone);
}
.odds small { font-size: var(--fs-micro); color: var(--muted); font-weight: 700; }
.odds--fav { border-color: var(--gold); color: var(--gold); }
.odds--long { border-color: var(--violet); color: #D8B4FE; }
.odds--none { color: var(--ink-dim); border-style: dashed; }

/* deltas */
.delta {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}
.delta--up   { color: var(--lime); }
.delta--down { color: var(--crimson); }
.delta--flat { color: var(--muted); }
.delta--up::before   { content: "+"; }

/* small square tag used for class/ability keys */
.tag {
  display: inline-block;
  padding: 2px 7px;
  border: var(--bw) solid var(--line);
  background: var(--panel-2);
  font-family: var(--font-mono);
  font-size: var(--fs-micro);
  font-weight: 700;
  letter-spacing: var(--ls-micro);
  text-transform: uppercase;
  color: var(--muted);
}
.tag--cyan   { border-color: var(--cyan); color: var(--cyan); }
.tag--gold   { border-color: var(--gold); color: var(--gold); }
.tag--violet { border-color: var(--violet); color: #D8B4FE; }


/* ===========================================================================
   12  BARS - stamina, split, progress
   =========================================================================== */

.bar {
  position: relative;
  width: 100%;
  height: 8px;
  background: var(--panel-3);
  border: var(--bw) solid var(--line);
  border-radius: var(--r-1);
  overflow: hidden;
}
.bar__fill {
  display: block;
  height: 100%;
  width: 0%;
  background: var(--cyan);
  transition: width var(--dur-4) var(--ease-out);
}
.bar--gold   .bar__fill { background: var(--gold); }
.bar--lime   .bar__fill { background: var(--lime); }
.bar--violet .bar__fill { background: var(--violet); }
.bar--crimson .bar__fill { background: var(--crimson); }
.bar--sm { height: 5px; }
.bar--lg { height: 14px; }

/* stamina bar with segment ticks */
.bar--stamina::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: repeating-linear-gradient(
    to right,
    transparent 0,
    transparent 9px,
    rgba(8, 10, 15, 0.85) 9px,
    rgba(8, 10, 15, 0.85) 10px
  );
}

.bar-row {
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr) 52px;
  align-items: center;
  gap: var(--s-3);
  padding: 5px 0;
}
.bar-row .label { margin: 0; }
.bar-row__val {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  text-align: right;
  color: var(--bone);
}

/* one bar, three stacked segments - the rake split visual */
.splitbar {
  display: flex;
  width: 100%;
  height: 16px;
  border: var(--bw) solid var(--line-strong);
  border-radius: var(--r-1);
  overflow: hidden;
}
.splitbar__seg { height: 100%; }
.splitbar__seg--a { background: var(--gold); }
.splitbar__seg--b { background: var(--cyan); }
.splitbar__seg--c { background: var(--violet); }

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-4);
  margin-top: var(--s-3);
}
.legend__item {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  color: var(--muted);
}
.legend__swatch {
  width: 10px;
  height: 10px;
  border: var(--bw) solid var(--night);
  flex: 0 0 auto;
}


/* ===========================================================================
   13  COUNTDOWN
   =========================================================================== */

.countdown {
  display: inline-flex;
  align-items: stretch;
  gap: var(--s-1);
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}
.countdown__unit {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: var(--s-2) var(--s-3);
  min-width: 52px;
  background: var(--panel-2);
  border: var(--bw) solid var(--line);
  border-radius: var(--r-2);
}
.countdown__digits {
  font-size: var(--fs-lg);
  font-weight: 700;
  line-height: 1;
  color: var(--bone);
}
.countdown__lab {
  font-size: var(--fs-micro);
  letter-spacing: var(--ls-micro);
  text-transform: uppercase;
  color: var(--muted);
}
.countdown--urgent .countdown__digits { color: var(--crimson); }
.countdown--urgent .countdown__unit { border-color: var(--crimson); }
.countdown--idle .countdown__digits { color: var(--ink-dim); }

.countdown--inline {
  padding: 5px var(--s-3);
  background: var(--panel-2);
  border: var(--bw) solid var(--line);
  border-radius: var(--r-2);
  font-size: var(--fs-base);
  font-weight: 700;
  color: var(--bone);
}


/* ===========================================================================
   14  STEPS & CLASS CARDS
   =========================================================================== */

.steps {
  display: grid;
  gap: var(--s-4);
  grid-template-columns: repeat(auto-fit, minmax(215px, 1fr));
}

.step {
  position: relative;
  padding: var(--s-5);
  background: var(--panel);
  border: var(--bw) solid var(--line);
  border-radius: var(--r-2);
  transition: border-color var(--dur-2) var(--ease), background-color var(--dur-2) var(--ease);
}
.step:hover { border-color: var(--line-strong); background: var(--panel-2); }
.step__n {
  display: block;
  font-family: var(--font-mono);
  font-size: var(--fs-xl);
  font-weight: 700;
  line-height: 1;
  color: var(--gold);
  font-variant-numeric: tabular-nums;
}
.step__title {
  margin-top: var(--s-3);
  font-family: var(--font-display);
  font-size: var(--fd-md);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: var(--bone);
}
.step__text {
  margin-top: var(--s-2);
  font-size: var(--fs-sm);
  line-height: 1.6;
  color: var(--muted);
}

/* Roster grid. Cards are built at runtime from FlapSim.CLASSES. */
.class-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--s-4);
  margin-top: var(--s-6);
}
@media (max-width: 560px) {
  .class-grid { grid-template-columns: 1fr; gap: var(--s-3); }
}

.class-card {
  display: flex;
  flex-direction: column;
  background: var(--panel);
  border: var(--bw) solid var(--line);
  border-radius: var(--r-2);
  overflow: hidden;
  transition: border-color var(--dur-2) var(--ease), transform var(--dur-2) var(--ease);
}
.class-card:hover { border-color: var(--line-strong); }
.class-card__art {
  position: relative;
  aspect-ratio: 4 / 3;
  background: #06090E;
  border-bottom: var(--bw) solid var(--line);
}
.class-card__art svg,
.class-card__art canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}
/* the portraits are low-resolution sprites, so they must scale hard-edged */
.class-card__art canvas { image-rendering: pixelated; image-rendering: crisp-edges; }
.class-card__body { padding: var(--s-4); display: flex; flex-direction: column; gap: var(--s-3); flex: 1 1 auto; }
.class-card__top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--s-3);
}
.class-card__name {
  font-family: var(--font-display);
  font-size: var(--fd-md);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--bone);
}
.class-card__rating {
  font-family: var(--font-mono);
  font-size: var(--fs-sm);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--gold);
}
.class-card__arch {
  font-family: var(--font-mono);
  font-size: var(--fs-micro);
  font-weight: 700;
  letter-spacing: var(--ls-micro);
  text-transform: uppercase;
  color: var(--cyan);
}
.class-card__text {
  font-size: var(--fs-sm);
  line-height: 1.55;
  color: var(--muted);
  flex: 1 1 auto;
}
.class-card__bias { display: grid; gap: 3px; }

/* --- procedural bird art -----------------------------------------------
   Every bird is hand-authored inline SVG. A shared base silhouette is drawn
   once as a <symbol>; each class adds its own overlay shapes. Colour comes
   from --accent set per card, so one stylesheet drives all eight classes. */
.bird-art {
  --accent: var(--cyan);
  display: block;
  width: 100%;
  height: 100%;
}
/* These hooks style shapes written directly into a card's own <svg>.
   Shapes inside the shared <symbol> cannot use them: <use> clones into a
   shadow tree that author selectors do not reach, so those carry inline
   styles reading --accent instead. Custom properties inherit either way. */
.bird-art .b-plate  { fill: #06090E; }
.bird-art .b-body   { fill: #0C1119; stroke: var(--accent); stroke-width: 1.5; stroke-linejoin: miter; }
.bird-art .b-wing   { fill: var(--accent); fill-opacity: 0.22; stroke: var(--accent); stroke-width: 1.25; }
.bird-art .b-beak   { fill: var(--gold); }
.bird-art .b-eye    { fill: var(--bone); }
.bird-art .b-tail   { fill: none; stroke: var(--accent); stroke-width: 1.5; stroke-linecap: square; }
.bird-art .b-mark   { fill: none; stroke: var(--accent); stroke-width: 1.25; stroke-linecap: square; opacity: 0.85; }
.bird-art .b-fill   { fill: var(--accent); opacity: 0.9; }
.bird-art .b-faint  { stroke: var(--line); stroke-width: 1; fill: none; }
.bird-art .b-ground { stroke: var(--line); stroke-width: 1; }

.bird-art--gold    { --accent: var(--gold); }
.bird-art--cyan    { --accent: var(--cyan); }
.bird-art--violet  { --accent: var(--violet); }
.bird-art--lime    { --accent: var(--lime); }
.bird-art--crimson { --accent: var(--crimson); }
.bird-art--bone    { --accent: var(--bone); }
.bird-art--muted   { --accent: var(--muted); }

/* the sprite host itself is never rendered */
.svg-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}


/* ===========================================================================
   15  FORMS
   =========================================================================== */

.field { display: block; margin-bottom: var(--s-4); }
.field > .label { margin-bottom: var(--s-2); }

.input,
.select,
.textarea {
  width: 100%;
  padding: 11px var(--s-3);
  background: var(--night);
  border: var(--bw) solid var(--line-strong);
  border-radius: var(--r-2);
  font-family: var(--font-mono);
  font-size: var(--fs-base);
  font-variant-numeric: tabular-nums;
  color: var(--bone);
  transition: border-color var(--dur-2) var(--ease);
}
.input::placeholder,
.textarea::placeholder { color: var(--ink-dim); }
.input:hover, .select:hover, .textarea:hover { border-color: var(--muted); }
.input:disabled, .select:disabled, .textarea:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.textarea { min-height: 96px; resize: vertical; font-family: var(--font-mono); }

.select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: var(--s-8);
  background-image:
    linear-gradient(45deg, transparent 50%, var(--muted) 50%),
    linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position:
    calc(100% - 18px) calc(50% + 1px),
    calc(100% - 13px) calc(50% + 1px);
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}

/* amount field with a suffix asset selector */
.amount {
  display: flex;
  align-items: stretch;
  border: var(--bw) solid var(--line-strong);
  border-radius: var(--r-2);
  background: var(--night);
  overflow: hidden;
}
.amount .input {
  border: 0;
  border-radius: 0;
  background: transparent;
  font-size: var(--fs-lg);
  font-weight: 700;
}
.amount__asset {
  display: flex;
  align-items: center;
  padding: 0 var(--s-3);
  border-left: var(--bw) solid var(--line-strong);
  background: var(--panel-2);
  font-family: var(--font-mono);
  font-size: var(--fs-sm);
  font-weight: 700;
  letter-spacing: var(--ls-micro);
  color: var(--gold);
}
.amount:focus-within { border-color: var(--cyan); }

.hint {
  margin-top: var(--s-2);
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  color: var(--muted);
}
.hint--warn { color: var(--crimson); }

/* segmented control */
.seg {
  display: inline-flex;
  border: var(--bw) solid var(--line);
  border-radius: var(--r-2);
  overflow: hidden;
  background: var(--panel);
}
.seg__btn {
  padding: 8px var(--s-4);
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: var(--ls-micro);
  text-transform: uppercase;
  color: var(--muted);
  border-right: var(--bw) solid var(--line);
  transition: background-color var(--dur-2) var(--ease), color var(--dur-2) var(--ease);
}
.seg__btn:last-child { border-right: 0; }
.seg__btn:hover { color: var(--bone); background: var(--panel-2); }
.seg__btn[aria-pressed="true"],
.seg__btn.is-on {
  background: var(--gold);
  color: var(--night);
}

.check {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  font-family: var(--font-mono);
  font-size: var(--fs-sm);
  color: var(--muted);
  cursor: pointer;
}
.check input {
  appearance: none;
  -webkit-appearance: none;
  width: 15px;
  height: 15px;
  border: var(--bw) solid var(--line-strong);
  background: var(--night);
}
.check input:checked {
  background: var(--gold);
  border-color: var(--gold);
}


/* ===========================================================================
   16  MODALS
   =========================================================================== */

.modal {
  position: fixed;
  inset: 0;
  z-index: var(--z-modal);
  display: none;
  align-items: center;
  justify-content: center;
  padding: var(--s-4);
}
.modal.is-open { display: flex; }
.modal__scrim {
  position: absolute;
  inset: 0;
  background: rgba(4, 6, 10, 0.82);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}
.modal__dialog {
  position: relative;
  width: 100%;
  max-width: 480px;
  max-height: calc(100vh - var(--s-8));
  display: flex;
  flex-direction: column;
  background: var(--panel);
  border: var(--bw) solid var(--line-strong);
  border-radius: var(--r-2);
}
.modal__dialog--wide { max-width: 720px; }
.modal__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-3);
  padding: var(--s-4) var(--s-5);
  border-bottom: var(--bw) solid var(--line);
  background: var(--panel-2);
}
.modal__title {
  font-family: var(--font-display);
  font-size: var(--fd-md);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.modal__close {
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: var(--bw) solid var(--line);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: var(--fs-base);
  line-height: 1;
}
.modal__close:hover { color: var(--bone); border-color: var(--line-strong); }
.modal__body { padding: var(--s-5); overflow-y: auto; }
.modal__foot {
  display: flex;
  gap: var(--s-3);
  justify-content: flex-end;
  padding: var(--s-4) var(--s-5);
  border-top: var(--bw) solid var(--line);
  background: var(--panel-2);
}


/* ===========================================================================
   17  TOASTS
   =========================================================================== */

.toast-host {
  position: fixed;
  right: var(--s-4);
  bottom: var(--s-4);
  z-index: var(--z-toast);
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
  width: min(360px, calc(100vw - var(--s-7)));
  pointer-events: none;
}
.toast {
  pointer-events: auto;
  display: flex;
  gap: var(--s-3);
  padding: var(--s-3) var(--s-4);
  background: var(--panel-2);
  border: var(--bw) solid var(--line-strong);
  border-left: var(--bw-2) solid var(--cyan);
  border-radius: var(--r-2);
}
.toast__body { min-width: 0; }
.toast__title {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: var(--ls-micro);
  text-transform: uppercase;
  color: var(--bone);
}
.toast__text {
  margin-top: 2px;
  font-size: var(--fs-sm);
  color: var(--muted);
  overflow-wrap: anywhere;
}
.toast--ok    { border-left-color: var(--lime); }
.toast--warn  { border-left-color: var(--gold); }
.toast--error { border-left-color: var(--crimson); }
.toast__close {
  margin-left: auto;
  color: var(--muted);
  font-family: var(--font-mono);
  align-self: flex-start;
}
.toast__close:hover { color: var(--bone); }


/* ===========================================================================
   18  STATES - empty, loading, skeleton, not deployed
   =========================================================================== */

.empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--s-3);
  padding: var(--s-9) var(--s-5);
  text-align: center;
}
.empty__mark {
  width: 46px;
  height: 46px;
  border: var(--bw) dashed var(--line-strong);
  display: grid;
  place-items: center;
  color: var(--ink-dim);
  font-family: var(--font-mono);
  font-size: var(--fs-lg);
}
.empty__title {
  font-family: var(--font-mono);
  font-size: var(--fs-sm);
  font-weight: 700;
  letter-spacing: var(--ls-micro);
  text-transform: uppercase;
  color: var(--muted);
}
.empty__text {
  font-size: var(--fs-sm);
  color: var(--ink-dim);
  max-width: 46ch;
}

.notice {
  display: flex;
  gap: var(--s-3);
  padding: var(--s-4);
  background: var(--panel-2);
  border: var(--bw) solid var(--line-strong);
  border-left: var(--bw-2) solid var(--gold);
  border-radius: var(--r-2);
}
.notice--info   { border-left-color: var(--cyan); }
.notice--danger { border-left-color: var(--crimson); }
.notice__title {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: var(--ls-micro);
  text-transform: uppercase;
  color: var(--bone);
}
.notice__text {
  margin-top: var(--s-2);
  font-size: var(--fs-sm);
  line-height: 1.6;
  color: var(--muted);
}

.skeleton {
  display: block;
  height: 12px;
  background: var(--panel-3);
  border-radius: var(--r-1);
}
.skeleton--line { width: 100%; }
.skeleton--short { width: 40%; }

.disabled-block {
  position: relative;
  padding: var(--s-6);
  border: var(--bw) dashed var(--line-strong);
  border-radius: var(--r-2);
  background: var(--panel);
  opacity: 0.85;
}
.disabled-block[aria-disabled="true"] * { pointer-events: none; }


/* ===========================================================================
   19  DISCLOSURE - FAQ
   =========================================================================== */

.faq { border: var(--bw) solid var(--line); border-radius: var(--r-2); background: var(--panel); }

.faq__item { border-bottom: var(--bw) solid var(--line); }
.faq__item:last-child { border-bottom: 0; }

.faq__q {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-4);
  padding: var(--s-4) var(--s-5);
  cursor: pointer;
  list-style: none;
  font-family: var(--font-display);
  font-size: var(--fd-md);
  font-weight: 600;
  color: var(--bone);
  transition: background-color var(--dur-2) var(--ease);
}
.faq__q::-webkit-details-marker { display: none; }
.faq__q:hover { background: var(--panel-2); }
.faq__q::after {
  content: "+";
  font-family: var(--font-mono);
  font-size: var(--fs-lg);
  font-weight: 700;
  color: var(--gold);
  flex: 0 0 auto;
  line-height: 1;
}
.faq__item[open] > .faq__q::after { content: "\2212"; }
.faq__item[open] > .faq__q { background: var(--panel-2); }

.faq__a {
  padding: 0 var(--s-5) var(--s-5);
  font-size: var(--fs-base);
  line-height: 1.65;
  color: var(--muted);
}
.faq__a p + p { margin-top: var(--s-3); }
.faq__a code {
  font-family: var(--font-mono);
  font-size: 0.92em;
  color: var(--cyan);
  background: var(--night);
  padding: 1px 5px;
  border: var(--bw) solid var(--line);
}


/* ===========================================================================
   20  FOOTER
   =========================================================================== */

.footer {
  flex: 0 0 auto;
  border-top: var(--bw) solid var(--line);
  background: #06080C;
  padding-block: var(--s-8) var(--s-6);
  margin-top: var(--s-10);
}
.footer__grid {
  display: grid;
  gap: var(--s-7);
  grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr));
  align-items: start;
}
.footer__col > .label { margin-bottom: var(--s-3); }
.footer__list { display: grid; gap: var(--s-2); }
.footer__list a {
  font-family: var(--font-mono);
  font-size: var(--fs-sm);
  color: var(--muted);
}
.footer__list a:hover { color: var(--bone); }

.addr-slot {
  display: grid;
  gap: var(--s-1);
  padding: var(--s-3);
  background: var(--panel);
  border: var(--bw) solid var(--line);
  border-radius: var(--r-2);
  margin-bottom: var(--s-2);
}
.addr-slot__v {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  color: var(--ink-dim);
  word-break: break-all;
}
.addr-slot__v[data-filled="true"] { color: var(--cyan); }

.footer__bottom {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-4);
  justify-content: space-between;
  align-items: baseline;
  margin-top: var(--s-8);
  padding-top: var(--s-5);
  border-top: var(--bw) solid var(--line);
}
.footer__risk {
  font-size: var(--fs-sm);
  line-height: 1.65;
  color: var(--muted);
  max-width: 92ch;
}
.footer__copy {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  color: var(--ink-dim);
}


/* ===========================================================================
   21  UTILITIES
   =========================================================================== */

.u-flex     { display: flex; }
.u-inline   { display: inline-flex; }
.u-wrap     { flex-wrap: wrap; }
.u-col      { flex-direction: column; }
.u-center   { align-items: center; }
.u-between  { justify-content: space-between; }
.u-end      { justify-content: flex-end; }
.u-baseline { align-items: baseline; }
.u-gap-1 { gap: var(--s-1); }
.u-gap-2 { gap: var(--s-2); }
.u-gap-3 { gap: var(--s-3); }
.u-gap-4 { gap: var(--s-4); }
.u-gap-5 { gap: var(--s-5); }
.u-gap-6 { gap: var(--s-6); }

.u-mt-1 { margin-top: var(--s-1); }
.u-mt-2 { margin-top: var(--s-2); }
.u-mt-3 { margin-top: var(--s-3); }
.u-mt-4 { margin-top: var(--s-4); }
.u-mt-5 { margin-top: var(--s-5); }
.u-mt-6 { margin-top: var(--s-6); }
.u-mt-7 { margin-top: var(--s-7); }
.u-mt-8 { margin-top: var(--s-8); }
.u-mb-2 { margin-bottom: var(--s-2); }
.u-mb-3 { margin-bottom: var(--s-3); }
.u-mb-4 { margin-bottom: var(--s-4); }
.u-mb-5 { margin-bottom: var(--s-5); }
.u-mb-6 { margin-bottom: var(--s-6); }

.u-right  { text-align: right; }
.u-mid    { text-align: center; }
.u-upper  { text-transform: uppercase; }
.u-nowrap { white-space: nowrap; }
.u-full   { width: 100%; }
.u-grow   { flex: 1 1 auto; min-width: 0; }
.u-tnum   { font-variant-numeric: tabular-nums; }

.u-hide { display: none !important; }

.u-sr {
  position: absolute;
  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(--s-4);
  top: -60px;
  z-index: calc(var(--z-nav) + 1);
  padding: 10px var(--s-4);
  background: var(--gold);
  color: var(--night);
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: var(--ls-micro);
  transition: top var(--dur-2) var(--ease);
}
.skip-link:focus { top: var(--s-3); color: var(--night); }


/* ===========================================================================
   22  RESPONSIVE  (1920 down to 360)
   =========================================================================== */

@media (min-width: 1600px) {
  :root { --wrap: 1440px; }
  .section { padding-block: var(--s-11); }
}

@media (max-width: 1180px) {
  .split,
  .split--hero { grid-template-columns: minmax(0, 1fr); gap: var(--s-7); }
  .grid--5 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .footer__grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
}

@media (max-width: 980px) {
  .nav__links {
    position: fixed;
    left: 0; right: 0;
    top: var(--nav-h);
    z-index: var(--z-drawer);
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    margin: 0;
    padding: var(--s-2);
    background: var(--night-90);
    border-bottom: var(--bw) solid var(--line);
  }
  .nav__links.is-open { display: flex; }
  .nav__link { padding: 12px var(--s-3); border-bottom: var(--bw) solid var(--line-soft); }
  .nav__link[aria-current="page"]::after { display: none; }
  .nav__burger { display: flex; }
  .grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .section { padding-block: var(--s-9); }
}

@media (max-width: 760px) {
  :root { --nav-h: var(--nav-h-sm); }
  .wrap { padding-inline: var(--s-4); }
  .grid--3, .grid--5 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .section-head { align-items: flex-start; }
  .footer__grid { grid-template-columns: minmax(0, 1fr); gap: var(--s-6); }
  .modal__dialog { max-height: calc(100vh - var(--s-6)); }
  .toast-host { left: var(--s-3); right: var(--s-3); width: auto; }
  .figure-big { padding: var(--s-5) var(--s-4); }
}

@media (max-width: 560px) {
  .grid--2, .grid--3, .grid--4, .grid--5 { grid-template-columns: minmax(0, 1fr); }
  .steps { grid-template-columns: minmax(0, 1fr); }
  .btn-row .btn { flex: 1 1 100%; }
  .bar-row { grid-template-columns: 68px minmax(0, 1fr) 44px; }
  .brand__word { font-size: 16px; letter-spacing: 0.08em; }
  .nav__side .pill { display: none; }
  .kv__row { flex-direction: column; gap: 2px; align-items: flex-start; }
  .kv__v { text-align: left; }
}

@media (max-width: 380px) {
  .wrap { padding-inline: var(--s-3); }
  .btn { padding: 10px var(--s-4); }
  .btn--lg { padding: 13px var(--s-5); font-size: var(--fs-sm); }
  .countdown__unit { min-width: 44px; padding: 6px var(--s-2); }
  .table thead th, .table tbody td { padding-inline: var(--s-3); }
}


/* ===========================================================================
   23  MOTION PREFERENCES
   =========================================================================== */

@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;
    scroll-behavior: auto !important;
  }
  .fx-scan { display: none; }
}

@media (prefers-contrast: more) {
  :root {
    --muted: #9AA4B4;
    --line: #3A4453;
    --line-soft: #2D3644;
  }
}

@media print {
  .fx-backdrop, .nav, .toast-host, .modal { display: none !important; }
  body { background: #fff; color: #000; }
  .panel, .stat, .table-wrap { border-color: #999; }
}


/* ---------------------------------------------------------------------------
   PIXEL SURFACES
   The race and every sprite canvas render nearest-neighbour. Smoothing here
   would sand the pixel grid off and break the whole look.
   --------------------------------------------------------------------------- */
canvas.flaprace-canvas,
canvas[data-pixel],
img[data-pixel] {
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

.footer__x {
  display: inline-block;
  margin-top: var(--s-3);
  font-family: var(--font-mono);
  font-size: var(--fs-sm);
  color: var(--gold);
  text-decoration: none;
  border-bottom: var(--bw) solid transparent;
  transition: border-color var(--dur-2) var(--ease), color var(--dur-2) var(--ease);
}
.footer__x:hover { color: var(--gold-hi); border-bottom-color: var(--gold-hi); }
.footer__x:focus-visible { outline: var(--bw-2) solid var(--gold); outline-offset: 2px; }
