/* ── Reset & Base ───────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --green:   #2d8c4e;
  --green-l: #3aad62;
  --green-d: #1e6337;
  --yellow:  #f5c842;
  --yellow-l:#fde87a;
  --dark:    #111827;
  --mid:     #374151;
  --muted:   #6b7280;
  --light:   #f9fafb;
  --white:   #ffffff;
  --radius:  12px;
  --shadow:  0 4px 24px rgba(0,0,0,.10);
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: var(--light);
  color: var(--dark);
  line-height: 1.7;
}

/* ── Hero ───────────────────────────────────────────────────── */
header {
  background: linear-gradient(135deg, var(--green-d) 0%, var(--green) 60%, var(--green-l) 100%);
  color: var(--white);
  text-align: center;
  padding: 14px 24px 12px;
  position: relative;
  overflow: hidden;
}

header::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 50%, rgba(255,255,255,.07) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(245,200,66,.12) 0%, transparent 40%);
}

.hero-badge {
  display: inline-block;
  background: var(--yellow);
  color: var(--green-d);
  font-weight: 700;
  font-size: .7rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  padding: 3px 12px;
  border-radius: 999px;
  margin-bottom: 4px;
}

header h1 {
  font-size: clamp(1.3rem, 3vw, 1.8rem);
  font-weight: 800;
  letter-spacing: -.01em;
  text-shadow: none;
  margin-bottom: 2px;
  position: relative;
}

header p {
  font-size: .88rem;
  opacity: 1;
  color: rgba(255,255,255,.92);
  max-width: 600px;
  margin: 0 auto 4px;
  position: relative;
}

.paddle-icon {
  display: inline-block;
  width: 60px;
  height: 60px;
  margin-bottom: 10px;
  vertical-align: middle;
}

/* ── Site Nav (top bar across all pages) ────────────────────── */
.site-nav {
  background: var(--white);
  border-bottom: 1px solid #e5e7eb;
  position: sticky;
  top: 0;
  z-index: 200;
  box-shadow: 0 2px 12px rgba(0,0,0,.06);
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0;
  padding: 0;
}
.site-nav a {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 10px 14px;
  font-weight: 700;
  font-size: .78rem;
  color: var(--mid);
  text-decoration: none;
  letter-spacing: .02em;
  border-bottom: 3px solid transparent;
  transition: color .2s, border-bottom .2s;
  white-space: nowrap;
}
.site-nav a:hover {
  color: var(--green);
  border-bottom-color: var(--green);
}
.site-nav .nav-icon {
  font-size: 1rem;
}
.site-nav .nav-updated {
  margin-left: auto;
  font-size: .68rem;
  color: var(--muted);
  font-weight: 400;
  padding: 10px 14px;
  white-space: nowrap;
}

/* ── Nav (page-internal section nav) ───────────────────────── */
nav {
  background: var(--white);
  border-bottom: 1px solid #e5e7eb;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 12px rgba(0,0,0,.06);
}

nav ul {
  list-style: none;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0;
  max-width: 900px;
  margin: 0 auto;
}

nav a {
  display: block;
  padding: 16px 20px;
  font-weight: 600;
  font-size: .9rem;
  color: var(--mid);
  text-decoration: none;
  letter-spacing: .01em;
  transition: color .2s, border-bottom .2s;
  border-bottom: 3px solid transparent;
}

nav a:hover {
  color: var(--green);
  border-bottom-color: var(--green);
}

/* ── Layout ─────────────────────────────────────────────────── */
main {
  max-width: 1060px;
  margin: 0 auto;
  padding: 60px 24px;
}

section { margin-bottom: 80px; }

.section-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--green);
  color: var(--white);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: 999px;
  margin-bottom: 12px;
}

h2 {
  font-size: clamp(1.6rem, 3.5vw, 2.4rem);
  font-weight: 800;
  color: var(--dark);
  line-height: 1.2;
  margin-bottom: 24px;
}

p { color: var(--mid); margin-bottom: 16px; }
p:last-child { margin-bottom: 0; }

/* ── Cards ──────────────────────────────────────────────────── */
.card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 32px;
  border: 1px solid #e5e7eb;
}

.card-grid {
  display: grid;
  gap: 24px;
}

.card-grid-2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.card-grid-3 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }

/* ── Timeline ───────────────────────────────────────────────── */
.timeline { position: relative; padding-left: 32px; }

.timeline::before {
  content: '';
  position: absolute;
  left: 10px;
  top: 0; bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, var(--green), var(--yellow));
}

.timeline-item {
  position: relative;
  margin-bottom: 32px;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -28px;
  top: 6px;
  width: 14px;
  height: 14px;
  background: var(--green);
  border: 2px solid var(--white);
  border-radius: 50%;
  box-shadow: 0 0 0 3px var(--green-l);
}

.timeline-year {
  font-size: .8rem;
  font-weight: 700;
  color: var(--green);
  letter-spacing: .06em;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.timeline-item h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 6px;
}

.timeline-item p { font-size: .92rem; margin: 0; }

/* ── Rules Grid ─────────────────────────────────────────────── */
.rule-card {
  background: var(--white);
  border-radius: var(--radius);
  border: 1px solid #e5e7eb;
  padding: 24px;
  box-shadow: var(--shadow);
  transition: transform .2s, box-shadow .2s;
}

.rule-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 32px rgba(0,0,0,.13);
}

.rule-icon {
  font-size: 2rem;
  margin-bottom: 12px;
  display: block;
}

.rule-card h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 8px;
}

.rule-card p { font-size: .88rem; margin: 0; }

/* ── Players ────────────────────────────────────────────────── */
.players-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}

.tab-btn {
  padding: 8px 20px;
  border-radius: 999px;
  border: 2px solid var(--green);
  background: transparent;
  color: var(--green);
  font-weight: 600;
  font-size: .88rem;
  cursor: pointer;
  transition: background .2s, color .2s;
}

.tab-btn.active, .tab-btn:hover {
  background: var(--green);
  color: var(--white);
}

.player-card {
  display: flex;
  align-items: center;
  gap: 20px;
  background: var(--white);
  border-radius: var(--radius);
  border: 1px solid #e5e7eb;
  padding: 20px 24px;
  box-shadow: var(--shadow);
  transition: transform .2s;
}

.player-card:hover { transform: translateX(4px); }

.rank-badge {
  min-width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 1rem;
  flex-shrink: 0;
}

.rank-1 { background: #fde68a; color: #92400e; }
.rank-2 { background: #e5e7eb; color: #374151; }
.rank-3 { background: #fed7aa; color: #9a3412; }
.rank-n { background: var(--green); color: var(--white); font-size: .88rem; }

.player-avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--green-l), var(--green-d));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  flex-shrink: 0;
}

.player-info { flex: 1; min-width: 0; }

.player-name {
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--dark);
}

.player-meta {
  font-size: .82rem;
  color: var(--muted);
  margin-top: 2px;
}

.player-rating {
  font-weight: 700;
  font-size: .95rem;
  color: var(--green);
  flex-shrink: 0;
  text-align: right;
}

.player-rating small {
  display: block;
  font-weight: 400;
  font-size: .72rem;
  color: var(--muted);
}

.player-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ── Schedule Table ─────────────────────────────────────────── */
.schedule-wrapper {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid #e5e7eb;
  overflow: hidden;
}

.schedule-filter {
  display: flex;
  gap: 8px;
  padding: 20px 24px;
  border-bottom: 1px solid #e5e7eb;
  flex-wrap: wrap;
  background: #f8fafc;
}

.filter-btn {
  padding: 6px 16px;
  border-radius: 999px;
  border: 1.5px solid #d1d5db;
  background: var(--white);
  color: var(--mid);
  font-size: .82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all .2s;
}

.filter-btn.active, .filter-btn:hover {
  border-color: var(--green);
  background: var(--green);
  color: var(--white);
}

table {
  width: 100%;
  border-collapse: collapse;
}

thead th {
  background: var(--green-d);
  color: var(--white);
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: 14px 20px;
  text-align: left;
}

tbody tr {
  border-bottom: 1px solid #f3f4f6;
  transition: background .15s;
}

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

tbody td {
  padding: 16px 20px;
  font-size: .9rem;
  color: var(--mid);
  vertical-align: top;
}

.event-name {
  font-weight: 700;
  color: var(--dark);
  display: block;
  margin-bottom: 2px;
}

.tour-tag {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .04em;
}

.tag-ppa  { background: #dbeafe; color: #1d4ed8; }
.tag-mlp  { background: #fef9c3; color: #a16207; }
.tag-app  { background: #fce7f3; color: #be185d; }
.tag-usa  { background: #dcfce7; color: #166534; }
.tag-intl { background: #ede9fe; color: #6d28d9; }

.status-upcoming { color: var(--green); font-weight: 600; font-size: .82rem; }
.status-past     { color: var(--muted);  font-weight: 600; font-size: .82rem; }

/* ── Court Diagram ──────────────────────────────────────────── */
.court-diagram {
  background: #166534;
  border-radius: var(--radius);
  padding: 32px;
  position: relative;
  overflow: hidden;
  min-height: 320px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.court-inner {
  border: 3px solid rgba(255,255,255,.8);
  border-radius: 2px;
  width: 100%;
  max-width: 280px;
  aspect-ratio: 20 / 44;
  position: relative;
  display: grid;
  grid-template-rows: 15fr 7fr 4px 7fr 15fr;
}

.court-zone {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .08em;
  color: rgba(255,255,255,.75);
  text-transform: uppercase;
  text-align: center;
  border: 1px solid rgba(255,255,255,.4);
  padding: 8px;
}

.court-kitchen {
  background: rgba(245,200,66,.15);
  border-color: rgba(255,255,255,.7);
}

.court-line {
  height: 3px;
  background: rgba(255,255,255,.8);
  align-self: center;
}

.court-label {
  position: absolute;
  color: rgba(255,255,255,.7);
  font-size: .65rem;
  font-weight: 700;
  letter-spacing: .06em;
}

/* ── Stats Bar ──────────────────────────────────────────────── */
.stats-bar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1px;
  background: #e5e7eb;
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 40px;
  box-shadow: var(--shadow);
}

.stat-item {
  background: var(--white);
  padding: 28px 20px;
  text-align: center;
}

.stat-number {
  font-size: 2.2rem;
  font-weight: 900;
  color: var(--green);
  line-height: 1;
  display: block;
}

.stat-label {
  font-size: .8rem;
  color: var(--muted);
  font-weight: 600;
  letter-spacing: .05em;
  text-transform: uppercase;
  margin-top: 6px;
  display: block;
}

/* ── Home FAB ───────────────────────────────────────────────── */
.home-fab {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 200;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: var(--green);
  color: var(--white);
  font-weight: 700;
  font-size: .88rem;
  padding: 11px 20px;
  border-radius: 999px;
  text-decoration: none;
  box-shadow: 0 4px 20px rgba(0,0,0,.22);
  transition: background .2s, transform .2s, box-shadow .2s;
}
.home-fab:hover {
  background: var(--green-d);
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(0,0,0,.28);
}

/* ── Footer ─────────────────────────────────────────────────── */
footer {
  background: var(--dark);
  color: rgba(255,255,255,.6);
  text-align: center;
  padding: 40px 24px;
  font-size: .85rem;
}

footer a { color: var(--yellow-l); text-decoration: none; }
footer a:hover { text-decoration: underline; }

.footer-links {
  display: flex;
  justify-content: center;
  gap: 24px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

/* ── Floating Home Button ──────────────────────────────────── */
.fab-home {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 999;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--dark);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  text-decoration: none;
  box-shadow: 0 4px 16px rgba(0,0,0,.3);
  transition: transform .2s, box-shadow .2s, background .2s;
}
.fab-home:hover {
  transform: scale(1.12);
  box-shadow: 0 6px 24px rgba(0,0,0,.4);
  background: var(--green-d);
}

/* ── Utility ────────────────────────────────────────────────── */
.divider {
  height: 1px;
  background: linear-gradient(to right, transparent, #e5e7eb, transparent);
  margin: 0 0 80px;
}

@media (max-width: 640px) {
  nav ul { justify-content: flex-start; overflow-x: auto; flex-wrap: nowrap; padding: 0 8px; }
  nav a  { font-size: .8rem; padding: 14px 12px; white-space: nowrap; }
  table  { font-size: .82rem; }
  thead th, tbody td { padding: 12px; }
  .court-diagram { min-height: 220px; padding: 16px; }
}

/* ═══════════════════════════════════════════════════════════
   SHARED TV / EPISODE-GUIDE STYLES
   (King of Queens, Sopranos — and any future episode guides)
═══════════════════════════════════════════════════════════ */

/* ── Nav Inner (horizontal-scroll, many season links) ─── */
.nav-inner {
  display: flex;
  overflow-x: auto;
  max-width: 1060px;
  margin: 0 auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.nav-inner::-webkit-scrollbar { display: none; }
.nav-inner a {
  display: block;
  padding: 16px 18px;
  font-weight: 600;
  font-size: .88rem;
  color: var(--mid);
  text-decoration: none;
  white-space: nowrap;
  border-bottom: 3px solid transparent;
  transition: color .2s, border-bottom .2s;
}
.nav-inner a:hover {
  color: var(--green);
  border-bottom-color: var(--green);
}

/* ── Section sub-heading ─────────────────────────────── */
.section-sub {
  color: var(--muted);
  font-size: .95rem;
  margin-bottom: 24px;
}

/* ── Search bar ──────────────────────────────────────── */
.search-wrap {
  position: relative;
  margin-bottom: 12px;
}
.search-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1rem;
  pointer-events: none;
}
.search-wrap input {
  width: 100%;
  padding: 14px 14px 14px 44px;
  font-size: 1rem;
  border: 2px solid #e5e7eb;
  border-radius: var(--radius);
  outline: none;
  transition: border-color .2s;
  font-family: inherit;
  background: var(--white);
  color: var(--dark);
}
.search-wrap input:focus { border-color: var(--green); }
#search-count {
  font-size: .85rem;
  color: var(--muted);
  margin-bottom: 20px;
}

/* ── Top 20 Grid ─────────────────────────────────────── */
.top20-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}
.top20-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid #e5e7eb;
  padding: 20px 22px;
  display: flex;
  gap: 16px;
  align-items: flex-start;
  cursor: pointer;
  transition: transform .2s, box-shadow .2s;
}
.top20-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 32px rgba(0,0,0,.13);
}
.top20-info { flex: 1; min-width: 0; }
h4 {
  font-size: .95rem;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 6px;
}
.top20-info h4 { font-size: 1rem; }
.ep-meta {
  font-size: .8rem;
  color: var(--muted);
  margin-bottom: 8px;
}
.top20-info p {
  font-size: .85rem;
  color: var(--mid);
  line-height: 1.5;
  margin: 0 0 8px;
}
.rating-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #f0fdf4;
  color: var(--green-d);
  border: 1px solid #bbf7d0;
  border-radius: 999px;
  font-size: .8rem;
  font-weight: 700;
  padding: 3px 10px;
}
.rank-other { background: var(--green); color: var(--white); font-size: .88rem; }
.director-tag {
  display: inline-block;
  background: #f0fdf4;
  color: var(--green-d);
  font-size: .78rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 999px;
  margin-bottom: 8px;
}

/* ── Season sections ─────────────────────────────────── */
.season-section {
  margin-bottom: 32px;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid #e5e7eb;
}
.season-header {
  background: var(--green-d);
  color: var(--white);
  padding: 18px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  user-select: none;
  gap: 12px;
}
.season-header h2 {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--white);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.season-meta, .s-meta {
  font-size: .82rem;
  color: rgba(255,255,255,.75);
  margin-top: 2px;
}
.episode-count-badge, .ep-count-badge {
  background: var(--yellow);
  color: var(--green-d);
  border-radius: 999px;
  font-size: .78rem;
  font-weight: 700;
  padding: 2px 10px;
  white-space: nowrap;
}
.season-toggle {
  background: none;
  border: none;
  color: rgba(255,255,255,.85);
  font-size: 1.1rem;
  cursor: pointer;
  transition: transform .25s;
  padding: 4px;
  flex-shrink: 0;
}
.season-toggle.open { transform: rotate(180deg); }
.episodes-container { display: none; }
.episodes-container.open { display: block; }
.season-break {
  text-align: center;
  font-size: .8rem;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: .06em;
  padding: 12px 20px;
  background: #f8fafc;
  border-bottom: 1px solid #e5e7eb;
}

/* ── Episode items ───────────────────────────────────── */
.episode-item {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 14px 20px;
  border-bottom: 1px solid #f3f4f6;
  transition: background .15s;
}
.episode-item:last-child { border-bottom: none; }
.episode-item:hover { background: #f0fdf4; }
.episode-item.hidden { display: none; }
.star-ep, .top-ep { background: #fef9c3; }
.ep-num, .ep-num-box {
  min-width: 38px;
  font-size: .78rem;
  font-weight: 700;
  color: var(--muted);
  padding-top: 2px;
  flex-shrink: 0;
  text-align: center;
}
.top-mark { color: var(--green); }
.ep-body { flex: 1; min-width: 0; }
.ep-code {
  font-size: .72rem;
  font-weight: 700;
  color: var(--green);
  letter-spacing: .04em;
  text-transform: uppercase;
  margin-bottom: 4px;
}
.ep-body h4 {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}
.ep-body p {
  font-size: .85rem;
  color: var(--mid);
  margin: 0;
  line-height: 1.5;
}
.star-badge, .top-badge {
  background: var(--yellow);
  color: var(--green-d);
  font-size: .72rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  white-space: nowrap;
  flex-shrink: 0;
  align-self: center;
}

/* ── Sopranos episode detail fields ──────────────────── */
.ep-title-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 4px;
  flex-wrap: wrap;
}
.ep-title {
  font-size: .98rem;
  font-weight: 700;
  color: var(--dark);
}
.ep-director {
  font-size: .82rem;
  color: var(--muted);
  margin-bottom: 6px;
}
.ep-summary {
  font-size: .85rem;
  color: var(--mid);
  line-height: 1.5;
  margin-bottom: 6px;
}
.ep-guests {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: center;
}
.guest-label {
  font-size: .75rem;
  font-weight: 600;
  color: var(--muted);
  margin-right: 4px;
}
.guest-tag {
  background: #f0fdf4;
  color: var(--green-d);
  border: 1px solid #bbf7d0;
  border-radius: 999px;
  font-size: .72rem;
  padding: 2px 8px;
}

/* ── Cast banner (Sopranos) ──────────────────────────── */
.cast-banner {
  background: var(--white);
  border-bottom: 1px solid #e5e7eb;
  padding: 20px 24px;
  text-align: center;
}
.cast-banner h3 {
  font-size: .85rem;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .08em;
  margin-bottom: 12px;
}
.cast-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}
.cast-pill {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 999px;
  font-size: .82rem;
  padding: 5px 14px;
  color: var(--dark);
}
.cast-pill strong { color: var(--green-d); }

/* ── Sopranos header meta elements ───────────────────── */
.header-eyebrow {
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: rgba(255,255,255,.9);
  margin-bottom: 4px;
  position: relative;
}
.tagline {
  font-size: .95rem;
  font-style: italic;
  opacity: 1;
  color: rgba(255,255,255,.88);
  max-width: 560px;
  margin: 0 auto 6px;
  position: relative;
}
.header-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  position: relative;
}
.meta-chip {
  background: rgba(255,255,255,.15);
  border: 1px solid rgba(255,255,255,.3);
  border-radius: 999px;
  font-size: .82rem;
  font-weight: 600;
  padding: 5px 14px;
  color: var(--white);
}

/* ═══════════════════════════════════════════════════════════
   SHARED PROSE / DOCUMENT STYLES
   (User Manual, inline documentation)
═══════════════════════════════════════════════════════════ */

hr {
  border: none;
  border-top: 1px solid #e5e7eb;
  margin: 32px 0;
}
h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--green-d);
  margin-top: 24px;
  margin-bottom: 8px;
}
section { scroll-margin-top: 72px; }
ul, ol { margin: 10px 0 14px 28px; }
li { margin-bottom: 6px; }
li > ul, li > ol { margin-top: 4px; margin-bottom: 4px; }

code {
  font-family: "SFMono-Regular", "Consolas", monospace;
  font-size: .875em;
  color: var(--green-d);
  background: #f0fdf4;
  padding: 2px 6px;
  border-radius: 4px;
}
pre {
  background: var(--dark);
  color: #06d6a0;
  font-family: "SFMono-Regular", "Consolas", monospace;
  font-size: .875rem;
  line-height: 1.55;
  padding: 18px 20px;
  border-radius: 8px;
  overflow-x: auto;
  white-space: pre;
  margin: 16px 0;
}
pre code { background: none; padding: 0; color: inherit; }

blockquote {
  border-left: 4px solid var(--yellow);
  background: #fefce8;
  padding: 14px 18px;
  border-radius: 0 8px 8px 0;
  margin: 20px 0;
  font-style: italic;
  color: var(--mid);
}
blockquote p { margin-bottom: 0; }
blockquote strong { color: #92400e; font-style: normal; }

.table-wrap { overflow-x: auto; border-radius: 8px; margin: 16px 0; }

.doc-title-block { margin-bottom: 8px; }
.doc-title-block .meta { font-size: .88rem; color: var(--muted); margin-top: 4px; }

.toc-card {
  background: var(--white);
  border: 1px solid #e5e7eb;
  border-radius: var(--radius);
  padding: 24px 28px;
  margin: 24px 0 40px;
  box-shadow: var(--shadow);
}
.toc-card > h2 {
  font-size: 1.2rem;
  margin-top: 0;
  margin-bottom: 16px;
  border-bottom: 1px solid #e5e7eb;
  padding-bottom: 8px;
}
.toc-card ol { margin-left: 22px; margin-bottom: 0; }
.toc-card li { margin-bottom: 5px; }
.toc-card a { font-size: .95rem; color: var(--green); text-decoration: none; }
.toc-card a:hover { text-decoration: underline; }

.closing-line {
  font-style: italic;
  color: var(--muted);
  text-align: center;
  margin-top: 40px;
  padding-top: 28px;
  border-top: 1px solid #e5e7eb;
}
.back-to-top {
  display: block;
  text-align: center;
  margin-top: 40px;
  color: var(--muted);
  font-size: .88rem;
}

/* ── Gameday Box Score (MLB.com style) ──────────────────────── */
.gameday-box { margin-top: 16px; }

.line-score-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .82rem;
  margin-bottom: 4px;
}
.line-score-table th,
.line-score-table td {
  padding: 6px 4px;
  text-align: center;
}
.line-score-table th:first-child,
.line-score-table td:first-child {
  text-align: left;
  font-weight: 700;
  padding-left: 8px;
  min-width: 44px;
}
.line-score-table thead th {
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .04em;
  color: var(--muted);
  border-bottom: 2px solid #e5e7eb;
}
.line-score-table .rhe-sep {
  border-left: 2px solid #e5e7eb;
  font-weight: 700;
}
.line-score-table .away-row td { border-bottom: 1px solid #e5e7eb; }
.game-meta {
  font-size: .72rem;
  color: var(--muted);
  margin-top: 4px;
  margin-bottom: 14px;
}
.box-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .82rem;
  margin-bottom: 14px;
}
.box-table .team-header th {
  padding: 8px 10px;
  text-align: left;
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--white);
}
.box-table .col-header th {
  padding: 5px 8px;
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--muted);
  background: #f8fafc;
  border-bottom: 1px solid #e5e7eb;
  text-align: center;
}
.box-table .col-header th:first-child { text-align: left; }
.box-table td {
  padding: 5px 8px;
  text-align: center;
  border-bottom: 1px solid #f3f4f6;
}
.box-table td:first-child {
  text-align: left;
  font-weight: 600;
  white-space: nowrap;
}
.box-table tr:last-child td { border-bottom: none; }
.box-table .totals-row td {
  font-weight: 700;
  border-top: 2px solid #e5e7eb;
  border-bottom: none;
  background: #f8fafc;
}
.box-table .rbi-row td { background: #e8e8e8; }
.box-notes {
  font-size: .78rem;
  color: var(--mid);
  padding: 10px 0 4px;
  border-top: 1px solid #e5e7eb;
  line-height: 1.6;
}
.box-notes strong { color: var(--dark); }
.back-to-top a { color: var(--green); }
