/* ============================================================
   FILE VERSION: pga-mlb-theme-v1
   Weather's Edge — PGA and MLB tabs, same look as the NFL tab.
   Save in the SAME root folder as app.html. Everything here is
   scoped to #pga and #mlb, so the NFL tab is untouched.
   To roll back the look, remove the one <link> line in app.html.
   ============================================================ */

#pga, #mlb {
  /* Same tokens as nfl-theme-v1.css */
  --we-ground: #F3F5F4;
  --we-card: #FFFFFF;
  --we-strip: #F7F9F8;
  --we-ink: #0F1B1D;
  --we-ink2: #4A5B5E;
  --we-ink3: #6B7B7D;
  --we-line: #DCE3E2;
  --we-line2: #EDF1F0;
  --we-brand: #0B5C61;
  --we-brand-soft: #E3EFEE;
  --we-warn-ink: #8A3B07;
  --we-warn-bg: #FCEBDC;
  --we-watch-ink: #6B4A00;
  --we-watch-bg: #FBF1D3;
  --we-mono: 'IBM Plex Mono', ui-monospace, monospace;
  --we-display: 'Archivo', system-ui, sans-serif;
  --we-sans: 'IBM Plex Sans', system-ui, sans-serif;

  /* Re-point the site's older color variables inside these tabs, so the
     existing green/red/amber stat colors pick up the new palette too. */
  --text: #0F1B1D;
  --muted: #4A5B5E;
  --border: #DCE3E2;
  --surface: #FFFFFF;
  --primary: #0B5C61;
  --primary-light: #E3EFEE;
  --brand: #0B5C61;
  --good: #1B6B3A;
  --goodbg: #DDF0E3;
  --bad: #A3312A;
  --badbg: #F8E1DE;
  --warn: #8A5A00;
  --warnbg: #FBF1D3;

  font-family: var(--we-sans);
  color: var(--we-ink);
  background: var(--we-ground);
  border: 1px solid var(--we-line);
  border-radius: 16px;
  box-shadow: 0 1px 2px rgba(15, 27, 29, .06);
}
#pga td, #mlb td { font-variant-numeric: tabular-nums; }

/* ── Tab header + "this week / today" heading ───────────── */
#pga .panel-header, #mlb .panel-header { padding: 22px 28px 0; border-bottom: 0; }
#pga .panel-icon, #mlb .panel-icon { display: none; }
#pga .panel-header .eyebrow, #mlb .panel-header .eyebrow {
  font: 600 12px/1.3 var(--we-sans);
  letter-spacing: .08em;
  color: var(--we-ink2);
}
#pga .panel-header h2, #mlb .panel-header h2 {
  margin: 2px 0 0;
  font: 700 17px/1.3 var(--we-sans);
  color: var(--we-ink2);
}
#pga .panel-logo-img, #mlb .panel-logo-img { width: 44px; height: 44px; border-radius: 10px; box-shadow: none; border-color: var(--we-line); }

#pga .best-bet, #mlb .best-bet {
  margin: 8px 28px 0;
  padding: 0 0 20px;
  background: none !important;
  color: var(--we-ink);
  border-radius: 0;
  border-bottom: 1px solid var(--we-line);
}
#pga .best-bet-icon, #mlb .best-bet-icon { display: none; }
#pga .best-bet-label, #mlb .best-bet-label {
  font: 600 12px/1.3 var(--we-sans);
  letter-spacing: .08em;
  color: var(--we-ink2);
  opacity: 1;
}
#pga .best-bet-text, #mlb .best-bet-text {
  font: 800 34px/1.1 var(--we-display);
  letter-spacing: -.025em;
  margin-top: 4px;
}
#pga .best-bet-sub, #mlb .best-bet-sub { font-size: 15px; color: var(--we-ink2); opacity: 1; margin-top: 6px; }

#pga .loading-box, #pga .error-box, #mlb .loading-box, #mlb .error-box { margin: 20px 28px; }
#pga .last-updated, #mlb .last-updated { padding: 12px 28px 16px; font-size: 13px; color: var(--we-ink2); border-top: 0; }

/* Section headings (same treatment as the NFL tab) */
#pga .section-divider, #mlb .section-divider { padding: 36px 28px 12px; }
#pga .section-divider-label, #mlb .section-divider-label {
  font: 700 19px/1.25 var(--we-display);
  letter-spacing: -.01em;
  text-transform: none;
  color: var(--we-ink);
}
#pga .section-divider-line, #mlb .section-divider-line { background: var(--we-line); }

#pga .we-section-head, #mlb .we-section-head { margin: 32px 28px 0; }
#pga .we-section-title, #mlb .we-section-title {
  margin: 0;
  font: 800 26px/1.15 var(--we-display);
  letter-spacing: -.02em;
  color: var(--we-ink);
}
#pga .we-section-sub, #mlb .we-section-sub { margin: 6px 0 0; font-size: 15px; line-height: 1.5; color: var(--we-ink2); max-width: 760px; }

/* ── Shared cards and tables ────────────────────────────── */
#pga .mini-card,
#pga .pga-custom-rank-card,
#pga .next-event-card,
#mlb .mlb-top-matchups-wrap {
  background: var(--we-card);
  border: 1px solid var(--we-line);
  border-radius: 14px;
  box-shadow: none;
  backdrop-filter: none;
  transform: none;
}
#pga .mini-card:hover, #pga .next-event-card:hover { box-shadow: none; border-color: var(--we-line); transform: none; }
#pga .mini-title, #pga .ne-section-title {
  font: 600 12px/1.3 var(--we-sans);
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--we-ink2);
}
#pga .mini-big { font: 700 20px/1.25 var(--we-display); letter-spacing: -.01em; color: var(--we-ink); }
#pga .mini-sub { font-size: 14px; line-height: 1.5; color: var(--we-ink2); }

#pga .table-wrap table, #mlb .table-wrap table { font-size: 14px; }
#pga th, #mlb th {
  font: 600 12px/1.3 var(--we-sans);
  letter-spacing: .06em;
  color: var(--we-ink2);
  background: var(--we-strip);
  border-bottom: 1px solid var(--we-line);
  padding: 12px 14px;
}
#pga td { padding: 11px 14px; border-bottom: 1px solid var(--we-line2); font-size: 14px; line-height: 1.45; vertical-align: middle; }
#pga tbody tr:hover td { background: #FAFBFB; }
#pga td strong { font-weight: 600; }
#pga .sortable-th, #mlb .mlb-sortable-th { cursor: pointer; }
#pga .sortable-th:hover { color: var(--we-ink); }
#pga .sortable-th.sort-active { color: var(--we-brand); }

/* Tables that sit directly in the tab become cards */
#pga > .table-wrap {
  margin: 0 28px;
  background: var(--we-card);
  border: 1px solid var(--we-line);
  border-radius: 14px;
  padding: 0;
  overflow-x: auto;
}
#pga > .table-wrap th:first-child, #pga > .table-wrap td:first-child { padding-left: 20px; }
/* Tables inside a card bleed to the card's edges */
#pga .mini-card .table-wrap { margin: 0 -18px -16px; border-top: 1px solid var(--we-line); padding: 0; overflow-x: auto; }
#pga .mini-card .table-wrap th:first-child, #pga .mini-card .table-wrap td:first-child { padding-left: 18px; }

/* "Show all" control added by pga-mlb-polish-v1.js */
#pga .we-more-hidden { display: none; }
#pga .we-more-row { display: flex; justify-content: center; padding: 10px; border-top: 1px solid var(--we-line2); background: var(--we-card); }
#pga .we-more-btn, #mlb .we-more-btn {
  font: 600 14px/1 var(--we-sans);
  color: var(--we-brand);
  background: none;
  border: 1px solid var(--we-line);
  border-radius: 999px;
  min-height: 44px;
  padding: 0 18px;
  cursor: pointer;
}
#pga .we-more-btn:hover { background: var(--we-brand-soft); border-color: #B9D6D3; }

/* ── PGA: jump-to-section bar ───────────────────────────── */
#pga .pga-jumpnav {
  margin: 16px 0 0;
  padding: 10px 28px;
  gap: 8px;
  background: rgba(243, 245, 244, .94);
  backdrop-filter: blur(6px);
  border-top: 1px solid var(--we-line);
  border-bottom: 1px solid var(--we-line);
}
#pga .pga-jumpnav-btn,
#pga a.pga-jumpnav-btn,
#pga a.pga-jumpnav-btn:visited {
  font: 500 14px/1 var(--we-sans);
  color: var(--we-ink);
  background: var(--we-card);
  border: 1px solid #C9D3D2;
  border-radius: 999px;
  min-height: 40px;
  padding: 0 14px;
  box-shadow: none;
  text-transform: none;
  letter-spacing: 0;
}
#pga a.pga-jumpnav-btn:hover { border-color: var(--we-ink); background: var(--we-card); color: var(--we-ink); }

/* ── PGA: this week's overview ──────────────────────────── */
#pga #pga-info-bar { margin: 16px 28px 0; background: var(--we-card); border: 1px solid var(--we-line); border-radius: 10px; font-size: 14px; color: var(--we-ink2); }
#pga #pga-overview { padding: 24px 28px 0; }
#pga .section-grid { gap: 16px; }
#pga #pga-overview > div[style*="height:14px"] { height: 16px !important; }
#pga .fit-list { padding-left: 18px; }
#pga .fit-list li { font-size: 15px; line-height: 1.45; margin: 6px 0; }
#pga .avoid-note {
  background: var(--we-watch-bg);
  color: var(--we-watch-ink);
  border-radius: 8px;
  font-size: 14px;
  padding: 8px 12px;
}
#pga .champ-banner { padding: 16px 18px; }
#pga .champ-inline { gap: 6px 28px; margin-top: 4px; }
#pga .winner-row { border-bottom-color: var(--we-line2); font-size: 15px; }
#pga .winner-year { font: 500 13px/1.4 var(--we-mono); color: var(--we-ink3); }
#pga .winner-name { font-weight: 600; }

/* Tournament weather: re-skin the hourly blocks */
#pga #pga-weather-days, #pga #pga-weather-days * { font-family: var(--we-sans) !important; }
#pga .wx-day-label {
  background: none;
  border-left: 0;
  padding: 0 0 8px;
  font: 700 15px/1.3 var(--we-sans);
  letter-spacing: 0;
  text-transform: none;
  color: var(--we-ink);
}
#pga #pga-weather-days div[style*="border:1px solid #dedad2"] { border-color: var(--we-line) !important; border-radius: 10px !important; }
#pga #pga-weather-days div[style*="background:#f2f0eb"] { background: var(--we-strip) !important; border-color: var(--we-line) !important; }

/* Tee times card */
#pga #pga-teetimes-card { margin: 0 28px; }
#pga #pga-teetimes-card .nfl-expand-btn {
  font: 600 14px/1 var(--we-sans);
  color: var(--we-brand);
  text-transform: none;
  letter-spacing: 0;
  min-height: 44px;
  padding: 0 16px;
  border-color: var(--we-line);
}

/* Blend score, archetypes, build-your-own cards */
#pga #pga-blend-card, #pga #pga-archetype-card { margin: 0 28px; padding: 18px; }
#pga .pga-blend-preset-btn,
#pga #pga-archetype-filters button {
  font: 600 14px/1 var(--we-sans) !important;
  min-height: 40px;
  padding: 0 16px !important;
  border-radius: 999px !important;
  border: 1px solid #C9D3D2 !important;
  background: var(--we-card) !important;
  color: var(--we-ink) !important;
  box-shadow: none !important;
  cursor: pointer;
}
#pga .pga-blend-preset-btn[style*="background:#01696f"],
#pga .pga-blend-preset-btn[style*="background: rgb(1, 105, 111)"],
#pga .pga-blend-preset-btn.we-on {
  background: var(--we-ink) !important;
  border-color: var(--we-ink) !important;
  color: #FFFFFF !important;
}
#pga #pga-blend-card span[style*="font-weight:700"] { color: var(--we-ink2) !important; font-size: 13px !important; }
#pga #pga-blend-weight-label { color: var(--we-brand) !important; font-family: var(--we-mono) !important; font-size: 14px !important; }
#pga input[type="range"] { accent-color: var(--we-brand); }

#pga .pga-custom-rank-card { margin: 0 28px; padding: 20px; }
#pga .pga-custom-rank-title { font: 700 18px/1.3 var(--we-display); color: var(--we-ink); }
#pga .pga-custom-rank-sub { font-size: 14px; line-height: 1.5; color: var(--we-ink2); }
#pga .pga-slider-label { font-size: 14px; font-weight: 500; }
#pga .pga-slider-number {
  font: 500 14px/1 var(--we-mono);
  border: 1px solid var(--we-line);
  border-radius: 8px;
  min-height: 36px;
  text-align: center;
}
#pga .pga-custom-rank-total-row { border-top-color: var(--we-line); }
#pga #pga-custom-rank-total-label { font: 600 14px/1 var(--we-mono); }
#pga .pga-custom-rank-reset-btn, #pga .pga-custom-rank-apply-btn {
  font: 600 14px/1 var(--we-sans);
  min-height: 44px;
  padding: 0 18px;
  border-radius: 999px;
  box-shadow: none;
}
#pga .pga-custom-rank-reset-btn { background: var(--we-card); color: var(--we-ink); border: 1px solid #C9D3D2; }
#pga .pga-custom-rank-apply-btn { background: var(--we-brand); border-color: var(--we-brand); color: #FFFFFF; }
#pga .pga-custom-rank-apply-btn:hover { background: #084649; }
#pga .pga-custom-rank-item { border-color: var(--we-line2); border-radius: 10px; }
#pga .pga-custom-rank-pos { font: 600 14px/1 var(--we-mono); color: var(--we-ink3); }
#pga .pga-custom-rank-score { font: 600 14px/1 var(--we-mono); color: var(--we-brand); }

/* Upcoming events */
#pga .next-event-wrap { padding: 0 28px 8px; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: 16px; }
#pga .next-event-card { margin: 0; overflow: hidden; }
#pga .next-event-header { background: var(--we-strip); border-bottom-color: var(--we-line2); }
#pga .next-event-title { font: 700 19px/1.25 var(--we-display); color: var(--we-ink); }
#pga .next-event-sub { font-size: 14px; color: var(--we-ink2); }
#pga .next-event-date {
  font: 600 12px/1 var(--we-sans);
  letter-spacing: .06em;
  background: var(--we-brand-soft);
  color: var(--we-brand);
  padding: 5px 10px;
}
#pga .next-event-body { background: var(--we-card); }
#pga .next-event-body .mini-card { border-color: var(--we-line2); background: var(--we-strip); }

/* ── MLB: section heading, sort bar, bullpen key ────────── */
#mlb #mlb-bullpen-legend {
  margin: 12px 28px 0 !important;
  font-size: 13px !important;
  line-height: 1.6;
  color: var(--we-ink2);
}
#mlb .mlb-bullpen-tag {
  font: 600 12px/1.3 var(--we-sans);
  padding: 2px 8px;
  margin-left: 0;
  border-radius: 999px;
}
#mlb .mlb-bullpen-normal { background: #E9EEED; color: var(--we-ink2); }

/* The old column headers become a "Sort games by" bar */
#mlb #mlb-table-wrap { padding: 16px 28px 8px; overflow: visible; }
#mlb #mlb-table-wrap table { display: block; min-width: 0; width: 100%; }
#mlb #mlb-thead { display: block; margin-bottom: 16px; }
#mlb #mlb-thead tr { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
#mlb #mlb-thead tr::before { content: "Sort games by"; font-size: 14px; color: var(--we-ink2); margin-right: 4px; }
#mlb #mlb-thead th { display: none; }
#mlb #mlb-thead th.mlb-sortable-th {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font: 500 14px/1 var(--we-sans);
  letter-spacing: 0;
  text-transform: none;
  color: var(--we-ink);
  background: var(--we-card);
  border: 1px solid #C9D3D2;
  border-radius: 999px;
  min-height: 44px;
  padding: 0 16px;
  white-space: nowrap;
}
#mlb #mlb-thead th.mlb-sortable-th:hover { border-color: var(--we-ink); }
#mlb #mlb-thead th.mlb-sortable-th.sort-active { background: var(--we-ink); border-color: var(--we-ink); color: #FFFFFF; font-weight: 600; }

/* ── MLB: each game becomes a card ──────────────────────── */
#mlb #mlb-tbody { display: flex; flex-direction: column; gap: 16px; }
#mlb #mlb-tbody > tr:not([class]) {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  background: var(--we-card);
  border: 1px solid var(--we-line);
  border-radius: 14px;
  overflow: hidden;
}
#mlb #mlb-tbody > tr:not([class]) > td {
  border: 0;
  padding: 16px 20px;
  font-size: 14px;
  line-height: 1.5;
  vertical-align: top;
  min-width: 0;
}
/* Block labels */
#mlb #mlb-tbody > tr:not([class]) > td:nth-child(5)::before,
#mlb #mlb-tbody > tr:not([class]) > td:nth-child(6)::before,
#mlb #mlb-tbody > tr:not([class]) > td:nth-child(7)::before,
#mlb #mlb-tbody > tr:not([class]) > td:nth-child(8)::before,
#mlb #mlb-tbody > tr:not([class]) > td:nth-child(9)::before,
#mlb #mlb-tbody > tr:not([class]) > td:nth-child(11)::before {
  display: block;
  margin-bottom: 8px;
  font: 600 12px/1.3 var(--we-sans);
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--we-ink2);
}
#mlb #mlb-tbody > tr:not([class]) > td:nth-child(5)::before { content: "Starting pitchers"; }
#mlb #mlb-tbody > tr:not([class]) > td:nth-child(6)::before { content: "Last 3 starts"; }
#mlb #mlb-tbody > tr:not([class]) > td:nth-child(7)::before { content: "Batter's edge"; }
#mlb #mlb-tbody > tr:not([class]) > td:nth-child(8)::before { content: "Wind"; }
#mlb #mlb-tbody > tr:not([class]) > td:nth-child(9)::before { content: "Vegas total"; }
#mlb #mlb-tbody > tr:not([class]) > td:nth-child(11)::before { content: "Edge read"; }

/* Top strip: time · ballpark · weather · status */
#mlb #mlb-tbody > tr:not([class]) > td:nth-child(2),
#mlb #mlb-tbody > tr:not([class]) > td:nth-child(3),
#mlb #mlb-tbody > tr:not([class]) > td:nth-child(4),
#mlb #mlb-tbody > tr:not([class]) > td:nth-child(10) {
  grid-row: 1;
  background: var(--we-strip);
  border-bottom: 1px solid var(--we-line2);
  padding: 12px 20px;
  font-size: 14px;
  color: var(--we-ink2);
  align-self: stretch;
}
#mlb #mlb-tbody > tr:not([class]) > td:nth-child(2) { grid-column: 1 / 3; color: var(--we-ink); padding-right: 8px; }
#mlb #mlb-tbody > tr:not([class]) > td:nth-child(2) strong { font-weight: 600; }
#mlb #mlb-tbody > tr:not([class]) > td:nth-child(3) { grid-column: 3 / 7; padding-left: 0; padding-right: 8px; }
#mlb #mlb-tbody > tr:not([class]) > td:nth-child(3) strong { font-weight: 500; color: var(--we-ink2); }
#mlb #mlb-tbody > tr:not([class]) > td:nth-child(3) br { display: none; }
#mlb #mlb-tbody > tr:not([class]) > td:nth-child(3) .muted::before { content: ", "; }
#mlb #mlb-tbody > tr:not([class]) > td:nth-child(4) { grid-column: 7 / 11; padding-left: 0; padding-right: 8px; }
#mlb #mlb-tbody > tr:not([class]) > td:nth-child(4) .weather-main,
#mlb #mlb-tbody > tr:not([class]) > td:nth-child(4) .weather-sub { display: inline; font: 400 14px/1.5 var(--we-sans); color: var(--we-ink2); }
#mlb #mlb-tbody > tr:not([class]) > td:nth-child(4) .weather-sub::before { content: " \00B7  "; }
#mlb #mlb-tbody > tr:not([class]) > td:nth-child(10) { grid-column: 11 / 13; text-align: right; padding-left: 0; }

/* Main row: matchup · pitchers · last 3 · batter's edge */
#mlb #mlb-tbody > tr:not([class]) > td:nth-child(1) { grid-row: 2; grid-column: 1 / 4; }
#mlb #mlb-tbody > tr:not([class]) > td:nth-child(5) { grid-row: 2; grid-column: 4 / 7; border-left: 1px solid var(--we-line2); }
#mlb #mlb-tbody > tr:not([class]) > td:nth-child(6) { grid-row: 2; grid-column: 7 / 10; border-left: 1px solid var(--we-line2); }
#mlb #mlb-tbody > tr:not([class]) > td:nth-child(7) { grid-row: 2; grid-column: 10 / 13; border-left: 1px solid var(--we-line2); }

/* Bottom row: total · wind · edge read */
#mlb #mlb-tbody > tr:not([class]) > td:nth-child(9),
#mlb #mlb-tbody > tr:not([class]) > td:nth-child(8),
#mlb #mlb-tbody > tr:not([class]) > td:nth-child(11) { grid-row: 3; border-top: 1px solid var(--we-line2); }
#mlb #mlb-tbody > tr:not([class]) > td:nth-child(9) { grid-column: 1 / 4; }
#mlb #mlb-tbody > tr:not([class]) > td:nth-child(8) { grid-column: 4 / 7; border-left: 1px solid var(--we-line2); }
#mlb #mlb-tbody > tr:not([class]) > td:nth-child(11) { grid-column: 7 / 13; border-left: 1px solid var(--we-line2); }

/* Matchup block */
#mlb .mlb-team-block .team-a, #mlb .mlb-team-block .team-b {
  font: 700 19px/1.25 var(--we-display);
  letter-spacing: -.01em;
  color: var(--we-ink);
}
/* "@" shown as "AT", matching the NFL cards */
#mlb .mlb-team-block .vs { font-size: 0; line-height: 1; margin-bottom: 6px; }
#mlb .mlb-team-block .vs::after { content: "AT"; font: 600 11px/1 var(--we-sans); letter-spacing: .1em; color: var(--we-ink3); }
#mlb .mlb-team-block + .mlb-team-block { border-top: 0; margin-top: 10px; padding-top: 0; }
#mlb .mlb-rec-line { font: 500 13px/1.4 var(--we-mono); color: var(--we-ink2); margin-top: 2px; }

/* Pitchers + last 3 */
#mlb .pitcher-name { font: 600 15px/1.35 var(--we-sans); color: var(--we-ink); }
#mlb .pitcher-record { font-size: 13px; color: var(--we-ink2); font-variant-numeric: tabular-nums; }
#mlb .pitcher-hand { font: 600 11px/1 var(--we-sans); padding: 3px 7px; margin-left: 6px; vertical-align: 2px; }
#mlb .hand-r { background: #E9EEED; color: var(--we-ink2); }
#mlb .hand-l { background: #E2ECF6; color: #24507F; }
#mlb #mlb-tbody > tr:not([class]) > td:nth-child(5) > div > strong { font: 600 11px/1 var(--we-sans); letter-spacing: .08em; text-transform: uppercase; color: var(--we-ink3); }
#mlb .starts-row { font-size: 13px; line-height: 1.7; font-variant-numeric: tabular-nums; }
#mlb #mlb-tbody > tr:not([class]) > td:nth-child(6) > div > .muted:first-child { font-weight: 600; color: var(--we-ink3) !important; }

/* Total + status */
#mlb #mlb-tbody .total { font: 600 21px/1.3 var(--we-mono); color: var(--we-ink); }
#mlb .mlb-edge-badge {
  font: 600 13px/1.3 var(--we-sans);
  letter-spacing: 0;
  text-transform: none;
  padding: 3px 10px;
  margin: 0;
  border-radius: 999px;
}
#mlb .mlb-edge-neutral { background: #E9EEED; color: var(--we-ink2); }
#mlb .mlb-edge-lean-under { background: var(--we-watch-bg); color: var(--we-watch-ink); }
#mlb .mlb-edge-strong-under { background: var(--we-warn-bg); color: var(--we-warn-ink); }
#mlb .mlb-edge-lean-over, #mlb .mlb-edge-strong-over { background: var(--we-brand-soft); color: var(--we-brand); }
#mlb .mlb-edge-detail { font-size: 14px; line-height: 1.6; color: var(--we-ink); }
#mlb .mlb-edge-detail strong { color: var(--we-ink); font-weight: 600; }

/* ── MLB: Top 5 matchup boards ──────────────────────────── */
#mlb .mlb-top-matchups-wrap { margin: 32px 28px 8px; padding: 20px; }
#mlb .mlb-top-matchups-icon { display: none; }
#mlb .mlb-top-matchups-title { font: 800 26px/1.15 var(--we-display); letter-spacing: -.02em; color: var(--we-ink); }
#mlb .mlb-top-matchups-sub { font-size: 15px; line-height: 1.5; color: var(--we-ink2); }
#mlb .mlb-top-matchups-panel { background: var(--we-card); border: 1px solid var(--we-line); border-radius: 12px; box-shadow: none; }
#mlb .mlb-top-matchups-panel-head h3 { font: 700 18px/1.3 var(--we-display); color: var(--we-ink); }
#mlb .mlb-top-matchups-label { font: 600 12px/1.3 var(--we-sans); letter-spacing: .08em; color: var(--we-ink2); }
#mlb .mlb-top-matchups-weight { font-size: 13px; color: var(--we-ink2); }
#mlb .mlb-top-matchup-row { border-bottom-color: var(--we-line2); }
#mlb .mlb-top-matchup-rank { font: 600 15px/1 var(--we-mono); color: var(--we-ink3); background: none; box-shadow: none; }
#mlb .mlb-top-matchup-name { font: 600 15px/1.35 var(--we-sans); color: var(--we-ink); }
#mlb .mlb-top-matchup-meta { font-size: 13px; color: var(--we-ink2); }
#mlb .mlb-top-matchup-score { font: 600 15px/1 var(--we-mono); background: var(--we-brand); color: #FFFFFF; box-shadow: none; }
#mlb .mlb-top-matchups-note { font-size: 13px; color: var(--we-ink2); }

/* ── Phones ─────────────────────────────────────────────── */
@media (max-width: 760px) {
  #pga .panel-header, #pga .best-bet, #mlb .panel-header, #mlb .best-bet { margin-left: 16px; margin-right: 16px; padding-left: 0; padding-right: 0; }
  #pga .best-bet-text, #mlb .best-bet-text { font-size: 28px; }
  #pga .section-divider, #mlb .section-divider { padding: 28px 16px 10px; }
  #pga .we-section-head, #mlb .we-section-head { margin: 28px 16px 0; }
  #pga .we-section-title, #mlb .we-section-title { font-size: 22px; }

  #pga .pga-jumpnav { padding: 10px 16px; flex-wrap: nowrap; overflow-x: auto; }
  #pga .pga-jumpnav-btn { flex: 0 0 auto; }
  #pga #pga-overview { padding: 20px 16px 0; }
  #pga .section-grid { grid-template-columns: 1fr; }
  #pga .wx-two-col { grid-template-columns: 1fr; grid-auto-flow: row; grid-template-rows: none; }
  #pga #pga-weather-days > div { overflow-x: auto; }
  #pga > .table-wrap, #pga #pga-teetimes-card, #pga #pga-blend-card, #pga #pga-archetype-card, #pga .pga-custom-rank-card { margin-left: 16px; margin-right: 16px; }
  #pga .pga-slider-row { grid-template-columns: 1fr 64px 14px; }
  #pga .pga-slider-row .pga-slider-label { grid-column: 1 / -1; }
  #pga .next-event-wrap { padding: 0 16px 8px; }

  #mlb #mlb-bullpen-legend { margin: 12px 16px 0 !important; }
  #mlb #mlb-table-wrap { padding: 16px 16px 8px; }
  #mlb #mlb-thead tr { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; }
  #mlb #mlb-thead tr::before { flex: 0 0 auto; }
  #mlb #mlb-thead th.mlb-sortable-th { flex: 0 0 auto; }
  #mlb #mlb-tbody > tr:not([class]) > td { padding: 14px 16px; }
  #mlb #mlb-tbody > tr:not([class]) > td:nth-child(2) { grid-row: 1; grid-column: 1 / 7; padding: 12px 16px 4px; border-bottom: 0; }
  #mlb #mlb-tbody > tr:not([class]) > td:nth-child(10) { grid-row: 1; grid-column: 7 / 13; padding: 12px 16px 4px; border-bottom: 0; }
  #mlb #mlb-tbody > tr:not([class]) > td:nth-child(3) { grid-row: 2; grid-column: 1 / -1; padding: 0 16px 2px; border-bottom: 0; }
  #mlb #mlb-tbody > tr:not([class]) > td:nth-child(4) { grid-row: 3; grid-column: 1 / -1; padding: 0 16px 12px; }
  #mlb #mlb-tbody > tr:not([class]) > td:nth-child(1) { grid-row: 4; grid-column: 1 / -1; }
  #mlb #mlb-tbody > tr:not([class]) > td:nth-child(9) { grid-row: 5; grid-column: 1 / 7; }
  #mlb #mlb-tbody > tr:not([class]) > td:nth-child(8) { grid-row: 5; grid-column: 7 / 13; }
  #mlb #mlb-tbody > tr:not([class]) > td:nth-child(5) { grid-row: 6; grid-column: 1 / -1; border-left: 0; border-top: 1px solid var(--we-line2); }
  #mlb #mlb-tbody > tr:not([class]) > td:nth-child(6) { grid-row: 7; grid-column: 1 / -1; border-left: 0; border-top: 1px solid var(--we-line2); }
  #mlb #mlb-tbody > tr:not([class]) > td:nth-child(7) { grid-row: 8; grid-column: 1 / -1; border-left: 0; border-top: 1px solid var(--we-line2); }
  #mlb #mlb-tbody > tr:not([class]) > td:nth-child(11) { grid-row: 9; grid-column: 1 / -1; border-left: 0; }
  #mlb .mlb-top-matchups-wrap { margin: 28px 16px 8px; padding: 16px; }
  #mlb .mlb-top-matchups-title { font-size: 22px; }
}

/* Inline-styled pieces from the page's own renderers */
#pga #pga-weather-days div[style*="border-left:4px solid #01696f"] {
  background: none !important;
  border-left: 0 !important;
  padding: 0 0 8px !important;
  font: 700 15px/1.3 var(--we-sans) !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
  color: var(--we-ink) !important;
}
#pga #pga-weather-days div[style*="color:#01494e"] { color: var(--we-ink) !important; }
#pga a.pga-jumpnav-btn, #pga a.pga-jumpnav-btn:visited { color: var(--we-ink) !important; font-weight: 500; }
#pga #pga-upcoming-wrap[style*="block"] { display: grid !important; }
/* Long section titles wrap instead of running off a phone screen */
#pga .section-divider-label, #mlb .section-divider-label { white-space: normal; text-align: center; min-width: 0; }
/* Tables need less sideways scrolling than the site default */
#pga .table-wrap table { min-width: 640px; }
#pga #pga-teetimes-wrap table { min-width: 0; }
@media (max-width: 760px) {
  #pga .section-divider-line, #mlb .section-divider-line { flex: 0 0 16px; }
}
#pga td strong { white-space: nowrap; }
@media (max-width: 760px) {
  #pga th { white-space: normal; }
  #pga #pga-teetimes-wrap td { padding-left: 10px; padding-right: 10px; }
}

/* ── MLB Top 5 boards: details (added after seeing them with data) ── */
#mlb .mlb-top-matchups-header { display: block; margin-bottom: 18px; }
#mlb .mlb-top-matchups-refresh { margin-top: 6px; font: 500 13px/1.4 var(--we-sans); color: var(--we-ink2); }
#mlb .mlb-top-matchups-grid { gap: 16px; }
#mlb .mlb-top-matchups-panel-head { background: var(--we-strip); border-bottom-color: var(--we-line2); padding: 14px 16px; }
#mlb .mlb-top-matchup-row { padding: 12px 16px; gap: 12px; }
#mlb .mlb-top-matchup-tag {
  background: #EEF2F1;
  color: var(--we-ink2);
  font: 500 12px/1.3 var(--we-sans);
  padding: 2px 8px;
}
#mlb .mlb-top-matchup-score {
  flex: 0 0 auto;
  min-width: 44px;
  padding: 7px 8px;
  border-radius: 8px;
  font: 600 16px/1 var(--we-mono);
  text-align: center;
}
#mlb .mlb-status-tag { font: 600 11px/1.3 var(--we-sans); letter-spacing: .04em; padding: 2px 7px; margin-left: 6px; }
#mlb .mlb-status-confirmed { background: var(--we-brand-soft); color: var(--we-brand); }
#mlb .mlb-status-probable { background: var(--we-watch-bg); color: var(--we-watch-ink); }
#mlb .mlb-status-pending { background: #E9EEED; color: var(--we-ink2); }
#mlb .mlb-top-matchups-note { margin-top: 14px; line-height: 1.55; }
#mlb .mlb-top-matchups-lock-reminder {
  margin-top: 10px;
  padding: 10px 14px;
  background: var(--we-strip);
  border: 1px solid var(--we-line);
  border-left: 1px solid var(--we-line);
  border-radius: 10px;
  font-size: 13px;
  color: var(--we-ink);
}
#mlb .mlb-status-confirmed { background: var(--goodbg); color: var(--good); }
#mlb .mlb-top-matchup-name { white-space: normal; overflow: visible; text-overflow: clip; }

/* ── MLB: extra rows other scripts add under each game ─────
   (Starting Lineups drawer, line movement). Game cards are rows with
   no class; these rows have one, so they attach under their card. */
#mlb #mlb-tbody > tr[class] {
  display: block;
  margin-top: -16px;
  background: var(--we-card);
  border: 1px solid var(--we-line);
  border-top: 0;
  border-radius: 0 0 14px 14px;
  overflow: hidden;
}
#mlb #mlb-tbody > tr:not([class]):has(+ tr[class]) { border-radius: 14px 14px 0 0; }
#mlb #mlb-tbody > tr[class]:has(+ tr[class]) { border-radius: 0; }
#mlb #mlb-tbody > tr[class] > td {
  display: block;
  padding: 0 !important;
  border: 0 !important;
  border-top: 1px solid var(--we-line2) !important;
  background: var(--we-card) !important;
}

/* Starting Lineups drawer */
#mlb .mlb-lineups-inner { padding: 4px 12px 8px; }
#mlb .mlb-lineups-toggle {
  font: 600 14px/1 var(--we-sans);
  letter-spacing: 0;
  text-transform: none;
  color: var(--we-brand);
  border: 0;
  border-radius: 8px;
  min-height: 44px;
  padding: 0 8px;
}
#mlb .mlb-lineups-toggle:hover { background: var(--we-brand-soft); }
#mlb .mlb-lineups-panel { max-width: none; margin: 4px 8px 12px; padding: 16px; border: 1px solid var(--we-line); border-radius: 12px; background: var(--we-strip); }
#mlb .mlb-lineups-title { font: 700 17px/1.3 var(--we-display); color: var(--we-ink); }
#mlb .mlb-lineups-sub, #mlb .mlb-lineups-status { font-size: 14px; color: var(--we-ink2); }
#mlb .mlb-lineups-grid { gap: 16px; }
#mlb .mlb-lineups-team { background: var(--we-card); border-color: var(--we-line); border-radius: 10px; }
#mlb .mlb-lineups-head { background: var(--we-card); border-bottom: 1px solid var(--we-line); padding: 12px 14px; font: 700 15px/1.3 var(--we-sans); color: var(--we-ink); }
#mlb .mlb-lineups-head span { font: 500 13px/1.4 var(--we-sans); color: var(--we-ink2); }
#mlb .mlb-batter {
  grid-template-columns: 24px minmax(0, 1fr) auto;
  gap: 10px;
  padding: 9px 14px;
  border-top-color: var(--we-line2);
  font-size: 14px;
}
#mlb .mlb-batter-order { font: 600 14px/1 var(--we-mono); color: var(--we-ink3); }
#mlb .mlb-batter-name { font-weight: 600; color: var(--we-ink); }
#mlb .mlb-batter-meta { font-size: 12px; color: var(--we-ink2); }
#mlb .mlb-batter-stats { font-size: 12px; line-height: 1.5; color: var(--we-ink2); font-variant-numeric: tabular-nums; }
#mlb .mlb-batter-stats strong { font: 600 13px/1.4 var(--we-mono); color: var(--we-ink); }
@media (max-width: 760px) {
  #mlb .mlb-lineups-grid { grid-template-columns: 1fr; }
  #mlb .mlb-lineups-panel { margin: 4px 4px 12px; padding: 12px; }
}
@media (max-width: 760px) {
  /* Stats sit under the name so names aren't cut off */
  #mlb .mlb-batter { grid-template-columns: 24px minmax(0, 1fr); row-gap: 4px; }
  #mlb .mlb-batter-name { white-space: normal; }
  #mlb .mlb-batter-stats { grid-column: 2; text-align: left; white-space: normal; }
}

/* Total Movement drawer (line-movement-chart-v1-mlb.js) */
#mlb .mlb-line-inner { padding: 4px 12px 8px; }
#mlb .mlb-line-toggle {
  font: 600 14px/1 var(--we-sans);
  letter-spacing: 0;
  text-transform: none;
  color: var(--we-brand);
  border: 0;
  border-radius: 8px;
  min-height: 44px;
  padding: 0 8px;
}
#mlb .mlb-line-toggle:hover { background: var(--we-brand-soft); }
#mlb .mlb-line-panel { max-width: 760px; margin: 4px 8px 12px; padding: 16px; border: 1px solid var(--we-line); border-radius: 12px; background: var(--we-card); }
#mlb .mlb-line-title { font: 700 17px/1.3 var(--we-display); color: var(--we-ink); }
#mlb .mlb-line-sub, #mlb .mlb-line-status { font-size: 14px; color: var(--we-ink2); }
#mlb .mlb-line-pill { font: 500 13px/1.3 var(--we-mono); background: var(--we-strip); border: 1px solid var(--we-line2); border-radius: 6px; padding: 4px 8px; color: var(--we-ink); }
#mlb .mlb-line-grid { stroke: var(--we-line); }
#mlb .mlb-line-axis { fill: var(--we-ink3); font-family: var(--we-mono); }
#mlb .mlb-line-path { stroke: var(--we-brand); stroke-width: 2.5; }
#mlb .mlb-line-dot { fill: var(--we-brand); }
/* Two drawers under one game: keep them snug */
#mlb #mlb-tbody > tr[class] + tr[class] > td { border-top: 0 !important; }
#mlb #mlb-tbody > tr[class] + tr[class] .mlb-lineups-inner,
#mlb #mlb-tbody > tr[class] + tr[class] .mlb-line-inner { padding-top: 0; }
@media (max-width: 760px) {
  /* The chart scales down on phones; scale its labels up to stay readable */
  #mlb .mlb-line-axis { font-size: 22px; }
  #mlb .mlb-line-svg { height: auto; }
  #mlb .mlb-line-panel { margin: 4px 4px 12px; padding: 12px; }
}

/* PGA win odds column + its source note */
#pga td.we-odds { font-family: var(--we-mono); font-weight: 500; white-space: nowrap; }
#pga .we-table-note { margin: -4px 28px 10px; font-size: 13px; color: var(--we-ink2); text-align: center; }
@media (max-width: 760px) { #pga .we-table-note { margin: -2px 16px 10px; } }