/* HOODY design system
   ------------------------------------------------------------------------- */

/* Two themes. Light is the default and lives on bare :root; dark is redefined
   twice -- once for the system preference, once for an explicit [data-theme]
   -- so the toggle wins in both directions and no colour is ever defined only
   inside a media query. */
:root {
  --bg: #f3f4ee;
  --panel: #ffffff;
  --panel-2: #e6e8df;
  --line: #d5d8cc;
  --line-soft: #e6e8df;

  /* The hard 2px border and the offset it casts. Neo-brutalism draws weight
     with an opaque shadow rather than a blur, so this is a colour, not a
     shadow spec. */
  --edge: #17181a;
  --drop: #cfd3c6;

  --text: #17181a;
  --muted: #5c5e58;
  --muted-dim: #8b8d85;

  --accent: #b6f200;
  --accent-hi: #c9ff33;
  --accent-dim: #5f9a00;
  --gold: #e6b422;
  --green: #3e9a5f;
  --red: #d64530;
  --paper: #ffffff;
  --ink: #0d0e0c;

  /* Space Grotesk stays for headings -- it is the brand, and a straight copy
     of the reference's Arial Black would read as one. The label treatment is
     the part worth taking: tiny wide-tracked uppercase mono under a big
     tabular number. */
  --display: 'Space Grotesk', ui-monospace, 'SFMono-Regular', monospace;
  --sans: Inter, ui-sans-serif, -apple-system, 'Segoe UI', system-ui, sans-serif;
  --mono: ui-monospace, Menlo, Consolas, 'Roboto Mono', monospace;

  --r: 16px;
  --r-sm: 10px;
  --wrap: 1180px;

  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #14161a;
    --panel: #1e2128;
    --panel-2: #2b2f38;
    --line: #343945;
    --line-soft: #262a32;
    --edge: #05060a;
    --drop: #0a0c10;
    --text: #eaece6;
    --muted: #9a9d95;
    --muted-dim: #6e716a;
    --accent: #b6f200;
    --accent-hi: #c9ff33;
    --accent-dim: #a9e800;
    --paper: #1e2128;
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --bg: #14161a;
  --panel: #1e2128;
  --panel-2: #2b2f38;
  --line: #343945;
  --line-soft: #262a32;
  --edge: #05060a;
  --drop: #0a0c10;
  --text: #eaece6;
  --muted: #9a9d95;
  --muted-dim: #6e716a;
  --accent: #b6f200;
  --accent-hi: #c9ff33;
  --accent-dim: #a9e800;
  --paper: #1e2128;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.6;
  overflow-x: hidden;
}

h1, h2, h3, h4 { font-family: var(--display); font-weight: 700; line-height: 1.08; margin: 0; letter-spacing: -0.02em; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
input, select { font: inherit; color: inherit; }

/* Pixel art must never be smoothed. */
.px { image-rendering: pixelated; image-rendering: crisp-edges; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }

/* Shell -------------------------------------------------------------------
   A fixed sidebar carries the nav and the wallet; the page scrolls beside it.
   app.js adopts whatever the HTML file put in <body> into .main, so the page
   files themselves know nothing about the shell. */

.shell { display: grid; grid-template-columns: 240px minmax(0, 1fr); }

.sidebar {
  position: fixed; inset: 0 auto 0 0; width: 240px; z-index: 60;
  display: flex; flex-direction: column; gap: 18px;
  padding: 20px 14px; overflow-y: auto;
  background: var(--panel); border-right: 2px solid var(--edge);
}

.main { grid-column: 2; min-width: 0; padding: 26px 28px 60px; }
/* Inside the shell the page is the column, so the old centred wrapper would
   only add a second, narrower gutter. */
.shell .wrap { max-width: none; padding: 0; margin: 0; }

.logo { display: flex; align-items: center; gap: 9px; font-family: var(--display); font-weight: 700; font-size: 17px; letter-spacing: 0.02em; }
.logo .name { display: block; line-height: 1.05; }
.logo .sub { display: block; font-family: var(--mono); font-size: 9px; font-weight: 500; letter-spacing: .22em; color: var(--muted); }
.themetoggle { justify-content: flex-start; }
.themetoggle .g { font-size: 13px; }
.logo .mark { width: 30px; height: 30px; border-radius: 9px; background: var(--accent); border: 2px solid var(--edge); display: grid; place-items: center; flex: none; }
.logo .mark img { width: 22px; height: 22px; }

.sidenav { display: grid; gap: 2px; }
.sidenav { gap: 4px; }
.sidenav a {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; border-radius: 12px;
  font-size: 13.5px; font-weight: 600; color: var(--text);
  border: 2px solid transparent;
  transition: background .12s, border-color .12s, box-shadow .12s, transform .06s;
}
.sidenav a::before {
  content: ''; width: 8px; height: 8px; flex: none;
  border-radius: 3px; background: var(--muted-dim);
  transition: background .12s;
}
.sidenav a:hover { background: var(--panel-2); }
.sidenav a:hover::before { background: var(--muted); }
.sidenav a.active {
  background: var(--accent); color: var(--ink);
  border-color: var(--edge); box-shadow: 0 3px 0 var(--edge);
}
.sidenav a.active::before { background: var(--ink); }
.sidenav a.soon { color: var(--muted-dim); }
.sidenav a.soon:hover { background: transparent; cursor: default; }

.sidegroup { display: grid; gap: 6px; padding-top: 16px; border-top: 1px solid var(--line-soft); }
.sidegroup .btn { justify-content: flex-start; }

.navtoggle { display: none; padding: 8px; border-radius: 8px; color: var(--muted); }
.navtoggle:hover { background: var(--panel-2); color: var(--text); }

.scrim { display: none; position: fixed; inset: 0; z-index: 55; background: rgb(0 0 0 / .45); }
.scrim.open { display: block; }

/* Buttons ----------------------------------------------------------------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 17px; border-radius: 12px;
  background: var(--accent); color: var(--ink);
  font-family: var(--display); font-weight: 700; font-size: 14px;
  border: 2px solid var(--edge);
  box-shadow: 0 4px 0 var(--edge);
  transition: background .12s, transform .06s, box-shadow .06s, opacity .15s;
}
.btn:hover { background: var(--accent-hi); }
/* Travels the exact height of its own shadow, so it lands flush. */
.btn:active { transform: translateY(4px); box-shadow: 0 0 0 var(--edge); }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.btn[disabled]:hover { background: var(--accent); }
.btn[disabled]:active { transform: none; box-shadow: 0 4px 0 var(--edge); }

.btn.ghost { background: var(--panel); color: var(--text); }
.btn.ghost:hover { background: var(--panel-2); }
.btn.small { padding: 7px 12px; font-size: 13px; border-radius: 10px; box-shadow: 0 3px 0 var(--edge); }
.btn.small:active { transform: translateY(3px); box-shadow: 0 0 0 var(--edge); }
.btn.wide { width: 100%; }

/* Panels ------------------------------------------------------------------ */

.panel {
  background: var(--panel); border: 2px solid var(--edge);
  border-radius: var(--r); box-shadow: 0 6px 0 -2px var(--drop);
}
.panel.pad { padding: 18px; }
/* Flush variant, for panels that sit inside another panel and would otherwise
   stack two shadows. */
.panel.flat { box-shadow: none; }

/* The signature caption: tiny, wide-tracked, uppercase mono. It always sits
   under or over a big tabular number, never on its own. */
.kicker {
  font-family: var(--mono); font-size: 10.5px; font-weight: 600;
  letter-spacing: .16em; text-transform: uppercase; color: var(--muted);
}
.lede { color: var(--muted); font-size: 16px; max-width: 60ch; }

.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 11px; border-radius: 999px;
  border: 2px solid var(--edge); background: var(--panel);
  font-family: var(--mono); font-size: 11.5px; color: var(--text);
}
.chip .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.chip:has(.ico) { padding-left: 4px; }
.chip .ico { width: 19px; height: 19px; border-radius: 5px; padding: 2px; }
.chip .ico.mono { font-size: 10px; padding: 0; }

/* Hero -------------------------------------------------------------------- */

.hero { padding-block: 66px 52px; position: relative; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: 46px; align-items: center; }
.hero h1 { font-size: clamp(40px, 6.4vw, 68px); }
.hero h1 .alt { color: var(--accent); }
.hero .lede { margin-top: 18px; font-size: 17px; }
.hero .ctas { display: flex; gap: 10px; margin-top: 26px; flex-wrap: wrap; }

.heroart { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.heroart img { width: 100%; height: auto; aspect-ratio: 1; border-radius: 12px; border: 1px solid var(--line); background: var(--panel); }

.clockrow { display: flex; gap: 26px; margin-top: 30px; flex-wrap: wrap; }
.clockrow .cell .k { font-size: 11.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted-dim); font-family: var(--display); font-weight: 700; }
.clockrow .cell .v { font-family: var(--display); font-weight: 700; font-size: 25px; margin-top: 2px; font-variant-numeric: tabular-nums; }

/* Contract address strip */
.ca {
  display: flex; align-items: center; gap: 10px; margin-top: 26px; flex-wrap: wrap;
  padding: 10px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel);
}
.ca .lbl { font-family: var(--display); font-weight: 700; font-size: 12px; color: var(--accent); }
.ca code { font-size: 12.5px; color: var(--muted); overflow-wrap: anywhere; }

.view { animation: viewin .18s ease-out; }
@keyframes viewin { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

/* Page head ---------------------------------------------------------------
   Every page opens the same way: kicker, oversized title, one-line lede,
   with an optional readout floated to the right. */

.pagehead { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 20px; align-items: start; margin-bottom: 22px; }
.pagehead h1 { font-size: clamp(38px, 5.4vw, 64px); margin-top: 6px; }
/* Inner pages: a title, not a hero. */
.pagehead.sm { margin-bottom: 18px; }
.pagehead.sm h1 { font-size: clamp(26px, 3.2vw, 40px); }
.pagehead.sm .lede { margin-top: 10px; font-size: 14.5px; }
.pagehead .lede { margin-top: 14px; }
.pagehead .readout { min-width: 190px; }

/* Board: the primary action beside a rail of readouts --------------------- */

.board { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 14px; align-items: start; }

.actioncard { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 20px; padding: 20px; }
.actioncard .shot { display: grid; gap: 10px; align-content: start; }
.actioncard .shot img { width: 100%; aspect-ratio: 1; border-radius: 12px; border: 1px solid var(--line); background: var(--panel-2); }
.actioncard .head { display: flex; align-items: flex-start; gap: 12px; }
.actioncard h2 { font-size: clamp(26px, 3vw, 38px); flex: 1; }
.actioncard .facts { display: flex; gap: 8px; flex-wrap: wrap; margin: 16px 0; }

/* The token callout under the art: accent rule, name, truncated address. */
.callout { border: 1px solid var(--line); border-left: 2px solid var(--accent); border-radius: var(--r-sm); padding: 10px 12px; }
.callout .lbl { font-family: var(--display); font-weight: 700; font-size: 12px; color: var(--accent); }
.callout .nm { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.callout code { display: block; font-size: 11.5px; color: var(--muted-dim); margin-top: 4px; overflow-wrap: anywhere; }

.actionbar {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--panel-2);
}
.actionbar .lab { font-family: var(--display); font-size: 11.5px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted-dim); }
.actionbar .input { width: 120px; }
.actionbar .out { font-family: var(--display); font-weight: 700; font-size: 13.5px; font-variant-numeric: tabular-nums; margin-left: auto; }

.rail { display: grid; gap: 12px; align-content: start; }
.readout { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 16px 18px; }
.readout .v { font-family: var(--display); font-weight: 700; font-size: 30px; margin-top: 4px; font-variant-numeric: tabular-nums; line-height: 1.1; }
.readout .note { color: var(--muted); font-size: 12.5px; margin-top: 8px; }

/* Ticker ------------------------------------------------------------------ */

.ticker {
  overflow: hidden; border: 1px solid var(--line); border-radius: var(--r);
  background: var(--panel); padding: 12px 0;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 68px, #000 calc(100% - 68px), transparent);
  mask-image: linear-gradient(90deg, transparent, #000 68px, #000 calc(100% - 68px), transparent);
}
.ticker .track { display: flex; gap: 10px; width: max-content; animation: tick 46s linear infinite; }
.ticker:hover .track { animation-play-state: paused; }
.tick {
  display: flex; align-items: center; gap: 9px; flex: none;
  padding: 9px 14px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--panel-2);
}
.tick .sym { font-family: var(--display); font-weight: 700; font-size: 13.5px; line-height: 1.2; }
.tick .nm { color: var(--muted-dim); font-size: 11.5px; line-height: 1.3; }

/* Asset icons -------------------------------------------------------------
   Brand marks are mostly near-black, so they sit on a light plate. Anything
   without a mark falls back to a monogram tinted with the asset's colour. */

.ico {
  width: 26px; height: 26px; flex: none;
  display: grid; place-items: center;
  border-radius: 7px; background: #fff; padding: 3px;
}
.ico img { width: 100%; height: 100%; object-fit: contain; }
.ico.mono {
  background: color-mix(in srgb, var(--c) 22%, transparent);
  color: var(--c);
  border: 1px solid color-mix(in srgb, var(--c) 45%, transparent);
  font-family: var(--display); font-weight: 700; font-size: 12.5px;
  padding: 0;
}
/* The track holds the list twice, so half a turn is a seamless loop. */
@keyframes tick { to { transform: translateX(-50%); } }

/* Slabs -------------------------------------------------------------------- */

.slab {
  display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: 26px;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 24px;
}
.slab h2 { font-size: clamp(24px, 3.2vw, 34px); margin-top: 8px; }
.slab .lede { margin-top: 12px; font-size: 14.5px; }
.slab.dark { background: var(--panel-2); position: relative; overflow: hidden; }
.slab.dark::before { content: ''; position: absolute; inset: 0 auto auto 0; width: 74px; height: 3px; background: var(--accent); }

/* Hairlines rather than gaps, so the four steps read as one strip. */
.stepstrip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; }
.stepstrip .step { border: 0; border-left: 1px solid var(--line); border-radius: 0; background: none; padding: 4px 16px; }
.stepstrip .step:first-child { border-left: 0; padding-left: 0; }

.twoup { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 26px; }
.twoup > * + * { border-left: 1px solid var(--line); padding-left: 26px; }
.twoup .big { font-family: var(--display); font-weight: 700; font-size: clamp(34px, 4.6vw, 52px); color: var(--accent); line-height: 1; margin-top: 8px; font-variant-numeric: tabular-nums; }
/* No price oracle yet, so some figures have no honest value to show. */
.twoup .big.none { font-size: 19px; color: var(--muted-dim); font-weight: 500; letter-spacing: .01em; }
.twoup .note { color: var(--muted); font-size: 13.5px; margin-top: 12px; }

.factstrip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.fact { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 16px 18px; }
.fact .k { font-family: var(--display); font-size: 11px; font-weight: 700; letter-spacing: .15em; text-transform: uppercase; color: var(--muted-dim); }
.fact .v { font-weight: 500; font-size: 14.5px; margin-top: 7px; }
.fact a { color: var(--accent); }

/* Stack of slabs down the page. */
.flow { display: grid; gap: 14px; }

/* Bento ------------------------------------------------------------------- */

.bento { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.b {
  background: var(--panel); border: 2px solid var(--edge);
  border-radius: var(--r); padding: 18px; box-shadow: 0 6px 0 -2px var(--drop);
}
/* One tile per row is filled, the way the reference leads with its headline
   number. */
.b.lit { background: var(--accent); color: var(--ink); }
.b.lit .tag, .b.lit .note { color: color-mix(in srgb, var(--ink) 72%, transparent); }
.b .tag { font-family: var(--mono); font-size: 10.5px; font-weight: 600; letter-spacing: .15em; text-transform: uppercase; color: var(--muted); }
.b .big { font-family: var(--display); font-weight: 700; font-size: 32px; margin-top: 8px; font-variant-numeric: tabular-nums; line-height: 1; }
.b .note { color: var(--muted); font-size: 13.5px; margin-top: 10px; }
.b.span-2 { grid-column: span 2; }
.b.span-4 { grid-column: span 4; }
.b.feature { background: linear-gradient(150deg, var(--panel-2), var(--panel)); }

/* Sections ---------------------------------------------------------------- */

.section { padding-block: 50px; }
.section-head { margin-bottom: 26px; }
.section-head h2 { font-size: clamp(26px, 3.6vw, 38px); margin-top: 8px; }
.section-head .lede { margin-top: 12px; }

.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.step { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 20px; }
.step .n { font-family: var(--display); font-weight: 700; font-size: 13px; color: var(--accent); letter-spacing: .1em; }
.step h3 { font-size: 18px; margin: 10px 0 8px; }
.step p { color: var(--muted); font-size: 13.5px; }

.assetgrid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.asset {
  display: flex; align-items: center; gap: 10px; padding: 12px 14px;
  border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--panel);
}
.asset .swatch { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.asset .sym { font-family: var(--display); font-weight: 700; font-size: 13.5px; }
.asset .nm { color: var(--muted-dim); font-size: 12px; margin-left: auto; }

/* Tier ladder ------------------------------------------------------------- */

.ladder { display: grid; gap: 8px; }
.rung {
  display: grid; grid-template-columns: 92px 1fr auto; gap: 12px; align-items: center;
  padding: 10px 13px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--panel);
  transition: border-color .15s, background .15s;
}
.rung .mult { font-family: var(--display); font-weight: 700; font-size: 19px; }
.rung .lbl { color: var(--muted); font-size: 13.5px; }
.rung .cost { font-family: var(--display); font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.rung.reached { border-color: var(--accent-dim); background: linear-gradient(90deg, rgba(255,122,69,.09), transparent); }
.rung.reached .mult { color: var(--accent); }
.rung.current { border-color: var(--accent); }
.rung.current .cost { color: var(--accent); }

/* A climbable rung is a button: it buys that tier outright. */
button.rung { width: 100%; text-align: left; font: inherit; color: inherit; }
.rung.climb { cursor: pointer; }
.rung.climb:hover { border-color: var(--accent); background: rgba(255,122,69,.06); }
.rung.climb:hover .cost { color: var(--accent); }
.rung.climb:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.rung .cost { justify-self: end; }

/* Derived split ------------------------------------------------------------
   The share is computed, not chosen, so this is a readout rather than a set
   of controls. */

.legs { display: grid; gap: 6px; }
.leg {
  display: flex; align-items: center; gap: 9px;
  padding: 8px 11px; border: 1px solid var(--line-soft); border-radius: var(--r-sm);
  background: var(--panel-2); font-size: 13px;
}
.leg .sym { font-family: var(--display); font-weight: 700; }
.leg .nm { color: var(--muted-dim); font-size: 12px; }
.leg .pct { margin-left: auto; font-family: var(--display); font-weight: 700; font-variant-numeric: tabular-nums; }

.warn { color: var(--gold); font-size: 12.5px; }

/* Tier selector ------------------------------------------------------------
   The burn control. A tile is a target, not an amount -- clicking one burns
   exactly the difference from where the HOODY already is. */

.tiers { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
.tier {
  display: grid; gap: 1px; padding: 9px 11px; text-align: left;
  border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--panel-2);
  font: inherit; color: inherit;
  transition: border-color .14s, background .14s;
}
.tier .m { font-family: var(--display); font-weight: 700; font-size: 16px; line-height: 1.1; font-variant-numeric: tabular-nums; }
.tier .l { font-size: 11.5px; color: var(--muted); }
.tier .c { font-family: var(--display); font-weight: 700; font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; margin-top: 2px; }

button.tier { cursor: pointer; }
button.tier:hover { border-color: var(--accent); background: rgba(255,122,69,.07); }
button.tier:hover .c { color: var(--accent); }
button.tier:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
button.tier[disabled] { opacity: .5; cursor: not-allowed; }
button.tier[disabled]:hover { border-color: var(--line); background: var(--panel-2); }

/* Rungs already paid for recede; the accent belongs to where you are and to
   what you can still do, not to history. */
.tier.done { background: transparent; border-color: var(--line-soft); }
.tier.done .m, .tier.done .l, .tier.done .c { color: var(--muted-dim); }

.tier.now { border-color: var(--accent); background: rgba(255,122,69,.08); }
.tier.now .m { color: var(--accent); }
.tier.now .l { color: var(--muted); }
.tier.now .c { color: var(--accent); }

/* Compact identity strip for the selected HOODY. */
.selhead { display: flex; align-items: center; gap: 11px; }
.selhead img { width: 46px; height: 46px; flex: none; border-radius: 9px; border: 1px solid var(--line); }
.selhead .id { font-family: var(--display); font-weight: 700; font-size: 16px; line-height: 1.2; }
.selhead .sub { font-size: 12px; color: var(--muted); margin-top: 1px; }

/* HOODY cards ------------------------------------------------------------- */

/* Capped rather than 1fr: a wallet holding one HOODY should not get a card
   stretched across the whole panel. */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 168px)); gap: 10px; }
.card {
  background: var(--panel); border: 2px solid var(--edge); border-radius: var(--r);
  overflow: hidden; box-shadow: 0 4px 0 -1px var(--drop);
  transition: box-shadow .12s, transform .1s;
}
.card:hover { transform: translateY(-2px); box-shadow: 0 6px 0 -1px var(--drop); }
.card .art { width: 100%; height: auto; aspect-ratio: 1; background: var(--panel-2); }
.card .body { padding: 10px 11px; }
.card .id { font-family: var(--display); font-weight: 700; font-size: 13.5px; }
.card .meta { display: flex; justify-content: space-between; align-items: center; gap: 6px; margin-top: 6px; font-size: 11.5px; color: var(--muted); }
.card.grail { border-color: var(--gold); }
.card.sel { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }

.badge { font-family: var(--display); font-weight: 700; font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; padding: 3px 7px; border-radius: 5px; background: var(--panel-2); color: var(--muted); }
.badge.on { background: var(--accent-dim); color: var(--accent-hi); }
.badge.gold { background: rgba(242,201,76,.15); color: var(--gold); }
.badge.off { color: var(--muted-dim); }

/* Explorer ---------------------------------------------------------------- */

.explorer { display: grid; grid-template-columns: 236px minmax(0, 1fr); gap: 20px; align-items: start; }
.filters { position: sticky; top: 20px; max-height: calc(100vh - 100px); overflow-y: auto; }
.filters .fgroup { border-bottom: 1px solid var(--line-soft); padding: 12px 0; }
.filters .fgroup:last-child { border-bottom: 0; }
.filters h4 { font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted-dim); margin-bottom: 8px; }
.filters label { display: flex; align-items: center; gap: 8px; padding: 3px 0; font-size: 13px; color: var(--muted); cursor: pointer; }
.filters label:hover { color: var(--text); }
.filters label input { accent-color: var(--accent); }
.filters label .pct { margin-left: auto; font-size: 11.5px; color: var(--muted-dim); font-variant-numeric: tabular-nums; }

.grid-mini { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.mini { border: 1px solid var(--line); border-radius: var(--r-sm); overflow: hidden; background: var(--panel); cursor: pointer; transition: border-color .12s; }
.mini:hover { border-color: var(--accent); }
.mini img { width: 100%; height: auto; aspect-ratio: 1; }
.mini .cap {
  padding: 5px 7px; font-family: var(--display); font-size: 11px; color: var(--muted);
  display: flex; justify-content: space-between; gap: 6px;
}
/* Long tier labels ("Heavyweight") would otherwise butt straight against the
   multiplier on the right. */
.mini .cap span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mini .cap span:last-child { flex: none; }
.mini.grail { border-color: var(--gold); }

/* Modal ------------------------------------------------------------------- */

.modal { position: fixed; inset: 0; z-index: 90; display: none; place-items: center; padding: 20px; background: rgb(0 0 0 / .6); backdrop-filter: blur(5px); }
.modal.open { display: grid; }
.modal .sheet { background: var(--panel); border: 2px solid var(--edge); border-radius: 18px; width: min(680px, 100%); max-height: 88vh; overflow-y: auto; }
.modal .sheet .top { display: grid; grid-template-columns: 200px 1fr; gap: 20px; padding: 20px; }
.modal .sheet .top img { width: 100%; border-radius: 12px; border: 1px solid var(--line); }
.traitlist { display: grid; gap: 6px; margin-top: 14px; }
.traitrow { display: flex; justify-content: space-between; gap: 12px; padding: 8px 11px; border: 1px solid var(--line-soft); border-radius: 8px; background: var(--panel-2); font-size: 13px; }
.traitrow .k { color: var(--muted-dim); }
.traitrow .p { color: var(--muted-dim); font-variant-numeric: tabular-nums; }

/* Forms ------------------------------------------------------------------- */

.field { display: grid; gap: 7px; }
.field .lab { font-size: 12.5px; color: var(--muted); }
.input, select.input {
  width: 100%; padding: 10px 13px; border-radius: 10px;
  background: var(--bg); border: 2px solid var(--edge); color: var(--text);
  font-variant-numeric: tabular-nums;
}
.input:focus, select.input:focus { outline: none; box-shadow: 0 0 0 3px var(--accent); }
input[type=range] { width: 100%; accent-color: var(--accent); }

.split { display: grid; grid-template-columns: 1fr 96px; gap: 10px; align-items: center; }
.pickers { display: flex; flex-wrap: wrap; gap: 7px; }
.pick {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 5px 12px 5px 6px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--panel); font-size: 12.5px; color: var(--muted); font-family: var(--display); font-weight: 500;
}
.pick .ico { width: 22px; height: 22px; border-radius: 6px; }
.pick .ico.mono { font-size: 11px; }
.pick:hover { border-color: var(--muted-dim); color: var(--text); }
.pick.on { border-color: var(--accent); color: var(--accent); background: rgba(255,122,69,.08); }
.pick[disabled] { opacity: .3; cursor: not-allowed; }
/* The icon is what buys the tighter left padding; without one, sit even. */
.pick:not(:has(.ico)) { padding-left: 12px; }
.pick .sym { color: var(--text); }
.pick .cost { color: var(--muted-dim); font-variant-numeric: tabular-nums; }
.pick.on .sym { color: var(--accent); }

/* Swap -------------------------------------------------------------------- */

/* Two stacked token rows with an arrow between them -- the shape everyone
   already knows from a swap box, so the page needs no explaining. */
.swaprow { background: var(--panel-2); border: 1px solid var(--line-soft); border-radius: var(--r); padding: 13px 15px; }
.swaprow-top { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 8px; }
.swaprow-top .lab { font-size: 12.5px; color: var(--muted); }
.swaprow-top .bal { font-size: 11.5px; color: var(--muted-dim); font-variant-numeric: tabular-nums; }
.swaprow-main { display: flex; align-items: center; gap: 12px; }

.amt {
  flex: 1; min-width: 0; width: 100%;
  background: none; border: 0; padding: 0; color: var(--text);
  font-family: var(--display); font-weight: 700; font-size: 26px; line-height: 1.2;
  font-variant-numeric: tabular-nums;
}
.amt:focus { outline: none; }
.amt::placeholder { color: var(--muted-dim); }
.amt.out { pointer-events: none; }
.amt.dim { color: var(--muted-dim); }

/* The token side of a row: mark plus ticker, not a control -- there is one
   pair to trade, so a dropdown would only promise choices that do not exist. */
.tokpill {
  display: inline-flex; align-items: center; gap: 8px; flex: none;
  padding: 5px 13px 5px 5px; border-radius: 999px;
  background: var(--panel); border: 1px solid var(--line);
  font-family: var(--display); font-weight: 700; font-size: 13.5px;
}
/* Full-bleed inside the round plate, so each mark reads as a coin rather
   than a logo sitting on a tile. */
.tokpill .ico { width: 24px; height: 24px; border-radius: 999px; padding: 0; overflow: hidden; }

/* Sits in the seam between the two rows, overlapping both. */
.swaparrow {
  width: 30px; height: 30px; margin: -9px auto; position: relative; z-index: 1;
  display: grid; place-items: center;
  border-radius: 50%; background: var(--panel); border: 1px solid var(--line);
  color: var(--muted); font-size: 14px; line-height: 1;
}
/* Graduation meter: how close the curve is to handing over to a real pool. */
.gbar { height: 7px; border-radius: 999px; background: var(--panel-2); border: 1px solid var(--line-soft); overflow: hidden; }
.gbar span { display: block; height: 100%; background: var(--accent); border-radius: 999px; }
.gbar-lab { display: flex; justify-content: space-between; gap: 10px; margin-top: 7px; font-size: 11.5px; color: var(--muted); font-variant-numeric: tabular-nums; }

.kv { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-bottom: 1px solid var(--line-soft); font-size: 13.5px; }
.kv:last-child { border-bottom: 0; }
.kv .k { color: var(--muted); }
.kv .v { font-family: var(--display); font-weight: 700; font-variant-numeric: tabular-nums; }

/* Two-column page layout */
.cols { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 20px; align-items: start; }
.stickyside { position: sticky; top: 20px; }

/* Toast ------------------------------------------------------------------- */

#toasts { position: fixed; right: 18px; bottom: 18px; z-index: 120; display: grid; gap: 8px; justify-items: end; }
.toast {
  padding: 11px 15px; border-radius: 10px; background: var(--panel-2);
  border: 1px solid var(--line); font-size: 13.5px; max-width: 340px;
  animation: toastin .22s ease-out;
}
.toast.good { border-color: var(--green); }
.toast.bad { border-color: var(--red); }
@keyframes toastin { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* Docs -------------------------------------------------------------------- */

.doc { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 34px; align-items: start; }
.toc { position: sticky; top: 20px; display: grid; gap: 3px; }
.toc a { font-size: 13.5px; color: var(--muted); padding: 5px 9px; border-radius: 7px; }
.toc a:hover { color: var(--text); background: var(--panel-2); }
.doc h2 { font-size: 25px; margin: 34px 0 12px; scroll-margin-top: 80px; }
.doc h2:first-child { margin-top: 0; }
.doc p { color: var(--muted); margin-bottom: 13px; }
.doc table { width: 100%; border-collapse: collapse; margin: 12px 0 18px; font-size: 13.5px; }
.doc th, .doc td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--line-soft); }
.doc th { color: var(--muted-dim); font-family: var(--display); font-size: 11.5px; letter-spacing: .1em; text-transform: uppercase; font-weight: 700; }
.doc td { font-variant-numeric: tabular-nums; }

/* Scroll containers must not push the page wide. */
.scrollx { overflow-x: auto; max-width: 100%; }

/* Grid children default to min-width:auto, so wide content (long addresses,
   tables, code) stretches the track instead of scrolling inside it. Letting
   these tracks shrink is what makes .scrollx actually engage. */
.main > *, .doc > *, .cols > *, .explorer > *, .bento > *, .cards > *, .grid-mini > * { min-width: 0; }

/* Footer ------------------------------------------------------------------ */

.footer { border-top: 1px solid var(--line-soft); margin-top: 60px; padding: 34px 0 44px; }
.footer .row { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; align-items: center; }
.footer .links { display: flex; gap: 16px; flex-wrap: wrap; }
.footer a { color: var(--muted); font-size: 13.5px; }
.footer a:hover { color: var(--text); }
.footer .fine { color: var(--muted-dim); font-size: 12.5px; max-width: 62ch; margin-top: 14px; }

/* Empty states live inside grids, so they have to span every column. */
.empty { grid-column: 1 / -1; padding: 40px 20px; text-align: center; color: var(--muted); }

/* Responsive -------------------------------------------------------------- */

@media (max-width: 900px) {
  /* The sidebar becomes an off-canvas drawer rather than unrolling above the
     content -- stacking seven nav rows would push the page down by ~800px. */
  .shell { grid-template-columns: minmax(0, 1fr); }
  .sidebar {
    width: 260px; z-index: 70;
    transform: translateX(-100%); transition: transform .2s;
  }
  .sidebar.open { transform: none; }
  .main { grid-column: 1; padding: 68px 16px 48px; }
  .navtoggle {
    display: block; position: fixed; top: 12px; left: 12px; z-index: 80;
    background: var(--panel); border: 1px solid var(--line);
  }

  .pagehead { grid-template-columns: minmax(0, 1fr); }
  .board { grid-template-columns: minmax(0, 1fr); }
  .slab { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .stepstrip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stepstrip .step { border-left: 0; padding: 12px 0; border-top: 1px solid var(--line); }
  .stepstrip .step:first-child, .stepstrip .step:nth-child(2) { border-top: 0; }
  .factstrip { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  .hero { padding-block: 40px 34px; }
  .hero-grid { grid-template-columns: minmax(0, 1fr); gap: 30px; }
  .heroart { grid-template-columns: repeat(3, 1fr); }
  .bento { grid-template-columns: repeat(2, 1fr); }
  .b.span-4 { grid-column: span 2; }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .assetgrid { grid-template-columns: repeat(2, 1fr); }
  .cols { grid-template-columns: minmax(0, 1fr); }
  .stickyside, .filters, .toc { position: static; max-height: none; }
  .explorer { grid-template-columns: minmax(0, 1fr); }
  .doc { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .modal .sheet .top { grid-template-columns: 1fr; }
  .modal .sheet .top img { max-width: 220px; margin: 0 auto; }
  .section { padding-block: 40px; }
  .rung { grid-template-columns: 76px 1fr; }
  .rung .cost { grid-column: 2; }
}

@media (max-width: 520px) {
  .bento { grid-template-columns: 1fr; }
  .b.span-2, .b.span-4 { grid-column: span 1; }
  .steps { grid-template-columns: 1fr; }
  .assetgrid { grid-template-columns: 1fr; }
  .grid-mini { grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); }
  .actioncard { grid-template-columns: minmax(0, 1fr); }
  .actioncard .shot img { max-width: 200px; }
  .stepstrip, .factstrip { grid-template-columns: minmax(0, 1fr); }
  .stepstrip .step:nth-child(2) { border-top: 1px solid var(--line); }
  .twoup { grid-template-columns: minmax(0, 1fr); }
  .twoup > * + * { border-left: 0; padding-left: 0; border-top: 1px solid var(--line); padding-top: 22px; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  /* The clamp above would strobe the marquee rather than stop it, so the
     ticker opts out entirely and becomes a plain scrollable strip. */
  .ticker .track { animation: none !important; }
  .ticker { overflow-x: auto; }
  .view { animation: none !important; }
}

/* The crate --------------------------------------------------------------
   The sprite is the progress indicator: it sits shut while the two signatures
   go through and opens on the draw. A spinner would say "working"; this says
   which part of the flow you are in. */

.cratebox { max-width: 620px; margin: 0 auto 18px; text-align: center; }

.cratestage {
  position: relative; display: grid; place-items: center;
  padding: 26px 0 18px; min-height: 200px;
}
.cratesprite {
  width: 168px; height: 168px;
  filter: drop-shadow(0 8px 0 var(--drop));
  transition: transform .18s;
}
.cratestage.working .cratesprite { animation: crate-shake .38s infinite; }

@keyframes crate-shake {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  25%      { transform: translate(-3px, 1px) rotate(-2deg); }
  75%      { transform: translate(3px, -1px) rotate(2deg); }
}

/* The glow behind an opened crate. Sits under the sprite, never over it. */
.cratebeam {
  position: absolute; inset: 0; z-index: -1; border-radius: 50%;
  background: radial-gradient(circle at 50% 46%, var(--accent) 0%, transparent 62%);
  opacity: .55; animation: crate-bloom .5s ease-out;
}
@keyframes crate-bloom { from { opacity: 0; transform: scale(.6); } to { opacity: .55; transform: scale(1); } }

.crateprice { margin-bottom: 14px; }
.crateprice .amt {
  font-family: var(--display); font-weight: 700; font-size: 23px;
  font-variant-numeric: tabular-nums;
}
.crateprice .fee { font-family: var(--mono); font-size: 12px; color: var(--muted); margin-left: 8px; }

.crateopen { font-size: 15px; padding: 14px; }
.cratenote { font-family: var(--mono); font-size: 11.5px; color: var(--muted); margin-top: 10px; }
.cratenote.bad { color: var(--red); }

.cratesteps { display: grid; gap: 1px; margin-top: 18px; text-align: left; background: var(--line); border-radius: 12px; overflow: hidden; }
.cstep { display: grid; grid-template-columns: 22px 1fr; gap: 8px; align-items: start; padding: 10px 12px; background: var(--panel); }
.cstep .mark { font-family: var(--mono); color: var(--muted-dim); }
.cstep .lab { display: block; font-weight: 600; font-size: 13px; }
.cstep .note { display: block; font-size: 12px; color: var(--muted); margin-top: 2px; }
.cstep.past { opacity: .5; }
.cstep.now { background: color-mix(in srgb, var(--accent) 14%, var(--panel)); }
.cstep.now .mark { color: var(--accent-dim); }
.cstep.good .mark { color: var(--accent-dim); }

.cratewon { max-width: 620px; margin: 0 auto 18px; }
.cratewon .wonrow { display: grid; grid-template-columns: 132px 1fr; gap: 18px; align-items: center; margin-top: 10px; }
.cratewon .wonart { width: 100%; border-radius: 12px; border: 2px solid var(--edge); background: var(--panel-2); }
.cratewon h2 { font-size: 26px; }
.cratewon .lede { font-size: 14px; margin-top: 6px; }
.wonactions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }

.crateexplain { max-width: 620px; margin: 0 auto; }

@media (max-width: 560px) {
  .cratewon .wonrow { grid-template-columns: 1fr; }
  .cratesprite { width: 132px; height: 132px; }
}

/* Activity ----------------------------------------------------------------
   A 1px-gapped list over a line-coloured background, so the rows are divided
   without any of them carrying a border of its own. */

.feedfilters { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.fchip {
  font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: .1em;
  padding: 7px 13px; border-radius: 999px;
  border: 2px solid var(--edge); background: var(--panel); color: var(--text);
  transition: background .12s, color .12s;
}
.fchip:hover { background: var(--panel-2); }
.fchip.on { background: var(--accent); color: var(--ink); box-shadow: 0 3px 0 var(--edge); }

.feed { display: grid; gap: 1px; background: var(--line); border-radius: 14px; overflow: hidden; }
.ev {
  display: grid; grid-template-columns: 54px 20px minmax(0, 1fr) auto;
  gap: 10px; align-items: center;
  padding: 11px 14px; background: var(--panel);
  font-family: var(--mono); font-size: 11.5px;
}
.ev .when { color: var(--muted-dim); }
.ev .glyph { color: var(--accent-dim); }
.ev .lab { display: block; color: var(--text); letter-spacing: .08em; }
.ev .detail { display: block; color: var(--muted); margin-top: 2px; font-family: var(--sans); font-size: 12.5px; }
.ev .tx { color: var(--muted-dim); }
.ev .tx:hover { color: var(--accent-dim); }
.ev-crate .glyph { color: var(--gold); }
.feed .empty { padding: 26px 14px; text-align: center; color: var(--muted); background: var(--panel); }

@media (max-width: 560px) {
  .ev { grid-template-columns: 20px minmax(0, 1fr); }
  .ev .when, .ev .tx { display: none; }
}

/* A caveat that should not be skimmable. Used for the things a reader would be
   annoyed to discover later -- the crate's randomness guarantee, chiefly. */
.notice {
  border: 2px solid var(--gold);
  border-left-width: 6px;
  border-radius: 12px;
  background: color-mix(in srgb, var(--gold) 12%, var(--panel));
  color: var(--text);
  padding: 13px 15px;
  margin: 16px 0;
  font-size: 13.5px;
  line-height: 1.65;
}

/* The dashboard stat row. auto-fit so six tiles sit in a line on a wide screen
   and reflow to two or three without a breakpoint per count. */
.tiles {
  display: grid; gap: 10px; margin-bottom: 16px;
  grid-template-columns: repeat(auto-fit, minmax(168px, 1fr));
}
.tiles .b { padding: 15px; }
.tiles .b .big { font-size: 25px; }
.tiles .b .note { font-size: 12px; margin-top: 6px; }
