/* Dashboard styles. Dark-first (a trading terminal), light honoured via the OS
   setting. Colours are role tokens: series-1 for the one data series we draw,
   status colours reserved for verdicts/tags and always paired with an icon+label. */
:root {
  color-scheme: dark;
  --bg: #0f1012;
  --surface: #1a1a19;
  --surface-2: #232322;
  --border: #2c2c2a;
  --text: #f2f2ee;
  --text-2: #b9b8ae;
  --muted: #7d7c74;
  --accent: #3987e5;        /* series-1 (dark step) */
  --accent-soft: rgba(57, 135, 229, .18);
  --good: #0ca30c;
  --warn: #fab219;
  --serious: #ec835a;
  --crit: #d03b3b;
  --radius: 10px;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    color-scheme: light;
    --bg: #f4f4f1;
    --surface: #fcfcfb;
    --surface-2: #f0efec;
    --border: #e0dfda;
    --text: #0b0b0b;
    --text-2: #52514e;
    --muted: #8a8983;
    --accent: #2a78d6;
    --accent-soft: rgba(42, 120, 214, .14);
  }
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg); color: var(--text); font-family: var(--sans);
  font-size: 15px; line-height: 1.45; -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; }
.num, td.num, .tile b, .x { font-variant-numeric: tabular-nums; font-family: var(--mono); }

/* ---- header ---- */
header.top {
  position: sticky; top: 0; z-index: 5; backdrop-filter: blur(8px);
  background: color-mix(in srgb, var(--bg) 88%, transparent); border-bottom: 1px solid var(--border);
}
header.top .inner {
  max-width: 1180px; margin: 0 auto; padding: 10px 16px; display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
}
header.top .brand { font-weight: 700; font-size: 17px; letter-spacing: -.01em; }
header.top nav { display: flex; gap: 4px; }
header.top nav a { padding: 6px 10px; border-radius: 8px; color: var(--text-2); font-weight: 500; }
header.top nav a.active, header.top nav a:hover { background: var(--surface-2); color: var(--text); text-decoration: none; }
header.top .spacer { flex: 1; }
header.top .meta { display: flex; gap: 10px; align-items: center; color: var(--muted); font-size: 13px; }
.badge {
  display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px; border-radius: 999px;
  border: 1px solid var(--border); background: var(--surface); font-size: 12px; color: var(--text-2); white-space: nowrap;
}
.badge .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); }
.badge.live .dot { background: var(--good); box-shadow: 0 0 0 3px color-mix(in srgb, var(--good) 30%, transparent); }
.btn {
  display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 8px; font-weight: 600;
  background: var(--accent); color: #fff; font-size: 13px; white-space: nowrap;
}
.btn:hover { text-decoration: none; filter: brightness(1.08); }

/* ---- layout ---- */
main { max-width: 1180px; margin: 0 auto; padding: 18px 16px 48px; }
section { margin-bottom: 26px; }
.section-head { display: flex; align-items: baseline; gap: 12px; margin-bottom: 10px; flex-wrap: wrap; }
.section-head h2 { margin: 0; font-size: 17px; }
.section-head .sub { color: var(--muted); font-size: 13px; }
.section-head .spacer { flex: 1; }
.tabs { display: inline-flex; gap: 2px; padding: 3px; background: var(--surface-2); border-radius: 8px; }
.tabs button {
  border: 0; background: transparent; color: var(--text-2); padding: 5px 10px; border-radius: 6px;
  font: inherit; font-size: 13px; cursor: pointer;
}
.tabs button.active { background: var(--surface); color: var(--text); box-shadow: 0 1px 2px rgba(0,0,0,.25); }

/* ---- stat tiles ---- */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.tile { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 14px; }
.tile .label { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .06em; }
.tile b { display: block; font-size: 22px; font-weight: 600; margin-top: 4px; line-height: 1.2; }
.tile small { color: var(--text-2); font-size: 12px; }

/* ---- tables ---- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { padding: 9px 12px; text-align: left; border-bottom: 1px solid var(--border); white-space: nowrap; vertical-align: middle; }
th { color: var(--muted); font-weight: 500; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; background: var(--surface-2); position: sticky; top: 0; }
tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: color-mix(in srgb, var(--surface-2) 60%, transparent); }
td.num, th.num { text-align: right; }
td.tok a { font-weight: 600; }
td.tok .name { display: block; color: var(--muted); font-size: 12px; max-width: 180px; overflow: hidden; text-overflow: ellipsis; }
.copy-ca {
  display: inline-flex; align-items: center; margin-left: 7px; padding: 2px 6px; border: 1px solid var(--border);
  border-radius: 5px; background: transparent; color: var(--muted); font: 600 11px/1 var(--sans); cursor: pointer;
}
.copy-ca:hover { color: var(--text); background: var(--surface-2); }
.copy-ca.copied { color: var(--good); border-color: color-mix(in srgb, var(--good) 45%, var(--border)); }
td.rank { color: var(--muted); width: 44px; }
td .sub { color: var(--muted); font-size: 12px; margin-left: 6px; }
.x { font-weight: 600; }
.x.big { color: var(--text); }
.x.small { color: var(--text-2); font-weight: 500; }
.tags { display: inline-flex; gap: 6px; flex-wrap: wrap; }
.tag { font-size: 12px; padding: 2px 7px; border-radius: 6px; background: var(--surface-2); color: var(--text-2); }
.tag.live { color: var(--good); border: 1px solid color-mix(in srgb, var(--good) 40%, transparent); background: transparent; }
.tag.bust { color: var(--crit); }
.tag.grad { color: var(--accent); }
.tag.dev { color: var(--serious); }
.tag.early { color: var(--good); }
.tag.late { color: var(--warn); }
.tag.risky { color: var(--warn); }
.tag.inflow { color: var(--accent); }
.verdict.RISKY { background: color-mix(in srgb, var(--warn) 18%, transparent); color: var(--warn); }
.verdict { font-weight: 700; font-size: 12px; padding: 2px 8px; border-radius: 6px; }
.verdict.HOT { background: color-mix(in srgb, var(--good) 18%, transparent); color: var(--good); }
.verdict.WATCH { background: color-mix(in srgb, var(--warn) 18%, transparent); color: var(--warn); }
.verdict.AVOID { background: color-mix(in srgb, var(--crit) 18%, transparent); color: var(--crit); }
.empty { padding: 28px; color: var(--muted); text-align: center; }
.foot { color: var(--muted); font-size: 12px; padding: 10px 12px; border-top: 1px solid var(--border); }

/* ---- token page ---- */
.token-head { display: flex; gap: 14px; align-items: flex-start; flex-wrap: wrap; margin-bottom: 14px; }
.token-head h1 { margin: 0; font-size: 26px; letter-spacing: -.01em; }
.token-head .name { color: var(--text-2); }
.token-head code { display: block; font-family: var(--mono); font-size: 12px; color: var(--muted); word-break: break-all; }
.contract-address { display: flex; align-items: center; gap: 8px; max-width: 100%; }
.contract-address code { min-width: 0; }
.contract-address .copy-ca { flex: 0 0 auto; margin-left: 0; padding: 5px 8px; font-size: 12px; }
.token-head .tags { display: flex; margin-top: 8px; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 760px) { .two-col { grid-template-columns: 1fr; } }
.list { margin: 0; padding: 12px 14px; list-style: none; }
.list li { padding: 5px 0; border-bottom: 1px dashed var(--border); font-size: 14px; }
.list li:last-child { border-bottom: 0; }
.list li.flag::before { content: "🚩 "; }
.list li.pos::before { content: "✅ "; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 4px 14px; padding: 12px 14px; font-size: 14px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; }
.chart { position: relative; padding: 10px 6px 4px; }
.chart svg { width: 100%; height: 260px; display: block; }
.chart .line { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart .area { fill: var(--accent-soft); }
.chart .grid { stroke: var(--border); stroke-width: 1; }
.chart .axis { fill: var(--muted); font-size: 11px; font-family: var(--mono); }
.chart .call { stroke: var(--good); stroke-width: 1.5; stroke-dasharray: 4 3; }
.chart .call-label { fill: var(--good); font-size: 11px; font-weight: 600; }
.chart .cross { stroke: var(--text-2); stroke-width: 1; stroke-dasharray: 2 3; pointer-events: none; }
.chart .marker { fill: var(--accent); stroke: var(--surface); stroke-width: 2; pointer-events: none; }
.tooltip {
  position: absolute; pointer-events: none; background: var(--surface-2); border: 1px solid var(--border);
  border-radius: 8px; padding: 6px 9px; font-size: 12px; box-shadow: 0 6px 20px rgba(0,0,0,.3); display: none; z-index: 3;
}
.tooltip b { font-family: var(--mono); }
.gem-line { font-family: var(--mono); font-size: 13px; color: var(--text-2); padding: 10px 14px; border-top: 1px solid var(--border); }

@media (max-width: 640px) {
  body { font-size: 14px; }
  header.top .inner { gap: 10px; }
  header.top .meta .hide-sm { display: none; }
  th, td { padding: 8px 9px; }
  td.tok .name { max-width: 110px; }
  .tile b { font-size: 19px; }
}

/* ---- landing ---- */
.landing section { margin-bottom: 56px; }
.hero { padding: 48px 0 8px; max-width: 860px; }
.eyebrow { color: var(--accent); font-weight: 600; font-size: 13px; letter-spacing: .04em; margin: 0 0 12px; }
.hero h1 { font-size: clamp(32px, 6vw, 54px); line-height: 1.05; letter-spacing: -.025em; margin: 0 0 16px; text-wrap: balance; }
.lede { font-size: clamp(16px, 2.2vw, 19px); color: var(--text-2); margin: 0 0 24px; max-width: 680px; }
.cta { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 28px; }
.btn.big { padding: 11px 18px; font-size: 15px; border-radius: 10px; }
.btn.ghost { background: transparent; color: var(--text); border: 1px solid var(--border); }
.btn.ghost:hover { background: var(--surface-2); filter: none; }
.hero-tiles { max-width: 760px; }
.fine { color: var(--muted); font-size: 12px; margin: 10px 0 0; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr)); gap: 12px; }
.steps li { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; }
.step-n { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%;
  background: var(--accent-soft); color: var(--accent); font-weight: 700; font-family: var(--mono); font-size: 13px; }
.landing h3 { font-size: 16px; margin: 10px 0 6px; }
.landing p { margin: 0 0 10px; color: var(--text-2); }
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); gap: 12px; }
.feature { padding: 16px 18px; }
.feature h3 { margin-top: 0; }
.card.pad { padding: 18px 20px; }
.card.pad h3 { margin-top: 0; }
.link { color: var(--accent); }
.honest ul { margin: 0; padding-left: 18px; color: var(--text-2); }
.honest li { margin-bottom: 8px; }
.honest b { color: var(--text); }
.closing { text-align: center; padding: 24px 0; }
.closing h2 { font-size: clamp(22px, 3.5vw, 30px); letter-spacing: -.015em; margin: 0 0 18px; }
.closing .cta { justify-content: center; }
.site-foot { border-top: 1px solid var(--border); }
.site-foot .inner { max-width: 1180px; margin: 0 auto; padding: 16px; display: flex; gap: 16px; flex-wrap: wrap;
  color: var(--muted); font-size: 13px; }
.site-foot .spacer { flex: 1; }
@media (max-width: 640px) {
  .hero { padding-top: 28px; }
  header.top nav .hide-sm { display: none; }
  .landing section { margin-bottom: 40px; }
}

/* ---- paper trades ---- */
.rule-line { color: var(--text-2); font-size: 13px; margin: 10px 0 0; }
.rule-line b { color: var(--text); font-weight: 600; }
.trades-cols { align-items: start; }
.ret { font-family: var(--mono); font-weight: 600; white-space: nowrap; }
.ret.up { color: var(--good); }
.ret.down { color: var(--crit); }
.events { list-style: none; margin: 0; padding: 0; max-height: 640px; overflow-y: auto; }
.events li { display: grid; grid-template-columns: 46px 1fr auto; gap: 10px; align-items: center;
  padding: 9px 12px; border-bottom: 1px solid var(--border); font-size: 14px; }
.events li:last-child { border-bottom: 0; }
.events .ev { font-family: var(--mono); font-size: 11px; font-weight: 700; text-align: center; padding: 3px 0; border-radius: 5px; }
.events .ev.buy { background: var(--accent-soft); color: var(--accent); }
.events .ev.sell { background: var(--surface-2); color: var(--text-2); }
.events .ev-body a { font-weight: 600; }
.events .ev-body .sub { color: var(--muted); font-size: 12px; margin-left: 4px; }
.events .ev-time { color: var(--muted); font-size: 12px; white-space: nowrap; }
.events li.fresh { animation: fresh 2.5s ease-out; }
@keyframes fresh { from { background: color-mix(in srgb, var(--accent) 22%, transparent); } to { background: transparent; } }
@media (prefers-reduced-motion: reduce) { .events li.fresh { animation: none; outline: 1px solid var(--accent); } }
@media (max-width: 640px) { .events li { grid-template-columns: 40px 1fr; } .events .ev-time { grid-column: 2; } }

/* ---- distribution read ---- */
.dist-head { padding: 14px 16px 6px; }
.dist-head b { font-size: 18px; margin-right: 8px; }
.dist-head p { margin: 6px 0 0; color: var(--text-2); font-size: 14px; }
.fams { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px 16px 10px; }
.fam { font-size: 12px; padding: 3px 8px; border-radius: 999px; border: 1px solid var(--border); color: var(--muted); }
.fam.fired { color: var(--serious); border-color: color-mix(in srgb, var(--serious) 50%, transparent); }
.fam.clear { color: var(--text-2); }
.tile.dist.bundled b { color: var(--crit); }
.tile.dist.cabaled b { color: var(--serious); }
.tile.dist.organic b { color: var(--accent); }
