:root {
  --bg: #08090b;
  --bg-elev: #0f1115;
  --panel: #101317;
  --line: #1d2128;
  --line-soft: #171b21;
  --text: #e8eaed;
  --muted: #8b929d;
  --faint: #5b626d;
  --accent: #5eead4;
  --accent-dim: #2dd4bf;
  --accent-ghost: rgba(94, 234, 212, 0.12);
  --warn: #f59e0b;
  --king: #facc15;
  --radius: 12px;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --sans: "Inter", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

.grid-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  background-image:
    linear-gradient(var(--line-soft) 1px, transparent 1px),
    linear-gradient(90deg, var(--line-soft) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(circle at 50% 0%, #000 0%, transparent 70%);
          mask-image: radial-gradient(circle at 50% 0%, #000 0%, transparent 70%);
  opacity: 0.5;
  pointer-events: none;
}

.wrap { width: min(1080px, 92vw); margin: 0 auto; }
main.wrap, header > .wrap, footer > .wrap { position: relative; z-index: 1; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(8, 9, 11, 0.82);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; gap: 24px; height: 60px; }
.brand { display: flex; align-items: center; gap: 9px; text-decoration: none; color: var(--text); }
.brand-mark { color: var(--accent); font-size: 14px; }
.brand-name { font-weight: 700; letter-spacing: 0.14em; font-size: 15px; }
.brand-tag {
  font-family: var(--mono); font-size: 11px; color: var(--muted);
  border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px; text-transform: uppercase;
}
.nav { display: flex; gap: 22px; margin-left: auto; }
.nav a { color: var(--muted); text-decoration: none; font-size: 14px; transition: color .15s; }
.nav a:hover { color: var(--text); }
.updated { font-family: var(--mono); font-size: 12px; color: var(--faint); }

.hero { padding: 72px 0 40px; max-width: 760px; }
.hero h1 { font-size: clamp(30px, 5vw, 46px); line-height: 1.08; letter-spacing: -0.02em; margin: 0 0 20px; font-weight: 700; }
.hero .accent { color: var(--accent); }
.lede { color: var(--muted); font-size: 17px; max-width: 620px; margin: 0; }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin-top: 40px; }
.stat { background: var(--panel); padding: 18px 20px; }
.stat-val { font-family: var(--mono); font-size: 26px; font-weight: 600; color: var(--text); }
.stat-key { color: var(--faint); font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; margin-top: 4px; }

.panel {
  background: linear-gradient(180deg, var(--bg-elev), var(--panel));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 26px 28px;
  margin: 28px 0;
}
.panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; margin-bottom: 20px; }
.panel h2 { font-size: 19px; margin: 0; letter-spacing: -0.01em; }
.panel-sub { color: var(--muted); font-size: 13.5px; margin: 6px 0 0; max-width: 60ch; }

.progress-meta { display: flex; align-items: center; gap: 10px; color: var(--faint); font-size: 11px; }
.status-pill {
  display: inline-flex; align-items: center; border: 1px solid var(--line);
  border-radius: 999px; padding: 3px 9px; color: var(--muted);
  font-family: var(--mono); font-size: 10px; text-transform: uppercase; letter-spacing: .05em;
}
.status-running, .status-evaluating { color: var(--accent); border-color: rgba(94, 234, 212, .35); background: var(--accent-ghost); }
.status-pill.status-evaluating { gap: 6px; }
.status-pill.status-evaluating::before,
.miner-state.status-evaluating::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: currentColor;
  box-shadow: 0 0 0 0 rgba(94, 234, 212, .35);
  animation: loading-pulse 1.35s ease-out infinite;
  flex: 0 0 auto;
}
.status-completed, .status-finished { color: #86efac; border-color: rgba(134, 239, 172, .3); background: rgba(134, 239, 172, .08); }
.status-failed, .status-rejected { color: #fca5a5; border-color: rgba(252, 165, 165, .3); background: rgba(252, 165, 165, .08); }
.status-stale { color: var(--warn); border-color: rgba(245, 158, 11, .3); background: rgba(245, 158, 11, .08); }
.status-skipped, .status-not-selected { color: var(--faint); }
.progress-content { min-height: 100px; }
.progress-overview { display: grid; gap: 10px; }
.validator-progress-row {
  display: grid; grid-template-columns: minmax(180px, 1.25fr) repeat(2, minmax(150px, 1fr));
  gap: 12px; align-items: center; padding: 13px 14px; border: 1px solid var(--line);
  border-radius: 9px; background: var(--bg);
}
.validator-progress-name { display: flex; align-items: center; gap: 9px; min-width: 0; }
.validator-progress-name .hotkey { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stage-summary {
  min-width: 0;
  color: var(--muted);
  font-size: 12px;
}
.stage-summary-head,
.stage-summary-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
}
.stage-summary strong {
  color: var(--text);
  font-size: 12px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.stage-state,
.stage-mini-base,
.stage-mini-active,
.stage-mini-count {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 10px;
  line-height: 1;
  white-space: nowrap;
}
.stage-state,
.stage-mini-base,
.stage-mini-active {
  border: 1px solid var(--line);
  padding: 4px 7px;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.stage-mini-count {
  color: var(--text);
  font-weight: 600;
}
.stage-mini-active,
.stage-state.status-evaluating,
.stage-state.status-running {
  color: var(--accent);
  border-color: rgba(94, 234, 212, .32);
  background: var(--accent-ghost);
}
.stage-summary.is-evaluating .stage-state {
  gap: 6px;
}
.stage-summary.is-evaluating .stage-state::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: currentColor;
  box-shadow: 0 0 0 0 rgba(94, 234, 212, .35);
  animation: loading-pulse 1.35s ease-out infinite;
  flex: 0 0 auto;
}
.stage-mini-base.status-finished,
.stage-mini-base.status-completed,
.stage-state.status-finished,
.stage-state.status-completed {
  color: #86efac;
  border-color: rgba(134, 239, 172, .3);
  background: rgba(134, 239, 172, .08);
}
.stage-mini-base.status-evaluating {
  gap: 5px;
  color: var(--accent);
  border-color: rgba(94, 234, 212, .32);
  background: var(--accent-ghost);
}
.stage-mini-base.status-evaluating::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 999px;
  background: currentColor;
  animation: loading-pulse 1.35s ease-out infinite;
}
.stage-mini-bar {
  height: 4px;
  margin: 8px 0 9px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--line);
}
.stage-mini-bar > i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent-dim), var(--accent));
  transition: width .25s ease;
}
.stage-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.stage-card { border: 1px solid var(--line); border-radius: 10px; background: var(--bg); overflow: hidden; }
.stage-card.is-evaluating {
  border-color: rgba(94, 234, 212, .26);
  box-shadow: inset 0 1px 0 rgba(94, 234, 212, .08);
}
.stage-head { padding: 14px 15px; border-bottom: 1px solid var(--line); }
.stage-title-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.stage-title { font-size: 14px; font-weight: 600; }
.stage-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 10px;
}
.stage-metric {
  display: inline-flex;
  align-items: baseline;
  gap: 5px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 8px;
  color: var(--faint);
  font-family: var(--mono);
  font-size: 10px;
  line-height: 1;
  text-transform: uppercase;
}
.stage-metric strong {
  color: var(--text);
  font-size: 10px;
  font-weight: 600;
}
.stage-metric-active strong {
  color: var(--accent);
}
.stage-bar { position: relative; height: 4px; margin-top: 9px; border-radius: 3px; overflow: hidden; background: var(--line); }
.stage-bar > i { display: block; height: 100%; background: var(--accent); transition: width .25s ease; }
.stage-bar.is-evaluating::after {
  content: "";
  position: absolute;
  inset: 0;
  width: 42%;
  background: linear-gradient(90deg, transparent, rgba(94, 234, 212, .72), transparent);
  transform: translateX(-120%);
  animation: loading-sweep 1.45s ease-in-out infinite;
}
.miner-state-list { max-height: 290px; overflow: auto; }
.miner-state-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 15px; border-bottom: 1px solid var(--line-soft); }
.miner-state-row:last-child { border-bottom: 0; }
.miner-state-row .hotkey { font-size: 11.5px; }
.miner-state { font-family: var(--mono); font-size: 10px; text-transform: uppercase; white-space: nowrap; }
.miner-state.status-evaluating { display: inline-flex; align-items: center; gap: 6px; color: var(--accent); }
.baseline-state-row { background: rgba(255, 255, 255, 0.018); }
.baseline-label { color: var(--muted); font-family: var(--mono); font-size: 11.5px; }

.select { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); white-space: nowrap; }
.select select {
  background: var(--bg); color: var(--text); border: 1px solid var(--line);
  border-radius: 8px; padding: 7px 10px; font-family: var(--mono); font-size: 12.5px; cursor: pointer;
  max-width: 240px;
}
.select select:focus { outline: none; border-color: var(--accent-dim); }
.trend-epoch {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 9px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10px;
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap;
}

.table-wrap { position: relative; overflow-x: auto; }
.board { width: 100%; border-collapse: collapse; }
.board thead th {
  text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: 0.07em;
  color: var(--faint); font-weight: 600; padding: 0 14px 12px; border-bottom: 1px solid var(--line);
}
.board td { padding: 13px 14px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
.board tbody tr:last-child td { border-bottom: none; }
.board tbody tr { transition: background .12s; }
.board tbody tr:hover { background: rgba(255, 255, 255, 0.018); }
.c-rank { width: 56px; }
.c-score { width: 145px; text-align: right; }
.c-stage { width: 180px; }
.c-round-status { width: 120px; }
.c-bar { width: 34%; }
.rank-num { font-family: var(--mono); font-size: 14px; color: var(--muted); }
.rank-1 .rank-num, .rank-2 .rank-num, .rank-3 .rank-num { color: var(--accent); font-weight: 600; }
.hotkey { font-family: var(--mono); font-size: 13px; }
.hotkey .head { color: var(--text); }
.hotkey .tail { color: var(--faint); }
.score-val { font-family: var(--mono); font-size: 14px; text-align: right; color: var(--text); }
.bar { height: 7px; border-radius: 4px; background: var(--line); overflow: hidden; }
.bar > i { display: block; height: 100%; border-radius: 4px; background: linear-gradient(90deg, var(--accent-dim), var(--accent)); }
.entry-badge,
.king-badge {
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(94, 234, 212, .24);
  border-radius: 999px;
  padding: 3px 8px;
  color: var(--accent);
  background: rgba(94, 234, 212, .06);
  font-family: var(--mono);
  font-size: 9px;
  line-height: 1.2;
  text-transform: uppercase;
  letter-spacing: .04em;
  white-space: nowrap;
}
.entry-full { color: #86efac; border-color: rgba(134, 239, 172, .3); background: rgba(134, 239, 172, .08); }
.king-badge {
  margin-left: 10px;
  color: var(--king);
  border-color: rgba(250, 204, 21, .38);
  background: rgba(250, 204, 21, .1);
  font-weight: 700;
}
.board tbody tr.is-king {
  background: linear-gradient(90deg, rgba(250, 204, 21, .1), rgba(250, 204, 21, .025) 58%, transparent);
  box-shadow: inset 3px 0 0 var(--king);
}
.board tbody tr.is-king:hover { background: linear-gradient(90deg, rgba(250, 204, 21, .14), rgba(250, 204, 21, .04) 58%, transparent); }
.board tbody tr.is-king .rank-num { color: var(--king); }
.score-pending { color: var(--faint); font-size: 11px; text-transform: uppercase; }
.previous-rankings { margin-top: 28px; padding-top: 24px; border-top: 1px solid var(--line); }
.previous-rankings[hidden] { display: none; }
.stale-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; margin-bottom: 14px; }
.stale-head h3 { margin: 0; color: var(--muted); font-size: 15px; }
.stale-head p { margin: 4px 0 0; color: var(--faint); font-size: 12px; }
.board-stale { min-width: 880px; }
.board-stale td { color: var(--faint); padding-top: 10px; padding-bottom: 10px; }
.board-stale .hotkey .head { color: var(--muted); }
.board-stale .score-val { color: var(--muted); }
.board-stale .c-final-score { color: var(--text); }
.empty { color: var(--faint); text-align: center; padding: 40px 0; font-size: 14px; }

.charts { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.chart-card { margin: 0; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); padding: 16px 16px 8px; }
.chart-card figcaption { font-size: 13px; color: var(--text); margin-bottom: 10px; display: flex; justify-content: space-between; align-items: baseline; }
.chart-card .hint { font-size: 11px; color: var(--faint); font-weight: 400; }
.chart-box { position: relative; height: 240px; }
.awaiting {
  position: absolute; inset: 0; display: grid; place-items: center;
  font-family: var(--mono); font-size: 12px; color: var(--faint);
  background: repeating-linear-gradient(45deg, transparent, transparent 9px, rgba(255,255,255,0.015) 9px, rgba(255,255,255,0.015) 18px);
  border-radius: 8px;
}
.awaiting[hidden] { display: none; }

.site-footer { border-top: 1px solid var(--line); margin-top: 40px; }
.footer-inner { display: flex; justify-content: space-between; align-items: center; height: 60px; color: var(--faint); font-size: 12.5px; }

.mono { font-family: var(--mono); }

@keyframes loading-pulse {
  0% { box-shadow: 0 0 0 0 rgba(94, 234, 212, .38); opacity: .72; }
  72% { box-shadow: 0 0 0 7px rgba(94, 234, 212, 0); opacity: 1; }
  100% { box-shadow: 0 0 0 0 rgba(94, 234, 212, 0); opacity: .72; }
}

@keyframes loading-sweep {
  0% { transform: translateX(-120%); opacity: 0; }
  18% { opacity: 1; }
  82% { opacity: 1; }
  100% { transform: translateX(260%); opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .status-pill.status-evaluating::before,
  .stage-summary.is-evaluating .stage-state::before,
  .miner-state.status-evaluating::before,
  .stage-bar.is-evaluating::after {
    animation: none;
  }
}

@media (max-width: 760px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
  .charts { grid-template-columns: 1fr; }
  .nav { display: none; }
  .c-bar { display: none; }
  .c-stage { width: auto; }
  .panel-head { flex-direction: column; }
  .progress-meta { width: 100%; justify-content: space-between; }
  .stage-grid { grid-template-columns: 1fr; }
  .validator-progress-row { grid-template-columns: 1fr; }
  .hero { padding: 48px 0 28px; }
}

@media (max-width: 560px) {
  .c-stage { display: none; }
  .c-round-status { display: none; }
  .king-badge { margin-left: 6px; }
  .stale-head { align-items: center; }
}
