/* Layout: 12-column grid, content hung left; narrow label column, wide body column. */
:root {
  --bg: #f1f3f6;
  --ink: #101b30;
  --muted: #58647a;
  --hair: #c6cedb;
  --mark: #c98f00;

  --display: "Big Shoulders Display", "Arial Narrow", Impact, sans-serif;
  --text: "Public Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --data: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b1322;
    --ink: #e8ecf3;
    --muted: #8e9ab0;
    --hair: #25314a;
    --mark: #e8a912;
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 1rem/1.6 var(--text);
}
h1, h2, h3, p, ol, dl, dd { margin: 0; }
ol { padding: 0; list-style: none; }
small { font-size: inherit; color: var(--muted); font-weight: 400; }
abbr { text-decoration: none; }

a { color: inherit; text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
a:focus-visible { outline: 2px solid var(--mark); outline-offset: 3px; }
.ext { text-decoration: none; border-bottom: 1px solid var(--hair); transition: border-color 0.15s; }
.ext span { display: inline-block; margin-left: 0.25em; color: var(--muted); transition: transform 0.15s, color 0.15s; }
.ext:hover { border-color: var(--ink); }
.ext:hover span { transform: translate(2px, -2px); color: var(--mark); }

.page {
  max-width: 82rem;
  margin: 0 auto;
  padding-inline: max(1.25rem, 5vw);
}

/* Masthead */
.mast {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  padding-block: 1.25rem;
  border-bottom: 1px solid var(--ink);
}
.mark {
  font: 900 1.25rem/1 var(--display);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
}
.mast nav { display: flex; gap: 1.5rem; }
.mast nav a {
  font: 500 0.75rem/1 var(--data);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--muted);
  transition: color 0.15s;
}
.mast nav a:hover { color: var(--ink); }

/* Hero */
.hero {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: 2rem;
  align-items: center;
  padding-block: clamp(3rem, 9vw, 7rem) clamp(3rem, 8vw, 6rem);
}
.hero-text { grid-column: 1 / span 8; grid-row: 1; display: grid; gap: 2rem; min-width: 0; }
.eyebrow {
  font: 500 0.75rem/1.4 var(--data);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.hero h1 {
  font: 900 clamp(3rem, 9vw, 7.75rem)/0.88 var(--display);
  text-transform: uppercase;
  letter-spacing: -0.005em;
  text-wrap: balance;
  overflow-wrap: anywhere;
}
.facts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid var(--ink);
  max-width: 40rem;
}
.facts div { padding: 0.75rem 1rem 0 0; }
.facts div + div { padding-left: 1rem; border-left: 1px solid var(--hair); }
.facts dt {
  font: 500 0.6875rem/1.4 var(--data);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.facts dd { font: 500 1.5rem/1.3 var(--data); font-variant-numeric: tabular-nums; }
.facts dd small { font-size: 0.8125rem; }
.crest {
  grid-column: 10 / -1;
  display: block;
  border-radius: 50%;
  transition: transform 0.25s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.crest img { display: block; width: 100%; height: auto; }
.crest:hover { transform: translateY(-4px); }

/* Label column / body column sections */
.split {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: 2rem;
  row-gap: 2rem;
  padding-block: clamp(3rem, 7vw, 5.5rem);
  border-top: 1px solid var(--ink);
}
.aside { grid-column: 1 / span 3; display: grid; gap: 0.75rem; align-content: start; }
.aside h2 { font: 900 2rem/1 var(--display); text-transform: uppercase; letter-spacing: 0.02em; }
.split > .body { grid-column: 4 / -1; min-width: 0; }

/* Ledger */
.season {
  display: grid;
  grid-template-columns: 9rem minmax(0, 1fr);
  column-gap: 2rem;
  padding-block: 1.75rem;
  border-top: 1px solid var(--hair);
  scroll-margin-top: 1rem;
}
.season:first-child { border-top: 0; padding-top: 0; }
.season-head h3 { font: 900 2.5rem/1 var(--display); font-variant-numeric: tabular-nums; }
.season-head p { margin-top: 0.5rem; font-size: 0.8125rem; line-height: 1.4; color: var(--muted); }
.season-head strong { color: var(--ink); font-weight: 600; }
.vacant { color: var(--muted); max-width: 34rem; align-self: center; }

.scroll { overflow-x: auto; min-width: 0; }
table { width: 100%; min-width: 34rem; border-collapse: collapse; font-variant-numeric: tabular-nums; }
th, td { padding: 0.625rem 0.5rem; text-align: right; white-space: nowrap; }
thead th {
  font: 500 0.6875rem/1.4 var(--data);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  border-bottom: 1px solid var(--ink);
}
tbody td { font: 400 0.875rem/1.5 var(--data); border-bottom: 1px solid var(--hair); }
tbody th { font-weight: 400; border-bottom: 1px solid var(--hair); }
tbody th small { display: block; font-size: 0.75rem; white-space: normal; }
.club { display: flex; align-items: center; gap: 0.75rem; }
.narrow { display: none; }
.ext { white-space: nowrap; }
.club img { flex: none; width: 1.75rem; height: 1.75rem; object-fit: contain; }
tbody tr:last-child > * { border-bottom: 0; }
tbody tr { transition: background-color 0.15s; }
tbody tr:hover { background: color-mix(in srgb, var(--ink) 5%, transparent); }
table .rank { text-align: left; width: 2.5rem; padding-left: 0; color: var(--muted); }
table th:nth-child(2) { text-align: left; }
table .pts { font-weight: 500; color: var(--ink); padding-right: 0.25rem; }
.holder th { font-weight: 600; }
.holder .rank { color: transparent; position: relative; }
.holder .rank::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 1rem;
  height: 0.75rem;
  translate: 0 -50%;
  background: var(--mark);
  clip-path: polygon(0 0, 100% 50%, 0 100%);
}

/* Rules */
.rules { counter-reset: rule; max-width: 46rem; }
.rules li {
  counter-increment: rule;
  display: grid;
  grid-template-columns: 3rem minmax(0, 1fr);
  padding-block: 1.25rem;
  border-top: 1px solid var(--hair);
}
.rules li:first-child { border-top: 0; padding-top: 0; }
.rules li::before {
  content: counter(rule, decimal-leading-zero);
  grid-row: 1 / span 2;
  font: 500 0.75rem/2.1 var(--data);
  color: var(--muted);
}
.rules h3 { font: 600 1rem/1.6 var(--text); }
.rules p { color: var(--muted); }

/* Footer */
.foot {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: 2rem;
  row-gap: 1rem;
  padding-block: 2.5rem 4rem;
  border-top: 1px solid var(--ink);
}
.foot p { grid-column: 4 / -1; max-width: 46rem; }
.foot .fine { font-size: 0.8125rem; color: var(--muted); }

@media (max-width: 72rem) {
  .hero, .split, .foot { grid-template-columns: minmax(0, 1fr); }
  .hero-text, .aside, .split > .body, .foot p { grid-column: 1 / -1; }
  .season { grid-template-columns: minmax(0, 1fr); row-gap: 1rem; }
  .season-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; }
  .season-head p { margin: 0; text-align: right; }
  .hero-text { grid-row: 2; }
  .crest { grid-column: 1 / -1; grid-row: 1; width: clamp(5.5rem, 22vw, 8rem); margin-bottom: 2rem; }
}
@media (max-width: 40rem) {
  table { min-width: 0; }
  thead th:nth-child(n+4):nth-child(-n+8), tbody td:nth-child(n+4):nth-child(-n+8) { display: none; }
  th, td { padding-inline: 0.375rem; }
  table .rank { width: 1.75rem; }
  .club { gap: 0.5rem; }
  .club > span { white-space: normal; }
  .hero h1 { font-size: clamp(2rem, 12vw, 4.5rem); }
  .wide { display: none; }
  table .pos small { display: none; }
  .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 1rem; }
  .facts div:nth-child(3) { padding-left: 0; border-left: 0; }
}
@media (max-width: 40rem) { .narrow { display: inline; } }
@media (max-width: 22rem) {
  .ext { white-space: normal; }
  .club img { width: 1.5rem; height: 1.5rem; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}
