:root {
  --ink: #0b0b12;
  --ink-2: #11111a;
  --panel: #15151f;
  --panel-2: #1b1b27;
  --line: #262636;
  --line-2: #33334a;
  --cream: #ede6d6;
  --dim: #9591a3;
  --faint: #5e5a6e;
  --mint: #7dffb5;
  --mint-deep: #2fd98a;
  --mint-glow: rgba(125, 255, 181, 0.16);
  --kraft: #c8a27a;
  --kraft-deep: #8e6a47;
  --dead: #ff7c8e;
  --super-a: #7dffb5;
  --super-b: #b69bff;
  --radius: 18px;
  --radius-sm: 12px;
  --max: 1160px;
  --display: "Bricolage Grotesque", ui-sans-serif, system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--ink);
  color: var(--cream);
  font-family: var(--display);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
::selection { background: var(--mint); color: var(--ink); }

.wrap { width: min(var(--max), 100% - 32px); margin-inline: auto; }
.mono { font-family: var(--mono); }
.dim { color: var(--dim); }
.mint { color: var(--mint); }
.dead { color: var(--dead); }

/* ------------------------------------------------------------------ nav */
.nav {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  background: color-mix(in srgb, var(--ink) 78%, transparent);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
}
.nav .wrap { display: flex; align-items: center; gap: 20px; height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 700; letter-spacing: -0.01em; }
.brand img { width: 34px; height: 34px; border-radius: 10px; }
.brand small { font-family: var(--mono); font-weight: 500; font-size: 12px; color: var(--mint); letter-spacing: 0.04em; }
.nav-links { display: flex; gap: 22px; margin-left: auto; font-size: 15px; }
.nav-links a { text-decoration: none; color: var(--dim); transition: color .2s; }
.nav-links a:hover { color: var(--cream); }

/* -------------------------------------------------------------- buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font: 700 16px/1 var(--display); text-decoration: none; cursor: pointer;
  padding: 15px 22px; border-radius: 999px; border: 2px solid transparent;
  transition: transform .15s ease, box-shadow .2s ease, background .2s, opacity .2s;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--mint); color: #062315; box-shadow: 0 0 0 0 var(--mint-glow), 0 10px 30px -10px rgba(125,255,181,.55); }
.btn-primary:hover { box-shadow: 0 0 0 6px var(--mint-glow), 0 10px 30px -8px rgba(125,255,181,.7); }
.btn-ghost { border-color: var(--line-2); color: var(--cream); background: transparent; }
.btn-ghost:hover { border-color: var(--cream); }
.btn-small { padding: 10px 16px; font-size: 14px; }
.btn[aria-disabled="true"] { opacity: .55; pointer-events: none; }

/* ----------------------------------------------------------------- hero */
.hero { position: relative; padding: 72px 0 40px; }
.hero::before {
  content: ""; position: absolute; inset: -120px 0 auto; height: 900px; pointer-events: none;
  background:
    radial-gradient(40% 45% at 76% 42%, rgba(125,255,181,.13), transparent 70%),
    radial-gradient(30% 35% at 18% 20%, rgba(182,155,255,.07), transparent 70%);
}
.hero-grid { position: relative; display: grid; grid-template-columns: 1.08fr .92fr; gap: 40px; align-items: center; }
.eyebrow { font-family: var(--mono); font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--mint); display: flex; flex-wrap: wrap; gap: 6px 14px; }
.eyebrow span + span::before { content: "·"; margin-right: 14px; color: var(--faint); }
h1 {
  font-size: clamp(52px, 8.2vw, 104px); line-height: .92; letter-spacing: -0.035em;
  font-weight: 800; margin: 22px 0 26px;
}
h1 em { font-style: normal; color: var(--mint); }
.lead { font-size: clamp(18px, 1.6vw, 20px); color: color-mix(in srgb, var(--cream) 82%, var(--dim)); max-width: 560px; margin: 0 0 32px; }
.lead b { color: var(--cream); }
.cta { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.cta-note { font-family: var(--mono); font-size: 12px; color: var(--faint); margin-top: 14px; }
.hero-grid > div { min-width: 0; }
.ca { display: flex; width: fit-content; align-items: center; gap: 12px; margin-top: 18px; max-width: 100%;
  padding: 8px 8px 8px 14px; border-radius: 14px; border: 1px solid rgba(125,255,181,.3); background: rgba(125,255,181,.06); }
.ca[hidden] { display: none; }
.ca-k { font: 700 12px var(--mono); letter-spacing: .08em; color: var(--mint); }
.ca code { font: 14px var(--mono); color: var(--cream); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }

.stage { position: relative; aspect-ratio: 1; max-width: 520px; margin-left: auto; width: 100%; }
.stage .ring { position: absolute; inset: 0; border-radius: 50%; border: 2px solid rgba(125,255,181,.22); animation: ripple 4.8s cubic-bezier(.2,.6,.3,1) infinite; }
.stage .ring:nth-child(2) { animation-delay: 1.6s; }
.stage .ring:nth-child(3) { animation-delay: 3.2s; }
.stage .dots { position: absolute; inset: -6%; border-radius: 50%;
  background-image: radial-gradient(rgba(125,255,181,.28) 1px, transparent 1.4px); background-size: 18px 18px;
  -webkit-mask-image: radial-gradient(closest-side, #000 40%, transparent 100%); mask-image: radial-gradient(closest-side, #000 40%, transparent 100%); opacity: .5; }
.stage img.cat { position: absolute; inset: 9%; width: 82%; height: 82%; border-radius: 50%;
  box-shadow: 0 30px 80px -20px rgba(0,0,0,.8), 0 0 0 1px rgba(255,255,255,.04); animation: bob 6s ease-in-out infinite; }
.stage .tag {
  position: absolute; font-family: var(--mono); font-size: 13px; padding: 9px 13px; border-radius: 12px;
  background: var(--panel); border: 1px solid var(--line-2); box-shadow: 0 12px 30px -12px rgba(0,0,0,.8);
  animation: bob 7s ease-in-out infinite;
}
.stage .tag b { font-weight: 700; }
.stage .tag.t1 { left: -4%; top: 16%; animation-delay: -2s; }
.stage .tag.t2 { right: -2%; top: 58%; animation-delay: -4s; }
.stage .tag.t3 { left: 6%; bottom: 4%; animation-delay: -1s; }
@keyframes ripple { 0% { transform: scale(.72); opacity: .9; } 100% { transform: scale(1.18); opacity: 0; } }
@keyframes bob { 50% { transform: translateY(-10px); } }

/* ---------------------------------------------------------------- stats */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin-top: 56px; }
.stat { background: var(--ink-2); padding: 22px 22px 20px; min-width: 0; }
.stat .k { font-family: var(--mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--dim); }
.stat .v { font-size: clamp(26px, 3vw, 34px); font-weight: 800; letter-spacing: -0.02em; margin-top: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat .s { font-family: var(--mono); font-size: 12px; color: var(--faint); margin-top: 2px; }

/* ------------------------------------------------------------- sections */
section { padding: 96px 0 0; }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 24px; margin-bottom: 30px; flex-wrap: wrap; }
.kicker { font-family: var(--mono); font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--mint); margin: 0 0 10px; }
h2 { font-size: clamp(34px, 4.6vw, 54px); line-height: 1; letter-spacing: -0.03em; font-weight: 800; margin: 0; }
h2 em { font-style: normal; color: var(--mint); }
h3 { font-size: 22px; letter-spacing: -0.01em; margin: 0 0 8px; }
.sub { color: var(--dim); max-width: 520px; margin: 0; }

/* --------------------------------------------------------------- feed */
.feed { border: 1px solid var(--line); border-radius: var(--radius); background: var(--ink-2); overflow: hidden; }
.feed-head, .row { display: grid; grid-template-columns: 76px 170px 1fr 1fr 1fr; gap: 12px; align-items: center; padding: 14px 20px; }
.feed-head { font-family: var(--mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); border-bottom: 1px solid var(--line); }
.row { font-family: var(--mono); font-size: 14px; border-bottom: 1px solid color-mix(in srgb, var(--line) 60%, transparent); }
.row:last-child { border-bottom: 0; }
.row.new { animation: flash 1.6s ease-out; }
@keyframes flash { from { background: rgba(125,255,181,.12); } to { background: transparent; } }
.row .id { color: var(--faint); }
.row a { text-decoration: none; color: var(--dim); }
.row a:hover { color: var(--cream); }
.num { text-align: right; }
.chip { display: inline-flex; align-items: center; gap: 7px; font-family: var(--mono); font-weight: 500; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; padding: 6px 10px; border-radius: 999px; border: 1px solid; }
.chip.alive { color: var(--mint); border-color: rgba(125,255,181,.35); background: rgba(125,255,181,.08); }
.chip.dead { color: var(--dead); border-color: rgba(255,124,142,.35); background: rgba(255,124,142,.07); }
.chip.super { color: #fff; border-color: transparent; background: linear-gradient(90deg, rgba(125,255,181,.35), rgba(182,155,255,.45)); }
.chip.pending { color: var(--kraft); border-color: rgba(200,162,122,.35); background: rgba(200,162,122,.07); }
.chip.pending::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--kraft); animation: blink 1s ease-in-out infinite; }
@keyframes blink { 50% { opacity: .2; } }
.feed-empty { padding: 48px 20px; text-align: center; color: var(--dim); }
.feed-empty img { width: 72px; height: 72px; margin: 0 auto 14px; border-radius: 18px; opacity: .9; }
.feed-foot { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 12px 20px; border-top: 1px solid var(--line); font-family: var(--mono); font-size: 12px; color: var(--faint); }
.live-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--mint); margin-right: 8px; box-shadow: 0 0 10px var(--mint); animation: blink 1.6s ease-in-out infinite; }

/* ---------------------------------------------------------------- steps */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.card { background: var(--ink-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; position: relative; overflow: hidden; }
.card p { color: var(--dim); margin: 0; font-size: 16px; }
.step-n { font-family: var(--mono); font-size: 13px; color: var(--mint); margin-bottom: 18px; display: block; }

/* ----------------------------------------------------------------- odds */
.odds { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 16px; }
.odd { border-radius: var(--radius); padding: 28px; border: 1px solid var(--line); background: var(--ink-2); display: flex; flex-direction: column; gap: 10px; }
.odd .pct { font-size: clamp(44px, 5vw, 60px); font-weight: 800; letter-spacing: -0.03em; line-height: 1; }
.odd .label { font-family: var(--mono); font-size: 13px; letter-spacing: .08em; text-transform: uppercase; }
.odd p { margin: 0; color: var(--dim); font-size: 16px; }
.odd.alive { border-color: rgba(125,255,181,.3); background: linear-gradient(180deg, rgba(125,255,181,.07), transparent 70%), var(--ink-2); }
.odd.alive .pct, .odd.alive .label { color: var(--mint); }
.odd.dead { border-color: rgba(255,124,142,.25); background: linear-gradient(180deg, rgba(255,124,142,.06), transparent 70%), var(--ink-2); }
.odd.dead .pct, .odd.dead .label { color: var(--dead); }
.odd.super { border-color: rgba(182,155,255,.35); background: linear-gradient(180deg, rgba(182,155,255,.10), rgba(125,255,181,.04) 60%, transparent), var(--ink-2); }
.odd.super .pct { background: linear-gradient(90deg, var(--super-a), var(--super-b)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.odd.super .label { color: var(--super-b); }

/* ------------------------------------------------------------ two column */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.big-card { padding: 34px; }
.big-card h3 { font-size: 28px; letter-spacing: -0.02em; }
.list { list-style: none; padding: 0; margin: 18px 0 0; display: grid; gap: 12px; }
.list li { display: flex; gap: 12px; color: var(--dim); font-size: 16px; }
.list li::before { content: ""; flex: 0 0 8px; height: 8px; margin-top: 9px; border-radius: 2px; background: var(--mint); transform: rotate(45deg); }

/* ------------------------------------------------------------ contracts */
.kv { display: grid; grid-template-columns: 190px 1fr auto; gap: 10px 16px; align-items: center; font-family: var(--mono); font-size: 14px; }
.kv > div { padding: 14px 0; border-bottom: 1px solid var(--line); min-width: 0; }
.kv .k { color: var(--dim); }
.kv .v { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kv .v a { text-decoration: none; }
.kv .v a:hover { color: var(--mint); }
.copy { font: 500 12px var(--mono); color: var(--dim); background: transparent; border: 1px solid var(--line-2); border-radius: 8px; padding: 6px 10px; cursor: pointer; }
.copy:hover { color: var(--cream); border-color: var(--cream); }
.badge { display: inline-flex; align-items: center; gap: 6px; font: 500 12px var(--mono); padding: 5px 9px; border-radius: 999px; border: 1px solid var(--line-2); color: var(--dim); margin-left: 8px; }
.badge.ok { color: var(--mint); border-color: rgba(125,255,181,.35); }
.badge.warn { color: var(--kraft); border-color: rgba(200,162,122,.4); }

/* ------------------------------------------------------------------ faq */
.faq { display: grid; gap: 10px; }
details { background: var(--ink-2); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 0 22px; }
details[open] { border-color: var(--line-2); }
summary { cursor: pointer; list-style: none; padding: 20px 0; font-weight: 700; font-size: 18px; display: flex; justify-content: space-between; gap: 16px; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; font-family: var(--mono); color: var(--mint); font-size: 22px; line-height: 1; transition: transform .2s; }
details[open] summary::after { transform: rotate(45deg); }
details p { margin: 0 0 20px; color: var(--dim); }

/* --------------------------------------------------------------- banner */
.closer { margin-top: 110px; border-radius: 28px; border: 1px solid var(--line); overflow: hidden; position: relative;
  background: radial-gradient(60% 90% at 85% 50%, rgba(125,255,181,.12), transparent 70%), var(--ink-2); }
.closer .inner { display: grid; grid-template-columns: 1.4fr 1fr; align-items: center; gap: 24px; padding: 56px; }
.closer h2 { font-size: clamp(38px, 5vw, 64px); }
.closer img { width: 100%; max-width: 300px; margin-left: auto; border-radius: 50%; animation: bob 6s ease-in-out infinite; }

/* --------------------------------------------------------------- footer */
footer { padding: 70px 0 50px; margin-top: 90px; border-top: 1px solid var(--line); color: var(--faint); font-size: 14px; }
.foot { display: flex; justify-content: space-between; gap: 30px; flex-wrap: wrap; }
.foot-links { display: flex; gap: 20px; flex-wrap: wrap; }
.foot-links a { text-decoration: none; color: var(--dim); }
.foot-links a:hover { color: var(--cream); }
.disclaimer { margin-top: 28px; max-width: 880px; font-size: 13px; line-height: 1.6; }

/* ----------------------------------------------------------------- docs */
.docs { display: grid; grid-template-columns: 220px 1fr; gap: 56px; padding: 56px 0 0; }
.toc { position: sticky; top: 96px; align-self: start; display: grid; gap: 4px; font-size: 15px; }
.toc a { text-decoration: none; color: var(--dim); padding: 6px 0; }
.toc a:hover { color: var(--mint); }
.prose { max-width: 760px; }
.prose h1 { font-size: clamp(44px, 6vw, 72px); margin-top: 0; }
.prose h2 { font-size: 32px; margin: 64px 0 16px; scroll-margin-top: 96px; }
.prose h3 { margin-top: 28px; }
.prose p, .prose li { color: color-mix(in srgb, var(--cream) 80%, var(--dim)); }
.prose code { font-family: var(--mono); font-size: .88em; background: var(--panel); border: 1px solid var(--line); padding: 2px 6px; border-radius: 6px; color: var(--cream); overflow-wrap: anywhere; }
.prose pre { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 18px; overflow-x: auto; font-size: 14px; }
.prose pre code { border: 0; padding: 0; background: none; }
.prose table { width: 100%; border-collapse: collapse; font-size: 15px; margin: 16px 0; }
.prose th, .prose td { text-align: left; padding: 12px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.prose th { font-family: var(--mono); font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--dim); font-weight: 500; }
.callout { border: 1px solid rgba(200,162,122,.35); background: rgba(200,162,122,.06); border-radius: var(--radius-sm); padding: 16px 18px; color: var(--cream); }

/* ---------------------------------------------------------------- admin */
.admin { padding: 56px 0 0; display: grid; gap: 16px; }
.admin .card h3 { margin-bottom: 14px; }
.field { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 12px; }
.field input { flex: 1 1 320px; min-width: 0; font: 14px var(--mono); color: var(--cream); background: var(--ink); border: 1px solid var(--line-2); border-radius: 10px; padding: 12px 14px; }
.field input:focus { outline: 2px solid var(--mint); outline-offset: 1px; }
.log { font: 13px/1.6 var(--mono); color: var(--dim); background: var(--ink); border: 1px solid var(--line); border-radius: 10px; padding: 14px; min-height: 60px; white-space: pre-wrap; word-break: break-all; }
.btn-danger { border-color: rgba(255,124,142,.5); color: var(--dead); background: transparent; }
.btn-danger:hover { background: rgba(255,124,142,.1); }

/* ----------------------------------------------------------- responsive */
@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; }
  .stage { max-width: 420px; margin: 10px auto 0; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .steps, .odds, .split { grid-template-columns: 1fr; }
  .closer .inner { grid-template-columns: 1fr; padding: 36px; }
  .closer img { margin: 0 auto; max-width: 220px; }
  .docs { grid-template-columns: 1fr; gap: 0; }
  .toc { display: none; }
}
@media (max-width: 720px) {
  body { font-size: 16px; }
  .nav-links { display: none; }
  .hero { padding-top: 44px; }
  .feed-head { display: none; }
  .row { grid-template-columns: auto 1fr auto; grid-template-areas: "id chip pay" "buyer buyer spent"; gap: 8px 12px; }
  .row .id { grid-area: id; } .row .out { grid-area: chip; } .row .pay { grid-area: pay; }
  .row .buyer { grid-area: buyer; } .row .spent { grid-area: spent; }
  .kv { grid-template-columns: 1fr auto; }
  .kv .k { grid-column: 1 / -1; padding-bottom: 0; border-bottom: 0; }
  section { padding-top: 72px; }
  .big-card, .card, .odd { padding: 22px; }
  .stage .tag { font-size: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
