/* Bench the Bot — shared design system.
   Visual direction from the two Claude Design mockups: dark navy field,
   yellow accent for active state, green/red reserved for point outcomes.
   Chart series palette is CVD-validated (dataviz skill, six checks) against
   the card surface #121e45 — do not eyeball-edit series colors. */

:root {
  --bg: #0b1533;
  --card: #121e45;
  --card-2: #16255a;
  --line: #26356b;
  --line-soft: #1d2c5c;

  --ink: #e9edf8;
  --ink-2: #a7b4d9;
  --muted: #6a7dae;

  --accent: #f2c530;
  --accent-ink: #1a1503;

  /* status text tokens (outcomes, deltas) — text only, never chart marks */
  --pos: #3fd68f;
  --neg: #ff7a72;

  /* validated categorical series (fixed order, never cycled):
     you → ai → top500k → top50k; user/fpl averages are recessive context */
  --s-you: #009878;
  --s-ai: #f0461e;
  --s-500k: #2f7fd6;
  --s-50k: #b98a16;
  --s-ctx-1: #6d7ea8;
  --s-ctx-2: #4e5f86;

  --mono: ui-monospace, "Cascadia Mono", "SF Mono", "JetBrains Mono", "Roboto Mono", Menlo, Consolas, monospace;
  --radius: 4px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 14px;
  line-height: 1.45;
}

a { color: var(--ink-2); }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 20px 64px; }

/* ---------- header ---------- */

.site-header {
  position: relative;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding: 26px 0 18px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 60px;
  flex-wrap: wrap;
  overflow: visible;
}

.wordmark { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; overflow: visible; }
.wordmark a { text-decoration: none; }
.wordmark .brand-link {
  display: flex;
  align-items: center;
}
/* The 120px icon is absolutely positioned against .site-header and breaks out
   of the bar; reserve its width on the HEADER (not just the wordmark) so that
   when the header wraps to two rows — it does at ~1200px once the GW indicator
   reads "GW7 · Season 2026/27" — the nav row starts clear of the icon instead
   of running underneath it. */
.site-header { padding-left: 128px; }
.wordmark .brand-icon {
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 120px;
  height: 120px;
  flex-shrink: 0;
  display: block;
}

.wordmark .brand {
  display: block;
  font-size: 21px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--ink);
}
.wordmark .sub {
  font-size: 11px;
  letter-spacing: 0.22em;
  color: var(--muted);
  text-transform: uppercase;
}

@media (max-width: 960px) {
  /* Below this width the header wraps to two rows (wordmark, then nav)
     with no vertical gap reserved between them — an overflowing icon
     here would sit on top of the wrapped nav links, so it drops back
     to a normal in-flow size instead of breaking out of the bar. */
  .site-header { padding-left: 0; }
  .wordmark .brand-link { gap: 8px; }
  .wordmark .brand-icon {
    position: static;
    transform: none;
    width: 40px;
    height: 40px;
  }
}

/* Both the nav and the nav+indicator row must be allowed to wrap: on a
   390px viewport the single-row layout is ~180px wider than the screen,
   and neither flex container had flex-wrap, so the whole row overflowed
   the page instead of stacking. min-width: 0 lets them actually shrink
   inside the (also wrapping) .site-header. */
.header-right {
  display: flex;
  align-items: baseline;
  gap: 8px 18px;
  flex-wrap: wrap;
  min-width: 0;
}
.gw-indicator {
  font-size: 12px;
  letter-spacing: 0.14em;
  color: var(--ink-2);
  text-transform: uppercase;
  white-space: nowrap;
}
.site-nav { display: flex; gap: 8px 14px; flex-wrap: wrap; min-width: 0; }
.site-nav a {
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
  padding: 3px 0;
  border-bottom: 2px solid transparent;
}
.site-nav a:hover { color: var(--ink-2); }
.site-nav a[aria-current="page"] { color: var(--accent); border-bottom-color: var(--accent); }

.account-link {
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
  padding: 3px 0;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
}
.account-link:hover { color: var(--ink-2); }
.account-link[aria-current="page"] { color: var(--accent); border-bottom-color: var(--accent); }

@media (max-width: 640px) {
  /* Phone widths: give the nav+indicator block the full row under the
     wordmark instead of competing with it for horizontal space. */
  .header-right { width: 100%; }
  .site-header { margin-bottom: 44px; }
}

/* ---------- cards & sections ---------- */

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
}

.section-label {
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 12px;
  font-weight: 600;
}

.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

/* ---------- toggle groups (segmented buttons) ---------- */

.toggle-group { display: inline-flex; gap: 6px; flex-wrap: wrap; }
.toggle-group button {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 6px 12px;
  background: transparent;
  color: var(--ink-2);
  border: 1px solid var(--line);
  border-radius: 3px;
  cursor: pointer;
}
.toggle-group button:hover { border-color: var(--muted); color: var(--ink); }
.toggle-group button[aria-pressed="true"] {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
  font-weight: 700;
}

.filter-row {
  display: flex;
  gap: 26px;
  flex-wrap: wrap;
  margin: 26px 0 14px;
}
.filter-group .filter-label {
  font-size: 10px;
  letter-spacing: 0.18em;
  color: var(--muted);
  text-transform: uppercase;
  margin-bottom: 6px;
}

/* ---------- scoreboard ---------- */

.scoreboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(260px, 1fr);
  gap: 16px;
  align-items: stretch;
}
@media (max-width: 860px) { .scoreboard-grid { grid-template-columns: 1fr; } }

.chart-host { position: relative; min-height: 280px; }
.chart-host svg { display: block; width: 100%; height: auto; }

/* ---------- world-first badge ----------
   A single top-of-league reference point, not a bar/line series — a real
   individual manager's cumulative total, deliberately styled as a standalone
   trophy-style callout (gold border, own line above the chart) rather than
   folded into the comparison chart's categorical marks. */
.world-first-badge {
  display: inline-flex;
  align-items: baseline;
  gap: 7px;
  margin-bottom: 12px;
  padding: 6px 12px;
  border: 1px solid var(--accent);
  border-radius: 999px;
  background: rgba(242, 197, 48, 0.08);
  font-size: 11.5px;
  color: var(--ink-2);
  width: fit-content;
}
.world-first-badge .wf-icon { font-size: 13px; line-height: 1; }
.world-first-badge .wf-label {
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 10px;
  color: var(--accent);
  font-weight: 700;
}
.world-first-badge .wf-value { color: var(--ink); font-weight: 700; font-variant-numeric: tabular-nums; }
.world-first-badge .wf-sub { color: var(--muted); }

.chart-tooltip {
  position: absolute;
  pointer-events: none;
  background: #0d1738;
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: 8px 10px;
  font-size: 11px;
  min-width: 130px;
  z-index: 20;
  display: none;
}
.chart-tooltip .tt-title {
  color: var(--muted);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 10px;
  margin-bottom: 5px;
}
.chart-tooltip .tt-row { display: flex; align-items: center; gap: 7px; padding: 1.5px 0; }
.chart-tooltip .tt-key { width: 12px; height: 0; border-top: 2px solid; flex: none; }
.chart-tooltip .tt-val { font-weight: 700; color: var(--ink); }
.chart-tooltip .tt-name { color: var(--ink-2); }

.chart-legend {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 12px;
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-2);
}
.chart-legend .lg { display: inline-flex; align-items: center; gap: 6px; }
.chart-legend .lg .key { width: 14px; border-top: 2px solid; height: 0; }
.chart-legend .lg .key.dashed { border-top-style: dashed; }

/* ---------- scatter / quadrant chart furniture ----------
   The scatter is one colour by design (see renderScatterChart), so this key
   distinguishes MEASURED from MODELLED marks by fill, not by hue. */

.chart-foot {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  margin: 12px 0 0;
  font-size: 10.5px;
  color: var(--muted);
}
.chart-foot .shape-key { display: inline-flex; align-items: center; gap: 7px; }
.chart-foot .shape-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  flex: none;
}
.chart-foot .shape-dot.hollow {
  background: var(--card);
  border: 1.8px dashed var(--accent);
}

.chart-table-twin { margin-top: 18px; }
.chart-table-twin > summary {
  cursor: pointer;
  font-size: 10.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-2);
  padding: 6px 0;
}
.chart-table-twin > summary:hover { color: var(--ink); }
.chart-table-twin[open] > summary { margin-bottom: 10px; }

.data-table { width: 100%; overflow-x: auto; }
.data-table table {
  border-collapse: collapse;
  width: 100%;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}
.data-table th, .data-table td {
  text-align: right;
  padding: 6px 10px;
  border-bottom: 1px solid var(--line-soft);
  white-space: nowrap;
}
.data-table th:first-child, .data-table td:first-child { text-align: left; }
.data-table th {
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 600;
}

/* summary card */
.summary-card { display: flex; flex-direction: column; gap: 12px; }
.summary-card h2 { font-size: 17px; margin: 0; line-height: 1.35; letter-spacing: 0.02em; }
.summary-card .pace { color: var(--ink-2); font-size: 12px; }
.summary-card .pace div { padding: 2px 0; }
.summary-card .foot {
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--line-soft);
  color: var(--muted);
  font-size: 11px;
}

/* accuracy strip */
.accuracy-strip {
  margin-top: 16px;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
  background: var(--card);
  display: flex;
  gap: 10px 28px;
  align-items: baseline;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--ink-2);
}
.accuracy-strip .label {
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 700;
}
.accuracy-strip .stat b { color: var(--ink); font-weight: 700; }

/* ---------- suggestion cards ---------- */

.suggestion-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 14px;
}
.player-card { display: flex; flex-direction: column; gap: 8px; min-height: 168px; }
.player-card .pc-top { display: flex; justify-content: space-between; align-items: baseline; }
.player-card .pc-pos { font-size: 10px; letter-spacing: 0.2em; color: var(--muted); }
.player-card .pc-xpts { font-weight: 700; color: var(--pos); font-size: 15px; }
.player-card .pc-name { font-size: 16px; font-weight: 700; }
.player-card .pc-meta { font-size: 11px; color: var(--muted); }
.player-card .pc-tag {
  align-self: flex-start;
  font-size: 9px;
  letter-spacing: 0.16em;
  padding: 3px 7px;
  border: 1px solid var(--accent);
  color: var(--accent);
  border-radius: 2px;
  text-transform: uppercase;
}
.player-card .pc-reason { font-size: 11.5px; color: var(--ink-2); }
.player-card .pc-minutes { font-size: 10.5px; color: var(--muted); }
.player-card .pc-fixtures { display: flex; gap: 6px; flex-wrap: wrap; font-size: 10px; }
.fixture-chip {
  border: 1px solid var(--line);
  border-radius: 2px;
  padding: 2px 6px;
  color: var(--ink-2);
  white-space: nowrap;
}
.fixture-chip .d2 { color: var(--pos); font-weight: 700; }
.fixture-chip .d3 { color: var(--muted); font-weight: 700; }
.fixture-chip .d4 { color: var(--neg); font-weight: 700; }

/* ---------- player-card carousel (swipeable top-3-per-position) ---------- */

.player-card-carousel {
  position: relative;
  padding-bottom: 32px; /* room for the dot indicator below the content */
}
.pcc-viewport { overflow: hidden; }
.pcc-track {
  display: flex;
  align-items: stretch;
  transition: transform 220ms ease;
  touch-action: pan-y; /* let vertical page scroll through; we handle horizontal */
}
.pcc-slide { flex: 0 0 auto; box-sizing: border-box; padding-right: 2px; }
.pcc-nav {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}
.pcc-arrow {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink-2);
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}
.pcc-arrow:hover { border-color: var(--accent); color: var(--accent); }
.pcc-dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.pcc-dot {
  width: 6px;
  height: 6px;
  padding: 0;
  border-radius: 50%;
  border: none;
  background: var(--line);
  cursor: pointer;
}
.pcc-dot.is-active { background: var(--accent); }

/* ---------- fixtures view (Scouting page-level toggle) ---------- */

.fx-cell { white-space: nowrap; }
.fx-cell .fx-opp { font-weight: 700; font-size: 10px; }
.fx-cell .fx-xpts { font-variant-numeric: tabular-nums; margin-top: 2px; }

/* Difficulty indicator: a colored pill around the opponent label itself
   (large color surface area, easy to scan) rather than a small dot next to
   it. Background is set inline per-cell (continuous difficulty gradient,
   see scouting.js); text color is also computed inline per-cell for
   contrast against that background. */
.fx-pill {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 10px;
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.fx-blank, .fx-wait { color: var(--muted); }
.fx-locked {
  color: var(--muted);
  filter: blur(2px);
  opacity: 0.55;
  user-select: none;
}
.fx-pro-head { color: var(--accent); white-space: nowrap; }
.fx-total { font-weight: 700; font-variant-numeric: tabular-nums; }

/* Team FDR (Scouting page, team-level view) — a compact strip of
   per-fixture pills reusing the exact fx-pill difficulty treatment, one
   size down since five sit in a row per team. Centered under its own
   "Next N (GWx–y)" header rather than following the table's default
   right/left alignment, since it's a group of marks, not a single value. */
/* .data-table th/td (element+class) outrank a class-only selector, so these
   need the element prefixed to actually win over the default right-align. */
.data-table th.fr-fixtures-head, .data-table td.fr-fixtures-cell { text-align: center; }
.fr-strip { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px; }
.fr-mini { font-size: 9px; padding: 2px 6px; }

.fx-bar {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 14px;
  margin-bottom: 8px;
}
.fx-legend {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 9px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.fx-legend .fx-swatch {
  display: inline-block;
  width: 18px;
  height: 10px;
  border-radius: 3px;
}

/* Evidence label next to a player's name in the Scouting table (see
   playerCell() in scouting.js). Deliberately muted, outline-only: it's a
   caveat on the number in the same row, not a status to be scanned for or
   confused with the difficulty pills, which own the color in this table. */
.ev-tag {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
  cursor: help;
  vertical-align: 1px;
}

/* small hover/focus tooltip — explanatory text out of the visual flow */
.info-tip {
  position: relative;
  cursor: help;
  color: var(--muted);
  font-size: 12px;
}
.info-tip:hover, .info-tip:focus { color: var(--ink-2); outline: none; }
.info-tip::after {
  content: attr(data-tip);
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  z-index: 10;
  width: 240px;
  padding: 8px 10px;
  background: var(--card-2);
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--ink-2);
  font-size: 10.5px;
  letter-spacing: normal;
  text-transform: none;
  white-space: normal;
  display: none;
}
.info-tip:hover::after, .info-tip:focus::after { display: block; }

/* ---------- personalize CTA ---------- */

.cta-card {
  margin-top: 22px;
  border-style: dashed;
  display: flex;
  gap: 18px;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}
.cta-card h3 { margin: 0 0 4px; font-size: 14px; letter-spacing: 0.06em; }
.cta-card p { margin: 0; color: var(--muted); font-size: 12px; }
.cta-form { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.cta-form input {
  font-family: var(--mono);
  font-size: 13px;
  background: #0d1738;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: 9px 12px;
  width: 170px;
}
.cta-form input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.btn-accent {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  font-weight: 700;
  text-transform: uppercase;
  background: var(--accent);
  color: var(--accent-ink);
  border: none;
  border-radius: 3px;
  padding: 10px 16px;
  cursor: pointer;
}
.btn-accent:hover { filter: brightness(1.08); }
.btn-accent:disabled { opacity: 0.55; cursor: default; }
.cta-error { color: var(--neg); font-size: 12px; width: 100%; }
.cta-success h3 { color: var(--accent); }
.cta-success p { color: var(--accent); }
.cta-consent {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11.5px;
  color: var(--muted);
  width: 100%;
  cursor: pointer;
}
.cta-consent input { width: auto; margin: 0; flex-shrink: 0; }

/* ---------- dugout ---------- */

.dugout-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr);
  gap: 16px;
  align-items: start;
}
@media (max-width: 900px) { .dugout-grid { grid-template-columns: 1fr; } }

/* formation pitch view — abstract navy pitch in the site's own palette
   (mowing stripes + markings make it read as a pitch without going green);
   shirts are uniform brand navy/yellow, club identified by text code only */
.pitch-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 12px 10px;
  margin-bottom: 16px;
}
.pitch-card .sb-head {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 0 2px 10px;
}
.pitch-formation { color: var(--accent); font-weight: 700; letter-spacing: 0.14em; }

.pitch {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 520px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 22px 4px 18px;
  background:
    repeating-linear-gradient(180deg,
      rgba(233, 237, 248, 0.025) 0, rgba(233, 237, 248, 0.025) 44px,
      rgba(0, 0, 0, 0.10) 44px, rgba(0, 0, 0, 0.10) 88px),
    var(--card-2);
  overflow: hidden;
}
.pitch-markings { position: absolute; inset: 0; pointer-events: none; opacity: 0.55; }
.pitch-markings > div { position: absolute; border: 1px solid var(--line); }
.pm-box  { bottom: -1px; left: 22%; right: 22%; height: 14%; border-bottom: 0; border-radius: 6px 6px 0 0; }
.pm-six  { bottom: -1px; left: 36%; right: 36%; height: 6%; border-bottom: 0; border-radius: 4px 4px 0 0; }
.pm-circle {
  top: -9%; left: 50%; width: 24%; aspect-ratio: 1;
  transform: translateX(-50%);
  border-radius: 50%;
}
.pm-half { top: 0; left: 0; right: 0; height: 0; border-width: 1px 0 0; }

.pitch-row {
  position: relative;
  display: flex;
  justify-content: space-evenly;
  align-items: flex-start;
}

.pp { display: flex; flex-direction: column; align-items: center; width: 72px; min-width: 0; }
.pp-shirt { position: relative; width: 46px; height: 42px; }
.pp-shirt .shirt-svg { width: 100%; height: 100%; display: block; }
.shirt-body { fill: #1c2c66; stroke: var(--line); stroke-width: 1; }
.shirt-sleeve { fill: var(--accent); }
.shirt-collar { fill: var(--accent); }
.shirt-code {
  fill: var(--accent);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-anchor: middle;
  font-family: inherit;
}
.pp-cap {
  position: absolute;
  top: -5px;
  right: -3px;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 9px;
  font-weight: 800;
  line-height: 15px;
  text-align: center;
  box-shadow: 0 0 0 2px var(--card-2);
}
.pp-name {
  margin-top: 4px;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 11px;
  font-weight: 700;
  background: rgba(11, 21, 51, 0.72);
  border-radius: 3px;
  padding: 1px 5px;
}
.pp-meta {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 9.5px;
  color: var(--ink-2);
  margin-top: 1px;
}

.pitch-bench {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 10px;
  padding: 8px 6px 4px;
  border-top: 1px dashed var(--line);
}
.pb-label {
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  padding-top: 12px;
  flex-shrink: 0;
}
.pb-row { display: flex; justify-content: space-evenly; flex: 1; min-width: 0; }
.pp-bench { opacity: 0.72; width: 64px; }
.pp-bench .pp-shirt { width: 38px; height: 35px; }
.pp-bench .pp-name { background: none; padding: 1px 0; }

@media (min-width: 700px) {
  .pp { width: 104px; }
  .pp-bench { width: 84px; }
}
@media (max-width: 420px) {
  .pp { width: 66px; }
  .pp-shirt { width: 40px; height: 37px; }
  .pp-name { font-size: 10px; padding: 1px 3px; }
  .pp-meta { font-size: 9px; letter-spacing: -0.01em; }
  .pp-bench { width: 60px; }
}

.squad-block { margin-bottom: 14px; }
.squad-block .sb-head {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 0 4px 8px;
}
.squad-row {
  display: grid;
  grid-template-columns: 4px minmax(0, 1fr) auto auto;
  gap: 12px;
  align-items: center;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px 14px 10px 0;
  margin-bottom: 6px;
}
.squad-row .pos-bar { align-self: stretch; border-radius: 4px 0 0 4px; }
.pos-bar.GK, .pos-bar.DEF { background: var(--s-500k); }
.pos-bar.MID { background: var(--accent); }
.pos-bar.FWD { background: var(--s-ai); }
.squad-row .sp-name { font-weight: 700; font-size: 13.5px; }
.squad-row .sp-name .cap {
  color: var(--accent-ink);
  background: var(--accent);
  border-radius: 2px;
  font-size: 9px;
  padding: 1px 4px;
  margin-left: 6px;
  letter-spacing: 0.08em;
  font-weight: 700;
}
.squad-row .sp-name .bench-chip {
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 2px;
  font-size: 9px;
  padding: 1px 4px;
  margin-left: 6px;
  letter-spacing: 0.1em;
}
.squad-row .sp-meta { font-size: 10.5px; color: var(--muted); margin-top: 2px; }
.squad-row .sp-stats { font-size: 10.5px; color: var(--muted); text-align: right; }
.squad-row .sp-points { text-align: center; min-width: 64px; }
.squad-row .sp-points .val { font-size: 17px; font-weight: 700; }
.squad-row .sp-points .lbl { font-size: 9px; letter-spacing: 0.12em; color: var(--muted); text-transform: uppercase; }
.squad-row .sp-proj { display: flex; gap: 10px; }
.squad-row .sp-proj .col { text-align: center; min-width: 34px; }
.squad-row .sp-proj .col .val { font-size: 13px; font-weight: 700; color: var(--ink-2); }
.squad-row .sp-proj .col .lbl { font-size: 9px; letter-spacing: 0.1em; color: var(--muted); text-transform: uppercase; }

/* sidebar cards */
.side-card { margin-bottom: 16px; }
.side-card.next-up { border-color: var(--accent); }
.next-up .swap { font-size: 14px; font-weight: 700; display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.next-up .swap .out { color: var(--muted); text-decoration: line-through; }
.next-up .swap .gain { color: var(--pos); margin-left: auto; }
.next-up .why { color: var(--ink-2); font-size: 12px; margin-top: 8px; }

.chip-card {
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  padding: 12px 14px;
  margin-top: 12px;
  font-size: 12px;
  color: var(--ink-2);
}
.chip-card .chip-head {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin-bottom: 6px;
}
.chip-card .chip-head .k { color: var(--muted); }
.chip-card .chip-head .v { color: var(--accent); font-weight: 700; }

.gw-history { max-height: 560px; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; }
.gw-item {
  border: 1px solid var(--line);
  border-left: 3px solid var(--muted);
  border-radius: var(--radius);
  background: var(--card);
  padding: 10px 12px;
  font-size: 11.5px;
}
.gw-item.positive { border-left-color: var(--pos); }
.gw-item.negative { border-left-color: var(--neg); }
.gw-item .gi-head { display: flex; justify-content: space-between; margin-bottom: 5px; }
.gw-item .gi-gw { font-size: 10px; letter-spacing: 0.16em; color: var(--muted); }
.gw-item .gi-delta { font-weight: 700; }
.gw-item .gi-delta.pos { color: var(--pos); }
.gw-item .gi-delta.neg { color: var(--neg); }
.gw-item .gi-line { color: var(--ink-2); padding: 1px 0; }
.gw-item .gi-line b { color: var(--ink); font-weight: 700; }
.gw-item .gi-why {
  margin-top: 6px;
  padding: 6px 8px;
  background: #0d1738;
  border-radius: 3px;
  color: var(--muted);
  font-size: 10.5px;
}

/* ---------- compare (Pro tier — head-to-head player comparison) ---------- */

.compare-pickers { display: flex; align-items: flex-start; gap: 16px; margin-bottom: 22px; }
.compare-vs {
  align-self: center;
  flex: none;
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--card-2);
  color: var(--accent);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-indent: 0.14em; /* optically recentre the letter-spaced "VS" */
}
.compare-picker { position: relative; flex: 1; min-width: 0; }
.compare-search-input {
  width: 100%;
  font-family: var(--mono);
  font-size: 13px;
  background: #0d1738;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: 9px 12px;
}
.compare-search-input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.compare-search-results {
  position: absolute;
  z-index: 15;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: var(--card-2);
  border: 1px solid var(--line);
  border-radius: 4px;
  max-height: 260px;
  overflow-y: auto;
  display: none;
}
.compare-search-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
  width: 100%;
  text-align: left;
  padding: 8px 12px;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--line-soft);
  color: var(--ink);
  font-family: var(--mono);
  cursor: pointer;
}
.compare-search-item:last-child { border-bottom: none; }
.compare-search-item:hover, .compare-search-item:focus { background: var(--card); outline: none; }
.csi-name { font-size: 12.5px; font-weight: 700; }
.csi-meta { font-size: 10.5px; color: var(--muted); }
.compare-chosen { margin-bottom: 6px; min-height: 0; }
.compare-chosen-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border: 1px solid var(--accent);
  border-radius: 999px;
  background: rgba(242, 197, 48, 0.08);
  font-size: 12px;
  color: var(--ink);
}
.compare-chosen-clear {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  padding: 0;
}
.compare-chosen-clear:hover { color: var(--neg); }
.compare-result { margin-top: 8px; }
.compare-header-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 12px;
  margin-bottom: 14px;
}
.compare-player-head {
  position: relative;
  text-align: center;
  padding: 10px 8px 12px;
  background: var(--card-2);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
}
/* short accent underline centred beneath each contender's name */
.compare-player-head::after {
  content: "";
  position: absolute;
  left: 30%;
  right: 30%;
  bottom: 0;
  height: 2px;
  background: var(--accent);
  opacity: 0.85;
}
.compare-player-head .cph-name { font-size: 16px; font-weight: 700; }
.compare-player-head .cph-meta { font-size: 11px; color: var(--muted); margin-top: 2px; }
.data-table table.compare-table th, .data-table table.compare-table td { text-align: center; }
.data-table table.compare-table th:first-child, .data-table table.compare-table td:first-child { text-align: left; }
.data-table table.compare-table th[scope="row"] { color: var(--ink-2); font-weight: 600; text-transform: none; letter-spacing: normal; font-size: 12px; }
/* winner cells: green text plus a whisper of green surface, so the eye can
   scan the winning column without reading every number */
.cmp-win { color: var(--pos); font-weight: 700; background: rgba(63, 214, 143, 0.07); }
.cmp-lose { color: var(--ink-2); }
.compare-table tbody tr:hover td { background: rgba(233, 237, 248, 0.04); }
.compare-table tbody tr:hover td.cmp-win { background: rgba(63, 214, 143, 0.12); }

@media (max-width: 640px) {
  .compare-pickers { flex-direction: column; }
  .compare-vs { align-self: center; }

  /* Pin the identity column (player/team name) while the rest of a wide
     table scrolls horizontally underneath it — otherwise a phone-width
     scroll loses track of which row is which. */
  .pin-col th:first-child, .pin-col td:first-child {
    position: sticky;
    left: 0;
    z-index: 2;
    background: var(--card);
    border-right: 1px solid var(--line-soft);
  }
}

/* ---------- projections polish (Pro tier) ----------
   Additive character on the projection tables: row hover, an accent marker
   on the current sort's leader row, and a hairline data-bar under the
   headline metric (same bar language as the Analytics hub thumbnails).
   All of it decorates the number — never replaces it. */

#projections-table .data-table tbody tr:hover td { background: rgba(233, 237, 248, 0.04); }
#projections-table .data-table tbody tr:first-child td:first-child {
  box-shadow: inset 3px 0 0 var(--accent);
}
#projections-table .data-table tbody tr:first-child td { color: var(--ink); }
/* the Team Shape table twin is alphabetical context, not a ranking — no leader row */
#projections-table .chart-table-twin .data-table tbody tr:first-child td:first-child { box-shadow: none; }
#projections-table .chart-table-twin .data-table tbody tr:first-child td { color: inherit; }

/* Team Trends tab — selector, hot/cold stretch chips, banded chart */
.trend-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.trend-picker { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.trend-vs { font-size: 10px; letter-spacing: 0.16em; color: var(--muted); text-transform: uppercase; }
.trend-select {
  font-family: var(--mono);
  font-size: 13px;
  background: #0d1738;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: 8px 10px;
  cursor: pointer;
}
.trend-select:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.trend-chips { display: flex; gap: 10px; flex-wrap: wrap; }
.trend-chip {
  display: inline-flex;
  align-items: baseline;
  gap: 7px;
  padding: 5px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 11px;
  color: var(--ink-2);
  background: var(--card-2);
}
.trend-chip b { color: var(--ink); font-variant-numeric: tabular-nums; }
.trend-chip .tc-key { width: 9px; height: 9px; border-radius: 50%; align-self: center; flex: none; }
.trend-chip .tc-label { font-size: 9px; letter-spacing: 0.14em; text-transform: uppercase; font-weight: 700; }
.trend-chip .tc-avg { color: var(--muted); font-variant-numeric: tabular-nums; }
.trend-chip.hot { border-color: rgba(242, 197, 48, 0.55); }
.trend-chip.hot .tc-key { background: var(--accent); }
.trend-chip.hot .tc-label { color: var(--accent); }
.trend-chip.cold { border-color: rgba(47, 127, 214, 0.65); }
.trend-chip.cold .tc-key { background: var(--s-500k); }
.trend-chip.cold .tc-label { color: #7db0e8; }
.trend-chart-host { min-height: 240px; }
.trend-td-hot { color: var(--accent); font-weight: 700; }
.trend-td-cold { color: #7db0e8; font-weight: 700; }

/* Zebra striping, player tables only (Attacking/Defensive — Team Shape's
   table twin is a chart companion, not a scannable per-player list, so it
   carries the class and the striping deliberately does not apply there).
   Reuses --card-2, the palette's existing raised-surface blue, against the
   card's own --card: enough separation to track a row across ten columns,
   not enough to compete with the numbers sitting on it. */
.pj-player-table tbody tr:nth-child(even) td { background: var(--card-2); }

/* Cap the name column so the browser's auto table-layout doesn't hand it
   room the metric columns need more — long names/evidence pills truncate
   with an ellipsis; the full name is still available via the td's title. */
.pj-player-table th:first-child, .pj-player-table td:first-child {
  max-width: 130px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pj-barcell .pj-barval { font-weight: 700; }
.pj-bar {
  display: block;
  height: 3px;
  border-radius: 2px;
  margin: 3px 0 0 auto; /* right-aligned, matching the numeric column */
  min-width: 2px;
}

/* ---------- analytics hub (public discovery layer — see analytics.js) ----------
   Cards get more visual latitude than data surfaces: hover lift, an accent
   hairline, a tinted preview well. The PREVIEWS inside still obey the site's
   chart language (validated series tokens, dashed modelled marks) so the
   thumbnail honestly resembles the feature it advertises. */

/* ---------- landing page (root "/") ----------
   Reuses the Analytics hub's .hub-card wholesale — one card treatment across
   the site. Only the grid differs: two-up and taller, since there are four
   destinations rather than five tools. */

.landing-hero {
  padding: 8px 0 34px;
  max-width: 720px;
}
.landing-hero-title {
  font-size: 30px;
  line-height: 1.24;
  font-weight: 700;
  letter-spacing: 0.01em;
  margin: 0 0 16px;
  color: var(--ink);
}
.landing-hero-sub {
  font-size: 13.5px;
  line-height: 1.65;
  color: var(--ink-2);
  margin: 0 0 14px;
}
.landing-hero-kicker {
  display: inline-block;
  margin: 0;
  padding-left: 13px;
  border-left: 3px solid var(--accent);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--accent);
}
/* Fixed 2x2 rather than auto-fit: four destinations want four large, equal
   cards, and .hub-grid's auto-fit resolves to 3-up + one orphan at this
   container width. Compound selector because .hub-grid is declared later in
   this file and would otherwise win on source order at equal specificity. */
.hub-grid.landing-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.landing-grid .hub-card-body { padding: 16px 18px 18px; }
.landing-grid .hub-card-title { font-size: 16px; }
.landing-grid .hub-card-desc { font-size: 12.5px; }

@media (max-width: 720px) { .hub-grid.landing-grid { grid-template-columns: 1fr; } }
@media (max-width: 600px) {
  .landing-hero { padding-bottom: 26px; }
  .landing-hero-title { font-size: 23px; }
}

.hub-intro { margin-bottom: 30px; max-width: 760px; }
.hub-tagline {
  font-size: 24px;
  font-weight: 700;
  margin: 0 0 10px;
  letter-spacing: 0.01em;
  line-height: 1.3;
  color: var(--ink);
}
.hub-sub { color: var(--ink-2); font-size: 13px; margin: 0; line-height: 1.6; }

.hub-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 18px;
}

.hub-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
  text-decoration: none;
  color: var(--ink);
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}
/* accent hairline across the top — lights up on hover/focus */
.hub-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), rgba(242, 197, 48, 0));
  opacity: 0;
  transition: opacity 0.18s ease;
  z-index: 1;
}
a.hub-card:hover, a.hub-card:focus-visible {
  transform: translateY(-3px);
  border-color: var(--accent);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.35);
  outline: none;
}
a.hub-card:hover::before, a.hub-card:focus-visible::before { opacity: 1; }

.hub-card-preview {
  background:
    radial-gradient(120% 90% at 18% 0%, rgba(242, 197, 48, 0.05), transparent 55%),
    linear-gradient(180deg, var(--card-2), var(--card));
  border-bottom: 1px solid var(--line-soft);
  padding: 10px 8px 4px;
  transition: filter 0.18s ease;
}
a.hub-card:hover .hub-card-preview { filter: brightness(1.08); }
.hub-thumb { display: block; width: 100%; height: auto; }

.hub-card-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
  padding: 14px 16px 16px;
}
.hub-card-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.04em;
}
a.hub-card:hover .hub-card-title > span:first-child,
a.hub-card:focus-visible .hub-card-title > span:first-child { color: var(--accent); }
.hub-tag {
  flex: none;
  font-size: 9px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 2px;
  padding: 2px 6px;
}
.hub-tag-soon { color: var(--muted); border-color: var(--line); border-style: dashed; }
.hub-card-desc { margin: 0; flex: 1; color: var(--ink-2); font-size: 12px; line-height: 1.55; }
.hub-card-go {
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  transition: color 0.18s ease;
}
a.hub-card:hover .hub-card-go, a.hub-card:focus-visible .hub-card-go { color: var(--accent); }
/* Coming-soon card: present but visibly not-yet — dimmed preview, dashed frame */
.hub-card-soon { border-style: dashed; }
.hub-card-soon .hub-card-preview { opacity: 0.55; filter: saturate(0.55); }
.hub-cta { margin-top: 26px; }

@media (prefers-reduced-motion: reduce) {
  .hub-card, .hub-card::before, .hub-card-preview, .hub-card-go { transition: none; }
  a.hub-card:hover, a.hub-card:focus-visible { transform: none; }
}

/* ---------- states ---------- */

.state-panel {
  padding: 38px 24px;
  text-align: center;
  color: var(--ink-2);
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  background: var(--card);
}
.state-panel h3 { color: var(--ink); margin: 0 0 8px; font-size: 15px; letter-spacing: 0.04em; }
.state-panel p { margin: 4px 0; font-size: 12.5px; }
.state-panel.error { border-color: var(--neg); }
.state-panel.pro-tease {
  margin-top: 20px;
  padding: 18px 20px;
  text-align: left;
}
.state-panel.pro-tease h3 { font-size: 12.5px; letter-spacing: 0.06em; }
.state-panel.pro-tease .cta-form { justify-content: flex-start; }
.state-panel .spin { color: var(--accent); letter-spacing: 0.2em; font-size: 11px; text-transform: uppercase; }

.loading-dim { opacity: 0.45; transition: opacity 0.15s; }

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  clip: rect(0 0 0 0);
  overflow: hidden;
  white-space: nowrap;
}

footer.site-foot {
  margin-top: 40px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 11px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.site-foot .legal-links a { color: var(--muted); }
.site-foot .legal-links a:hover { color: var(--ink-2); }

/* ---------- legal pages (Terms / Privacy / Refunds / Contact) ---------- */

.legal-page .card { max-width: 720px; }
.legal-page h2 {
  font-size: 14px;
  letter-spacing: 0.04em;
  color: var(--ink);
  margin: 28px 0 8px;
}
.legal-page h2:first-of-type { margin-top: 4px; }
.legal-page p { margin: 0 0 12px; font-size: 13px; line-height: 1.6; color: var(--ink-2); }
.legal-page ul { margin: 0 0 12px; padding-left: 20px; }
.legal-page li { font-size: 13px; line-height: 1.6; color: var(--ink-2); margin-bottom: 6px; }
.legal-page a { color: var(--accent); }
.legal-page .legal-updated {
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.legal-page .legal-disclaimer {
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  font-size: 11px;
  color: var(--muted);
}

/* ---------- track record ---------- */

.track-record { display: flex; flex-direction: column; gap: 18px; }
.tr-lede { color: var(--ink-2); font-size: 13.5px; line-height: 1.55; max-width: 72ch; margin: 0; }
.tr-card { display: flex; flex-direction: column; gap: 10px; }
.tr-card .section-label { margin: 0; }
.tr-sub {
  margin: 14px 0 0;
  font-size: 13px;
  letter-spacing: 0.06em;
  color: var(--ink);
}
.tr-note { margin: 0; font-size: 12.5px; line-height: 1.55; color: var(--ink-2); max-width: 78ch; }
.tr-note.muted, .tr-correction .muted { color: var(--muted); font-size: 11.5px; }
.tr-list { margin: 0; padding-left: 18px; font-size: 12.5px; line-height: 1.6; color: var(--ink-2); max-width: 78ch; }
.tr-correction {
  margin-top: 8px;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--neg);
  border-radius: var(--radius);
  background: var(--card-2);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.tr-correction h3 { margin: 0; font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--neg); }
.tr-correction p { margin: 0; font-size: 12.5px; line-height: 1.55; color: var(--ink-2); max-width: 78ch; }
.track-record .data-table th, .track-record .data-table td { white-space: normal; }
.tr-ledger .data-table th:nth-child(2), .tr-ledger .data-table td:nth-child(2) { text-align: left; }
@media (max-width: 560px) {
  .track-record .data-table th, .track-record .data-table td { padding: 6px 6px; }
}

/* dugout "Why this move?" */
.why-move { margin-top: 10px; border-top: 1px solid var(--line-soft); padding-top: 8px; font-size: 12px; color: var(--ink-2); }
.why-move > summary { cursor: pointer; font-size: 10.5px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent); }
.why-move ul { margin: 8px 0 6px; padding-left: 16px; line-height: 1.5; }
.why-move li { margin: 3px 0; }
.why-move-link { font-size: 11px; color: var(--ink-2); }

/* ---------- scatter explorer ---------- */
.ex-presets { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: 18px 0 0; }
.ex-preset {
  font-family: var(--mono); font-size: 11px; color: var(--ink-2); background: transparent;
  border: 1px solid var(--line); border-radius: 999px; padding: 5px 11px; cursor: pointer;
}
.ex-preset:hover, .ex-preset:focus-visible { color: var(--ink); border-color: var(--accent); }
.ex-controls { gap: 16px 22px; margin-top: 14px; }
.ex-swap button {
  font-family: var(--mono); font-size: 15px; color: var(--ink-2); background: transparent;
  border: 1px solid var(--line); border-radius: 3px; padding: 6px 10px; cursor: pointer;
}
.ex-swap button:hover { color: var(--accent); border-color: var(--accent); }
#explorer-chart { min-height: 380px; }

/* lineup pitch: vice badge, planned-signing tag, footer, and the "Your Team" lookup */
.pp-vice { background: transparent; color: var(--accent); box-shadow: 0 0 0 1.5px var(--accent), 0 0 0 3.5px var(--card-2); }
.pp-new {
  position: absolute;
  bottom: -4px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--pos);
  color: #062414;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.08em;
  line-height: 1;
  padding: 2px 4px;
  border-radius: 3px;
}
.pp-is-new .pp-name { box-shadow: inset 0 -2px 0 var(--pos); }
.pitch-foot {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 4px 12px;
  margin-top: 8px;
  padding: 0 2px;
  font-size: 10px;
  letter-spacing: 0.04em;
  color: var(--muted);
}
.team-id-form { margin-bottom: 16px; }
.team-id-row { display: flex; gap: 8px; flex-wrap: wrap; margin: 6px 0 4px; }
.team-id-input {
  flex: 1 1 200px;
  font-family: var(--mono);
  font-size: 14px;
  background: #0d1738;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: 9px 10px;
}
.team-id-input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.team-summary { margin-bottom: 16px; }
.ts-head { font-size: 10px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.ts-edge { font-size: 15px; }
.ts-edge .pos { color: var(--pos); }
.ts-list { margin: 8px 0 4px 18px; padding: 0; font-size: 13px; color: var(--ink-2); }
@media (max-width: 420px) { .pitch { min-height: 420px; } }

/* Fixture Forecast page */
.odds-leaders { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }
@media (max-width: 700px) { .odds-leaders { grid-template-columns: 1fr; } }
.odds-leader-list { list-style: none; margin: 10px 0 6px; padding: 0; counter-reset: ol; }
.odds-leader-list li { display: flex; justify-content: space-between; align-items: baseline; padding: 6px 0;
  border-bottom: 1px solid var(--line); counter-increment: ol; font-size: 14px; }
.odds-leader-list li::before { content: counter(ol); color: var(--muted); font-size: 11px; width: 18px; }
.ol-team { flex: 1; font-weight: 700; }
.ol-opp { font-weight: 400; color: var(--ink-2); font-size: 12px; }
.ol-val { font-family: var(--mono); color: var(--accent); font-weight: 700; }
.odds-fx { padding: 12px 0; border-bottom: 1px solid var(--line); }
.odds-fx:last-child { border-bottom: 0; }
.of-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-bottom: 6px; }
.of-teams { font-weight: 800; font-size: 16px; letter-spacing: 0.04em; }
.of-v { font-weight: 400; color: var(--muted); }
.of-ko { font-size: 11px; color: var(--muted); }
.of-ft { font-family: var(--mono); font-weight: 700; color: var(--ink); font-size: 13px; }
.of-bar { display: flex; height: 20px; border-radius: 4px; overflow: hidden; font-size: 10.5px; font-weight: 700; }
.of-bar > span { display: flex; align-items: center; justify-content: center; white-space: nowrap; }
.ob-h { background: var(--accent); color: var(--accent-ink); }
.ob-d { background: var(--card-2); color: var(--ink-2); }
.ob-a { background: #5b7bd5; color: #0b1533; }
.of-stats { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-top: 6px; font-size: 12px; color: var(--ink-2); }
.of-stats b { color: var(--ink); }
.odds-method { margin-top: 14px; }
.fx-meter { flex: 0 0 80px; height: 6px; margin: 0 10px; border-radius: 3px; background: var(--card-2); overflow: hidden;
  align-self: center; }
.fx-meter-fill { display: block; height: 100%; background: var(--accent); border-radius: 3px; }
.fx-row { display: grid; grid-template-columns: 38px 1fr 28px 1fr 38px; align-items: center; gap: 6px; margin-top: 6px;
  font-size: 12px; }
.fx-num { font-family: var(--mono); font-weight: 700; color: var(--ink); }
.fx-row .fx-num:first-child { text-align: right; }
.fx-label { text-align: center; font-size: 10px; letter-spacing: 0.08em; color: var(--muted); }
.fx-xg { display: flex; height: 10px; background: var(--card-2); border-radius: 3px; overflow: hidden; }
.fx-xg > span { display: block; height: 100%; }
.fx-xg-h { justify-content: flex-end; }
.fx-xg-h > span { background: var(--accent); }
.fx-xg-a > span { background: #5b7bd5; }
.fx-cs > span { opacity: 0.6; }

/* ---------- Studio preview (fake door: /studio) ---------- */

.studio-kicker {
  margin: 0 0 8px; font-size: 10px; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--accent); font-weight: 700;
}
.studio-title { margin: 0 0 12px; font-size: 26px; line-height: 1.25; letter-spacing: 0.01em; }
.studio-cta { margin-top: 0; }
.studio-section { margin-top: 34px; }
.studio-section-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.studio-section-head .section-label { margin: 0; }
.studio-badge {
  font-size: 9px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted);
  border: 1px dashed var(--line); border-radius: 2px; padding: 2px 6px;
}
.studio-lede { color: var(--ink-2); font-size: 13px; line-height: 1.6; margin: 10px 0 14px; max-width: 760px; }
.studio-note { color: var(--accent); font-size: 12px; margin: 0 0 12px; }
.studio-toolbar { display: flex; gap: 10px; align-items: center; justify-content: space-between; flex-wrap: wrap; margin-bottom: 12px; }
.studio-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.studio-chip, .studio-add, .studio-control {
  font-family: var(--mono); font-size: 11px; cursor: pointer; color: var(--ink-2);
  background: var(--card); border: 1px solid var(--line); border-radius: 3px; padding: 6px 10px;
}
.studio-chip:first-child { color: var(--ink); border-color: var(--accent); }
.studio-add { border-style: dashed; color: var(--accent); }
.studio-chip:hover, .studio-add:hover, .studio-control:hover { border-color: var(--accent); color: var(--ink); }
.studio-board { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.studio-tile { margin: 0; min-width: 0; }
.studio-tile-wide { grid-column: 1 / -1; }
.studio-tile-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.studio-tile-head h3 { margin: 0; font-size: 13px; letter-spacing: 0.06em; }
.studio-controls { display: flex; gap: 6px; flex-wrap: wrap; }
.studio-control { font-size: 10px; padding: 4px 8px; }
.studio-control .k { color: var(--muted); }
.studio-chart { position: relative; }
.studio-bars { display: grid; gap: 9px; }
.studio-bar-row {
  display: grid; grid-template-columns: minmax(0, 11em) minmax(40px, 1fr) 2.6em 6.5em; gap: 10px; align-items: center;
  font-size: 12px;
}
.studio-bar-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.studio-bar-team { color: var(--muted); font-size: 10px; }
.studio-bar-track { height: 10px; background: var(--card-2); border-radius: 2px; overflow: hidden; }
.studio-bar-fill { display: block; height: 100%; background: var(--accent); border-radius: 0 2px 2px 0; }
.studio-bar-val { font-weight: 700; text-align: right; font-variant-numeric: tabular-nums; }
.studio-bar-sub { color: var(--muted); font-size: 10.5px; text-align: right; font-variant-numeric: tabular-nums; }
.studio-foot { color: var(--muted); font-size: 11px; line-height: 1.5; margin: 14px 0 0; }
.studio-h2h { width: 100%; border-collapse: collapse; font-size: 12px; font-variant-numeric: tabular-nums; }
.studio-h2h th, .studio-h2h td { padding: 8px 6px; border-bottom: 1px solid var(--line-soft); text-align: center; }
.studio-h2h thead th { color: var(--ink); font-size: 11px; letter-spacing: 0.06em; }
.studio-h2h tbody th { text-align: left; color: var(--muted); font-weight: 400; font-size: 11px; }
.studio-h2h td.win { color: var(--pos); font-weight: 700; }
.studio-chat { display: grid; gap: 14px; grid-template-columns: minmax(0, 1fr); }
.studio-chat > * { min-width: 0; }
.studio-msg { font-size: 13px; line-height: 1.6; }
.studio-msg p { margin: 0 0 10px; }
.studio-who { display: block; font-size: 9px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
.studio-msg-you { justify-self: end; max-width: 80%; background: var(--card-2); border-radius: 6px; padding: 10px 14px; }
.studio-msg-bot { border-left: 2px solid var(--accent); padding-left: 14px; }
.studio-chat-table { margin: 4px 0 8px; }
.studio-source, .studio-example { color: var(--muted); font-size: 11px; margin: 0; }
.studio-ask { display: flex; gap: 10px; }
.studio-ask-input {
  flex: 1; min-width: 0; font-family: var(--mono); font-size: 13px; background: #0d1738; color: var(--ink-2);
  border: 1px dashed var(--line); border-radius: 3px; padding: 9px 12px; cursor: pointer;
}
.studio-points { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.studio-points li { color: var(--ink-2); font-size: 12.5px; line-height: 1.6; border-top: 1px solid var(--line); padding-top: 12px; }
.studio-points strong { color: var(--ink); display: block; margin-bottom: 4px; }
@media (max-width: 760px) {
  .studio-board, .studio-points { grid-template-columns: 1fr; }
  .studio-title { font-size: 21px; }
  .studio-msg-you { max-width: 100%; }
  .studio-bar-row { grid-template-columns: minmax(0, 1fr) 70px 2.4em; }
  .studio-bar-sub { display: none; }
}

/* ---------- The Bot sub-nav (Scoreboard · Squad & plan · Track record) ---------- */

.sub-nav { flex-basis: 100%; display: flex; gap: 6px; flex-wrap: wrap; margin-top: 4px; }
.sub-nav a {
  font-size: 10.5px; letter-spacing: 0.14em; text-transform: uppercase; text-decoration: none;
  color: var(--muted); border: 1px solid var(--line); border-radius: 3px; padding: 5px 10px;
}
.sub-nav a:hover { color: var(--ink); border-color: var(--ink-2); }
.sub-nav a[aria-current="page"] { color: var(--accent-ink); background: var(--accent); border-color: var(--accent); }

/* ---------- homepage ---------- */

.home-hero { margin-bottom: 26px; max-width: 820px; }
.home-title { margin: 0 0 14px; font-size: 32px; line-height: 1.2; letter-spacing: 0.01em; }
.home-sub { font-size: 14px; max-width: 720px; }
.home-ctas { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; margin-top: 22px; }
.home-cta { text-decoration: none; display: inline-block; }
.home-cta-2 { font-size: 12px; letter-spacing: 0.08em; color: var(--ink-2); }
.home-demo { margin: 0; }
.home-demo-controls { display: flex; gap: 10px 22px; flex-wrap: wrap; margin: 6px 0 10px; }
.home-chip-group { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.home-chip-label { font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); margin-right: 2px; }
.home-chip-group .studio-chip { border-color: var(--line); color: var(--ink-2); }
.home-chip-group .studio-chip[aria-pressed="true"] { color: var(--accent-ink); background: var(--accent); border-color: var(--accent); }
.home-proof { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; align-items: start; }
.home-stat { border-top: 1px solid var(--line); padding-top: 12px; }
.home-stat-val { font-size: 26px; font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; }
.home-stat-lbl { font-size: 10.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent); margin-top: 4px; }
.home-stat-note { font-size: 11.5px; color: var(--muted); line-height: 1.5; margin-top: 6px; }
.home-proof-link { grid-column: 1 / -1; font-size: 12px; color: var(--ink-2); }

/* ---------- pricing ---------- */

.pricing-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; align-items: stretch; }
.pricing-card { margin: 0; display: flex; flex-direction: column; }
.pricing-featured { border-color: var(--accent); }
.pricing-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.pricing-head h2 { margin: 0; font-size: 16px; letter-spacing: 0.04em; }
.pricing-price { font-size: 22px; font-weight: 700; margin: 14px 0 4px; }
.pricing-lede { color: var(--ink-2); font-size: 12.5px; margin: 0 0 12px; }
.pricing-list { margin: 0 0 18px; padding-left: 18px; color: var(--ink-2); font-size: 12px; line-height: 1.7; flex: 1; }
.pricing-cta { text-decoration: none; text-align: center; }
.pricing-cta-2 { font-size: 12px; letter-spacing: 0.08em; color: var(--ink-2); border: 1px solid var(--line); border-radius: 3px; padding: 9px 12px; }
.pricing-cta-2:hover { border-color: var(--accent); color: var(--ink); }
.pricing-faq { display: grid; gap: 8px; max-width: 820px; }
.pricing-q { border: 1px solid var(--line); border-radius: 4px; padding: 10px 14px; background: var(--card); }
.pricing-q summary { cursor: pointer; font-size: 13px; color: var(--ink); }
.pricing-q p { margin: 10px 0 2px; color: var(--ink-2); font-size: 12.5px; line-height: 1.6; }

@media (max-width: 760px) {
  .home-title { font-size: 24px; }
  .home-proof, .pricing-grid { grid-template-columns: 1fr; }
}

/* ---------- Studio board builder ---------- */

.studio-tile-head { align-items: center; }
.studio-remove {
  font-family: var(--mono); font-size: 12px; cursor: pointer; color: var(--muted);
  background: transparent; border: 1px solid var(--line); border-radius: 3px; padding: 3px 8px;
}
.studio-remove:hover { color: var(--neg); border-color: var(--neg); }
.studio-fields { display: flex; flex-wrap: wrap; gap: 8px 12px; margin: 0 0 14px; }
.studio-field { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.studio-field .k { font-size: 9.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.studio-select {
  font-family: var(--mono); font-size: 11.5px; color: var(--ink); background: #0d1738;
  border: 1px solid var(--line); border-radius: 3px; padding: 6px 8px; max-width: 220px;
}
.studio-select:focus { outline: 1px solid var(--accent); }
.studio-chip { white-space: nowrap; }
@media (max-width: 760px) { .studio-select { max-width: 100%; } .studio-field { flex: 1 1 140px; } }
.studio-tile .studio-tile-head { flex-wrap: nowrap; }
.studio-tile .studio-tile-head h3 { flex: 1; min-width: 0; }

/* ---------- Studio grid: tiles are 1 or 2 columns wide and 1 or 2 rows tall ---------- */

.studio-board { --studio-row: 400px; grid-auto-rows: var(--studio-row); grid-auto-flow: row dense; }
.studio-board .studio-tile { position: relative; display: flex; flex-direction: column; overflow: hidden; min-height: 0; }
.studio-c2 { grid-column: span 2; }
.studio-r2 { grid-row: span 2; }
.studio-tile-body { flex: 1; min-height: 0; overflow: auto; }
.studio-chart-fill { height: 100%; }
.studio-board .studio-foot { margin: 8px 0 0; flex: none; }
.studio-tile .studio-tile-head { gap: 8px; margin-bottom: 10px; flex: none; }
.studio-edit {
  font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.1em; text-transform: uppercase; cursor: pointer;
  color: var(--ink-2); background: transparent; border: 1px solid var(--line); border-radius: 3px; padding: 4px 9px; flex: none;
}
.studio-edit:hover, .studio-edit.on { color: var(--accent-ink); background: var(--accent); border-color: var(--accent); }
.studio-remove { flex: none; }
/* settings open as a panel over the chart, so opening them never changes the tile's size */
.studio-tile.is-editing .studio-fields {
  position: absolute; left: 0; right: 0; top: 56px; bottom: 0; z-index: 3; margin: 0;
  padding: 14px 18px; background: var(--card); border-top: 1px solid var(--line);
  overflow: auto; align-content: flex-start;
}
.studio-cols { flex-basis: 100%; }
.studio-col-list { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.studio-col {
  display: inline-flex; align-items: center; gap: 6px; font-size: 11px; color: var(--ink);
  background: var(--card-2); border: 1px solid var(--line); border-radius: 3px; padding: 4px 8px;
}
.studio-col.is-rank { border-color: var(--accent); color: var(--accent); }
.studio-col-x { font-family: var(--mono); font-size: 10px; cursor: pointer; color: var(--muted); background: none; border: 0; padding: 0; }
.studio-col-x:hover { color: var(--neg); }
.studio-table table { font-size: 11.5px; }
.studio-table th, .studio-table td { white-space: nowrap; }
.studio-table th.studio-th { cursor: pointer; }
.studio-table th.studio-th:hover { color: var(--ink); }
.studio-table .is-rank { color: var(--accent); font-weight: 700; }
.studio-table td.studio-td-name { text-align: left; }
@media (max-width: 760px) {
  .studio-board { --studio-row: 360px; }
  .studio-c2 { grid-column: auto; }
}
.studio-chart-fill svg { display: block; }
.studio-table th:nth-child(2) { text-align: left; }
