/* ─── Tokens ──────────────────────────────────────────────────────────── */
:root {
  --ink: #000000;
  --plate: #121314;
  --plate-2: #1a1c1e;
  --line: #24272a;
  --line-2: #33373b;
  --text: #f3f4ef;
  --mute: #8d9298;
  --dim: #5d6267;
  --neon: #ccff00;
  --sell: #ff5a36;
  --focus: #ccff00;

  --sans: 'Geist', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --serif: 'Newsreader', 'Iowan Old Style', Georgia, serif;
  --mono: 'Geist Mono', ui-monospace, 'SF Mono', Menlo, Consolas, monospace;

  --fs-xs: 0.75rem;
  --fs-sm: 0.8125rem;
  --fs-md: 0.9375rem;
  --fs-lg: 1.125rem;
  --fs-xl: 1.375rem;
  --fs-2xl: 1.75rem;
  --fs-3xl: 2.5rem;

  --r-sm: 6px;
  --r-md: 12px;
  --r-pill: 999px;
  --wrap: 1200px;
  --gut: clamp(16px, 4vw, 40px);
  --top-h: 64px;
  --ease: cubic-bezier(.2, .8, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--top-h) + 16px); }
body {
  margin: 0;
  background: var(--ink);
  color: var(--text);
  font: 400 var(--fs-md)/1.55 var(--sans);
  font-feature-settings: 'ss01', 'cv11';
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
main { flex: 1; outline: none; }
#view:focus, #view:focus-visible { outline: none; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
::selection { background: var(--neon); color: #000; }
.num { font-variant-numeric: tabular-nums; }
.mono { font-family: var(--mono); font-size: 0.92em; letter-spacing: -0.01em; }
.mute { color: var(--mute); }
.up { color: var(--neon); }
.down { color: var(--sell); }
.skip { position: absolute; left: -999px; top: 8px; background: var(--neon); color: #000; padding: 8px 12px; border-radius: var(--r-sm); z-index: 100; }
.skip:focus { left: 8px; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gut); }
[hidden] { display: none !important; }

/* ─── Header ──────────────────────────────────────────────────────────── */
.top {
  position: sticky; top: 0; z-index: 40;
  background: rgba(0, 0, 0, .82);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--line);
  padding-top: env(safe-area-inset-top, 0px);
}
.top__in { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gut); height: var(--top-h); display: flex; align-items: center; gap: 28px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: var(--fs-lg); letter-spacing: -0.02em; flex-shrink: 0; }
.brand__logo { width: 28px; height: 28px; border-radius: 7px; object-fit: contain; }
.nav { display: flex; gap: 4px; }
.nav a { padding: 8px 12px; border-radius: var(--r-pill); color: var(--mute); font-weight: 500; transition: color .15s, background .15s; }
.nav a:hover { color: var(--text); }
.nav a[aria-current='page'] { color: var(--text); background: var(--plate-2); }
.top__right { margin-left: auto; display: flex; align-items: center; gap: 10px; }

.ca {
  display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 12px 0 6px;
  border: 1px solid var(--line-2); border-radius: var(--r-pill); background: var(--plate);
  transition: border-color .15s;
}
.ca:hover { border-color: var(--neon); }
.ca__sym { background: var(--neon); color: #000; font-weight: 600; font-size: var(--fs-xs); padding: 3px 8px; border-radius: var(--r-pill); }
.ca__addr { font-family: var(--mono); font-size: var(--fs-sm); color: var(--mute); }
.ca[data-empty] { cursor: default; }
.ca[data-empty]:hover { border-color: var(--line-2); }

.bag-btn { gap: 6px; position: relative; }
.bag-btn__n { background: var(--neon); color: #000; font-size: 11px; font-weight: 700; min-width: 18px; height: 18px; border-radius: 9px; display: inline-grid; place-items: center; padding: 0 5px; }

.menu-btn { display: none; width: 40px; height: 40px; border-radius: var(--r-pill); border: 1px solid var(--line-2); position: relative; }
.menu-btn span { position: absolute; left: 12px; right: 12px; height: 1.6px; background: var(--text); transition: transform .2s var(--ease); }
.menu-btn span:first-child { top: 15px; }
.menu-btn span:last-child { top: 23px; }
.menu-btn[aria-expanded='true'] span:first-child { transform: translateY(4px) rotate(45deg); }
.menu-btn[aria-expanded='true'] span:last-child { transform: translateY(-4px) rotate(-45deg); }

/* ─── Buttons & inputs ────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 40px; padding: 0 18px; border-radius: var(--r-pill); font-weight: 600; font-size: var(--fs-md);
  background: var(--neon); color: #000; white-space: nowrap;
  transition: transform .12s var(--ease), filter .15s, background .15s, border-color .15s;
}
.btn:hover { filter: brightness(1.08); }
.btn:active { transform: scale(.98); }
.btn[disabled] { opacity: .45; pointer-events: none; }
.btn--ghost { background: transparent; color: var(--text); border: 1px solid var(--line-2); }
.btn--ghost:hover { border-color: var(--text); filter: none; }
.btn--sm { height: 32px; padding: 0 12px; font-size: var(--fs-sm); }
.btn--lg { height: 56px; padding: 0 28px; font-size: var(--fs-lg); }
.btn--danger { background: transparent; color: var(--sell); border: 1px solid rgba(255, 90, 54, .4); }
.icon-btn { width: 36px; height: 36px; border-radius: var(--r-pill); display: inline-grid; place-items: center; color: var(--mute); transition: color .15s, background .15s; }
.icon-btn:hover { color: var(--text); background: var(--plate-2); }

.input {
  height: 44px; padding: 0 14px; border-radius: var(--r-md); border: 1px solid var(--line-2);
  background: var(--plate); outline: none; width: 100%; transition: border-color .15s;
}
.input:focus { border-color: var(--neon); }
textarea.input { height: auto; min-height: 96px; padding: 12px 14px; resize: vertical; line-height: 1.5; }
select.input { appearance: none; padding-right: 36px; background-image: linear-gradient(45deg, transparent 50%, var(--mute) 50%), linear-gradient(135deg, var(--mute) 50%, transparent 50%); background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%; background-size: 5px 5px; background-repeat: no-repeat; }

.seg { display: inline-flex; padding: 3px; border-radius: var(--r-pill); background: var(--plate); border: 1px solid var(--line); }
.seg button { height: 32px; padding: 0 14px; border-radius: var(--r-pill); color: var(--mute); font-weight: 500; font-size: var(--fs-sm); transition: color .15s, background .15s; }
.seg button[aria-pressed='true'] { background: var(--plate-2); color: var(--text); box-shadow: inset 0 0 0 1px var(--line-2); }
.seg button:hover { color: var(--text); }
.seg button[disabled] { opacity: .35; cursor: not-allowed; }
.seg button[disabled]:hover { color: var(--mute); }

/* ─── Hero / scan ─────────────────────────────────────────────────────── */
.hero { padding: clamp(48px, 9vw, 120px) 0 56px; border-bottom: 1px solid var(--line); }
.hero h1 {
  font-family: var(--serif); font-weight: 400; margin: 0;
  font-size: clamp(2.75rem, 8.4vw, 6.75rem); line-height: .94; letter-spacing: -0.035em;
  font-variation-settings: 'opsz' 72; max-width: 12ch;
}
.hero__sub { margin: 24px 0 40px; max-width: 54ch; font-size: var(--fs-lg); color: var(--mute); line-height: 1.5; }

.scan { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; max-width: 920px; }
.scan__field { position: relative; }
.scan__input {
  height: 56px; font-family: var(--mono); font-size: 1rem; padding: 0 18px; border-radius: var(--r-pill);
  border: 1px solid var(--line-2); background: var(--plate); width: 100%; outline: none; transition: border-color .15s, box-shadow .15s;
}
.scan__input::placeholder { color: var(--dim); font-family: var(--sans); }
.scan__input:focus { border-color: var(--neon); box-shadow: 0 0 0 4px rgba(204, 255, 0, .12); }
.scan__hint { grid-column: 1 / -1; font-size: var(--fs-sm); color: var(--mute); min-height: 1.4em; }
.scan__hint[data-error] { color: var(--sell); }
.scan .seg { height: 56px; align-items: center; padding: 4px; }
.scan .seg button { height: 46px; padding: 0 16px; }

/* ─── Grip ladder (the signature element) ─────────────────────────────── */
.ladder { margin-top: 56px; position: relative; }
.ladder__head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; margin-bottom: 14px; }
.ladder__head h2 { margin: 0; font-size: var(--fs-md); font-weight: 500; color: var(--mute); }
.ladder__track { display: grid; grid-template-columns: repeat(10, 1fr); gap: 3px; position: relative; }
.ladder__seg { position: relative; padding-top: 18px; text-align: left; }
.ladder__bar { height: 10px; border-radius: 2px; background: var(--c); opacity: .9; transition: opacity .2s, transform .2s var(--ease); }
.ladder__seg:first-child .ladder__bar { border-radius: 5px 2px 2px 5px; }
.ladder__seg:last-child .ladder__bar { border-radius: 2px 5px 5px 2px; }
.ladder__n { position: absolute; top: 0; left: 0; font-size: var(--fs-xs); color: var(--dim); font-variant-numeric: tabular-nums; }
.ladder__name { display: block; margin-top: 10px; font-size: var(--fs-xs); color: var(--mute); line-height: 1.25; padding-right: 4px; }
.ladder[data-active] .ladder__bar { opacity: .25; }
.ladder[data-active] .ladder__seg[data-on] .ladder__bar { opacity: 1; transform: scaleY(1.6); }
.ladder[data-active] .ladder__seg[data-on] .ladder__name { color: var(--text); font-weight: 600; }
.ladder__seg:hover .ladder__bar { opacity: 1; }
.ladder__marker {
  position: absolute; top: 2px; width: 0; height: 0;
  border-left: 6px solid transparent; border-right: 6px solid transparent; border-top: 8px solid var(--text);
  left: calc(var(--pos, 0) * 10% + 5% - 6px); transition: left .9s var(--ease);
}
.ladder--compact .ladder__name { display: none; }
.ladder--compact { margin-top: 20px; }

/* ─── Sections ────────────────────────────────────────────────────────── */
.section { padding: 64px 0; border-bottom: 1px solid var(--line); }
.section:last-child { border-bottom: 0; }
.section__head { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.section__head h2 { margin: 0; font-family: var(--serif); font-weight: 400; font-size: var(--fs-3xl); letter-spacing: -0.02em; line-height: 1.05; }
.section__head p { margin: 6px 0 0; color: var(--mute); }
.split { display: grid; grid-template-columns: 1.15fr 1fr; gap: 48px; }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; counter-reset: step; border-top: 1px solid var(--line); }
.step { padding: 24px 24px 8px 0; counter-increment: step; }
.step + .step { padding-left: 24px; border-left: 1px solid var(--line); }
.step::before { content: counter(step); display: block; font-family: var(--serif); font-size: var(--fs-3xl); line-height: 1; color: var(--neon); margin-bottom: 16px; }
.step h3 { margin: 0 0 8px; font-size: var(--fs-lg); font-weight: 600; }
.step p { margin: 0; color: var(--mute); max-width: 36ch; }

/* recent feed */
.feed { display: grid; gap: 0; border-top: 1px solid var(--line); }
.feed__row { display: grid; grid-template-columns: 12px 1fr auto; align-items: center; gap: 14px; padding: 14px 4px; border-bottom: 1px solid var(--line); transition: background .15s; }
.feed__row:hover { background: var(--plate); }
.feed__dot { width: 10px; height: 10px; border-radius: 50%; background: var(--c); }
.feed__main { min-width: 0; }
.feed__addr { display: block; font-family: var(--mono); font-size: var(--fs-sm); }
.feed__meta { display: block; }
.feed__meta { font-size: var(--fs-sm); color: var(--mute); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.feed__right { text-align: right; font-size: var(--fs-sm); }

/* ─── Chips & tags ────────────────────────────────────────────────────── */
.chain { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-xs); font-weight: 500; color: var(--mute); padding: 3px 8px 3px 6px; border: 1px solid var(--line-2); border-radius: var(--r-pill); white-space: nowrap; }
.chain::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--chain-c); }
.chain[data-chain='robinhood'] { --chain-c: #ccff00; }
.chain[data-chain='solana'] { --chain-c: #9b7cff; }
.tier {
  display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px 0 4px;
  border-radius: var(--r-pill); font-size: var(--fs-xs); font-weight: 600; white-space: nowrap;
  color: var(--c); background: color-mix(in srgb, var(--c) 12%, transparent); border: 1px solid color-mix(in srgb, var(--c) 35%, transparent);
}
.tier b { display: inline-grid; place-items: center; min-width: 18px; height: 18px; border-radius: 9px; background: var(--c); color: #000; font-size: 11px; padding: 0 4px; }
.tok { display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px 3px 3px; border-radius: var(--r-pill); background: var(--plate-2); font-size: var(--fs-xs); white-space: nowrap; max-width: 100%; }
.tok img, .tok__ph { width: 18px; height: 18px; border-radius: 50%; object-fit: cover; flex-shrink: 0; background: var(--line-2); }
.tok__ph { display: inline-grid; place-items: center; font-size: 9px; color: var(--mute); font-weight: 600; }
.tok__sym { font-weight: 600; overflow: hidden; text-overflow: ellipsis; max-width: 10ch; }

/* ─── Wallet page ─────────────────────────────────────────────────────── */
.wallet-head { padding: 40px 0 32px; border-bottom: 1px solid var(--line); }
.crumbs { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 28px; }
.crumbs .addr { font-family: var(--mono); font-size: var(--fs-md); word-break: break-all; }
.crumbs__actions { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }

.verdict { display: grid; grid-template-columns: auto 1fr auto; gap: 32px; align-items: center; }
.medal {
  width: 132px; height: 132px; border-radius: 50%; position: relative; display: grid; place-items: center;
  background: conic-gradient(var(--c) calc(var(--p, 0) * 1%), var(--line) 0);
  transition: --p 1.2s var(--ease);
}
.medal::after { content: ''; position: absolute; inset: 7px; border-radius: 50%; background: var(--ink); }
.medal__in { position: relative; z-index: 1; text-align: center; line-height: 1; }
.medal__score { font-family: var(--serif); font-size: 3rem; letter-spacing: -0.03em; }
.medal__of { font-size: var(--fs-xs); color: var(--mute); margin-top: 4px; }
@property --p { syntax: '<number>'; inherits: false; initial-value: 0; }
.verdict__tier { font-size: var(--fs-sm); color: var(--mute); margin: 0 0 6px; }
.verdict h1 { margin: 0; font-family: var(--serif); font-weight: 400; font-size: clamp(2.25rem, 5.5vw, 4rem); letter-spacing: -0.03em; line-height: 1; color: var(--c); }
.verdict__blurb { margin: 10px 0 0; color: var(--mute); max-width: 52ch; }
.verdict__side { display: flex; flex-direction: column; gap: 8px; align-items: flex-end; }

.stats { display: grid; grid-template-columns: repeat(6, 1fr); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin-top: 32px; }
.stat { padding: 18px 16px 18px 0; }
.stat + .stat { padding-left: 16px; border-left: 1px solid var(--line); }
.stat__k { font-size: var(--fs-sm); color: var(--mute); margin-bottom: 6px; }
.stat__v { font-size: var(--fs-xl); font-weight: 600; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.stat__s { font-size: var(--fs-xs); color: var(--mute); margin-top: 2px; font-variant-numeric: tabular-nums; }

.scan-meta { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: var(--fs-sm); color: var(--mute); margin-top: 16px; }
.scan-meta button { color: var(--text); text-decoration: underline; text-underline-offset: 3px; }

.panel-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 48px; padding-block: 40px; }
.panel-aside { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 48px; padding-top: 32px; border-top: 1px solid var(--line); }
.panel { min-width: 0; }
.panel h2 { margin: 0 0 4px; font-size: var(--fs-xl); font-weight: 600; letter-spacing: -0.02em; }
.panel__sub { margin: 0 0 16px; color: var(--mute); font-size: var(--fs-sm); }

/* hold-time histogram */
.hist { display: grid; grid-template-columns: repeat(9, minmax(0, 1fr)); gap: 6px; align-items: end; height: 140px; padding-top: 10px; }
.hist__col { display: flex; flex-direction: column; justify-content: flex-end; height: 100%; gap: 6px; }
.hist__bar { border-radius: 3px 3px 0 0; background: var(--line-2); min-height: 2px; transform-origin: bottom; animation: grow .6s var(--ease) both; }
.hist__bar[data-jeet] { background: var(--sell); }
.hist__lbl { font-size: 10px; color: var(--mute); text-align: center; white-space: nowrap; overflow: hidden; text-overflow: clip; }
.hist__n { font-size: 10px; color: var(--text); text-align: center; font-variant-numeric: tabular-nums; }
@keyframes grow { from { transform: scaleY(0); } }

/* ─── Tables ──────────────────────────────────────────────────────────── */
.tbl-wrap { overflow-x: auto; border-top: 1px solid var(--line); -webkit-overflow-scrolling: touch; }
.tbl { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); min-width: 760px; }
.tbl th { text-align: left; font-weight: 500; color: var(--mute); padding: 12px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; position: sticky; top: 0; background: var(--ink); }
.tbl td { padding: 12px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; font-variant-numeric: tabular-nums; }
.tbl th.r, .tbl td.r { text-align: right; white-space: nowrap; }
.tbl tbody tr { transition: background .12s; }
.tbl tbody tr:hover { background: var(--plate); }
.tbl .rank { color: var(--mute); width: 36px; }
.tbl .tokcell { display: flex; align-items: center; gap: 10px; min-width: 160px; }
.tbl .tokcell img, .tbl .tokcell .tok__ph { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; background: var(--line-2); flex-shrink: 0; }
.tbl .tokcell .tok__ph { display: grid; place-items: center; font-size: 11px; }
.tbl .tokcell b { display: block; font-weight: 600; }
.tbl .tokcell small { color: var(--mute); font-family: var(--mono); font-size: 11px; }
.tbl .row-actions { display: flex; gap: 2px; justify-content: flex-end; }
.tbl .expand td { background: var(--plate); padding: 0; }
.tbl .expand .inner { padding: 16px 10px 20px 46px; }
.status { font-size: var(--fs-xs); font-weight: 600; padding: 2px 8px; border-radius: var(--r-pill); white-space: nowrap; }
.status[data-s='jeeted'] { color: var(--sell); background: rgba(255, 90, 54, .12); }
.status[data-s='exited'] { color: var(--text); background: var(--plate-2); }
.status[data-s='trimmed'] { color: var(--mute); background: var(--plate-2); }
.status[data-s='holding'] { color: var(--neon); background: rgba(204, 255, 0, .1); }
.bar-mini { display: inline-block; width: 48px; height: 4px; border-radius: 2px; background: var(--line-2); vertical-align: middle; margin-left: 8px; overflow: hidden; }
.bar-mini i { display: block; height: 100%; background: var(--sell); }
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 16px; }
.toolbar .spacer { flex: 1; }
.toolbar select.input { width: auto; height: 38px; border-radius: var(--r-pill); font-size: var(--fs-sm); }
.jeet-list { display: flex; flex-wrap: wrap; gap: 6px; }
.jeet-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.jeet-card { padding: 12px; border-radius: var(--r-md); background: var(--ink); border: 1px solid var(--line); display: grid; gap: 6px; }
.jeet-card__top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.jeet-card dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 2px 12px; font-size: var(--fs-xs); }
.jeet-card dt { color: var(--mute); }
.jeet-card dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; }

/* ─── Comments ────────────────────────────────────────────────────────── */
.composer { display: grid; gap: 10px; margin-bottom: 20px; }
.composer__row { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: var(--fs-sm); color: var(--mute); }
.comments { display: grid; }
.cmt { padding: 16px 0; border-bottom: 1px solid var(--line); display: grid; gap: 6px; }
.cmt__head { display: flex; align-items: center; gap: 8px; font-size: var(--fs-sm); }
.cmt__author { font-weight: 600; }
.cmt__time { color: var(--mute); }
.cmt__body { white-space: pre-wrap; word-break: break-word; line-height: 1.5; }
.cmt__foot { display: flex; gap: 4px; align-items: center; }
.like { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; border-radius: var(--r-pill); color: var(--mute); font-size: var(--fs-sm); transition: color .15s, background .15s; font-variant-numeric: tabular-nums; }
.like:hover { background: var(--plate-2); color: var(--text); }
.like[aria-pressed='true'] { color: var(--neon); }
.like svg { width: 15px; height: 15px; }
.like[aria-pressed='true'] svg path { fill: currentColor; }
.empty { padding: 32px 0; color: var(--mute); }
.empty strong { display: block; color: var(--text); font-weight: 600; margin-bottom: 4px; }

/* ─── Scanning state ──────────────────────────────────────────────────── */
.scanning { padding-block: 96px; display: grid; gap: 28px; max-width: 640px; }
.scanning h1 { margin: 0; font-family: var(--serif); font-weight: 400; font-size: clamp(2rem, 5vw, 3.25rem); letter-spacing: -0.03em; line-height: 1.05; }
.scanning__steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.scanning__steps li { display: flex; align-items: center; gap: 12px; color: var(--dim); transition: color .3s; }
.scanning__steps li::before { content: ''; width: 10px; height: 10px; border-radius: 50%; border: 1.5px solid currentColor; flex-shrink: 0; }
.scanning__steps li[data-state='active'] { color: var(--text); }
.scanning__steps li[data-state='active']::before { border-color: var(--neon); background: var(--neon); animation: pulse 1.1s ease-in-out infinite; }
.scanning__steps li[data-state='done'] { color: var(--mute); }
.scanning__steps li[data-state='done']::before { background: var(--mute); border-color: var(--mute); }
@keyframes pulse { 50% { opacity: .35; } }
.skel { background: linear-gradient(90deg, var(--plate) 0%, var(--plate-2) 50%, var(--plate) 100%); background-size: 200% 100%; animation: shimmer 1.4s linear infinite; border-radius: var(--r-sm); }
@keyframes shimmer { to { background-position: -200% 0; } }

.notice { padding-block: 48px; max-width: 620px; }
.notice h1 { font-family: var(--serif); font-weight: 400; font-size: var(--fs-3xl); letter-spacing: -0.02em; margin: 0 0 12px; }
.notice p { color: var(--mute); margin: 0 0 24px; }

/* ─── Leaderboard ─────────────────────────────────────────────────────── */
.page-head { padding-block: 56px 28px; }
.page-head h1 { margin: 0; font-family: var(--serif); font-weight: 400; font-size: clamp(2.5rem, 6vw, 4.5rem); letter-spacing: -0.035em; line-height: 1; }
.page-head p { margin: 14px 0 0; color: var(--mute); max-width: 60ch; font-size: var(--fs-lg); }
.lb-wallet { display: flex; flex-direction: column; gap: 4px; }
.lb-wallet a { font-family: var(--mono); font-size: var(--fs-sm); white-space: nowrap; }
.lb-wallet a:hover { color: var(--neon); }
.podium { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin-bottom: 32px; }
.podium__item { padding: 24px 20px 24px 0; display: grid; gap: 10px; }
.podium__item + .podium__item { padding-left: 20px; border-left: 1px solid var(--line); }
.podium__rank { font-family: var(--serif); font-size: var(--fs-3xl); line-height: 1; color: var(--c); }
.podium__addr { font-family: var(--mono); font-size: var(--fs-sm); }
.podium__nums { display: flex; gap: 18px; font-size: var(--fs-sm); color: var(--mute); }
.podium__nums b { color: var(--text); font-weight: 600; display: block; font-size: var(--fs-lg); }
.pager { display: flex; justify-content: center; gap: 10px; padding: 24px 0; }

/* ─── Docs ────────────────────────────────────────────────────────────── */
.docs { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 56px; padding-block: 48px 80px; }
.toc { position: sticky; top: calc(var(--top-h) + 24px); align-self: start; display: grid; gap: 2px; font-size: var(--fs-sm); }
.toc a { padding: 6px 10px; border-radius: var(--r-sm); color: var(--mute); border-left: 2px solid transparent; }
.toc a:hover { color: var(--text); background: var(--plate); }
.toc a[data-on] { color: var(--text); border-left-color: var(--neon); border-radius: 0 var(--r-sm) var(--r-sm) 0; }
.prose { max-width: 72ch; min-width: 0; }
.prose td code, .prose li code { overflow-wrap: anywhere; }
.toc { min-width: 0; }
.prose h1 { font-family: var(--serif); font-weight: 400; font-size: clamp(2.5rem, 5vw, 3.75rem); letter-spacing: -0.03em; line-height: 1; margin: 0 0 16px; }
.prose h2 { font-size: var(--fs-2xl); font-weight: 600; letter-spacing: -0.02em; margin: 56px 0 12px; padding-top: 8px; }
.prose h3 { font-size: var(--fs-lg); font-weight: 600; margin: 28px 0 8px; }
.prose p, .prose li { color: #c9ccc6; line-height: 1.65; }
.prose ul, .prose ol { padding-left: 20px; }
.prose li { margin: 4px 0; }
.prose code { font-family: var(--mono); font-size: .88em; background: var(--plate-2); padding: 2px 6px; border-radius: 4px; color: var(--text); }
.prose pre { background: var(--plate); border: 1px solid var(--line); border-radius: var(--r-md); padding: 16px; overflow-x: auto; font-family: var(--mono); font-size: var(--fs-sm); line-height: 1.55; }
.prose pre code { background: none; padding: 0; }
.prose a { color: var(--neon); text-decoration: underline; text-underline-offset: 3px; }
.prose .lead { font-size: var(--fs-lg); color: var(--mute); }
.prose table { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); margin: 16px 0; }
.prose th, .prose td { text-align: left; padding: 10px 12px 10px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.prose th { color: var(--mute); font-weight: 500; }
.formula { font-family: var(--mono); font-size: var(--fs-sm); background: var(--plate); border-left: 2px solid var(--neon); padding: 14px 16px; border-radius: 0 var(--r-sm) var(--r-sm) 0; color: var(--text); white-space: pre-wrap; }
.tier-table td:first-child { width: 40px; }

/* ─── Roadmap ─────────────────────────────────────────────────────────── */
.road { list-style: none; margin: 0; padding: 0 0 80px; position: relative; }
.road::before { content: ''; position: absolute; left: 11px; top: 8px; bottom: 80px; width: 2px; background: var(--line); }
.road__item { position: relative; padding: 0 0 48px 52px; }
.road__dot { position: absolute; left: 4px; top: 6px; width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--line-2); background: var(--ink); }
.road__item[data-state='live'] .road__dot { border-color: var(--neon); background: var(--neon); box-shadow: 0 0 0 6px rgba(204, 255, 0, .12); }
.road__item[data-state='building'] .road__dot { border-color: var(--neon); }
.road__meta { display: flex; align-items: center; gap: 10px; font-size: var(--fs-sm); color: var(--mute); margin-bottom: 6px; }
.road__state { font-weight: 600; font-size: var(--fs-xs); padding: 2px 8px; border-radius: var(--r-pill); background: var(--plate-2); color: var(--mute); }
.road__item[data-state='live'] .road__state { background: var(--neon); color: #000; }
.road__item[data-state='building'] .road__state { color: var(--neon); background: rgba(204, 255, 0, .1); }
.road__item h2 { margin: 0 0 8px; font-family: var(--serif); font-weight: 400; font-size: var(--fs-3xl); letter-spacing: -0.02em; line-height: 1.05; }
.road__item p { margin: 0 0 14px; color: var(--mute); max-width: 62ch; }
.road__item ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; max-width: 62ch; }
.road__item li { display: flex; gap: 10px; color: #c9ccc6; }
.road__item li::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--dim); margin-top: .6em; flex-shrink: 0; }
.road__item[data-state='live'] li::before { background: var(--neon); }
.road__links { display: flex; gap: 10px; margin-top: 16px; flex-wrap: wrap; }

/* ─── Drawer / toast ──────────────────────────────────────────────────── */
.scrim { position: fixed; inset: 0; background: rgba(0, 0, 0, .6); z-index: 60; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(460px, 100vw); z-index: 61;
  background: var(--plate); border-left: 1px solid var(--line-2); display: flex; flex-direction: column;
  transform: translateX(100%); transition: transform .3s var(--ease); padding-top: env(safe-area-inset-top, 0px);
}
.drawer[aria-hidden='false'] { transform: none; }
.drawer__head { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.drawer__head h2 { margin: 0; font-size: var(--fs-lg); font-weight: 600; }
.drawer__body { flex: 1; overflow-y: auto; padding: 20px; display: grid; gap: 16px; align-content: start; }
.bag-list { display: grid; border-top: 1px solid var(--line); }
.bag-item { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: var(--fs-sm); }
.bag-item .mono { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.export-preview { font-family: var(--mono); font-size: 12px; min-height: 160px; max-height: 260px; background: var(--ink); white-space: pre; }
.field { display: grid; gap: 6px; }
.field label { font-size: var(--fs-sm); color: var(--mute); }
.field small { color: var(--mute); font-size: var(--fs-xs); }
.row { display: flex; gap: 8px; flex-wrap: wrap; }

.toast {
  position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); z-index: 80;
  transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  background: var(--text); color: #000; font-weight: 600; font-size: var(--fs-sm);
  padding: 10px 16px; border-radius: var(--r-pill); transition: opacity .2s, transform .25s var(--ease);
}
.toast[data-on] { opacity: 1; transform: translate(-50%, 0); }
.toast[data-kind='error'] { background: var(--sell); color: #000; }

/* ─── Footer ──────────────────────────────────────────────────────────── */
.foot { border-top: 1px solid var(--line); margin-top: 40px; }
.foot__in { max-width: var(--wrap); margin: 0 auto; padding: 32px var(--gut) 40px; display: flex; gap: 24px; justify-content: space-between; flex-wrap: wrap; }
.foot__brand p { margin: 6px 0 0; color: var(--mute); font-size: var(--fs-sm); max-width: 52ch; }
.foot__links { display: flex; gap: 18px; flex-wrap: wrap; font-size: var(--fs-sm); color: var(--mute); }
.foot__links a:hover { color: var(--text); }

/* ─── Responsive ──────────────────────────────────────────────────────── */
@media (max-width: 1080px) {
  .stats { grid-template-columns: repeat(3, 1fr); }
  .stats .stat:nth-child(4) { border-left: 0; padding-left: 0; }
  .stats .stat:nth-child(n + 4) { border-top: 1px solid var(--line); }
  .panel-aside { grid-template-columns: minmax(0, 1fr); gap: 32px; }
}
@media (max-width: 860px) {
  .menu-btn { display: inline-block; }
  .nav {
    position: fixed; top: calc(var(--top-h) + env(safe-area-inset-top, 0px)); left: 0; right: 0; flex-direction: column; gap: 0;
    background: var(--ink); border-bottom: 1px solid var(--line); padding: 8px var(--gut) 16px;
    transform: translateY(-8px); opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s var(--ease);
  }
  .nav[data-open] { transform: none; opacity: 1; pointer-events: auto; }
  .nav a { padding: 14px 4px; border-radius: 0; border-bottom: 1px solid var(--line); font-size: var(--fs-lg); }
  .nav a[aria-current='page'] { background: none; color: var(--neon); }
  .bag-btn span:not(.bag-btn__n) { display: none; }
  .split { grid-template-columns: 1fr; gap: 48px; }
  .steps { grid-template-columns: 1fr; }
  .step + .step { padding-left: 0; border-left: 0; border-top: 1px solid var(--line); }
  .verdict { grid-template-columns: auto 1fr; }
  .verdict__side { grid-column: 1 / -1; flex-direction: row; align-items: center; flex-wrap: wrap; }
  .docs { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .toc { position: static; grid-auto-flow: column; overflow-x: auto; grid-auto-columns: max-content; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
  .toc a[data-on] { border-left-color: transparent; border-bottom: 2px solid var(--neon); border-radius: 0; }
  .podium { grid-template-columns: 1fr; }
  .podium__item + .podium__item { padding-left: 0; border-left: 0; border-top: 1px solid var(--line); }
}
@media (max-width: 640px) {
  .top__in { gap: 10px; }
  .top__right { gap: 6px; }
  .ca__addr { display: none; }
  .ca { padding: 0 6px; height: 32px; }
  .bag-btn { width: 32px; padding: 0; }
  .menu-btn { width: 36px; height: 36px; }
  .menu-btn span { left: 10px; right: 10px; }
  .menu-btn span:first-child { top: 13px; }
  .menu-btn span:last-child { top: 21px; }
  .scan { grid-template-columns: 1fr; }
  .scan .seg { justify-self: start; height: 44px; }
  .scan .seg button { height: 36px; }
  .scan .btn--lg { width: 100%; }
  .ladder__name { display: none; }
  .ladder__seg[data-on] .ladder__name { display: block; position: absolute; white-space: nowrap; }
  .ladder__seg:nth-child(n + 6)[data-on] .ladder__name { right: 0; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stats .stat { border-left: 0 !important; padding-left: 0 !important; border-top: 1px solid var(--line); }
  .stats .stat:nth-child(-n + 2) { border-top: 0; }
  .stats .stat:nth-child(even) { padding-left: 16px !important; border-left: 1px solid var(--line) !important; }
  .medal { width: 96px; height: 96px; }
  .medal__score { font-size: 2.25rem; }
  .crumbs__actions { margin-left: 0; width: 100%; }
  .hist { gap: 3px; }
  .hist__lbl { font-size: 9px; letter-spacing: -0.02em; }
}
@media (max-width: 420px) {
  .brand__name { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}
