/* Scoretrix Legacy, "Green Monster" theme: the chrome borrows Fenway's left-field wall (board
   green, near-black numeral plates, bulb-yellow accents, condensed block capitals); the stats
   stay in the system font on white, laid out as before. Oswald is self-hosted (OFL licence)
   and used for chrome only, so tables never wait on a font. Its @font-face lives inline in
   layout.html so the src can carry the content hash and match the preload. Every text colour
   below is at least 4.5:1 against its background (WCAG AA). */
:root {
  --ink: #1b1b1b; --muted: #5e5e5e; --line: #d5dce8; --band: #f1f4f9; --link: #0b4f8a;
  --board: #122b5c;   /* Federal navy: white text 13.8:1 */
  --plate: #0a1a3a;   /* numeral plate, darker navy: white text 17.2:1 */
  --bulb: #ffffff;    /* accent text on the board (once the bulb yellow): 13.8:1 */
  --soft: #c9d6ea;    /* dim labels on the board: 9.4:1 */
  --champ: #8a6a00;   /* champion star, a dark gold: 5.1:1 on white, 4.6:1 on the row stripe */
  --gold: #f2c230;    /* bright gold, only on navy: champion marks and the Scoretrix wordmark, 8.2:1; navy on it 8.2:1 */
  --stripe: #c8102e;  /* Federal red: header stripe and search button, white on it 5.9:1; never text on navy (2.3:1) */
  --stripe-dark: #a50d26; /* search button hover: white on it 7.8:1 */
  --accent: var(--board);
  --chrome: "Oswald", "Arial Narrow", "Helvetica Neue", Arial, sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; font: 14px/1.4 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; color: var(--ink); background: #fff; }
a { color: var(--link); text-decoration: none; } a:hover { text-decoration: underline; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.chrome { font-family: var(--chrome); text-transform: uppercase; letter-spacing: 0.04em; }

/* Network bar: the Scoretrix Legacy strip above the header. One league today; the menu grows
   as leagues are added, each on its own scoretrix.com subdomain. */
nav.network { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 5px 16px; background: var(--plate); color: var(--soft); font-size: 12px; }
nav.network a { color: var(--soft); }
nav.network details { position: relative; }
nav.network summary { cursor: pointer; list-style: none; display: inline-flex; align-items: center; gap: 8px; }
nav.network summary::-webkit-details-marker { display: none; }
nav.network summary b { display: inline-block; padding: 2px 8px; border: 1px solid #4a6aa8; border-radius: 3px; color: #fff; font-weight: 600; }
nav.network summary b::after { content: " \25BE"; font-size: 10px; }
nav.network details[open] summary b::after { content: " \25B4"; }
nav.network ul { position: absolute; z-index: 20; left: 0; top: calc(100% + 6px); min-width: 260px; margin: 0; padding: 4px 0; list-style: none; background: #fff; border: 1px solid #c4ccda; border-radius: 4px; box-shadow: 0 6px 18px rgba(0, 0, 0, 0.2); }
nav.network li a { display: block; padding: 7px 12px 7px 30px; color: var(--ink); font-size: 13px; font-weight: 600; }
nav.network li a small { display: block; color: var(--muted); font-weight: 400; font-size: 12px; }
nav.network li a:hover { background: var(--band); text-decoration: none; }
nav.network li[aria-current] a { background: var(--band); }
nav.network li[aria-current] a::before { content: "\2713"; float: left; margin-left: -18px; color: var(--board); }

/* Header: league first, "Powered by Scoretrix Legacy" as the signature beneath it. The header
   and its menu ribbon are anchored to the top of the viewport on every page; the network bar
   above it scrolls away. sticky.js measures the header into --chrome-h so in-page anchors
   (the letter links on the Players index) and pinned table headers land below it. */
header.site { position: sticky; top: 0; z-index: 10; background: var(--board); color: #fff; border-bottom: 4px solid var(--stripe); }
html { scroll-padding-top: var(--chrome-h, 0px); }
header.site .top { display: flex; flex-wrap: wrap; gap: 12px 28px; align-items: center; justify-content: space-between; padding: 16px 16px 12px; }
header.site .league { display: block; color: #fff; font-family: var(--chrome); font-weight: 600; font-size: 28px; line-height: 1.1; text-transform: uppercase; letter-spacing: 0.03em; }
header.site .league:hover { text-decoration: none; }
header.site .powered { display: inline-flex; align-items: center; gap: 6px; margin-top: 5px; color: var(--bulb); font-family: var(--chrome); font-weight: 500; font-size: 11px; text-transform: uppercase; letter-spacing: 0.12em; }
header.site .powered:hover { text-decoration: none; color: var(--soft); }
header.site .powered .legacy { color: var(--gold); }
.plates-word { display: inline-flex; gap: 2px; }
/* The baseball that leads off the wordmark: a gold ball inside a gold ring, navy seams. */
.ball { width: 16px; height: 16px; flex: none; margin-right: -2px; }
.ball circle { fill: none; stroke: var(--gold); stroke-width: 8; }
.ball circle.core { fill: var(--gold); stroke: none; }
.ball path { fill: none; stroke: var(--board); stroke-width: 9; stroke-linecap: round; }
.plates-word b { display: inline-block; width: 13px; padding: 1px 0 2px; border-radius: 2px; background: var(--gold); color: var(--board); font-family: var(--chrome); font-weight: 600; font-size: 11px; line-height: 1; letter-spacing: 0; text-align: center; }
header.site nav.main { display: flex; gap: 22px; padding: 8px 16px 0; border-top: 1px solid #2c4c8a; overflow-x: auto; white-space: nowrap; }
header.site nav.main a { display: inline-block; padding-bottom: 8px; border-bottom: 2px solid transparent; color: #fff; font-family: var(--chrome); font-weight: 500; font-size: 15px; text-transform: uppercase; letter-spacing: 0.04em; }
header.site nav.main a:hover { text-decoration: none; border-bottom-color: #fff; }
header.site nav.main a[aria-current="page"] { border-bottom-color: var(--bulb); }
header.site form.search { display: flex; gap: 6px; flex: 1 1 220px; max-width: 360px; }
header.site input { flex: 1; min-width: 0; padding: 7px 10px; border: 1px solid var(--plate); border-radius: 3px; font-size: 13px; }
header.site button { padding: 7px 14px; border: 0; border-radius: 3px; background: var(--stripe); color: #fff; font-weight: 600; font-size: 13px; cursor: pointer; }
header.site button:hover { background: var(--stripe-dark); }
@media (max-width: 700px) {
  header.site .league { font-size: 22px; }
  header.site form.search { max-width: none; flex-basis: 100%; }
  nav.network .about { display: none; }
}

main { max-width: 1200px; margin: 0 auto; padding: 12px 16px 40px; }
footer.site { max-width: 1200px; margin: 0 auto; padding: 16px; color: var(--muted); border-top: 1px solid var(--line); font-size: 12px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 16px; }
footer.site .powered b { color: var(--link); font-weight: 600; }
footer.site .copyright { flex-basis: 100%; margin: 0; }
footer.site .copyright a { color: inherit; }

h1 { font-family: var(--chrome); font-weight: 600; font-size: 32px; line-height: 1.1; margin: 10px 0 4px; text-transform: uppercase; letter-spacing: 0.02em; }
h2 { font-family: var(--chrome); font-weight: 600; font-size: 20px; margin: 24px 0 8px; padding-bottom: 4px; color: var(--board); border-bottom: 3px solid var(--board); text-transform: uppercase; letter-spacing: 0.03em; }
h3 { font-family: var(--chrome); font-weight: 500; font-size: 15px; color: var(--board); text-transform: uppercase; letter-spacing: 0.03em; }
h1 .champ { font-size: 0.75em; vertical-align: 0.1em; }
p.lede { color: var(--muted); margin-top: 0; font-size: 15px; } p.note { color: var(--muted); font-size: 12px; }
nav.crumbs { font-size: 13px; color: var(--muted); margin-top: 8px; } nav.crumbs span::before { content: "\203A"; margin: 0 6px; color: var(--muted); }
nav.prevnext { display: flex; justify-content: space-between; font-size: 13px; }

/* Numeral plates: a headline number in white on a near-black plate, as on the wall. */
dl.plates { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 4px; }
dl.plates div { display: flex; flex-direction: column; align-items: center; gap: 3px; }
dl.plates dt { font-family: var(--chrome); font-weight: 500; font-size: 12px; color: var(--board); text-transform: uppercase; letter-spacing: 0.08em; }
dl.plates dd { margin: 0; min-width: 62px; padding: 5px 8px; border-radius: 2px; background: var(--plate); color: #fff; font-family: var(--chrome); font-weight: 600; font-size: 24px; line-height: 1.1; text-align: center; font-variant-numeric: tabular-nums; }
@media (max-width: 700px) { dl.plates dd { min-width: 52px; font-size: 20px; } }

/* Home: standings beside the champion plate. */
.home-top .wrap table.stats { width: 100%; }
.home-top { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 16px 28px; align-items: start; }
@media (max-width: 900px) { .home-top { grid-template-columns: minmax(0, 1fr); } }
aside.champion { padding: 18px; border-radius: 4px; background: var(--board); color: #fff; border-top: 4px solid var(--gold); }
aside.champion .label { font-family: var(--chrome); font-weight: 500; font-size: 13px; color: var(--gold); text-transform: uppercase; letter-spacing: 0.1em; }
aside.champion .team { display: block; margin: 6px 0 12px; color: #fff; font-family: var(--chrome); font-weight: 600; font-size: 26px; line-height: 1.1; text-transform: uppercase; letter-spacing: 0.02em; }
aside.champion dl.plates { margin: 0 0 12px; } aside.champion dl.plates dt { color: var(--soft); } aside.champion dl.plates dd { min-width: 58px; }
aside.champion .more { color: var(--gold); font-weight: 600; font-size: 13px; }

.wrap { overflow-x: auto; }
table.stats { border-collapse: collapse; font-size: 13px; font-variant-numeric: tabular-nums; white-space: nowrap; }
table.stats th, table.stats td { padding: 4px 7px; text-align: right; border-bottom: 1px solid var(--line); }
table.stats th { background: var(--board); color: #fff; font-family: var(--chrome); font-weight: 500; font-size: 13px; text-transform: uppercase; letter-spacing: 0.04em; border-bottom: 0; position: relative; z-index: 1; cursor: pointer; user-select: none; }
table.stats th a { color: #fff; }
table.stats thead.stuck th { box-shadow: 0 2px 2px -1px rgba(0, 0, 0, 0.25); }
/* .pin is the fixed copy of a header row that sticky.js docks under the site header while its
   table scrolls past; it clips to the table's wrap and scrolls sideways with it. */
.pin { position: fixed; z-index: 5; overflow: hidden; }
.pin table.copy { table-layout: fixed; margin: 0; }
.pin table.copy th { box-sizing: border-box; overflow: hidden; }
table.stats th[aria-sort="ascending"]::after { content: " \25B2"; font-size: 9px; }
table.stats th[aria-sort="descending"]::after { content: " \25BC"; font-size: 9px; }
table.stats th.txt, table.stats td.txt { text-align: left; }
table.stats tbody tr:nth-child(even) { background: var(--band); }
table.stats tr.total td { font-weight: 700; border-top: 2px solid var(--ink); }
.champ { color: var(--champ); } .hof { color: var(--board); font-weight: 700; font-size: 11px; vertical-align: super; }
.cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 0 24px; }
.cols-2 { grid-template-columns: repeat(2, 1fr); } @media (max-width: 700px) { .cols-2 { grid-template-columns: 1fr; } }
ul.index { columns: 3; column-gap: 24px; padding-left: 18px; } @media (max-width: 700px) { ul.index { columns: 1; } }
@media print { nav.network, header.site form, script, .pin { display: none; } body { font-size: 11px; } header.site { position: static; } header.site, table.stats th { -webkit-print-color-adjust: exact; print-color-adjust: exact; } }
nav.letters a { margin-right: 8px; font-weight: 600; } span.years { color: var(--muted); font-size: 12px; }
/* Index filter (Players by team): a labelled select that submits on change, with a button for no-script. */
form.filter { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 4px 0 10px; font-size: 13px; }
form.filter label { font-family: var(--chrome); font-weight: 500; color: var(--board); text-transform: uppercase; letter-spacing: 0.08em; }
form.filter select { padding: 5px 8px; border: 1px solid var(--line); border-radius: 3px; background: #fff; color: var(--ink); font-size: 13px; max-width: 100%; }
form.filter button { padding: 5px 12px; border: 0; border-radius: 3px; background: var(--board); color: #fff; font-weight: 600; font-size: 13px; cursor: pointer; }
form.filter button:hover { background: var(--plate); }
.boards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px 24px; }
@media (max-width: 1000px) { .boards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .boards { grid-template-columns: minmax(0, 1fr); } }
table.board { white-space: normal; } table.board td.txt { word-break: normal; } .boards h3 { margin: 12px 0 4px; } table.board { width: 100%; }
table.grid th { cursor: default; } table.grid th.on { background: var(--plate); color: var(--bulb); } table.grid td.on { background: #e3e9f4; font-weight: 600; }
table.grid tr.nq td { color: var(--muted); font-style: italic; }
/* Teams (career boards and grids): a comma-separated list of every club, which can run to
   half a dozen names. It wraps inside a fixed-width column instead of inheriting the table's
   nowrap and pushing the stats off the right edge. */
table.stats th.teams, table.stats td.teams { white-space: normal; }
table.grid th.teams, table.grid td.teams { width: 260px; min-width: 200px; }
/* On a grid the column collapses to the number of clubs: its header is a button (grid.js) that
   flips the table between .teams-open and .teams-shut. Until it is pressed the column is shut
   on a phone, where the full list would take most of the screen, and open everywhere else. */
table.grid th.teams { cursor: pointer; }
table.grid th.teams button { padding: 0; border: 0; background: none; font: inherit; color: inherit; text-transform: inherit; letter-spacing: inherit; cursor: pointer; }
table.grid th.teams button::after { content: " \25BE"; font-size: 10px; }
table.grid td.teams .count { display: none; }
table.grid.teams-shut th.teams, table.grid.teams-shut td.teams { width: auto; min-width: 0; white-space: nowrap; text-align: right; }
table.grid.teams-shut th.teams button::after { content: " \25B8"; }
table.grid.teams-shut td.teams .list { display: none; } table.grid.teams-shut td.teams .count { display: inline; }
@media (max-width: 700px) {
  table.grid:not(.teams-open) th.teams, table.grid:not(.teams-open) td.teams { width: auto; min-width: 0; white-space: nowrap; text-align: right; }
  table.grid:not(.teams-open) th.teams button::after { content: " \25B8"; }
  table.grid:not(.teams-open) td.teams .list { display: none; } table.grid:not(.teams-open) td.teams .count { display: inline; }
}
nav.pager { display: flex; flex-wrap: wrap; gap: 4px 10px; margin: 8px 0; font-size: 13px; } nav.pager .cur { font-weight: 700; } nav.pager .gap { color: var(--muted); }
/* table.anchor keeps its first two columns (rank or jersey number and Player; Year and Team on a player page) in place while the rest scrolls sideways. */
table.anchor { border-collapse: separate; border-spacing: 0; } /* separate borders: anchored cells paint their whole box, so nothing peeks through */
table.anchor th:nth-child(-n+2), table.anchor td:nth-child(-n+2) { position: sticky; left: 0; background: #fff; }
table.anchor th:nth-child(-n+2) { background: var(--board); z-index: 3; } table.anchor td:nth-child(-n+2) { z-index: 2; }
table.anchor tbody tr:nth-child(even) td:nth-child(-n+2) { background: var(--band); }
table.anchor th:nth-child(2), table.anchor td:nth-child(2) { left: var(--col1-w, 44px); border-right: 1px solid var(--line); }
table.anchor th:nth-child(2) { border-right-color: #4a6aa8; }
/* Hall of Fame: a wall of steel plaques on the numeral-plate navy. Each plaque is a gunmetal
   frame with a screw in every corner (four radial gradients pinned to the corners) around a
   brushed-steel face: the league line, the name (the link to the player page) in engraved
   small capitals over a short rule, the years played, and the clubs. The face fills the frame so
   every plaque in a grid row stands the same height. White lettering is 4.9:1 on the lightest
   corner of the face. */
ul.plaques { list-style: none; margin: 12px 0 0; padding: 24px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; background: var(--plate); border-radius: 4px; }
@media (max-width: 1000px) { ul.plaques { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { ul.plaques { grid-template-columns: minmax(0, 1fr); padding: 16px; gap: 16px; } }
.plaque { --screw: radial-gradient(circle, #c3ccd5 0 3px, #1a2026 3.5px, transparent 4.5px); display: flex; padding: 6px; border-radius: 6px; box-shadow: 0 4px 10px rgba(0, 0, 0, 0.45);
  background-color: #2e353d; background-image: var(--screw), var(--screw), var(--screw), var(--screw); background-size: 26px 26px; background-repeat: no-repeat; background-position: 0 0, 100% 0, 0 100%, 100% 100%; }
.plaque .face { flex: 1; display: flex; flex-direction: column; align-items: center; text-align: center; padding: 22px 20px; border: 2px solid #b8c2cc; border-radius: 3px; background: linear-gradient(135deg, #626c77, #3f4852); color: #f3f6f9; }
.plaque .label { font-family: var(--chrome); font-weight: 500; font-size: 11px; text-transform: uppercase; letter-spacing: 0.18em; }
.plaque .name { display: block; margin-top: 12px; color: #f3f6f9; font-family: "Cinzel", Georgia, "Times New Roman", serif; font-variant-caps: small-caps; font-weight: 700; font-size: 24px; line-height: 1.15; }
.plaque .name::after { content: ""; display: block; width: 48px; height: 2px; margin: 10px auto 0; background: #b8c2cc; }
.plaque .years { display: block; margin-top: 10px; color: #f3f6f9; font-family: var(--chrome); font-weight: 500; font-size: 16px; letter-spacing: 0.08em; }
.plaque .teams { display: block; margin-top: 6px; font-size: 13px; line-height: 1.4; }
@media (max-width: 640px) { .plaque .face { padding: 18px 14px; } .plaque .name { font-size: 22px; } }
