/* ─── layout ─────────────────────────────────────────────────────────── */
.models-main {
  max-width: 1140px;
  margin: 0 auto;
  padding: 2rem 1.25rem 4rem;
}

/* ─── hero ────────────────────────────────────────────────────────────── */
.model-hero {
  margin-bottom: 2.5rem;
}

.model-hero h1 {
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0 0 0.75rem;
  background: linear-gradient(135deg, var(--text) 0%, var(--accent) 60%, #93c5fd 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.model-hero .lede {
  color: var(--muted);
  font-size: 0.95rem;
  max-width: 64ch;
  line-height: 1.6;
  margin: 0 0 1.1rem;
}

.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.hero-badge {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
}

.hero-badge.accent {
  background: rgba(61, 156, 240, 0.12);
  border-color: rgba(61, 156, 240, 0.4);
  color: var(--accent);
}

.hero-badge.pipeline {
  background: rgba(52, 211, 153, 0.1);
  border-color: rgba(52, 211, 153, 0.35);
  color: #34d399;
}

/* ─── position sections ───────────────────────────────────────────────── */
.pos-section {
  margin-bottom: 2.5rem;
}

.pos-header {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding-bottom: 0.6rem;
  margin-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}

.pos-badge {
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  padding: 0.2rem 0.6rem;
  border-radius: 5px;
}

.pos-count {
  font-size: 0.82rem;
  color: var(--muted);
}

.pos-section-label {
  font-size: 0.78rem;
  color: var(--muted);
  margin-left: auto;
  letter-spacing: 0.02em;
}

/* position color accents */
.pos-qb .pos-badge  { background: rgba(96,165,250,0.14); color: #60a5fa; border: 1px solid rgba(96,165,250,0.3); }
.pos-qb .pos-header { border-bottom-color: rgba(96,165,250,0.2); }
.pos-rb .pos-badge  { background: rgba(251,146,60,0.14); color: #fb923c; border: 1px solid rgba(251,146,60,0.3); }
.pos-rb .pos-header { border-bottom-color: rgba(251,146,60,0.2); }
.pos-wr .pos-badge  { background: rgba(52,211,153,0.12); color: #34d399; border: 1px solid rgba(52,211,153,0.28); }
.pos-wr .pos-header { border-bottom-color: rgba(52,211,153,0.2); }
.pos-te .pos-badge  { background: rgba(167,139,250,0.14); color: #a78bfa; border: 1px solid rgba(167,139,250,0.3); }
.pos-te .pos-header { border-bottom-color: rgba(167,139,250,0.2); }

/* ─── table ───────────────────────────────────────────────────────────── */
.scroll {
  overflow-x: auto;
}

.models-main table {
  border-collapse: collapse;
  width: 100%;
  font-size: 0.83rem;
}

.models-main thead {
  position: sticky;
  top: 56px;
  z-index: 2;
}

.models-main th {
  background: var(--surface);
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.45rem 0.6rem;
  border-bottom: 1px solid var(--border);
  border-top: 1px solid var(--border);
  white-space: nowrap;
}

.models-main td {
  padding: 0.38rem 0.6rem;
  border-bottom: 1px solid rgba(42, 53, 68, 0.6);
  white-space: nowrap;
  color: var(--text);
}

.models-main tbody tr:hover td {
  background: rgba(61, 156, 240, 0.04);
}

/* rank highlight — top 3 */
.models-main tbody tr.rank-gold td   { background: rgba(251,191,36,0.05); }
.models-main tbody tr.rank-silver td { background: rgba(148,163,184,0.04); }
.models-main tbody tr.rank-bronze td { background: rgba(180,119,60,0.04); }
.models-main tbody tr.rank-gold:hover td   { background: rgba(251,191,36,0.09); }
.models-main tbody tr.rank-silver:hover td { background: rgba(148,163,184,0.08); }
.models-main tbody tr.rank-bronze:hover td { background: rgba(180,119,60,0.08); }

.rank-num {
  color: var(--muted);
  font-size: 0.78rem;
  font-variant-numeric: tabular-nums;
  min-width: 1.8rem;
  text-align: right;
}

.rank-num.r1 { color: #fbbf24; font-weight: 700; }
.rank-num.r2 { color: #94a3b8; font-weight: 600; }
.rank-num.r3 { color: #b4773c; font-weight: 600; }

/* numeric cells */
.models-main td.num,
.models-main th.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

/* proj column — the headline number */
.proj-cell {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text);
  text-align: right;
  font-variant-numeric: tabular-nums;
}

/* range column */
.range-cell {
  color: var(--muted);
  font-size: 0.8rem;
  text-align: right;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}

/* team / bye / gms: secondary info */
.models-main td.secondary {
  color: var(--muted);
  font-size: 0.8rem;
}

/* value-vs-ADP pill */
.val-pill {
  display: inline-block;
  font-size: 0.76rem;
  font-weight: 700;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  font-variant-numeric: tabular-nums;
}

.val-pill.val-pos {
  background: rgba(52, 211, 153, 0.13);
  color: #34d399;
  border: 1px solid rgba(52, 211, 153, 0.3);
}

.val-pill.val-neg {
  background: rgba(248, 113, 113, 0.1);
  color: #f87171;
  border: 1px solid rgba(248, 113, 113, 0.25);
}

.val-dash { color: var(--muted); font-size: 0.8rem; }

/* player name column */
.player-cell {
  font-weight: 500;
  max-width: 14rem;
}

.rookie-badge {
  display: inline-block;
  background: rgba(167, 139, 250, 0.18);
  color: #c4b5fd;
  border-radius: 4px;
  font-size: 0.67rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 0.05rem 0.3rem;
  margin-left: 0.35rem;
  vertical-align: middle;
  text-transform: uppercase;
}

.status-badge {
  display: inline-block;
  border-radius: 4px;
  font-size: 0.67rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 0.05rem 0.3rem;
  margin-left: 0.35rem;
  vertical-align: middle;
  text-transform: uppercase;
  cursor: help;
}

.status-badge.st-injured {
  background: rgba(248, 113, 113, 0.14);
  color: #f8a5a5;
  border: 1px solid rgba(248, 113, 113, 0.3);
}

.status-badge.st-suspended,
.status-badge.st-holdout {
  background: rgba(251, 191, 36, 0.12);
  color: #fcd34d;
  border: 1px solid rgba(251, 191, 36, 0.28);
}

.status-badge.st-free_agent {
  background: rgba(148, 163, 184, 0.12);
  color: #cbd5e1;
  border: 1px solid rgba(148, 163, 184, 0.3);
}

/* ─── model eval section ─────────────────────────────────────────────── */
.eval-section {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

.eval-section > h2 {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 0 0 0.3rem;
  color: var(--text);
}

.eval-section > .eval-desc {
  font-size: 0.85rem;
  color: var(--muted);
  max-width: 64ch;
  line-height: 1.55;
  margin-bottom: 1.75rem;
}

.eval-pos-block {
  margin-bottom: 1.75rem;
}

.eval-pos-label {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.eval-pos-label::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* skill eval table */
.eval-table {
  border-collapse: collapse;
  font-size: 0.82rem;
  width: 100%;
}

.eval-table th {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 0.35rem 0.6rem;
  border-bottom: 1px solid var(--border);
  text-align: left;
  white-space: nowrap;
}

.eval-table td {
  padding: 0.38rem 0.6rem;
  border-bottom: 1px solid rgba(42,53,68,0.5);
  white-space: nowrap;
}

.eval-table td.num, .eval-table th.num { text-align: right; font-variant-numeric: tabular-nums; }
.eval-table td.dim  { color: var(--muted); font-size: 0.8rem; }
.eval-table span.beat { color: #34d399; font-size: 0.78rem; font-weight: 600; margin-left: 0.4rem; }

/* R² bar */
.r2-wrap {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  justify-content: flex-end;
}

.r2-bar-track {
  width: 52px;
  height: 5px;
  background: rgba(255,255,255,0.07);
  border-radius: 999px;
  overflow: hidden;
  flex-shrink: 0;
}

.r2-bar-fill {
  height: 100%;
  border-radius: 999px;
  background: var(--accent);
  width: var(--pct, 0%);
}

.r2-bar-fill.neg { background: #f87171; }

.r2-val { font-variant-numeric: tabular-nums; font-size: 0.8rem; }
.r2-val.pos { color: #34d399; }
.r2-val.neg { color: #f87171; }

/* rookie model cards */
.rookie-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.rookie-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1rem 1.1rem;
  position: relative;
  overflow: hidden;
}

.rookie-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  border-radius: 8px 8px 0 0;
}

.rookie-card.rc-qb::before { background: #60a5fa; }
.rookie-card.rc-rb::before { background: #fb923c; }
.rookie-card.rc-wr::before { background: #34d399; }
.rookie-card.rc-te::before { background: #a78bfa; }

.rookie-card-pos {
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.4rem;
}

.rookie-card-metric {
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  line-height: 1;
  margin-bottom: 0.2rem;
}

.rookie-card-unit {
  font-size: 0.72rem;
  color: var(--muted);
  margin-bottom: 0.5rem;
}

.rookie-card-n {
  font-size: 0.72rem;
  color: var(--muted);
  border-top: 1px solid var(--border);
  padding-top: 0.4rem;
  margin-top: 0.25rem;
}

/* ─── misc ───────────────────────────────────────────────────────────── */
.models-main .err {
  color: #f87171;
  padding: 1rem 0;
}

.models-main code {
  background: var(--surface);
  border-radius: 4px;
  padding: 0.05rem 0.3rem;
  font-size: 0.85em;
}

.section-meta {
  font-size: 0.78rem;
  color: var(--muted);
  margin-bottom: 0.6rem;
}
