/* Public stats page — on-brand with landing.css (expressive sci-fi / terminal).
   Uses landing.css design tokens (--bg, --bg-card, --border, --accent, --danger,
   --font-sans/--font-mono, --radius). Data uses mono + tabular figures. */

.st-wrap {
  max-width: 1120px;
  margin: 0 auto;
  padding: 28px 24px 96px;
  counter-reset: sec;
  /* Faint HUD grid over the landing's radial glow body background. */
  background-image:
    linear-gradient(to right, rgba(124,131,140,0.035) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(124,131,140,0.035) 1px, transparent 1px);
  background-size: 56px 56px;
  background-position: center top;
}

/* ── Header ───────────────────────────────────────────── */
.st-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 6px 0 40px;
}
.st-brand {
  font-family: var(--font-mono);
  font-weight: 700; letter-spacing: 0.18em; font-size: 16px;
  color: var(--text); text-decoration: none;
  display: inline-flex; align-items: center; gap: 8px;
}
.st-brand::before {
  content: ''; width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent); box-shadow: 0 0 10px var(--accent);
}
.st-paper-badge {
  font-family: var(--font-mono);
  font-size: 10.5px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--accent);
  border: 1px solid var(--accent-mid);
  border-radius: 999px; padding: 5px 12px;
  background: var(--accent-dim);
  display: inline-flex; align-items: center; gap: 8px;
}
.st-paper-badge::before {
  content: ''; width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent); box-shadow: 0 0 0 0 var(--accent);
  animation: pulse 2s infinite;
}

/* ── Hero ─────────────────────────────────────────────── */
.st-hero { margin-bottom: 44px; max-width: 760px; }
.st-hero h1 {
  font-size: clamp(30px, 5vw, 46px);
  line-height: 1.05; letter-spacing: -0.02em;
  margin: 0 0 14px; color: var(--text); font-weight: 700;
}
.st-sub { color: var(--text-mid); font-size: 17px; margin: 0 0 14px; max-width: 620px; }
.st-updated {
  font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.04em;
  color: var(--text-dim); margin: 0;
}

.st-error {
  margin: 20px 0; padding: 16px 18px;
  border: 1px solid var(--border-hi); border-left: 2px solid var(--danger);
  border-radius: var(--radius); color: var(--text-mid);
  background: var(--bg-card); font-family: var(--font-mono); font-size: 13px;
}

/* ── Summary cards ────────────────────────────────────── */
.st-summary {
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px;
  margin: 8px 0 4px;
}
.st-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 16px 16px;
  position: relative; overflow: hidden;
  transition: border-color 160ms ease, transform 160ms ease;
}
.st-card::before {
  content: ''; position: absolute; left: 0; top: 0; height: 2px; width: 100%;
  background: linear-gradient(90deg, var(--accent-mid), transparent 70%);
  opacity: 0.5;
}
.st-card:hover { border-color: var(--border-hi); transform: translateY(-2px); }
.st-card-label {
  font-family: var(--font-mono);
  font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--text-dim); margin-bottom: 10px;
}
.st-card-value {
  font-family: var(--font-mono);
  font-size: 26px; font-weight: 700; color: var(--text);
  font-variant-numeric: tabular-nums; letter-spacing: -0.01em;
}
.up { color: var(--accent); }
.down { color: var(--danger); }

/* ── Sections ─────────────────────────────────────────── */
.st-section { margin-top: 56px; }
.st-section > h2 {
  font-family: var(--font-mono);
  font-size: 13px; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--text-mid); margin: 0 0 18px;
  display: flex; align-items: baseline; gap: 10px;
}
.st-section > h2::before {
  counter-increment: sec;
  content: "// 0" counter(sec);
  color: var(--accent); font-weight: 700; letter-spacing: 0.08em;
}

/* ── Equity chart ─────────────────────────────────────── */
.st-chart-box {
  height: 380px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px 14px 10px;
  box-shadow: 0 24px 60px -28px rgba(0,0,0,0.6), 0 0 0 1px var(--border) inset;
}
@media (max-width: 560px) { .st-chart-box { height: 300px; } }

/* ── Models leaderboard ───────────────────────────────── */
.st-models { display: flex; flex-direction: column; gap: 8px; }
.st-model-row {
  display: grid; grid-template-columns: 1.5fr 1.3fr 0.9fr;
  align-items: center; gap: 12px;
  padding: 15px 18px;
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--bg-card);
  transition: border-color 160ms ease, background 160ms ease;
}
.st-model-row:hover { border-color: var(--border-hi); background: var(--bg-card-hi); }
.st-model-name {
  color: var(--text); font-weight: 600; font-size: 15px;
  display: inline-flex; align-items: center; gap: 9px;
}
.st-dot {
  display: inline-block; width: 9px; height: 9px; border-radius: 50%;
  box-shadow: 0 0 8px currentColor;
}
.st-model-cell {
  font-family: var(--font-mono); font-size: 13px;
  color: var(--text-mid); text-align: right;
  font-variant-numeric: tabular-nums;
}

/* ── Pairs table ──────────────────────────────────────── */
.st-pairs {
  border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; background: var(--bg-card);
}
.st-prow {
  display: grid; grid-template-columns: 1fr 0.7fr 0.9fr 0.8fr 1fr;
  gap: 10px; padding: 13px 18px; align-items: center;
}
.st-prow:not(.st-prow-head) { border-top: 1px solid var(--border); }
.st-prow:not(.st-prow-head) span { font-family: var(--font-mono); font-size: 13px; font-variant-numeric: tabular-nums; color: var(--text-mid); }
.st-prow:not(.st-prow-head):hover { background: var(--bg-card-hi); }
.st-prow-head span {
  font-family: var(--font-mono);
  font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--text-dim);
}
.st-prow span:nth-child(n+2), .st-prow-head span:nth-child(n+2) { text-align: right; }
.st-strong { color: var(--text) !important; font-weight: 700 !important; letter-spacing: 0.02em; }

/* ── Recent trades ────────────────────────────────────── */
.st-recent { display: flex; flex-direction: column; gap: 12px; }
.st-trade {
  border: 1px solid var(--border); border-left: 2px solid var(--border-hi);
  border-radius: var(--radius);
  padding: 15px 18px; background: var(--bg-card);
  transition: border-color 160ms ease;
}
.st-trade:hover { border-color: var(--border-hi); }
.st-trade-top { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.st-badge {
  font-family: var(--font-mono);
  font-size: 11px; letter-spacing: 0.04em;
  padding: 3px 10px; border-radius: 999px; border: 1px solid; color: var(--text);
  background: rgba(255,255,255,0.02);
}
.st-side {
  font-family: var(--font-mono);
  font-size: 11px; font-weight: 700; letter-spacing: 0.06em;
  padding: 3px 9px; border-radius: var(--radius-sm);
}
.st-side-long { color: var(--accent); background: var(--accent-dim); }
.st-side-short { color: var(--danger); background: oklch(0.7 0.19 25 / 0.12); }
.st-trade-px {
  font-family: var(--font-mono); font-size: 13px;
  color: var(--text-mid); font-variant-numeric: tabular-nums;
}
.st-trade-pnl {
  margin-left: auto; font-family: var(--font-mono); font-weight: 700;
  font-size: 14px; font-variant-numeric: tabular-nums;
}
.st-trade-thesis, .st-trade-reason {
  color: var(--text-mid); font-size: 13.5px; line-height: 1.55; margin-top: 10px;
}
.st-trade-tag {
  font-family: var(--font-mono);
  font-size: 9.5px; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--text-dim); margin-right: 8px;
}

/* ── Methodology ──────────────────────────────────────── */
.st-method p {
  color: var(--text-mid); line-height: 1.7; max-width: 760px; font-size: 14.5px;
  padding: 18px 20px; border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--bg-card); margin: 0;
}

/* ── Responsive ───────────────────────────────────────── */
@media (max-width: 720px) {
  .st-summary { grid-template-columns: repeat(2, 1fr); }
  .st-wrap { padding: 24px 16px 80px; }
  .st-model-row { grid-template-columns: 1.2fr 1fr; }
  .st-model-row .st-model-cell:nth-child(2) { display: none; }
  .st-prow { grid-template-columns: 1fr 0.7fr 1fr; }
  .st-prow span:nth-child(3), .st-prow-head span:nth-child(3),
  .st-prow span:nth-child(4), .st-prow-head span:nth-child(4) { display: none; }
}
