/* player.css — the player profile layout, in the Broadsheet Violet system.
 *
 * Linked by players/{slug}.html immediately after that page's inline
 * <style> and after redesign.css, so the cascade is identical to when
 * these rules were the last thing inside it. Kept out of Python so the
 * stylesheet is the single owner: inlined, these rules were repeated in
 * all 265 generated pages and could not be cached between them.
 *
 * redesign.css owns the design tokens, the masthead and the footer. This
 * file owns only what the profile layout adds on top, extending the same
 * system the homepage uses: page = a stack of bordered panels with
 * small-caps header bars, tables take the header-row and rule treatment,
 * and any 0-10 or on-a-scale metric uses a flat track with a square fill.
 *
 * Class names are the generator's (scripts/player_pilot_layout.py). None
 * of them changed in the repaper — only what they look like.
 */

/* The page still carries the pre-redesign inline <style> with the old
   palette on :root. Re-point those variables here rather than editing 250
   rules: anything still reading --surface or --teal lands in the
   broadsheet palette by itself, and nothing is left on the old purple. */
body.bs {
  --bg: var(--paper);
  --bg-alt: var(--panel-head);
  --surface: var(--panel);
  --surface-hover: var(--note-bg);
  --surface2: var(--panel-head);
  --border: var(--ink);
  --text-muted: var(--muted);
  --text-faint: var(--muted);
  --text-dim: var(--muted);
  --accent-mid: var(--accent);
  --accent-light: var(--note-bg);
  --accent-text: #fff;
  --teal: var(--accent);
  --gold: var(--accent);
  --red: var(--ink);
  background: var(--paper);
}

/* ── Page column ──────────────────────────────────────────────────────── */
.pl-page {
  max-width: 880px;
  margin: 0 auto;
  padding: 22px 22px 48px;
  font-size: 16px;
  line-height: 1.45;
  color: var(--ink);
}
.pl-page p { margin: 0; }
.pl-page a { color: var(--accent); text-decoration: none; }
.pl-page a:hover { color: var(--accent-hover); text-decoration: underline; }

/* ── Type ─────────────────────────────────────────────────────────────── */
.pl-h1 {
  font-family: var(--display);
  font-weight: 700;
  font-size: 46px;
  line-height: 1.02;
  letter-spacing: -0.005em;
  text-transform: uppercase;
  margin: 0;
  color: var(--ink);
}
.pl-h2 {
  font-family: var(--display);
  font-weight: 700;
  font-size: 30px;
  line-height: 1;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  margin: 0;
}
.pl-h3 {
  font-family: var(--display);
  font-weight: 700;
  font-size: 13px;
  line-height: 1;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin: 0 0 8px;
}
.pl-muted {
  font-family: var(--display);
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}
.pl-strong { font-weight: 600; color: var(--ink); }
.pl-link {
  font-family: var(--display);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}
.pl-prose { font-size: 15px; color: var(--body); line-height: 1.55; text-wrap: pretty; }
.pl-prose + .pl-prose { margin-top: 10px; }
.pl-prose strong { color: var(--ink); font-weight: 600; }
.pl-prose-card { margin-top: 10px; }
.pl-checklist + .pl-prose { margin-top: 12px; }
.pl-bio { font-size: 16px; color: var(--body); margin-top: 8px; }

/* ── Hero ─────────────────────────────────────────────────────────────── */
.pl-hero {
  background: var(--panel);
  border: 1px solid var(--ink);
  padding: 20px 22px 22px;
}
.pl-hero-tiles { margin-top: 18px; }

/* ── Section heads — heading left, meta right, one rule under ─────────── */
.pl-section { margin-top: 32px; }
.pl-section-head {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--ink);
  padding-bottom: 10px;
  margin-bottom: 16px;
}
.pl-section-head .pl-muted { margin-left: auto; font-size: 12px; letter-spacing: 0.12em; }

/* ── Panels and tiles ─────────────────────────────────────────────────── */
.pl-card {
  background: var(--panel);
  border: 1px solid var(--ink);
  padding: 16px 18px;
}
/* A card that opens with a heading gets a real panel header bar: the
   heading bleeds to the card's edges and takes the tinted strip. */
.pl-card > .pl-h3:first-child {
  margin: -16px -18px 14px;
  padding: 9px 18px;
  background: var(--panel-head);
  border-bottom: 1px solid var(--ink);
}
.pl-tile {
  background: var(--panel);
  border: 1px solid var(--hairline);
  padding: 11px 14px;
}
.pl-tile .pl-v {
  font-family: var(--display);
  font-weight: 700;
  font-size: 26px;
  line-height: 1.1;
  color: var(--accent);
  margin-top: 2px;
}
.pl-grid { display: grid; gap: 12px; }
.pl-g-tiles   { grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); }
.pl-g-kit     { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
.pl-g-2       { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); margin-top: 12px; }
.pl-g-best    { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); margin-top: 12px; }
.pl-g-similar { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }

/* Kit cards: label, value, note, link — stacked with air between. */
.pl-g-kit .pl-card .pl-strong { display: block; margin: 4px 0 2px; font-size: 18px; }
.pl-g-kit .pl-card .pl-link { display: inline-block; margin-top: 8px; }

/* ── Buttons and chips ────────────────────────────────────────────────── */
.pl-btn {
  display: inline-block;
  padding: 12px 18px;
  border: 1px solid var(--ink);
  background: transparent;
  color: var(--ink);
  font-family: var(--display);
  font-weight: 700;
  font-size: 14px;
  line-height: 1;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background-color 150ms ease, color 150ms ease;
}
.pl-page a.pl-btn { color: var(--ink); }
.pl-btn:hover, .pl-page a.pl-btn:hover { background: var(--ink); color: var(--panel); text-decoration: none; }
.pl-btn-primary, .pl-page a.pl-btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.pl-btn-primary:hover, .pl-page a.pl-btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: #fff; }
.pl-btn-row { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 14px; }

.pl-chip {
  display: inline-block;
  font-family: var(--display);
  font-weight: 600;
  font-size: 13px;
  line-height: 1;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  padding: 7px 13px;
  border: 1px solid var(--chip-border);
  background: transparent;
  color: var(--ink);
  margin: 0 8px 8px 0;
}

/* ── Current-setup strip ──────────────────────────────────────────────── */
.pl-setup {
  margin-top: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  background: var(--panel-head);
}
.pl-setup .pl-strong {
  font-family: var(--display);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.pl-setup .pl-muted { margin-top: 3px; font-size: 12px; letter-spacing: 0.12em; }

.pl-gauge-card, .pl-specs-card { margin-top: 12px; }

/* ── Tables ───────────────────────────────────────────────────────────── */
.pl-table { width: 100%; border-collapse: collapse; font-size: 15px; }
.pl-table td, .pl-table th { padding: 10px 8px; text-align: left; font-weight: 400; }
.pl-table tr + tr td { border-top: 1px solid var(--rule); }
.pl-table th {
  background: var(--panel-head);
  border-bottom: 1px solid var(--ink);
  font-family: var(--display);
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #4c4a6b;
}
.pl-table .pl-r { text-align: right; }
.pl-table .pl-c { text-align: center; }
.pl-table b { font-weight: 600; }
/* The pro-stock table's "differs from retail" highlight. The palette has no
   warning colour, so the difference is carried by weight and a rule. */
.pl-diff { color: var(--accent); font-weight: 700; }
.pl-scroll { overflow-x: auto; }

/* Grand Slam grid: a win is filled, a final is outlined, anything else is
   plain. No greens — the system has one accent and does this with fill. */
.pl-res { display: block; padding: 3px 0; font-family: var(--display); font-weight: 700; letter-spacing: 0.04em; }
.pl-res-w { background: var(--accent); color: #fff; }
/* outline, not an inset shadow: redesign.css drops every shadow on the page. */
.pl-res-f { outline: 1px solid var(--accent); outline-offset: -1px; color: var(--accent); }
.pl-slam-card { margin-top: 12px; }
.pl-slam-cap { margin-bottom: 8px; }
.pl-slam-table { table-layout: fixed; min-width: 320px; }

.pl-best { border-left: 3px solid var(--accent); }
.pl-best-final { border-left-color: var(--chip-border); }

/* ── Tension gauge ────────────────────────────────────────────────────── */
.pl-gauge-head { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 8px; }
.pl-gauge-val { font-family: var(--display); font-weight: 700; font-size: 22px; color: var(--accent); }
.pl-gauge-val .pl-muted { color: var(--muted); }
.pl-gauge { position: relative; height: 28px; margin: 16px 0 6px; }
.pl-track { position: absolute; top: 10px; left: 0; right: 0; height: 7px; background: var(--track); }
.pl-fill  { position: absolute; top: 10px; left: 0; height: 7px; background: var(--accent); }
.pl-avg   { position: absolute; top: 4px; width: 1px; height: 20px; background: var(--ink); }
.pl-band  { position: absolute; top: 3px; height: 22px; border: 1px dashed var(--ink); }
.pl-scale {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-family: var(--display);
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.pl-gauge-key { margin-top: 10px; }
.pl-key { display: inline-block; width: 12px; height: 7px; vertical-align: middle; margin-right: 5px; }
.pl-key-fill { background: var(--accent); }
.pl-key-band { height: 12px; border: 1px dashed var(--ink); }

/* ── Timeline ─────────────────────────────────────────────────────────── */
.pl-tl-row { display: grid; grid-template-columns: 52px 9px 1fr; gap: 12px; padding-bottom: 14px; align-items: start; }
.pl-tl-row .pl-muted:first-child {
  font-family: var(--display);
  font-weight: 700;
  font-size: 17px;
  letter-spacing: 0;
  color: var(--accent);
}
.pl-tl-head { font-family: var(--display); font-weight: 700; font-size: 17px; letter-spacing: 0.02em; text-transform: uppercase; }
.pl-dot { width: 9px; height: 9px; margin-top: 5px; background: var(--chip-border); }
.pl-dot-now { background: var(--accent); }

/* ── Checklist ────────────────────────────────────────────────────────── */
.pl-checklist { list-style: none; padding: 0; margin: 0; font-size: 15px; line-height: 1.9; color: var(--body); }
.pl-checklist .pl-yes::before { content: "\2713"; color: var(--accent); font-weight: 700; margin-right: 10px; }
.pl-checklist .pl-no::before  { content: "\2715"; color: var(--muted); font-weight: 700; margin-right: 10px; }
.pl-checklist .pl-no { color: var(--muted); }
.pl-callout { border-left: 3px solid var(--accent); }

/* ── Season form ──────────────────────────────────────────────────────── */
.pl-form { display: flex; gap: 6px; flex-wrap: wrap; }
.pl-form span {
  width: 28px; height: 28px;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--display); font-size: 13px; font-weight: 700;
}
.pl-form .pl-w { background: var(--accent); color: #fff; }
.pl-form .pl-l { background: var(--track); color: var(--ink); }

.pl-chart-cap { margin-top: 14px; }
.pl-chart { color: var(--accent); display: block; }

/* ── Compare picker ───────────────────────────────────────────────────── */
.pl-cmp { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.pl-cmp-h { margin: 0; flex: 1; min-width: 160px; }
.pl-select {
  padding: 11px 12px;
  border: 1px solid var(--ink);
  background: var(--panel);
  color: var(--ink);
  font-family: var(--display);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  width: 190px;
  max-width: 100%;
}

/* ── Similar players ──────────────────────────────────────────────────── */
.pl-sp-cap { margin: 18px 0 10px; }
.pl-sp-name { font-family: var(--display); font-weight: 700; font-size: 17px; letter-spacing: 0.01em; text-transform: uppercase; color: var(--ink); }
.pl-sp:hover { text-decoration: none; background: var(--note-bg); }
.pl-sp:hover .pl-sp-name { color: var(--accent); }

.pl-sponsors { margin-top: 12px; }
.pl-sponsors-cap { margin-bottom: 10px; }
.pl-keep { margin-top: 32px; }
.pl-sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

/* ═══════════════════════════════════════════════════════════════════════
   Carried over from the shared layout — the FAQ and related-articles
   blocks still use .card / .faq-* / .article-*. Repapered here so the foot
   of the page matches the rest of it.
   ═══════════════════════════════════════════════════════════════════════ */
body.bs .pl-keep.card { background: var(--panel); border: 1px solid var(--ink); overflow: visible; }
body.bs .pl-keep .card-header {
  padding: 9px 18px;
  background: var(--panel-head);
  border-bottom: 1px solid var(--ink);
  gap: 0;
}
body.bs .pl-keep .card-header h2 {
  font-family: var(--display);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink);
}
/* The design deliberately uses no icon set. */
body.bs .pl-keep .card-header .icon { display: none; }
body.bs .pl-keep .card-body { padding: 0 18px; }

body.bs .faq-item { border-bottom: 1px solid var(--rule); }
body.bs .faq-item:last-child { border-bottom: none; }
body.bs .faq-q {
  padding: 16px 0;
  font-family: var(--display);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink);
}
body.bs .faq-q:hover { color: var(--accent); }
body.bs .faq-icon { color: var(--muted); }
body.bs .faq-item.open .faq-icon { color: var(--accent); }
body.bs .faq-a { font-size: 15px; line-height: 1.55; color: var(--body); padding-bottom: 16px; }

body.bs .pl-keep .card-body:has(.articles-list) { padding: 0; }
body.bs .articles-list { display: block; }
body.bs .article-item {
  gap: 3px;
  padding: 12px 18px;
  background: var(--panel);
  border: 0;
  border-bottom: 1px solid var(--rule);
  transition: background-color 120ms ease;
}
body.bs .article-item:last-child { border-bottom: none; }
body.bs .article-item:hover { background: var(--note-bg); text-decoration: none; }
body.bs .article-cat {
  font-family: var(--display);
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}
body.bs .article-title { font-family: var(--display); font-weight: 700; font-size: 17px; letter-spacing: 0.01em; text-transform: uppercase; color: var(--ink); }
/* The whole row is the link and its title already carries the arrow; a
   second one on its own line is clutter the broadsheet does not want. */
body.bs .article-arrow { display: none; }

/* ── Responsive ───────────────────────────────────────────────────────── */
@media (max-width: 640px) {
  .pl-page { padding: 16px 16px 40px; }
  .pl-h1 { font-size: 32px; }
  .pl-h2 { font-size: 24px; }
  .pl-hero { padding: 16px; }
  .pl-card { padding: 14px 16px; }
  .pl-card > .pl-h3:first-child { margin: -14px -16px 12px; padding: 9px 16px; }
  /* Four tiles across a phone leaves "Aggressive Baseline" on three lines. */
  .pl-g-tiles { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
  .pl-cmp-h { min-width: 100%; }
  .pl-select { flex: 1; min-width: 0; width: auto; }
  .pl-section-head { align-items: flex-start; }
  .pl-section-head .pl-muted { margin-left: 0; }
}
