/* Editorial redesign: Swiss grid, structural Rotblau colour.
   Colour lives in tokens.css. */

body { background: var(--surface-base); letter-spacing: -.01em; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}
.site-masthead {
  position: sticky;
  height: 88px;
  padding: 0 max(22px, calc((100vw - 1500px) / 2));
  gap: 54px;
  color: var(--text-primary);
  background: var(--surface-inverse);
  border: 0;
  border-bottom: 1px solid var(--border-subtle);
}
.site-masthead::before {
  content: "";
  position: absolute;
  inset: 0 50% auto 0;
  height: 5px;
  background: var(--brand-primary);
}
.site-masthead::after {
  content: "";
  position: absolute;
  inset: 0 0 auto 50%;
  height: 5px;
  background: var(--brand-secondary);
}
/* Sized to the lockup, not to a reserved slot: mark + gap + "rotblau" over
   "FC BASEL 1893". The old 305px was cut for a two-clause descriptor. */
.site-masthead .brand { min-width: 205px; gap: 14px; }
.site-masthead .brand-mark {
  width: 60px;
  height: 34px;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}
.site-masthead .brand strong { color: var(--text-primary); font-size: 17px; letter-spacing: .11em; }
.site-masthead .brand small { margin-top: 3px; color: var(--text-muted); font-size: 9px; letter-spacing: .08em; }
.site-masthead .main-nav { gap: 29px; }
.site-masthead .main-nav a {
  height: auto;
  padding: 35px 0 27px;
  color: var(--text-muted);
  border-bottom: 4px solid transparent;
  background: transparent;
  font-size: 12px;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.site-masthead .main-nav a:hover,
.site-masthead .main-nav a.active { color: var(--text-primary); background: transparent; border-bottom-color: var(--brand-accent); }
.site-masthead .data-status {
  display: flex;
  align-items: center;
  height: auto;
  margin-left: auto;
  padding: 8px 0;
  color: var(--text-primary);
  border-bottom: 1px solid var(--text-primary);
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.site-masthead .data-status span { width: 6px; height: 6px; background: var(--brand-primary); box-shadow: none; }
.site-masthead .data-status.active { color: var(--brand-accent); border-color: var(--brand-accent); }

.page { width: min(1500px, calc(100% - 56px)); padding: 46px 0 100px; }
h1, h2, h3, h4 { font-family: var(--font-display); }
h1 { font-size: clamp(58px, 7vw, 112px); line-height: .88; letter-spacing: -.075em; text-transform: uppercase; }
h2 { font-size: clamp(28px, 3vw, 48px); line-height: .95; letter-spacing: -.055em; }
.eyebrow { color: var(--brand-accent); font-size: 10px; letter-spacing: .16em; }
.text-link, .rule-link { color: var(--text-primary); border-bottom: 1px solid var(--text-primary); }
.card { background: transparent; border: 0; border-top: 2px solid var(--text-primary); border-radius: 0; box-shadow: none; }
.card-pad { padding: 22px 0; }
.section-head { margin: 52px 0 14px; padding-top: 15px; border-top: 1px solid var(--text-primary); }
.section-head h2 { font-size: 31px; text-transform: uppercase; }
.section-head > span { color: var(--text-secondary); font-size: 11px; text-transform: uppercase; letter-spacing: .12em; }

/* Home */
.editorial-home { padding-top: 28px; }
.home-lead {
  min-height: 585px;
  display: grid;
  grid-template-columns: 1.03fr .97fr;
  border: 1px solid var(--text-primary);
  background: var(--surface-inverse);
}
.home-statement { padding: 38px 46px 46px; display: flex; flex-direction: column; }
.issue-line { display: flex; justify-content: space-between; padding-bottom: 17px; margin-bottom: 75px; border-bottom: 1px solid var(--text-primary); color: var(--text-secondary); font-size: 9px; letter-spacing: .11em; text-transform: uppercase; }
.home-statement h1 { max-width: 820px; margin: 14px 0 26px; font-size: clamp(70px, 7.4vw, 118px); }
.home-statement h1 em { color: var(--brand-accent); font-style: normal; }
.home-statement > p { max-width: 630px; margin: 0; color: var(--text-muted); font-size: 15px; }
.statement-links { display: flex; gap: 30px; margin-top: auto; padding-top: 35px; }
.statement-links a { min-width: 210px; display: flex; justify-content: space-between; padding: 12px 0; border-top: 1px solid var(--text-primary); font-size: 11px; font-weight: 700; text-transform: uppercase; }
.statement-links a:hover { color: var(--brand-accent); border-color: var(--brand-accent); }

.last-match-feature {
  min-width: 0;
  display: flex;
  flex-direction: column;
  padding: 38px 42px 35px;
  color: var(--text-on-accent);
  background: linear-gradient(135deg, var(--brand-primary) 0 49.8%, var(--surface-sunken) 50.2% 100%);
  transition: filter .2s ease;
}
.last-match-feature:hover { filter: saturate(1.13) contrast(1.04); }
.feature-label { display: flex; justify-content: space-between; padding-bottom: 17px; border-bottom: 1px solid var(--overlay-strong); font-size: 9px; letter-spacing: .13em; text-transform: uppercase; }
.feature-score { flex: 1; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 20px; padding: 45px 0 25px; }
.feature-score > div:last-child { text-align: right; }
.feature-score small { display: block; min-height: 40px; font-size: 14px; font-weight: 700; }
.feature-score strong { display: block; font: 800 clamp(110px, 12vw, 190px)/.8 var(--font-display); letter-spacing: -.08em; }
.feature-score i { opacity: .7; font-size: 34px; font-style: normal; }
/* --feature-cells is set inline by app.js: the strip carries only the stats the
   match actually recorded, so the track count is data, not a constant. */
.feature-data { display: grid; grid-template-columns: repeat(var(--feature-cells, 4), minmax(0, 1fr)); border-top: 1px solid var(--overlay-strong); border-bottom: 1px solid var(--overlay-strong); }
.feature-data > span { min-height: 64px; padding: 13px 10px; border-right: 1px solid var(--overlay-medium); font-size: 10px; }
.feature-data > span:first-child { padding-left: 0; }
.feature-data > span:last-child { border: 0; }
.feature-data b { display: block; margin-bottom: 5px; font-size: 17px; }
.feature-cta { display: flex; justify-content: space-between; padding-top: 25px; font-size: 11px; font-weight: 700; text-transform: uppercase; }

/* Scope bar. Shares the hero's left edge and the tape's border so the three
   read as one block: the season is stated once, for everything below it. */
.season-scope { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 15px; border: 1px solid var(--text-primary); border-top: 0; background: var(--surface-sunken); }
.scope-lede { display: flex; align-items: baseline; gap: 9px; }
.scope-lede span { color: var(--text-muted); font-size: 9px; letter-spacing: .14em; text-transform: uppercase; }
.scope-lede strong { font: 800 19px/1 var(--font-figure); letter-spacing: .03em; }
.scope-switch { display: flex; gap: 1px; background: var(--border-subtle); border: 1px solid var(--border-strong); }
.scope-switch button { padding: 7px 14px; color: var(--text-secondary); background: var(--surface-raised); border: 0; font-size: 11px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; transition: color var(--motion-fast) var(--motion-ease), background var(--motion-fast) var(--motion-ease); }
.scope-switch button:hover { color: var(--text-primary); background: var(--surface-overlay); }
.scope-switch button.active { color: var(--text-on-accent); background: var(--brand-primary); }

/* One track per result, however many the scope has — an eight-match season and
   a five-match one both fill the row. */
.result-tape { display: grid; grid-template-columns: 155px; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); border: 1px solid var(--text-primary); border-top: 0; background: var(--surface-inverse); }
.tape-empty { display: flex; align-items: center; padding: 13px; color: var(--text-secondary); font-size: 11px; }
.tape-title, .tape-result { min-height: 84px; padding: 13px; border-right: 1px solid var(--border-subtle); }
.tape-title { display: flex; flex-direction: column; justify-content: space-between; color: var(--text-on-accent); background: var(--surface-sunken); }
.tape-title span, .tape-result small { font-size: 8px; letter-spacing: .1em; text-transform: uppercase; }
.tape-result { position: relative; display: flex; flex-direction: column; justify-content: space-between; }
.tape-result b { font-size: 18px; }
.tape-result i { position: absolute; right: 10px; bottom: 10px; width: 21px; height: 21px; display: grid; place-items: center; color: var(--text-on-accent); border-radius: 50%; font-size: 8px; font-style: normal; }
.tape-result.win i { background: var(--success-surface); }
.tape-result.draw i { color: var(--warning-ink); background: var(--warning-surface); }
.tape-result.loss i { background: var(--brand-primary); }

.editorial-heading { display: grid; grid-template-columns: 42px minmax(0, 1fr) auto; align-items: start; gap: 12px; padding: 15px 0 20px; border-top: 3px solid var(--text-primary); }
.editorial-heading > div { min-width: 0; }
.editorial-heading > span { font-size: 11px; font-weight: 700; }
.editorial-heading h2 { margin-top: 6px; text-transform: uppercase; }
.editorial-heading > a { align-self: end; padding-bottom: 2px; border-bottom: 1px solid var(--text-primary); font-size: 10px; font-weight: 700; text-transform: uppercase; }
.season-brief .editorial-heading > b { align-self: center; padding: 3px 8px; color: var(--text-on-accent); background: var(--brand-primary); font-size: 11px; font-weight: 800; letter-spacing: .06em; }
/* The brief runs in a ~280px column, and the heading's middle track — what is
   left after the index and the season chip — is narrower still, so a one-word
   German headline ("SAISONÜBERBLICK") had nowhere to break but mid-word. Index,
   eyebrow and chip keep the top row; the headline takes a row of its own across
   the full column, at a size that holds one line in both locales. */
.season-brief .editorial-heading { row-gap: 7px; }
.season-brief .editorial-heading > .eyebrow { grid-column: 2; }
.season-brief .editorial-heading h2 { grid-column: 1 / -1; margin-top: 0; font-size: clamp(22px, 2.2vw, 34px); }
.brief-career { margin: -14px 0 22px; color: var(--text-muted); font-size: 12px; }
.home-ledger-grid { display: grid; grid-template-columns: 1.45fr .55fr; gap: 42px; margin-top: 68px; }
/* Grid items default to min-width:auto, so a wide descendant pushes the whole
   page wider than the viewport instead of shrinking. */
.home-ledger-grid > *, .lab-two-col > * { min-width: 0; }
.match-ledger { border-bottom: 1px solid var(--text-primary); }
.match-ledger .match-row {
  min-height: 80px;
  padding: 12px 5px;
  grid-template-columns: 100px minmax(220px,1fr) 64px 110px 45px;
  border-bottom: 1px solid var(--border-subtle);
  border-radius: 0;
}
.match-ledger .match-row:hover { color: var(--brand-accent); background: transparent; transform: none; }
.match-ledger .match-date strong { color: inherit; }
.match-ledger .match-score { font-size: 20px; }
.season-brief { padding-left: 2px; }
.brief-score { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto minmax(0, 1fr); align-items: end; padding: 27px 0; border-bottom: 1px solid var(--text-primary); }
.brief-score strong { font: 800 66px/.8 var(--font-display); }
.brief-score span { padding: 0 8px; color: var(--text-secondary); font-size: 9px; text-transform: uppercase; }
.brief-score i { font-size: 27px; font-style: normal; }
.season-brief dl { margin: 0 0 26px; }
.season-brief dl > div { display: flex; justify-content: space-between; padding: 13px 0; border-bottom: 1px solid var(--border-subtle); }
.season-brief dt { color: var(--text-secondary); font-size: 11px; }
.season-brief dd { margin: 0; font-weight: 800; }
.rule-link { display: flex; justify-content: space-between; padding: 12px 0; font-size: 10px; font-weight: 700; text-transform: uppercase; }

.ways-in { margin-top: 82px; }
.ways-grid { display: grid; grid-template-columns: repeat(3,1fr); border: 1px solid var(--text-primary); }
.ways-grid > a { min-width: 0; min-height: 310px; padding: 25px 28px; display: flex; flex-direction: column; border-right: 1px solid var(--text-primary); background: var(--surface-inverse); }
.ways-grid > a:last-child { border: 0; }
.ways-grid > a:hover { color: var(--text-on-accent); background: var(--surface-sunken); }
.ways-grid span, .ways-grid b { font-size: 9px; letter-spacing: .12em; text-transform: uppercase; }
.ways-grid h3 { margin-top: 52px; font-size: 34px; line-height: .95; text-transform: uppercase; }
.ways-grid p { max-width: 390px; color: var(--text-secondary); font-size: 12px; }
.ways-grid > a:hover p { color: var(--text-secondary); }
.ways-grid b { margin-top: auto; }
.competition-ledger { margin-top: 82px; }
/* Grouped under the season the matches were played in: one merged row per
   competition silently summed two seasons and was true of neither. */
.ledger-season + .ledger-season { margin-top: 38px; }
.ledger-season > h3 { display: flex; justify-content: space-between; align-items: baseline; margin: 0 0 4px; color: var(--text-secondary); font-size: 11px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.ledger-season > h3 span { color: var(--text-muted); font-size: 10px; letter-spacing: .08em; }
.competition-ledger a { display: grid; grid-template-columns: 55px 1fr 120px 30px; align-items: center; min-height: 65px; border-top: 1px solid var(--text-primary); }
.ledger-season > a:last-child { border-bottom: 1px solid var(--text-primary); }
.competition-ledger a:hover { color: var(--brand-accent); }
.competition-ledger i { color: var(--text-secondary); font-size: 10px; font-style: normal; }
.competition-ledger strong { font-size: 16px; text-transform: uppercase; }
.competition-ledger span { color: var(--text-secondary); font-size: 10px; text-transform: uppercase; }

/* Archive and page headings */
.page-heading { min-height: 310px; align-items: end; padding: 25px 0 38px; margin: 0; border-top: 1px solid var(--text-primary); border-bottom: 5px solid var(--text-primary); }
.page-heading > div:first-child { max-width: 850px; }
.page-heading p { max-width: 650px; color: var(--text-muted); font-size: 14px; }
.filters { align-self: end; }
.control { padding: 13px 38px 13px 10px; background: transparent; border: 0; border-bottom: 1px solid var(--text-primary); border-radius: 0; font-size: 11px; font-weight: 700; text-transform: uppercase; }
.control:focus { border-color: var(--brand-accent); box-shadow: none; }
/* Header and rows share one track list so the columns actually line up, and
   the venue/crowd column fills what used to be dead space mid-row. */
.archive-rule,
.matches-board.match-ledger .match-row { grid-template-columns: 96px 132px minmax(180px,1fr) 62px 96px 150px 68px; }
.archive-rule { display: grid; gap: 15px; padding: 13px 5px; color: var(--text-secondary); border-bottom: 1px solid var(--text-primary); font-size: 8px; letter-spacing: .12em; text-transform: uppercase; }
/* Score, xG and the result pill are centred in their tracks, so their labels
   are too — set flush left they sat off to one side of what they name, and the
   result column had to widen from 30px-plus-nothing to hold the German word. */
.archive-rule > span:nth-child(4),
.archive-rule > span:nth-child(5),
.archive-rule > span:nth-child(7) { text-align: center; }
.match-venue { min-width: 0; color: var(--text-secondary); font-size: 11px; }
.match-venue strong { display: block; overflow: hidden; color: var(--text-primary); font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
/* Coverage tier as a footnote, not a badge: it describes our sources, and on
   every row of an archive a bright pill outranked the score beside it. */
.tier-note { display: block; margin-top: 3px; color: var(--text-muted); font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
.matches-board.match-ledger { background: transparent; }

/* Season lab */
.season-heading { grid-template-columns: 1fr auto; }
.season-select { min-width: 220px; }
.lab-record { display: grid; grid-template-columns: minmax(0,1.4fr) repeat(4,minmax(0,1fr)); border-bottom: 1px solid var(--text-primary); }
.lab-record > div { min-width: 0; min-height: 145px; padding: 22px; border-right: 1px solid var(--text-primary); }
.lab-record > div:first-child { padding-left: 0; }
.lab-record > div:last-child { border: 0; }
.lab-record span { display: block; color: var(--text-secondary); font-size: 9px; letter-spacing: .12em; text-transform: uppercase; }
.lab-record strong { display: block; margin-top: 33px; font: 800 42px/1 var(--font-display); }
.lab-record > div:first-child strong { font-size: 58px; }
.lab-record i { color: var(--brand-accent); font-size: .45em; font-style: normal; }
.form-ribbon { margin-top: 70px; }
.form-sequence { display: flex; padding: 18px 0 20px; overflow-x: auto; border-top: 1px solid var(--text-primary); border-bottom: 1px solid var(--text-primary); }
.form-point { min-width: 64px; display: grid; justify-items: center; gap: 5px; }
.form-point i { width: 26px; height: 26px; display: grid; place-items: center; color: var(--text-on-accent); border-radius: 50%; font-size: 8px; font-style: normal; font-weight: 800; }
.form-point.win i { background: var(--success-surface); }
.form-point.draw i { color: var(--warning-ink); background: var(--warning-surface); }
.form-point.loss i { background: var(--brand-primary); }
.form-point span { max-width: 60px; overflow: hidden; color: var(--text-secondary); font-size: 7px; text-overflow: ellipsis; white-space: nowrap; }
.lab-two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 50px; margin-top: 76px; }
.formation-ledger-row { display: grid; grid-template-columns: 90px 1fr 75px 125px 70px; gap: 12px; align-items: center; min-height: 58px; border-top: 1px solid var(--border-subtle); font-size: 10px; }
.formation-ledger-row:last-child { border-bottom: 1px solid var(--border-subtle); }
.formation-ledger-row > div { height: 5px; background: var(--border-subtle); }
.formation-ledger-row > div i { display: block; height: 100%; background: linear-gradient(90deg,var(--brand-primary),var(--brand-secondary)); }
.formation-ledger-row > span { color: var(--text-secondary); }
.leader-head, .leader-row { display: grid; grid-template-columns: 28px 1fr 45px 50px 50px 60px; align-items: center; gap: 8px; }
.leader-head { padding: 10px 0; color: var(--text-secondary); border-bottom: 1px solid var(--text-primary); font-size: 8px; text-transform: uppercase; }
.leader-head span:first-child { grid-column: 1/3; }
.leader-row { min-height: 54px; border-bottom: 1px solid var(--border-subtle); font-size: 11px; }
.leader-row i { color: var(--text-secondary); font-size: 9px; font-style: normal; }
.leader-row > span, .leader-row > b { text-align: right; }
.lab-competition, .opponent-ledger { margin-top: 78px; }
.competition-records { display: grid; grid-template-columns: repeat(3,1fr); border: 1px solid var(--text-primary); }
.competition-records article { min-height: 225px; padding: 20px; border-right: 1px solid var(--text-primary); border-bottom: 1px solid var(--text-primary); }
.competition-records article:nth-child(3n) { border-right: 0; }
.competition-records article > div { display: flex; justify-content: space-between; color: var(--text-secondary); font-size: 9px; text-transform: uppercase; }
.competition-records article > strong { display: block; margin: 42px 0 24px; font-size: 24px; }
.competition-records dl { display: grid; grid-template-columns: repeat(4,1fr); margin: 0; padding-top: 12px; border-top: 1px solid var(--text-primary); }
.competition-records dt { color: var(--text-secondary); font-size: 8px; text-transform: uppercase; }
.competition-records dd { margin: 6px 0 0; font-weight: 800; }
.opponent-head, .opponent-row { display: grid; grid-template-columns: 1fr 90px 160px 100px 110px 60px; gap: 15px; align-items: center; }
.opponent-head { padding: 10px 0; color: var(--text-secondary); border-bottom: 1px solid var(--text-primary); font-size: 8px; text-transform: uppercase; }
.opponent-row { min-height: 55px; border-bottom: 1px solid var(--border-subtle); font-size: 11px; }
.opponent-row > span, .opponent-row > b { text-align: right; }

/* Match detail */
.match-page { padding-top: 28px; }
.match-masthead { color: var(--text-on-accent); background: linear-gradient(90deg,var(--brand-primary) 0 32%,var(--surface-sunken) 32% 68%,var(--brand-secondary) 68%); }
.match-index { display: flex; justify-content: space-between; padding: 18px 24px; border-bottom: 1px solid var(--overlay-strong); font-size: 9px; letter-spacing: .1em; text-transform: uppercase; }
.match-index .back-link { margin: 0; color: var(--text-on-accent); }
.match-lockup { min-height: 360px; display: grid; grid-template-columns: 1fr 260px 1fr; align-items: center; gap: 30px; padding: 35px 50px; }
.lockup-team { min-width: 0; }
.lockup-team.away { text-align: right; }
/* The crest is a <span class="identity-image"> and a direct child here too, so
   this must name the label span only — otherwise the crest is dimmed to .7 and
   its lockup plate blends into the gradient behind it. */
.lockup-team > span:not(.identity-image), .lockup-score small { display: block; opacity: .7; font-size: 8px; letter-spacing: .13em; text-transform: uppercase; }
.lockup-team strong { display: block; margin: 20px 0; font: 800 clamp(42px,5vw,76px)/.88 var(--font-display); letter-spacing: -.055em; text-transform: uppercase; }
.lockup-team small { opacity: .8; font-size: 11px; }
.lockup-score { text-align: center; }
.lockup-score strong { display: flex; justify-content: center; align-items: center; gap: 15px; margin: 18px 0; font: 800 92px/.8 var(--font-display); letter-spacing: -.06em; }
.lockup-score strong i { opacity: .55; font-size: .45em; font-style: normal; }
.lockup-score span { font-size: 11px; }
.match-source-line { display: flex; justify-content: center; align-items: center; gap: 24px; min-height: 62px; border-top: 1px solid var(--overlay-strong); font-size: 9px; letter-spacing: .08em; text-transform: uppercase; }
.match-source-line .tier-pill { color: var(--text-primary); background: var(--surface-inverse); }
.fact-strip { display: grid; grid-template-columns: repeat(6,1fr); border: 1px solid var(--text-primary); border-top: 0; }
.fact-strip > div { min-height: 105px; display: grid; grid-template-columns: 24px 1fr; grid-template-rows: auto 1fr; padding: 16px; border-right: 1px solid var(--text-primary); }
.fact-strip > div:last-child { border: 0; }
.fact-strip i { grid-row: 1/3; color: var(--text-secondary); font-size: 8px; font-style: normal; }
.fact-strip small { color: var(--text-secondary); font-size: 8px; letter-spacing: .1em; text-transform: uppercase; }
.fact-strip strong { align-self: end; font-size: 12px; }
.analysis-tabs { padding: 0; margin-top: 45px; background: transparent; border-bottom: 1px solid var(--text-primary); border-radius: 0; }
.analysis-tabs .tab { padding: 14px 23px; border-right: 1px solid var(--border-subtle); border-radius: 0; font-size: 10px; letter-spacing: .07em; text-transform: uppercase; }
.analysis-tabs .tab:hover, .analysis-tabs .tab.active { color: var(--text-on-accent); background: var(--surface-overlay); box-shadow: none; }
.tab-content { margin-top: 30px; }
.panel-title { padding-bottom: 12px; border-bottom: 1px solid var(--text-primary); }
.panel-title h3 { font-size: 19px; text-transform: uppercase; }
.detail-grid, .shot-layout, .lineup-grid, .heatmap-layout { gap: 35px; }
/* Each column packs its own cards. A row-aligned grid tied the top of the
   all-stat panel to the bottom of the tall statistics panel beside it, which
   left a column of dead space under the short momentum chart. */
.detail-column { display: grid; align-content: start; gap: 35px; min-width: 0; }
.pitch, .formation-pitch { border-radius: 0; }
.shot-pitch-wrap, .goal-grid, .formation-card, .heatmap-stage { padding: 20px 0; }
.shot-list { padding: 20px 0; }
.heatmap-list { border-top: 2px solid var(--text-primary); }
.heatmap-button { border-bottom-color: var(--border-subtle); }
.heatmap-button:hover, .heatmap-button.active { color: var(--text-on-accent); background: var(--surface-sunken); }
.coverage-note { margin: 18px 0; border-radius: 0; border: 0; border-left: 5px solid var(--brand-accent); }

/* Players, transfers, data notes */
/* Tiles with their own borders rather than cells of one bordered table. A
   group whose count is not a multiple of the column count — four keepers in
   three columns — used to close the table's frame around an empty region,
   which read as a broken card. Short rows now simply end. */
.squad-grid { grid-template-columns: repeat(auto-fill, minmax(232px, 1fr)); gap: 1px; border: 0; background: transparent; }
.player-card { min-height: 230px; padding: 22px; border: 1px solid var(--text-primary); background: var(--surface-inverse); }
.player-card::after { color: var(--overlay-weak); font-size: 120px; }
/* The photo sits in its own column. Absolutely positioned it was overrun by
   the stat row, which cut the player's head in half. Scoped to the squad grid:
   the analysis tab has its own, unrelated .player-card. */
.squad-grid .player-card { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 12px; align-content: start; }
.squad-grid .player-card-photo { position: static; grid-column: 2; grid-row: 1 / 4; align-self: start; opacity: 1; }
.squad-grid .player-card .country, .squad-grid .player-card h3, .squad-grid .injury-badge { grid-column: 1; }
.squad-grid .player-card h3 { max-width: none; margin-top: 15px; font-size: 25px; line-height: .95; text-transform: uppercase; }
.squad-grid .player-card-stats { grid-column: 1 / -1; margin-top: 24px; border-top: 1px solid var(--text-primary); }
.squad-grid .player-card-stats div { padding: 12px 0; background: transparent; border-radius: 0; }
.transfer-list { gap: 0; border-top: 3px solid var(--text-primary); }
.transfer-row { min-height: 77px; border-top: 0; border-bottom: 1px solid var(--border-subtle); }
.coverage-tier { border-radius: 0; }
.coverage-matrix.card { padding: 0; border-top: 3px solid var(--text-primary); overflow-x: auto; }

/* Pipeline and provenance */
.pipeline-hero {
  display: grid;
  grid-template-columns: 1.5fr repeat(4,1fr);
  color: var(--text-on-accent);
  background: var(--surface-sunken);
  border-top: 7px solid var(--brand-accent);
}
.pipeline-hero > div { min-width: 0; min-height: 180px; padding: 26px; border-right: 1px solid var(--overlay-medium); }
.pipeline-hero > div:last-child { border: 0; }
.pipeline-hero span, .pipeline-hero small { display: block; color: var(--text-secondary); font-size: 9px; letter-spacing: .1em; text-transform: uppercase; }
.pipeline-hero > div > strong { display: block; margin: 42px 0 10px; font: 800 42px/.9 var(--font-display); text-transform: uppercase; }
.pipeline-state > strong { display: flex !important; align-items: center; gap: 10px; color: var(--text-on-accent); }
.pipeline-state > strong i { width: 11px; height: 11px; flex: none; border-radius: 50%; background: var(--success-text); }
.pipeline-hero.stale .pipeline-state > strong i { background: var(--warning-surface); }
.pipeline-hero.failed .pipeline-state > strong i { background: var(--brand-primary); }
.pipeline-state p { max-width: 320px; margin: 14px 0 0; color: var(--text-secondary); font-size: 11px; line-height: 1.5; }
.pipeline-flow, .source-register, .conflict-register, .coverage-overview, .coverage-detail { margin-top: 78px; }
.pipeline-flow .editorial-heading > b, .conflict-register .editorial-heading > b { align-self: end; font-size: 9px; letter-spacing: .1em; text-transform: uppercase; }
.flow-grid { display: grid; grid-template-columns: repeat(4,1fr); border: 1px solid var(--text-primary); }
.flow-grid article { min-height: 235px; padding: 24px; border-right: 1px solid var(--text-primary); background: var(--surface-inverse); }
.flow-grid article:last-child { border: 0; }
.flow-grid i { color: var(--brand-accent); font-size: 10px; font-style: normal; font-weight: 800; }
.flow-grid strong { display: block; margin-top: 55px; font-size: 24px; text-transform: uppercase; }
.flow-grid p { color: var(--text-secondary); font-size: 11px; }
.source-register-head, .source-register-row { display: grid; grid-template-columns: 1fr 110px 110px 120px 230px; gap: 16px; align-items: center; }
.source-register-head { padding: 11px 0; color: var(--text-secondary); border-bottom: 1px solid var(--text-primary); font-size: 8px; letter-spacing: .1em; text-transform: uppercase; }
.source-register-row { min-height: 64px; border-bottom: 1px solid var(--border-subtle); font-size: 11px; }
.source-register-row strong { font-size: 15px; text-transform: uppercase; }
.source-register-row span:not(:first-child) { text-align: right; }
.conflict-register article { display: grid; grid-template-columns: 90px 1fr 1.4fr; gap: 20px; align-items: center; min-height: 70px; border-bottom: 1px solid var(--border-subtle); }
.conflict-register article p { margin: 0; color: var(--text-secondary); font-size: 11px; }
.conflict-severity { padding: 6px; color: var(--text-on-accent); background: var(--brand-secondary); font-size: 8px; font-weight: 800; text-align: center; text-transform: uppercase; }
.conflict-severity.critical { background: var(--brand-primary); }
.conflict-severity.warning { color: var(--warning-ink); background: var(--warning-surface); }
.conflict-clear { min-height: 150px; display: grid; grid-template-columns: 140px 1fr; align-items: center; border-top: 1px solid var(--text-primary); border-bottom: 1px solid var(--text-primary); }
.conflict-clear strong { color: var(--success-text); font: 800 80px/1 var(--font-display); }
.conflict-clear span { max-width: 600px; color: var(--text-secondary); font-size: 13px; }
.coverage-detail .editorial-heading p { margin: 6px 0 0; color: var(--text-secondary); font-size: 11px; }

footer { background: var(--surface-inverse); border-top: 1px solid var(--text-primary); }

@media (max-width: 1100px) {
  .site-masthead { gap: 20px; }
  .site-masthead .brand { min-width: 190px; }
  .site-masthead .main-nav { gap: 17px; }
  .home-lead { grid-template-columns: 1fr; }
  .last-match-feature { min-height: 520px; }
  /* Grow to fill a short season, hold 100px and scroll for a long one. */
  .result-tape { grid-template-columns: 130px; grid-auto-columns: minmax(100px, 1fr); overflow-x: auto; }
  .home-ledger-grid, .lab-two-col { grid-template-columns: 1fr; }
  .pipeline-hero { grid-template-columns: repeat(2,1fr); }
  .pipeline-hero .pipeline-state { grid-column: 1/3; }
  .pipeline-hero > div:nth-child(3), .pipeline-hero > div:nth-child(5) { border-right: 0; }
  .flow-grid { grid-template-columns: repeat(2,1fr); }
  .flow-grid article:nth-child(2) { border-right: 0; }
  .flow-grid article:nth-child(-n+2) { border-bottom: 1px solid var(--text-primary); }
  .fact-strip { grid-template-columns: repeat(3,1fr); }
  .fact-strip > div:nth-child(3) { border-right: 0; }
  .fact-strip > div:nth-child(-n+3) { border-bottom: 1px solid var(--text-primary); }
}

@media (max-width: 820px) {
  .site-masthead { min-height: 78px; height: auto; padding: 13px 14px 0; }
  .site-masthead .brand { min-width: auto; }
  .site-masthead .brand-mark { width: 48px; }
  .site-masthead .brand small { display: none; }
  .site-masthead .data-status { display: none; }
  .site-masthead .main-nav { width: calc(100vw - 28px); gap: 24px; }
  .site-masthead .main-nav a { padding: 12px 0 10px; }
  .page { width: calc(100% - 24px); padding-top: 24px; }
  .home-statement { padding: 24px 20px 32px; }
  .issue-line { margin-bottom: 55px; }
  .home-statement h1 { font-size: 60px; }
  .statement-links { flex-direction: column; gap: 5px; }
  .last-match-feature { min-height: 450px; padding: 24px 20px; }
  .feature-score strong { font-size: 100px; }
  /* Two up. The cell count varies with the match, so the flush edge has to be
     every right-hand cell, not the fourth one. */
  .feature-data { grid-template-columns: repeat(2,1fr); }
  .feature-data > span:nth-child(even) { border-right: 0; }
  .feature-data > span:nth-child(odd) { padding-left: 0; }
  .ways-grid, .competition-records { grid-template-columns: 1fr; }
  .ways-grid > a { min-height: 245px; border-right: 0; border-bottom: 1px solid var(--text-primary); }
  .ways-grid > a:last-child { border-bottom: 0; }
  .competition-records article { border-right: 0; }
  .page-heading { min-height: 350px; align-items: start; flex-direction: column; }
  .page-heading h1 { font-size: 64px; }
  /* No header rule and no venue column below this width: the row drops to the
     four cells that answer "who, what score, when". */
  .archive-rule { display: none; }
  /* Competition, xG and venue are hidden at this width, so the track list is
     the four cells that remain — otherwise the row keeps empty columns. */
  .matches-board.match-ledger .match-row { grid-template-columns: 88px minmax(0,1fr) 52px 42px; }
  .matches-board.match-ledger .match-row .match-venue { display: none; }
  .match-lockup { min-height: 390px; grid-template-columns: 1fr 100px 1fr; gap: 10px; padding: 25px 14px; }
  .lockup-team strong { font-size: 34px; }
  .lockup-score strong { font-size: 52px; }
  .match-source-line { gap: 10px; padding: 10px; flex-wrap: wrap; }
  .lab-record { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .lab-record > div { border-bottom: 1px solid var(--text-primary); }
  .lab-record > div:first-child { grid-column: 1/3; padding-left: 22px; }
  .formation-ledger-row { grid-template-columns: 80px 1fr 60px; }
  .formation-ledger-row span:nth-of-type(2), .formation-ledger-row b { display: none; }
  .opponent-head, .opponent-row { grid-template-columns: 1fr 55px 120px 45px; }
  .opponent-head span:nth-child(4), .opponent-head span:nth-child(5), .opponent-row span:nth-child(4), .opponent-row span:nth-child(5) { display: none; }
  .source-register-head, .source-register-row { grid-template-columns: 1fr 70px 80px 150px; }
  .source-register-head span:nth-child(4), .source-register-row span:nth-child(4) { display: none; }
}

@media (max-width: 520px) {
  .site-masthead .brand strong { font-size: 13px; }
  .site-masthead .main-nav { gap: 21px; }
  .site-masthead .main-nav a { font-size: 9px; }
  .home-statement h1 { font-size: 52px; }
  .issue-line span:nth-child(2) { display: none; }
  .feature-score small { font-size: 11px; }
  .feature-score strong { font-size: 80px; }
  .home-ledger-grid { margin-top: 48px; }
  .match-ledger .match-row { grid-template-columns: 68px 1fr 45px 30px; }
  .match-ledger .match-xg { display: none; }
  .brief-score strong { font-size: clamp(38px, 13vw, 55px); }
  /* The trailing "view all" link cannot shrink, so below this width it takes
     its own row instead of forcing the page wider than the viewport. */
  .editorial-heading { grid-template-columns: 28px minmax(0, 1fr); }
  /* Any trailing element -- <a> on the archive headings, <b> on the pipeline
     ones -- takes a full row rather than being squeezed into the 28px index
     column. Targeting only `> a` left the pipeline <b> one word per line. */
  .editorial-heading > :nth-child(n+3) { grid-column: 1 / -1; justify-self: start; align-self: auto; }
  .editorial-heading h2 { font-size: 27px; }
  .competition-ledger > a { grid-template-columns: 35px 1fr 75px 20px; }
  .competition-ledger strong { font-size: 12px; }
  .match-index span { display: none; }
  .lockup-team strong { font-size: 27px; }
  .fact-strip { grid-template-columns: repeat(2,1fr); }
  .fact-strip > div:nth-child(3) { border-right: 1px solid var(--text-primary); }
  .fact-strip > div:nth-child(2n) { border-right: 0; }
  .fact-strip > div:nth-child(-n+4) { border-bottom: 1px solid var(--text-primary); }
  .analysis-tabs .tab { padding: 12px 14px; }
  .lab-record strong { font-size: clamp(28px, 8.4vw, 34px); letter-spacing: -.05em; white-space: nowrap; }
  .competition-records dl { grid-template-columns: repeat(2,1fr); gap: 13px; }
  .leader-head, .leader-row { grid-template-columns: 22px 1fr 38px 45px; }
  .leader-head span:nth-child(4), .leader-head span:nth-child(5), .leader-row span:nth-child(5), .leader-row > b { display: none; }
  .squad-grid { grid-template-columns: 1fr; }
  .pipeline-hero { grid-template-columns: 1fr 1fr; }
  .pipeline-hero > div { min-height: 145px; padding: 18px; }
  .pipeline-hero > div > strong { margin-top: 28px; font-size: 32px; }
  .flow-grid { grid-template-columns: 1fr; }
  .flow-grid article { min-height: 190px; border-right: 0; border-bottom: 1px solid var(--text-primary); }
  .flow-grid article:nth-child(3) { border-bottom: 1px solid var(--text-primary); }
  .flow-grid strong { margin-top: 38px; }
  .source-register-head, .source-register-row { grid-template-columns: 1fr 52px 105px; gap: 8px; }
  .source-register-head span:nth-child(3), .source-register-row span:nth-child(3) { display: none; }
  .source-register-row { font-size: 9px; }
  .conflict-register article { grid-template-columns: 75px 1fr; padding: 12px 0; }
  .conflict-register article p { grid-column: 1/3; }
  .conflict-clear { grid-template-columns: 80px 1fr; }
  .conflict-clear strong { font-size: 60px; }
}
