:root {
  --paper: #FAF9F5;
  --card: #FFFFFF;
  --ink: #121016;
  --soft: #5A5766;
  --line: #E3E0D6;
  --violet: #5B2EFF;
  --violet-deep: #3A14C9;
  --violet-wash: #F0ECFF;
  --yellow: #E8FF3A;
  --bad: #A8201A;
  --sans: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "Cascadia Mono", Consolas, "SF Mono", Menlo, monospace;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--sans); font-size: 17px; line-height: 1.5; overflow-wrap: anywhere; }
img { display: block; }
a { color: var(--violet-deep); text-underline-offset: 3px; }
code { font-family: var(--mono); font-size: .92em; }
h1, h2, h3, p, ol, ul, dl, dd { margin: 0; padding: 0; }
ol, ul { list-style: none; }
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 3px solid var(--violet); outline-offset: 2px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 24px; }

/* top bar */
.bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; max-width: 1120px; margin: 0 auto; padding: 18px 24px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 900; font-size: 20px; letter-spacing: -.02em; }
.bar-nav { display: flex; gap: 22px; font-size: 15px; font-weight: 600; }
.bar-nav a { color: var(--ink); text-decoration: none; }
.bar-nav a:hover { text-decoration: underline; text-decoration-thickness: 2px; }

/* lead */
.lead { padding-top: 16px; }
.kicker { font-family: var(--mono); font-size: 12.5px; letter-spacing: .04em; text-transform: uppercase; color: var(--soft); }
h1 { font-size: clamp(46px, 8vw, 96px); line-height: .95; letter-spacing: -.045em; font-weight: 900; margin: 10px 0 14px; }
h1 mark { background: linear-gradient(transparent 58%, var(--yellow) 58%, var(--yellow) 92%, transparent 92%); color: inherit; padding: 0 .06em; }
.lead-text { max-width: 640px; font-size: 19px; color: var(--soft); }

.controls { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 14px; margin-top: 22px; }
.seg { display: inline-flex; border: 2px solid var(--ink); border-radius: 10px; overflow: hidden; background: var(--card); }
.seg button { border: 0; background: transparent; padding: 9px 16px; font-weight: 700; font-size: 15px; }
.seg button + button { border-left: 2px solid var(--ink); }
.seg button.on { background: var(--ink); color: var(--paper); }
.btn { border: 2px solid var(--violet); background: var(--violet); color: #fff; border-radius: 10px; padding: 9px 18px; font-weight: 700; font-size: 15px; }
.btn:hover { background: var(--violet-deep); border-color: var(--violet-deep); }
.btn[disabled] { opacity: .55; cursor: default; }
.btn.ghost { background: transparent; color: var(--violet-deep); }
.btn.ghost:hover { background: var(--violet-wash); }
.status { font-family: var(--mono); font-size: 13px; color: var(--soft); }
.status.bad { color: var(--bad); }
.track { height: 3px; margin-top: 16px; background: var(--line); }
.track i { display: block; height: 100%; width: 0; background: var(--violet); transition: width .25s ease; }

.tiles { display: grid; grid-template-columns: repeat(5, 1fr); gap: 0 22px; margin-top: 22px; }
.tiles > div { border-top: 3px solid var(--ink); padding: 12px 0 0; min-width: 0; }
.tiles dt { font-family: var(--mono); font-size: 11.5px; letter-spacing: .04em; text-transform: uppercase; color: var(--soft); }
.tiles dd { font-size: clamp(26px, 3.3vw, 40px); font-weight: 900; letter-spacing: -.03em; line-height: 1.15; font-variant-numeric: tabular-nums; }
.tiles dd.note { font-size: 13.5px; font-weight: 400; letter-spacing: 0; color: var(--soft); line-height: 1.35; }

/* section heads */
section.wrap { margin-top: 72px; }
section.lead { margin-top: 0; }
section.lead + section.wrap { margin-top: 40px; }
.head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 8px 32px; align-items: end; border-top: 3px solid var(--ink); padding-top: 16px; margin-bottom: 20px; }
h2 { font-size: clamp(28px, 4vw, 44px); font-weight: 900; letter-spacing: -.035em; line-height: 1.05; }
.head p { color: var(--soft); font-size: 16px; }
h3 { font-size: 18px; font-weight: 800; letter-spacing: -.01em; }
.fine { font-size: 14px; color: var(--soft); }

/* ranking table */
.sheet { background: var(--card); border: 2px solid var(--ink); border-radius: 14px; overflow: hidden; }
.rank { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.rank th { font-family: var(--mono); font-size: 11.5px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--soft); text-align: left; padding: 12px 14px; border-bottom: 2px solid var(--ink); white-space: nowrap; }
.rank td { padding: 11px 14px; border-bottom: 1px solid var(--line); font-family: var(--mono); font-size: 15px; white-space: nowrap; }
.rank tbody tr:last-child td { border-bottom: 0; }
.rank .c-num { text-align: right; }
.rank .c-pos { width: 62px; }
.rank abbr { text-decoration: none; text-transform: none; font-weight: 400; }
.rank tbody tr.row:hover { background: var(--violet-wash); }
.rank tbody tr.sel { background: var(--violet-wash); }
.pos { display: inline-block; min-width: 34px; padding: 2px 7px; border-radius: 7px; font-weight: 800; font-size: 16px; text-align: center; }
tr.podium .pos { background: var(--yellow); }
.who { border: 0; background: none; padding: 0; font-family: var(--mono); font-size: 15px; color: var(--violet-deep); font-weight: 600; text-decoration: underline; text-decoration-color: transparent; text-underline-offset: 3px; }
.who:hover { text-decoration-color: currentColor; }
.count { display: inline-flex; align-items: center; justify-content: flex-end; gap: 10px; font-weight: 800; }
.meter { display: inline-block; width: 84px; height: 8px; background: var(--violet-wash); border-radius: 2px; overflow: hidden; }
.meter i { display: block; height: 100%; background: var(--violet); }
.blank td, li.blank { color: var(--soft); font-family: var(--sans); font-size: 16px; padding: 26px 16px; text-align: left; white-space: normal; }
.under { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; margin-top: 14px; }

/* launches feed */
.feed { border: 2px solid var(--ink); border-radius: 14px; background: var(--card); overflow: hidden; }
.feed > li { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 6px 20px; padding: 13px 16px; border-bottom: 1px solid var(--line); }
.feed > li:last-child { border-bottom: 0; }
.feed > li.blank { display: block; }
.tok b { display: block; font-size: 17px; font-weight: 800; letter-spacing: -.01em; }
.tok span { font-family: var(--mono); font-size: 12.5px; color: var(--soft); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.chip { border: 1px solid var(--line); background: var(--paper); border-radius: 8px; padding: 4px 8px; font-family: var(--mono); font-size: 12.5px; white-space: nowrap; }
.chip button { font-size: 12.5px; }
.chip em { font-style: normal; color: var(--soft); }
.chips .none, .chips .extra { font-size: 14px; color: var(--soft); }

/* wallet lookup */
.ask { display: flex; gap: 10px; max-width: 640px; }
.ask input { flex: 1; min-width: 0; border: 2px solid var(--ink); border-radius: 10px; background: var(--card); padding: 10px 12px; font-family: var(--mono); font-size: 15px; color: var(--ink); }
.ask input::placeholder { color: #8B8898; }
.card { margin-top: 18px; border: 2px solid var(--ink); border-radius: 14px; background: var(--card); padding: 18px; }
.card .full { font-family: var(--mono); font-size: 14px; color: var(--soft); }
.card .big { font-size: clamp(22px, 3vw, 30px); font-weight: 900; letter-spacing: -.025em; margin: 4px 0 2px; }
.facts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px 18px; margin: 16px 0 6px; }
.facts div { border-top: 2px solid var(--line); padding-top: 8px; min-width: 0; }
.facts dt { font-family: var(--mono); font-size: 11.5px; text-transform: uppercase; letter-spacing: .04em; color: var(--soft); }
.facts dd { font-family: var(--mono); font-weight: 700; font-size: 17px; }
.buys { margin-top: 12px; }
.buys li { display: grid; grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr)); gap: 10px; padding: 8px 0; border-top: 1px solid var(--line); font-family: var(--mono); font-size: 13.5px; }
.buys li b { font-family: var(--sans); font-weight: 800; font-size: 15px; }
.buys li span { text-align: right; white-space: nowrap; }
.buys li small { display: block; font-size: 12px; color: var(--soft); }

/* counting rules */
.rules { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; counter-reset: rule; }
.rules li { counter-increment: rule; }
.rules li::before { content: counter(rule); display: block; font-family: var(--mono); font-weight: 800; font-size: 34px; line-height: 1; color: var(--violet); margin-bottom: 10px; }
.rules p, .split p { color: var(--soft); font-size: 16px; margin-top: 6px; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; margin-top: 34px; }
.split > div { background: var(--card); border: 2px solid var(--ink); border-radius: 14px; padding: 20px; }
.split strong { color: var(--ink); }

/* terminal */
.shell { background: var(--ink); color: #EDEAF7; border-radius: 14px; padding: 18px; }
.shell .line { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-bottom: 14px; border-bottom: 1px solid #34303F; }
.shell .line code { font-size: 15px; color: #fff; }
.shell pre { margin: 14px 0 0; font-family: var(--mono); font-size: 14px; line-height: 1.75; white-space: pre-wrap; }
.shell .p { color: var(--yellow); }
.shell .c { color: #A7A2B8; }
.copy { flex: none; border: 0; border-radius: 8px; background: var(--yellow); color: var(--ink); font-weight: 800; font-size: 14px; padding: 7px 13px; }
.copy:hover { filter: brightness(.94); }
#terminal .fine { margin-top: 12px; }

/* token band */
.token { margin-top: 84px; background: var(--violet); color: #fff; padding: 64px 0 68px; }
.token .kicker { color: #D9CEFF; }
.token h2 { font-size: clamp(54px, 10vw, 120px); letter-spacing: -.05em; margin: 6px 0 22px; }
.token-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 36px; align-items: start; }
.token-text { font-size: 19px; max-width: 520px; }
.ca { margin-top: 22px; background: #fff; color: var(--ink); border-radius: 14px; padding: 18px; }
.ca-label { font-family: var(--mono); font-size: 11.5px; letter-spacing: .04em; text-transform: uppercase; color: var(--soft); }
.ca-value { font-family: var(--mono); font-weight: 700; font-size: 16px; margin: 6px 0 12px; }
.ca[data-state="off"] .ca-value, .ca[data-state="wait"] .ca-value { font-family: var(--sans); font-weight: 900; font-size: 26px; letter-spacing: -.02em; }
.ca-note { font-size: 14px; color: var(--soft); }
.ca .copy { margin-bottom: 12px; }
.plain li { padding: 14px 0; border-top: 1px solid rgba(255, 255, 255, .28); font-size: 16.5px; color: #EDE7FF; }
.plain li:last-child { border-bottom: 1px solid rgba(255, 255, 255, .28); }
.plain strong { color: #fff; display: block; font-size: 18px; }

.foot { padding-top: 30px; padding-bottom: 44px; font-size: 14px; color: var(--soft); }
.foot p + p { margin-top: 4px; }
.nojs { max-width: 1120px; margin: 0 auto; padding: 0 24px 40px; color: var(--bad); font-weight: 700; }

@media (max-width: 900px) {
  .bar-nav { display: none; }
  .tiles { grid-template-columns: repeat(3, 1fr); gap: 18px 18px; }
  .head { grid-template-columns: 1fr; align-items: start; }
  .rules { grid-template-columns: 1fr 1fr; }
  .split, .token-grid { grid-template-columns: 1fr; }
  .facts { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 620px) {
  body { font-size: 16px; }
  .wrap, .bar { padding-left: 16px; padding-right: 16px; }
  .lead { padding-top: 14px; }
  .lead-text { font-size: 17px; }
  .controls { margin-top: 22px; }
  .seg button { padding: 9px 12px; }
  .status { flex-basis: 100%; }
  .tiles { grid-template-columns: 1fr 1fr; }
  section.wrap { margin-top: 54px; }
  section.lead { margin-top: 0; }
  .sheet { margin: 0 -16px; border-left: 0; border-right: 0; border-radius: 0; overflow-x: auto; }
  .rank th { padding: 10px 4px; font-size: 9.5px; letter-spacing: 0; white-space: normal; vertical-align: bottom; }
  .rank abbr { display: block; }
  .rank td { padding: 10px 4px; font-size: 11.5px; }
  .rank th:first-child, .rank td:first-child { padding-left: 10px; }
  .rank th:last-child, .rank td:last-child { padding-right: 10px; }
  .rank .c-pos { width: 38px; }
  .rank .c-buys { display: none; }
  .pos { min-width: 24px; padding: 1px 4px; font-size: 13px; }
  .who { font-size: 11.5px; }
  .chip .who { font-size: 12.5px; }
  .meter { display: none; }
  .feed > li { grid-template-columns: 1fr; }
  .ask { flex-direction: column; }
  .buys li { grid-template-columns: 1fr 1fr; }
  .buys li span { text-align: left; }
  .rules { grid-template-columns: 1fr; }
  .shell .line { flex-direction: column; align-items: flex-start; }
  .shell .line code { font-size: 13px; }
  .shell pre { font-size: 12.5px; }
  .shell .c { display: block; padding-left: 14px; }
  .token { margin-top: 60px; padding: 46px 0 50px; }
  .ca-value { font-size: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .track i { transition: none; }
}
