
:root {
  --bg: #ffffff; --card: #ffffff; --border: #e5e7eb; --text: #0f172a;
  --muted: #64748b; --accent: #1d4ed8; --accent-dark: #1e3a8a;
  --hover: #eff6ff; --header-bg: #0f172a; --header-text: #f8fafc;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  background: var(--bg); color: var(--text); line-height: 1.55;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
header.site {
  background: var(--header-bg);
  color: var(--header-text); padding: 20px 36px;
  border-bottom: 3px solid var(--accent);
}
header.site .row { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 16px; }
header.site h1 { margin: 0; font-size: 20px; font-weight: 700; letter-spacing: -0.01em; }
header.site h1 a { color: var(--header-text); }
header.site h1 .accent { color: var(--accent); }
header.site nav a {
  color: var(--header-text); opacity: 0.75; margin-left: 22px; font-size: 14px; font-weight: 500;
}
header.site nav a:hover { opacity: 1; text-decoration: none; }
header.site nav a.active { opacity: 1; border-bottom: 2px solid var(--accent); padding-bottom: 4px; }
header.site .meta { opacity: 0.6; font-size: 12px; margin-top: 4px; }
/* Reference pages: still reachable, deliberately quiet. */
header.site .row.secondary-nav { margin-top: 10px; justify-content: flex-end; gap: 0; }
header.site nav.secondary a { font-size: 12px; opacity: 0.45; margin-left: 18px; font-weight: 400; }
header.site nav.secondary a:hover { opacity: 0.8; }
header.site nav.secondary a.active { opacity: 0.9; }
.container { max-width: 1240px; margin: 0 auto; padding: 28px 36px; }
.container.narrow { max-width: 900px; }
h2 { color: var(--text); font-size: 22px; margin-top: 32px; font-weight: 600; }
h2 .accent { color: var(--accent); }
h3 { color: var(--text); font-size: 16px; margin-top: 22px; font-weight: 600; }
.card { background: var(--card); border: 1px solid var(--border); border-radius: 10px; padding: 20px 24px; margin-bottom: 18px; }
.lede { font-size: 15px; color: var(--muted); margin: 8px 0 18px 0; max-width: 720px; }
.kpi-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; margin-bottom: 22px; }
.kpi { background: var(--card); border: 1px solid var(--border); border-radius: 8px; padding: 14px 18px; }
.kpi .num { font-size: 24px; font-weight: 700; color: var(--accent); font-variant-numeric: tabular-nums; }
.kpi .label { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; }
table { width: 100%; background: var(--card); border-collapse: collapse;
  border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
th { background: #f8fafc; padding: 11px 14px; text-align: left;
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--muted); border-bottom: 1px solid var(--border); font-weight: 700; }
td { padding: 10px 14px; border-bottom: 1px solid var(--border); font-size: 14px; vertical-align: middle; }
tr:last-child td { border-bottom: none; }
tr.player-row:hover { background: var(--hover); cursor: pointer; }
td.rank { font-weight: 700; color: var(--accent); width: 50px; }
td.name { font-weight: 600; }
td.score { font-weight: 700; text-align: right; font-variant-numeric: tabular-nums; color: var(--accent); }
td.years, td.team, td.tier, td.consensus { color: var(--muted); font-variant-numeric: tabular-nums; }
.pos-badge { display: inline-block; color: white; padding: 3px 8px; border-radius: 4px;
  font-size: 11px; font-weight: 700; min-width: 32px; text-align: center; }
.controls { background: var(--card); border: 1px solid var(--border); border-radius: 8px;
  padding: 14px 18px; margin-bottom: 18px; display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.controls input, .controls select { font: inherit; padding: 7px 11px;
  border: 1px solid var(--border); border-radius: 6px; background: white; }
.controls input { flex: 1; min-width: 220px; }
.controls button { font: inherit; padding: 8px 16px; border: 0; border-radius: 6px;
  background: var(--accent); color: white; font-weight: 600; cursor: pointer; }
.controls button:hover { background: var(--accent-dark); }
.stats { color: var(--muted); font-size: 13px; margin-left: auto; }
.div-chip { display: inline-block; padding: 3px 9px; border-radius: 12px; font-size: 11px;
  font-weight: 600; font-variant-numeric: tabular-nums; }
.div-up { background: #ecfdf5; color: #047857; }
.div-up-big { background: #16a34a; color: white; }
.div-down { background: #fef2f2; color: #b91c1c; }
.div-down-big { background: #dc2626; color: white; }
.div-flat { background: #f3f4f6; color: #6b7280; }
.div-none { background: #f3f4f6; color: var(--muted); font-style: italic; }
.era-chip { display: inline-block; padding: 3px 9px; border-radius: 12px; font-size: 11px;
  font-weight: 600; font-variant-numeric: tabular-nums;
  background: #fef3c7; color: #92400e; margin-left: 4px; }
.callout { background: #eff6ff; border: 1px solid #93c5fd;
  border-left: 4px solid var(--accent); border-radius: 6px; padding: 14px 18px;
  color: #1e3a8a; margin: 16px 0; font-size: 14px; }
.callout strong { color: var(--accent-dark); }
.player-header { background: var(--header-bg); color: var(--header-text); padding: 28px 36px; border-bottom: 3px solid var(--accent); }
.player-header h1 { margin: 0; font-size: 28px; }
.player-header .sub { opacity: 0.75; font-size: 14px; margin-top: 4px; }
.player-header .metrics { display: flex; gap: 28px; margin-top: 18px; flex-wrap: wrap; }
.player-header .metric .num { font-size: 26px; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--accent); }
.player-header .metric .label { opacity: 0.75; font-size: 11px; text-transform: uppercase; letter-spacing: 0.05em; }
footer { color: var(--muted); font-size: 12px; padding: 32px 40px; text-align: center; border-top: 1px solid var(--border); margin-top: 40px; }
.tag { display: inline-block; padding: 2px 9px; border-radius: 10px;
  font-size: 11px; font-weight: 600; background: #eef2ff; color: #4338ca; }
.tag.tag-retired { background: #fef3c7; color: #92400e; }
.tag.tag-prospect { background: #fdf4ff; color: #86198f; }
.comp-tier-elite { color: #b45309; font-weight: 600; }
.comp-tier-above-avg { color: #047857; font-weight: 600; }
.comp-tier-starter { color: #1d4ed8; }
.style-badge { display: inline-block; padding: 2px 8px; border-radius: 10px;
  font-size: 11px; font-weight: 700; letter-spacing: 0.02em; margin-left: 4px;
  background: rgba(255,255,255,0.15); color: var(--header-text); }
.style-pocket { background: rgba(96, 165, 250, 0.25); }
.style-mobile { background: rgba(167, 139, 250, 0.30); }
.style-dual_threat { background: rgba(250, 204, 21, 0.35); color: #fde68a; }
.comp-tier-deep { color: var(--muted); }

/* v3.0 PR 6 — prospect page styling */
.prospect-status-row { display:flex; gap:10px; flex-wrap:wrap; margin: 4px 0 18px; }
.status-pill { display:inline-block; padding: 7px 14px; border-radius: 999px;
  font-size: 13px; font-weight: 600; line-height: 1.4; }
.status-pill-ok { background: #ecfdf5; color: #047857; border: 1px solid #6ee7b7; }
.status-pill-warn { background: #fffbeb; color: #92400e; border: 1px solid #fcd34d; }
.status-pill a { color: inherit; text-decoration: underline; }
.prospect-te-flag { display:inline-block; padding: 2px 9px; border-radius: 10px;
  font-size: 12px; font-weight: 700; background: #fef3c7; color: #92400e; margin-left: 6px; }
.prospect-te-mini { font-size: 12px; margin-left: 2px; }
.prospect-te-row td:first-child { box-shadow: inset 3px 0 0 #f59e0b; }
.callout-warn { background: #fffbeb; border-color: #fcd34d; border-left-color: #f59e0b; color: #92400e; }
.chip-row { display:inline-flex; gap:6px; align-items:center; flex-wrap:wrap; }
.chip { font: inherit; font-size: 12px; padding: 6px 12px; border-radius: 999px;
  background: white; border: 1px solid var(--border); color: var(--text);
  cursor: pointer; font-weight: 600; }
.chip:hover { background: var(--hover); }
.chip.active { background: var(--accent); color: white; border-color: var(--accent); }
.hit-chip { display:inline-block; padding: 3px 9px; border-radius: 10px;
  font-size: 11px; font-weight: 700; letter-spacing: 0.02em; text-transform: uppercase; }
.hit-elite { background: #ecfdf5; color: #047857; }
.hit-starter { background: #fef3c7; color: #92400e; }
.hit-bust { background: #fef2f2; color: #b91c1c; }
.hit-unknown { background: #f3f4f6; color: #6b7280; }
.comp-row.comp-hit-elite td:first-child { box-shadow: inset 3px 0 0 #10b981; }
.comp-row.comp-hit-starter td:first-child { box-shadow: inset 3px 0 0 #f59e0b; }
.comp-row.comp-hit-bust td:first-child { box-shadow: inset 3px 0 0 #dc2626; }
.comp-row.comp-hit-unknown td:first-child { box-shadow: inset 3px 0 0 #9ca3af; }

/* Player-name highlights affordance + the one clip card. */
.dfm-player { display: inline-flex; align-items: center; gap: 5px; }
.dfm-hl {
  border: 1px solid var(--border); background: var(--card); cursor: pointer;
  border-radius: 999px; padding: 0; width: 20px; height: 20px; line-height: 0;
  display: inline-flex; align-items: center; justify-content: center;
  flex: 0 0 auto; opacity: 0.55; transition: opacity .12s, border-color .12s;
}
.dfm-hl:hover, .dfm-hl:focus-visible { opacity: 1; border-color: var(--accent); }
.dfm-hl-i {
  display: block; width: 0; height: 0;
  border-left: 6px solid var(--accent);
  border-top: 4px solid transparent; border-bottom: 4px solid transparent;
  margin-left: 2px;
}
.player-header .dfm-hl { border-color: rgba(255,255,255,.35); background: transparent; }
.player-header .dfm-hl-i { border-left-color: var(--header-text); }

/* Modal. Fixed-position rather than an inline popover on purpose: chips sit
   inside table cells, list items and page headers, and a fixed sheet needs
   no layout maths in any of them. */
.dfm-hl-modal { position: fixed; inset: 0; z-index: 90; }
.dfm-hl-modal[hidden] { display: none; }
.dfm-hl-backdrop { position: absolute; inset: 0; background: rgba(15,23,42,.55); }
.dfm-hl-sheet {
  position: relative; max-width: 620px; margin: 6vh auto 0;
  max-height: 88vh; overflow: auto; background: var(--card);
  border-radius: 12px; border: 1px solid var(--border);
  box-shadow: 0 18px 48px rgba(15,23,42,.28);
}
.dfm-hl-sheet-head {
  display: flex; align-items: center; gap: 12px; padding: 16px 20px;
  border-bottom: 1px solid var(--border); position: sticky; top: 0;
  background: var(--card);
}
.dfm-hl-sheet-title { margin: 0; font-size: 15px; font-weight: 700; flex: 1; }
.dfm-hl-x {
  border: 0; background: transparent; font-size: 22px; line-height: 1;
  cursor: pointer; color: var(--muted); padding: 0 4px;
}
.dfm-hl-sheet-body { padding: 16px 20px 22px; }

.dfm-hl-inline { margin-top: 10px; }
.dfm-hl-loading { font-size: 13px; color: var(--muted); padding: 8px 0; }
.dfm-hl-empty {
  font-size: 13px; color: var(--muted); background: #f8fafc;
  border: 1px solid var(--border); border-radius: 8px; padding: 12px 14px;
}
.dfm-hl-empty code { font-size: 12px; }

.dfm-hl-playall {
  display: inline-block; background: var(--accent); color: #fff;
  font-size: 13px; font-weight: 600; padding: 8px 16px; border-radius: 999px;
  margin-bottom: 12px;
}
.dfm-hl-playall:hover { background: var(--accent-dark); text-decoration: none; }
.dfm-hl-playnote { font-size: 11px; color: var(--muted); margin: -6px 0 12px; }

.dfm-wk { margin-bottom: 14px; }
.dfm-wk-head {
  font-size: 13px; font-weight: 700; margin: 0 0 8px; cursor: default;
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
details.dfm-wk > summary.dfm-wk-head { cursor: pointer; }
.dfm-wk-tag {
  font-size: 10px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .04em; padding: 2px 8px; border-radius: 999px;
}
.dfm-wk-lead { background: #ecfdf5; color: #047857; }
.dfm-wk-live { background: #fffbeb; color: #92400e; }
.dfm-hl-count {
  font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums;
}
.dfm-hl-group { margin-bottom: 12px; }
.dfm-hl-group-head { font-size: 12px; font-weight: 700; color: var(--muted); }
.dfm-hl-group-note { font-size: 11px; color: var(--muted); margin-bottom: 6px; }
.dfm-hl-clips { display: flex; flex-direction: column; gap: 8px; }

/* The one clip card. */
.dfm-clip {
  display: flex; gap: 10px; align-items: center; text-align: left;
  background: var(--bg); border: 1px solid var(--border); color: inherit;
  border-radius: 8px; padding: 6px; text-decoration: none;
}
.dfm-clip:hover { border-color: var(--accent); text-decoration: none; }
.dfm-clip img {
  width: 76px; height: 43px; object-fit: cover; border-radius: 6px;
  background: #222; display: block;
}
.dfm-clip-body { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.dfm-clip-who { font-size: 12px; font-weight: 700; }
.dfm-clip-who em { font-style: normal; color: var(--muted); }
.dfm-clip-title {
  font-size: 12px; font-weight: 600; line-height: 1.35;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
}
.dfm-clip-meta { font-size: 11px; color: var(--muted); }
.dfm-trust { color: #047857; }
