/* SSR game pages — /games/:date/:matchup
 *
 * Loaded via <link rel="stylesheet" href="/css/game.css"> on every
 * /games/* response. Article shell (article.css) handles the page
 * chrome — header, footer, container width, base typography. Rules
 * here only style the game-specific sections, prefixed `rl-game-`.
 *
 * Mobile-first (single column under 720px), three-column score block
 * above. Sections use neutral cards; team color slips in via the
 * `--rl-team-color` custom property set by the layout module.
 */

.rl-game-page {
  max-width: 960px;
  margin: 0 auto;
  padding: 24px 16px 48px;
  color: #e7eaee;
}

@media (min-width: 720px) {
  .rl-game-page { padding: 32px 24px 64px; }
}

/* ── Phase banner ──────────────────────────────────────────────── */
.rl-game-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 8px;
  background: #1d2229;
  border: 1px solid #2a313b;
  margin-bottom: 18px;
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 14px;
  letter-spacing: 0.04em;
  color: #cdd3da;
}
.rl-game-banner-pre    { border-color: #294160; background: linear-gradient(90deg, #1d2229, #1c2a40); }
.rl-game-banner-live   { border-color: #5a1f25; background: linear-gradient(90deg, #1d2229, #2c161a); }
.rl-game-banner-final  { border-color: #2a313b; }
.rl-game-banner-special { border-color: #4d3e1c; background: linear-gradient(90deg, #1d2229, #2a2418); }

.rl-game-banner-pill {
  background: #2a313b;
  color: #e7eaee;
  padding: 4px 10px;
  border-radius: 4px;
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.rl-game-banner-pill-live {
  background: #c82834;
  color: #fff;
  position: relative;
  padding-left: 22px;
}
.rl-game-banner-pill-live::before {
  content: '';
  position: absolute;
  left: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #fff;
  animation: rl-game-blink 1.2s ease-in-out infinite;
}
@keyframes rl-game-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}
.rl-game-banner-refresh {
  margin-left: auto;
  font-size: 12px;
  color: #9aa3ad;
}

/* ── Header ────────────────────────────────────────────────────── */
.rl-game-header {
  margin-bottom: 24px;
}
.rl-game-eyebrow {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #8a93a0;
  margin-bottom: 6px;
}
.rl-game-title {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 32px;
  line-height: 1.05;
  font-weight: 800;
  letter-spacing: -0.005em;
  margin: 0 0 12px;
  color: #fff;
}
.rl-game-title .rl-game-vs {
  font-weight: 500;
  color: #8a93a0;
  font-size: 0.7em;
  margin: 0 6px;
  text-transform: lowercase;
}
@media (min-width: 720px) {
  .rl-game-title { font-size: 42px; }
}

.rl-game-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  font-size: 13px;
  color: #b6bdc7;
}
.rl-game-meta-item strong { color: #e7eaee; }

/* ── Score block ──────────────────────────────────────────────── */
.rl-game-score {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
  background: #161a20;
  border: 1px solid #2a313b;
  border-radius: 12px;
  padding: 18px;
  margin-bottom: 24px;
}
.rl-game-score-team {
  --rl-team-color: #5b6d82;
  text-align: center;
  padding: 8px;
  border-top: 3px solid var(--rl-team-color);
  border-radius: 6px;
}
.rl-game-score-team-eyebrow {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 11px;
  letter-spacing: 0.18em;
  color: #8a93a0;
  margin-bottom: 4px;
}
.rl-game-score-team-name {
  display: block;
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 700;
  font-size: 18px;
  color: #e7eaee;
  text-decoration: none;
  letter-spacing: -0.005em;
}
.rl-game-score-team-name:hover { color: var(--rl-team-color); }
.rl-game-score-team-record {
  font-size: 12px;
  color: #8a93a0;
  margin-top: 2px;
}
.rl-game-score-value {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 48px;
  font-weight: 800;
  line-height: 1;
  margin-top: 8px;
  color: #fff;
}
.rl-game-score-divider {
  font-family: 'Share Tech Mono', monospace;
  color: #5b6d82;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}
.rl-game-score-winner .rl-game-score-value { color: #fff; }
.rl-game-score-team:not(.rl-game-score-winner) .rl-game-score-value {
  /* Loser shaded slightly to draw the eye to the winner. */
  color: #b6bdc7;
}

@media (min-width: 720px) {
  .rl-game-score-value { font-size: 64px; }
}

/* ── Sections ─────────────────────────────────────────────────── */
.rl-game-section {
  margin: 28px 0;
  padding: 18px;
  background: #161a20;
  border: 1px solid #2a313b;
  border-radius: 12px;
}
.rl-game-section-h {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 14px;
  letter-spacing: 0.18em;
  color: #8a93a0;
  text-transform: uppercase;
  margin: 0 0 12px;
  font-weight: 600;
}
.rl-game-empty {
  color: #8a93a0;
  font-size: 14px;
  margin: 6px 0 0;
}

/* ── Pitchers ─────────────────────────────────────────────────── */
.rl-game-pitchers {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}
@media (min-width: 600px) {
  .rl-game-pitchers { grid-template-columns: 1fr 1fr; }
}
.rl-game-pitcher {
  background: #1d2229;
  border-radius: 8px;
  padding: 12px;
}
.rl-game-pitcher-eyebrow {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 11px;
  letter-spacing: 0.16em;
  color: #8a93a0;
  text-transform: uppercase;
  margin-bottom: 6px;
}
.rl-game-pitcher-empty {
  color: #8a93a0;
  font-style: italic;
  font-size: 14px;
}
.rl-game-pitcher-row {
  display: flex;
  gap: 10px;
  align-items: center;
}
.rl-game-pitcher-img {
  border-radius: 50%;
  background: #2a313b;
}
.rl-game-pitcher-name {
  font-weight: 600;
  color: #e7eaee;
}
.rl-game-pitcher-line {
  font-size: 13px;
  color: #8a93a0;
}

/* ── Lineups ─────────────────────────────────────────────────── */
.rl-game-lineups {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}
@media (min-width: 600px) {
  .rl-game-lineups { grid-template-columns: 1fr 1fr; }
}
.rl-game-lineup-col { background: #1d2229; border-radius: 8px; padding: 12px; }
.rl-game-lineup-eyebrow {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 11px;
  letter-spacing: 0.16em;
  color: #8a93a0;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.rl-game-lineup-list {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: lineup;
}
.rl-game-lineup-row {
  display: grid;
  grid-template-columns: 28px 1fr auto;
  gap: 8px;
  align-items: baseline;
  padding: 4px 0;
  border-bottom: 1px solid #232931;
  font-size: 14px;
}
.rl-game-lineup-row:last-child { border-bottom: 0; }
.rl-game-lineup-spot {
  font-family: 'Share Tech Mono', monospace;
  color: #8a93a0;
  font-size: 13px;
}
.rl-game-lineup-name { color: #e7eaee; }
.rl-game-lineup-pos { font-size: 12px; color: #8a93a0; font-family: 'Share Tech Mono', monospace; }

/* ── Box score ───────────────────────────────────────────────── */
.rl-game-box-wrap { overflow-x: auto; }
.rl-game-box {
  width: 100%;
  border-collapse: collapse;
  font-family: 'Share Tech Mono', monospace;
  font-size: 14px;
  color: #e7eaee;
}
.rl-game-box th, .rl-game-box td {
  padding: 6px 8px;
  text-align: center;
  border-bottom: 1px solid #232931;
}
.rl-game-box th {
  color: #8a93a0;
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.08em;
}
.rl-game-box-team { text-align: left; color: #b6bdc7; min-width: 64px; }
.rl-game-box-final { background: #1d2229; }

/* ── Manager comparison ──────────────────────────────────────── */
.rl-game-mgr-headline {
  margin: 0 0 12px;
  color: #b6bdc7;
  font-size: 14px;
}
.rl-game-mgr-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}
@media (min-width: 600px) {
  .rl-game-mgr-grid { grid-template-columns: 1fr 1fr; }
}
.rl-game-mgr-card {
  --rl-team-color: #5b6d82;
  background: #1d2229;
  border-radius: 8px;
  padding: 12px;
  border-left: 3px solid var(--rl-team-color);
}
.rl-game-mgr-eyebrow {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 11px;
  letter-spacing: 0.16em;
  color: #8a93a0;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.rl-game-mgr-row { display: flex; gap: 10px; align-items: center; }
.rl-game-mgr-img { border-radius: 50%; background: #2a313b; }
.rl-game-mgr-name { font-weight: 600; color: #e7eaee; margin-bottom: 4px; font-size: 16px; }
.rl-game-mgr-name a { color: inherit; text-decoration: none; }
.rl-game-mgr-name a:hover { color: var(--rl-team-color); }
.rl-game-mgr-stats {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  font-size: 12px;
  color: #8a93a0;
  font-family: 'Share Tech Mono', monospace;
}
.rl-game-mgr-stat {
  background: #232931;
  padding: 2px 6px;
  border-radius: 4px;
}
.rl-game-mgr-interim { color: #f4a261; }

/* Reuse manager-grade chip styles from /css/article.css if present;
 * include a fallback so a fresh deploy without the article CSS still
 * shows readable chips. */
.rl-mgr-grade {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.04em;
  background: #2a313b;
  color: #e7eaee;
}
.rl-mgr-grade-sm { font-size: 11px; padding: 1px 6px; }
.rl-mgr-grade-empty { color: #8a93a0; }
.rl-mgr-grade-a { background: #1f4a47; color: #5fe6d2; }
.rl-mgr-grade-b { background: #1f3a55; color: #6fa6e0; }
.rl-mgr-grade-c { background: #4a3c1f; color: #e0c065; }
.rl-mgr-grade-d, .rl-mgr-grade-f { background: #4a1f1f; color: #e07070; }

/* ── Recent form ─────────────────────────────────────────────── */
.rl-game-form-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}
@media (min-width: 600px) {
  .rl-game-form-grid { grid-template-columns: 1fr 1fr; }
}
.rl-game-form-col { background: #1d2229; border-radius: 8px; padding: 12px; }
.rl-game-form-eyebrow {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 11px;
  letter-spacing: 0.16em;
  color: #8a93a0;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.rl-game-form-summary {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 8px;
  font-family: 'Share Tech Mono', monospace;
  font-size: 14px;
}
.rl-game-form-record { color: #e7eaee; font-weight: 700; }
.rl-game-form-rd { color: #8a93a0; }
.rl-game-form-dots {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}
.rl-game-form-dot {
  width: 22px; height: 22px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: 'Share Tech Mono', monospace;
  font-size: 12px;
  font-weight: 700;
}
.rl-game-form-w { background: #1f4a47; color: #5fe6d2; }
.rl-game-form-l { background: #4a1f1f; color: #e07070; }
.rl-game-form-t { background: #2a313b; color: #b6bdc7; }
.rl-game-streak { font-family: 'Share Tech Mono', monospace; font-size: 13px; padding: 2px 6px; border-radius: 4px; }
.rl-game-streak-w { background: #1f4a47; color: #5fe6d2; }
.rl-game-streak-l { background: #4a1f1f; color: #e07070; }
.rl-game-streak-t { background: #2a313b; color: #b6bdc7; }
.rl-game-h2h { margin: 12px 0 0; color: #b6bdc7; font-size: 13px; }

/* ── Bullpen ────────────────────────────────────────────────── */
.rl-game-pen-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}
@media (min-width: 600px) {
  .rl-game-pen-grid { grid-template-columns: 1fr 1fr; }
}
.rl-game-pen-card { background: #1d2229; border-radius: 8px; padding: 12px; }
.rl-game-pen-eyebrow {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 11px;
  letter-spacing: 0.16em;
  color: #8a93a0;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.rl-game-pen-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  font-family: 'Share Tech Mono', monospace;
  font-size: 13px;
  color: #b6bdc7;
}
.rl-game-pen-list li { display: flex; align-items: center; gap: 6px; }
.rl-game-pen-list strong { color: #e7eaee; margin-left: auto; padding-left: 6px; }
.rl-game-pen-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  display: inline-block;
}
.rl-game-pen-avail  { background: #5fe6d2; }
.rl-game-pen-lim    { background: #e0c065; }
.rl-game-pen-rest   { background: #e07070; }
.rl-game-pen-inact  { background: #5b6d82; }

/* ── Tactical analysis ───────────────────────────────────────── */
.rl-game-section-analytics .rl-game-empty { font-style: italic; }

.rl-game-tactical-lede {
  margin: 0 0 14px;
  color: #cdd3da;
  font-size: 14px;
  line-height: 1.55;
}
.rl-game-tactical-foot {
  margin-top: 12px;
  color: #8a93a0;
  font-size: 13px;
  font-style: italic;
}

/* Pre-game watch cards */
.rl-game-tactical-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin: 12px 0;
}
@media (min-width: 600px) {
  .rl-game-tactical-grid { grid-template-columns: 1fr 1fr; }
}
.rl-game-tactical-card {
  --rl-team-color: #5b6d82;
  background: #1d2229;
  border-radius: 8px;
  padding: 12px;
  border-left: 3px solid var(--rl-team-color);
}
.rl-game-tactical-eyebrow {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 11px;
  letter-spacing: 0.16em;
  color: #8a93a0;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.rl-game-tactical-row { display: flex; gap: 10px; align-items: center; }
.rl-game-tactical-info { flex: 1; min-width: 0; }
.rl-game-tactical-name { font-weight: 600; color: #e7eaee; margin-bottom: 4px; font-size: 16px; }
.rl-game-tactical-name a { color: inherit; text-decoration: none; }
.rl-game-tactical-name a:hover { color: var(--rl-team-color); }
.rl-game-tactical-meta {
  font-family: 'Share Tech Mono', monospace;
  font-size: 12px;
  color: #8a93a0;
  line-height: 1.55;
}
.rl-mgr-grade-md { font-size: 14px; padding: 3px 10px; }

/* Three-number framework cards (recent / archive) */
.rl-game-framework-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  margin: 12px 0 18px;
}
@media (min-width: 720px) {
  .rl-game-framework-grid { grid-template-columns: 1fr 1fr; }
}
.rl-game-framework-card {
  --rl-team-color: #5b6d82;
  background: #1d2229;
  border-radius: 10px;
  padding: 14px;
  border-top: 3px solid var(--rl-team-color);
  position: relative;
}
.rl-game-fw-eyebrow {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--rl-team-color);
  text-transform: uppercase;
  font-weight: 700;
  margin-bottom: 10px;
}
.rl-game-fw-rows {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}
.rl-game-fw-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px 12px;
  align-items: baseline;
  padding-bottom: 8px;
  border-bottom: 1px solid #232931;
}
.rl-game-fw-row:last-child { border-bottom: 0; padding-bottom: 0; }
.rl-game-fw-label {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 12px;
  letter-spacing: 0.1em;
  color: #8a93a0;
  text-transform: uppercase;
}
.rl-game-fw-value {
  font-family: 'Share Tech Mono', monospace;
  font-size: 22px;
  font-weight: 700;
  color: #e7eaee;
  letter-spacing: -0.01em;
  white-space: nowrap;
}
.rl-game-fw-value.rl-game-fw-good { color: #5fe6d2; }
.rl-game-fw-value.rl-game-fw-bad  { color: #e07070; }
.rl-game-fw-sub {
  grid-column: 1 / -1;
  font-family: 'Share Tech Mono', monospace;
  font-size: 11px;
  color: #b6bdc7;
  line-height: 1.55;
}
.rl-game-fw-sub strong { color: #e7eaee; font-weight: 700; }
.rl-game-fw-narrative {
  margin: 12px 0 0;
  padding-top: 10px;
  border-top: 1px solid #232931;
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 14px;
  font-style: italic;
  color: #cdd3da;
  line-height: 1.55;
}

/* Counterfactual callout */
.rl-game-counterfactual {
  margin: 18px 0;
  padding: 14px 16px;
  background: linear-gradient(180deg, #161e24, #1a1d24);
  border: 1px solid #2a4a47;
  border-left: 3px solid #5fe6d2;
  border-radius: 8px;
}
.rl-game-cf-eyebrow {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 10px;
  letter-spacing: 0.22em;
  color: #5fe6d2;
  text-transform: uppercase;
  font-weight: 700;
  margin-bottom: 6px;
}
.rl-game-cf-line {
  margin: 0 0 6px;
  font-size: 16px;
  color: #e7eaee;
  line-height: 1.5;
}
.rl-game-cf-line strong { color: #fff; font-weight: 700; }
.rl-game-cf-delta {
  margin: 0;
  font-size: 13px;
  color: #b6bdc7;
  line-height: 1.55;
}

/* Game insights list */
.rl-game-insights-block {
  margin: 18px 0 0;
  padding: 14px;
  background: #1d2229;
  border-radius: 8px;
}
.rl-game-insights-eyebrow {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 10px;
  letter-spacing: 0.22em;
  color: #8a93a0;
  text-transform: uppercase;
  font-weight: 700;
  margin-bottom: 10px;
}
.rl-game-insights-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.rl-game-insight {
  padding: 10px 12px;
  background: #161a20;
  border-radius: 6px;
  border-left: 2px solid #2a313b;
}
.rl-game-insight-headline {
  font-weight: 600;
  color: #e7eaee;
  font-size: 14px;
  line-height: 1.4;
  margin-bottom: 4px;
}
.rl-game-insight-headline a { color: inherit; text-decoration: none; border-bottom: 1px dotted #4a5563; }
.rl-game-insight-headline a:hover { color: #5fe6d2; border-bottom-color: #5fe6d2; }
.rl-game-insight-body { font-size: 13px; color: #b6bdc7; line-height: 1.55; }

/* Replay deep-link footer */
.rl-game-tactical-replay {
  margin: 18px 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.rl-game-tactical-replay-link {
  display: inline-block;
  padding: 8px 12px;
  background: #232931;
  border: 1px solid #2a313b;
  border-radius: 6px;
  color: #5fe6d2;
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-decoration: none;
}
.rl-game-tactical-replay-link:hover {
  background: #2a313b;
  border-color: #5fe6d2;
}

/* ── Related links ───────────────────────────────────────────── */
.rl-game-related-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
}
@media (min-width: 600px) {
  .rl-game-related-links { grid-template-columns: 1fr 1fr; }
}
.rl-game-related-links li a {
  display: block;
  padding: 8px 12px;
  background: #1d2229;
  border-radius: 6px;
  color: #e7eaee;
  text-decoration: none;
  font-size: 14px;
}
.rl-game-related-links li a:hover { background: #232931; }

/* ── Methodology ─────────────────────────────────────────────── */
.rl-game-section-methodology p { font-size: 14px; color: #b6bdc7; line-height: 1.6; margin: 0 0 12px; }
.rl-game-section-methodology p:last-child { margin-bottom: 0; }

/* ── Back link ──────────────────────────────────────────────── */
.rl-game-back {
  margin-top: 32px;
  padding-top: 16px;
  border-top: 1px solid #2a313b;
}
.rl-game-back a {
  color: #8a93a0;
  text-decoration: none;
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 14px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.rl-game-back a:hover { color: #e7eaee; }
