:root {
  color-scheme: dark;
  --bg: #07110f;
  --panel: rgba(14, 29, 25, 0.9);
  --line: rgba(183, 224, 204, 0.14);
  --text: #effbf5;
  --muted: #93aaa0;
  --mint: #73e2b7;
  --gold: #f6c86e;
  --red: #ff857f;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.22);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 320px;
  color: var(--text);
  background:
    radial-gradient(circle at 88% 3%, rgba(31, 128, 91, 0.2), transparent 30rem),
    radial-gradient(circle at 5% 35%, rgba(185, 127, 37, 0.08), transparent 28rem),
    var(--bg);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", sans-serif;
  line-height: 1.55;
}

.wrap { width: min(1180px, calc(100% - 36px)); margin-inline: auto; }
.hero { padding: 58px 0 42px; border-bottom: 1px solid var(--line); }
.hero-grid { display: flex; align-items: end; justify-content: space-between; gap: 32px; }
.eyebrow { margin: 0 0 8px; color: var(--mint); font-size: 0.72rem; font-weight: 800; letter-spacing: 0.16em; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 12px; font-size: clamp(2.5rem, 8vw, 5.6rem); line-height: 0.96; letter-spacing: -0.065em; }
h2 { margin-bottom: 0; font-size: clamp(1.35rem, 3vw, 2rem); letter-spacing: -0.03em; }
h3 { margin-bottom: 12px; color: var(--muted); font-size: 0.8rem; letter-spacing: 0.08em; text-transform: uppercase; }
.hero-copy { max-width: 650px; margin-bottom: 0; color: var(--muted); font-size: 1.05rem; }
.hero-status { display: flex; min-width: 180px; align-items: center; gap: 12px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 14px; background: rgba(255,255,255,.025); }
.hero-status strong, .hero-status small { display: block; }
.hero-status small { color: var(--muted); }
.status-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 18px currentColor; }
.status-dot.ready { color: var(--mint); background: var(--mint); }
.status-dot.error { color: var(--red); background: var(--red); }

main { padding: 28px 0 20px; }
.metric-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 18px; }
.metric, .panel { border: 1px solid var(--line); background: var(--panel); box-shadow: var(--shadow); }
.metric { padding: 18px; border-radius: 16px; }
.metric span { display: block; margin-bottom: 6px; color: var(--muted); font-size: .78rem; }
.metric strong { font-size: clamp(1.35rem, 3vw, 2rem); letter-spacing: -.03em; }
.panel { margin-bottom: 18px; padding: 24px; border-radius: 20px; backdrop-filter: blur(12px); }
.section-heading { display: flex; align-items: start; justify-content: space-between; gap: 20px; margin-bottom: 22px; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; }
.filters label { color: var(--muted); font-size: .72rem; }
select { display: block; min-width: 135px; margin-top: 4px; padding: 8px 30px 8px 10px; color: var(--text); border: 1px solid var(--line); border-radius: 9px; background: #0c1b17; }
.muted { color: var(--muted); font-size: .82rem; }
.chart { min-height: 230px; margin: 12px 0 20px; border: 1px solid var(--line); border-radius: 14px; background: rgba(0,0,0,.12); overflow: hidden; }
.chart svg { display: block; width: 100%; height: 230px; }
.chart-empty { display: grid; height: 230px; place-items: center; color: var(--muted); }
.grid-line { stroke: rgba(255,255,255,.08); stroke-width: 1; }
.trend-line { fill: none; stroke: var(--mint); stroke-width: 2.5; vector-effect: non-scaling-stroke; }
.trend-area { fill: url(#areaGradient); }
.axis-label { fill: var(--muted); font-size: 10px; }
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .82rem; }
th, td { padding: 11px 10px; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; }
th { color: var(--muted); font-size: .7rem; letter-spacing: .06em; text-transform: uppercase; }
td.value { color: var(--mint); font-weight: 750; }
.two-column { display: grid; grid-template-columns: 1.1fr .9fr; gap: 18px; }
.pill { display: inline-flex; align-items: center; padding: 5px 10px; color: var(--gold); border: 1px solid currentColor; border-radius: 999px; font-size: .7rem; white-space: nowrap; }
.pill.good { color: var(--mint); }
.detail-list { display: grid; grid-template-columns: 145px 1fr; gap: 10px 18px; margin: 0; }
.detail-list dt { color: var(--muted); }
.detail-list dd { margin: 0; }
.notice { margin: 20px 0 0; padding: 12px 14px; color: var(--gold); border-left: 2px solid var(--gold); background: rgba(246,200,110,.06); font-size: .82rem; }
.coverage-list, .stack-list { display: grid; gap: 9px; }
.coverage-row, .stack-row { display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: center; padding-bottom: 9px; border-bottom: 1px solid var(--line); }
.coverage-row small, .stack-row small { display: block; color: var(--muted); }
.backtest-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 12px; }
.backtest-card { padding: 16px; border: 1px solid var(--line); border-radius: 14px; background: rgba(255,255,255,.02); }
.backtest-card h3 { color: var(--text); text-transform: none; letter-spacing: 0; }
.backtest-metrics { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.backtest-metrics span { color: var(--muted); font-size: .7rem; }
.backtest-metrics strong { display: block; margin-top: 2px; font-size: 1.15rem; }
.plain-list { margin: 18px 0 0; padding-left: 18px; color: var(--muted); font-size: .8rem; }
.plain-list li + li { margin-top: 7px; }
.quality-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.footer { padding: 12px 0 36px; color: var(--muted); font-size: .76rem; }

@media (max-width: 820px) {
  .hero-grid, .section-heading { align-items: stretch; flex-direction: column; }
  .hero-status { min-width: 0; }
  .metric-grid { grid-template-columns: repeat(2, 1fr); }
  .two-column, .quality-grid { grid-template-columns: 1fr; }
  .filters { width: 100%; }
  .filters label { flex: 1; }
  select { width: 100%; min-width: 0; }
}

@media (max-width: 480px) {
  .wrap { width: min(100% - 22px, 1180px); }
  .hero { padding-top: 38px; }
  .panel { padding: 18px; border-radius: 16px; }
  .metric-grid { gap: 8px; }
  .metric { padding: 14px; }
  .detail-list { grid-template-columns: 1fr; gap: 3px; }
  .detail-list dd { margin-bottom: 9px; }
}
