:root {
  --bg: #0b0c0b;
  --bg2: #111311;
  --card: rgba(22, 25, 22, .82);
  --line: rgba(255, 255, 255, .09);
  --line2: rgba(255, 255, 255, .16);
  --text: #f4f3ef;
  --muted: #9a9e98;
  --accent: #3bea5b;
  --accent-dim: rgba(59, 234, 91, .14);
  --warn: #ffb547;
  --bad: #ff6b6b;
  --r: 18px;
  --display: "Bricolage Grotesque", system-ui, sans-serif;
  --body: "Inter", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
  --hand: "Caveat", cursive;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; color: var(--text); font: 16px/1.55 var(--body); overflow-x: hidden;
  background:
    radial-gradient(1000px 600px at 80% -10%, rgba(59, 234, 91, .08), transparent 60%),
    radial-gradient(rgba(255, 255, 255, .055) 1px, transparent 1.2px) 0 0 / 22px 22px,
    var(--bg);
}
a { color: inherit; }
img { max-width: 100%; }
.muted { color: var(--muted); }
.ca-room { height: 0; }

/* nav */
.nav {
  position: sticky; top: 0; z-index: 50; display: flex; align-items: center; gap: 24px;
  padding: 12px clamp(16px, 4vw, 48px); background: rgba(11, 12, 11, .78); backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font: 700 18px var(--display); }
.brand img { border-radius: 8px; }
.links { display: flex; gap: 22px; margin-left: auto; }
.links a { text-decoration: none; color: var(--muted); font-size: 14px; transition: color .2s; }
.links a:hover { color: var(--text); }

/* buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 13px 22px; border-radius: 999px;
  font: 600 15px var(--body); text-decoration: none; cursor: pointer; border: 1px solid transparent;
  transition: transform .15s, background .2s, border-color .2s, box-shadow .2s;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--accent); color: #062b0e; box-shadow: 0 0 0 0 rgba(59, 234, 91, .4); }
.btn-primary:hover { box-shadow: 0 8px 30px -8px rgba(59, 234, 91, .6); }
.btn-primary:disabled { opacity: .55; cursor: wait; transform: none; }
.btn-ghost { background: rgba(255, 255, 255, .04); color: var(--text); border-color: var(--line2); }
.btn-ghost:hover { border-color: rgba(255, 255, 255, .35); }
.btn-sm { padding: 8px 16px; font-size: 13px; }
.btn[aria-disabled="true"] { opacity: .6; }
.wide { width: 100%; }
.chip {
  font: 500 13px var(--body); color: var(--text); background: rgba(255, 255, 255, .05); border: 1px solid var(--line2);
  border-radius: 999px; padding: 7px 13px; cursor: pointer; transition: background .2s, border-color .2s;
}
.chip:hover { border-color: var(--accent); }
.chip.on { background: var(--accent-dim); border-color: var(--accent); color: var(--accent); }

/* hero */
.hero {
  display: grid; grid-template-columns: 1.1fr .9fr; align-items: center; gap: 24px;
  max-width: 1240px; margin: 0 auto; padding: clamp(24px, 5vw, 56px) clamp(16px, 4vw, 48px) 28px;
}
.eyebrow { display: inline-flex; align-items: center; gap: 10px; font: 500 13px var(--mono); color: var(--muted); text-transform: uppercase; letter-spacing: .08em; margin: 0 0 14px; }
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 12px var(--accent); animation: pulse 2s infinite; }
@keyframes pulse { 50% { opacity: .35; } }
.hero-copy { container-type: inline-size; min-width: 0; }
.title {
  position: relative; margin: 0; font: 800 clamp(64px, 24cqi, 168px)/.86 var(--display); letter-spacing: -.045em;
}
.scribble { position: absolute; left: 0; bottom: -.12em; width: 62%; height: .22em; overflow: visible; }
.scribble path { fill: none; stroke: var(--accent); stroke-width: 7; stroke-linecap: round; stroke-dasharray: 700; stroke-dashoffset: 700; animation: draw 1.4s .4s ease-out forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.lede { font-size: clamp(17px, 2vw, 21px); color: #d7d8d3; max-width: 30em; margin: 34px 0 26px; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-facts { list-style: none; padding: 0; margin: 28px 0 0; display: flex; flex-wrap: wrap; gap: 8px 22px; font: 13px var(--mono); color: var(--muted); }
.hero-facts b { color: var(--text); font-weight: 600; }
.hero-art { position: relative; display: flex; justify-content: center; }
.hero-art img { width: min(470px, 100%); }
.hand-note { position: absolute; right: 2%; bottom: 6%; margin: 0; font: 28px/1 var(--hand); color: var(--accent); transform: rotate(-6deg); pointer-events: none; }

/* strip */
.strip { display: flex; align-items: center; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: rgba(255, 255, 255, .02); }
.strip-label { flex: none; padding: 12px 18px; font: 600 11px var(--mono); text-transform: uppercase; letter-spacing: .08em; color: var(--accent); border-right: 1px solid var(--line); }
.strip-track { overflow: hidden; flex: 1; mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent); }
.strip-row { display: flex; gap: 28px; width: max-content; padding: 10px 0; }
.strip-row.run { animation: marquee 60s linear infinite; }
.strip-track:hover .strip-row { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-50%); } }
.strip-item { display: inline-flex; align-items: center; gap: 8px; font: 13px var(--mono); white-space: nowrap; background: none; border: 0; color: var(--text); cursor: pointer; padding: 0; }
.strip-item img, .coin-logo { width: 22px; height: 22px; border-radius: 50%; object-fit: cover; background: #222; }
.strip-item .tag { color: var(--muted); font-size: 11px; border: 1px dashed var(--line2); border-radius: 6px; padding: 1px 6px; }

/* sections */
.section { max-width: 1240px; margin: 0 auto; padding: clamp(56px, 8vw, 96px) clamp(16px, 4vw, 48px) 0; }
.sec-head { max-width: 760px; margin-bottom: 28px; }
.label { font: 600 11px var(--mono); text-transform: uppercase; letter-spacing: .12em; color: var(--accent); margin: 0 0 10px; }
h2 { font: 700 clamp(32px, 5vw, 54px)/1.02 var(--display); letter-spacing: -.03em; margin: 0 0 12px; }
h2 em { font-style: normal; color: var(--accent); }
.sub { color: var(--muted); font-size: 17px; margin: 0; max-width: 40em; }
.panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; }

/* studio */
.studio { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: 18px; }
.pad-col { min-width: 0; }
.tools { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 12px; }
.swatches, .sizes, .tool-btns { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.sw { width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--line2); cursor: pointer; transition: transform .15s; padding: 0; }
.sw.on { border-color: var(--text); transform: scale(1.12); box-shadow: 0 0 0 3px rgba(255, 255, 255, .12); }
.sz { width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--line2); background: rgba(255, 255, 255, .04); cursor: pointer; display: grid; place-items: center; padding: 0; }
.sz i { display: block; border-radius: 50%; background: var(--text); }
.sz.on { border-color: var(--accent); }
.tool-btns { margin-left: auto; }
.pad-wrap { position: relative; border-radius: var(--r); overflow: hidden; border: 1px solid var(--line2); box-shadow: 0 30px 80px -40px rgba(0, 0, 0, .9); }
#pad { display: block; width: 100%; height: auto; aspect-ratio: 1; touch-action: none; cursor: crosshair; background: #fbfaf6; }
.pad-badge { position: absolute; left: 12px; bottom: 12px; right: 12px; text-align: center; font: 12px var(--mono); color: #fff; background: rgba(11, 12, 11, .78); border-radius: 10px; padding: 8px 10px; pointer-events: none; transition: opacity .3s; }
.pad-badge.hide { opacity: 0; }
.toast { position: absolute; top: 12px; left: 50%; transform: translate(-50%, -8px); font: 600 13px var(--body); background: var(--warn); color: #241600; padding: 8px 14px; border-radius: 999px; opacity: 0; pointer-events: none; transition: opacity .25s, transform .25s; white-space: nowrap; max-width: 92%; overflow: hidden; text-overflow: ellipsis; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

.side { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.tiles-3 { grid-template-columns: repeat(3, 1fr); }
.tile { background: rgba(255, 255, 255, .03); border: 1px solid var(--line); border-radius: 12px; padding: 10px; min-width: 0; }
.tile span { display: block; font: 600 20px var(--mono); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tile small { color: var(--muted); font-size: 11px; }
.speed { margin-top: 12px; }
.speed-head { display: flex; justify-content: space-between; font: 11px var(--mono); color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
#speedSvg { width: 100%; height: 54px; display: block; margin-top: 6px; background: linear-gradient(180deg, transparent 49.5%, var(--line) 50%, transparent 50.5%); }
#speedPath { fill: none; stroke: var(--accent); stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.hashline { margin-top: 12px; display: flex; gap: 10px; align-items: baseline; font: 11px var(--mono); color: var(--muted); min-width: 0; }
.hashline code { color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }

.form { display: flex; flex-direction: column; gap: 10px; }
.form label { display: flex; flex-direction: column; gap: 5px; font-size: 12px; color: var(--muted); min-width: 0; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
input {
  font: 15px var(--body); color: var(--text); background: rgba(0, 0, 0, .35); border: 1px solid var(--line2); border-radius: 12px;
  padding: 11px 13px; outline: none; width: 100%; min-width: 0; transition: border-color .2s;
}
input:focus { border-color: var(--accent); }
.steps { list-style: none; counter-reset: s; padding: 0; margin: 4px 0 0; display: grid; gap: 6px; }
.steps li { counter-increment: s; display: flex; gap: 10px; align-items: center; font-size: 13px; color: var(--muted); }
.steps li::before { content: counter(s); flex: none; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font: 600 11px var(--mono); border: 1px solid var(--line2); }
.steps li.go { color: var(--text); }
.steps li.go::before { border-color: var(--accent); color: var(--accent); animation: pulse 1s infinite; }
.steps li.ok { color: var(--text); }
.steps li.ok::before { content: "✓"; background: var(--accent); color: #062b0e; border-color: var(--accent); }
.steps li.err::before { content: "!"; background: var(--bad); color: #fff; border-color: var(--bad); }
.fine { font-size: 12px; color: var(--muted); margin: 2px 0 0; }
.fine.bad { color: var(--bad); }
.done { border: 1px solid var(--accent); background: var(--accent-dim); border-radius: 12px; padding: 12px; font-size: 14px; display: flex; flex-direction: column; gap: 8px; }
.done .cta { gap: 8px; }

/* proof */
.search { display: flex; gap: 10px; max-width: 760px; }
.search input { font-family: var(--mono); font-size: 14px; border-radius: 999px; padding: 13px 18px; }
.quick { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 22px; }
.quick .chip { display: inline-flex; align-items: center; gap: 7px; }
.quick .chip img { width: 18px; height: 18px; border-radius: 50%; object-fit: cover; }
.result { display: grid; grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr); gap: 18px; }
.res-right { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.res-coin { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; min-height: 44px; min-width: 0; }
.res-coin img { width: 44px; height: 44px; border-radius: 12px; object-fit: cover; background: #222; flex: none; }
.res-coin b { font: 700 20px var(--display); display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.res-coin code { font: 12px var(--mono); color: var(--muted); }
.res-coin .grow { min-width: 0; flex: 1; }
.player { position: relative; border-radius: 14px; overflow: hidden; border: 1px solid var(--line2); background: #151715; }
#replay { display: block; width: 100%; height: auto; aspect-ratio: 1; }
.player-empty { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 24px; text-align: center; background: rgba(11, 12, 11, .55); }
.player-empty img { width: 46%; aspect-ratio: 1; object-fit: cover; border-radius: 16px; filter: grayscale(.3); }
.player-empty p { margin: 0; font-size: 14px; color: #d9dad5; max-width: 26em; }
.controls { display: flex; align-items: center; gap: 10px; margin-top: 12px; }
.controls input[type=range] { flex: 1; accent-color: var(--accent); padding: 0; border: 0; background: none; }
.checks, .findings { list-style: none; padding: 0; margin: 0; display: grid; gap: 9px; }
.checks li, .findings li { display: flex; gap: 10px; font-size: 14px; line-height: 1.45; min-width: 0; overflow-wrap: anywhere; }
.checks li::before, .findings li::before { flex: none; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font: 700 11px var(--mono); margin-top: 1px; }
.checks .ok::before, .findings .ok::before { content: "✓"; background: var(--accent); color: #062b0e; }
.checks .no::before, .findings .warn::before { content: "!"; background: var(--warn); color: #241600; }
.checks .bad::before, .findings .bad::before { content: "×"; background: var(--bad); color: #fff; }
.checks .pending::before, .findings .info::before { content: "·"; border: 1px solid var(--line2); color: var(--muted); }
.findings b, .checks b { font-weight: 600; }
.findings a { color: var(--accent); }

/* flow */
.flow { display: grid; grid-template-columns: repeat(5, 1fr); gap: 0; position: relative; margin-bottom: 28px; }
.node { position: relative; text-align: center; padding: 18px 10px; }
.node::after { content: ""; position: absolute; top: 40px; left: calc(50% + 30px); right: calc(-50% + 30px); border-top: 2px dashed var(--line2); }
.node:last-child::after { display: none; }
.node b { display: grid; place-items: center; width: 46px; height: 46px; margin: 0 auto 10px; border-radius: 50%; border: 1px solid var(--line2); background: var(--bg2); font: 600 18px var(--mono); }
.node span { display: block; font: 700 17px var(--display); }
.node small { color: var(--muted); font-size: 13px; }
.node-accent b { border-color: var(--accent); color: var(--accent); box-shadow: 0 0 24px -4px var(--accent); }
.faq { display: grid; gap: 10px; max-width: 860px; }
.faq details { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 14px 18px; }
.faq summary { cursor: pointer; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::after { content: "+"; color: var(--accent); font-family: var(--mono); }
.faq details[open] summary::after { content: "–"; }
.faq p { color: var(--muted); margin: 10px 0 0; }

/* token */
.token { display: grid; grid-template-columns: .8fr 1.2fr; gap: 32px; align-items: center; padding-bottom: 40px; }
.token-art { display: flex; justify-content: center; }
.token-art img { width: min(380px, 100%); }
.token-copy { min-width: 0; }
.token-copy .sub { margin-bottom: 20px; }
.ca-box { display: flex; align-items: center; gap: 10px; border: 1px dashed var(--line2); border-radius: 14px; padding: 10px 10px 10px 14px; margin-bottom: 16px; min-width: 0; background: rgba(0, 0, 0, .25); }
.ca-label { font: 600 11px var(--mono); color: var(--accent); }
.ca-box code { flex: 1; min-width: 0; font: 14px var(--mono); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; padding: 28px clamp(16px, 4vw, 48px); border-top: 1px solid var(--line); margin-top: 60px; font-size: 13px; }
.foot span { display: inline-flex; align-items: center; gap: 8px; }

/* reveal (always visible after 1.5 s even if JS fails) */
.reveal { animation: rise .8s ease-out both; }
.js .reveal { opacity: 0; transform: translateY(14px); animation: none; transition: opacity .7s ease-out, transform .7s ease-out; }
.js .reveal.in { opacity: 1; transform: none; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }

@media (max-width: 960px) {
  .hero { grid-template-columns: 1fr; }
  .hero-art img { width: min(320px, 80%); }
  .studio, .result, .token { grid-template-columns: 1fr; }
  .flow { grid-template-columns: 1fr; gap: 6px; }
  .node { display: grid; grid-template-columns: 46px 1fr; text-align: left; column-gap: 14px; padding: 8px 0; }
  .node b { margin: 0; grid-row: span 2; }
  .node::after { display: none; }
}
@media (max-width: 640px) {
  .links { display: none; }
  #connectBtn { margin-left: auto; }
  .tiles { grid-template-columns: repeat(2, 1fr); }
  .tiles-3 { grid-template-columns: repeat(3, 1fr); }
  .tile span { font-size: 16px; }
  .row2 { grid-template-columns: 1fr; }
  .tool-btns { margin-left: 0; }
  .search { flex-direction: column; }
  .hand-note { font-size: 22px; }
  .strip-label { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .strip-row.run, .dot, .scribble path { animation: none; stroke-dashoffset: 0; }
}
