/* ══════════════════════════════════════════
   ENTITY — game / team / player
══════════════════════════════════════════ */

/* ── ENTITY PAGES (game / team / player) ─────────────────── */

.ent-page { max-width: 960px; margin: 0 auto; }
.ent-page--split { max-width: none; margin: 0; }
.ent-block { margin: 18px 0; }
.ent-section { margin: 28px 0; }
.ent-section-h {
  font-family: var(--font-mono);
  font-size: var(--fs-pluto);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--grey-hi);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.ent-accent { /* inherits */ }
.ent-empty {
  font-family: var(--font-mono);
  font-size: var(--fs-pluto);
  color: var(--grey-mid);
  letter-spacing: 0.04em;
  margin: 0;
  padding: 4px 0;
}
.ent-prose {
  font-size: var(--fs-moon);
  font-weight: 300;
  color: var(--grey-hi);
  line-height: 1.65;
  padding: 4px 2px;
}
.ent-prose p { margin: 0 0 0.9em; }
.ent-prose p:last-child { margin-bottom: 0; }
.ent-prose h2 {
  font-family: var(--font-display);
  font-size: var(--fs-mars);
  letter-spacing: 0.04em;
  color: var(--white);
  margin: 1.4em 0 0.5em;
  line-height: 1.15;
}
.ent-prose h3 {
  font-family: var(--font-display);
  font-size: var(--fs-earth);
  letter-spacing: 0.03em;
  color: var(--white);
  margin: 1.2em 0 0.4em;
  line-height: 1.2;
}

.ent-dual {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.ent-stack { display: flex; flex-direction: column; gap: 12px; }
.ent-card {
  background: var(--coal-card);
  border: 1px solid var(--coal-border);
  border-radius: var(--r-lg);
  padding: 16px 18px;
}
.ent-card--wide { width: 100%; }
.ent-card-title {
  font-family: var(--font-display);
  font-size: var(--fs-earth);
  letter-spacing: 0.04em;
  color: var(--white);
  margin-bottom: 12px;
}

/* Score */
.ent-score-card {
  background: var(--coal-card);
  border: 1px solid var(--coal-border);
  border-radius: var(--r-lg);
  padding: 20px 22px;
  margin: 12px 0 20px;
}
.ent-score-card--live { border-color: rgba(255, 59, 59, 0.35); }
.ent-score-status {
  font-family: var(--font-mono);
  font-size: var(--fs-pluto);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--grey-mid);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.ent-score-status--live { color: var(--red-live); }
.ent-score-status--final { color: var(--accent); }
.ent-score-matchup {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.ent-score-matchup--pre { align-items: flex-start; }
.ent-score-team {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
}
.ent-score-team--home { justify-content: flex-end; text-align: right; flex-wrap: wrap; }
.ent-score-matchup--pre .ent-score-team {
  flex-direction: column;
  align-items: flex-start;
}
.ent-score-matchup--pre .ent-score-team--home { align-items: flex-end; }
.ent-score-team.is-lead .ent-score-abbr,
.ent-score-team.is-lead .ent-score-pts { color: var(--accent); }
.ent-logo {
  width: 36px;
  height: 36px;
  object-fit: contain;
  flex-shrink: 0;
}
.ent-score-abbr {
  font-family: var(--font-body);
  font-size: var(--fs-earth);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--white);
}
.ent-score-name {
  font-family: var(--font-mono);
  font-size: var(--fs-pluto);
  color: var(--grey-mid);
  letter-spacing: 0.04em;
}
.ent-score-rec {
  font-family: var(--font-mono);
  font-size: var(--fs-pluto);
  color: var(--grey-lo);
}
.ent-score-pts {
  font-family: var(--font-display);
  font-size: var(--fs-neptune);
  color: var(--white);
  line-height: 1;
}
/* match upcoming .game-vs: not bold, lowercase, smaller than teams */
.ent-score-vs {
  font-family: var(--font-body);
  font-size: var(--fs-moon);
  font-weight: 400;
  letter-spacing: 0.02em;
  text-transform: lowercase;
  opacity: 0.7;
  color: var(--grey-mid);
  flex-shrink: 0;
}
.ent-score-meta {
  margin-top: 14px;
  font-family: var(--font-mono);
  font-size: var(--fs-pluto);
  color: var(--grey-mid);
  letter-spacing: 0.06em;
}

/* Stat grid */
.ent-stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 10px;
}
.ent-stat-cell {
  background: var(--coal-mid);
  border: 1px solid var(--coal-border);
  border-radius: var(--r-md);
  padding: 12px 10px;
  text-align: center;
}
.ent-stat-val {
  font-family: var(--font-display);
  font-size: var(--fs-mars);
  color: var(--white);
  line-height: 1.1;
}
.ent-stat-lbl {
  margin-top: 4px;
  font-family: var(--font-mono);
  font-size: var(--fs-pluto);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--grey-mid);
}

/* Form pills / lists */
.ent-form-row { display: flex; flex-wrap: wrap; gap: 6px; }
.ent-form-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 28px;
  padding: 0 8px;
  border-radius: var(--r-sm);
  font-family: var(--font-mono);
  font-size: var(--fs-pluto);
  font-weight: 700;
  letter-spacing: 0.06em;
  background: var(--coal-mid);
  color: var(--grey-hi);
  border: 1px solid var(--coal-border);
}
.ent-form-pill--w { color: #111; background: var(--accent); border-color: transparent; }
.ent-form-pill--l { color: var(--grey-hi); background: var(--coal-hover); }
.ent-form-pill--t { color: var(--grey-mid); }

.ent-player-list,
.ent-list,
.ent-roster {
  list-style: none;
  margin: 0;
  padding: 0;
}
.ent-player-list li,
.ent-list li,
.ent-roster li {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 12px;
  padding: 8px 0;
  border-bottom: 1px solid var(--coal-border);
  font-size: var(--fs-moon);
  color: var(--grey-hi);
}
.ent-player-list li:last-child,
.ent-list li:last-child,
.ent-roster li:last-child { border-bottom: none; }
.ent-player-list a,
.ent-list a,
.ent-roster a { color: var(--white); text-decoration: none; }
.ent-player-list a:hover,
.ent-list a:hover,
.ent-roster a:hover { color: var(--accent); }
.ent-list-meta {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: var(--fs-pluto);
  color: var(--grey-mid);
  letter-spacing: 0.04em;
}

/* Boxscore table
   Wide stats (MLB batting etc.) must scroll *inside* the wrap, not the page.
   Flex/grid min-width:auto is why overflow-x alone often fails on mobile. */
.ent-stack,
.ent-card,
.ent-bs-cat,
.ent-block,
.ent-section {
  min-width: 0;
  max-width: 100%;
}
.ent-table-wrap {
  display: block;
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
}
.ent-table {
  width: max-content;
  min-width: 100%;
  border-collapse: collapse;
  font-family: var(--font-mono);
  font-size: var(--fs-pluto);
  letter-spacing: 0.03em;
}
.ent-table th,
.ent-table td {
  padding: 8px 10px;
  text-align: right;
  border-bottom: 1px solid var(--coal-border);
  color: var(--grey-hi);
  white-space: nowrap;
}
.ent-table th {
  color: var(--grey-mid);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.ent-table th:first-child,
.ent-table td:first-child { text-align: left; }
.ent-bs-name a { color: var(--white); text-decoration: none; }
.ent-bs-name a:hover { color: var(--accent); }
.ent-bs-pos {
  display: inline-block;
  min-width: 28px;
  font-size: var(--fs-pluto);
  color: var(--grey-mid);
  letter-spacing: 0.06em;
}

/* Record / header / links */
.ent-record {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 20px;
  background: var(--coal-card);
  border: 1px solid var(--coal-border);
  border-radius: var(--r-lg);
  padding: 18px 22px;
}
.ent-record-cell { text-align: center; min-width: 64px; }
.ent-record-num {
  display: block;
  font-family: var(--font-display);
  font-size: var(--fs-sun);
  color: var(--white);
  line-height: 1;
}
.ent-record-lbl {
  font-family: var(--font-mono);
  font-size: var(--fs-pluto);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--grey-mid);
}
.ent-record-sep { color: var(--grey-lo); font-size: var(--fs-mars); }
.ent-record-line {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: var(--fs-pluto);
  letter-spacing: 0.08em;
  color: var(--accent);
}

.ent-header {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 8px;
}
.ent-header-logo {
  width: 72px;
  height: 72px;
  object-fit: contain;
  flex-shrink: 0;
}
.ent-header-photo {
  width: 96px;
  height: 96px;
  object-fit: cover;
  border-radius: var(--r-md);
  border: 1px solid var(--coal-border);
  flex-shrink: 0;
  background: var(--coal-mid);
}

.ent-link-row { display: flex; flex-wrap: wrap; gap: 10px; }
.ent-link-chip {
  display: inline-flex;
  align-items: center;
  padding: 10px 16px;
  border-radius: var(--r-md);
  background: var(--coal-card);
  border: 1px solid var(--coal-border);
  color: var(--white);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: var(--fs-moon);
  text-decoration: none;
  transition: border-color var(--t-base), color var(--t-fast);
}
.ent-link-chip:hover { border-color: var(--accent); color: var(--accent); }
.ent-link-chip--plain { color: var(--grey-hi); cursor: default; }

@media (max-width: 720px) {
  .ent-dual { grid-template-columns: 1fr; }
  .ent-record-line { margin-left: 0; width: 100%; }
  .ent-header { flex-direction: column; align-items: flex-start; }
  .ent-list-meta { margin-left: 0; width: 100%; }

  /* Boxscore: tighter cells + sticky Player col while stats scroll */
  .ent-card { padding: 14px 12px; }
  .ent-table th,
  .ent-table td { padding: 6px 7px; }
  .ent-table th:first-child,
  .ent-table td:first-child {
    position: sticky;
    left: 0;
    z-index: 1;
    background: var(--coal-card);
    box-shadow: 6px 0 8px -6px rgba(0, 0, 0, 0.55);
  }

  /* Game page score — upcoming: stacked & centered (live/final already compact) */
  .ent-score-card { padding: 16px 14px; }
  .ent-score-status { justify-content: center; text-align: center; }
  .ent-score-matchup--pre {
    flex-direction: column;
    align-items: center;
    gap: 10px;
    text-align: center;
  }
  .ent-score-matchup--pre .ent-score-team,
  .ent-score-matchup--pre .ent-score-team--home {
    flex-direction: column;
    align-items: center;
    text-align: center;
    width: 100%;
  }
  .ent-score-matchup--pre .ent-score-vs {
    padding: 2px 0;
  }
  .ent-score-meta {
    text-align: center;
    white-space: normal;
    line-height: 1.45;
  }
  /* Live/final matchup stays horizontal but tighter */
  .ent-score-matchup:not(.ent-score-matchup--pre) {
    gap: 10px;
  }
  .ent-score-abbr { font-size: var(--fs-earth); }
  .ent-logo { width: 28px; height: 28px; }
}

/* ── Related grid 3-col ───────────────────────────────── */

.related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 28px;
}
.related-card {
  background: var(--coal-card);
  border: 1px solid var(--coal-border);
  border-radius: var(--r-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.related-card-img img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
}
.related-card-body { padding: 10px 12px 14px; }
.related-card-meta { font-size: var(--fs-pluto); margin-bottom: 4px; }
.related-card-title {
  font-size: var(--fs-venus);
  line-height: 1.2;
}
@media (max-width: 800px) {
  .related-grid { grid-template-columns: 1fr; }
}

/* vs always lowercase + not bold (shared guard) */
.game-vs,
.sb-sep,
.ep-sep,
.ent-score-vs {
  text-transform: lowercase;
  font-weight: 400;
}

/* Multi-category boxscore (batting + pitching, etc.) */
.ent-bs-cat { margin-top: 14px; }
.ent-bs-cat:first-child { margin-top: 0; }
.ent-bs-cat-title {
  font-family: var(--font-mono);
  font-size: var(--fs-moon);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 8px;
}

/* Game page header: league theme label + title + optional archive badge */
.game-page-head {
  margin-bottom: 16px;
}
.game-page-head .sb-league-label {
  margin-bottom: 12px;
}
.game-title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px 16px;
}
.game-title-row .post-headline {
  margin-bottom: 0;
  flex: 1 1 auto;
  min-width: 0;
}
/* Neutral (not league-colored) — signals historical record */
.game-archive-label {
  flex: 0 0 auto;
  font-family: var(--font-mono);
  font-size: var(--fs-pluto);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--grey-mid);
  border: 1px solid var(--coal-border);
  background: var(--coal-mid);
  padding: 4px 10px;
  border-radius: var(--r-sm);
  white-space: nowrap;
}

/* Game page: Expert Pick then Odds — each full width (stacked) */
.widget--game-pick,
.widget--game-odds {
  width: 100%;
  line-height: 1.4;
}

/* Expert Pick — full-width bar + labels */
.game-pick {
  padding: 16px 18px 18px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
}
.game-pick--empty {
  min-height: 48px;
}
.game-pick-bar {
  height: 8px;
  width: 100%;
  background: var(--coal-border);
  border-radius: 4px;
  overflow: hidden;
}
.game-pick-bar-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 4px;
}
.game-pick-labels {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  font-family: var(--font-mono);
  font-size: var(--fs-moon);
  color: var(--grey-mid);
  letter-spacing: 0.06em;
}
.game-pick-labels .pick-fav {
  color: var(--accent);
  font-weight: 600;
}

/* Odds — full width, ML | Spread | Total horizontal */
.game-odds {
  padding: 16px 18px 18px;
}
.game-odds--empty {
  min-height: 48px;
}
.game-odds-board {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px 24px;
  text-align: center;
}
.game-odds-col {
  min-width: 0;
  padding: 0 8px;
}
.game-odds-col + .game-odds-col {
  border-left: 1px solid var(--coal-border);
}
.game-odds-col-title {
  font-family: var(--font-mono);
  font-size: var(--fs-pluto);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--grey-mid);
  margin-bottom: 8px;
}
.game-odds-row {
  font-family: var(--font-mono);
  font-size: var(--fs-moon);
  line-height: 1.5;
  color: var(--grey-hi);
}
.game-odds-row em {
  font-style: normal;
  font-weight: 700;
  color: var(--white);
  margin-left: 6px;
}
.game-odds-provider {
  margin-top: 14px;
  padding-top: 10px;
  border-top: 1px solid var(--coal-border);
  text-align: center;
  font-family: var(--font-mono);
  font-size: var(--fs-pluto);
  color: var(--accent);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
@media (max-width: 640px) {
  .game-odds-board {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .game-odds-col + .game-odds-col {
    border-left: none;
    border-top: 1px solid var(--coal-border);
    padding-top: 12px;
  }
}
.ent-prose--html p { margin: 0 0 1em; }
.ent-prose--html p:last-child { margin-bottom: 0; }
.ent-prose--html h2 {
  font-family: var(--font-display);
  font-size: var(--fs-mars);
  letter-spacing: 0.04em;
  color: var(--white);
  margin: 1.5em 0 0.5em;
  line-height: 1.15;
}
.ent-prose--html h3 {
  font-family: var(--font-display);
  font-size: var(--fs-earth);
  letter-spacing: 0.03em;
  color: var(--white);
  margin: 1.25em 0 0.4em;
  line-height: 1.2;
}

.week-items--4 .week-item img {
  width: 100%;
  height: 72px;
  object-fit: cover;
  border-radius: var(--r-sm);
  margin-bottom: 10px;
  filter: brightness(0.75);
}

.widget--inline {
  background: var(--coal-card);
  border: 1px solid var(--coal-border);
  border-radius: var(--r-lg);
  overflow: hidden;
}
.widget--inline .widget-header {
  padding: 12px 16px;
  border-bottom: 1px solid var(--coal-border);
  font-family: var(--font-mono);
  font-size: var(--fs-pluto);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--grey-hi);
}
