:root {
  --bg: #0a0c0f;
  --bg-2: #0e1115;
  --surface: #12161b;
  --surface-2: #181d24;
  --surface-3: #1f252e;
  --line: #232a33;
  --line-2: #2f3844;
  --text: #eef2f6;
  --text-2: #c9d2dd;
  --muted: #8a96a8;
  --dim: #5d6878;
  --sun: #ffb020;
  --sun-2: #ffd27a;
  --sun-ink: #1a1200;
  --sky: #46c6e8;
  --good: #4ade80;
  --bad: #ff5d5d;
  --warn: #ffb020;
  --neutral: #9aa7b8;
  --radius: 12px;
  --radius-sm: 8px;
  --font-display: 'Sora', 'Inter', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, 'Cascadia Mono', Consolas, monospace;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.6 var(--font-body);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main { flex: 1; outline: none; }
a { color: inherit; }
img { max-width: 100%; }
h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.15; margin: 0 0 .5em; letter-spacing: -0.01em; }
h1 { font-size: clamp(2rem, 5vw, 3.4rem); font-weight: 800; letter-spacing: -0.025em; }
h2 { font-size: clamp(1.4rem, 2.6vw, 1.9rem); font-weight: 700; }
h3 { font-size: 1.1rem; font-weight: 700; }
p { margin: 0 0 1em; }
code, .mono { font-family: var(--font-mono); font-size: .92em; }
.muted { color: var(--muted); }
.dim { color: var(--dim); }
.small { font-size: .86rem; }
.tiny { font-size: .76rem; }
.nowrap { white-space: nowrap; }
.wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 20px; }
.skip { position: absolute; left: -999px; top: 0; background: var(--sun); color: var(--sun-ink); padding: 8px 12px; z-index: 100; }
.skip:focus { left: 8px; top: 8px; }
:focus-visible { outline: 2px solid var(--sun); outline-offset: 2px; border-radius: 4px; }

/* ---------- top bar ---------- */
.topbar { position: sticky; top: 0; z-index: 20; background: rgba(10, 12, 15, .86); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.topbar-in { display: flex; align-items: center; gap: 20px; height: 62px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--font-display); font-weight: 700; font-size: 1.15rem; letter-spacing: -0.01em; }
.brand .mark { width: 30px; height: 30px; }
.brand-sm { font-size: 1rem; margin-bottom: 8px; }
.brand-sm .mark { width: 24px; height: 24px; }
.nav { display: flex; gap: 4px; margin-left: auto; }
.nav a { text-decoration: none; color: var(--muted); padding: 6px 10px; border-radius: 6px; font-weight: 500; font-size: .93rem; }
.nav a:hover, .nav a.active { color: var(--text); background: var(--surface-2); }
@media (max-width: 760px) {
  .nav { display: none; }
  .topbar-in > .btn { margin-left: auto; }
}

/* ---------- buttons, inputs ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid var(--line-2); background: var(--surface-2); color: var(--text); font: 600 .93rem/1 var(--font-body); padding: 11px 16px; border-radius: 9px; text-decoration: none; cursor: pointer; white-space: nowrap; transition: background .15s, border-color .15s, transform .05s; }
.btn:hover { background: var(--surface-3); border-color: var(--dim); }
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
.btn-sun { background: var(--sun); border-color: var(--sun); color: var(--sun-ink); }
.btn-sun:hover { background: var(--sun-2); border-color: var(--sun-2); }
.btn-sm { padding: 8px 12px; font-size: .86rem; }
.btn-ghost { background: transparent; }
.btn-danger { border-color: #5a2a2a; color: #ffb4b4; }
input, textarea, select { font: inherit; color: var(--text); background: var(--bg-2); border: 1px solid var(--line-2); border-radius: 9px; padding: 11px 13px; width: 100%; }
textarea { min-height: 110px; resize: vertical; }
input::placeholder, textarea::placeholder { color: var(--dim); }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--sun); box-shadow: 0 0 0 3px rgba(255, 176, 32, .15); }
label { display: block; font-weight: 600; font-size: .88rem; margin-bottom: 6px; }
.field { margin-bottom: 14px; }
.form-msg { margin-top: 10px; font-size: .9rem; }
.form-msg.err { color: var(--bad); }
.form-msg.ok { color: var(--good); }

/* ---------- layout pieces ---------- */
.section { padding: 56px 0; }
.section-sm { padding: 32px 0; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.section-head h2 { margin: 0; }
.eyebrow { font: 500 .78rem/1 var(--font-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--sun); display: inline-flex; align-items: center; gap: 8px; margin-bottom: 14px; }
.eyebrow::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--sun); box-shadow: 0 0 10px var(--sun); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.card-tight { padding: 14px 16px; }
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
@media (max-width: 960px) { .g4, .g5 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g3 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 620px) { .g2, .g3, .g4, .g5 { grid-template-columns: 1fr; } }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.spread { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.hr { border: 0; border-top: 1px solid var(--line); margin: 20px 0; }
.empty { padding: 28px; text-align: center; color: var(--muted); border: 1px dashed var(--line-2); border-radius: var(--radius); }
.notice { border: 1px solid var(--line-2); background: var(--surface); border-left: 3px solid var(--sun); padding: 14px 16px; border-radius: var(--radius-sm); margin-bottom: 16px; }
.notice.bad { border-left-color: var(--bad); }

/* ---------- hero ---------- */
.hero { position: relative; overflow: hidden; border-bottom: 1px solid var(--line); }
.hero::before { content: ''; position: absolute; inset: auto -20% -60% -20%; height: 120%; background: radial-gradient(50% 50% at 50% 100%, rgba(255, 176, 32, .20), transparent 70%); pointer-events: none; }
.hero::after { content: ''; position: absolute; inset: 0; background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px); background-size: 48px 48px; mask-image: radial-gradient(70% 60% at 50% 30%, #000 0%, transparent 75%); opacity: .35; pointer-events: none; }
.hero-in { position: relative; z-index: 1; display: grid; grid-template-columns: 1.15fr .85fr; gap: 48px; padding: 64px 20px 72px; align-items: center; }
@media (max-width: 900px) { .hero-in { grid-template-columns: 1fr; padding-top: 40px; } .hero-art { display: none; } }
.hero h1 .accent { color: var(--sun); }
.hero .lede { font-size: 1.08rem; color: var(--text-2); max-width: 560px; margin-bottom: 26px; }

/* ---------- the check box ---------- */
.checkbox { background: var(--surface); border: 1px solid var(--line-2); border-radius: 14px; padding: 10px; box-shadow: 0 20px 60px rgba(0, 0, 0, .35); }
.tabs { display: grid; grid-template-columns: repeat(6, 1fr); gap: 4px; margin-bottom: 10px; }
@media (max-width: 520px) { .tabs { grid-template-columns: repeat(3, 1fr); } }
.tab { background: transparent; border: 1px solid transparent; color: var(--muted); font: 600 .84rem/1 var(--font-body); padding: 9px 4px; border-radius: 8px; cursor: pointer; }
.tab:hover { color: var(--text); background: var(--surface-2); }
.tab[aria-selected='true'] { color: var(--text); background: var(--surface-3); border-color: var(--line-2); }
.check-row { display: flex; gap: 8px; }
.check-row input { font-family: var(--font-mono); font-size: .95rem; padding: 14px; }
.check-row .btn { padding: 0 22px; }
.check-hint { font-size: .82rem; color: var(--dim); margin: 10px 4px 2px; }
.check-err { color: var(--bad); font-size: .88rem; margin: 8px 4px 0; }

/* ---------- hero art: stacked verdict cards ---------- */
.hero-art { position: relative; height: 380px; }
.stack-card { position: absolute; width: 330px; background: linear-gradient(180deg, var(--surface-2), var(--surface)); border: 1px solid var(--line-2); border-radius: 14px; padding: 18px; box-shadow: 0 30px 80px rgba(0, 0, 0, .5); }
.stack-card:nth-child(1) { top: 0; right: 90px; transform: rotate(-5deg); opacity: .45; }
.stack-card:nth-child(2) { top: 40px; right: -10px; transform: rotate(4deg); opacity: .7; }
.stack-card:nth-child(3) { top: 150px; right: 50px; }
.stack-card .k { font: 500 .72rem/1 var(--font-mono); letter-spacing: .14em; color: var(--muted); }
.stack-card .t { font: 700 1.5rem/1.2 var(--font-display); margin: 12px 0; }
.stack-card .bars { display: flex; gap: 6px; align-items: end; height: 60px; margin-top: 14px; }
.stack-card .bars span { flex: 1; background: var(--line-2); border-radius: 3px 3px 0 0; }
.stack-card .bars span.hi { background: var(--sun); }

/* ---------- stamps ---------- */
.stamp { display: inline-flex; align-items: center; font: 800 .76rem/1 var(--font-display); letter-spacing: .06em; text-transform: uppercase; padding: 6px 9px; border-radius: 6px; border: 1.5px solid currentColor; white-space: nowrap; }
.stamp-lg { font-size: 1.5rem; padding: 10px 16px; border-width: 3px; border-radius: 10px; transform: rotate(-2deg); }
.tone-good { color: var(--good); }
.tone-bad { color: var(--bad); }
.tone-warn { color: var(--warn); }
.tone-neutral { color: var(--neutral); }
.lvl { font: 600 .7rem/1 var(--font-mono); text-transform: uppercase; letter-spacing: .08em; padding: 4px 6px; border-radius: 4px; }
.lvl-high { background: rgba(255, 93, 93, .14); color: var(--bad); }
.lvl-medium { background: rgba(255, 176, 32, .14); color: var(--warn); }
.lvl-low { background: rgba(70, 198, 232, .12); color: var(--sky); }
.lvl-info { background: var(--surface-3); color: var(--muted); }

/* ---------- stats ---------- */
.stat-strip { display: grid; grid-template-columns: repeat(6, 1fr); border-bottom: 1px solid var(--line); }
@media (max-width: 900px) { .stat-strip { grid-template-columns: repeat(3, 1fr); } }
.stat-strip > div { padding: 20px; border-right: 1px solid var(--line); }
.stat-strip > div:last-child { border-right: 0; }
.stat-n { font: 700 1.7rem/1 var(--font-display); }
.stat-l { font: 500 .74rem/1.3 var(--font-mono); text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-top: 8px; }
.tile { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.tile .stat-n { font-size: 1.45rem; }

/* ---------- tools ---------- */
.tool { display: flex; flex-direction: column; gap: 10px; text-decoration: none; transition: border-color .15s, transform .15s; }
.tool:hover { border-color: var(--dim); transform: translateY(-2px); }
.tool .ico { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; background: rgba(255, 176, 32, .12); color: var(--sun); }
.tool .ico svg { width: 20px; height: 20px; }
.tool p { color: var(--muted); font-size: .9rem; flex: 1; margin: 0; }
.tool .reads { font: 500 .72rem/1.4 var(--font-mono); color: var(--dim); }

/* ---------- verdict tiles and lists ---------- */
.vcard { display: block; text-decoration: none; transition: border-color .15s; }
.vcard:hover { border-color: var(--dim); }
.vcard .k { font: 500 .7rem/1 var(--font-mono); letter-spacing: .12em; color: var(--dim); text-transform: uppercase; }
.vcard .t { font: 700 1.05rem/1.3 var(--font-display); margin: 8px 0 10px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list { display: flex; flex-direction: column; }
.list-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 12px 4px; border-bottom: 1px solid var(--line); text-decoration: none; }
.list-row:hover { background: var(--surface); }
.list-row .t { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list-row .s { color: var(--muted); font-size: .84rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- tables ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); }
table { width: 100%; border-collapse: collapse; font-size: .9rem; }
th, td { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { font: 500 .72rem/1.2 var(--font-mono); text-transform: uppercase; letter-spacing: .08em; color: var(--muted); background: var(--bg-2); white-space: nowrap; }
th a { text-decoration: none; }
th a:hover { color: var(--text); }
tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: var(--surface); }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { text-decoration: none; font-size: .84rem; font-weight: 500; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line-2); color: var(--muted); }
.chip:hover { color: var(--text); }
.chip.on { background: var(--text); color: var(--bg); border-color: var(--text); }
.addr { font-family: var(--font-mono); font-size: .86rem; text-decoration: none; border-bottom: 1px dotted var(--dim); }
.addr:hover { color: var(--sun); border-color: var(--sun); }
.tag { display: inline-block; font: 500 .7rem/1 var(--font-mono); padding: 4px 6px; border-radius: 4px; background: var(--surface-3); color: var(--text-2); margin-left: 6px; vertical-align: middle; }
.tag.sun { background: rgba(255, 176, 32, .15); color: var(--sun); }
.tag.bad { background: rgba(255, 93, 93, .14); color: var(--bad); }
.bar { height: 6px; background: var(--surface-3); border-radius: 3px; overflow: hidden; min-width: 60px; }
.bar > span { display: block; height: 100%; background: var(--sun); }

/* ---------- verdict page ---------- */
.vhead { padding: 40px 0 28px; border-bottom: 1px solid var(--line); background: linear-gradient(180deg, var(--bg-2), var(--bg)); }
.vhead-in { display: grid; grid-template-columns: minmax(0, 1fr) 240px; gap: 32px; align-items: start; }
@media (max-width: 820px) { .vhead-in { grid-template-columns: 1fr; } }
.vhead .kicker { font: 500 .78rem/1 var(--font-mono); letter-spacing: .12em; color: var(--muted); text-transform: uppercase; margin-bottom: 10px; }
.vhead h1 { font-size: clamp(1.8rem, 4vw, 2.8rem); word-break: break-word; }
.vhead .sub { color: var(--muted); margin-bottom: 14px; }
.vhead .summary { font-size: 1.05rem; color: var(--text-2); max-width: 720px; }
.vhead .rule { font-size: .88rem; color: var(--muted); border-left: 2px solid var(--line-2); padding-left: 12px; margin: 14px 0; max-width: 720px; }
.vmeta { display: flex; gap: 14px; flex-wrap: wrap; font: 500 .78rem/1 var(--font-mono); color: var(--dim); margin: 16px 0; }
.dial { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; text-align: center; }
.dial .n { font: 800 3.4rem/1 var(--font-display); }
.dial .l { font: 500 .74rem/1.3 var(--font-mono); letter-spacing: .1em; color: var(--muted); text-transform: uppercase; margin-top: 6px; }
.dial svg { width: 150px; height: 82px; display: block; margin: 0 auto 6px; }
.token-head { display: flex; gap: 16px; align-items: center; margin-bottom: 10px; }
.token-head img { width: 64px; height: 64px; border-radius: 14px; object-fit: cover; background: var(--surface-2); border: 1px solid var(--line); }
.subnav { position: sticky; top: 62px; z-index: 10; background: rgba(10, 12, 15, .92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.subnav .wrap { display: flex; gap: 4px; overflow-x: auto; }
.subnav a { text-decoration: none; padding: 13px 12px; color: var(--muted); font-weight: 500; font-size: .9rem; border-bottom: 2px solid transparent; white-space: nowrap; }
.subnav a:hover { color: var(--text); border-color: var(--line-2); }
.vsec { padding: 36px 0; border-bottom: 1px solid var(--line); scroll-margin-top: 120px; }
.vsec h2 { font-size: 1.35rem; }
.finding { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 14px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.finding:last-child { border-bottom: 0; }
.finding h3 { margin-bottom: 4px; font-size: 1rem; }
.finding p { color: var(--text-2); margin: 0 0 6px; font-size: .94rem; }
.proofs { display: flex; gap: 6px; flex-wrap: wrap; }
.proofs a { font: 500 .74rem/1 var(--font-mono); color: var(--sky); text-decoration: none; padding: 5px 7px; border: 1px solid var(--line-2); border-radius: 5px; }
.proofs a:hover { border-color: var(--sky); }
.dot { width: 10px; height: 10px; border-radius: 50%; margin-top: 6px; }
.dot.high { background: var(--bad); }
.dot.medium { background: var(--warn); }
.dot.low { background: var(--sky); }
.dot.info { background: var(--dim); }

/* ---------- charts ---------- */
.gbars { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; align-items: end; }
.gbar { text-align: center; }
.gbar .pair { display: flex; gap: 8px; align-items: end; justify-content: center; height: 180px; }
.gbar .pair div { width: 44px; border-radius: 5px 5px 0 0; position: relative; min-height: 2px; }
.gbar .pair .a { background: var(--sun); }
.gbar .pair .b { background: var(--line-2); }
.gbar .pair div span { position: absolute; top: -20px; left: 0; right: 0; font: 600 .78rem/1 var(--font-mono); }
.legend { display: flex; gap: 16px; font-size: .84rem; color: var(--muted); margin-top: 12px; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 6px; vertical-align: -1px; }
.timeline { display: grid; gap: 8px; }
.tl-row { display: grid; grid-template-columns: 110px minmax(0, 1fr) 60px; gap: 10px; align-items: center; font-size: .84rem; }
.tl-track { position: relative; height: 22px; background: var(--surface-2); border-radius: 4px; }
.tl-wave { position: absolute; top: 0; bottom: 0; left: 0; background: rgba(255, 176, 32, .16); border-right: 1px dashed var(--sun); }
.tl-mark { position: absolute; top: 3px; width: 4px; height: 16px; border-radius: 2px; background: var(--muted); transform: translateX(-2px); }
.tl-mark.in { background: var(--bad); }
.tl-buy { position: absolute; top: 3px; left: 0; width: 4px; height: 16px; border-radius: 2px; background: var(--good); }

/* ---------- drain graph ---------- */
.graph { width: 100%; overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-2); }
.graph svg { display: block; }
.graph text { font-family: var(--font-mono); font-size: 11px; fill: var(--text-2); }
.graph .node rect { fill: var(--surface-2); stroke: var(--line-2); }
.graph .node.victim rect { stroke: var(--bad); }
.graph .node.exchange rect { stroke: var(--sun); }
.graph .node.bridge rect { stroke: var(--sky); }
.graph .edge { stroke: var(--dim); fill: none; }

/* ---------- progress ---------- */
.progress-card { max-width: 640px; margin: 64px auto; text-align: center; }
.progress-card h1 { font-size: 1.8rem; }
.pbar { height: 8px; background: var(--surface-3); border-radius: 4px; overflow: hidden; margin: 22px 0 12px; }
.pbar span { display: block; height: 100%; background: linear-gradient(90deg, var(--sun), var(--sun-2)); transition: width .4s; }
.spinner { width: 54px; height: 54px; margin: 0 auto 18px; border-radius: 50%; border: 3px solid var(--surface-3); border-top-color: var(--sun); animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation: none; } * { transition: none !important; } }

/* ---------- steps ---------- */
.steps { counter-reset: s; }
.step { position: relative; padding-top: 6px; }
.step .num { font: 500 .78rem/1 var(--font-mono); color: var(--sun); margin-bottom: 10px; }
.step p { color: var(--muted); font-size: .92rem; }
.cta { text-align: center; padding: 72px 20px; border-top: 1px solid var(--line); background: radial-gradient(60% 120% at 50% 100%, rgba(255, 176, 32, .14), transparent 70%); }
.cta .checkbox { max-width: 720px; margin: 24px auto 0; text-align: left; }

/* ---------- prose ---------- */
.prose { max-width: 760px; }
.prose h2 { margin-top: 1.6em; }
.prose h3 { margin-top: 1.4em; }
.prose p, .prose li { color: var(--text-2); }
.prose code { background: var(--surface-2); padding: 2px 5px; border-radius: 4px; }

/* ---------- footer ---------- */
.footer { border-top: 1px solid var(--line); padding: 36px 0; margin-top: 40px; }
.footer-in { display: grid; grid-template-columns: 1.2fr 1fr; gap: 32px; }
.footer-links { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 20px; align-content: start; }
.footer-links a { color: var(--muted); text-decoration: none; font-size: .9rem; }
.footer-links a:hover { color: var(--text); }
@media (max-width: 700px) { .footer-in { grid-template-columns: 1fr; } }

/* ---------- card preview ---------- */
.card-preview { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--bg-2); }
.card-preview img { display: block; width: 100%; height: auto; }
.toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background: var(--text); color: var(--bg); padding: 10px 16px; border-radius: 8px; font-weight: 600; font-size: .9rem; z-index: 50; }
