/* ============================================================
   Retro Stat Sports — Stylesheet
   ============================================================
   Sections:
     1. Fonts
     2. Globals (body, links, images, hr, typography)
     3. Site Header & Nav
     4. Site Footer
     5. Container
     6. Homepage — Hero & Stats Strip
     7. Homepage — League Sections & Tiles
     8. Homepage — How It Works
     9. League Page — Breadcrumb & Page Header
     10. League Page — Live Projection Callout
     11. League Page — Generic Sections & Story Cards
     12. League Page — Era Filters & Season Tiles
     13. League Page — Browse by Team Callout
     14. Placeholder Pages (Coming Soon)
     15. Season Detail Page — Header & Tabs
     16. Season Detail Page — Headline Cards
     17. Season Detail Page — Standings Table
     18. Season Detail Page — Playoff Bracket
     19. Season Detail Page — Regular Season Tab (leaderboards, streaks, distribution)
     20. Responsive  
   ============================================================ */


/* -----------------------------------
   1. Fonts
----------------------------------- */
@import url('https://fonts.googleapis.com/css2?family=Graduate&family=Bebas+Neue&family=Barlow+Semi+Condensed&family=Inter&family=Inter+Tight&display=swap');


/* -----------------------------------
   2. Globals
----------------------------------- */
body {
  font-family: 'Inter', sans-serif;
  background-color: #E0E0E0;
  color: #1C1C1C;
  margin: 0 auto;
  padding: 0;
  max-width: 1280px;
  line-height: 1.6;
}

a {
  color: #002744;
  text-decoration: none;
}

a:hover {
  color: #004080;
  text-decoration: underline;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 20px auto;
  border: 1px solid #999999;
}

hr {
  margin: 4px 0;
  border: none;
  border-top: 1px solid #999999;
}

/* Default heading styles — overridden where needed by .rss-* classes */
h1, h2, h3 {
  font-family: 'Barlow Semi Condensed', sans-serif;
  color: #A4161A;
  letter-spacing: 1px;
  margin-top: 1rem;
  margin-bottom: 0.5rem;
}
h1 { font-size: 40px; }
h2 { font-size: 32px; }
h3 { font-size: 24px; }


/* -----------------------------------
   3. Site Header & Nav
----------------------------------- */
#site-header {
  background: transparent;
  /* Reserve vertical space matching the injected .site-header-bar height
     (20px top padding + 36px brand line + 16px bottom padding + 1px border).
     Without this, the empty wrapper is 0px tall until main.js finishes
     fetching header.html and injects content — at which point everything
     below it (the season title, breadcrumb, tabs) gets pushed down ~73px,
     causing the visible jump. Tune up if your header ever wraps to two rows. */
  min-height: 73px;
}

.site-header-bar {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px 20px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #ccc;
  flex-wrap: wrap;
  gap: 16px;
}

.site-brand {
  font-family: 'Graduate', serif;
  color: #A4161A;
  letter-spacing: 1.5px;
  font-size: 36px;
  font-weight: bold;
  text-decoration: none;
  line-height: 1;
}

.site-brand:hover,
.site-brand:focus {
  color: #A4161A;
  text-decoration: none;
}

.site-nav {
  display: flex;
  gap: 24px;
  align-items: center;
  flex-wrap: wrap;
}

.site-nav a {
  font-family: 'Inter Tight', sans-serif;
  font-size: 14px;
  color: #555;
  text-decoration: none;
  transition: color 0.15s ease;
  letter-spacing: 0.2px;
}

.site-nav a:hover {
  color: #A4161A;
  text-decoration: none;
}


/* -----------------------------------
   4. Site Footer
----------------------------------- */
.site-footer {
  border-top: 1px solid #ccc;
  margin-top: 40px;
  padding: 24px 0;
  background: transparent;
}

.site-footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.site-footer-brand {
  font-family: 'Inter Tight', sans-serif;
  font-size: 14px;
  color: #555;
  margin: 0;
}

.site-footer-nav {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.site-footer-nav a {
  font-family: 'Inter Tight', sans-serif;
  font-size: 14px;
  color: #555;
  text-decoration: none;
  transition: color 0.15s ease;
}

.site-footer-nav a:hover {
  color: #A4161A;
  text-decoration: none;
}


/* -----------------------------------
   5. Container
----------------------------------- */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px 40px;
}


/* -----------------------------------
   6. Homepage — Hero & Stats Strip
----------------------------------- */
.rss-hero {
  background-color: white;
  border-radius: 10px;
  padding: 48px 40px;
  margin: 32px 0;
  border-left: 6px solid #A4161A;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
  display: flex;
  gap: 40px;
  align-items: stretch;
}

.rss-hero-content {
  flex: 2 1 0;
  min-width: 0;
}

.rss-hero-eyebrow {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 16px;
  letter-spacing: 2px;
  color: #002744;
  margin: 0 0 12px;
  text-transform: uppercase;
}

.rss-hero-title {
  font-family: 'Barlow Semi Condensed', sans-serif;
  font-size: 32px;
  line-height: 1.05;
  color: #A4161A;
  letter-spacing: 1px;
  margin: 0 0 16px;
}

.rss-hero-subtitle {
  font-family: 'Inter', sans-serif;
  font-size: 18px;
  color: #1C1C1C;
  line-height: 1.55;
  max-width: 680px;
  margin: 0 0 24px;
}

.rss-hero-buttons {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* Active Now panel — right-side column of the hero card listing
   currently-active leagues with their current title leader. The
   team and percentage are populated by inline JS in index.html
   that fetches each league's projection.json. */
.rss-hero-active {
  flex: 1 1 0;
  padding-left: 20px;
  border-left: 1px solid rgba(0, 39, 68, 0.12);
  min-width: 0;
}

.rss-active-eyebrow {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 16px;
  letter-spacing: 2px;
  color: #A4161A;
  margin: 0 0 16px;
  text-transform: uppercase;
}

.rss-active-list {
  list-style: none;
  padding: 0;
  margin: 0 0 16px;
}

.rss-active-row {
  border-bottom: 1px solid rgba(0, 39, 68, 0.08);
}

.rss-active-row:last-child {
  border-bottom: none;
}

.rss-active-row a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  text-decoration: none;
  color: inherit;
  border-radius: 4px;
  transition: background-color 0.15s ease;
}

.rss-active-row a:hover {
  background-color: rgba(0, 39, 68, 0.04);
  text-decoration: none;
}

.rss-active-icon {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  display: block;
  object-fit: contain;
  border: 0;            /* override global img { border: 1px solid #999 } */
  margin: 0;            /* override global img { margin: 20px auto } */
  max-width: none;      /* override global img { max-width: 100% } */
}

.rss-active-info {
  display: flex;
  flex-direction: column;
  line-height: 1.3;
  min-width: 0;
}

.rss-active-league {
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  color: #002744;
  font-size: 14px;
}

.rss-active-detail {
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  color: #5a6573;
}

.rss-active-link {
  display: inline-block;
  font-family: 'Bebas Neue', sans-serif;
  font-size: 16px;
  letter-spacing: 1px;
  color: #002744;
  text-decoration: none;
  padding: 6px 0;
  text-transform: uppercase;
}

.rss-active-link:hover {
  text-decoration: underline;
}

/* Mobile: stack the panel below the hero content */
@media (max-width: 768px) {
  .rss-hero {
    flex-direction: column;
    gap: 0;
  }
  .rss-hero-active {
    flex: 1 1 auto;
    border-left: none;
    border-top: 1px solid rgba(0, 39, 68, 0.12);
    padding-left: 0;
    padding-top: 24px;
    margin-top: 24px;
  }
}

.rss-btn {
  display: inline-block;
  font-family: 'Bebas Neue', sans-serif;
  font-size: 18px;
  letter-spacing: 1px;
  padding: 12px 24px;
  border-radius: 6px;
  text-decoration: none;
  border: 2px solid transparent;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.rss-btn-primary {
  background-color: #A4161A;
  color: white;
}

.rss-btn-primary:hover {
  background-color: #7d1014;
  color: white;
  text-decoration: none;
}

.rss-btn-secondary {
  background-color: transparent;
  color: #002744;
  border-color: #002744;
}

.rss-btn-secondary:hover {
  background-color: #002744;
  color: white;
  text-decoration: none;
}

.rss-stats-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin: 0 0 40px;
}

.rss-stat {
  background-color: white;
  border-radius: 8px;
  padding: 16px 24px 20px;   /* reduced top padding by 4px to absorb the new accent stripe */
  text-align: center;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
  border-top: 4px solid #ddd;   /* base color; overridden per-card by nth-child below */
}

/* Accent stripes for the four stats cards, in the SAME visual order
   as the season-page headline tiles: gold / slate / navy / red.
   On a season page the row reads Champion (gold) · Relegated (slate) ·
   Overachiever (navy) · Disappointment (red). Country and league pages
   now mirror that order so the site has one consistent color rhythm
   across all three page types. nth-child is used because the .rss-stat
   divs are rendered identically by the template — no need to plumb a
   variant class through the generator. */
.rss-stats-strip .rss-stat:nth-child(1) { border-top-color: #B8860B; }  /* gold  — matches Champion */
.rss-stats-strip .rss-stat:nth-child(2) { border-top-color: #64748B; }  /* slate — matches Relegated */
.rss-stats-strip .rss-stat:nth-child(3) { border-top-color: #002744; }  /* navy  — matches Overachiever */
.rss-stats-strip .rss-stat:nth-child(4) { border-top-color: #A4161A; }  /* red   — matches Disappointment */

.rss-stat-label {
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  color: #555;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin: 0 0 6px;
}

.rss-stat-value {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 36px;
  letter-spacing: 1px;
  color: #002744;
  margin: 0;
  line-height: 1;
}


/* -----------------------------------
   7. Homepage — League Sections & Tiles
----------------------------------- */
.rss-league-section {
  background-color: white;
  border-radius: 10px;
  padding: 28px 32px;
  margin: 0 0 32px;
  border-left: 6px solid #002744;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
}

.rss-league-section-header {
  margin: 0 0 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid #ddd;
}

.rss-league-section-title {
  font-family: 'Barlow Semi Condensed', sans-serif;
  font-size: 32px;
  letter-spacing: 1.5px;
  color: #002744;
  margin: 0 0 4px;
}

.rss-league-section-subtitle {
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  color: #555;
  margin: 0;
  line-height: 1.5;
}

/* USA: Goldenrod */
.rss-league-section-usa { border-left-color: #B8860B; }
.rss-league-section-usa .rss-league-section-title { color: #B8860B; }
.rss-league-section-usa .rss-league-tile:hover { border-color: #B8860B; }
.rss-league-section-usa .rss-league-tile:hover .rss-league-tile-name { color: #B8860B; }

/* UEFA: Emerald Green */
.rss-league-section-uefa { border-left-color: #00642E; }
.rss-league-section-uefa .rss-league-section-title { color: #00642E; }
.rss-league-section-uefa .rss-league-tile:hover { border-color: #00642E; }
.rss-league-section-uefa .rss-league-tile:hover .rss-league-tile-name { color: #00642E; }

/* NCAA: Burgundy */
.rss-league-section-ncaa { border-left-color: #660000; }
.rss-league-section-ncaa .rss-league-section-title { color: #660000; }
.rss-league-section-ncaa .rss-league-tile:hover { border-color: #660000; }
.rss-league-section-ncaa .rss-league-tile:hover .rss-league-tile-name { color: #660000; }

/* Active/Defunct subgroup label inside a league section.
   Small uppercase Inter Tight, gray, tracked — quietly divides the
   section without competing with the section header. The two
   adjacent-sibling rules tighten spacing when the label is the first
   thing after the section header/subtitle, and bump it up a bit when
   it follows a grid (i.e. the "Defunct" label after the active tiles). */
.rss-league-subgroup-label {
  font-family: 'Inter Tight', 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin: 18px 0 10px;
  line-height: 1;
}

.rss-league-section-header + .rss-league-subgroup-label {
  margin-top: 4px;
}

.rss-league-grid + .rss-league-subgroup-label {
  margin-top: 22px;
}

/* "Browse all 54 countries →" link at the bottom of the UEFA section.
   Same visual pattern as the "Browse former members" link on UEFA
   league landing pages — right-aligned, navy, underline on hover. */
.rss-league-section-browse-link-row {
  margin-top: 16px;
  text-align: right;
}

.rss-league-section-browse-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  font-weight: 500;
  color: #002744;
  text-decoration: none;
  padding: 6px 0;
  border-bottom: 1px solid transparent;
  transition: border-color 0.15s ease;
}

.rss-league-section-browse-link:hover {
  border-bottom-color: #002744;
  text-decoration: none;
}

.rss-league-section-browse-link::after {
  content: "→";
  font-size: 16px;
}

.rss-league-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
}

.rss-league-tile {
  display: block;
  background-color: #fafafa;
  border: 1.5px solid #ddd;
  border-radius: 8px;
  padding: 16px 18px;
  text-decoration: none;
  transition: border-color 0.2s ease, background-color 0.2s ease, transform 0.1s ease;
}

.rss-league-tile:hover {
  background-color: white;
  transform: translateY(-1px);
  text-decoration: none;
}

.rss-league-tile-name {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 28px;
  letter-spacing: 1px;
  color: #002744;
  margin: 0 0 6px;
  line-height: 1.1;
  transition: color 0.2s ease;
}

.rss-league-tile-meta {
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  color: #555;
  line-height: 1.45;
  margin: 0;
}

/* Flag/icon-led tile variant. Used in the UEFA section (with country
   flags), USA section (with sport icons), and NCAA section (with sport
   icons) — anywhere we want the centered "icon + name + sub-line"
   layout in place of the default left-aligned "abbreviation + meta"
   layout. The tile shape and outer styling stay the same; this just
   adds the icon row and centers the column. */
.rss-league-tile-icon-row {
  display: flex;
  align-items: center;
  justify-content: center;
  /* For UEFA tiles the "icon" is a flag emoji (text content) — font-size
     controls its size. For USA/NCAA tiles the icon is a PNG <img> sized
     via the rule below; font-size has no effect on those. */
  font-size: 24px;
  line-height: 1;
  margin: 0 0 8px;
  min-height: 28px;
}

/* Bump the gap between icon and name a bit more on USA/NCAA tiles
   (where the icon is a PNG). UEFA tiles use a text flag emoji and
   already sit at a comfortable distance, so we leave them at 8px. */
.rss-league-tile-icon-row:has(img) {
  margin-bottom: 12px;
}

.rss-league-tile-icon-row img {
  width: 28px;
  height: 28px;
  display: block;
  object-fit: contain;
  /* Overrides for the global img rule (border + margin + max-width), the
     same pattern .rss-league-page-icon uses. Without these, every tile
     icon would inherit the site-wide 1px gray box around all <img>s. */
  border: 0;
  margin: 0;
  max-width: none;
}

.rss-league-tile.has-icon {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  aspect-ratio: 1.25 / 1;
  padding: 14px 12px;
}

.rss-league-tile.has-icon .rss-league-tile-name {
  font-size: 24px;
  margin: 0 0 4px;
}

.rss-league-tile.has-icon .rss-league-tile-meta {
  font-size: 14px;
  color: #888;
  letter-spacing: 0.3px;
  /* Loose line-height for the rare case where meta wraps (longest
     UEFA meta strings on tablet). Most tiles render as a single line
     since USA/NCAA show just years (e.g. "1903 – Present") and UEFA
     shows just "Country · Tier N". */
  line-height: 1.55;
}

/* "Coming Soon" treatment — applied per-tile so each league can be
   activated individually as its pages get built. To activate a league,
   change the wrapping <div> back to <a href="...">, remove the
   --coming-soon modifier class, and delete the badge span. */
.rss-league-tile--coming-soon {
  position: relative;
  opacity: 0.55;
  cursor: default;
}

.rss-league-tile--coming-soon:hover {
  /* Kill the default tile hover effects since these tiles aren't clickable. */
  background-color: #fafafa;
  transform: none;
}

.rss-coming-soon-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  background: #A4161A;
  color: white;
  font-family: 'Bebas Neue', sans-serif;
  font-size: 12px;
  letter-spacing: 1px;
  padding: 2px 6px;
  border-radius: 4px;
  text-transform: uppercase;
  line-height: 1.2;
}


/* -----------------------------------
   8. Homepage — How It Works
----------------------------------- */
.rss-how-it-works {
  background-color: white;
  border-radius: 10px;
  padding: 28px 32px;
  margin: 0 0 32px;
  border-left: 6px solid #002744;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
}

.rss-how-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin: 0 0 20px;
}

.rss-how-step-num {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 14px;
  letter-spacing: 2px;
  color: #A4161A;
  margin: 0 0 6px;
  text-transform: uppercase;
}

.rss-how-step-title {
  font-family: 'Barlow Semi Condensed', sans-serif;
  font-size: 18px;
  color: #002744;
  letter-spacing: 0.5px;
  margin: 0 0 6px;
}

.rss-how-step-detail {
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  color: #1C1C1C;
  line-height: 1.5;
}

.rss-how-link {
  margin: 8px 0 0;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
}

.rss-how-link a {
  color: #002744;
  font-weight: 600;
}


/* -----------------------------------
   9. League Page — Breadcrumb & Page Header
----------------------------------- */
.rss-breadcrumb {
  font-family: 'Inter Tight', sans-serif;
  font-size: 14px;
  color: #555;
}

.rss-breadcrumb a {
  color: #555;
  text-decoration: none;
}

.rss-breadcrumb a:hover {
  color: #A4161A;
  text-decoration: underline;
}

.rss-league-page-header {
  display: flex;
  align-items: center;
  gap: 20px;
  margin: 24px 0;
}

.rss-league-page-icon {
  width: 44px;
  height: 44px;
  display: block;       /* removes inline whitespace alignment quirks */
  flex-shrink: 0;       /* parent is flex; never shrink the icon */
  border: 0;            /* override global img { border: 1px solid #999 } */
  margin: 0;            /* override global img { margin: 20px auto } */
  max-width: none;      /* override global img { max-width: 100% } */
}

.rss-league-page-title {
  font-family: 'Graduate', serif;
  font-size: 36px;
  color: #A4161A;
  letter-spacing: 1.5px;
  margin: 0;
  line-height: 1.1;
}

.rss-league-page-subtitle {
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  color: #555;
  margin: 4px 0 0;
  line-height: 1.4;
}


/* -----------------------------------
   10. League Page — Live Projection Callout
----------------------------------- */
.rss-live-callout {
  display: block;              /* anchor: behave as a block-level card */
  text-decoration: none;
  color: inherit;              /* don't apply the global link color to descendants */
  background-color: white;
  border-radius: 10px;
  padding: 24px 28px;
  margin: 0 0 32px;
  border-left: 6px solid #A4161A;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
  transition: transform 0.1s ease, box-shadow 0.15s ease;
}

.rss-live-callout:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.08);
  text-decoration: none;
}

.rss-live-callout-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 0 0 12px;
}

.rss-live-badge {
  background-color: #A4161A;
  color: white;
  font-family: 'Bebas Neue', sans-serif;
  font-size: 12px;
  letter-spacing: 1.5px;
  padding: 4px 12px;
  border-radius: 999px;
}

.rss-live-meta {
  font-family: 'Inter Tight', sans-serif;
  font-size: 16px;
  color: #555;
}

.rss-live-eyebrow {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 24px;
  letter-spacing: 1.5px;
  color: #555;
  text-transform: uppercase;
  margin: 0 0 10px;
}

.rss-live-title {
  font-family: 'Barlow Semi Condensed', sans-serif;
  font-size: 28px;
  color: #1C1C1C;
  letter-spacing: 0.5px;
  margin: 0 0 10px;
  line-height: 1.3;
}

.rss-live-subtitle {
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  color: #555;
  margin: 0 0 14px;
  line-height: 1.5;
}

.rss-live-link {
  font-family: 'Inter Tight', sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: #002744;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* The whole .rss-live-callout is the link now; hovering anywhere on the tile
   lights up the inner "See full projection →" text as a click-affordance cue. */
.rss-live-callout:hover .rss-live-link {
  color: #A4161A;
  text-decoration: none;
}

.rss-live-link i {
  font-size: 16px;
}


/* ---- League page top row: live callout (left) + stacked stories (right) ---- */
.rss-top-row {
  display: grid;
  grid-template-columns: 1.55fr 1fr;
  gap: 16px;
  margin: 0 0 36px;
}

/* When the live callout is inside the top row, kill its standalone bottom margin
   so the row's margin governs spacing instead. */
.rss-top-row .rss-live-callout {
  margin: 0;
}

/* Projection table inside the live callout (replaces the old prose subtitle). */
.rss-projection-table {
  width: 100%;
  border-collapse: collapse;
  font-family: 'Inter Tight', sans-serif;
  margin: 4px 0 14px;
}

.rss-projection-table th {
  text-align: left;
  font-family: 'Bebas Neue', sans-serif;
  font-size: 14px;
  letter-spacing: 1.5px;
  color: #888;
  font-weight: normal;
  padding: 8px 0 6px;
  border-bottom: 1px solid #e8e8e2;
  text-transform: uppercase;
}

.rss-projection-table th.num,
.rss-projection-table td.num {
  text-align: right;
}

.rss-projection-table td {
  padding: 7px 0;
  font-size: 16px;
  color: #1C1C1C;
  border-bottom: 1px solid #f3f3f0;
}

.rss-projection-table tbody tr:last-child td {
  border-bottom: none;
}

.rss-projection-table td.tm {
  font-weight: 500;
}

.rss-projection-table td.num {
  font-variant-numeric: tabular-nums;
}

.rss-projection-table .up {
  color: #1d8a4f;
  font-weight: 500;
}

.rss-projection-table .dn {
  color: #b13a3a;
  font-weight: 500;
}

/* Story stack — vertical column of cards sitting next to the live callout.
   Each card flex-grows to share the column height equally, matching the
   live callout's height for visual alignment. */
.rss-story-stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.rss-story-stack .rss-story-card {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* Projections page — grid of live callouts, 2-up on desktop, 1-up on mobile.
   Each tile reuses the .rss-live-callout style from the sport landing pages,
   so its team/elo/title-% table renders identically. The breakpoint at 900px
   matches the point below which two side-by-side tables (~450px each)
   become cramped for the 3-column Team / Elo / Title % layout. */
.rss-projections-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  margin: 0 0 36px;
}

@media (max-width: 900px) {
  .rss-projections-grid {
    grid-template-columns: 1fr;
  }
}

.rss-projections-grid .rss-live-callout {
  margin: 0;
}

/* Page intro (title + subtitle) for the projections page. */
.rss-projections-intro {
  margin: 32px 0 28px;
}

.rss-projections-intro h1 {
  font-family: 'Barlow Semi Condensed', sans-serif;
  font-size: 36px;
  color: #002744;
  letter-spacing: 0.5px;
  margin: 0 0 8px;
}

.rss-projections-intro p {
  font-family: 'Inter Tight', sans-serif;
  font-size: 16px;
  color: #555;
  margin: 0;
}


/* -----------------------------------
   11. League Page — Generic Sections & Story Cards
----------------------------------- */
.rss-section {
  margin: 0 0 36px;
}

.rss-section-title {
  font-family: 'Barlow Semi Condensed', sans-serif;
  font-size: 28px;
  color: #002744;
  letter-spacing: 1px;
  margin: 0 0 4px;
}

.rss-section-subtitle {
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  color: #555;
  margin: 0 0 20px;
}

/* -----------------------------------
   Season Page — Season Story / Narrative
----------------------------------- */
.rss-narrative {
  margin: 16px 0 24px;
}

.rss-narrative-eyebrow {
  font-family: 'Inter Tight', sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: #555;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  margin: 0 0 8px;
}

.rss-narrative-body {
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: #1C1C1C;
  margin: 0 0 12px;
}


.rss-story-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.rss-story-card {
  display: block;
  background-color: white;
  border-radius: 8px;
  padding: 16px 20px 16px 24px;   /* reduced left padding by 4px to absorb the new accent stripe */
  text-decoration: none;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
  transition: transform 0.1s ease, box-shadow 0.15s ease;
  border-left: 4px solid #A4161A;   /* red — matches the live-callout left accent so the
                                       story-stack reads as a visual companion to the
                                       callout next to it. All three story cards share
                                       this color (no per-card variation). */
}

.rss-story-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
  text-decoration: none;
}

.rss-story-tag {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 20px;
  letter-spacing: 1.2px;
  color: #555;
  text-transform: uppercase;
  margin: 0 0 8px;
}

.rss-story-headline {
  font-family: 'Barlow Semi Condensed', sans-serif;
  font-size: 24px;
  color: #1C1C1C;
  margin: 0 0 8px;
  letter-spacing: 0.5px;
  line-height: 1.3;
}

.rss-story-detail {
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  color: #555;
  margin: 0;
  line-height: 1.5;
}


/* -----------------------------------
   12. League Page — Era Filters & Season Tiles
----------------------------------- */
.rss-era-filters {
  display: flex;
  gap: 8px;
  align-items: center;
  margin: 0 0 24px;
  flex-wrap: wrap;
}

.rss-era-label {
  font-family: 'Inter Tight', sans-serif;
  font-size: 14px;
  color: #555;
  margin-right: 6px;
}

.rss-filter-btn {
  background: white;
  border: 1.5px solid #ddd;
  border-radius: 999px;
  padding: 6px 14px;
  font-family: 'Inter Tight', sans-serif;
  font-size: 14px;
  font-weight: 500;
  color: #555;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.rss-filter-btn:hover {
  border-color: #B8860B;
  color: #B8860B;
}

.rss-filter-btn.active {
  background: #002744;
  color: white;
  border-color: #002744;
}

.rss-filter-btn.active:hover {
  background: #002744;
  color: white;
}

/* Era sections are hidden by default; only the .active one shows */
.rss-era-section {
  display: none;
  margin: 0 0 24px;
}

.rss-era-section.active {
  display: block;
}

.rss-empty-decade {
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  color: #777;
  font-style: italic;
  background: white;
  border-radius: 8px;
  padding: 18px 22px;
  margin: 0;
  text-align: center;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
}

/* Season tiles — 2-column layout, used for every decade.
   Wider tiles allow more substantial blurbs (1-2 sentences). */
.rss-season-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
}

/* No centering rules — tiles flow left-to-right and partial last rows
   are naturally left-justified. With 5 columns, most decades will have
   the standard 10 seasons (2 clean rows of 5), and the rare 9 or 11
   season decades just have one extra/missing tile on the last row. */

.rss-season-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  aspect-ratio: 1;                /* square tiles */
  box-sizing: border-box;
  background-color: white;
  border-radius: 12px;
  padding: 16px;
  text-decoration: none;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
  transition: transform 0.1s ease, box-shadow 0.15s ease;
}

.rss-season-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
  text-decoration: none;
}

.rss-season-card-header {
  margin: 0;
}

.rss-season-year {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 28px;
  letter-spacing: 1.5px;
  color: #002744;
  line-height: 1;
}

.rss-season-card-body {
  text-align: center;
  /* auto top/bottom margins absorb leftover flex space symmetrically,
     so the champion + matchup block always sits in the visual vertical
     center of the tile regardless of header/footer height or the
     tile's aspect ratio. */
  margin: auto 0;
}

.rss-season-champ {
  font-family: 'Barlow Semi Condensed', sans-serif;
  font-size: 20px;
  font-weight: 500;
  letter-spacing: 0.3px;
  color: #1C1C1C;
  margin: 0;
  line-height: 1.2;
}

.rss-season-matchup {
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  font-weight: 400;
  color: #555;
  margin: 4px 0 0;
  line-height: 1.3;
}

.rss-season-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
}

/* Bottom-left footer slot — title number (e.g. "8th title"). */
.rss-season-titlenum {
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  color: #555;
  text-align: left;
  line-height: 1.5;
  margin: 0;
}

/* Bottom-right footer slot — year of the franchise's last title
   (e.g. "Last: 2020"). Matches .rss-season-titlenum so both bottom
   corners share the same visual treatment. Omitted in the HTML for
   a franchise's first title (CSV's last_title_year is blank). */
.rss-season-last {
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  color: #555;
  text-align: right;
  line-height: 1.5;
  margin: 0;
}


/* ============================================================
   Cancelled-season card variant — for years a league didn't play
   (WWI, WWII, lockouts, COVID-frozen seasons). Same dimensions as
   a normal card so the grid stays even; reduced opacity and no
   hover interaction to signal that it's not navigable. The card
   is rendered as a <div> not an <a>, so there's no link target.

   Synthetic rows come from the config.json `cancelled_seasons`
   dict; the year + reason are shown in place of champion + matchup.
   ============================================================ */
.rss-season-card-cancelled {
  opacity: 0.45;
  cursor: default;
}

.rss-season-card-cancelled:hover {
  /* Override the lift + shadow that .rss-season-card:hover applies,
     so the deactivated card stays visually inert on mouseover. */
  transform: none;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
}


/* -----------------------------------
   13. League Page — Every Franchise list
   -----------------------------------
   Multi-column list of team names with years-of-existence underneath.
   3 columns on desktop, 2 on tablet, 1 on mobile. Compact, scannable —
   the page is a directory, not a stats dashboard (each franchise's own
   page handles the detailed stats). Active and Defunct each get their
   own white panel so the two groups read as distinct sections.
*/

/* White panel wrapper around each group (Active list, Defunct list, or
   the UEFA-style "Browse former members" link). Matches the visual
   treatment of the page's other content cards. */
.rss-franchise-panel {
  background-color: white;
  border-radius: 12px;
  padding: 20px 24px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
}

/* Spacing between consecutive panels (Active → Defunct, or Active → link). */
.rss-franchise-panel + .rss-franchise-panel {
  margin-top: 14px;
}

/* The "Browse former members" panel is small — only contains a link —
   so it gets less vertical padding than a list panel. */
.rss-franchise-panel-link {
  padding: 16px 24px;
}

.rss-franchise-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px 32px;
}

.rss-franchise-item {
  line-height: 1.2;
}

.rss-franchise-name {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 24px;
  letter-spacing: 1px;
  color: #002744;
  text-decoration: none;
  line-height: 1;
  display: inline-block;
}
.rss-franchise-name:hover {
  text-decoration: underline;
}

.rss-franchise-years {
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  font-weight: 400;
  color: #888;
  margin: 4px 0 0;
  line-height: 1.2;
}

.rss-franchise-section-label {
  font-family: 'Inter Tight', sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: #555;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  margin: 0 0 14px;
}

/* "Browse former members" link — sits alone inside its own panel for
   UEFA-style sports that don't list defunct teams inline. */
.rss-franchise-defunct-link {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  color: #002744;
  text-decoration: none;
}
.rss-franchise-defunct-link:hover {
  text-decoration: underline;
}

.rss-franchise-defunct-count {
  font-family: 'Barlow Semi Condensed', sans-serif;
  font-size: 14px;
  color: #888;
  font-variant-numeric: tabular-nums;
}

.rss-franchise-defunct-link-arrow {
  font-size: 14px;
  margin-left: 2px;
}


/* -----------------------------------
   14. League Page — Browse by Team Callout
----------------------------------- */
.rss-browse-callout {
  background-color: white;
  border-radius: 10px;
  padding: 20px 28px;
  margin: 0 0 32px;
  border-left: 6px solid #B8860B;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.rss-browse-title {
  font-family: 'Barlow Semi Condensed', sans-serif;
  font-size: 20px;
  color: #1C1C1C;
  letter-spacing: 0.5px;
  margin: 0 0 2px;
}

.rss-browse-subtitle {
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  color: #555;
  margin: 0;
}

.rss-browse-btn {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 14px;
  letter-spacing: 1.5px;
  color: white;
  background: #002744;
  padding: 10px 18px;
  border-radius: 6px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  transition: background 0.15s ease;
}

.rss-browse-btn:hover {
  background: #003a64;
  color: white;
  text-decoration: none;
}


/* -----------------------------------
   14. Placeholder Pages (Coming Soon)
----------------------------------- */
.rss-coming-soon {
  background-color: white;
  border-radius: 10px;
  padding: 60px 40px;
  margin: 24px 0;
  text-align: center;
  border-left: 6px solid #B8860B;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
}

.rss-coming-soon-icon {
  font-size: 56px;
  color: #B8860B;
  display: block;
  margin: 0 0 16px;
  line-height: 1;
}

.rss-coming-soon-title {
  font-family: 'Graduate', serif;
  font-size: 36px;
  color: #A4161A;
  letter-spacing: 1.5px;
  margin: 0 0 6px;
  line-height: 1.1;
}

.rss-coming-soon-subtitle {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 14px;
  letter-spacing: 2px;
  color: #555;
  text-transform: uppercase;
  margin: 0 0 16px;
}

.rss-coming-soon-text {
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  color: #555;
  line-height: 1.55;
  margin: 0 auto 24px;
  max-width: 480px;
}


/* -----------------------------------
   15. Season Detail Page — Header & Tabs
----------------------------------- */
.rss-season-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin: 24px 0;
  flex-wrap: wrap;
}

.rss-season-header-title {
  display: flex;
  align-items: center;
  gap: 16px;
}

.rss-season-header-icon {
  width: 44px;
  height: 44px;
  display: block;       /* removes inline whitespace alignment quirks */
  flex-shrink: 0;       /* parent is flex; never shrink the icon */
  border: 0;            /* override global img { border: 1px solid #999 } */
  margin: 0;            /* override global img { margin: 20px auto } */
  max-width: none;      /* override global img { max-width: 100% } */
}

.rss-season-title {
  font-family: 'Graduate', serif;
  font-size: 36px;
  color: #A4161A;
  letter-spacing: 1.5px;
  margin: 0;
  line-height: 1.1;
}

.rss-season-subtitle {
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  color: #555;
  margin: 4px 0 0;
  line-height: 1.4;   /* match rss-league-page-subtitle so the icon centers identically */
}

.rss-season-status-badge {
  display: inline-block;
  font-family: 'Bebas Neue', sans-serif;
  font-size: 12px;
  letter-spacing: 1.5px;
  padding: 5px 14px;
  border-radius: 999px;
}

.rss-status-final {
  background: #002744;
  color: white;
}

.rss-status-live {
  background: #A4161A;
  color: white;
}

/* Tab navigation */
.rss-tab-nav {
  display: flex;
  gap: 0;
  border-bottom: 1px solid #ddd;
  margin: 0 0 28px;
  flex-wrap: wrap;
}

.rss-tab {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 16px;
  letter-spacing: 1.5px;
  color: #555;
  padding: 12px 18px;
  text-decoration: none;
  border-bottom: 3px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
  margin-bottom: -1px;
}

.rss-tab:hover {
  color: #A4161A;
  text-decoration: none;
}

.rss-tab.active {
  color: #A4161A;
  border-bottom-color: #A4161A;
}

/* Tab content panes — only the active one is visible */
.rss-tab-pane {
  display: none;
}

.rss-tab-pane.active {
  display: block;
}


/* -----------------------------------
   16. Season Detail Page — Headline Cards
----------------------------------- */
.rss-headline-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin: 0 0 36px;
}

.rss-headline-card {
  background-color: white;
  border-radius: 10px;
  padding: 18px 20px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
  border-top: 4px solid #ddd;
  position: relative;
}

.rss-headline-card-icon {
  font-size: 24px;
  color: #555;
  position: absolute;
  top: 16px;
  right: 18px;
  line-height: 1;
}

.rss-headline-card-label {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 16px;
  letter-spacing: 1.5px;
  color: #555;
  text-transform: uppercase;
  margin: 0 0 8px;
}

.rss-headline-card-team {
  font-family: 'Barlow Semi Condensed', sans-serif;
  font-size: 24px;
  color: #1C1C1C;
  letter-spacing: 0.3px;
  margin: 0 0 6px;
  line-height: 1.2;
}

.rss-headline-card-detail {
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  color: #555;
  margin: 0;
  line-height: 1.4;
}

/* Optional second line under the detail — used by the Champion and
   Runner-Up cards to show "Last: YYYY" historical context. Smaller and
   dimmer so it reads as supporting info, not a second headline. The
   <p> is omitted entirely (not just hidden) when the value is empty,
   so first-title and first-appearance cases naturally show only the
   single detail line. */
.rss-headline-card-subdetail {
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  color: #888;
  margin: 2px 0 0;
  line-height: 1.3;
}

/* Accent variants */
.rss-headline-champion {
  border-top-color: #B8860B;
}
.rss-headline-champion .rss-headline-card-icon {
  color: #B8860B;
}

.rss-headline-overachiever {
  border-top-color: #002744;
}
.rss-headline-overachiever .rss-headline-card-icon {
  color: #002744;
}

.rss-headline-underachiever {
  border-top-color: #A4161A;
}
.rss-headline-underachiever .rss-headline-card-icon {
  color: #A4161A;
}

.rss-headline-runnerup {
  border-top-color: #64748B;
}
.rss-headline-runnerup .rss-headline-card-icon {
  color: #64748B;
}

/* UEFA accent variants: Promoted / Relegated.
   Used in place of Runner-up on UEFA pages (where promotion and
   relegation are the natural counterparts to a champion). Promoted
   matches the champion gold (#B8860B) because it's a "going up"
   positive outcome. Relegated matches Runner-up slate gray (#64748B)
   — relegation is a "secondary outcome" for the season alongside the
   champion, the same role Runner-up plays on USA pages. Using slate
   instead of red also avoids a color conflict with the existing
   Biggest Disappointment tile (#A4161A) which shares the page. */
.rss-headline-promoted {
  border-top-color: #B8860B;
}
.rss-headline-promoted .rss-headline-card-icon {
  color: #B8860B;
}

.rss-headline-relegated {
  border-top-color: #64748B;
}
.rss-headline-relegated .rss-headline-card-icon {
  color: #64748B;
}

/* Accent variants for the country-page headline cards.
   The country page renders 4 stat cards (Current Elo / UEFA Rank /
   Historical Avg / Peak Elo) using the same .rss-headline-card base
   as season-page tiles, but with no semantic role like "champion" —
   so we use position-based variant classes cycling through brand
   colors. Card icons also pick up the matching accent color.
   country_page_render.py assigns these in _format_header_stats(). */
.rss-headline-card-navy {
  border-top-color: #002744;
}
.rss-headline-card-navy .rss-headline-card-icon {
  color: #002744;
}

.rss-headline-card-slate {
  border-top-color: #64748B;
}
.rss-headline-card-slate .rss-headline-card-icon {
  color: #64748B;
}

.rss-headline-card-red {
  border-top-color: #A4161A;
}
.rss-headline-card-red .rss-headline-card-icon {
  color: #A4161A;
}

.rss-headline-card-gold {
  border-top-color: #B8860B;
}
.rss-headline-card-gold .rss-headline-card-icon {
  color: #B8860B;
}

/* Extra teams (Promoted/Relegated multi-team cards). The first team is
   the headline; additional teams stack below a horizontal divider as
   "Name · detail" inline rows (left-justified, no bullets). */
.rss-headline-card-extras {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid #e8eaed;
}

.rss-headline-card-extra-row {
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  color: #333;
  margin: 2px 0;
  line-height: 1.5;
  text-align: left;
}

.rss-headline-card-extra-name {
  font-weight: 500;
}

.rss-headline-card-extra-sep {
  color: #999;
  margin: 0 6px;
}

.rss-headline-card-extra-detail {
  color: #666;
}


/* -----------------------------------
   17. Season Detail Page — Standings Table
----------------------------------- */

/* Division switcher buttons */
.rss-division-nav {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin: 0 0 16px;
}

.rss-division-btn {
  background: white;
  border: 1.5px solid #ddd;
  border-radius: 6px;
  padding: 6px 14px;
  font-family: 'Inter Tight', sans-serif;
  font-size: 14px;
  font-weight: 500;
  color: #555;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.rss-division-btn:hover {
  border-color: #002744;
  color: #002744;
}

.rss-division-btn.active {
  background: #002744;
  color: white;
  border-color: #002744;
}

.rss-division-btn.active:hover {
  color: white;
}

/* Standings block — only the .active one is shown */
.rss-standings-block {
  display: none;
}

.rss-standings-block.active {
  display: block;
  /* Mobile: the standings table has a 180px-min team column plus 9-11 other
     columns, which exceeds typical phone viewport widths. Allow horizontal
     scroll on the wrapper rather than clipping or compressing the table. */
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  /* Card styling moved here from .rss-standings-table because the table's
     `overflow: hidden` was breaking sticky positioning on rank/team cells.
     Now the rounded corners + shadow are on the wrapper and sticky works. */
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
}

/* Standings table */
.rss-standings-table {
  width: 100%;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
}

.rss-standings-table thead th {
  background: #002744;
  color: white;
  font-family: 'Bebas Neue', sans-serif;
  font-size: 14px;
  letter-spacing: 1px;
  padding: 10px 12px;
  text-align: left;
  font-weight: normal;
}

.rss-standings-table thead th.num {
  text-align: right;
}

.rss-standings-table thead th.rank {
  width: 36px;
  min-width: 36px;
  text-align: center;
}

/* Mirror the th.rank width on td.rank so the column stays at exactly
   36px regardless of padding (mobile shrinks horizontal padding, which
   would otherwise let the rank column narrow below the hardcoded
   `left: 36px` used by the sticky team column — producing a visible
   gap between rank and team on phones). */
.rss-standings-table tbody td.rank {
  width: 36px;
  min-width: 36px;
}

.rss-standings-table thead th.team {
  min-width: 180px;
}

.rss-standings-table tbody td {
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  color: #1C1C1C;
  padding: 10px 12px;
  border-bottom: 1px solid #eee;
}

.rss-standings-table tbody td.num {
  text-align: right;
}

.rss-standings-table tbody td.rank {
  text-align: center;
  color: #777;
  font-weight: 500;
}

.rss-standings-table tbody tr:last-child td {
  border-bottom: none;
}

.rss-team-name {
  font-size: 14px;
  font-weight: 500;
}

/* Cell color hints for over/under performance */
.rss-standings-table .rss-overperform {
  color: #00642E;
  font-weight: 500;
}

.rss-standings-table .rss-underperform {
  color: #A4161A;
  font-weight: 500;
}

/* Badges */
.rss-badge {
  display: inline-block;
  font-family: 'Bebas Neue', sans-serif;
  font-size: 10px;
  letter-spacing: 1px;
  padding: 2px 7px;
  border-radius: 3px;
  margin-left: 8px;
  color: white;
  text-transform: uppercase;
  vertical-align: middle;
}

.rss-badge-playoff {
  background: #B8860B;
}

.rss-badge-div {
  background: #002744;
}

.rss-badge-wc {
  background: #555;
}

.rss-badge-champ {
  background: #A4161A;
}


/* -----------------------------------
   18. Season Detail Page — Playoff Bracket
----------------------------------- */
.rss-bracket {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.rss-bracket-league {
  background-color: white;
  border-radius: 10px;
  padding: 20px 24px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
  border-left: 6px solid #002744;
}

.rss-bracket-al { border-left-color: #002744; }
.rss-bracket-nl { border-left-color: #A4161A; }

.rss-bracket-league-title {
  font-family: 'Barlow Semi Condensed', sans-serif;
  font-size: 24px;
  color: #002744;
  letter-spacing: 1px;
  margin: 0 0 18px;
}

.rss-bracket-al .rss-bracket-league-title { color: #002744; }
.rss-bracket-nl .rss-bracket-league-title { color: #A4161A; }

/* Rounds: arrange horizontally on desktop, vertically on phones.
   Uses flexbox so rounds auto-distribute width based on how many there
   are — 3 rounds (NHL/MLB/NBA pre-2020) → ~33% each, 4 rounds
   (NBA with Play-In Tournament) → ~25% each, 5 rounds (MLS, future)
   → ~20% each. No per-format CSS overrides needed. */
.rss-bracket-league {
  display: flex;
  flex-wrap: wrap;
}

.rss-bracket-league .rss-bracket-league-title {
  flex: 1 1 100%;   /* h3 takes the full top row of the flex container */
}

.rss-bracket-league .rss-bracket-round {
  flex: 1 1 0;       /* equal share of available width */
  min-width: 0;      /* allow flex shrink below content's intrinsic width */
  margin-right: 12px;
}

.rss-bracket-league .rss-bracket-round:last-child {
  margin-right: 0;
}

/* Single-round bracket cards (AAFC 1949 / AFL 1969) — when there's only
   one round inside the league card, give it the full row width instead
   of the equal-share-among-multiple-rounds default. Without this rule,
   the round's flex-basis: 0 plus the title's flex-basis: 100% adds up
   to exactly 100%, so flex-wrap leaves them on the same row and the
   round gets squeezed to ~0px wide. :only-of-type matches because the
   h3 title is a different element type and doesn't count toward the
   "div.rss-bracket-round" count.

   max-width caps the matchup tile width to match .rss-bracket-matchup-big
   (the championship centerpiece, also 480px) — this keeps the visual
   weight of the round consistent with the championship card below it,
   rather than stretching the tiles uncomfortably wide across the page. */
.rss-bracket-league .rss-bracket-round:only-of-type {
  flex: 1 1 100%;
  max-width: 480px;
  margin: 0 auto;
}

.rss-bracket-round-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 16px;
  letter-spacing: 2px;
  color: #555;
  text-transform: uppercase;
  margin: 0 0 10px;
}

/* Individual matchup card */
.rss-bracket-matchup {
  background: #fafafa;
  border-radius: 6px;
  padding: 10px 14px;
  margin-bottom: 10px;
  border-left: 3px solid #ddd;
}

.rss-bracket-matchup:last-child {
  margin-bottom: 0;
}

.rss-bracket-team {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4px 0;
  color: #777;
}

.rss-bracket-team-name {
  font-family: 'Inter', sans-serif;
  font-size: 18px;
  font-weight: 400;
}

.rss-bracket-team-score {
  font-family: 'Inter', sans-serif;
  font-size: 18px;
  color: #999;
}

/* Winner row gets emphasis */
.rss-bracket-winner {
  color: #1C1C1C;
}

.rss-bracket-winner .rss-bracket-team-name {
  font-weight: 600;
}

.rss-bracket-winner .rss-bracket-team-score {
  color: #002744;
  font-weight: bold;
}

.rss-bracket-matchup:has(.rss-bracket-winner) {
  border-left-color: #002744;
}

.rss-bracket-matchup-meta {
  font-family: 'Inter Tight', sans-serif;
  font-size: 12px;
  color: #999;
  margin: 6px 0 0;
  text-align: right;
}

/* World Series centerpiece */
.rss-bracket-ws {
  background-color: white;
  border-radius: 10px;
  padding: 24px 28px;
  box-shadow: 0 2px 8px rgba(0, 100, 46, 0.15);
  border-left: 6px solid #00642E;
  text-align: center;
}

.rss-bracket-ws-title {
  font-family: 'Graduate', serif;
  font-size: 24px;
  color: #00642E;
  letter-spacing: 1.5px;
  margin: 0 0 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.rss-bracket-ws-title i {
  font-size: 24px;
  color: #B8860B;
}

.rss-bracket-matchup-big {
  max-width: 480px;
  margin: 0 auto;
  background: #fafafa;
  padding: 14px 20px;
  border-radius: 8px;
  border-left: 4px solid #00642E;
}

.rss-bracket-matchup-big .rss-bracket-team-name {
  font-size: 20px;
}

.rss-bracket-matchup-big .rss-bracket-team-score {
  font-size: 20px;
}


/* -----------------------------------
   19. Season Detail Page — Regular Season Tab
   (leaderboards, streaks, distribution)
----------------------------------- */

/* Detailed standings — slightly more compact version of the standings table.
   Currently unused (UEFA's standings_table macro no longer applies this class
   to match the USA font size), but kept here for backwards compat in case any
   external use exists. */
.rss-standings-detailed thead th,
.rss-standings-detailed tbody td {
  padding: 8px 10px;
  font-size: 12px;
}

/* Split-system group boundary — thicker top border on the row that
   begins a new group (e.g. the 7th-place row in Scotland's Premiership,
   the first relegation-group team). Applied via a row class set by the
   rendering layer when it detects a championship-to-relegation boundary
   in the row sequence. The 3px solid is enough to read as a section
   divider without competing with the table header underline. */
.rss-standings-table tbody tr.rss-group-boundary td {
  border-top: 3px solid #002744;
}

/* Wrapper around the division nav inside the Regular Season tab */
.rss-division-nav-wrap {
  margin-bottom: 14px;
}

/* Side-by-side leaderboards (Overachievers + Disappointments) */
.rss-leaderboard-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 20px;
}

.rss-leaderboard-row:last-child {
  margin-bottom: 0;
}

.rss-leaderboard {
  background-color: white;
  border-radius: 8px;
  padding: 18px 20px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
  /* Mobile: wide leaderboard tables — especially the playoff Stochastic
     Outcomes and Bracket Simulation tables with many per-round columns —
     overflow phone viewports. Scroll horizontally instead of clipping.
     No-op on narrow leaderboards (Top Playoff Probs, Recent Elo Movers)
     since their 3-4 columns fit easily. */
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.rss-leaderboard-title {
  font-family: 'Barlow Semi Condensed', sans-serif;
  font-size: 18px;
  color: #1C1C1C;
  letter-spacing: 0.5px;
  margin: 0 0 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.rss-leaderboard-title i {
  font-size: 18px;
}

.rss-leaderboard:first-child .rss-leaderboard-title i {
  color: #00642E;
}

.rss-leaderboard:last-child .rss-leaderboard-title i {
  color: #A4161A;
}

.rss-leaderboard-table {
  width: 100%;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
}

.rss-leaderboard-table thead th {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 14px;
  letter-spacing: 1px;
  color: #555;
  text-align: left;
  padding: 6px 8px;
  border-bottom: 1px solid #eee;
  font-weight: normal;
}

.rss-leaderboard-table thead th.num {
  text-align: right;
}

.rss-leaderboard-table thead th.rank {
  width: 28px;
  text-align: center;
}

.rss-leaderboard-table tbody td {
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  color: #1C1C1C;
  padding: 8px;
  border-bottom: 1px solid #f5f5f5;
}

.rss-leaderboard-table tbody td.num {
  text-align: right;
}

.rss-leaderboard-table tbody td.rank {
  text-align: center;
  color: #777;
}

.rss-leaderboard-table tbody tr:last-child td {
  border-bottom: none;
}

.rss-leaderboard-table .rss-overperform {
  color: #00642E;
  font-weight: 500;
}

.rss-leaderboard-table .rss-underperform {
  color: #A4161A;
  font-weight: 500;
}

/* ════════════════════════════════════════════════════════════════════
   LEADERBOARD MOVERS TABLES — mobile horizontal scroll
   ────────────────────────────────────────────────────────────────────
   WHAT THIS DOES
   The Recent Elo Movers and Playoff Odds Movers tables (Gainers / Losers)
   have four columns. On a phone they get cramped, so on small screens the
   # and Team columns freeze and the Δ / value columns scroll sideways —
   the same behavior as the Top Streaks tables, just for these leaderboards.
   Desktop is untouched.
 
   HOW IT'S SCOPED
   Only tables wrapped in <div class="rss-leaderboard-scroll"> are affected
   (the four movers tables). Other .rss-leaderboard-table instances — and the
   streak tables, which use their own .rss-streak-scroll wrapper — are left
   completely alone.
 
   ONE KNOB
   • "600px" = the screen width below which the freeze/scroll turns on.
     The two "34px" values are the frozen # column's width and the Team
     column's left offset — keep them equal to each other.
   ════════════════════════════════════════════════════════════════════ */
.rss-leaderboard-scroll {
  width: 100%;
}
 
@media (max-width: 600px) {
  .rss-leaderboard-scroll {
    overflow-x: auto;                  /* sideways scroll only when needed */
    -webkit-overflow-scrolling: touch; /* smooth momentum scrolling on iOS */
  }
  .rss-leaderboard-scroll .rss-leaderboard-table {
    width: auto;       /* let the table grow past the card so it can scroll */
    min-width: 100%;   /* but never narrower than the card */
  }
  .rss-leaderboard-scroll .rss-leaderboard-table thead th,
  .rss-leaderboard-scroll .rss-leaderboard-table tbody td {
    white-space: nowrap;               /* stop the cells wrapping */
  }
  /* Freeze column 1 — the # / rank column */
  .rss-leaderboard-scroll .rss-leaderboard-table thead th:nth-child(1),
  .rss-leaderboard-scroll .rss-leaderboard-table tbody td:nth-child(1) {
    position: sticky;
    left: 0;
    z-index: 2;
    width: 34px;
    min-width: 34px;
    box-sizing: border-box;
    background: #fff;
  }
  /* Freeze column 2 — the Team column, pinned just right of the # column */
  .rss-leaderboard-scroll .rss-leaderboard-table thead th:nth-child(2),
  .rss-leaderboard-scroll .rss-leaderboard-table tbody td:nth-child(2) {
    position: sticky;
    left: 34px;                        /* = the # column's width above */
    z-index: 2;
    background: #fff;
    box-shadow: 2px 0 4px -2px rgba(0, 0, 0, 0.15); /* subtle edge shadow */
  }
}

/* ════════════════════════════════════════════════════════════════════
   STREAK TABLES (Top Streaks) — mobile horizontal scroll
   ────────────────────────────────────────────────────────────────────
   WHAT THIS DOES
   On phones, the Top Streaks tables (Winning / Losing / Point-or-Unbeaten
   / Winless) cram five columns into the screen and the text wraps, often
   several times. These rules freeze the # and Team columns and let the
   last three columns (Games / Dates / Probability) scroll sideways inside
   the table, so nothing wraps. The white card stays full-width — only the
   innercolumns move. Desktop is untouched. Shared by USA + UEFA.
 
   REQUIRES (already in your deployed templates):
   • each streak table wrapped in   <div class="rss-streak-scroll"> … </div>
   • the table itself carries        class="rss-leaderboard-table rss-streak-table"
   If the scroll ever stops working, check those two classes are present.
 
   ONE KNOB
   • "600px" = the screen width below which the freeze/scroll turns on
     (phones). The two "34px" values are the frozen # column's width and
     the Team column's left offset — keep them equal to each other.
   ════════════════════════════════════════════════════════════════════ */
.rss-streak-scroll {
  width: 100%;
}
 
@media (max-width: 600px) {
  .rss-streak-scroll {
    overflow-x: auto;                  /* sideways scroll only when needed */
    -webkit-overflow-scrolling: touch; /* smooth momentum scrolling on iOS */
  }
  .rss-streak-table {
    width: auto;       /* let the table grow past the card so it can scroll */
    min-width: 100%;   /* but never narrower than the card */
  }
  .rss-streak-table thead th,
  .rss-streak-table tbody td {
    white-space: nowrap;               /* stop the multi-line text wrapping */
  }
  /* Freeze column 1 — the # / rank column */
  .rss-streak-table thead th:nth-child(1),
  .rss-streak-table tbody td:nth-child(1) {
    position: sticky;
    left: 0;
    z-index: 2;
    width: 34px;
    min-width: 34px;
    box-sizing: border-box;
    background: #fff;
  }
  /* Freeze column 2 — the Team column, pinned just right of the # column */
  .rss-streak-table thead th:nth-child(2),
  .rss-streak-table tbody td:nth-child(2) {
    position: sticky;
    left: 34px;                        /* = the # column's width above */
    z-index: 2;
    background: #fff;
    box-shadow: 2px 0 4px -2px rgba(0, 0, 0, 0.15); /* subtle edge shadow */
  }
}

/* Streaks table */
.rss-streaks-table {
  width: 100%;
  border-collapse: collapse;
  background: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
  font-variant-numeric: tabular-nums;
}

.rss-streaks-table thead th {
  background: #002744;
  color: white;
  font-family: 'Bebas Neue', sans-serif;
  font-size: 14px;
  letter-spacing: 1px;
  padding: 10px 12px;
  text-align: left;
  font-weight: normal;
}

.rss-streaks-table thead th.num,
.rss-streaks-table thead th.dates {
  text-align: right;
}

.rss-streaks-table tbody td {
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  color: #1C1C1C;
  padding: 9px 12px;
  border-bottom: 1px solid #eee;
}

.rss-streaks-table tbody td.num {
  text-align: right;
  font-weight: 600;
}

.rss-streaks-table tbody td.dates {
  text-align: right;
  color: #777;
  font-size: 14px;
}

.rss-streaks-table tbody tr:last-child td {
  border-bottom: none;
}

.rss-streaks-table tbody tr:hover {
  background: #fafafa;
}

/* Win distribution table */
.rss-distribution-table {
  width: 100%;
  border-collapse: collapse;
  background: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
  font-variant-numeric: tabular-nums;
}

.rss-distribution-table thead th {
  background: #002744;
  color: white;
  font-family: 'Bebas Neue', sans-serif;
  font-size: 14px;
  letter-spacing: 1px;
  padding: 10px 12px;
  text-align: left;
  font-weight: normal;
}

.rss-distribution-table thead th.num {
  text-align: right;
}

.rss-distribution-table tbody td {
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  color: #1C1C1C;
  padding: 9px 12px;
  border-bottom: 1px solid #eee;
}

.rss-distribution-table tbody td.num {
  text-align: right;
}

.rss-distribution-table tbody tr:last-child td {
  border-bottom: none;
}

.rss-distribution-table tbody tr:hover {
  background: #fafafa;
}


/* -----------------------------------
   20. Responsive
----------------------------------- */

/* Header & footer — stack on narrow screens */
@media (max-width: 600px) {
  .site-header-bar {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  /* Shrink the brand on phones so it doesn't wrap to a second line.
     "RETRO STAT SPORTS" at Graduate 36px + 1.5px letter-spacing exceeds
     a 380px viewport's content width. The brand is also less of a focal
     element on phones (no nav next to it), so it can afford to be
     smaller without hurting hierarchy. */
  .site-brand {
    font-size: 28px;
  }

  .site-nav {
    gap: 16px;
  }

  .site-footer-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
}

/* Homepage — adapt grids and hero for tablet/phone */
@media (max-width: 900px) {
  .rss-hero {
    padding: 32px 24px;
  }

  .rss-hero-subtitle {
    font-size: 14px;
  }

  .rss-stats-strip {
    grid-template-columns: repeat(2, 1fr);
  }

  .rss-league-section {
    padding: 22px;
  }

  .rss-how-grid {
    grid-template-columns: 1fr;
    gap: 18px;
  }
}

@media (max-width: 480px) {
  .rss-hero-buttons {
    flex-direction: column;
  }

  .rss-btn {
    text-align: center;
  }

  .rss-stat-value {
    font-size: 32px;
  }

  .rss-league-grid {
    /* Single column on phones. Two columns at this width forced the
       longest league names ("Women's National Basketball Association",
       "All-America Football Conference") to overflow horizontally
       since the meta text can't wrap narrow enough to fit half the
       viewport — easier to give each tile the full row. */
    grid-template-columns: 1fr;
  }

  .rss-league-tile {
    padding: 14px;
  }

  /* Single-column phone layout: each tile takes the full row, so the
     1.25/1 desktop ratio would render very tall (often 300px+) and waste
     vertical space. Elongate to 2/1 — same rationale as the season
     cards going to 2.5/1 below 1000px, but a touch taller because
     homepage tiles have three stacked elements (icon + name + meta)
     versus the season card's flatter content. */
  .rss-league-tile.has-icon {
    aspect-ratio: 2 / 1;
  }
}

/* Tablet range (481px–900px): tiles are still multi-column but each is
   noticeably wider than on desktop's 5-column layout. The desktop 1.25/1
   ratio still makes them feel a bit too tall at this width, so we
   elongate them slightly to 1.5/1. Using a min-width here so the more
   aggressive mobile 2/1 rule above (which fires at ≤480px) still
   wins for phones. */
@media (min-width: 481px) and (max-width: 900px) {
  .rss-league-tile.has-icon {
    aspect-ratio: 1.5 / 1;
  }
}

/* League page — adapt header, story grid, season tiles for tablet/phone */
@media (max-width: 900px) {
  .rss-league-page-title {
    font-size: 28px;
  }

  /* Mirror the league-page-title mobile override on the shared
     season-title class so all three page types collapse identically. */
  .rss-season-title {
    font-size: 28px;
  }

  /* Top row collapses to single column: live callout on top, stories below.
     Story cards revert to natural (auto) height since they're no longer
     stretching to match the live callout. */
  .rss-top-row {
    grid-template-columns: 1fr;
  }

  .rss-story-stack .rss-story-card {
    flex: initial;
  }

  .rss-side-tiles .rss-nav-tile {
    flex: initial;
  }

  .rss-story-grid {
    grid-template-columns: 1fr;
  }

  .rss-browse-callout {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* Season tiles collapse to 1 column on narrower screens (phones, narrow tablets) */
/* Season grid responsive progression — 5 columns at full desktop,
   2 columns at tablet, 1 column on phones. Tile font sizes stay
   identical at every breakpoint so the design reads consistently
   regardless of viewport. */
@media (max-width: 1000px) {
  .rss-season-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  /* Below 1000px (tablet 2-col AND phone 1-col): elongate the tiles so
     content fills the width without huge wasted vertical space. Phone
     inherits this same ratio (no override below) so all sub-desktop
     breakpoints render the tiles identically. */
  .rss-season-card {
    aspect-ratio: 2.5 / 1;
  }
  .rss-franchise-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px 24px;
  }
}

@media (max-width: 500px) {
  .rss-season-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  /* Season-card aspect-ratio intentionally NOT overridden here — phone
     inherits the 2.5/1 ratio from the tablet @media block above so
     tablet and phone tiles render at the same size. */
  .rss-franchise-list {
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
  }
  .rss-franchise-panel {
    padding: 16px 18px;
  }
  .rss-franchise-panel-link {
    padding: 14px 18px;
  }
}

/* Coming soon placeholder — reduce padding on phones */
@media (max-width: 600px) {
  .rss-coming-soon {
    padding: 40px 24px;
  }

  .rss-coming-soon-title {
    font-size: 28px;
  }

  .rss-coming-soon-icon {
    font-size: 44px;
  }
}

/* Season detail page — adapt header, cards, standings, bracket */
@media (max-width: 900px) {
  .rss-season-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .rss-season-title {
    font-size: 24px;
  }

  .rss-headline-cards {
    grid-template-columns: repeat(2, 1fr);
  }

  .rss-bracket-league .rss-bracket-round {
    flex: 1 1 100%;   /* each round takes the full row, stacking vertically */
    margin-right: 0;
    margin-bottom: 16px;
  }

  .rss-bracket-league .rss-bracket-round:last-child {
    margin-bottom: 0;
  }
}

@media (max-width: 600px) {
  .rss-tab {
    padding: 10px 12px;
    font-size: 14px;
  }

  .rss-headline-cards {
    grid-template-columns: 1fr;
  }

  /* Hide RS/RA in standings table on phones */
  .rss-standings-table .mobile-hide {
    display: none;
  }

  .rss-standings-table thead th,
  .rss-standings-table tbody td {
    padding: 8px 8px;
    font-size: 14px;
  }

  .rss-season-title {
    font-size: 24px;
  }

  .rss-bracket-league {
    padding: 16px 18px;
  }

  .rss-bracket-ws {
    padding: 18px 20px;
  }

  .rss-bracket-ws-title {
    font-size: 20px;
  }
}

/* Regular Season tab — responsive behavior */
@media (max-width: 900px) {
  .rss-leaderboard-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  /* Streaks table — hide date columns on phones */
  .rss-streaks-table thead th.dates,
  .rss-streaks-table tbody td.dates {
    display: none;
  }

  .rss-streaks-table thead th,
  .rss-streaks-table tbody td {
    padding: 8px;
    font-size: 14px;
  }

  /* Win distribution — hide outer percentiles on phones, keep p25/p50/p75 */
  .rss-distribution-table thead th:nth-child(3),
  .rss-distribution-table tbody td:nth-child(3),
  .rss-distribution-table thead th:last-child,
  .rss-distribution-table tbody td:last-child {
    display: none;
  }

  .rss-distribution-table thead th,
  .rss-distribution-table tbody td {
    padding: 8px;
    font-size: 14px;
  }

  .rss-leaderboard {
    padding: 14px 16px;
  }

  .rss-leaderboard-table thead th,
  .rss-leaderboard-table tbody td {
    padding: 7px 6px;
    font-size: 14px;
  }

  /* Detailed standings — already has mobile-hide on score-diff cols,
     also hide Sim Range to keep it readable. Font size stays at the
     desktop 12px (inherited from the base rule) — no override needed. */
  .rss-standings-detailed thead th,
  .rss-standings-detailed tbody td {
    padding: 6px 6px;
  }
}

/* -----------------------------------
   20. Season Detail Page — Season Summary, H2H, Charts
----------------------------------- */

/* Filter row (above season summary) */
.rss-table-filter {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 14px;
  font-family: 'Inter', sans-serif;
  font-size: 12px;
}

.rss-table-filter label {
  color: #555;
}

.rss-filter-select {
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  padding: 6px 10px;
  border: 1.5px solid #ddd;
  border-radius: 6px;
  background: white;
  color: #1C1C1C;
  cursor: pointer;
}

.rss-filter-select:hover {
  border-color: #002744;
}

/* Big season summary table — scrolls horizontally on narrow screens */
.rss-season-summary-wrap {
  overflow-x: auto;
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
}

.rss-season-summary-table {
  width: 100%;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
  font-family: 'Inter', sans-serif;
}

.rss-season-summary-table thead th {
  background: #002744;
  color: white;
  font-family: 'Bebas Neue', sans-serif;
  font-size: 14px;
  letter-spacing: 1px;
  padding: 10px 10px;
  text-align: left;
  font-weight: normal;
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
}

.rss-season-summary-table thead th.num {
  text-align: right;
}

.rss-season-summary-table thead th:hover {
  background: #003c66;
}

/* Tablesort indicator caret */
.rss-season-summary-table thead th[aria-sort]::after {
  content: ' ↕';
  opacity: 0.4;
  font-size: 10px;
}
.rss-season-summary-table thead th[aria-sort="ascending"]::after  { content: ' ↑'; opacity: 1; }
.rss-season-summary-table thead th[aria-sort="descending"]::after { content: ' ↓'; opacity: 1; }

.rss-season-summary-table tbody td {
  font-size: 14px;
  color: #1C1C1C;
  padding: 8px 10px;
  border-bottom: 1px solid #eee;
  white-space: nowrap;
}

.rss-season-summary-table tbody td.num {
  text-align: right;
}

.rss-season-summary-table tbody td.team {
  font-weight: 500;
}

.rss-season-summary-table tbody tr:last-child td {
  border-bottom: none;
}

.rss-season-summary-table tbody tr:hover {
  background: #fafafa;
}

/* Head-to-head matrices */
.rss-h2h-block {
  display: none;
}

.rss-h2h-block.active {
  display: block;
}

.rss-h2h-wrap {
  overflow-x: auto;
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
}

.rss-h2h-table {
  width: 100%;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
  font-family: 'Inter', sans-serif;
}

.rss-h2h-table thead th {
  background: #002744;
  color: white;
  font-family: 'Bebas Neue', sans-serif;
  font-size: 14px;
  letter-spacing: 1px;
  padding: 9px 8px;
  text-align: center;
  font-weight: normal;
}

.rss-h2h-table thead th.team {
  text-align: left;
}

.rss-h2h-table tbody td {
  font-size: 14px;
  padding: 6px 8px;
  border-bottom: 1px solid #f0f0f0;
  text-align: center;
  min-width: 64px;             /* enough breathing room for record + expected stacked */
}

.rss-h2h-table tbody td.team {
  background: #fafafa;
  font-weight: 500;
  text-align: left;
  white-space: nowrap;
}

.rss-h2h-record {
  font-weight: 600;
  white-space: nowrap;
}

.rss-h2h-expected {
  font-size: 12px;
  color: #888;
  margin-top: 1px;
  white-space: nowrap;
}

.rss-h2h-self {
  background: #f5f5f5;
  color: #aaa;
}

/* Color hint for over/underperformance vs expected wins.
   Navy vs goldenrod is a colorblind-safe pair (cool blue vs warm yellow,
   not the red/green that's hardest to distinguish for RGCB viewers).
   Opacities are 15% / 20% — enough to read as a tint, not so saturated
   they shout over the record text. */
.rss-h2h-over {
  background: rgba(0, 39, 68, 0.15);
}

.rss-h2h-over .rss-h2h-record {
  color: #002744;
  font-weight: 700;
}

.rss-h2h-under {
  background: rgba(184, 134, 11, 0.22);
}

.rss-h2h-under .rss-h2h-record {
  color: #7C5A0A;       /* darker goldenrod for AA contrast on the tinted bg */
  font-weight: 700;
}

/* Inline legend that sits between the H2H subtitle and the matrices.
   Shows three sample cells (over / under / neutral) so the color convention
   is unmistakable without needing to scan the prose. */
.rss-h2h-legend {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  margin: 8px 0 14px;
  font-family: 'Inter', sans-serif;
  font-size: 12px;
}

.rss-h2h-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.rss-h2h-legend-swatch {
  display: inline-block;
  width: 32px;
  height: 18px;
  border-radius: 3px;
  border: 1px solid #e0e0e0;
  vertical-align: middle;
}

.rss-h2h-legend-swatch.rss-h2h-over   { background: rgba(0, 39, 68, 0.15); border-color: rgba(0, 39, 68, 0.3); }
.rss-h2h-legend-swatch.rss-h2h-under  { background: rgba(184, 134, 11, 0.22); border-color: rgba(184, 134, 11, 0.4); }
.rss-h2h-legend-swatch.rss-h2h-neutral { background: white; }

/* Chart frame */
.rss-chart-frame {
  background: white;
  border-radius: 8px;
  padding: 16px 0;            /* vertical padding only — keeps 1160-wide charts within container */
  /* Mobile: when the chart is wider than the screen, let the frame scroll
     horizontally rather than clipping the chart. overflow-y stays hidden so
     the rounded corners still clip the chart top/bottom cleanly. */
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
  text-align: center;
}

/* Center the Plotly chart (it has explicit pixel width set in layout) */
.rss-chart-frame > div,
.rss-chart-frame .js-plotly-plot,
.rss-chart-frame .plotly-graph-div {
  margin: 0 auto;
}

.rss-chart-empty {
  text-align: center;
  color: #888;
  padding: 40px 20px;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
}


@media (max-width: 900px) {
  .rss-season-summary-table thead th,
  .rss-season-summary-table tbody td {
    padding: 7px 8px;
    font-size: 14px;
  }

  .rss-h2h-table thead th,
  .rss-h2h-table tbody td {
    padding: 5px 6px;
    font-size: 14px;
  }
}

@media (max-width: 600px) {
  .rss-table-filter {
    flex-direction: column;
    align-items: flex-start;
  }

  .rss-season-summary-table thead th,
  .rss-season-summary-table tbody td {
    font-size: 14px;
    padding: 6px 6px;
  }
}

/* -----------------------------------
   21. Season Detail Page — Scoring Distribution (2x2 grid)
----------------------------------- */

.rss-scoring-filter {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 16px;
  font-family: 'Inter', sans-serif;
  font-size: 12px;
}

.rss-scoring-filter label {
  color: #555;
}

.rss-scoring-grid {
  display: grid;
  /* minmax(0, 1fr) prevents columns from growing past their share when
     content (Plotly) wants more space. Plain "1fr" defaults to minmax(auto, 1fr)
     which lets the grid track expand to fit content — exactly what we don't
     want here. */
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 16px;
}

.rss-scoring-cell {
  background: white;
  border-radius: 8px;
  padding: 14px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
  min-width: 0;       /* allow cell to shrink below content's intrinsic width */
  overflow: hidden;   /* safety net so a too-wide chart can't escape its cell */
  display: flex;
  flex-direction: column;
}

/* Scatter chart sits in a normal cell, but the chart div itself enforces
   the 1:1 aspect ratio. This is more reliable than putting aspect-ratio on
   the cell with a flex child — some browsers don't fully resolve the
   flex+aspect-ratio combination before Plotly first measures the div. */
.rss-cell-square {
  /* No aspect-ratio here anymore — the chart inside handles it */
}

.rss-chart-mini {
  width: 100%;
  height: 332px;
}

.rss-chart-square {
  width: 100%;
  aspect-ratio: 1 / 1;
}

/* Stats card (bottom-right of grid) */
.rss-stats-card {
  width: 100%;
  display: flex;
  flex-direction: column;
}

.rss-stats-card-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 14px;
  letter-spacing: 1.5px;
  color: #555;
  margin: 0 0 14px;
  text-align: center;
  text-transform: uppercase;
}

.rss-stats-table {
  width: 100%;
  border-collapse: collapse;
  font-family: 'Inter', sans-serif;
  font-variant-numeric: tabular-nums;
  margin: auto 0;
}

.rss-stats-table tbody td {
  font-size: 14px;
  color: #1C1C1C;
  padding: 9px 6px;
  border-bottom: 1px solid #f0f0f0;
}

.rss-stats-table tbody td.num {
  text-align: right;
  font-weight: 600;
  color: #002744;
}

.rss-stats-table tbody tr:last-child td {
  border-bottom: none;
}

@media (max-width: 900px) {
  .rss-scoring-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .rss-scoring-filter {
    flex-direction: column;
    align-items: flex-start;
  }

  .rss-stats-table tbody td {
    font-size: 14px;
    padding: 7px 4px;
  }
}

/* -----------------------------------
   22. Model Insights tab — HFA, heatmaps, scatters
----------------------------------- */

/* Subsection titles (e.g., "By Division", "By League / Overall") */
.rss-subsection-title {
  font-family: 'Barlow Semi Condensed', sans-serif;
  font-size: 18px;
  font-weight: 500;
  color: #002744;
  letter-spacing: 0.5px;
  margin: 28px 0 12px;
  text-align: center;
  text-transform: uppercase;
}

/* Heatmap blocks behave like H2H blocks — hidden by default, shown when active */
.rss-heatmap-block {
  display: none;
}

.rss-heatmap-block.active {
  display: block;
}

/* ----- Generic switcher bar (used for finish-pos heatmaps + sim-scatter toggle) ----- */
/* Buttons are left-justified under the section header, matching the
   "buttons under the header, left-aligned" pattern used everywhere now. */
.rss-switcher-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 8px;
  margin: 16px 0 16px;
}

.rss-switcher-btn {
  font-family: 'Inter Tight', sans-serif;
  font-size: 14px;
  font-weight: 500;
  background: white;
  color: #1C1C1C;
  border: 1.5px solid #ddd;
  border-radius: 6px;
  padding: 6px 14px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.rss-switcher-btn:hover {
  background: #f4f4f4;
}

.rss-switcher-btn.active {
  background: #002744;
  color: #fff;
  border-color: #002744;
}

.rss-switcher-block {
  display: none;
}

.rss-switcher-block.active {
  display: block;
}

/* Scoreline heatmap blocks — same show/hide pattern as switcher blocks,
   but driven by a dropdown picker (rss-table-filter pattern) rather
   than the button-bar switcher. The dropdown change handler in
   base.html toggles .active. */
.rss-scoreline-block {
  display: none;
}

.rss-scoreline-block.active {
  display: block;
}

/* Spacing between stacked chart frames in Model Insights */
.rss-section .rss-chart-frame + .rss-chart-frame {
  margin-top: 24px;
}

/* -----------------------------------
   23. Playoffs tab — leaderboard-style tables (full width, centered cells)
----------------------------------- */

/* Playoff tables are full-width single-column (vs the 2-col grid that
   Top Overachievers / Streaks use). Keep all the leaderboard styling —
   white card, Bebas headers, Inter body — but stretch full width and
   center the numeric cells (which the user prefers for percentages). */
.rss-leaderboard.rss-playoff-table {
  margin: 0 auto;
  width: 100%;
}

/* Center the percentage columns (override leaderboard's default right-align) */
.rss-leaderboard.rss-playoff-table .rss-leaderboard-table thead th.num,
.rss-leaderboard.rss-playoff-table .rss-leaderboard-table tbody td.num {
  text-align: center;
}

/* Subsection heading inside a playoff section (e.g., "Bracket Sim Outcomes",
   "Matchup Probabilities by Round") */
.rss-subsection-title {
  font-family: 'Barlow Semi Condensed', sans-serif;
  font-size: 18px;
  color: #002744;
  margin: 28px 0 12px;
  font-weight: 600;
}

/* -----------------------------------
   24. Playoffs tab — path cards
----------------------------------- */

/* Container for the most-likely-path cards */
.rss-playoff-paths {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.rss-playoff-path-card {
  background: white;
  border-radius: 8px;
  padding: 20px 24px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
}

.rss-playoff-path-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 16px;
  font-family: 'Barlow Semi Condensed', sans-serif;
}

.rss-playoff-path-header .rss-team-name {
  font-size: 20px;
  font-weight: 600;
  color: #002744;
}

.rss-playoff-path-pct {
  font-size: 16px;
  color: #555;
  font-weight: 500;
}

.rss-playoff-path-steps {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 10px;
  font-family: 'Inter', sans-serif;
}

.rss-playoff-path-step {
  background: #f4f6f8;
  border-radius: 8px;
  padding: 12px 16px;
  min-width: 180px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.rss-playoff-path-round {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #777;
  font-weight: 600;
}

.rss-playoff-path-opp {
  color: #1C1C1C;
  font-size: 14px;
  margin-bottom: 6px;
}

.rss-playoff-path-opp strong {
  color: #002744;
  font-weight: 600;
}

.rss-playoff-path-stats {
  display: flex;
  gap: 16px;
  border-top: 1px solid #e6e9ec;
  padding-top: 8px;
  margin-top: auto;
}

.rss-playoff-path-stat {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.rss-playoff-path-stat-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: #888;
  font-weight: 500;
}

.rss-playoff-path-stat-value {
  font-size: 16px;
  font-weight: 600;
  color: #002744;
  font-variant-numeric: tabular-nums;
  margin-top: 2px;
}

.rss-playoff-path-arrow {
  color: #888;
  font-size: 20px;
  font-weight: 600;
  display: flex;
  align-items: center;
}

/* Switcher bar that wraps onto multiple lines when there are many tabs
   (used by the championship-paths section with 12 teams) */
.rss-switcher-bar-wrap {
  flex-wrap: wrap;
  row-gap: 8px;
}

/* Champion column on success tables — slight emphasis */
.rss-leaderboard.rss-playoff-table .rss-leaderboard-table td.rss-td-champ {
  font-weight: 600;
  color: #002744;
}

/* ============================================================
   Game Logs tab — three tables (plus optional upcoming).
   Style matches the season-summary tables. Overall game log
   and upcoming-games tables wrap in a scrollable container
   with a sticky header so the column labels stay visible
   while scrolling through ~160+ rows.
   ============================================================ */

.rss-gamelog-scroll {
  max-height: 600px;
  overflow-y: auto;
  overflow-x: auto;
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
  margin-top: 12px;
}

.rss-gamelog-wrap {
  overflow-x: auto;
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
  margin-top: 12px;
}

.rss-gamelog-table {
  width: 100%;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
  font-family: 'Inter', sans-serif;
}

/* Two-row sticky thead. The grouping (Selected Team / Opponent / Win
   Probabilities) sits above the field labels; both rows stick to the
   top of the scroll container together. */
.rss-gamelog-table thead {
  position: sticky;
  top: 0;
  z-index: 4;   /* bumped from 2 so body sticky cells (z-index 3) don't overlap header on vertical scroll */
}

.rss-gamelog-table thead th {
  background: #002744;
  color: white;
  font-family: 'Bebas Neue', sans-serif;
  letter-spacing: 1px;
  padding: 8px 10px;
  text-align: left;
  font-weight: normal;
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
}

.rss-gamelog-table thead th.rss-gamelog-grouphead {
  background: #003c66;
  text-align: center;
  font-size: 14px;
  letter-spacing: 0.8px;
  cursor: default;
}

.rss-gamelog-table thead th.rss-gamelog-th {
  font-size: 14px;
}

.rss-gamelog-table thead th.num {
  text-align: center;
}

.rss-gamelog-table thead th.rss-gamelog-th:hover {
  background: #003c66;
}

/* Tablesort caret indicator (same as season summary) */
.rss-gamelog-table thead th.rss-gamelog-th[aria-sort]::after {
  content: ' ↕';
  opacity: 0.4;
  font-size: 10px;
}
.rss-gamelog-table thead th.rss-gamelog-th[aria-sort="ascending"]::after  { content: ' ↑'; opacity: 1; }
.rss-gamelog-table thead th.rss-gamelog-th[aria-sort="descending"]::after { content: ' ↓'; opacity: 1; }

.rss-gamelog-table tbody td {
  font-size: 14px;
  color: #1C1C1C;
  padding: 6px 10px;
  border-bottom: 1px solid #eee;
  white-space: nowrap;
}

.rss-gamelog-table tbody td.num {
  text-align: center;
}

.rss-gamelog-table tbody td.team {
  font-weight: 500;
}

.rss-gamelog-table tbody tr:last-child td {
  border-bottom: none;
}

.rss-gamelog-table tbody tr:hover {
  background: #fafafa;
}

/* Explicit left-alignment for Date and Opponent columns in the game logs.
   thead defaults to left already, but tbody td needs an explicit class so
   the alignment is self-documenting in the HTML and doesn't depend on the
   absence of a `num` class. */
.rss-gamelog-table thead th.text-left,
.rss-gamelog-table tbody td.text-left {
  text-align: left;
}

/* Vertical separators in the game logs. Applied to the cell that should
   show a divider on its RIGHT, creating clean visual breaks between groups
   of related columns. In the overall log: after Score (separating game
   context from pregame model state) and after Loss % (separating pregame
   model state from the model's reaction + running record). */
.rss-gamelog-table th.rss-vsep-right,
.rss-gamelog-table td.rss-vsep-right {
  border-right: 1px solid #cbd5db;
}

/* W/L/T color coding on the Score cell. Subtle — these tables already have
   plenty going on visually; the goal is a fast at-a-glance read, not a
   rainbow. The result letter shares the cell with the "4-2" score. */
.rss-gamelog-table tbody td.rss-result-w { color: #006633; font-weight: 500; }
.rss-gamelog-table tbody td.rss-result-l { color: #A4161A; font-weight: 500; }
.rss-gamelog-table tbody td.rss-result-t { color: #555;    font-weight: 500; }

/* Elo Δ accent in the Biggest Elo Changes table. The values shown there are
   always the magnitude of the swing from the winning team's perspective — so
   they read as "the model learned this much from this game" and a single
   positive accent color is the right semantic. Same green as a W result. */
.rss-gamelog-table tbody td.rss-elo-change { color: #006633; font-weight: 500; }

/* Playoff "no games" empty-state message (Game Logs tab). When the single
   team filter selects a team with no playoff rows, the playoff table shows
   one centered message row instead of going blank. */
.rss-gamelog-empty-cell {
  text-align: center;
  font-style: italic;
  color: #888;
  padding: 18px 16px;
}

/* Asterisk marker for playoff games in the Biggest Upsets and Biggest Elo
   Changes tables. Subtle goldenrod color and bold weight pulls the eye without
   shouting. Inline span so it sits right after the date inside the same cell. */
.rss-playoff-marker {
  color: #B8860B;
  font-weight: 700;
  margin-left: 2px;
  cursor: help;
}

/* H2H section now has TWO matrices per division (within + outside).
   This subtitle separates them with a clear label. */
.rss-h2h-subtitle {
  font-family: 'Barlow Semi Condensed', sans-serif;
  font-size: 14px;
  color: #002744;
  margin: 18px 0 8px;
  font-weight: 600;
  letter-spacing: 0.3px;
}

.rss-h2h-subtitle:first-child {
  margin-top: 4px;
}

/* Vertical separators in the Season Summary table. Applied to the FIRST column
   after each separator point so it gets a left border. Groups the table into
   three logical bands: identity (Team/League/Division), key stats (Elo/Actual/
   Avg/Luck/Percentile), and distribution stats (Min/5th/Q1/Median/Q3/95th/Max). */
.rss-season-summary-table th.rss-vsep,
.rss-season-summary-table td.rss-vsep {
  border-left: 1px solid #cbd5db;
}

/* Vertical separators in the Standings table — same visual treatment as the
   Season Summary table (1px #cbd5db left border). Applied to the FIRST column
   after each logical grouping. The semantic groupings are:
     1. Identity     — # / Team
     2. Results      — GP / W / D / L / [T] / [OTL]
     3. Rankings     — Pts (UEFA) or Pct+GB / Pts+Pt% (USA)
     |                 ← vsep here (between rankings and scoring stats)
     4. Scoring      — GF / GA / GD (UEFA) or PF / PA / PD (USA)
     |                 ← vsep here (between scoring stats and model)
     5. Model        — SimPts / vsSim (UEFA) or SimW / vsSim (USA)
   The same class works across UEFA and USA tables because both macros render
   into .rss-standings-table. */
.rss-standings-table th.rss-vsep,
.rss-standings-table td.rss-vsep {
  border-left: 1px solid #cbd5db;
}

/* Bold-weight body text in the UEFA Pts column — Pts is the canonical
   ranking metric for European league tables, so emphasizing it
   visually anchors the row. Applies only to body cells (the header
   stays in the existing Bebas Neue all-caps font, which is already
   heavy enough). */
.rss-standings-table tbody td.rss-pts-bold {
  font-weight: 700;
}

/* Overview tab — Playoff Probability split layout (live seasons only).
   Left column holds the Top 10 table; right column stacks gainers and losers.
   Uses CSS Grid with strict 1fr 1fr columns to match the Recent Elo Movers
   layout below — flexbox lets content width drag column widths, which is what
   was causing the right column to overlap the left. min-width:0 lets grid items
   shrink past their content's intrinsic width if needed.
   Note: no `width: 100%` rule on the nested .rss-leaderboard cards on purpose.
   Without a global `box-sizing: border-box` reset, width:100% + padding would
   make each card 40px wider than its grid cell (content-box semantics), which
   produces visible overlap. Grid + flex handle widths correctly with the
   default width:auto. */
.rss-overview-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  align-items: start;
}

.rss-overview-left,
.rss-overview-right {
  min-width: 0;
}

.rss-overview-right {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

@media (max-width: 900px) {
  .rss-overview-split {
    grid-template-columns: 1fr;
  }
}

/* Year navigation — prev/next links to adjacent season pages of the same sport.
   Sits in the breadcrumb row, right-aligned. Matches the user's existing site
   convention (←2023  2025→ style next to the breadcrumb). */
.rss-breadcrumb-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;       /* align text baselines so left and right line up */
  gap: 16px;
  flex-wrap: wrap;
  margin: 24px 0 16px;          /* spacing moved from .rss-breadcrumb so the row aligns */
}

.rss-year-nav {
  display: flex;
  gap: 18px;
  align-items: center;
}

.rss-year-nav a {
  color: #002744;
  text-decoration: none;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.2px;
  transition: color 0.15s ease;
}

.rss-year-nav a:hover {
  color: #A4161A;
  text-decoration: underline;
}

/* Tier navigation — sibling-league links on UEFA landing pages.
   Lives on the right side of the breadcrumb row (same container,
   .rss-breadcrumb-row), so vertical spacing matches season pages
   automatically. The current tier renders as a non-link span with
   .rss-tier-nav-current (bold navy, no hover). */
.rss-tier-nav {
  display: flex;
  gap: 18px;
  align-items: center;
  flex-wrap: wrap;     /* fall to a second line on narrow screens */
}

.rss-tier-nav a,
.rss-tier-nav-current {
  color: #002744;
  text-decoration: none;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.2px;
  transition: color 0.15s ease;
}

.rss-tier-nav a:hover {
  color: #A4161A;
  text-decoration: underline;
}

.rss-tier-nav-current {
  font-weight: 700;
  cursor: default;
}


/* ============================================================
   Mobile sticky first columns

   When the wrappers above scroll horizontally (< 700px viewports —
   phones and narrow tablets), pin the team column (and rank column
   where it exists) to the left edge so users keep their orientation
   while scrolling through other columns. Without this, scrolling
   right would push team names off-screen, leaving disconnected
   numbers floating in the viewport.

   Three table types are handled:
     1. .rss-standings-table  — [#] [Team] [W] [L] ... [vsSim]
                                rank @ 0, team @ 36px
     2. .rss-leaderboard-table with rank+team
        (Overview's Top Playoff Probs, Recent Movers)
                                rank @ 0, team @ 28px
     3. .rss-leaderboard-table with team-first (no rank)
        (Playoffs tab's Stochastic + Bracket Sim tables)
                                team @ 0

   Implementation notes:
     • Selectors keyed off existing class names (.rank / .team) plus
       :nth-child guards so the team class only sticks when it's in
       position 2 (avoids accidentally sticking the "Actual Outcome"
       column on the bracket-sim table, which also uses class="team").
     • Sticky cells need an explicit background to mask cells scrolling
       behind them. Standings header uses #002744 (navy); body and the
       leaderboard tables use white.
     • z-index ordering: rank > team so the rank column overlays team
       cleanly during scroll (matters when they're both pinned). 4 vs 3
       so they stack above the (non-sticky) header row's z-index when
       Plotly or other content gets stacking contexts above us.
============================================================ */
/* ============================================================
   HEATMAP-AS-TABLE — Finish Position + Playoff Seed Probability
   
   Previously rendered as Plotly imshow figures. Now generated as
   HTML tables (see charts.py _build_heatmap_table_html) so they
   support sticky team column + horizontal scrolling like every
   other data table on the site, while preserving the gradient
   visual via per-cell inline background-color.
   
   Each <td> in the body gets its color via inline style (set in
   Python from the colorscale). Team-column cells are styled via
   class .team to override the gradient with a uniform tinted
   background that pairs with the sticky position.
============================================================ */
.rss-heatmap-wrap {
  overflow-x: auto;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
}

.rss-heatmap-table {
  width: 100%;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
  font-family: 'Inter', sans-serif;
}

.rss-heatmap-table thead th {
  background: #002744;
  color: white;
  font-family: 'Bebas Neue', sans-serif;
  font-size: 14px;
  letter-spacing: 1px;
  padding: 9px 8px;
  text-align: center;
  font-weight: normal;
  white-space: nowrap;
}

.rss-heatmap-table thead th.team {
  text-align: left;
}

.rss-heatmap-table tbody td {
  font-size: 14px;
  padding: 6px 8px;
  text-align: center;
  white-space: nowrap;
  border-bottom: 1px solid #f0f0f0;
}

.rss-heatmap-table tbody td.team {
  background: #fafafa !important;   /* uniform — overrides any inherited gradient */
  color: #1C1C1C !important;
  font-weight: 500;
  text-align: left;
}

/* Sticky first column on heatmap tables */
.rss-heatmap-table thead th:first-child,
.rss-heatmap-table tbody td:first-child {
  position: sticky;
  left: 0;
  z-index: 3;
  box-shadow: 2px 0 4px -2px rgba(0, 0, 0, 0.15);
}
.rss-heatmap-table thead th:first-child { background: #002744; }


/* ============================================================
   PLAYOFF OUTCOMES HEATMAP — Stoch + Actual Bracket tables
   These use .rss-leaderboard-table markup (so they keep the
   existing navy header restyle for .rss-playoff-table) plus an
   .rss-playoff-outcomes-heatmap modifier. Each numeric cell gets
   its gradient background + readable text color inline from
   rendering.py. The team column stays sticky via the existing
   .rss-leaderboard-table sticky rules.
============================================================ */
.rss-playoff-outcomes-heatmap tbody td.num {
  /* Inline background/color set per-cell; reset font weight so the
     gradient does the visual work without competing emphasis. */
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  text-align: center;
}

/* Actual Outcome column on the Actual Bracket Sim table.
   Stays as plain text on the right — no gradient. Subtle navy
   left-border separates it from the heatmap. */
.rss-actual-outcome-header,
.rss-actual-outcome-cell {
  border-left: 2px solid #002744;
}
.rss-actual-outcome-cell {
  background: white !important;
  color: #1C1C1C !important;
  text-align: left;
  font-weight: 500;
  padding: 6px 10px;
  white-space: nowrap;
}





/* ============================================================
   WRAPPER-BG OVERRIDES FOR HEATMAP TABLES
   The standard wrappers (.rss-chart-frame, .rss-leaderboard) include
   white background + vertical padding so Plotly charts and regular
   ranked-list tables get a clean card surround. Heatmap tables look
   wrong inside that — the white bg peeks above/below the cells. Use
   :has() to strip the wrap styling only when a heatmap table is
   inside, leaving non-heatmap usage untouched.
============================================================ */

/* Finish Position + Playoff Seed heatmaps live inside .rss-chart-frame */
.rss-chart-frame:has(.rss-heatmap-table) {
  background: transparent;
  padding: 0;
  box-shadow: none;
  overflow: visible;
}

/* Stochastic Outcomes + Actual Bracket heatmaps live inside .rss-leaderboard */
.rss-leaderboard:has(.rss-playoff-outcomes-heatmap) {
  background: transparent;
  padding: 0;
  box-shadow: none;
}
/* ============================================================
   MATCHUP HEATMAPS — playoff_matchup_heatmap output
   Replaces the previous px.imshow figures. Differs from
   finish-position heatmaps in:
     • Column headers (losing teams) rotated 90° to fit names
     • Top-left corner cell labels both axes ("↓ Winner" / "Loser →")
     • Zero-count cells render truly blank (no bg, no text) since
       many winner/loser combinations are impossible — esp. for
       the cross-conference World Series matrix

   LAYOUT NOTE: matchup tables use table-layout: auto plus width: 100%
   so the data columns share leftover space evenly. When there are
   only a handful of loser columns (e.g., the 4-team National Wild
   Card bracket-sim view), each column gets generously wide; with
   many columns (16-team round) they fall back to their min-width
   and the wrapper scrolls horizontally. The team column gets a
   fixed width so it can't eat the leftover space.

   Known limitation: under auto-layout the browser sizes each data
   column to fit its header text, so columns with longer team names
   (e.g. "Philadelphia Phillies") will be wider than columns with
   short names (e.g. "Chicago Cubs"). Forcing equal data-column
   widths via table-layout: fixed + width: 1% causes the team column
   to balloon when the table has lots of leftover horizontal space.
============================================================ */

.rss-matchup-heatmap {
  /* width: 100% inherited from .rss-heatmap-table is exactly what we want. */
  table-layout: auto;
}

/* Team-name first column — explicit width so it doesn't grow with
   leftover space (without this, with few data columns the team col
   would balloon to fill the table). 180px fits the longest MLB/NFL
   names ("Sacramento Athletics", "Arizona Diamondbacks"). */
.rss-matchup-heatmap thead th.rss-matchup-corner,
.rss-matchup-heatmap tbody td.team {
  width: 180px;
  min-width: 180px;
  max-width: 180px;
}

/* Rotated column headers — text reads bottom-to-top (90°).
   min-width keeps the column from collapsing below a usable size
   (needs to fit "0.0%" comfortably). No max-width: columns are
   free to grow when the table has extra horizontal space. The
   header content always rotates around the cell's center, so the
   label naturally sits over its column. The 140px height gives
   long team names (e.g. "Arizona Diamondbacks") breathing room at
   the top and bottom edges so first/last letters don't touch the
   cell boundary. */
.rss-matchup-heatmap thead th.rss-matchup-th-rotated {
  height: 140px;
  min-width: 60px;
  padding: 6px 0;
  vertical-align: middle;
  white-space: nowrap;
  text-align: center;
  background: #002744;
  font-weight: normal;
  /* font family/size/color inherited from .rss-heatmap-table thead th */
}
.rss-matchup-heatmap thead th.rss-matchup-th-rotated > span {
  display: inline-block;
  transform: rotate(-90deg);
  transform-origin: center;
}

/* Body cells — match column min-width so percentages have room to
   breathe and never overflow the cell. text-align: center keeps
   the value visually centered under its rotated header. */
.rss-matchup-heatmap tbody td {
  padding: 6px 4px;
  font-size: 14px;
  min-width: 60px;
  text-align: center;
}

/* Top-left corner — labels both axes. Same height as rotated
   headers so the header row is uniform. Two stacked labels with
   arrows pointing in the appropriate direction. */
.rss-matchup-heatmap thead th.rss-matchup-corner {
  /* Match rotated-header height so the whole header row aligns. */
  height: 140px;
  padding: 8px 12px;
  vertical-align: bottom;
  background: #002744;
  color: white;
  font-family: 'Bebas Neue', sans-serif;
  font-size: 12px;
  letter-spacing: 1px;
  text-align: left;
  line-height: 1.4;
  /* sticky behavior already inherited from .rss-heatmap-table thead th:first-child */
}
.rss-matchup-heatmap thead th.rss-matchup-corner .rss-matchup-corner-loser {
  margin-bottom: 8px;
}
.rss-matchup-heatmap thead th.rss-matchup-corner .rss-matchup-corner-winner {
  /* no extra rules needed */
}

/* Blank cells — winner/loser combinations that never occurred in
   any simulation. White background (not transparent) so the table's
   bottom edge doesn't blend into the page's gray surround. */
.rss-matchup-heatmap tbody td.rss-matchup-blank {
  background: white;
  border-bottom: 1px solid #f0f0f0;
}

/* Mobile: shrink the team-name column so the table doesn't push way
   off-screen on narrow viewports. Loser columns can still scroll. */
@media (max-width: 600px) {
  .rss-matchup-heatmap thead th.rss-matchup-corner,
  .rss-matchup-heatmap tbody td.team {
    width: 140px;
    min-width: 140px;
    max-width: 140px;
  }
  .rss-matchup-heatmap tbody td.team {
    font-size: 14px;
  }
  .rss-matchup-heatmap thead th.rss-matchup-th-rotated,
  .rss-matchup-heatmap tbody td {
    min-width: 48px;
  }
}


/* ============================================================
   STICKY FIRST COLUMNS — Applied at all viewport widths.
   
   Tables enable horizontal scrolling via their wrapper's overflow-x: auto.
   The leftmost column (rank, team, or date depending on the table) is
   pinned with position: sticky so the most pertinent identifier stays
   visible while scrolling horizontally.
   
   Conventions:
     • Header cells use navy (#002744) to match the dark header bar
     • Body cells use white (or #fafafa for H2H rows where the team
       column is tinted)
     • z-index ordering: rank(4) > team(3) > non-sticky(default) so the
       inner-sticky cell stacks above the outer-sticky neighbor cleanly
     • Subtle right-edge box-shadow signals scrollable content beneath
============================================================ */

/* ----- Standings table: pin BOTH rank and team columns ----- */
.rss-standings-table thead th.rank,
.rss-standings-table tbody td.rank {
  position: sticky;
  left: 0;
  z-index: 4;
}
.rss-standings-table thead th.rank { background: #002744; }
.rss-standings-table tbody td.rank { background: white; }

.rss-standings-table thead th.team,
.rss-standings-table tbody td.team {
  position: sticky;
  left: 36px;            /* sit immediately after the rank column */
  z-index: 3;
}
.rss-standings-table thead th.team { background: #002744; }
.rss-standings-table tbody td.team { background: white; }

/* ----- Leaderboard tables: pin column 1 (rank or team) ----- */
.rss-leaderboard-table thead th:first-child,
.rss-leaderboard-table tbody td:first-child {
  position: sticky;
  left: 0;
  background: white;     /* overridden below for playoff (navy header) tables */
  z-index: 4;
}

/* When team is at position 2 (Overview leaderboards have rank in col 1),
   pin it too at the rank-column width. The :nth-child(2) guard avoids
   accidentally pinning the "Actual Outcome" column on the bracket-sim
   table, which also uses class="team" but lives at the far right. */
.rss-leaderboard-table thead th.team:nth-child(2),
.rss-leaderboard-table tbody td.team:nth-child(2) {
  position: sticky;
  left: 28px;
  background: white;
  z-index: 3;
}

/* ----- Playoff tables (Stochastic + Actual Bracket Sim) use the
   leaderboard markup but now get a navy header treatment. Override
   the sticky background to match. ----- */
.rss-playoff-table .rss-leaderboard-table thead th:first-child,
.rss-playoff-table .rss-leaderboard-table thead th.team:nth-child(2) {
  background: #002744;
}

/* ----- Season Summary table: pin first column (team) ----- */
.rss-season-summary-table thead th:first-child,
.rss-season-summary-table tbody td:first-child {
  position: sticky;
  left: 0;
  z-index: 3;
}
.rss-season-summary-table thead th:first-child { background: #002744; }
.rss-season-summary-table tbody td:first-child { background: white; }

/* ----- H2H table: pin first column (team — already tinted #fafafa) ----- */
.rss-h2h-table thead th:first-child,
.rss-h2h-table tbody td:first-child {
  position: sticky;
  left: 0;
  z-index: 3;
}
.rss-h2h-table thead th:first-child { background: #002744; }
.rss-h2h-table tbody td:first-child { background: #fafafa; }

/* ----- Game-log tables (all 4: regular-season log, playoff log,
   biggest upsets, biggest Elo changes): pin first column.
   
   For tables with two-row headers (Biggest Upsets, Biggest Elo Changes),
   `tr:first-child > th:first-child` confines the sticky-left treatment to
   the rank cell in row 1 (which has rowspan=2). Without this guard, the
   "Team" cell in row 2 — which is :first-child of its row — would also
   stick at left:0 and overlap the rank column when scrolling right.
   
   The corner cell (tr:first-child > th:first-child) gets z-index 5 so it
   stays above other thead cells when scrolling diagonally. ----- */
.rss-gamelog-table thead tr:first-child > th:first-child {
  position: sticky;
  left: 0;
  z-index: 5;
  background: #002744;
}
.rss-gamelog-table tbody td:first-child {
  position: sticky;
  left: 0;
  z-index: 3;
  background: white;
}

/* ----- Scroll-cue shadow on every sticky cell ----- */
.rss-standings-table thead th.rank,
.rss-standings-table tbody td.rank,
.rss-standings-table thead th.team,
.rss-standings-table tbody td.team,
.rss-leaderboard-table thead th:first-child,
.rss-leaderboard-table tbody td:first-child,
.rss-leaderboard-table thead th.team:nth-child(2),
.rss-leaderboard-table tbody td.team:nth-child(2),
.rss-season-summary-table thead th:first-child,
.rss-season-summary-table tbody td:first-child,
.rss-h2h-table thead th:first-child,
.rss-h2h-table tbody td:first-child,
.rss-gamelog-table thead tr:first-child > th:first-child,
.rss-gamelog-table tbody td:first-child {
  box-shadow: 2px 0 4px -2px rgba(0, 0, 0, 0.15);
}

/* ============================================================
   PLAYOFF TABLES (Stochastic + Actual Bracket) — navy header
   override to match the styling of Standings / Season Summary
   (the leaderboard-table base styles are gray-on-white; these
   restyle the playoff use of leaderboard-table to navy-on-white).
============================================================ */
.rss-playoff-table .rss-leaderboard-table thead th {
  background: #002744;
  color: white;
  padding: 10px 10px;
  border-bottom: none;
}


/* ============================================================
   REGULAR SEASON — Section additions

   Three new patterns:
     1. .rss-chart-frame-centered   wraps the GD-vs-Points scatter so
                                    the 800px-wide square chart sits
                                    horizontally centered in the section
                                    rather than left-aligned.
     2. .rss-scoreline-block        the show/hide blocks for the
                                    scoreline-distribution dropdown
                                    picker (one block per team + one
                                    "league" block, with the picker
                                    toggling .active).
     3. .rss-scoreline-row          two-column flex layout: the colored
                                    distribution table on the left,
                                    the summary-stats card on the right.
============================================================ */

/* Center-align a chart inside its section. The chart itself sets its
   own width (800 for GD scatter, 1000 for race/form/ECDF); this just
   removes the default left-align so the chart sits in the middle. */
.rss-chart-frame-centered {
  display: flex;
  justify-content: center;
}

/* Per-team scoreline blocks — show one at a time based on dropdown */
.rss-scoreline-block {
  display: none;
}

.rss-scoreline-block.active {
  display: block;
}

/* Two-column flex: distribution table on the left, stats card on the
   right. Wraps to a single column on narrower viewports. */
.rss-scoreline-row {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  /* stretch makes both cells grow to the height of the taller one,
     so the scoreline table and stats panel always end at the same
     vertical position regardless of which is naturally taller */
  align-items: stretch;
}

.rss-scoreline-table-cell {
  flex: 1 1 480px;
  min-width: 0;
  /* Force the inner table-wrap to fill the full cell height */
  display: flex;
  flex-direction: column;
}

.rss-scoreline-table-cell .rss-scoreline-table-wrap {
  flex: 1;
}

.rss-scoreline-stats-cell {
  flex: 0 1 360px;
  min-width: 280px;
  /* Same stretch trick — stats card grows to match the table */
  display: flex;
  flex-direction: column;
}

.rss-scoreline-stats-cell .rss-stats-card {
  flex: 1;
}


/* ============================================================
   SCORELINE DISTRIBUTION TABLE
   Gradient-colored cells. Marginal totals (column-Total and
   row-Total) are not color-scaled — they use a neutral background
   to differentiate from the data cells.
============================================================ */

.rss-scoreline-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  /* Card styling (white bg / rounded / shadow) removed by request — the
     scoreline table sits flush on the section's page background. The
     Summary Statistics panel next door still keeps its card via
     .rss-stats-card; only this wrap was stripped. */
}

.rss-scoreline-table {
  border-collapse: separate;
  border-spacing: 0;
  font-variant-numeric: tabular-nums;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  min-width: 460px;
  /* No auto-margin — the table sits flush-left inside its scroll wrap
     so the sticky-left column positions predictably. On wide viewports
     the table fills the wrap width via its data cells. */
}

.rss-scoreline-table th,
.rss-scoreline-table td {
  border: 1px solid #e8eaed;
  padding: 8px 10px;
  text-align: center;
  min-width: 56px;
}

.rss-scoreline-table thead th {
  background: #002744;
  color: white;
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.4px;
}

.rss-scoreline-table .rss-scoreline-corner {
  background: #002744;
  color: rgba(255, 255, 255, 0.85);
  font-size: 12px;
  font-style: italic;
  text-align: center;
  letter-spacing: 0;
  /* Corner text is now short and direction-cued ("↓ Scored | Allowed →"
     — set in charts.py). Keep it on a single line at a readable font
     size; the cell will size to its content naturally (~150px) which is
     wider than data-cell width but much narrower than the old verbose
     "{team} Goals \ Opponent Goals" header that was wrapping to 5 lines
     for long team names. */
  white-space: nowrap;
  padding: 8px 12px;
  /* Sticky left: freezes the corner cell when scrolling horizontally
     on mobile. z-index 3 so it sits above the regular rowlabel column
     (z-index 2) and above the data cells. */
  position: sticky;
  left: 0;
  z-index: 3;
}

.rss-scoreline-table .rss-scoreline-rowlabel {
  background: #002744;
  color: white;
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.4px;
  text-align: center;
  /* Sticky left: freezes the row-label column (0/1/2/3/4/5+/Total)
     when scrolling horizontally so the viewer always knows which row
     the visible data cells belong to. */
  position: sticky;
  left: 0;
  z-index: 2;
  /* Slight shadow on the right edge of the sticky column hints at the
     scrollable content beneath (matches the heatmap-table treatment) */
  box-shadow: 2px 0 4px -2px rgba(0, 0, 0, 0.15);
}

.rss-scoreline-table .rss-scoreline-marginal {
  background: #eef0f3;
  color: #1C1C1C;
  font-weight: 500;
  font-style: normal;
}

.rss-scoreline-table .rss-scoreline-grand {
  background: #d8dde3;
  color: #1C1C1C;
  font-weight: 600;
}


/* ============================================================
   SUMMARY-STATS CARD (paired with the scoreline table)
============================================================ */

.rss-stats-card {
  background: white;
  border-radius: 8px;
  padding: 18px 20px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
  /* Include padding in the card's width — without this, the 40px of
     horizontal padding gets ADDED to the flex-item width (360px basis),
     making the card render 400px wide and overflow its parent stats-cell
     by 40px to the right. This stylesheet has no global box-sizing
     reset, so we set it explicitly here. */
  box-sizing: border-box;
}

.rss-stats-card-title {
  font-family: 'Barlow Semi Condensed', sans-serif;
  font-size: 16px;
  letter-spacing: 0.5px;
  color: #1C1C1C;
  margin: 0 0 12px;
}

.rss-stats-table {
  width: 100%;
  border-collapse: collapse;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}

.rss-stats-table td {
  padding: 6px 4px;
  border-bottom: 1px solid #f1f2f4;
}

.rss-stats-table tr:last-child td {
  border-bottom: none;
}

.rss-stats-table td:first-child {
  color: #555;
}

.rss-stats-table td.num {
  text-align: right;
  font-weight: 500;
  color: #1C1C1C;
}


/* ============================================================
   MOBILE: scoreline section overrides
   ----------------------------------
   On narrow viewports the flex two-column layout has to stack the
   table and stats card vertically. We also need to:
     • prevent the stats card from pushing the page wider than the
       viewport (long labels like "Correlation (home vs away score)"
       wrap onto multiple lines instead of forcing horizontal scroll)
     • drop the stats-cell min-width so it shrinks to fit
     • reduce stats-card padding so more horizontal room is available
       for the label text
   The scoreline table itself still has min-width 460px so its inner
   wrapper scrolls horizontally — but only the wrapper scrolls, the
   page does not. The sticky-left column on the table (set earlier)
   keeps the row-labels visible while panning right.
============================================================ */
@media (max-width: 600px) {
  .rss-scoreline-row {
    flex-direction: column;
    gap: 16px;
    /* Don't stretch — let each block size to its content height */
    align-items: stretch;
  }

  .rss-scoreline-table-cell,
  .rss-scoreline-stats-cell {
    flex: 1 1 auto;
    width: 100%;
    min-width: 0;
    /* Belt-and-suspenders: cap at the parent width so nothing
       overflows the page width */
    max-width: 100%;
  }

  .rss-stats-card {
    padding: 14px 14px;
  }

  /* Allow long stat labels to wrap onto multiple lines on mobile —
     "Correlation (home vs away score)" doesn't fit on one line at
     phone widths and was forcing the page to be wider than viewport */
  .rss-stats-table td:first-child {
    white-space: normal;
  }

  /* Make the value column hug its content but stay aligned right.
     Without max-content the value can claim more space than needed
     and squeeze the label column. */
  .rss-stats-table td.num {
    white-space: nowrap;
    padding-left: 12px;
  }
}


/* ============================================================
   NEXT-SEASON STATUS TABLE (Promotion/Relegation tab)
   Reuses .rss-season-summary-table base styling. Adds light tinting
   classes for cells to make magnitudes legible at a glance.
============================================================ */

.rss-next-season-table .rss-status-zero {
  color: #c0c4cb;
}

.rss-next-season-table .rss-status-light {
  background: rgba(159, 180, 197, 0.10);
  color: #1C1C1C;
}

.rss-next-season-table .rss-status-moderate {
  background: rgba(159, 180, 197, 0.35);
  color: #1C1C1C;
  font-weight: 500;
}

.rss-next-season-table .rss-status-strong {
  background: rgba(0, 39, 68, 0.85);
  color: white;
  font-weight: 600;
}


/* -----------------------------------
   Editorial notes (Overview tab)
   League Changes + Tiebreakers — bullet-list editorial supplements
   shown on the Overview tab when the corresponding column in
   seasons.csv has content.

   The section heading uses the standard .rss-section-title so it
   matches every other section's hierarchy. The bullets live inside
   a white card (.rss-notes-box) borrowing the bracket-league look:
   rounded corners, subtle drop shadow, and a 6px accent border on
   the left in either navy (#002744) or red (#A4161A) depending on
   which section it is. League Changes → navy. Tiebreakers → red.
   Custom triangular markers (▸) match the border color so each
   section reads as a single unified accent.
----------------------------------- */
.rss-notes-box {
  background-color: white;
  border-radius: 10px;
  padding: 16px 22px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
  border-left: 6px solid #002744;
  margin-top: 12px;
}

.rss-notes-box--navy { border-left-color: #002744; }
.rss-notes-box--red  { border-left-color: #A4161A; }

.rss-notes-list {
  list-style: none;
  margin: 0;
  padding: 0;
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: #1C1C1C;
}

.rss-notes-list li {
  position: relative;
  padding-left: 22px;
  margin: 0 0 10px;
}

.rss-notes-list li:last-child {
  margin-bottom: 0;
}

/* Custom marker (▸) — color matches the border color of the parent
   box. Positioned via absolute so it sits flush at left:0 regardless
   of bullet text wrapping; line-height matches the bullet's line-
   height so vertical alignment lands on the first text line. */
.rss-notes-list li::before {
  content: "▸";
  position: absolute;
  left: 0;
  top: 0;
  font-weight: bold;
  font-size: 18px;
  line-height: 1.6;
}

.rss-notes-box--navy .rss-notes-list li::before { color: #002744; }
.rss-notes-box--red  .rss-notes-list li::before { color: #A4161A; }


/* ============================================================
   Leagues directory page (/leagues/)
   ============================================================
   Layout for the UEFA country directory: CSS multi-column flow.
   Each .rss-country-block contains a country header + 1-5 stacked
   compact league cards. Blocks flow top-to-bottom through 3 columns
   on desktop, 2 on tablet, 1 on mobile. break-inside: avoid keeps
   each country's leagues glued together (never split mid-country
   across columns).
   ============================================================ */
.rss-leagues-intro {
  margin: 32px 0 28px;
}

.rss-leagues-intro h1 {
  font-family: 'Barlow Semi Condensed', sans-serif;
  font-size: 36px;
  color: #002744;
  letter-spacing: 0.5px;
  margin: 0 0 8px;
}

.rss-leagues-intro p {
  font-family: 'Inter Tight', sans-serif;
  font-size: 16px;
  color: #555;
  margin: 0;
}

.rss-leagues-columns {
  column-count: 3;
  column-gap: 20px;
  column-fill: balance;
  margin: 0 0 32px;
}

@media (max-width: 900px) {
  .rss-leagues-columns {
    column-count: 2;
  }
}

@media (max-width: 600px) {
  .rss-leagues-columns {
    column-count: 1;
  }
}

.rss-country-block {
  break-inside: avoid;
  margin-bottom: 18px;
}

/* Country header inside a country block. Currently a non-clickable
   <p>. When country landing pages exist, change to:
       <a href="/leagues/<slug>/" class="rss-country-header">
   Same class name, no styling change needed beyond removing the
   text-decoration default. */
.rss-country-header {
  display: block;
  font-family: 'Inter Tight', sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: #002744;
  letter-spacing: 0.3px;
  margin: 0 0 8px;
  text-decoration: none;
}

.rss-country-header-meta {
  font-weight: 400;
  color: #888;
  font-size: 12px;
}

/* Compact league card used inside country blocks on the leagues page.
   Smaller than the .rss-league-tile used on the homepage — they share
   nothing visually except the bordered-rectangle silhouette. */
.rss-league-card {
  display: block;
  background-color: #fafafa;
  border: 1px solid #ddd;
  border-radius: 6px;
  padding: 10px 12px;
  margin-bottom: 6px;
  text-decoration: none;
  color: inherit;
  position: relative;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}

.rss-country-block .rss-league-card:last-child {
  margin-bottom: 0;
}

.rss-league-card:hover {
  background-color: white;
  text-decoration: none;
}

.rss-league-card-name {
  font-family: 'Inter Tight', sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: #002744;
}

.rss-league-card-meta {
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  color: #888;
  margin-top: 2px;
}

/* "Coming Soon" treatment for the compact league cards. Same modifier
   pattern as the homepage tile (--coming-soon), but the badge needs
   smaller dimensions to fit inside the smaller card. */
.rss-league-card--coming-soon {
  opacity: 0.55;
  cursor: default;
}

.rss-league-card--coming-soon:hover {
  background-color: #fafafa;
}

/* Compact cards need the badge slightly lower so it aligns with the
   league name text (instead of an icon row, which compact cards don't
   have). Font and padding inherit from the base badge style. */
.rss-league-card .rss-coming-soon-badge {
  top: 10px;
  right: 10px;
}

/* Continental Competitions — 3 fixed cards in an explicit 3-col grid
   that matches the width of the country columns below. Uses CSS Grid
   instead of multi-column flow since there are only 3 items (no need
   for flow behavior). Breakpoints match .rss-leagues-columns so the
   continental cards always line up with the country columns. */
.rss-cont-comp-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin: 0 0 32px;
}

@media (max-width: 900px) {
  .rss-cont-comp-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .rss-cont-comp-grid {
    grid-template-columns: 1fr;
  }
}



/* ============================================================
   Methodology pages (/methodology/, /methodology/basics/, etc.)
   ============================================================
   Layout for the methodology landing page (hero + stats strip +
   3 preview cards + initial Elo table) and the sub-pages (sub-nav
   pill bar at top, then long-form content with question headings).
   ============================================================ */

/* Sub-navigation pill bar — shown at the top of all 4 methodology
   pages so users can jump between Basics, USA Math, UEFA Math, or
   back to the landing. The current page's pill gets the .is-active
   modifier for visual emphasis. */
.rss-methodology-subnav {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 24px 0 28px;
}

.rss-methodology-subnav a {
  font-family: 'Inter Tight', sans-serif;
  font-size: 14px;
  font-weight: 500;
  color: #555;
  text-decoration: none;
  padding: 8px 16px;
  border: 1px solid #ddd;
  border-radius: 18px;
  background: white;
  letter-spacing: 0.3px;
  transition: border-color 0.15s ease, background-color 0.15s ease, color 0.15s ease;
}

.rss-methodology-subnav a:hover {
  background-color: #fafafa;
  border-color: #999;
  color: #002744;
  text-decoration: none;
}

.rss-methodology-subnav a.is-active {
  background-color: #002744;
  border-color: #002744;
  color: white;
}

.rss-methodology-subnav a.is-active:hover {
  background-color: #002744;
  color: white;
}

/* Content area for sub-pages — long-form prose with question headings.
   White card with full container width — matches the about page. */
.rss-methodology-content {
  background-color: white;
  border: 1px solid #ddd;
  border-radius: 10px;
  padding: 36px 40px 40px;
  margin: 0 0 48px;
}

.rss-methodology-content h1 {
  font-family: 'Barlow Semi Condensed', sans-serif;
  font-size: 36px;
  color: #002744;
  letter-spacing: 0.5px;
  margin: 0 0 24px;
}

.rss-methodology-content h2 {
  font-family: 'Barlow Semi Condensed', sans-serif;
  font-size: 22px;
  color: #002744;
  letter-spacing: 0.3px;
  margin: 36px 0 14px;
  line-height: 1.3;
}

.rss-methodology-content h3 {
  font-family: 'Inter Tight', sans-serif;
  font-size: 16px;
  font-weight: 600;
  color: #002744;
  margin: 22px 0 10px;
  letter-spacing: 0.3px;
}

.rss-methodology-content p {
  font-family: 'Inter Tight', sans-serif;
  font-size: 16px;
  color: #1C1C1C;
  line-height: 1.65;
  margin: 0 0 14px;
}

.rss-methodology-content ul,
.rss-methodology-content ol {
  font-family: 'Inter Tight', sans-serif;
  font-size: 16px;
  color: #1C1C1C;
  line-height: 1.65;
  margin: 0 0 14px;
  padding-left: 22px;
}

.rss-methodology-content li {
  margin-bottom: 6px;
}

.rss-methodology-content table {
  border-collapse: collapse;
  margin: 16px 0 24px;
  font-family: 'Inter Tight', sans-serif;
  font-size: 14px;
}

.rss-methodology-content th {
  background-color: #002744;
  color: white;
  text-align: left;
  padding: 10px 14px;
  font-weight: 500;
  letter-spacing: 0.3px;
}

.rss-methodology-content th.num {
  text-align: right;
}

.rss-methodology-content td {
  padding: 8px 14px;
  border-bottom: 1px solid #eee;
  color: #1C1C1C;
}

.rss-methodology-content td.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.rss-methodology-content tbody tr:last-child td {
  border-bottom: none;
}

/* MathJax-rendered equations sit in their own paragraph centered
   on the page. Some breathing room above and below. */
.rss-methodology-content p .MathJax_Display,
.rss-methodology-content .math-display {
  margin: 18px 0 !important;
}

/* "Coming Soon" placeholder for the UEFA math page (and any future
   stub pages). Centered message with a back link. */
.rss-methodology-stub {
  max-width: 600px;
  margin: 64px auto;
  text-align: center;
  padding: 48px 32px;
  background-color: white;
  border: 1px solid #ddd;
  border-radius: 10px;
}

.rss-methodology-stub h1 {
  font-family: 'Barlow Semi Condensed', sans-serif;
  font-size: 28px;
  color: #002744;
  margin: 0 0 12px;
}

.rss-methodology-stub p {
  font-family: 'Inter Tight', sans-serif;
  font-size: 16px;
  color: #555;
  line-height: 1.6;
  margin: 0;
}



/* ============================================================
   Methodology landing page additions
   ============================================================
   The landing page at /methodology/ has its own intro section and
   three "track" cards (USA / UEFA / College). Each track card is a
   non-clickable container holding 2 sub-links (Basics + Math) so
   the user clicks a specific sub-page rather than the card itself.
   ============================================================ */

.rss-methodology-landing-intro {
  margin: 32px 0 32px;
}

.rss-methodology-landing-intro h1 {
  font-family: 'Barlow Semi Condensed', sans-serif;
  font-size: 36px;
  color: #002744;
  letter-spacing: 0.5px;
  margin: 0 0 14px;
}

.rss-methodology-landing-intro p {
  font-family: 'Inter Tight', sans-serif;
  font-size: 16px;
  color: #1C1C1C;
  margin: 0;
  line-height: 1.55;
}

/* Three-column grid of track cards (USA, UEFA, College). Stacks to
   one column below 900px. */
.rss-methodology-tracks {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin: 0 0 48px;
}

@media (max-width: 900px) {
  .rss-methodology-tracks {
    grid-template-columns: 1fr;
  }
}

.rss-methodology-track {
  position: relative;
  background-color: white;
  border: 1px solid #ddd;
  border-radius: 10px;
  padding: 24px 26px;
}

.rss-methodology-track--coming-soon {
  opacity: 0.65;
}

.rss-methodology-track-name {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 28px;
  letter-spacing: 1.5px;
  color: #002744;
  margin: 0 0 10px;
}

.rss-methodology-track-desc {
  font-family: 'Inter Tight', sans-serif;
  font-size: 16px;
  color: #555;
  line-height: 1.5;
  margin: 0 0 16px;
}

.rss-methodology-track-links {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid #eee;
  padding-top: 14px;
}

.rss-methodology-track-links li {
  margin: 0;
}

.rss-methodology-track-links a {
  display: block;
  padding: 8px 0;
  font-family: 'Inter Tight', sans-serif;
  font-size: 16px;
  font-weight: 500;
  color: #002744;
  text-decoration: none;
  letter-spacing: 0.3px;
  transition: color 0.15s ease;
}

.rss-methodology-track-links a:hover {
  color: #A4161A;
  text-decoration: none;
}

/* Track-name eyebrow shown above the H1 on sub-pages so users
   always know which track they're currently in (e.g. "USA
   Methodology" above "The Basics"). */
.rss-methodology-eyebrow {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 14px;
  letter-spacing: 2px;
  color: #A4161A;
  text-transform: uppercase;
  margin: 0 0 6px;
}



/* Non-clickable rows in a methodology track card — used in the
   UEFA and College cards on the methodology landing page until
   those sections have actual content. Shows the section name on
   the left and a small "Coming Soon" flag on the right. */
.rss-methodology-track-pending {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  font-family: 'Inter Tight', sans-serif;
  font-size: 16px;
  font-weight: 500;
  color: #555;
  letter-spacing: 0.3px;
}

.rss-methodology-track-pending-flag {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 12px;
  letter-spacing: 1px;
  color: #999;
  text-transform: uppercase;
}



/* ============================================================
   About page content — full-width white card with prose styling
   ============================================================ */
.rss-about-content {
  background-color: white;
  border: 1px solid #ddd;
  border-radius: 10px;
  padding: 36px 40px 40px;
  margin: 32px 0 48px;
}

.rss-about-content h1 {
  font-family: 'Barlow Semi Condensed', sans-serif;
  font-size: 36px;
  color: #002744;
  letter-spacing: 0.5px;
  margin: 0 0 24px;
}

.rss-about-content h2 {
  font-family: 'Barlow Semi Condensed', sans-serif;
  font-size: 22px;
  color: #002744;
  letter-spacing: 0.3px;
  margin: 36px 0 14px;
  line-height: 1.3;
}

.rss-about-content p {
  font-family: 'Inter Tight', sans-serif;
  font-size: 16px;
  color: #1C1C1C;
  line-height: 1.65;
  margin: 0 0 16px;
}

.rss-about-content ul,
.rss-about-content ol {
  font-family: 'Inter Tight', sans-serif;
  font-size: 16px;
  color: #1C1C1C;
  line-height: 1.65;
  margin: 0 0 16px;
  padding-left: 24px;
}

.rss-about-content li {
  margin-bottom: 6px;
}

.rss-about-content p:last-child,
.rss-about-content ul:last-child,
.rss-about-content ol:last-child {
  margin-bottom: 0;
}
/* ============================================================
   Country page — tier grid, tier cards, delta cells, notes.
   Used by /leagues/<country>/index.html (country.html template).
   ============================================================ */

/* 3-column responsive grid for the tier cards. CSS grid handles
   equal-height alignment automatically — all cards in a row stretch
   to match the tallest one (the one with the longest name history). */
.rss-tier-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin: 0 0 8px;
}

@media (max-width: 1024px) {
  .rss-tier-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .rss-tier-grid {
    grid-template-columns: 1fr;
  }
}

/* Each tier is a clickable card. Anchor (not div) so the whole card
   is the click target. Hover lifts the card and underlines the name
   to make the link affordance obvious. */
.rss-tier-card {
  background-color: white;
  border-radius: 10px;
  padding: 18px 20px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
  border-top: 4px solid #002744;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}
.rss-tier-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  transform: translateY(-2px);
}
.rss-tier-card:hover .rss-tier-card-name {
  text-decoration: underline;
}

.rss-tier-card-name {
  font-family: 'Barlow Semi Condensed', sans-serif;
  font-size: 22px;
  font-weight: 600;
  color: #002744;
  letter-spacing: 0.5px;
  margin: 0 0 2px;
  line-height: 1.2;
}

.rss-tier-card-years {
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  color: #555;
  margin: 0 0 10px;
}

/* Historical name list under the current tier name */
.rss-tier-card-history {
  list-style: none;
  padding: 0;
  margin: auto 0 0;             /* push to bottom so equal-height cards align uniformly */
  color: #888;
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  border-top: 1px solid #EEE;
  padding-top: 8px;
}
.rss-tier-card-history li {
  margin: 2px 0;
}

/* Delta cells in any standings-style table (positive = green, negative = red) */
.rss-delta-pos { color: #1A6B2F; }
.rss-delta-neg { color: #A4161A; }

/* Empty-state placeholder text */
.rss-empty-note {
  color: #888;
  font-style: italic;
  font-family: 'Inter', sans-serif;
}

/* Small note rendered below the league-table standings on the Overview tab
   when point deductions apply for the season (Everton 2023-24, etc.).
   Italic + muted gray so it reads as supplementary detail to the table. */
.rss-standings-footnote {
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  color: #666;
  font-style: italic;
  margin: 8px 0 0;
}

/* Heading above each of the four standings tables in cross-group mode
   (Kazakhstan 1992-style): "Phase 1: Group A", "Phase 1: Group B",
   "Championship Group", "Relegation Group". Subordinate to the main
   "League Table" section title — same family, smaller and navy-ish. */
.rss-subtable-heading {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 22px;
  color: #002744;
  margin: 24px 0 8px;
  letter-spacing: 0.04em;
}


/* ==============================================================
   Side navigation tiles — top-right of the landing page, in the
   .rss-top-row beside the live projection callout. Replaces the old
   story stack and reuses its sizing: the three tiles flex to share
   the column height equally, so each is one-third the live tile's
   height. Visual language matches the story cards (red left accent,
   same shadow/radius). Elo History is live for USA; Scorigami and
   Record Book show a "Soon" badge until built.
   ============================================================== */
.rss-side-tiles {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.rss-nav-tile {
  flex: 1;                            /* each tile = one-third of the live tile height */
  display: flex;
  align-items: center;
  gap: 16px;
  background: #fff;
  border-radius: 8px;
  padding: 16px 20px 16px 24px;
  border-left: 4px solid #A4161A;     /* red accent — matches story cards / live callout */
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
  text-decoration: none;
  color: inherit;
  transition: transform 0.1s ease, box-shadow 0.15s ease;
}
.rss-nav-tile:hover { transform: translateY(-1px); box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08); }
.rss-nav-tile-icon { font-size: 30px; color: #A4161A; flex-shrink: 0; }
.rss-nav-tile-text { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.rss-nav-tile-title {
  font-family: 'Bebas Neue', sans-serif; font-size: 24px; letter-spacing: 1px;
  color: #002744; line-height: 1.1;
}
.rss-nav-tile-desc { font-family: 'Inter', sans-serif; font-size: 14px; color: #555; margin-top: 4px; }
.rss-nav-tile-arrow { font-size: 18px; color: #002744; flex-shrink: 0; }

/* Disabled "Soon" tiles — muted, no hover lift, no link affordance. */
.rss-nav-tile-soon { border-left-color: #c9ccd2; background: #f4f5f7; box-shadow: none; cursor: default; }
.rss-nav-tile-soon:hover { transform: none; box-shadow: none; }
.rss-nav-tile-soon .rss-nav-tile-icon  { color: #aab0ba; }
.rss-nav-tile-soon .rss-nav-tile-title { color: #8a909a; }
.rss-nav-tile-soon .rss-nav-tile-desc  { color: #9aa0aa; }
.rss-nav-tile-badge {
  font-family: 'Bebas Neue', sans-serif; font-size: 12px; letter-spacing: 1px;
  color: #8a909a; border: 1px solid #c9ccd2; border-radius: 999px;
  padding: 2px 10px; flex-shrink: 0;
}


/* ==============================================================
   Elo Rating History page (leagues/<slug>/elo-history/). Charts are
   built client-side with Plotly.js using the same tokens as the
   Season Trends plots (charts.py), so typography/colors match. The
   Season Detail table reuses .rss-season-summary-table for its look
   and Tablesort behavior; .elo-detail-wrap adds the 25-row vertical
   scroll with a sticky header.
   ============================================================== */
.elo-eyebrow {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 16px;
  letter-spacing: 2px;
  color: #002744;
  text-transform: uppercase;
  margin: 0 0 2px;
}

.elo-controls {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin: 0 0 24px;
}

.elo-control-label {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 16px;
  letter-spacing: 1.5px;
  color: #002744;
}

.elo-select {
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  color: #002744;
  padding: 8px 12px;
  border: 2px solid #002744;
  border-radius: 8px;
  background: #fff;
  min-width: 260px;
  cursor: pointer;
}

.elo-caption {
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  color: #6b7280;
  line-height: 1.5;
  margin: 0 0 16px;
}

.elo-key { font-weight: 600; }
.elo-key-pos { color: #002744; }
.elo-key-neg { color: #B8860B; }

.elo-chart { width: 100%; }

/* ════════════════════════════════════════════════════════════════════
   ELO HISTORY CHARTS — horizontal scroll on phones & tablets
   ────────────────────────────────────────────────────────────────────
   WHAT THIS DOES
   The two Plotly charts on the Elo History page (Elo by Season and
   Record vs. Expectation) are pinned to a league's full lifespan. On a
   phone or tablet, a long-history league like the EPL or MLB crams
   80–130 seasons into the screen width and the bars/markers become
   unreadable. These rules give each chart a MINIMUM width on small
   screens (about 12px per season) and let it scroll left–right inside
   its box, instead of being squeezed. Short-history leagues (WNBA, MLS,
   USL, the ex-Soviet leagues, etc.) stay under that minimum, so they do
   NOT scroll. Desktop is left completely untouched — the charts fit
   exactly as they do today.
 
   HOW IT KNOWS THE WIDTH
   The Elo History template sets a CSS variable, --elo-seasons, on each
   chart (the number of seasons in the league's lifespan) right before
   the chart is drawn. The rule below multiplies that by 12px.
 
   TWO KNOBS YOU CAN TUNE
   • "12px"   = width per season. Bigger ⇒ wider bars and it scrolls sooner.
   • "1024px" = the screen width at/below which scrolling turns on
                (phones + tablets). Raise it to make small laptops scroll too.
   ════════════════════════════════════════════════════════════════════ */
.elo-scroll {
    overflow-x: auto;                   /* show a sideways scrollbar only when the chart is too wide */
    overflow-y: hidden;                 /* never scroll up/down */
    -webkit-overflow-scrolling: touch;  /* smooth momentum scrolling on iOS */
}
 
@media (max-width: 1024px) {            /* phones and tablets only — desktop is unaffected */
    .elo-scroll > .elo-chart {
        /* ~12px per season. min-width only forces the chart WIDER than its
           box, never narrower — so short histories still just fit and don't
           scroll, while long ones overflow and scroll. */
        min-width: calc(var(--elo-seasons, 0) * 12px);
    }
}

.elo-empty {
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  color: #6b7280;
  padding: 16px 0;
}

/* Live (in-progress) season row + badge in the Season Detail table. */
.elo-row-live td { color: #6b7280; }
.elo-live-badge {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 12px;
  letter-spacing: 1px;
  color: #A4161A;
  margin-left: 6px;
}

/* Season Detail scroll box: ~25 rows tall, vertical scroll, sticky header.
   Reuses .rss-season-summary-wrap (card + horizontal scroll) and adds the
   vertical clamp here so the header stays put while the body scrolls. */
.elo-detail-wrap {
  max-height: 880px;
  overflow-y: auto;
}
.elo-detail-wrap thead {
  position: sticky;
  top: 0;
  z-index: 4;   /* matches the gamelog sticky header; works with border-collapse */
}

/* ============================================================
   SCORELINE DISTRIBUTION HISTORY  (.sdh-*)
   Team-vs-opponent (or home-vs-away) score grid, % marginals,
   fixed detail strip, and the 2x2 table block. Reuses
   .rss-streaks-table for the four tables (flattened inside cards).
============================================================ */
.sdh-card{background:#fff;border-radius:10px;box-shadow:0 4px 8px rgba(0,0,0,0.05);padding:16px;}
.sdh-scroll{overflow:auto;max-width:100%;max-height:74vh;-webkit-overflow-scrolling:touch;text-align:center;}
.sdh-scroll svg{display:block;margin:0 auto;}

.sdh-legend{display:flex;flex-wrap:wrap;gap:16px;margin:0 0 12px;font-size:12px;color:#1C1C1C;}
.sdh-legend span{display:inline-flex;align-items:center;gap:6px;}
.sdh-legend-note{color:#777;}
.sdh-swatch{width:14px;height:14px;border-radius:4px;display:inline-block;border:1px solid #cfd4da;}

.sdh-detail{margin-top:16px;}
.sdh-detail-head{display:flex;align-items:baseline;gap:12px;border-bottom:1px solid #e0e0e0;padding-bottom:8px;margin-bottom:8px;}
.sdh-detail-head .score{font-family:'Bebas Neue',sans-serif;font-size:34px;line-height:1;color:#002744;letter-spacing:1px;}
.sdh-detail-out{color:#777;font-size:14px;}
.sdh-detail-grid{display:grid;grid-template-columns:1fr 1.4fr;gap:2px 32px;}
.sdh-field{display:grid;grid-template-columns:96px 1fr;align-items:baseline;font-size:14px;padding:8px 0;border-bottom:1px solid #f0f1f3;}
.sdh-field .k{color:#777;font-weight:500;}
.sdh-field .v{font-weight:600;color:#1C1C1C;}
.sdh-field .v em{font-style:normal;font-weight:400;color:#777;}
@media(max-width:560px){ .sdh-detail-grid{grid-template-columns:1fr;} }

.sdh-tables{display:grid;grid-template-columns:2fr 3fr;gap:16px;margin-top:18px;}
@media(max-width:720px){ .sdh-tables{grid-template-columns:1fr;} }
.sdh-tcard h3{font-family:'Barlow Semi Condensed',sans-serif;font-size:18px;color:#002744;letter-spacing:.5px;margin:0 0 10px;}
.sdh-tcard .rss-streaks-table{background:transparent;box-shadow:none;border-radius:0;}
.sdh-tcard .rss-streaks-table tbody td.who{white-space:normal;color:#444;}
.sdh-pill,.sdh-tcard .pill{font:700 10px 'Inter',sans-serif;padding:2px 6px;border-radius:10px;color:#fff;}
.sdh-tcard .pill.w{background:#002744;} .sdh-tcard .pill.l{background:#A4161A;} .sdh-tcard .pill.t{background:#9aa3ad;}

/* ---- Scoreline grid: sticky HTML-table (frozen score headers) ---- */
.sdh-scroll{max-height:76vh;}
.sdh-grid{border-collapse:separate;border-spacing:0;font-family:'Inter',sans-serif;margin:0 auto;}
.sdh-grid th,.sdh-grid td{box-sizing:border-box;}
.sdh-cell{width:var(--cs);height:var(--cs);min-width:var(--cs);border:1px solid #c4c9cf;cursor:pointer;padding:0;}
.sdh-cell:hover{outline:2px solid #002744;outline-offset:-2px;}
.sdh-xh{position:sticky;top:0;z-index:3;background:#002744;color:#fff;font-family:'Bebas Neue',sans-serif;font-size:12px;letter-spacing:.5px;text-align:center;padding:4px 0;min-width:var(--cs);}
.sdh-xh.rot span{writing-mode:vertical-rl;transform:rotate(180deg);display:inline-block;}
.sdh-yh{position:sticky;left:0;z-index:2;background:#002744;color:#fff;font-family:'Bebas Neue',sans-serif;font-size:12px;letter-spacing:.5px;text-align:right;padding:0 8px;white-space:nowrap;}
.sdh-corner{position:sticky;top:0;left:0;z-index:4;background:#002744;min-width:32px;}
.sdh-mh{position:sticky;top:0;z-index:3;background:#41506a;color:#fff;font-family:'Bebas Neue',sans-serif;font-size:12px;padding:4px 8px;}
.sdh-mh-corner{position:sticky;left:0;z-index:2;}
.sdh-my{background:#eef1f4;color:#444;font-size:12px;text-align:right;padding:0 8px;white-space:nowrap;border:1px solid #dfe3e8;}
.sdh-mx{background:#eef1f4;border:1px solid #dfe3e8;text-align:center;vertical-align:top;padding:4px 0;}
.sdh-mx span{writing-mode:vertical-rl;display:inline-block;font-size:12px;color:#444;}
.sdh-corner2{background:#eef1f4;border:1px solid #dfe3e8;}

/* detail strip ~10% shorter (desktop + tablet + mobile) */
.sdh-detail{padding:12px 14px;}
.sdh-detail-head{padding-bottom:6px;margin-bottom:6px;}
.sdh-detail-head .score{font-size:30px;}
.sdh-field{padding:6px 0;}
@media(max-width:900px){
  .sdh-detail-grid{grid-template-columns:1fr 1.3fr;gap:0 16px;}
  .sdh-field{padding:4px 0;font-size:14px;}
  .sdh-detail-head .score{font-size:28px;}
}

/* four tables scroll horizontally on small screens (reach the Date column) */
.sdh-tscroll{overflow-x:auto;-webkit-overflow-scrolling:touch;}
.sdh-tscroll .rss-streaks-table{min-width:340px;}

/* ---- Scoreline: axis titles, fitting fixes, mobile behavior (round 3) ---- */
.sdh-gridwrap{display:grid;grid-template-columns:auto 1fr;grid-template-rows:1fr auto;align-items:center;gap:6px 8px;}
.sdh-gridwrap .sdh-scroll{grid-row:1;grid-column:2;}
.sdh-ylab{grid-row:1;grid-column:1;writing-mode:vertical-rl;transform:rotate(180deg);justify-self:center;
          font-family:'Barlow Semi Condensed',sans-serif;font-weight:600;font-size:14px;letter-spacing:.5px;color:#002744;}
.sdh-xlab{grid-row:2;grid-column:2;text-align:center;
          font-family:'Barlow Semi Condensed',sans-serif;font-weight:600;font-size:14px;letter-spacing:.5px;color:#002744;}

/* bottom marginal %: smaller so it clears the gridlines inside the wider cells */
.sdh-mx span{font-size:10px;}

/* grouped-bucket clarifier in the detail strip */
.sdh-detail-note{font-family:'Inter',sans-serif;font-size:12px;font-style:italic;color:#B8860B;margin:-2px 0 8px;}

/* tables: never wrap; let them scroll horizontally so Date is always reachable */
.sdh-tcard .rss-streaks-table th,
.sdh-tcard .rss-streaks-table td,
.sdh-tcard .rss-streaks-table tbody td.who{white-space:nowrap;}

/* mobile: stack the detail strip into a single column (no 2x2 wrapping) */
@media(max-width:600px){
  .sdh-detail-grid{grid-template-columns:1fr;gap:0;}
  .sdh-field{padding:5px 0;}
}

/* ---- Scoreline round 4: axis-label position/arrow, inline grouped note,
        mobile frozen-column scrolling tables ---- */
/* keep the y-axis label right next to the grid (no big left gap) */
.sdh-gridwrap{display:flex;align-items:center;gap:8px;}
.sdh-gridcol{display:flex;flex-direction:column;min-width:0;flex:0 1 auto;}
.sdh-gridwrap .sdh-scroll{overflow:auto;min-width:0;}
.sdh-grid{margin:0;}
.sdh-xlab{margin-top:6px;}
/* y-axis: stacked down-arrow + vertical text (true downward arrow) */
.sdh-ylab{writing-mode:horizontal-tb;transform:none;display:flex;flex-direction:column;align-items:center;gap:2px;flex:0 0 auto;}
.sdh-ylab .sdh-vtx{writing-mode:vertical-rl;}
.sdh-ar{line-height:1;font-size:16px;}

/* grouped-bucket note rides on the score line so the tile height never shifts */
.sdh-detail-head{white-space:nowrap;overflow:hidden;}
.sdh-detail-grp{font-family:'Inter',sans-serif;font-size:12px;font-style:italic;color:#B8860B;margin-left:8px;}

/* tables: stay within the phone width, scroll with a frozen first column
   (same technique as the season-page sticky-column tables) */
.sdh-tables{grid-template-columns:minmax(0,2fr) minmax(0,3fr);}
.sdh-tcard{min-width:0;}
.sdh-tcard .rss-streaks-table{overflow:visible;}
.sdh-tcard .rss-streaks-table thead th:first-child,
.sdh-tcard .rss-streaks-table tbody td:first-child{position:sticky;left:0;}
.sdh-tcard .rss-streaks-table thead th:first-child{background:#002744;z-index:3;}
.sdh-tcard .rss-streaks-table tbody td:first-child{background:#fff;z-index:2;}
.sdh-tcard .rss-streaks-table th:first-child,
.sdh-tcard .rss-streaks-table td:first-child{box-shadow:2px 0 4px rgba(0,0,0,0.05);}
@media(max-width:720px){ .sdh-tables{grid-template-columns:minmax(0,1fr);} }
@media(max-width:600px){
  /* the global streaks-table rule hides dates on phones — we scroll to them instead */
  .sdh-tcard .rss-streaks-table thead th.dates,
  .sdh-tcard .rss-streaks-table tbody td.dates{display:table-cell;}
}

/* ---- Scoreline round 5: center the grid block; tighten common-score tables ---- */
.sdh-gridwrap{justify-content:center;}                 /* label hugs grid, whole block centered */
.sdh-tscroll .rss-streaks-table{min-width:0;}          /* drop the 340px floor that forced phone scroll */

/* ---- Scoreline round 6: MOBILE-ONLY fix for the most-common tables ----
   Desktop is untouched (base width:100%, auto layout). On phones, force a
   fixed layout at 100% width so all three columns share the screen width and
   CANNOT overflow -> no horizontal scroll. Tighter padding/font uses the
   blank space that was there. Recent (date) tables are not affected. */
@media(max-width:600px){
  .sdh-tcard-tight .rss-streaks-table{table-layout:fixed;width:100%;}
  .sdh-tcard-tight .rss-streaks-table th,
  .sdh-tcard-tight .rss-streaks-table td{
    padding:6px 6px;
    font-size:12px;
    overflow:hidden;
    text-overflow:ellipsis;
  }
}

/* ---- Scoreline round 7: total game count in the bottom-right corner ---- */
.sdh-corner2{text-align:center;font-family:'Inter',sans-serif;font-size:12px;font-weight:700;color:#002744;}

/* ============================================================
   RECORD BOOK  (.rss-records-*)  — all-time league records.
   Reuses .rss-gamelog-table (sticky header + sticky first column).
   Each table sits in a vertical scroll (~25 rows) that also scrolls
   horizontally on phones/tablets with the rank column frozen.
============================================================ */
.rss-records-h3{font-family:'Barlow Semi Condensed',sans-serif;font-size:20px;font-weight:600;
                color:#002744;letter-spacing:.5px;margin:22px 0 8px;}
.rss-records-scroll{overflow:auto;max-height:720px;border-radius:8px;box-shadow:0 2px 4px rgba(0,0,0,0.05);
                    -webkit-overflow-scrolling:touch;background:#fff;}   /* white table body, not page gray */
.rss-records-scroll thead th.rank{cursor:pointer;}   /* rank sorts back to natural order */
.rss-records-scroll thead th.rank[aria-sort="ascending"]::after  { content:' \2191'; }
.rss-records-scroll thead th.rank[aria-sort="descending"]::after { content:' \2193'; }
.rss-records-scroll thead th.rss-gamelog-grouphead,
.rss-records-scroll thead th.rss-gamelog-grouphead:hover{background:#003c66;cursor:default;}   /* group header: not sortable */
.rss-records-scroll td.rank,.rss-records-scroll th.rank{text-align:center;color:#6b7280;font-weight:600;}
.rss-records-scroll thead th.rank{color:#fff;}
.rss-records-empty{padding:18px;color:#777;text-align:center;white-space:normal;}
.rss-records-legend{font-family:'Inter',sans-serif;font-size:12px;color:#777;margin:0 0 10px;}
.rss-gamelog-table tbody td.rss-rec-pos{color:#00642E;font-weight:600;}
.rss-gamelog-table tbody td.rss-rec-neg{color:#A4161A;font-weight:600;}

/* Records filter bar: Highs/Lows + era switcher (reuse .rss-division-*) + franchise dropdown */
.rss-records-filterbar{display:flex;flex-wrap:wrap;align-items:center;gap:14px 24px;margin:8px 0 20px;}
.rss-records-filterbar .rss-division-nav{margin:0;}
.rss-filter-group{display:inline-flex;align-items:center;gap:8px;}
.rss-filter-label{font-family:'Inter',sans-serif;font-size:12px;font-weight:600;color:#6b7280;
                  text-transform:uppercase;letter-spacing:.5px;}
.rss-fr-filter{display:inline-flex;align-items:center;gap:8px;}
.rss-fr-select{background:#fff;border:1.5px solid #ddd;border-radius:6px;padding:6px 28px 6px 12px;
               font-family:'Inter',sans-serif;font-size:14px;font-weight:500;color:#555;cursor:pointer;
               appearance:none;-webkit-appearance:none;
               background-image:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23555' stroke-width='2.5'><polyline points='6 9 12 15 18 9'/></svg>");
               background-repeat:no-repeat;background-position:right 10px center;max-width:260px;}
.rss-fr-select:hover{border-color:#002744;color:#002744;}
.rss-fr-select:focus{outline:none;border-color:#002744;box-shadow:0 0 0 2px rgba(0,39,68,0.12);}
@media (max-width:560px){
  .rss-records-filterbar{flex-direction:column;align-items:stretch;gap:12px;}
  .rss-filter-group,.rss-fr-filter{justify-content:space-between;}
  .rss-fr-select{flex:1;max-width:none;}
}
