:root {
  --bg: #07120f;
  --bg-2: #0b1a16;
  --panel: #10241f;
  --panel-2: #15302a;
  --line: rgba(46, 230, 166, 0.14);
  --text: #e8f7f0;
  --muted: #8fb3a6;
  --teal: #2ee6a6;
  --teal-2: #17b37c;
  --amber: #f0c14b;
  --rose: #ff7a88;
  --blue: #8fd4ff;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
  --radius: 18px;
  color-scheme: dark;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--text);
  font: 16px/1.55 ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  background:
    radial-gradient(1200px 600px at 80% -10%, rgba(46, 230, 166, 0.12), transparent 55%),
    radial-gradient(900px 500px at -10% 20%, rgba(143, 212, 255, 0.08), transparent 50%),
    linear-gradient(180deg, var(--bg) 0%, #050d0b 100%);
  min-height: 100vh;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(46, 230, 166, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(46, 230, 166, 0.035) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse at 30% 0%, #000 20%, transparent 70%);
}

a { color: var(--teal); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }

.app { position: relative; min-height: 100vh; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 28px;
  border-bottom: 1px solid var(--line);
  background: rgba(7, 18, 15, 0.88);
  backdrop-filter: blur(16px);
}

.brand {
  display: flex;
  gap: 12px;
  align-items: center;
  color: inherit;
  text-decoration: none;
}
.brand:hover { text-decoration: none; }
.mark { width: 56px; height: 44px; flex: none; }
.brand strong { display: block; font-size: 18px; letter-spacing: 0.02em; }
.brand small { display: block; margin-top: 2px; color: var(--muted); font-size: 12px; }
.top-links a { color: var(--muted); font-size: 14px; }
.top-links a:hover { color: var(--text); }

main, footer {
  width: min(1080px, calc(100% - 36px));
  margin: 0 auto;
}
main { padding: 36px 0 28px; }
footer { padding-bottom: 40px; }

.notice, .message { color: var(--muted); }
.message.error { color: var(--rose); }
.kicker, .section-label {
  color: var(--teal);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.section-label { letter-spacing: 0.12em; font-size: 11px; }
h2, h3, p { margin: 0; }
h2 { font-size: 42px; letter-spacing: -0.03em; line-height: 1.1; }
h3 { font-size: 22px; letter-spacing: -0.02em; }
.lede, .sub { color: var(--muted); }
.lede { margin-top: 10px; font-size: 18px; max-width: 720px; }
.sub { margin-top: 6px; }
.hero { margin-bottom: 22px; }

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 14px;
  align-items: end;
  margin: 0 0 18px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}
.filters label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.filters label.check {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-bottom: 10px;
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
}
.filters input[type="search"],
.filters select {
  min-width: min(100%, 220px);
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg-2);
}
.filters input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--teal); }

.primary, .btn, .ghost {
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--panel-2);
  color: var(--text);
  text-decoration: none;
}
.primary {
  border: 0;
  background: var(--teal);
  color: #06241a;
  font-weight: 700;
  padding: 10px 16px;
}
.primary:hover { background: var(--teal-2); }
.btn, .ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  font-size: 14px;
}
.btn:hover, .ghost:hover { border-color: var(--teal); text-decoration: none; color: var(--text); }
.btn[aria-disabled="true"], button:disabled { opacity: 0.45; cursor: default; }

.pager {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin: 8px 0 14px;
}
.pager-status {
  color: var(--muted);
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
}

.token {
  display: flex;
  gap: 12px;
  align-items: center;
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, var(--panel), var(--bg-2));
  box-shadow: var(--shadow);
  color: inherit;
  text-decoration: none;
}
.token:hover { border-color: rgba(46, 230, 166, 0.45); text-decoration: none; }
.who { min-width: 0; flex: 1; }
.who strong, .who small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.who small, .holders small { color: var(--muted); }
.holders { text-align: right; flex: none; }
.holders strong { display: block; font-variant-numeric: tabular-nums; }
.pills { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.pill {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 999px;
  background: var(--panel-2);
  color: var(--amber);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
}
.pill.ok { color: var(--teal); }

.avatar {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--panel-2);
  color: var(--teal);
  display: grid;
  place-items: center;
  font-weight: 700;
  overflow: hidden;
  flex: none;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.identity { display: flex; gap: 16px; align-items: flex-start; }
.identity .avatar { width: 64px; height: 64px; border-radius: 16px; font-size: 20px; }
.identity h2 { margin-top: 4px; }
.blurb { margin-top: 8px; max-width: 680px; color: var(--muted); }
.issuer { margin-top: 8px; }
code, .mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  overflow-wrap: anywhere;
}
.issuer code { color: var(--teal); font-size: 13px; }
.links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.links a {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 13px;
  text-decoration: none;
}
.links a:hover { border-color: var(--teal); text-decoration: none; }

.back { display: inline-flex; margin-bottom: 18px; color: var(--muted); font-size: 14px; }
.back:hover { color: var(--teal); }
.xah-block { margin-top: 22px; }
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
  margin-top: 12px;
}
.stat {
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel);
}
.stat span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.stat strong {
  display: block;
  margin-top: 4px;
  font-size: 18px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.stat.wide { grid-column: span 2; }
.up { color: var(--teal); }
.down { color: var(--rose); }
.flat { color: var(--muted); }

.market { margin-top: 28px; }
.tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.tabs button, .ghost {
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  border-radius: 999px;
  padding: 8px 12px;
}
.tabs button[aria-selected="true"] {
  color: var(--text);
  border-color: var(--teal);
  background: rgba(46, 230, 166, 0.1);
}
.tape-note { margin: 0 0 14px; color: var(--muted); font-size: 13px; }
.market .ghost { margin: 0 0 14px; }

.chart-card {
  padding: 16px 16px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, var(--panel), var(--bg-2));
  box-shadow: var(--shadow);
}
.chart-head {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: flex-start;
  justify-content: space-between;
}
.periods { display: flex; gap: 8px; }
.periods button {
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 13px;
}
.periods button[aria-selected="true"] {
  color: #06241a;
  background: var(--teal);
  border-color: var(--teal);
  font-weight: 700;
}
.readout {
  min-height: 1.5em;
  margin: 12px 0 4px;
  color: var(--muted);
  font: 13px/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
.chart { width: 100%; height: auto; display: block; }
.chart text { fill: var(--muted); font: 11px ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
#chart { min-height: 180px; }
.empty { margin: 28px 0; color: var(--muted); }

.remarks { margin-top: 18px; }
.remarks div {
  display: grid;
  grid-template-columns: minmax(100px, 180px) minmax(0, 1fr);
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}
.remarks dt { color: var(--muted); }

@media (max-width: 720px) {
  .topbar { padding: 14px 16px; }
  h2 { font-size: 32px; }
  .filters label, .filters .primary, .filters input[type="search"], .filters select { width: 100%; }
  .identity { flex-direction: column; }
  .stat.wide { grid-column: auto; }
  .remarks div { grid-template-columns: 1fr; gap: 2px; }
}
