/* Shared styles for every page: tokens, base type, top nav with team dropdowns, footer, team pages. */
:root {
  --night: #0a1019;
  --night-2: #101925;
  --line: #223043;
  --ink: #eef2f6;
  --muted: #93a0b1;
  --gold: #f3b53c;
  --ice: #9fd6e8;
  --display: "Big Shoulders Display", "Arial Narrow", Impact, sans-serif;
  --body: "Barlow", "Helvetica Neue", Arial, sans-serif;
  --label: "Barlow Condensed", "Arial Narrow", Arial, sans-serif;
  --gutter: clamp(16px, 4vw, 56px);
  --max: 1240px;
  --nav-h: 68px;
  --safe-top: env(safe-area-inset-top, 0px);
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--night);
  color: var(--ink);
  font: 400 17px/1.6 var(--body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
body.menu-open { overflow: hidden; }
img { max-width: 100%; display: block; }
a { color: inherit; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
.wrap { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }
.eyebrow {
  font: 600 13px/1 var(--label);
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--ice);
  display: flex; align-items: center; gap: 12px;
}
.eyebrow::before { content: ""; width: 28px; height: 1px; background: currentColor; opacity: .7; }
h2 {
  font: 800 clamp(40px, 6vw, 84px)/.92 var(--display);
  text-transform: uppercase;
  letter-spacing: .005em;
  margin: 0;
  text-wrap: balance;
}

/* ---------- Top nav: four team tabs, each with a sub-tab dropdown ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  padding-top: var(--safe-top);
  transition: background .3s ease, backdrop-filter .3s ease;
}
.nav.is-solid, .nav.is-open { background: color-mix(in srgb, var(--night) 88%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.nav__bar { display: flex; align-items: center; justify-content: space-between; gap: 24px; height: var(--nav-h); }
.nav__logo { flex: none; }
.nav__logo img { height: 34px; width: auto; }
.nav__links { display: flex; gap: clamp(10px, 2.4vw, 34px); list-style: none; margin: 0; padding: 0; height: 100%; }
.nav__item { position: relative; display: flex; align-items: center; }
.nav__team {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 2px;
  font: 600 15px/1 var(--label); letter-spacing: .16em; text-transform: uppercase;
  text-decoration: none; opacity: .92;
}
.nav__team::after {
  content: ""; width: 6px; height: 6px;
  border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor;
  transform: translateY(-2px) rotate(45deg); opacity: .55;
}
span.nav__team { cursor: default; }
.nav__sub a span { opacity: .6; font-size: .9em; }
.nav__item:hover .nav__team, .nav__item:focus-within .nav__team { opacity: 1; color: var(--gold); }
.nav__team[aria-current="page"] { opacity: 1; color: var(--gold); }
.nav__sub {
  list-style: none; margin: 0; padding: 8px;
  position: absolute; top: 100%; left: 50%;
  min-width: 212px;
  background: rgba(10, 16, 25, .97);
  border: 1px solid var(--line); border-top: 2px solid var(--gold);
  box-shadow: 0 18px 40px rgba(0, 0, 0, .45);
  opacity: 0; visibility: hidden;
  transform: translate(-50%, 6px);
  transition: opacity .18s ease, transform .18s ease, visibility .18s;
}
.nav__item:hover .nav__sub, .nav__item:focus-within .nav__sub { opacity: 1; visibility: visible; transform: translate(-50%, 0); }
.nav__sub a {
  display: block; padding: 11px 14px;
  font: 600 14px/1 var(--label); letter-spacing: .14em; text-transform: uppercase;
  text-decoration: none; color: #d3dbe4;
}
.nav__sub a:hover, .nav__sub a:focus-visible { color: var(--gold); background: rgba(243, 181, 60, .09); }
.nav__toggle {
  display: none; align-items: center; gap: 10px;
  background: none; border: 0; color: var(--ink); padding: 10px 0; cursor: pointer;
  font: 600 14px/1 var(--label); letter-spacing: .18em; text-transform: uppercase;
}
.nav__toggle i { display: grid; gap: 5px; width: 22px; }
.nav__toggle i::before, .nav__toggle i::after { content: ""; height: 1.5px; background: currentColor; transition: transform .2s; }
.nav.is-open .nav__toggle i::before { transform: translateY(3.25px) rotate(45deg); }
.nav.is-open .nav__toggle i::after { transform: translateY(-3.25px) rotate(-45deg); }

@media (max-width: 1080px) {
  .nav__toggle { display: inline-flex; }
  .nav__links { display: none; }
  /* the nav's backdrop-filter makes it the containing block for the fixed menu, so the open nav fills the screen */
  .nav.is-open { bottom: 0; background: var(--night); }
  .nav.is-open .nav__links {
    display: block;
    position: fixed; left: 0; right: 0; bottom: 0; top: calc(var(--nav-h) + var(--safe-top));
    height: auto; overflow-y: auto;
    background: var(--night);
    padding: 8px var(--gutter) 48px;
  }
  .nav__item { display: block; padding: 20px 0 16px; border-bottom: 1px solid var(--line); }
  .nav__team { font: 800 36px/1 var(--display); letter-spacing: .01em; padding: 0; }
  .nav__team::after { display: none; }
  .nav__sub {
    position: static; opacity: 1; visibility: visible; transform: none;
    background: none; border: 0; box-shadow: none; min-width: 0;
    padding: 10px 0 0;
    display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px;
  }
  .nav__sub a { padding: 10px 0; color: var(--muted); }
  .nav__sub a:hover { background: none; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 15px 24px;
  font: 600 15px/1 var(--label); letter-spacing: .16em; text-transform: uppercase; text-decoration: none;
  border: 1px solid var(--ink);
  transition: background .2s, color .2s, border-color .2s;
}
.btn svg { width: 18px; height: 18px; fill: currentColor; flex: none; }
.btn--gold { background: var(--gold); border-color: var(--gold); color: var(--night); }
.btn--gold:hover { background: var(--ink); border-color: var(--ink); }
.btn--line:hover { background: var(--ink); color: var(--night); }

/* ---------- Team pages ---------- */
.team-hero {
  position: relative; isolation: isolate; overflow: hidden;
  min-height: clamp(440px, 70vh, 760px);
  display: flex; align-items: flex-end;
  padding-top: calc(var(--nav-h) + var(--safe-top));
}
.team-hero__img {
  position: absolute; inset: 0; z-index: -2;
  width: 100%; height: 100%; object-fit: cover;
  -webkit-mask-image: linear-gradient(to bottom, #000 45%, rgba(0,0,0,.5) 75%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 45%, rgba(0,0,0,.5) 75%, transparent 100%);
}
.team-hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    linear-gradient(to right, rgba(10,16,25,.85) 0%, rgba(10,16,25,.35) 60%, rgba(10,16,25,.1) 100%),
    linear-gradient(to bottom, rgba(10,16,25,.55) 0%, transparent 30%);
}
.team-hero__text { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; padding-bottom: clamp(40px, 7vw, 80px); }
.team-hero h1 {
  margin: 0;
  font: 900 clamp(54px, 16vw, 220px)/.82 var(--display);
  text-transform: uppercase; letter-spacing: .005em;
}
.team-hero__stripe { width: 132px; height: 6px; background: linear-gradient(90deg, var(--c1) 50%, var(--c2) 50%); }
.team-hero p { margin: 0; max-width: 46ch; color: #d3dbe4; font-size: 18px; }

.subtabs {
  position: sticky; top: calc(var(--nav-h) + var(--safe-top)); z-index: 40;
  background: color-mix(in srgb, var(--night) 92%, transparent);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.subtabs__list {
  display: flex; gap: clamp(18px, 4vw, 48px);
  overflow-x: auto; scrollbar-width: none;
}
.subtabs__list::-webkit-scrollbar { display: none; }
.subtab {
  flex: none;
  padding: 20px 2px 17px;
  font: 600 15px/1 var(--label); letter-spacing: .16em; text-transform: uppercase;
  text-decoration: none; white-space: nowrap;
  color: var(--muted);
  border-bottom: 2px solid transparent;
  transition: color .2s, border-color .2s;
}
.subtab:hover { color: var(--ink); }
.subtab[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--accent, var(--gold)); }

.panel {
  padding-block: clamp(56px, 8vw, 110px) clamp(80px, 10vw, 140px);
  scroll-margin-top: calc(var(--nav-h) + var(--safe-top) + 56px);
}
.panel[hidden] { display: none; }
.panel__head { display: grid; gap: 18px; margin-bottom: clamp(24px, 3vw, 40px); }
.panel__lead { margin: 0; max-width: 56ch; color: var(--muted); font-size: 19px; }
.soon {
  margin-top: clamp(32px, 5vw, 56px);
  border: 1px dashed #33465e;
  padding: clamp(26px, 4vw, 48px);
  display: grid; gap: 10px; justify-items: start;
  background: linear-gradient(135deg, rgba(159,214,232,.04), transparent 60%);
}
.soon__badge {
  font: 600 13px/1 var(--label); letter-spacing: .2em; text-transform: uppercase;
  color: var(--accent-ink, var(--night)); background: var(--accent, var(--gold)); padding: 7px 10px 6px;
}
.soon p { margin: 0; max-width: 52ch; color: var(--muted); }
.soon a { color: var(--ink); text-underline-offset: 3px; }
.soon a:hover { color: var(--accent, var(--gold)); }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--line); padding-block: 48px 40px; color: var(--muted); font-size: 14px; }
.footer__top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px; }
.footer__top img { height: 46px; width: auto; }
.footer nav { display: flex; flex-wrap: wrap; gap: 14px 22px; }
.footer nav a { text-decoration: none; font: 600 13px/1 var(--label); letter-spacing: .16em; text-transform: uppercase; color: var(--ink); }
.footer nav a:hover { color: var(--gold); }
.footer__credits { margin: 30px 0 0; max-width: 90ch; line-height: 1.6; }
.footer__copy { margin: 14px 0 0; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .nav__sub { transition: none; }
}

/* ---------- Season Stories: decade rail + season cards (same template for every team) ---------- */
.seasons {
  margin-top: clamp(36px, 5vw, 56px);
  display: grid; grid-template-columns: 188px minmax(0, 1fr);
  gap: clamp(24px, 4vw, 56px); align-items: start;
}
.seasons__rail {
  position: sticky; top: calc(var(--nav-h) + var(--safe-top) + 80px);
  display: grid; gap: 8px;
}
.decade {
  display: grid; gap: 6px;
  padding: 14px 16px 14px;
  color: var(--muted); text-decoration: none;
  border: 1px solid var(--line); border-left: 3px solid var(--line);
  background: transparent; cursor: pointer; text-align: left; font: inherit;
  transition: color .2s, border-color .2s, background .2s;
}
.decade:hover { color: var(--ink); border-color: #33465e; }
.decade[aria-pressed="true"] { color: var(--ink); border-color: var(--line); border-left-color: var(--accent, var(--gold)); background: color-mix(in srgb, var(--accent, var(--gold)) 8%, transparent); }
.decade__name { font: 900 44px/.85 var(--display); }
.decade[aria-pressed="true"] .decade__name { color: var(--accent, var(--gold)); }
.decade__range { font: 600 14px/1.1 var(--label); letter-spacing: .1em; }
.decade__meta { font: 500 13px/1.2 var(--label); letter-spacing: .06em; color: var(--muted); }

.decade-group { display: grid; gap: 16px; }
.decade-group[hidden] { display: none; }
.decade-group__title {
  margin: 0 0 4px;
  font: 600 13px/1 var(--label); letter-spacing: .22em; text-transform: uppercase; color: var(--ice);
}

.season {
  --pennant: var(--team-pennant, #223043);
  display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: clamp(16px, 2.4vw, 28px);
  padding: clamp(18px, 2.4vw, 26px);
  background: var(--night-2);
  border: 1px solid var(--line);
  scroll-margin-top: calc(var(--nav-h) + var(--safe-top) + 72px);
}
.season__banner {
  align-self: start;
  width: 72px; min-height: 96px; padding: 14px 4px 26px;
  display: grid; justify-items: center; align-content: start; gap: 4px;
  background: var(--pennant); color: #fff;
  clip-path: polygon(0 0, 100% 0, 100% 80%, 50% 100%, 0 80%);
  box-shadow: inset 0 3px 0 rgba(255,255,255,.18);
}
.season__year { font: 900 26px/.9 var(--display); letter-spacing: .01em; font-variant-numeric: tabular-nums; }
.season__span { font: 600 11px/1 var(--label); letter-spacing: .08em; opacity: .85; }
.season.is-champ { border-color: color-mix(in srgb, var(--accent, var(--gold)) 55%, transparent); background: linear-gradient(135deg, color-mix(in srgb, var(--accent, var(--gold)) 10%, transparent), var(--night-2) 55%); }
.season.is-champ .season__banner { background: var(--accent, var(--gold)); color: var(--accent-ink, var(--night)); }

.season__body { display: grid; gap: 16px; min-width: 0; }
.season__head { display: grid; gap: 6px; }
.season__label, .season dt {
  font: 600 12px/1 var(--label); letter-spacing: .16em; text-transform: uppercase; color: var(--muted);
}
.season__result { margin: 0; font: 800 clamp(26px, 3vw, 36px)/.95 var(--display); text-transform: uppercase; }
.season.is-champ .season__result { color: var(--accent, var(--gold)); }
.season.is-miss .season__result { color: #b8c2cf; }

.season dl { margin: 0; display: grid; gap: 14px 24px; }
.season dd { margin: 5px 0 0; font: 600 17px/1.25 var(--body); color: var(--ink); overflow-wrap: anywhere; }
.season dd small { font: 600 12px/1 var(--label); letter-spacing: .08em; color: var(--accent, var(--gold)); margin-left: 6px; white-space: nowrap; }
.season dd small.fmt { color: var(--muted); }
.season__stats { grid-template-columns: repeat(3, minmax(0, 1fr)); padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.season__stats dd { font: 800 26px/1 var(--display); letter-spacing: .01em; font-variant-numeric: tabular-nums; }
.season__stats dd small { font-family: var(--label); }
.season__leaders { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.season__story { margin: 0; color: #d3dbe4; max-width: 70ch; border-left: 2px solid var(--accent, var(--gold)); padding-left: 14px; }
.seasons__note { margin: 28px 0 0; color: var(--muted); font-size: 14px; max-width: 80ch; }

@media (max-width: 900px) {
  .season__leaders { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .seasons { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .seasons__rail {
    top: calc(var(--nav-h) + var(--safe-top) + 55px); z-index: 30;
    display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none;
    margin-inline: calc(var(--gutter) * -1); padding: 10px var(--gutter);
    background: color-mix(in srgb, var(--night) 94%, transparent);
    backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  }
  .seasons__rail::-webkit-scrollbar { display: none; }
  .decade { flex: none; padding: 9px 14px 8px; display: flex; align-items: baseline; gap: 10px; }
  .decade__name { font-size: 30px; }
  .decade__meta { display: none; }
  .season { grid-template-columns: minmax(0, 1fr); }
  .season__banner {
    width: auto; min-height: 0; padding: 8px 14px; justify-self: start;
    display: flex; align-items: baseline; gap: 10px;
    clip-path: polygon(0 0, 100% 0, calc(100% - 12px) 50%, 100% 100%, 0 100%);
    padding-right: 28px;
  }
  .season__stats { gap: 14px 16px; }
  .season__stats dd { font-size: 22px; }
  .season__stats dd small.fmt { display: block; margin: 6px 0 0; }
  .season dl { gap: 14px 16px; }
}

/* 7+ leaders (e.g. baseball): four columns on wide screens */
@media (min-width: 1100px) {
  .season__leaders--wide { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* ---------- Arenas tab: timeline + full-bleed venue blocks (same feel as the homepage venues) ---------- */
.arenas { margin-top: clamp(28px, 4vw, 48px); }
.arena-tl {
  list-style: none; margin: 0 0 clamp(24px, 4vw, 40px); padding: 0;
  position: relative; height: 92px;
  border-top: 1px solid var(--line);
}
.arena-tl__seg { position: absolute; top: 0; left: var(--l); width: var(--w); height: 100%; }
.arena-tl__bar {
  display: block; height: 8px; margin: 14px 2px 0 0;
  background: #33465e;
}
.arena-tl__seg.is-current .arena-tl__bar { background: var(--accent, var(--gold)); }
.arena-tl__label {
  display: block; margin-top: 10px; padding-left: 8px; border-left: 1px solid #33465e;
  font: 600 12px/1.25 var(--label); letter-spacing: .1em; text-transform: uppercase; color: var(--muted);
  white-space: nowrap; width: max-content;
}
.arena-tl__seg.is-alt .arena-tl__label { margin-top: 32px; }
.arena-tl__seg.is-alt .arena-tl__label { border-left-color: #33465e; }
.arena-tl__label b { color: var(--ink); font-weight: 600; }

.arena {
  position: relative; isolation: isolate; overflow: hidden;
  min-height: clamp(560px, 92vh, 920px);
  display: flex; align-items: flex-end;
  --fade: linear-gradient(to bottom,
    rgba(0,0,0,0) 0%, rgba(0,0,0,.14) 8%, rgba(0,0,0,.5) 16%, rgba(0,0,0,.85) 24%, #000 32%,
    #000 62%, rgba(0,0,0,.7) 74%, rgba(0,0,0,.3) 86%, rgba(0,0,0,0) 100%);
}
.arena__img, .arena::after { -webkit-mask-image: var(--fade); mask-image: var(--fade); }
.arena__img { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; }
.arena::after {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    linear-gradient(to right, rgba(10,16,25,.88) 0%, rgba(10,16,25,.55) 45%, rgba(10,16,25,.1) 100%),
    linear-gradient(to top, rgba(10,16,25,.7), transparent 60%);
}
.arena--right::after {
  background:
    linear-gradient(to left, rgba(10,16,25,.88) 0%, rgba(10,16,25,.55) 45%, rgba(10,16,25,.1) 100%),
    linear-gradient(to top, rgba(10,16,25,.7), transparent 60%);
}
.arena__text { display: grid; gap: 16px; padding-block: 120px clamp(80px, 14vh, 150px); }
.arena__text > * { max-width: 640px; }
.arena--right .arena__text { justify-items: end; }
.arena--right .arena__text > * { text-align: left; }
.arena__meta { display: flex; flex-wrap: wrap; gap: 8px 22px; font: 600 14px/1.2 var(--label); letter-spacing: .16em; text-transform: uppercase; color: var(--ice); }
.arena__meta b { color: var(--accent, var(--gold)); font-weight: 600; }
.arena h3 { margin: 0; font: 900 clamp(46px, 7.5vw, 112px)/.88 var(--display); text-transform: uppercase; text-wrap: balance; }
.arena__blurb { margin: 0; color: #d3dbe4; font-size: 17px; }
.arena__facts {
  margin: 4px 0 0; padding: 18px 20px;
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 24px;
  background: rgba(10, 16, 25, .62); border: 1px solid rgba(255,255,255,.08);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.arena__facts dt { font: 600 12px/1 var(--label); letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.arena__facts dd { margin: 6px 0 0; font: 600 16px/1.3 var(--body); color: var(--ink); }
.arena__names { display: grid; gap: 8px; }
.arena__names-label { font: 600 12px/1 var(--label); letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.arena__names ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.arena__names li {
  padding: 7px 11px; border: 1px solid #33465e; background: rgba(10,16,25,.5);
  font: 600 14px/1.2 var(--label); letter-spacing: .04em;
}
.arena__names li span { color: var(--muted); margin-left: 4px; }
.arena__names li:last-child { border-color: var(--accent, var(--gold)); }

/* venues without a licensed photo: typographic panel */
.arena--nophoto { min-height: 0; background: linear-gradient(160deg, #111c2b 0%, var(--night) 70%); border-top: 1px solid var(--line); }
.arena--nophoto::after { display: none; }
.arena--nophoto .arena__text { padding-block: clamp(70px, 10vw, 120px); }
.arena__ghost {
  position: absolute; z-index: -1; right: -2vw; top: 50%; transform: translateY(-50%);
  font: 900 clamp(120px, 22vw, 340px)/.8 var(--display); letter-spacing: -.01em;
  color: transparent; -webkit-text-stroke: 1.5px rgba(159, 214, 232, .12);
  white-space: nowrap; pointer-events: none; user-select: none;
}
.arena--right .arena__ghost { right: auto; left: -2vw; }

.arenas__foot { padding-top: clamp(40px, 6vw, 70px); }
.arena-others__title { margin: 0 0 16px; font: 800 clamp(28px, 3.4vw, 40px)/1 var(--display); text-transform: uppercase; }
.arena-others { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.arena-others li { padding: 16px 18px; background: var(--night-2); border: 1px solid var(--line); display: grid; gap: 6px; }
.arena-others__when { font: 600 12px/1 var(--label); letter-spacing: .16em; text-transform: uppercase; color: var(--accent, var(--gold)); }
.arena-others b { font: 600 17px/1.25 var(--body); }
.arena-others p { margin: 0; color: var(--muted); font-size: 15px; }

@media (max-width: 760px) {
  .arena-tl { height: auto; display: grid; gap: 10px; padding-top: 14px; }
  .arena-tl__seg { position: static; width: auto; height: auto; display: grid; grid-template-columns: 90px 1fr; align-items: center; gap: 10px; }
  .arena-tl__bar { margin: 0; width: calc(var(--w) * 0.9 + 6px); max-width: 90px; }
  .arena-tl__label, .arena-tl__seg.is-alt .arena-tl__label { margin: 0; white-space: normal; width: auto; border: 0; padding: 0; }
  .arena { min-height: 0; }
  .arena__img { height: 60%; }
  .arena:not(.arena--nophoto) .arena__text { padding-top: 38vh; }
  .arena--right .arena__text { justify-items: start; }
  .arena__facts { grid-template-columns: minmax(0, 1fr); }
  .arena__ghost { font-size: 34vw; top: 70px; transform: none; opacity: .8; }
}

/* ---------- Legends: vertical centered timeline ---------- */
.legends { position: relative; padding: 18px 0 4px; }
.lg { list-style: none; margin: 0; padding: 0; position: relative; }
.lg::before {
  content: ""; position: absolute; left: 50%; top: 0; bottom: 0; width: 2px; transform: translateX(-1px);
  background: linear-gradient(to bottom, var(--accent, var(--gold)), var(--line) 220px, var(--line));
}
.lg__item { display: grid; grid-template-columns: minmax(0, 1fr) 96px minmax(0, 1fr); align-items: start; }
.lg__item + .lg__item { margin-top: -64px; }
.lg__mark { grid-column: 2; grid-row: 1; position: relative; z-index: 1; display: flex; justify-content: center; padding-top: 24px; }
.lg__mark::before { content: ""; position: absolute; top: 41px; width: 50%; height: 2px; background: var(--line); z-index: -1; }
.lg__item--left .lg__mark::before { left: 0; }
.lg__item--right .lg__mark::before { right: 0; }
.lg__year {
  font: 800 19px/1 var(--display); letter-spacing: .02em; color: var(--ink);
  background: var(--night); border: 2px solid var(--accent, var(--gold)); border-radius: 999px;
  padding: 8px 12px; min-width: 66px; text-align: center;
}
.lg__dot { width: 12px; height: 12px; margin-top: 11px; border-radius: 50%; background: var(--accent, var(--gold)); box-shadow: 0 0 0 5px var(--night); }
.is-active .lg__year { background: var(--accent, var(--gold)); color: var(--accent-ink, var(--night)); }
.lg__card {
  grid-row: 1; position: relative; overflow: hidden; isolation: isolate;
  width: 100%; max-width: 470px; padding: 22px 24px 20px;
  background: linear-gradient(160deg, var(--night-2), rgba(16, 25, 37, .55));
  border: 1px solid var(--line); border-radius: 4px;
}
.lg__item--left .lg__card { grid-column: 1; justify-self: end; border-right: 3px solid var(--accent, var(--gold)); }
.lg__item--right .lg__card { grid-column: 3; justify-self: start; border-left: 3px solid var(--accent, var(--gold)); }
.lg__num {
  position: absolute; z-index: -1; right: -4px; bottom: -22px;
  font: 900 150px/.8 var(--display); color: transparent;
  -webkit-text-stroke: 1.5px rgba(159, 214, 232, .13); pointer-events: none; user-select: none;
}
.lg__kicker { margin: 0 0 6px; font: 600 12px/1.2 var(--label); letter-spacing: .18em; text-transform: uppercase; color: var(--muted); }
.lg__name { margin: 0 0 12px; font: 800 clamp(26px, 2.6vw, 34px)/1 var(--display); letter-spacing: .01em; text-transform: uppercase; }
.lg__badges { list-style: none; margin: 0 0 12px; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.lg__badges li {
  font: 600 11px/1 var(--label); letter-spacing: .12em; text-transform: uppercase;
  padding: 5px 8px; border: 1px solid var(--line); border-radius: 2px; color: var(--muted);
}
.lg__badges .is-ret { background: var(--accent, var(--gold)); border-color: var(--accent, var(--gold)); color: var(--accent-ink, var(--night)); }
.lg__badges .is-hof { border-color: var(--accent, var(--gold)); color: var(--accent, var(--gold)); }
.lg__badges .is-ring { border-color: rgba(159, 214, 232, .5); color: var(--ice); }
.lg__badges .is-live { border-color: rgba(126, 226, 168, .55); color: #7ee2a8; display: inline-flex; align-items: center; gap: 6px; }
.lg__badges .is-live::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #7ee2a8; }
.lg__line { margin: 0; font-size: 15.5px; line-height: 1.55; color: #c9d2dd; }
.lg__stats { display: flex; flex-wrap: wrap; gap: 10px 22px; margin: 14px 0 0; padding-top: 12px; border-top: 1px solid var(--line); }
.lg__stats dt { font: 600 11px/1.2 var(--label); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.lg__stats dd { margin: 4px 0 0; font: 800 24px/1 var(--display); color: var(--ink); }
/* Short-stint Hall of Famers */
.is-cameo .lg__card { max-width: 380px; padding: 14px 18px; background: rgba(16, 25, 37, .45); border-style: dashed; border-width: 1px; }
.is-cameo.lg__item--left .lg__card, .is-cameo.lg__item--right .lg__card { border-color: var(--line); }
.is-cameo .lg__name { font-size: 22px; margin-bottom: 8px; }
.is-cameo .lg__num { font-size: 92px; bottom: -12px; }
.is-cameo .lg__line { font-size: 14.5px; }
.is-cameo .lg__mark::before { top: 37px; }
.lg__end {
  display: block; width: max-content; margin: 22px auto 0; position: relative;
  font: 600 12px/1 var(--label); letter-spacing: .2em; text-transform: uppercase; color: var(--muted);
  padding: 7px 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--night);
}
.legends__note { margin: 34px 0 0; max-width: 72ch; font-size: 13.5px; line-height: 1.55; color: var(--muted); }
/* Scroll reveal (only when JS adds .lg-anim) */
.lg-anim .lg__card { opacity: 0; transform: translateY(22px); transition: opacity .6s ease, transform .6s ease; }
.lg-anim .lg__item.is-in .lg__card { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .lg-anim .lg__card { opacity: 1; transform: none; transition: none; } }
@media (max-width: 760px) {
  .lg::before { left: 21px; }
  .lg__item { grid-template-columns: 44px minmax(0, 1fr); column-gap: 10px; }
  .lg__item + .lg__item { margin-top: 16px; }
  .lg__mark { grid-column: 1; padding-top: 18px; }
  .lg__mark::before { display: none; }
  .lg__year { font-size: 13px; min-width: 0; padding: 5px 3px; width: 44px; border-width: 2px; }
  .lg__dot { margin-top: 8px; }
  .lg__item--left .lg__card, .lg__item--right .lg__card { grid-column: 2; justify-self: stretch; max-width: none; border-right: 1px solid var(--line); border-left: 3px solid var(--accent, var(--gold)); }
  .is-cameo.lg__item--left .lg__card, .is-cameo.lg__item--right .lg__card { border: 1px dashed var(--line); }
  .lg__card { padding: 18px 18px 16px; }
  .lg__num { font-size: 120px; }
  .lg__end { margin-left: 0; }
}

/* ---------- Community page ---------- */
.jump {
  flex: none; padding: 20px 2px 17px;
  font: 600 15px/1 var(--label); letter-spacing: .16em; text-transform: uppercase;
  text-decoration: none; color: var(--muted); border-bottom: 3px solid transparent;
}
.jump:hover { color: var(--ink); border-bottom-color: var(--accent, var(--gold)); }
.community { padding-top: clamp(40px, 6vw, 72px); }
.helpline {
  display: grid; grid-template-columns: auto minmax(0, 1fr); gap: clamp(18px, 3vw, 40px); align-items: center;
  padding: clamp(20px, 3vw, 32px); margin-bottom: clamp(40px, 6vw, 72px);
  border: 1px solid var(--line); border-left: 4px solid var(--accent, var(--gold)); border-radius: 4px;
  background: linear-gradient(120deg, rgba(58, 141, 222, .14), rgba(16, 25, 37, .6));
}
.helpline__num a { font: 900 clamp(64px, 9vw, 112px)/.85 var(--display); color: var(--accent, var(--gold)); text-decoration: none; }
.helpline h2 { margin: 0 0 6px; font: 800 clamp(26px, 3vw, 36px)/1 var(--display); text-transform: uppercase; }
.helpline p { margin: 0; color: #d3dbe4; max-width: 62ch; }
.helpline .helpline__alt { margin-top: 10px; font-size: 15px; color: var(--muted); }
.helpline__alt a { color: var(--ice); }
.city { scroll-margin-top: calc(var(--nav-h) + 80px); padding-bottom: clamp(40px, 6vw, 72px); }
.city__head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; border-bottom: 1px solid var(--line); padding-bottom: 12px; margin-bottom: 22px; }
.city__head h2 { margin: 0; font: 900 clamp(40px, 5.5vw, 72px)/.9 var(--display); text-transform: uppercase; }
.city__head span { font: 600 13px/1 var(--label); letter-spacing: .16em; text-transform: uppercase; color: var(--muted); white-space: nowrap; }
.orgs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.org {
  display: grid; align-content: start; gap: 10px;
  padding: 22px 22px 20px; border: 1px solid var(--line); border-top: 3px solid var(--accent, var(--gold)); border-radius: 4px;
  background: linear-gradient(160deg, var(--night-2), rgba(16, 25, 37, .5));
}
.org h3 { margin: 0; font: 700 21px/1.2 var(--body); }
.org__desc { margin: 0; color: #c9d2dd; font-size: 15.5px; line-height: 1.5; }
.org__contact { list-style: none; margin: 4px 0 0; padding: 12px 0 0; border-top: 1px solid var(--line); display: grid; gap: 8px; }
.org__contact li { display: grid; grid-template-columns: 74px minmax(0, 1fr); gap: 10px; font-size: 15px; line-height: 1.4; }
.org__contact span { font: 600 11px/1.9 var(--label); letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.org__contact a { color: var(--ink); text-decoration: none; overflow-wrap: anywhere; }
.org__contact a:hover { color: var(--ice); text-decoration: underline; }
.org__extra { margin: 0; font-size: 13.5px; color: var(--muted); font-style: italic; }
.community__note { margin: 0; max-width: 72ch; font-size: 13.5px; color: var(--muted); }
@media (max-width: 1000px) { .orgs { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) {
  .orgs { grid-template-columns: minmax(0, 1fr); }
  .helpline { grid-template-columns: minmax(0, 1fr); }
  .city__head { flex-wrap: wrap; }
}

/* ---------- Charts tab: a full-height bar chart with filters ---------- */
#charts { padding-top: 14px; }
#charts .panel__head { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.chart {
  display: flex; flex-direction: column; gap: 12px;
  height: calc(100svh - var(--nav-h) - var(--safe-top) - 57px - 28px); min-height: 440px;
}
.chart__top { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.chart__title { margin: 0; font: 800 clamp(26px, 3vw, 38px)/1 var(--display); text-transform: uppercase; }
.chart__title small { font: 500 15px/1.2 var(--body); text-transform: none; color: var(--muted); margin-left: 6px; }
.chartf__mode { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; padding: 3px; }
.chartf__mode button {
  font: 600 13px/1 var(--label); letter-spacing: .12em; text-transform: uppercase; cursor: pointer;
  color: var(--muted); background: none; border: 0; border-radius: 999px; padding: 9px 14px;
}
.chartf__mode button[aria-pressed="true"] { background: var(--accent, var(--gold)); color: var(--accent-ink, var(--night)); }
.chart__controls { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.chartf__pick select {
  appearance: none; -webkit-appearance: none; cursor: pointer;
  font: 600 13px/1 var(--label); letter-spacing: .12em; text-transform: uppercase; color: var(--ink);
  background: var(--night-2) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%239fd6e8' stroke-width='1.6'/%3E%3C/svg%3E") no-repeat right 14px center;
  border: 1px solid var(--line); border-radius: 999px; padding: 12px 40px 12px 16px; min-width: 200px;
}
.chartf__pick select:hover { border-color: var(--accent, var(--gold)); }
.chartf__pick select:focus-visible { outline: 2px solid var(--accent, var(--gold)); outline-offset: 2px; }
.chartf__pick option { text-transform: none; letter-spacing: 0; background: var(--night-2); color: var(--ink); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.chart__plot { position: relative; flex: 1; min-height: 0; }
.cp__grid, .cp__bars { position: absolute; left: 50px; right: 56px; top: 2px; bottom: 26px; }
.cp__line { position: absolute; top: 0; bottom: 0; border-left: 1px solid var(--line); }
.cp__line span { position: absolute; top: calc(100% + 8px); left: 0; transform: translateX(-50%); font: 500 12px/1 var(--label); letter-spacing: .04em; color: var(--muted); white-space: nowrap; }
.cp__bars { display: flex; flex-direction: column; }
.cp__col { position: relative; flex: 1 1 0; min-height: 0; outline: none; cursor: default; }
.cp__stack { position: absolute; inset: 0; display: flex; align-items: center; }
.cp__bar {
  position: relative; height: calc(100% - 2px); max-height: 24px; border-radius: 0 4px 4px 0; flex: none;
  background: var(--accent, var(--gold)); transition: opacity .2s;
}
.cp__in { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); max-width: calc(100% - 12px); font: 600 12px/1 var(--body); color: var(--accent-ink, var(--night)); white-space: nowrap; pointer-events: none; }
.cp__bars--decade .cp__in { font-size: 14px; }
.cp__bars--decade .cp__bar { height: 56%; max-height: 40px; }
.cp__bar.is-na { width: 0 !important; }
.cp__col.is-hot .cp__bar, .cp__col:focus-visible .cp__bar { opacity: .75; }
.cp__col:focus-visible { box-shadow: inset 0 0 0 1px var(--ice); }
.cp__val { margin-left: 8px; font: 700 15px/1 var(--body); color: var(--ink); white-space: nowrap; display: inline-flex; align-items: baseline; gap: 6px; }
.cp__val small { font: 500 13px/1 var(--body); color: var(--muted); }
.cp__bars--season .cp__val { font-size: 11.5px; }
.cp__star { font-style: normal; font-size: 11px; line-height: 1; color: var(--ink); }
.cp__x { position: absolute; right: calc(100% + 10px); top: 50%; transform: translateY(-50%); font: 600 12px/1 var(--label); letter-spacing: .06em; color: var(--muted); white-space: nowrap; }
.cp__bars--decade .cp__x { font-size: 15px; color: var(--ink); }
.cp__tip {
  position: absolute; z-index: 5; pointer-events: none;
  display: grid; gap: 3px; min-width: 150px; max-width: 260px; padding: 10px 12px;
  background: rgba(10, 16, 25, .97); border: 1px solid #33465e; border-radius: 6px; box-shadow: 0 12px 30px rgba(0,0,0,.45);
  font-size: 14px; line-height: 1.35; color: var(--ink);
}
.cp__tip[hidden] { display: none; }
.cp__tip b { font: 700 13px/1.2 var(--label); letter-spacing: .12em; text-transform: uppercase; }
.cp__tip .cp__tip-sub { font-size: 12.5px; color: var(--muted); }
.chart__note { margin: 0; font-size: 12.5px; line-height: 1.45; color: var(--muted); flex: none; }
.chart__key { white-space: nowrap; color: var(--ink); margin-left: 6px; }
@media (max-width: 640px) {
  .chart { gap: 10px; min-height: 420px; }
  .chart__controls { width: 100%; display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .chartf__pick select { width: 100%; min-width: 0; }
  .chartf__mode { display: flex; }
  .chartf__mode button { flex: 1; }
  .chart__title small { display: block; margin: 6px 0 0; }
  .cp__grid, .cp__bars { left: 44px; }
  .cp__val { font-size: 13px; }
  .chart__note { font-size: 11.5px; }
}

/* ---------- Oddities tab (reuses the Legends timeline) ---------- */
.odd__title { font-size: clamp(22px, 2.2vw, 28px); }
.odd__src { margin: 12px 0 0; font-size: 13px; color: var(--muted); }
.odd__src a { color: var(--ice); }

/* ---------- Championships tab (reuses the Season Stories rail and card) ---------- */
.titles { display: grid; gap: clamp(28px, 4vw, 48px); }
.season.title { grid-template-columns: minmax(0, 1fr); gap: 20px; padding: clamp(20px, 3vw, 36px); }
.title__top { display: flex; align-items: flex-start; gap: clamp(16px, 2.4vw, 28px); padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.title__top .season__head { flex: 1; min-width: 0; }
.title__top .season__result { font-size: clamp(30px, 3.6vw, 46px); }
@media (max-width: 760px) {
  .title__top { flex-direction: column; gap: 12px; }
}
.title__final { margin: 4px 0 0; color: #d3dbe4; max-width: 70ch; }
.title__final b { color: var(--ink); }
.title__facts { padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.title .season__leaders { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.title__h { margin: 6px 0 -6px; font: 600 13px/1 var(--label); letter-spacing: .2em; text-transform: uppercase; color: var(--ice); }
.tq { margin: 4px 0; padding: 4px 0 4px 22px; border-left: 3px solid var(--accent, var(--gold)); }
.tq blockquote { margin: 0; font: 600 clamp(19px, 2vw, 24px)/1.35 var(--body); color: var(--ink); text-wrap: pretty; }
.tq figcaption { margin-top: 10px; font-size: 13.5px; color: var(--muted); }
.tq figcaption b { color: #d3dbe4; font-weight: 600; }
.tq figcaption a { color: var(--ice); }
.tpath { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; counter-reset: rd; }
.tp { position: relative; display: grid; gap: 8px; padding: 14px 0 14px 34px; border-top: 1px solid var(--line); counter-increment: rd; }
.tp::before {
  content: counter(rd); position: absolute; left: 0; top: 14px; width: 22px; height: 22px; border-radius: 50%;
  display: grid; place-items: center; font: 700 12px/1 var(--label); background: var(--accent, var(--gold)); color: var(--accent-ink, var(--night));
}
.tp:last-child::before { content: "\2605"; }
.tp__head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; }
.tp__round { font: 600 12px/1 var(--label); letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.tp__opp { font: 700 18px/1.2 var(--body); color: var(--ink); }
.tp__series { font: 800 20px/1 var(--display); color: var(--accent, var(--gold)); letter-spacing: .02em; }
.tp__games { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.tp__games li { font: 600 12px/1 var(--label); letter-spacing: .06em; padding: 5px 8px; border-radius: 3px; border: 1px solid var(--line); color: #c9d2dd; white-space: nowrap; }
.tp__games li.is-w { border-color: color-mix(in srgb, var(--accent, var(--gold)) 60%, transparent); color: var(--ink); }
.tp__games li.is-l { color: var(--muted); }
.tp__site { font: 600 12px/1 var(--label); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.tp p { margin: 0; color: #c9d2dd; font-size: 15.5px; line-height: 1.5; max-width: 72ch; }
.tl__list { margin: 0; padding-left: 20px; display: grid; gap: 8px; color: #d3dbe4; max-width: 74ch; }
.tl__list li::marker { color: var(--accent, var(--gold)); }
@media (max-width: 640px) {
  .title .title__facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tq { padding-left: 16px; }
}

/* ---------- Owners tab ---------- */
.owners { display: grid; gap: clamp(20px, 3vw, 32px); }
.owner {
  display: grid; gap: 16px; padding: clamp(20px, 3vw, 32px);
  background: var(--night-2); border: 1px solid var(--line); border-left: 3px solid var(--accent, var(--gold));
}
.owner__top { display: grid; gap: 6px; }
.owner__tenure { font: 600 12px/1 var(--label); letter-spacing: .18em; text-transform: uppercase; color: var(--ice); }
.owner__name { margin: 0; font: 800 clamp(28px, 3.4vw, 42px)/1 var(--display); text-transform: uppercase; }
.owner__role { margin: 0; color: var(--muted); font-size: 15px; }
.owner__stats { margin: 0; padding: 16px 0; border-block: 1px solid var(--line); display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 14px 20px; }
.owner__stats dt { font: 600 12px/1.2 var(--label); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.owner__stats dd { margin: 6px 0 0; font: 800 26px/1 var(--display); color: var(--ink); font-variant-numeric: tabular-nums; }
.owner__stats dd small { display: block; margin-top: 5px; font: 600 11px/1 var(--label); letter-spacing: .08em; color: var(--muted); }
.owner__sum { margin: 0; color: #d3dbe4; max-width: 74ch; }
.owner__honors { margin: 0; color: #d3dbe4; font-size: 15px; }
.owner__honors b { color: var(--ice); font-weight: 600; }
.owner__note, .owner__pre { margin: 0; font-size: 13.5px; color: var(--muted); font-style: italic; }
.owner--brief { border-left-color: var(--line); }
.owner--brief .owner__name { font-size: clamp(22px, 2.4vw, 30px); }
@media (max-width: 900px) { .owner__stats { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 480px) { .owner__stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } .owner__stats dd { font-size: 22px; } }

/* ---------- Essential Highlights (Legends timeline with YouTube videos) ---------- */
.hl__card { max-width: 520px; }
.yt { position: relative; display: block; width: 100%; aspect-ratio: 16 / 9; margin: 4px 0 12px; border: 0; border-radius: 4px; overflow: hidden; background: #000; }
.yt img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .3s ease, opacity .3s; opacity: .9; }
.yt:hover img, .yt:focus-visible img { transform: scale(1.03); opacity: 1; }
.yt__play {
  position: absolute; left: 50%; top: 50%; width: 64px; height: 44px; transform: translate(-50%, -50%);
  border-radius: 12px; background: rgba(10, 16, 25, .78); border: 1px solid rgba(255,255,255,.35);
}
.yt__play::after { content: ""; position: absolute; left: 26px; top: 12px; border-style: solid; border-width: 10px 0 10px 17px; border-color: transparent transparent transparent #fff; }
.yt:hover .yt__play, .yt:focus-visible .yt__play { background: var(--accent, var(--gold)); }
.yt:hover .yt__play::after, .yt:focus-visible .yt__play::after { border-left-color: var(--accent-ink, var(--night)); }
.yt--on { height: auto; }
