/* =====================
   ROOT & RESET
   ===================== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap');

:root {
  --orange: #ff5910;
  --navy: #002d72;
  --bg: #f4f4f4;
  --card-bg: #ffffff;
  --border: #e4e8f0;
  --text-main: #1a1a2e;
  --text-muted: #6b7280;
  --shadow: 0 1px 6px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.10);
  /* legacy aliases */
  --mets-blue: #002d72;
  --mets-orange: #ff5910;
  --bg-light: #f4f4f4;
  --border-color: #e4e8f0;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--text-main);
  font-size: 15px;
  line-height: 1.6;
}

/* =====================
   ALERT BANNER
   ===================== */
.alert-banner {
  background: var(--orange);
  color: #fff;
  text-align: center;
  padding: 0.5rem 1rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* =====================
   NAV
   ===================== */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #fff;
  border-bottom: 1px solid var(--border);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

nav {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}

.nav-brand {
  text-decoration: none;
  display: flex;
  align-items: baseline;
  gap: 0.15rem;
  font-size: 1.25rem;
  font-weight: 900;
  letter-spacing: -0.5px;
}

.brand-mets  { color: var(--orange); }
.brand-mono  { color: var(--navy); }

.nav-links {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 600;
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  transition: color 0.15s, background 0.15s;
}

.nav-link svg { flex-shrink: 0; }

.nav-link:hover {
  color: var(--navy);
  background: var(--bg);
}

.nav-link.active {
  color: #fff;
  background: var(--orange);
}

.nav-link.active:hover {
  background: #e04a05;
}

/* =====================
   HERO BANNER
   ===================== */
.hero-banner {
  position: relative;
  background: #001530;
  padding: 4.5rem 1.5rem 4rem;
  text-align: center;
  overflow: hidden;
}

/* Background image layer — scale < 1 zooms out; inset: -10% bleeds
   edges so no gaps appear after the transform */
.hero-banner::before {
  content: '';
  position: absolute;
  inset: -10%;
  background-image: url('../hero.png');
  background-size: cover;
  background-position: center top;
  transform: scale(0.88);
  z-index: 0;
}

/* Dark overlay */
.hero-banner::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0, 20, 60, 0.72);
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 680px;
  margin: 0 auto;
}

.hero-label {
  display: inline-block;
  background: var(--orange);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.3rem 0.9rem;
  border-radius: 999px;
  margin-bottom: 1.1rem;
}

.hero-headline {
  font-size: 2.5rem;
  font-weight: 900;
  color: #fff;
  line-height: 1.15;
  letter-spacing: -0.5px;
  margin-bottom: 0.8rem;
}

.hero-subtitle {
  color: rgba(255, 255, 255, 0.65);
  font-size: 1rem;
  margin-bottom: 2rem;
  line-height: 1.6;
}

.email-form,
.signup-form {
  display: flex;
  gap: 0.5rem;
  max-width: 480px;
  margin: 0 auto;
}

.email-form input,
.signup-form input {
  flex: 1;
  padding: 0.75rem 1rem;
  border: 1.5px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  font-size: 0.9rem;
  font-family: 'Inter', sans-serif;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  outline: none;
  transition: border-color 0.2s;
}

.email-form input::placeholder,
.signup-form input::placeholder { color: rgba(255,255,255,0.45); }

.email-form input:focus,
.signup-form input:focus { border-color: var(--orange); }

.email-form button,
.signup-form button {
  background: var(--orange);
  color: #fff;
  border: none;
  padding: 0.75rem 1.4rem;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  transition: background 0.15s, transform 0.1s;
  white-space: nowrap;
}

.email-form button:hover,
.signup-form button:hover {
  background: #e04a05;
  transform: translateY(-1px);
}

/* =====================
   MAIN CONTENT WRAPPER
   ===================== */
main, .page-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem 4rem;
}

/* =====================
   MATCHUP STRIP
   ===================== */
.matchup-strip {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow);
  margin: 2rem 0 1.5rem;
  padding: 1.5rem 2rem;
  overflow: hidden;
}

.matchup-strip .team-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  flex: 1;
}

.matchup-strip .team-block.home { align-items: flex-end; }
.matchup-strip .team-block.away { align-items: flex-start; }

.matchup-strip .team-logo {
  width: 68px;
  height: 68px;
  object-fit: contain;
}

.matchup-strip .team-name {
  font-weight: 800;
  font-size: 1rem;
  color: var(--navy);
}

.matchup-strip .team-record {
  font-size: 0.82rem;
  color: var(--text-muted);
  font-weight: 500;
}

.matchup-vs-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  padding: 0 2.5rem;
  border-left: 1px solid var(--border);
  border-right: 1px solid var(--border);
  margin: 0 1.5rem;
}

.matchup-vs-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #c0c8d8;
}

.matchup-vs-time {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--orange);
  white-space: nowrap;
}

.matchup-vs-venue {
  font-size: 0.78rem;
  color: var(--text-muted);
  text-align: center;
}

.game-date-label {
  font-size: 0.8rem;
  color: #9099b0;
  text-align: center;
  margin-top: 0.25rem;
}

/* legacy matchup-bar kept for any inline usage */
.matchup-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2.5rem;
  padding: 1.5rem;
  background: #fff;
  border-radius: 10px;
  border: 1px solid #e4e8f0;
  box-shadow: 0 1px 6px rgba(0,0,0,0.06);
  margin-bottom: 1.5rem;
}

.team-logo-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.team-logo {
  width: 72px;
  height: 72px;
  object-fit: contain;
}

.team-name {
  font-weight: 700;
  font-size: 0.9rem;
  color: #002d72;
  text-align: center;
}

.vs-block {
  font-size: 1.4rem;
  font-weight: 800;
  color: #cdd2de;
}

/* =====================
   CARDS
   ===================== */
.card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.card-header {
  background: var(--navy);
  color: #fff;
  font-weight: 700;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.7rem 1.1rem;
}

/* legacy section-card & table-container for advanced-stats / history */
.section-card,
.table-container,
.analysis-writeup {
  background: var(--card-bg);
  border-radius: 12px;
  box-shadow: var(--shadow);
  margin-bottom: 1.5rem;
  overflow: hidden;
  border: 1px solid var(--border);
}

.section-title,
.table-container h3,
.analysis-writeup h3:first-child {
  background: var(--navy);
  color: #fff;
  font-weight: 700;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.7rem 1.1rem;
}

/* =====================
   THREE-COLUMN GRID
   ===================== */
.three-col-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}

/* tile-grid kept for advanced-stats page */
.tile-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  margin-top: 1.25rem;
}

.tile-wide { grid-column: span 2; }
.tile-full { grid-column: 1 / -1; }

/* =====================
   MATCHUP OVERVIEW CARD
   ===================== */
.info-list {
  list-style: none;
  padding: 0.5rem 0;
}

.info-list li {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 1.1rem;
  border-bottom: 1px solid #f0f2f7;
  font-size: 0.875rem;
}

.info-list li:last-child { border-bottom: none; }

.info-list .info-icon {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f4f6fb;
  border-radius: 6px;
  flex-shrink: 0;
  color: var(--navy);
}

.info-list .info-label {
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  display: block;
  line-height: 1.2;
}

.info-list .info-value {
  font-weight: 700;
  color: var(--text-main);
  display: block;
  font-size: 0.9rem;
}

.info-list .info-value.highlight { color: var(--orange); }

/* =====================
   STARTING PITCHING CARD (3-column comparison grid)
   ===================== */
.pitching-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 0;
}

.pitching-col-left {
  text-align: right;
  padding: 0.5rem 1.5rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-main);
}

.pitching-col-mid {
  text-align: center;
  padding: 0.5rem 1rem;
  color: #9CA3AF;
  font-size: 0.8rem;
  font-weight: 500;
  border-left: 1px solid var(--border);
  border-right: 1px solid var(--border);
  white-space: nowrap;
}

.pitching-col-right {
  text-align: left;
  padding: 0.5rem 1.5rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-main);
}

/* Pitcher name row */
.pg-name {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--navy);
  line-height: 1.2;
}

.pg-label {
  font-size: 0.8rem;
  color: #9099b0;
  margin-top: 0.1rem;
  margin-bottom: 0.6rem;
  font-weight: 400;
}

/* Stat values */
.pg-val {
  font-weight: 700;
  color: var(--text-main);
}

/* Full-width divider row inside the grid */
.pitching-section-divider {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 1.5rem;
  background: #f7f8fb;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

/* =====================
   ADVANCED METRICS CARD
   ===================== */
.edge-callout {
  margin: 0.75rem 1.1rem;
  padding: 0.6rem 0.9rem;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 8px;
  font-size: 0.82rem;
  color: #15803d;
  font-weight: 600;
}

.edge-callout.neutral {
  background: #f8f9fa;
  border-color: var(--border);
  color: var(--text-muted);
}

/* =====================
   PLAYER HEADSHOTS
   ===================== */
.player-headshot {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  margin-right: 0.5rem;
  vertical-align: middle;
  background: #e4e8f0;
  flex-shrink: 0;
}

.player-name-cell {
  display: flex;
  align-items: center;
}

.pitcher-headshot {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  background: #e4e8f0;
  margin-bottom: 0.5rem;
  border: 2px solid var(--border);
}

.pitcher-header-block {
  display: flex;
  flex-direction: column;
  align-items: inherit; /* inherits left/right alignment from parent column */
}

.pitching-col-left .pitcher-header-block { align-items: flex-end; }
.pitching-col-right .pitcher-header-block { align-items: flex-start; }

/* Featured pitcher header (new pitching card layout) */
.pitcher-feature-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid #e4e8f0;
}

.pitcher-feature-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  text-align: center;
}

.pitcher-headshot-lg {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid #e4e8f0;
}

.pitcher-feature-name {
  font-size: 1.05rem;
  font-weight: 700;
  color: #0d2461;
}

.pitcher-feature-label {
  font-size: 0.8rem;
  color: #9099b0;
}

.pitcher-vs {
  font-size: 1.2rem;
  font-weight: 800;
  color: #cdd2de;
}

.pitching-table-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #9099b0;
  padding: 0.75rem 1rem 0.25rem;
  border-top: 1px solid #e4e8f0;
}

/* =====================
   PITCHER CARD GRID (two-column matchup layout)
   ===================== */
.pitcher-cards-grid {
  display: grid;
  grid-template-columns: 1fr 1px 1fr;
  gap: 0;
}

.pitcher-card {
  padding: 1.5rem;
  min-width: 0;
}

.pitcher-card-divider {
  background: #e4e8f0;
}

.pitcher-photo {
  width: 100%;
  max-width: 200px;
  height: auto;
  border-radius: 8px;
  object-fit: cover;
  margin-bottom: 0.75rem;
  display: block;
}

.pitcher-photo-placeholder {
  width: 200px;
  height: 160px;
  background: #0d2461;
  border-radius: 8px;
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,0.3);
  font-size: 2rem;
}

.matchup-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 0.75rem;
  font-size: 0.82rem;
}

.matchup-table caption {
  text-align: left;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #9099b0;
  margin-bottom: 0.4rem;
  caption-side: top;
  padding-bottom: 0.3rem;
}

.matchup-table th {
  font-size: 0.72rem;
  font-weight: 600;
  color: #9099b0;
  text-align: center;
  padding: 0.3rem 0.4rem;
  border-bottom: 1px solid #e4e8f0;
  white-space: nowrap;
}

.matchup-table td {
  text-align: center;
  padding: 0.35rem 0.4rem;
  color: #1a1a2e;
}

.xwoba-good    { background: #dcfce7; color: #15803d; font-weight: 700; }
.xwoba-neutral { background: #f3f4f6; color: #374151; }
.xwoba-bad     { background: #fee2e2; color: #dc2626; font-weight: 700; }

@media (max-width: 700px) {
  .pitcher-cards-grid {
    grid-template-columns: 1fr;
  }
  .pitcher-card-divider {
    display: none;
  }
}

/* =====================
   ROW 3 GRID (lineups + advanced metrics)
   ===================== */
.row-3-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 1.25rem;
  margin-top: 1.25rem;
  margin-bottom: 1.5rem;
  align-items: start;
}

/* keep .lineup-grid as alias */
.lineup-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 1.25rem;
  margin-bottom: 1.5rem;
  align-items: start;
}

.lineup-team-header {
  padding: 0.5rem 1.1rem 0.6rem;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border-bottom: 1px solid var(--border);
}

.lineup-team-header.mets-header { color: var(--orange); }
.lineup-team-header.opp-header  { color: var(--text-muted); }

/* =====================
   GAME ANALYSIS CARD
   ===================== */
.analysis-section {
  padding: 1rem 1.1rem 0.75rem;
  border-bottom: 1px solid #f0f2f7;
}

.analysis-section:last-child { border-bottom: none; }

.analysis-section-label {
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--orange);
  margin-bottom: 0.45rem;
}

.analysis-section p {
  font-size: 0.85rem;
  color: #374151;
  line-height: 1.65;
}

/* legacy analysis-writeup styles */
.analysis-writeup {
  padding-bottom: 1.1rem;
}

.analysis-writeup h4,
.analysis-body h3 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--navy);
  margin: 1.25rem 1.1rem 0.4rem;
}

.analysis-writeup p,
.analysis-body p {
  color: #3d4461;
  font-size: 0.9rem;
  line-height: 1.7;
  margin: 0 1.1rem 1rem;
}

/* =====================
   FULL-WIDTH CARDS (Bullpen / Trends)
   ===================== */
.full-card {
  margin-bottom: 1.5rem;
}

/* =====================
   PICK SECTION
   ===================== */
.lineup-pending,
.pitcher-tbd {
  padding: 1.5rem;
  text-align: center;
  color: #9099b0;
  font-size: 0.9rem;
}

.pick-pending {
  opacity: 0.7;
}

.pick-label {
  font-size: 0.85rem;
  color: #9099b0;
  margin-top: 0.5rem;
}

.pick-section {
  background: var(--card-bg);
  border: 2px dashed var(--orange);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  padding: 1.75rem 2rem;
  margin-bottom: 1.5rem;
}

.pick-left {
  flex: 1;
}

.pick-fire-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.6rem;
}

.pick-tag {
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--orange);
}

.pick-summary {
  font-size: 0.9rem;
  color: #374151;
  line-height: 1.65;
}

.pick-right {
  flex-shrink: 0;
}

.pick-badge {
  background: var(--navy);
  color: #fff;
  padding: 0.9rem 1.5rem;
  border-radius: 999px;
  font-size: 1.05rem;
  font-weight: 800;
  white-space: nowrap;
  text-align: center;
}

.pick-badge .pick-odds {
  color: var(--orange);
  margin-left: 0.2rem;
}

/* legacy pick-banner */
.pick-banner,
.official-pick {
  border-left: 4px solid var(--orange);
  background: #fff8f5;
  padding: 1rem 1.25rem;
  border-radius: 0 8px 8px 0;
  margin: 1rem 1.1rem 0;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--navy);
}

.pick-label {
  font-size: 1.05rem;
  font-weight: 700;
  color: #0d2461;
}

/* =====================
   TABLES
   ===================== */
.table-wrap { overflow-x: auto; }
.table-container { overflow-x: auto; }

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

thead th {
  color: var(--navy);
  font-weight: 600;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.65rem 1rem;
  border-bottom: 2px solid var(--border);
  background: #f7f8fb;
  text-align: left;
}

tbody tr {
  border-bottom: 1px solid #eef0f5;
  transition: background 0.12s;
}

tbody tr:last-child { border-bottom: none; }
tbody tr:hover { background: #f4f6fb; }

tbody td {
  padding: 0.65rem 1rem;
  color: #2c3352;
  font-size: 0.875rem;
}

tbody td:first-child { font-weight: 500; }

/* =====================
   BADGES
   ===================== */
.badge {
  display: inline-block;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.badge-win    { background: #dcfce7; color: #15803d; }
.badge-loss   { background: #fee2e2; color: #dc2626; }
.badge-spring { background: #e0f2fe; color: #0369a1; }

/* =====================
   PROFIT / LOSS
   ===================== */
.text-profit, .win-cell { color: #16a34a; font-weight: 600; }
.text-loss,   .loss-cell { color: #dc2626; font-weight: 600; }
.text-mets { color: var(--orange); font-weight: 600; }
.text-opp  { color: #5a6072; font-weight: 600; }

/* =====================
   STAT YEAR ANNOTATION
   ===================== */
.stat-year {
  color: #9099b0;
  font-size: 0.72rem;
  font-weight: 700;
  margin-left: 0.2rem;
  white-space: nowrap;
}

/* =====================
   PRESEASON BANNER
   ===================== */
.preseason-banner {
  background: linear-gradient(135deg, #fff8f5, #fff);
  border: 1px solid #ffd8c7;
  border-left: 4px solid var(--orange);
  color: #3d4461;
  padding: 0.9rem 1.1rem;
  border-radius: 8px;
  margin-bottom: 1.25rem;
  font-size: 0.9rem;
  line-height: 1.6;
}

/* =====================
   RECORD / TRACKER BAR
   ===================== */
.record-bar,
.tracker-bar {
  display: flex;
  align-items: center;
  gap: 2rem;
  padding: 0.85rem 1.1rem;
  background: #f7f8fb;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
  flex-wrap: wrap;
}

.record-bar strong,
.tracker-bar strong { color: var(--navy); }

.record-bar .disclaimer,
.tracker-bar span:last-child {
  margin-left: auto;
  color: #9099b0;
  font-size: 0.8rem;
}

/* =====================
   PAGE HEADER (History / Stats pages)
   ===================== */
.page-header {
  padding: 2rem 0 1.25rem;
}

.page-header h1,
.page-header h2 {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--navy);
}

.page-header p {
  color: #5a6072;
  font-size: 0.9rem;
  margin-top: 0.3rem;
}

/* =====================
   FILTER BAR
   ===================== */
.filter-bar {
  background: var(--card-bg);
  border-radius: 10px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  padding: 0.95rem 1.1rem;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.9rem;
  flex-wrap: wrap;
}

.filter-bar label {
  font-weight: 600;
  color: var(--navy);
}

.filter-bar select {
  padding: 0.55rem 0.8rem;
  border: 1px solid #cdd2de;
  border-radius: 6px;
  font-size: 0.9rem;
  background: #fff;
  font-family: 'Inter', sans-serif;
}

/* =====================
   GLOSSARY
   ===================== */
.glossary {
  background: var(--card-bg);
  border-radius: 10px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  padding: 1.5rem;
  margin-top: 2rem;
}

.glossary h3 {
  color: var(--navy);
  margin-bottom: 1rem;
}

.glossary dl {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 8px 15px;
}

.glossary dt {
  font-weight: 700;
  color: var(--orange);
}

.glossary dd {
  margin: 0;
  color: #444;
}

/* =====================
   OPPONENT CELL (History)
   ===================== */
.opponent-cell {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.history-team-logo {
  width: 28px;
  height: 28px;
  object-fit: contain;
  flex-shrink: 0;
}

/* =====================
   RECENT GAMES
   ===================== */
.recent-section {
  margin-top: 2.5rem;
}

.recent-section .section-title,
.recent-section .card-header {
  font-size: 0.78rem;
}

.recent-games {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1rem;
  padding: 1.1rem;
}

.game-tile {
  background: var(--card-bg);
  padding: 1rem;
  border-radius: 8px;
  box-shadow: var(--shadow);
  text-align: center;
  border-left: 4px solid var(--navy);
  border: 1px solid var(--border);
  border-left: 4px solid var(--navy);
}

.game-tile.win { border-left-color: var(--orange); }

.game-tile a {
  text-decoration: none;
  color: var(--navy);
  font-weight: bold;
}

/* =====================
   FOOTER
   ===================== */
footer {
  background: var(--navy);
  color: rgba(255, 255, 255, 0.7);
  text-align: center;
  padding: 2.5rem 1.5rem;
  margin-top: 3rem;
}

.footer-brand {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 0.15rem;
  font-size: 1.35rem;
  font-weight: 900;
  letter-spacing: -0.5px;
  margin-bottom: 0.75rem;
}

.footer-brand .brand-mets  { color: var(--orange); }
.footer-brand .brand-mono  { color: #fff; }

.footer-disclaimer {
  font-size: 0.82rem;
  margin-bottom: 0.3rem;
  color: rgba(255, 255, 255, 0.55);
}

.footer-copy {
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.35);
}

/* =====================
   MOBILE RESPONSIVE
   ===================== */
@media (max-width: 900px) {
  .three-col-grid       { grid-template-columns: repeat(2, 1fr); }
  .row-3-grid           { grid-template-columns: 1fr 1fr; }
  .row-3-grid .advanced-metrics { grid-column: span 2; }
  .lineup-grid          { grid-template-columns: 1fr 1fr; }
  .tile-grid            { grid-template-columns: repeat(2, 1fr); }
  .tile-wide            { grid-column: span 1; }
  .hero-headline        { font-size: 1.9rem; }
}

@media (max-width: 640px) {
  .three-col-grid       { grid-template-columns: 1fr; }
  .row-3-grid           { grid-template-columns: 1fr; }
  .row-3-grid .advanced-metrics { grid-column: span 1; }
  .lineup-grid          { grid-template-columns: 1fr; }
  .tile-grid            { grid-template-columns: 1fr; }
  .tile-wide, .tile-full{ grid-column: span 1; }
  .hero-headline        { font-size: 1.5rem; }
  .email-form,
  .signup-form          { flex-direction: column; }
  .pick-section         { flex-direction: column; }
  .pick-right           { width: 100%; }
  .pick-badge           { width: 100%; }
  .matchup-strip        { flex-direction: column; gap: 1rem; padding: 1.25rem; }
  .matchup-vs-block     { border-left: none; border-right: none; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); padding: 0.75rem 0; margin: 0; width: 100%; }
  .matchup-strip .team-block.home,
  .matchup-strip .team-block.away { align-items: center; }
  nav                   { padding: 0 1rem; }
  .pitching-grid        { grid-template-columns: 1fr; }
  .pitching-col-left    { text-align: left; }
  .pitching-col-mid     { border-left: none; border-right: none; border-top: 1px solid var(--border); text-align: left; padding-left: 1.5rem; }
  .pitching-section-divider { padding-left: 1.5rem; }
  .glossary dl          { grid-template-columns: 1fr; }
}

/* =====================
   PAGE WITH SIDEBAR (index.html)
   ===================== */
.page-with-sidebar {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 1.5rem;
  max-width: 1300px;
  margin: 0 auto;
  padding: 0 1.5rem;
  align-items: start;
}

.page-main-col { min-width: 0; }

.news-sidebar {
  min-width: 0;
  position: sticky;
  top: 5rem;
}

.news-sidebar .section-title {
  margin-bottom: 0.5rem;
}

@media (max-width: 900px) {
  .page-with-sidebar { grid-template-columns: 1fr; }
  .news-sidebar { position: static; }
}

/* =====================
   NEWS CARDS (news.html + sidebar)
   ===================== */
.news-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
  margin-top: 1rem;
}

@media (max-width: 700px) {
  .news-grid { grid-template-columns: 1fr; }
}

.news-card {
  background: var(--card-bg);
  border-radius: 10px;
  box-shadow: var(--shadow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.15s;
}

.news-card:hover { box-shadow: var(--shadow-md); }

.news-thumb {
  width: 100%;
  height: 160px;
  object-fit: cover;
  background: #e4e8f0;
  display: block;
}

.news-body {
  padding: 0.9rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  flex: 1;
}

.news-source {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--orange);
}

.news-title {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--navy);
  line-height: 1.45;
  text-decoration: none;
}

.news-title:hover { color: var(--orange); text-decoration: underline; }

.news-date {
  font-size: 0.75rem;
  color: #9099b0;
  margin-top: auto;
  padding-top: 0.4rem;
}

/* Compact sidebar / news-page small cards */
.news-card-sm {
  display: flex;
  gap: 0.75rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid #e4e8f0;
  text-decoration: none;
  color: inherit;
}

.news-card-sm:last-child { border-bottom: none; }

.news-card-sm img {
  width: 56px;
  height: 56px;
  object-fit: cover;
  border-radius: 6px;
  flex-shrink: 0;
  background: #e4e8f0;
}

.news-card-sm-title {
  font-size: 0.82rem;
  font-weight: 500;
  color: #1a1a2e;
  line-height: 1.4;
}

.news-card-sm-meta {
  font-size: 0.75rem;
  color: #9099b0;
  margin-top: 0.25rem;
}

/* News page toolbar */
.news-toolbar {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.news-refresh-btn {
  background: var(--navy);
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 0.45rem 1rem;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}

.news-refresh-btn:hover { background: var(--orange); }
.news-refresh-btn:disabled { opacity: 0.6; cursor: not-allowed; }

.news-last-updated {
  font-size: 0.82rem;
  color: #9099b0;
}

.news-spinner {
  display: none;
  width: 18px;
  height: 18px;
  border: 2px solid #e4e8f0;
  border-top-color: var(--navy);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

.news-spinner.active { display: inline-block; }

@keyframes spin { to { transform: rotate(360deg); } }

.news-filter-tabs {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.news-tab {
  padding: 0.3rem 0.8rem;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: var(--card-bg);
  font-size: 0.8rem;
  font-weight: 600;
  color: #6b7280;
  cursor: pointer;
  transition: all 0.15s;
}

.news-tab.active, .news-tab:hover {
  background: var(--navy);
  color: #fff;
  border-color: var(--navy);
}

.news-empty {
  grid-column: 1 / -1;
  text-align: center;
  color: #9099b0;
  padding: 3rem 0;
  font-size: 0.9rem;
}
