/* Hennen Fantasy League — league archive.
   Newspaper-of-record treatment: Bodoni display, Source Serif body, Archivo
   Narrow for furniture and figures. Hairline grids are built the letterpress
   way — a 1px gap over a rule-coloured background, with paper-coloured cells. */

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --paper: #f5f1e6;
  --paper-alt: #efe9da;
  --ground: #e8e2d4;
  --ink: #16130e;
  --ink-soft: #4a443a;
  --muted: #6b6357;
  --muted-light: #8a8172;
  --rule: #cdc4b0;
  --rule-light: #ded5c2;
  --accent: #8c2b1f;
  --accent-dark: #5f1b12;
  --field: #3f5c3a;

  --display: 'Bodoni Moda', 'Didot', Georgia, serif;
  --body: 'Source Serif 4', Georgia, serif;
  --furniture: 'Archivo Narrow', 'Helvetica Neue', sans-serif;
}

body {
  background: var(--ground);
  color: var(--ink);
  font-family: var(--body);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; cursor: pointer; }
a:hover { color: var(--accent-dark); }

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

/* ---------- Page furniture ---------- */

.page { min-height: 100vh; padding: 28px 16px 60px; }

.paper {
  max-width: 1180px;
  margin: 0 auto;
  background: var(--paper);
  border: 1px solid var(--rule);
  box-shadow: 0 1px 0 #d8d0bd, 0 18px 40px rgba(20, 17, 12, .09);
  padding: 34px 40px 48px;
}

.masthead-meta {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  font-family: var(--furniture);
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
  padding-bottom: 10px;
}

.masthead {
  border-top: 2px solid var(--ink);
  border-bottom: 1px solid var(--ink);
  padding: 14px 0 10px;
  text-align: center;
}

.masthead-title {
  font-family: var(--display);
  font-weight: 900;
  font-size: 74px;
  line-height: .92;
  letter-spacing: -.01em;
}

.masthead-sub {
  font-family: var(--furniture);
  font-size: 11px;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 10px;
}

.sections {
  display: flex;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--ink);
  margin-bottom: 26px;
}

.section-tab {
  font-family: var(--furniture);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
  padding: 11px 18px;
  color: var(--ink);
  border-right: 1px solid var(--rule);
}
.section-tab:hover { background: var(--paper-alt); color: var(--ink); }
.section-tab.is-active { background: var(--ink); color: var(--paper); }
.section-tab.is-active:hover { background: var(--ink); color: var(--paper); }

.colophon {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  border-top: 1px solid var(--ink);
  margin-top: 44px;
  padding-top: 12px;
  font-family: var(--furniture);
  font-size: 11px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--muted-light);
}

/* ---------- Shared section headings ---------- */

.kicker {
  font-family: var(--furniture);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .24em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 4px;
}

.view-title {
  font-family: var(--display);
  font-weight: 900;
  font-size: 44px;
  line-height: 1;
  margin-bottom: 6px;
}

.view-deck {
  font-family: var(--furniture);
  font-size: 15px;
  color: var(--ink-soft);
  border-bottom: 1px solid var(--ink);
  padding-bottom: 16px;
  margin-bottom: 26px;
  text-wrap: pretty;
}

.block-title {
  font-family: var(--furniture);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .22em;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.block-note {
  font-family: var(--furniture);
  font-size: 12.5px;
  color: var(--muted-light);
  margin-bottom: 12px;
}

.rule-double { border-top: 3px double var(--ink); }
.rule-single { border-top: 1px solid var(--ink); }

/* Hairline card grids. The rules come from each cell's 1px outset shadow rather
   than a rule-coloured container behind a 1px gap — with auto-fill the last row
   is usually short, and a container background would show through the empty
   cells as a solid slab. */
.grid-ruled {
  display: grid;
  gap: 1px;
  margin: 1px;
  background: transparent;
}
.grid-ruled > * { background: var(--paper); box-shadow: 0 0 0 1px var(--rule); }

/* ---------- Front page ---------- */

.front-grid {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 0 34px;
  align-items: start;
}

.lead { border-right: 1px solid var(--rule); padding-right: 34px; }
.lead .kicker { margin-bottom: 8px; }

.lead-head {
  font-family: var(--display);
  font-weight: 900;
  font-size: 46px;
  line-height: 1.03;
  letter-spacing: -.01em;
  margin-bottom: 12px;
  text-wrap: pretty;
}

.lead-deck {
  font-family: var(--furniture);
  font-size: 15px;
  line-height: 1.45;
  color: var(--ink-soft);
  border-bottom: 1px solid var(--rule);
  padding-bottom: 14px;
  margin-bottom: 16px;
  text-wrap: pretty;
}

.lead-body {
  columns: 2;
  column-gap: 28px;
  column-rule: 1px solid var(--rule-light);
  font-size: 16.5px;
  line-height: 1.62;
  text-wrap: pretty;
}
.lead-body p { margin-bottom: 12px; break-inside: avoid-column; }

.rail-block { border-top: 3px double var(--ink); padding-top: 10px; }
.rail-block .block-title { margin-bottom: 10px; }

.rail-standings { font-family: var(--furniture); font-size: 13px; }
.rail-standings .r-rank { padding: 4px 0; color: var(--muted-light); width: 18px; text-align: right; }
.rail-standings .r-owner { padding: 4px 8px; }
.rail-standings tr.is-champion .r-owner { font-weight: 700; }
.rail-standings .r-record { padding: 4px 0; text-align: right; color: var(--ink-soft); }
.rail-standings .r-pf { padding: 4px 0 4px 10px; text-align: right; color: var(--muted-light); }

.memoriam { border-top: 1px solid var(--ink); margin-top: 20px; padding-top: 12px; }
.memoriam .block-title { margin-bottom: 8px; }
.memoriam p { font-size: 15px; line-height: 1.55; color: var(--ink-soft); text-wrap: pretty; }
.memoriam strong { color: var(--ink); }

.the-ten { margin-top: 34px; padding-top: 18px; }
.the-ten h3 {
  font-family: var(--display);
  font-weight: 700;
  font-size: 30px;
  margin-bottom: 18px;
}

.member-grid { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); }

.member-card { padding: 16px 16px 18px; cursor: pointer; display: block; color: inherit; }
.member-card:hover { background: var(--paper-alt); color: inherit; }

.member-card-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  border-bottom: 1px solid var(--rule-light);
  padding-bottom: 6px;
  margin-bottom: 8px;
}
.member-card-name { font-family: var(--display); font-weight: 700; font-size: 22px; }
.member-card-years { font-family: var(--furniture); font-size: 11px; letter-spacing: .1em; color: var(--muted-light); }
.member-card-record { font-family: var(--furniture); font-size: 26px; font-weight: 700; line-height: 1; }
.member-card-alltime {
  font-family: var(--furniture);
  font-size: 10.5px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--muted-light);
  margin-top: 2px;
}
.member-card-titles { margin-top: 12px; font-family: var(--furniture); font-size: 13px; font-weight: 600; color: var(--muted-light); }
.member-card-titles.has-titles { color: var(--accent); }
.member-card-note { margin-top: 6px; font-size: 14.5px; color: var(--ink-soft); line-height: 1.4; text-wrap: pretty; }

.alumni { margin-top: 30px; padding-top: 16px; }
.alumni .block-title { color: var(--muted); letter-spacing: .22em; }
.alumni-strip { display: flex; flex-wrap: wrap; gap: 6px 0; }
.alumni-item {
  font-family: var(--furniture);
  font-size: 13px;
  color: var(--ink-soft);
  padding-right: 14px;
  margin-right: 14px;
  border-right: 1px solid var(--rule);
  white-space: nowrap;
}
.alumni-item strong { font-weight: 700; color: var(--ink); }

/* ---------- History ---------- */

.champ-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); margin-bottom: 36px; }

.champ-card { padding: 14px 14px 16px; border-top: 3px solid var(--rule); }
.champ-card.is-active { border-top-color: var(--accent); }
.champ-card.is-alumnus { background: var(--paper-alt); }
.champ-year { font-family: var(--furniture); font-size: 11px; letter-spacing: .18em; color: var(--muted-light); }
.champ-owner { font-family: var(--display); font-weight: 700; font-size: 23px; line-height: 1.1; margin-top: 2px; }
.champ-team { font-size: 13.5px; color: var(--ink-soft); line-height: 1.35; margin-top: 4px; text-wrap: pretty; }
.champ-tag {
  font-family: var(--furniture);
  font-size: 11px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-top: 8px;
}

.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 0 40px; }
.two-col > :first-child { border-right: 1px solid var(--rule); padding-right: 40px; }
.two-col.on-rule { border-top: 3px double var(--ink); padding-top: 20px; margin-bottom: 36px; }

.stat-table { font-family: var(--furniture); font-size: 14px; }
.stat-table td { padding: 7px 0; border-bottom: 1px solid var(--rule-light); }
.stat-table .s-owner { font-weight: 600; }
.stat-table .s-pips { color: var(--accent); letter-spacing: .18em; font-size: 15px; }
.stat-table .s-years { text-align: right; color: var(--muted); }
.stat-table .s-status {
  padding-left: 12px;
  text-align: right;
  font-size: 11px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted-light);
}
.stat-table .s-detail { color: var(--muted); }
.stat-table .s-right { text-align: right; color: var(--muted); font-size: 12.5px; }

.record-grid { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.record-box {
  padding: 18px;
  display: block;
  width: 100%;
  text-align: left;
  font: inherit;
  color: inherit;
  border: 0;
  appearance: none;
}
.record-box.is-clickable { cursor: pointer; }
.record-box.is-clickable:hover,
.record-box.is-clickable:focus-visible { background: var(--paper-alt); color: inherit; }
.record-box.is-clickable:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.record-more {
  font-family: var(--furniture);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-top: 10px;
}
.record-label {
  font-family: var(--furniture);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--muted-light);
  margin-bottom: 8px;
}
.record-value { font-family: var(--display); font-weight: 900; font-size: 38px; line-height: 1; }
.record-detail { font-family: var(--furniture); font-size: 13.5px; color: var(--ink-soft); margin-top: 8px; line-height: 1.4; }

/* ---------- Closest games ---------- */

.close-grid { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }

.close-card {
  padding: 18px 18px 20px;
  display: block;
  width: 100%;
  text-align: left;
  font: inherit;
  color: inherit;
  border: 0;
  appearance: none;
  cursor: pointer;
}
.close-card:hover, .close-card:focus-visible { background: var(--paper-alt); }
.close-card:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }

.close-rank {
  font-family: var(--furniture);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--muted-light);
}
.close-margin {
  font-family: var(--display);
  font-weight: 900;
  font-size: 44px;
  line-height: 1;
  color: var(--accent);
  margin-top: 6px;
}
.close-margin-label {
  font-family: var(--furniture);
  font-size: 10.5px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--muted-light);
  margin-top: 2px;
}
.close-teams {
  display: flex;
  align-items: baseline;
  gap: 8px;
  border-top: 1px solid var(--rule-light);
  margin-top: 14px;
  padding-top: 12px;
}
.close-side { flex: 1; min-width: 0; }
.close-side.is-loser { text-align: right; }
.close-owner {
  font-family: var(--display);
  font-weight: 700;
  font-size: 18px;
  line-height: 1.15;
  overflow-wrap: break-word;
}
.close-score { font-family: var(--furniture); font-size: 14px; color: var(--ink-soft); }
.close-vs { font-family: var(--furniture); font-size: 12px; color: var(--muted-light); }
.close-meta {
  font-family: var(--furniture);
  font-size: 11px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted-light);
  margin-top: 12px;
}

/* ---------- Detail modal ---------- */

body.modal-open { overflow: hidden; }

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(20, 17, 12, .55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  z-index: 100;
  overflow-y: auto;
}

.modal-card {
  position: relative;
  background: var(--paper);
  border: 1px solid var(--rule);
  box-shadow: 0 24px 60px rgba(20, 17, 12, .3);
  padding: 28px 30px 30px;
  width: 100%;
  max-width: 620px;
  margin: auto;
}
.modal-card:focus { outline: none; }

.modal-close {
  position: absolute;
  top: 8px;
  right: 10px;
  width: 40px;
  height: 40px;
  font-size: 26px;
  line-height: 1;
  background: none;
  border: 0;
  color: var(--muted-light);
  cursor: pointer;
  font-family: var(--body);
}
.modal-close:hover { color: var(--ink); }

.modal-kicker {
  font-family: var(--furniture);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 4px;
  padding-right: 36px;
}
.modal-title {
  font-family: var(--display);
  font-weight: 900;
  font-size: 30px;
  line-height: 1.05;
  border-bottom: 2px solid var(--ink);
  padding-bottom: 12px;
  padding-right: 36px;
  margin-bottom: 16px;
}
.modal-lede { font-size: 15.5px; color: var(--ink-soft); line-height: 1.5; margin-bottom: 16px; }

.modal-scoreline {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 12px;
  align-items: center;
  margin-bottom: 18px;
}
.ms-side { min-width: 0; }
.ms-side.is-loser { text-align: right; }
.ms-role {
  font-family: var(--furniture);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--muted-light);
}
.ms-side.is-winner .ms-role { color: var(--field); }
.ms-owner { font-family: var(--display); font-weight: 700; font-size: 24px; line-height: 1.1; margin-top: 2px; }
.ms-team { font-size: 14px; color: var(--ink-soft); line-height: 1.3; margin-top: 2px; }
.ms-score {
  font-family: var(--furniture);
  font-size: 34px;
  font-weight: 700;
  line-height: 1.1;
  margin-top: 8px;
}
.ms-meta {
  font-family: var(--furniture);
  font-size: 11.5px;
  color: var(--muted-light);
  margin-top: 4px;
}
.ms-versus { font-family: var(--furniture); font-size: 13px; color: var(--muted-light); }

.modal-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
  margin-bottom: 20px;
}
.modal-stat { background: var(--paper); padding: 10px 12px; }
.modal-stat-value { font-family: var(--furniture); font-size: 18px; font-weight: 700; }
.modal-stat-label {
  font-family: var(--furniture);
  font-size: 9.5px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted-light);
  margin-top: 2px;
}

.modal-scroll { max-height: 300px; overflow-y: auto; }

/* ---------- Box score ---------- */

.bx-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 26px; }
.bx-col { min-width: 0; }
.bx-col + .bx-col { border-left: 1px solid var(--rule-light); padding-left: 26px; }

.bx-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  border-bottom: 2px solid var(--ink);
  padding-bottom: 6px;
  margin-bottom: 4px;
}
.bx-team { font-family: var(--display); font-weight: 700; font-size: 18px; }
.bx-total { font-family: var(--furniture); font-weight: 700; font-size: 17px; }

.bx-table { font-family: var(--furniture); font-size: 12.5px; }
.bx-table td { padding: 5px 0; border-bottom: 1px solid var(--rule-light); vertical-align: top; }
.bx-slot {
  width: 42px;
  font-size: 10px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted-light);
  padding-top: 6px !important;
}
.bx-player { padding-right: 8px !important; }
.bx-name { font-weight: 600; }
.bx-pos { color: var(--muted-light); font-size: 10.5px; letter-spacing: .04em; white-space: nowrap; }
.bx-pts { text-align: right; width: 52px; font-weight: 700; }
.bx-table tr.is-bench .bx-name { font-weight: 400; color: var(--ink-soft); }
.bx-table tr.is-bench .bx-pts { font-weight: 400; color: var(--muted-light); }

.bx-bench-label {
  font-family: var(--furniture);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--muted-light);
  margin-top: 12px;
  margin-bottom: 2px;
}

.week-table { font-family: var(--furniture); font-size: 13px; }
.week-table td { padding: 6px 8px 6px 0; border-bottom: 1px solid var(--rule-light); }
.week-table .wk-week { color: var(--muted-light); width: 30px; }
.week-table .wk-outcome { width: 20px; font-weight: 700; color: var(--muted-light); }
.week-table tr.wk-W .wk-outcome { color: var(--field); }
.week-table tr.wk-L .wk-outcome { color: var(--accent); }
.week-table .wk-score { font-weight: 700; text-align: right; width: 62px; }
.week-table .wk-opp { color: var(--ink-soft); padding-left: 12px; }
.week-table .wk-oppscore { text-align: right; color: var(--muted-light); }

/* ---------- Head to head ---------- */

.scroll-x { overflow-x: auto; -webkit-overflow-scrolling: touch; }

.matrix { font-family: var(--furniture); font-size: 13px; }
.matrix th {
  padding: 8px 10px;
  border-bottom: 2px solid var(--ink);
  font-size: 10.5px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted-light);
  font-weight: 700;
  white-space: nowrap;
}
.matrix th.m-corner { text-align: left; letter-spacing: .16em; }
.matrix td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--rule-light);
  text-align: center;
  white-space: nowrap; /* three-part tie records must not wrap and stagger rows */
}
.matrix td.m-name { text-align: left; font-weight: 700; white-space: nowrap; }
.matrix td.m-total { font-weight: 700; border-left: 1px solid var(--rule); }
.matrix td.m-self { color: var(--rule); background: var(--paper-alt); }
.matrix td.m-none { color: var(--rule); }
.matrix td.m-up { color: var(--field); background: rgba(63, 92, 58, .08); }
.matrix td.m-down { color: var(--accent); background: rgba(140, 43, 31, .07); }
.matrix td.m-even { color: var(--ink-soft); }
.matrix td.m-strong { font-weight: 700; }

/* ---------- Rivalries ---------- */

.rivalry-grid { grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); }
.rivalry-card { padding: 20px; }
.rivalry-meetings {
  font-family: var(--furniture);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--muted-light);
  margin-bottom: 10px;
}
.rivalry-line { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.rivalry-name { font-family: var(--display); font-weight: 700; font-size: 26px; line-height: 1; }
.rivalry-name.is-b { text-align: right; }
.rivalry-score { font-family: var(--furniture); font-size: 28px; font-weight: 700; color: var(--accent); }
.rivalry-note {
  border-top: 1px solid var(--rule-light);
  margin-top: 14px;
  padding-top: 10px;
  font-size: 14.5px;
  color: var(--ink-soft);
  line-height: 1.45;
  text-wrap: pretty;
}

/* ---------- Hall of shame ---------- */

.shame-table { font-family: var(--furniture); font-size: 13.5px; }
.shame-table td { padding: 6px 0; border-bottom: 1px solid var(--rule-light); }
.shame-table .sh-year { color: var(--muted-light); width: 44px; }
.shame-table .sh-owner { font-weight: 700; }
.shame-table .sh-team { color: var(--ink-soft); }
.shame-table .sh-record { text-align: right; color: var(--muted); }
.shame-table .sh-count { text-align: right; font-weight: 700; }
.shame-table .sh-count.never { color: var(--accent); }

.shame-table.gap-below { margin-bottom: 28px; }

.badpicks { border-top: 3px double var(--ink); padding-top: 18px; }

.bust-grid { grid-template-columns: repeat(auto-fill, minmax(215px, 1fr)); }
.bust-card { padding: 18px 16px 20px; }
.bust-rank {
  font-family: var(--furniture);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--muted-light);
}
.bust-points {
  font-family: var(--display);
  font-weight: 900;
  font-size: 40px;
  line-height: 1;
  color: var(--accent);
  margin-top: 4px;
}
.bust-points-label {
  font-family: var(--furniture);
  font-size: 10.5px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted-light);
  margin-top: 2px;
}
.bust-player {
  font-family: var(--display);
  font-weight: 700;
  font-size: 21px;
  line-height: 1.15;
  border-top: 1px solid var(--rule-light);
  margin-top: 14px;
  padding-top: 12px;
}
.bust-meta {
  font-family: var(--furniture);
  font-size: 11px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted-light);
  margin-top: 4px;
}
.bust-owner { font-size: 14.5px; color: var(--ink-soft); line-height: 1.4; margin-top: 8px; text-wrap: pretty; }

/* ---------- Drafts ---------- */

.year-tabs { display: flex; flex-wrap: wrap; margin-bottom: 20px; }
.year-tab {
  font-family: var(--furniture);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .08em;
  padding: 6px 13px;
  border: 1px solid var(--rule);
  margin: 0 -1px -1px 0;
  color: var(--ink);
}
.year-tab:hover { background: var(--paper-alt); color: var(--ink); }
.year-tab.is-active { background: var(--ink); color: var(--paper); }
.year-tab.is-active:hover { background: var(--ink); color: var(--paper); }

.draft-board { font-family: var(--furniture); font-size: 12px; }
.draft-board th {
  padding: 7px 8px;
  border-bottom: 2px solid var(--ink);
  font-size: 10px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted-light);
  text-align: left;
  white-space: nowrap;
}
.draft-board th.d-round { text-align: center; letter-spacing: .14em; }
.draft-board td { padding: 6px 8px; border-bottom: 1px solid var(--rule-light); white-space: nowrap; }
.draft-board td.d-round { text-align: center; color: var(--muted-light); }
.draft-board td.d-pick { border-left: 2px solid var(--rule-light); }
.draft-board tr.is-first-round td.d-pick { background: rgba(140, 43, 31, .05); }
.draft-player { font-weight: 600; }
.draft-meta { color: var(--muted-light); font-size: 10.5px; letter-spacing: .06em; }

/* ---------- Member page ---------- */

.back-link {
  font-family: var(--furniture);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
}

.member-title { font-family: var(--display); font-weight: 900; font-size: 52px; line-height: 1; margin: 10px 0 4px; }

.member-stats { display: flex; flex-wrap: wrap; border-bottom: 1px solid var(--rule); margin-bottom: 24px; }
.member-stat { padding: 0 28px 18px 0; margin-right: 28px; border-right: 1px solid var(--rule-light); }
.member-stat:last-child { border-right: 0; }
.member-stat-value { font-family: var(--display); font-weight: 900; font-size: 34px; line-height: 1; }
.member-stat-label {
  font-family: var(--furniture);
  font-size: 10.5px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--muted-light);
  margin-top: 4px;
}

.season-table { font-family: var(--furniture); font-size: 13.5px; }
.season-table th {
  padding: 7px 10px 7px 0;
  border-bottom: 2px solid var(--ink);
  font-size: 10.5px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted-light);
  font-weight: 700;
  text-align: left;
}
.season-table th.right, .season-table td.right { text-align: right; }
.season-table td { padding: 7px 10px 7px 0; border-bottom: 1px solid var(--rule-light); }
.season-table td:last-child, .season-table th:last-child { padding-right: 0; }
.season-table tr.is-champion td { background: rgba(140, 43, 31, .07); }
.season-table .s-note { text-align: right; color: var(--accent); font-weight: 600; }

.empty { font-family: var(--furniture); font-size: 14px; color: var(--muted); padding: 24px 0; }

/* ---------- Pizza mode ----------
   A dark reskin: charred-crust ground, browned-cheese paper, pepperoni red and
   molten-mozzarella type. Everything is a token override plus a pepperoni
   backdrop, so switching it off restores the newsprint exactly. */

.masthead-meta-end {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.pizza-toggle {
  font-family: var(--furniture);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
  background: none;
  border: 1px solid var(--rule);
  border-radius: 999px;
  padding: 5px 12px;
  cursor: pointer;
  white-space: nowrap;
  transition: transform .12s ease;
}
.pizza-toggle:hover { color: var(--ink); border-color: var(--ink); transform: rotate(-2deg); }
.pizza-toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* True black so OLED panels actually switch the pixels off. Surfaces stay at
   #000 and are separated by rules rather than by lighter fills. */
:root[data-pizza] {
  --paper: #000000;
  --paper-alt: #0d0906;
  --ground: #000000;
  --ink: #ffdf9e;
  --ink-soft: #d8b483;
  --muted: #a98d63;
  --muted-light: #8a7150;
  --rule: #3a2616;
  --rule-light: #241710;
  --accent: #ff5533;
  --accent-dark: #ff8a5c;
  --field: #86d05a;
}

/* Pepperoni. A lot of it. Two layers drifting at different rates, plus olives
   and a couple of basil flecks, all painted with gradients so there are no
   image requests. */
:root[data-pizza] body {
  background:
    radial-gradient(circle at 8% 14%, #b8321c 0 17px, transparent 18px),
    radial-gradient(circle at 31% 7%, #a82d19 0 12px, transparent 13px),
    radial-gradient(circle at 57% 18%, #c4381f 0 20px, transparent 21px),
    radial-gradient(circle at 79% 9%, #a82d19 0 14px, transparent 15px),
    radial-gradient(circle at 94% 26%, #b8321c 0 16px, transparent 17px),
    radial-gradient(circle at 4% 43%, #c4381f 0 13px, transparent 14px),
    radial-gradient(circle at 22% 57%, #a82d19 0 19px, transparent 20px),
    radial-gradient(circle at 46% 47%, #b8321c 0 15px, transparent 16px),
    radial-gradient(circle at 68% 62%, #c4381f 0 18px, transparent 19px),
    radial-gradient(circle at 91% 54%, #a82d19 0 12px, transparent 13px),
    radial-gradient(circle at 13% 78%, #b8321c 0 16px, transparent 17px),
    radial-gradient(circle at 37% 91%, #c4381f 0 14px, transparent 15px),
    radial-gradient(circle at 61% 83%, #a82d19 0 20px, transparent 21px),
    radial-gradient(circle at 85% 94%, #b8321c 0 13px, transparent 14px),
    /* olives */
    radial-gradient(circle at 17% 33%, #2b2118 0 8px, transparent 9px),
    radial-gradient(circle at 72% 37%, #2b2118 0 7px, transparent 8px),
    radial-gradient(circle at 49% 71%, #2b2118 0 8px, transparent 9px),
    /* basil */
    radial-gradient(ellipse 16px 9px at 88% 68%, #2f5c20 0 100%, transparent 0),
    radial-gradient(ellipse 14px 8px at 27% 21%, #2f5c20 0 100%, transparent 0),
    var(--ground);
  background-size: 900px 900px;
  background-attachment: fixed;
  animation: pizza-drift 40s linear infinite;
}

@keyframes pizza-drift {
  from { background-position: 0 0; }
  to { background-position: 900px 900px; }
}

/* The paper becomes the pie: black, ringed by a browned crust. */
:root[data-pizza] .paper {
  border: 10px solid #7a4a1c;
  border-radius: 22px;
  /* Only the rim is lit — the field stays at #000 so OLED pixels stay off. */
  box-shadow:
    inset 0 0 0 2px #3a2616,
    inset 0 0 22px rgba(255, 120, 40, .1),
    0 0 0 3px #5c3512;
  position: relative;
}

/* Cheese pull dripping from under the masthead. */
:root[data-pizza] .masthead {
  position: relative;
  border-bottom-color: #f0b429;
}
/* The drip hangs below the masthead, so the nav is pushed clear of it. */
:root[data-pizza] .sections { margin-top: 26px; }
:root[data-pizza] .masthead::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -18px;
  height: 18px;
  z-index: 2;
  background:
    radial-gradient(ellipse 22px 14px at 8% 0, #f0b429 0 100%, transparent 0),
    radial-gradient(ellipse 16px 20px at 23% 0, #e8a81f 0 100%, transparent 0),
    radial-gradient(ellipse 26px 11px at 41% 0, #f0b429 0 100%, transparent 0),
    radial-gradient(ellipse 18px 24px at 58% 0, #e8a81f 0 100%, transparent 0),
    radial-gradient(ellipse 24px 13px at 74% 0, #f0b429 0 100%, transparent 0),
    radial-gradient(ellipse 15px 19px at 90% 0, #e8a81f 0 100%, transparent 0);
  pointer-events: none;
}

:root[data-pizza] .masthead-title {
  color: #ffcf70;
  text-shadow: 0 2px 0 #8c2b1f, 0 0 30px rgba(255, 85, 51, .55);
}

/* Grease spots on the black. */
:root[data-pizza] .paper::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: 12px;
  /* Soft falloff — a hard stop reads as a rendering artefact, not a stain. */
  background:
    radial-gradient(circle 150px at 18% 12%, rgba(255, 176, 60, .05), transparent 70%),
    radial-gradient(circle 190px at 82% 44%, rgba(255, 176, 60, .04), transparent 70%),
    radial-gradient(circle 165px at 38% 82%, rgba(255, 176, 60, .05), transparent 70%);
}
:root[data-pizza] .paper > * { position: relative; z-index: 1; }

/* Every rule becomes a crust-brown line; kickers get a slice. */
:root[data-pizza] .kicker::before { content: '🍕 '; }
:root[data-pizza] .block-title::before { content: '🧀 '; opacity: .8; }
:root[data-pizza] .view-title { color: #ffcf70; }

:root[data-pizza] .section-tab.is-active,
:root[data-pizza] .year-tab.is-active { background: var(--accent); color: #2a1a0d; }

:root[data-pizza] .record-value,
:root[data-pizza] .close-margin,
:root[data-pizza] .bust-points { color: var(--accent-dark); }

:root[data-pizza] .pizza-toggle {
  color: #2a1a0d;
  background: var(--accent);
  border-color: var(--accent);
}
:root[data-pizza] .pizza-toggle:hover { color: #2a1a0d; transform: rotate(3deg) scale(1.04); }

/* Cheese pull on the champion cards, because why not. */
:root[data-pizza] .champ-card.is-active { border-top-color: #f0b429; }
:root[data-pizza] .member-card:hover,
:root[data-pizza] .record-box.is-clickable:hover,
:root[data-pizza] .close-card:hover { background: #3a2714; }

:root[data-pizza] .matrix td.m-up { background: rgba(143, 191, 90, .12); }
:root[data-pizza] .matrix td.m-down { background: rgba(226, 84, 47, .14); }
:root[data-pizza] .season-table tr.is-champion td,
:root[data-pizza] .draft-board tr.is-first-round td.d-pick { background: rgba(226, 84, 47, .1); }

:root[data-pizza] .modal-backdrop { background: rgba(10, 6, 3, .78); }

@media (prefers-reduced-motion: reduce) {
  .pizza-toggle, :root[data-pizza] .pizza-toggle:hover { transition: none; transform: none; }
}

/* ---------- Narrow screens ----------
   Wide data (the head-to-head matrix, the draft board) can never fit a phone,
   so those scroll horizontally inside their own container with the identifying
   first column pinned. Everything else collapses to a single column. */

@media (max-width: 900px) {
  .page { padding: 16px 10px 40px; }
  .paper { padding: 22px 20px 32px; }
  .masthead-title { font-size: 44px; }
  .masthead-meta { font-size: 10px; }
  .front-grid { grid-template-columns: 1fr; gap: 28px; }
  .lead { border-right: 0; padding-right: 0; }
  .lead-body { columns: 1; }
  .lead-head { font-size: 34px; }
  .view-title { font-size: 34px; }
  .two-col { grid-template-columns: 1fr; gap: 28px; }
  .two-col > :first-child { border-right: 0; padding-right: 0; padding-bottom: 28px; }
  .member-title { font-size: 38px; }
  .colophon { flex-direction: column; gap: 4px; }
}

@media (max-width: 640px) {
  .page { padding: 0 0 32px; }
  .paper { padding: 18px 16px 28px; border-left: 0; border-right: 0; box-shadow: none; }

  .masthead-title { font-size: 32px; letter-spacing: 0; }
  .masthead-sub { font-size: 9.5px; letter-spacing: .2em; }
  .masthead-meta { flex-direction: column; align-items: flex-start; gap: 2px; font-size: 9.5px; }

  /* Section nav becomes a swipeable strip rather than a ragged wrap. */
  .sections {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    margin: 0 -16px 20px;
    padding: 0 16px;
  }
  .sections::-webkit-scrollbar { display: none; }
  .section-tab { flex: 0 0 auto; padding: 12px 14px; font-size: 11px; letter-spacing: .12em; }

  .lead-head { font-size: 27px; }
  .lead-deck { font-size: 14px; }
  .lead-body { font-size: 16px; }
  .view-title { font-size: 28px; }
  .view-deck { font-size: 14px; }
  .the-ten h3 { font-size: 23px; }
  .member-title { font-size: 30px; }

  /* Card grids go single-file; two-up looks cramped below this width. */
  .member-grid, .champ-grid, .record-grid, .rivalry-grid, .bust-grid, .close-grid {
    grid-template-columns: 1fr;
  }

  .member-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 0; }
  .member-stat {
    padding: 12px 12px 12px 0;
    margin: 0;
    border-right: 1px solid var(--rule-light);
    border-bottom: 1px solid var(--rule-light);
  }
  .member-stat:nth-child(2n) { border-right: 0; padding-left: 12px; }
  .member-stat-value { font-size: 27px; }

  /* Pin the row label so the matrix stays readable while scrolling sideways. */
  .matrix td.m-name, .matrix th.m-corner {
    position: sticky;
    left: 0;
    background: var(--paper);
    z-index: 2;
    box-shadow: 1px 0 0 var(--rule);
  }
  .matrix { font-size: 12px; }
  .matrix th, .matrix td { padding: 7px 8px; }

  .draft-board td.d-round, .draft-board th.d-round {
    position: sticky;
    left: 0;
    background: var(--paper);
    z-index: 2;
    box-shadow: 1px 0 0 var(--rule);
  }
  .draft-board tr.is-first-round td.d-round { background: var(--paper); }

  .alumni-item {
    white-space: normal;
    border-right: 0;
    padding-right: 0;
    margin-right: 0;
    flex: 0 0 100%;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--rule-light);
    margin-bottom: 6px;
  }

  .rivalry-name { font-size: 21px; }
  .rivalry-score { font-size: 23px; }
  .close-margin { font-size: 38px; }
  .bust-points { font-size: 34px; }

  /* Full-bleed sheet reads better than a floating card on a phone. */
  .modal-backdrop { padding: 0; align-items: flex-end; }
  .modal-card {
    max-width: none;
    padding: 22px 18px 26px;
    max-height: 92vh;
    overflow-y: auto;
    border-left: 0;
    border-right: 0;
    border-bottom: 0;
    margin: 0;
  }
  .modal-title { font-size: 24px; }
  .modal-stats { grid-template-columns: 1fr 1fr; }

  /* Two lineups side by side is unreadable on a phone; stack them. */
  .bx-grid { grid-template-columns: 1fr; gap: 22px; }
  .bx-col + .bx-col { border-left: 0; padding-left: 0; border-top: 1px solid var(--rule-light); padding-top: 18px; }

  .masthead-meta-end { align-items: flex-start; justify-content: flex-start; gap: 8px; }
  .pizza-toggle { padding: 7px 12px; }
  .ms-owner { font-size: 19px; }
  .ms-score { font-size: 27px; }
  .modal-scroll { max-height: 44vh; }

  /* Horizontal-scroll regions get a bleed and a nudge. */
  .scroll-x { margin: 0 -16px; padding: 0 16px; }
  .scroll-hint::after {
    content: 'Scroll sideways for the rest →';
    display: block;
    font-family: var(--furniture);
    font-size: 10.5px;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--muted-light);
    padding: 8px 0 0;
    position: sticky;
    left: 0;
  }
}

@media (max-width: 400px) {
  .masthead-title { font-size: 26px; }
  .lead-head { font-size: 24px; }
  .view-title { font-size: 25px; }
  .member-stats { grid-template-columns: 1fr 1fr; }
  .close-teams { flex-direction: column; align-items: flex-start; gap: 4px; }
  .close-side.is-loser { text-align: left; }
}

/* Comfortable tap targets on touch devices without bloating the desktop grid. */
@media (hover: none) {
  .section-tab, .year-tab { min-height: 42px; display: flex; align-items: center; }
  .member-card, .record-box.is-clickable, .close-card { min-height: 44px; }
}

@media print {
  body { background: #fff; }
  .page { padding: 0; }
  .paper { box-shadow: none; border: 0; max-width: none; }
  .sections { display: none; }
}
