/* Formartine United Archive shared theme. Change these tokens before individual components. */
:root {
  --gold: #b5121b;
  --ink: #141414;
  --paper: #fff;
  --canvas: #ededed;
  --line: #d5d5d5;
  --muted: #555;
  --hover: #fff1f1;
  --link: #b5121b;
  --page-width: 1440px;
}
* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--canvas); font: 1rem/1.45 Arial, Helvetica, sans-serif; }
a { color: var(--link); text-underline-offset: .2em; }
a:hover { text-decoration: underline; }
button, input, select { font: inherit; }
button, a, summary { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid #146bd1; outline-offset: 3px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip-link { position: fixed; top: -100px; left: 12px; background: white; padding: 12px; z-index: 20; }
.skip-link:focus { top: 8px; }
.masthead { background: #b5121b; color: white; border-top: 5px solid var(--gold); }
.masthead-inner { max-width: var(--page-width); margin: auto; padding: 18px 22px; display: flex; gap: 32px; align-items: center; }
.brand { color: white; text-decoration: none; flex-shrink: 0; }
.brand:hover { text-decoration: none; }
.brand > span { display: block; font-size: 1.75rem; font-weight: 900; letter-spacing: -.06em; line-height: 1.1; }
.brand-accent { color: #fff; }
.brand small { display: block; font-size: .75rem; letter-spacing: .09em; margin-top: 6px; }
.global-search { display: flex; flex: 1; max-width: 640px; }
input:not([type=checkbox]):not([type=hidden]), select { min-width: 0; width: 100%; border: 1px solid #aaa; border-radius: 2px; background: white; color: var(--ink); min-height: 42px; padding: 8px 10px; }
input[type=search] { appearance: none; }
button { border: 1px solid var(--ink); background: var(--ink); color: white; font-weight: 700; padding: 9px 16px; cursor: pointer; border-radius: 2px; min-height: 42px; }
button:hover { background: #333; }
.global-search input { border: none; border-radius: 2px 0 0 2px; }
.global-search button { border: none; border-radius: 0 2px 2px 0; background: var(--gold); color: #111; }
.primary-nav { background: var(--gold); border-bottom: 1px solid #171717; }
.nav-inner { max-width: var(--page-width); margin: auto; padding: 0 22px; display: flex; align-items: stretch; }
.nav-inner > a, .more-nav > summary { display: block; padding: 12px 22px; font-size: .9375rem; font-weight: 700; color: #111; text-decoration: none; cursor: pointer; }
.nav-inner > a:hover, .more-nav > summary:hover { background: #8c1017; }
.nav-inner > a[aria-current] { background: #b5121b; color: white; }
.more-nav { position: relative; margin-left: auto; }
.more-nav > summary { list-style: none; }
.more-nav > summary::-webkit-details-marker { display: none; }
.more-nav > summary::after { content: ' ▾'; }
.more-nav > div { position: absolute; right: 0; top: 100%; width: 230px; background: white; border: 1px solid #aaa; z-index: 5; box-shadow: 0 5px 15px #0002; }
.more-nav a { display: block; padding: 10px 16px; color: #111; font-size: .9375rem; text-decoration: none; border-bottom: 1px solid #eee; }
.more-nav a:hover { background: var(--hover); }
.workspace { max-width: var(--page-width); margin: auto; padding: 22px; min-height: 65vh; }
.page-heading { display: flex; align-items: baseline; gap: 20px; margin-bottom: 16px; flex-wrap: wrap; }
h1 { font-size: 1.8rem; line-height: 1.2; margin: 0; letter-spacing: -.03em; }
.page-heading p { margin: 0; color: var(--muted); font-size: .9375rem; }
.stat-strip { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--line); margin-bottom: 18px; background: white; }
.stat-strip a { display: flex; align-items: baseline; gap: 12px; padding: 12px 18px; text-decoration: none; color: var(--ink); border-right: 1px solid var(--line); }
.stat-strip a:last-child { border: 0; }
.stat-strip a:hover { background: var(--hover); }
.stat-strip strong { font-size: 1.65rem; font-variant-numeric: tabular-nums; }
.stat-strip span { font-size: .9375rem; color: var(--muted); }
.archive-grid { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 18px; align-items: start; }
.panel { background: white; border: 1px solid var(--line); min-width: 0; }
.panel-heading { display: flex; gap: 12px; justify-content: space-between; align-items: center; background: #f8f8f8; border-bottom: 1px solid var(--line); border-top: 3px solid #111; padding: 10px 14px; }
.panel-heading h2 { margin: 0; font-size: 1rem; }
.panel-heading a { font-size: .875rem; }
.sidebar { display: grid; gap: 18px; }
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .9375rem; }
th { font-size: .875rem; background: #f7f7f7; text-align: left; font-weight: 700; }
td, th { padding: 11px 12px; border-bottom: 1px solid #e2e2e2; vertical-align: middle; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover, tbody tr:focus-within { background: var(--hover); }
td a { color: inherit; }
td small { display: block; color: var(--muted); font-size: .75rem; margin-top: 2px; }
.date-cell { white-space: nowrap; }
.date-cell a { text-decoration: none; }
.home-team { text-align: right; }
.united, .record-name { font-weight: 700; }
.score-cell { text-align: center; min-width: 72px; }
.score { display: inline-block; font-weight: 800; padding: 3px 8px; text-decoration: none; background: #f0f0f0; border: 1px solid #ddd; border-radius: 2px; white-space: nowrap; }
tr:hover .score { background: #b5121b; color: white; border-color: #111; }
.result { display: inline-grid; place-items: center; width: 25px; height: 25px; border-radius: 2px; font-size: .8125rem; font-weight: 700; }
.result-w { background: #e3efe7; color: #235734; }
.result-d { background: #eee; color: #444; }
.result-l { background: #f7e7e7; color: #832a2a; }
.record-list { list-style: none; padding: 0; margin: 0; }
.record-list li + li { border-top: 1px solid #e2e2e2; }
.record-list a { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 5px 12px; padding: 10px 14px; color: #111; text-decoration: none; font-size: .9375rem; }
.record-list a:hover { background: var(--hover); }
.record-list a span { color: var(--muted); font-size: .875rem; }
.collections { margin-top: 18px; }
.collection-links { display: grid; grid-template-columns: repeat(6, 1fr); }
.collection-links a { padding: 18px 12px; border-right: 1px solid var(--line); text-align: center; color: #111; font-weight: 700; text-decoration: none; font-size: .9375rem; }
.collection-links a:hover { background: var(--hover); }
.collection-links a:last-child { border: 0; }
.filter-panel { background: #fff; border: 1px solid var(--line); padding: 14px; margin-bottom: 16px; display: grid; gap: 12px; align-items: end; }
.filter-panel label { display: grid; gap: 5px; font-size: .875rem; font-weight: 700; }
.filter-panel input, .filter-panel select { font-size: 1rem; font-weight: 400; }
.match-filters { grid-template-columns: 1.5fr 1fr 1.5fr 1fr; }
.match-filters .filter-actions { grid-column: span 2; }
.player-filters { grid-template-columns: 2fr 1.5fr auto; }
.filter-actions { display: flex; align-items: center; gap: 16px; }
.filter-actions a { font-size: .9375rem; }
.alphabet { display: flex; flex-wrap: wrap; gap: 4px; margin: 0 0 16px; }
.alphabet a { min-width: 34px; min-height: 40px; display: grid; place-items: center; padding: 4px 9px; border: 1px solid #ccc; background: white; color: #111; text-decoration: none; font-size: .9375rem; }
.alphabet a:hover { background: var(--hover); }
.alphabet a[aria-current] { color: #fff; background: var(--gold); border-color: #111; font-weight: 700; }
.pagination { display: flex; align-items: center; justify-content: center; gap: 20px; border-top: 1px solid var(--line); padding: 12px; font-size: .9375rem; }
.pagination a { padding: 8px; }
.search-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.count { color: var(--muted); font-weight: 400; padding-left: 8px; }
.search-results a { flex-direction: column; gap: 2px; }
.panel-link { display: block; padding: 12px 14px; border-top: 1px solid var(--line); font-size: .9375rem; }
.empty { padding: 28px 18px; }
.empty h2 { font-size: 1.125rem; margin: 0 0 8px; }
.empty p { margin: 0; }
.empty-small { margin: 0; padding: 18px 14px; color: var(--muted); }
.related-search { font-size: .9375rem; }
.row-links a { display: inline-block; margin-right: 18px; padding: 4px 0; }
.site-footer { max-width: var(--page-width); margin: 0 auto; padding: 18px 22px 24px; border-top: 1px solid #ccc; display: flex; flex-wrap: wrap; gap: 20px; font-size: .875rem; color: var(--muted); }
.site-footer span { margin-right: auto; }
/* Tablet: retain the match table, move supporting sections below it. */
@media (max-width: 1100px) {
  .masthead-inner { gap: 22px; }
  .nav-inner > a, .more-nav > summary { padding: 12px 16px; }
  .archive-grid { grid-template-columns: 1fr; }
  .sidebar { grid-template-columns: 1fr 1fr; }
  .collection-links { grid-template-columns: repeat(3, 1fr); }
  .collection-links a { border-bottom: 1px solid var(--line); }
}
/* Phone: visible search, wrapping navigation, two-column filters, scrollable detail tables. */
@media (max-width: 640px) {
  .masthead-inner { padding: 14px 12px; flex-wrap: wrap; gap: 14px; }
  .brand > span { font-size: 1.65rem; }
  .global-search { flex-basis: 100%; }
  .global-search input { font-size: 1rem; }
  .nav-inner { padding: 0; flex-wrap: wrap; }
  .nav-inner > a, .more-nav > summary { padding: 11px 12px; font-size: .875rem; }
  .more-nav { margin-left: 0; }
  .more-nav > div { left: 0; right: auto; }
  .workspace { padding: 16px 10px; }
  .page-heading { gap: 6px; display: block; }
  h1 { font-size: 1.5rem; }
  .page-heading p { margin-top: 5px; }
  .stat-strip { margin-bottom: 12px; }
  .stat-strip a { display: block; padding: 10px; }
  .stat-strip strong { display: block; font-size: 1.4rem; }
  .archive-grid, .sidebar, .search-grid { grid-template-columns: 1fr; gap: 12px; }
  .match-table { display: block; }
  .match-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .match-table tbody { display: block; }
  .match-table tr { display: grid; grid-template-columns: minmax(0, 1fr) 72px minmax(0, 1fr) 26px; padding: 10px; gap: 6px; border-bottom: 1px solid var(--line); }
  .match-table td { padding: 0; border: 0; align-self: center; }
  .match-table .date-cell { grid-column: 1 / 3; grid-row: 1; font-size: .875rem; }
  .match-table .competition-cell { grid-column: 3 / 5; grid-row: 1; text-align: right; font-size: .8125rem; }
  .match-table .competition-cell small { display: none; }
  .match-table .home-team { grid-column: 1; grid-row: 2; overflow-wrap: anywhere; }
  .match-table .score-cell { grid-column: 2; grid-row: 2; min-width: 0; }
  .match-table td:nth-child(4) { grid-column: 3; grid-row: 2; overflow-wrap: anywhere; }
  .match-table .result-cell { grid-column: 4; grid-row: 2; }
  .match-table .score { white-space: normal; overflow-wrap: anywhere; }
  .table-scroll:focus-visible { outline-offset: -3px; }
  td, th { padding: 10px 9px; }
  .match-filters, .player-filters { grid-template-columns: 1fr 1fr; }
  .filter-panel label:first-child, .filter-actions, .player-filters label { grid-column: 1 / -1; }
  .collection-links { grid-template-columns: repeat(2, 1fr); }
  .collection-links a { padding: 14px 10px; }
  .alphabet a { min-width: 38px; min-height: 44px; }
  .site-footer { padding: 16px 12px; }
}
@media print {
  .primary-nav, .global-search, .filter-panel, .site-footer, .alphabet { display: none; }
  body, .masthead { background: white; color: black; }
  .brand, .brand-accent { color: black; }
  .workspace { max-width: none; padding: 10px 0; }
  .archive-grid { display: block; }
  .table-scroll { overflow: visible; }
  .match-table { min-width: 0; }
  a { color: black; }
}

/* Player records and match details, second staging build. */
.trialist { color: #777; font-weight: 400; }
.nation-flag { object-fit: contain; vertical-align: middle; }
.player-filters { grid-template-columns: 2fr 1fr 1fr 1fr; }
.filter-panel .checkbox-label { display: flex; align-items: center; gap: 8px; }
.filter-panel .checkbox-label input[type=checkbox] {
  appearance: auto; box-sizing: border-box; flex: 0 0 16px;
  width: 16px; height: 16px; min-width: 16px; min-height: 16px;
  max-width: 16px; max-height: 16px; padding: 0; margin: 0;
  accent-color: var(--ink); cursor: pointer;
}
.filter-panel .checkbox-label { min-height: 42px; justify-content: flex-start; cursor: pointer; }
.stats-key { max-width: 1000px; font-size: .875rem; color: var(--muted); }
.player-statistics td:not(:first-child), .player-statistics th:not(:first-child) { text-align: center; }
.player-statistics th { white-space: nowrap; }
.player-statistics .record-name { min-width: 175px; }
.programme-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(145px, 1fr)); gap: 16px; }
.programme-card a { display: grid; gap: 7px; padding: 12px; text-decoration: none; color: #111; }
.programme-card img { width: 100%; height: 210px; object-fit: contain; }
.programme-card a:hover { background: var(--hover); }
.match-navigation { display: flex; justify-content: space-between; gap: 12px; margin: 0 0 14px; font-size: .875rem; }
.match-header { border-top: 5px solid var(--gold); margin-bottom: 18px; }
.competition-heading { text-align: center; font-size: 1.3rem; font-weight: 700; padding: 15px 14px 8px; }
.scoreboard { display: grid; grid-template-columns: 1fr auto 1fr; gap: 24px; align-items: center; padding: 10px 24px; font-size: 2rem; }
.scoreboard > span:first-child { text-align: right; }
.scoreboard > strong { font-size: 3rem; background: #b5121b; color: white; padding: 8px 20px; border-radius: 2px; text-align: center; }
.match-decision { text-align: center; margin: 0 0 10px; }
.scorers { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; padding: 6px 24px 18px; font-size: .9375rem; }
.scorers > div:first-child { text-align: right; }
.scorers > div:last-child { text-align: left; }
.scorers a { color: inherit; text-decoration: none; }
.scorers > div > div { padding: 3px; }
.scorers > div > div:hover { background: var(--hover); }
.match-meta { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px 24px; background: #f5f5f5; padding: 12px; border-top: 1px solid var(--line); font-size: .9375rem; }
.match-content { display: grid; grid-template-columns: minmax(0, 1fr) 310px; gap: 18px; align-items: start; }
.match-main { display: grid; gap: 18px; min-width: 0; }
.lineup-columns { display: grid; grid-template-columns: 1fr 1fr; }
.team-lineup { padding: 14px; min-width: 0; }
.team-lineup + .team-lineup { border-left: 1px solid var(--line); }
.team-lineup > h2 { margin: 0 0 14px; font-size: 1.2rem; border-bottom: 3px solid var(--gold); padding-bottom: 8px; }
.team-lineup h3 { font-size: .9375rem; margin: 14px 0 7px; }
.lineup { list-style: none; margin: 0; padding: 0; }
.lineup li { display: flex; gap: 9px; align-items: center; padding: 8px 4px; border-bottom: 1px solid #eee; font-size: .9375rem; }
.lineup li:hover, .manager-row:hover { background: var(--hover); }
.lineup a, .manager-row a { color: inherit; text-decoration: none; }
.shirt-number { width: 23px; flex-shrink: 0; text-align: center; color: var(--muted); font-variant-numeric: tabular-nums; }
.lineup-name { flex: 1; }
.lineup small { display: inline-block; font-size: .75rem; margin-left: 6px; color: var(--muted); }
.lineup-events { text-align: right; flex-shrink: 0; white-space: nowrap; font-variant-numeric: tabular-nums; }
.lineup-events small { display: block; }
.manager-row { padding: 8px 4px; }
.opposition-events { font-size: .9375rem; }
.opposition-events > div { padding: 4px; }
.match-facts { padding: 14px; margin: 0; font-size: .9375rem; }
.match-facts dt { font-weight: 700; }
.match-facts dd { margin: 0 0 12px; }
.match-facts dd:last-child { margin: 0; }
.context-matches a { display: grid; grid-template-columns: 1fr auto; }
.context-matches a > span:first-child { grid-column: 1 / -1; font-size: .75rem; }
.prose { padding: 16px; overflow-wrap: anywhere; }
.prose p:first-child { margin-top: 0; }
.prose p:last-child { margin-bottom: 0; }
.report-credit { color: var(--muted); font-size: .875rem; }
.media-content { padding: 16px; }
.match-video { display: block; border: 0; width: 100%; aspect-ratio: 16 / 9; }
.programme-notes { display: flex; gap: 16px; align-items: flex-start; margin-top: 14px; }
.programme-notes figure { margin: 0; flex-shrink: 0; width: 160px; }
.programme-notes img { width: 100%; height: auto; }
.programme-notes figcaption { font-size: .875rem; text-align: center; }
.programme-notes .prose { padding: 0; }
.programme-notes h3 { margin-top: 0; }
.programme-dialog { max-width: min(94vw, 950px); max-height: 94vh; padding: 12px; border: 0; }
.programme-dialog::backdrop { background: #000c; }
.programme-dialog img { display: block; max-width: 100%; max-height: 80vh; margin-top: 10px; object-fit: contain; }
@media (max-width: 1100px) {
  .match-content { grid-template-columns: 1fr; }
  .match-sidebar { grid-template-columns: repeat(3, 1fr); }
  .player-filters { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .player-table .phone-hide { display: none; }
  .player-filters { grid-template-columns: 1fr 1fr; }
  .player-filters label { grid-column: auto; }
  .player-filters label:first-child, .player-filters .checkbox-label { grid-column: 1 / -1; }
  .player-statistics td:first-child { position: sticky; left: 0; background: white; z-index: 1; max-width: 135px; min-width: 135px; }
  .player-statistics tr:hover td:first-child { background: var(--hover); }
  .competition-heading { font-size: 1.1rem; }
  .scoreboard { font-size: 1.15rem; gap: 10px; padding: 10px; }
  .scoreboard > strong { font-size: 2rem; padding: 8px; }
  .scorers { gap: 22px; padding: 6px 10px 12px; font-size: .875rem; }
  .match-meta { justify-content: flex-start; font-size: .875rem; }
  .lineup-columns, .match-sidebar { grid-template-columns: 1fr; }
  .team-lineup + .team-lineup { border-left: 0; border-top: 1px solid var(--line); }
  .programme-notes { flex-wrap: wrap; }
}
.compact-league { font-size: .875rem; }
.compact-league th, .compact-league td { padding: 8px 6px; }
.united-row { background: #fff1f1; font-weight: 700; }
.table-date { font-size: .75rem; color: var(--muted); margin: 8px 12px; }
.other-result { padding: 10px 12px; font-size: .875rem; }

/* On phones each season becomes a compact two-line record. */
@media (max-width: 640px) {
  .season-table, .season-table tbody { display: block; width: 100%; }
  .season-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .season-table tr { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 7px 12px; padding: 12px; border-bottom: 1px solid var(--line); }
  .season-table tr:last-child { border-bottom: 0; }
  .season-table td { padding: 0; border: 0; min-width: 0; }
  .season-table td:first-child { font-size: 1rem; }
  .season-table td:nth-child(2) { text-align: right; color: var(--muted); font-size: .875rem; overflow-wrap: anywhere; }
  .season-table .season-europe { display: none; }
  .season-table .row-links { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 2px 16px; }
  .season-table .row-links a { display: inline-flex; align-items: center; min-height: 36px; margin: 0; padding: 4px 0; font-size: .875rem; }
}
/* Live filtering and autocomplete keep native form fallbacks. */
.live-filters .filter-panel button[type=submit] { display: none; }
.filter-status { font-size: .875rem; margin: 0 0 10px; }
[aria-busy=true] .table-scroll { opacity: .65; }
.global-search { position: relative; }
.search-suggestions { position: absolute; top: 100%; left: 0; right: 0; z-index: 30; background: white; color: #111; border: 1px solid #aaa; padding: 0; margin: 3px 0 0; list-style: none; max-height: 360px; overflow-y: auto; box-shadow: 0 5px 15px #0003; }
.search-suggestions[hidden] { display: none; }
.search-suggestions li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 13px; border-bottom: 1px solid #eee; cursor: pointer; font-size: .9375rem; }
.search-suggestions li span { color: #555; font-size: .8125rem; }
.search-suggestions li:hover, .search-suggestions li[aria-selected=true] { background: var(--hover); }
.player-statistics th a { display: inline-block; color: inherit; padding: 4px 0; text-decoration: none; }
.prominent-programme > a { display: grid; gap: 8px; padding: 14px; text-align: center; font-size: .875rem; }
.prominent-programme img { width: 100%; max-height: 420px; object-fit: contain; }
@media (max-width: 1100px) { .prominent-programme { grid-column: 1 / -1; } .prominent-programme img { max-height: 330px; } }

/* Shared grid rows keep each team's section headings level, regardless of bench size. */
.paired-lineups { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.paired-lineups .team-heading { margin: 0; padding: 14px; font-size: 1.2rem; border-bottom: 3px solid var(--gold); }
.lineup-section { min-width: 0; padding: 8px 14px 12px; }
.lineup-section:nth-child(even), .paired-lineups .team-heading:nth-child(even) { border-left: 1px solid var(--line); }
.lineup-section h3 { font-size: .9375rem; margin: 0 0 6px; }
.lineup-section .lineup li { align-items: baseline; overflow-wrap: anywhere; }
.mobile-team { display: none; }
.player-profile { display: grid; grid-template-columns: minmax(200px, 280px) minmax(0, 1fr); gap: 16px; align-items: start; }
.profile-main, .profile-summary { min-width: 0; }
.player-portrait { margin: 0 0 16px; }
.player-portrait img { display: block; width: 100%; height: auto; -webkit-touch-callout: none; user-select: none; }
.player-portrait figcaption { padding: 10px; font-size: .875rem; }
.player-portrait figcaption p { margin: 6px 0 0; }
.profile-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 0; }
.profile-stats > div { padding: 12px; border-bottom: 1px solid var(--line); }
.profile-stats dt { font-size: .875rem; }
.profile-stats dd { font-size: 1.4rem; font-weight: 700; margin: 4px 0 0; }
.profile-filter { margin: 0; grid-template-columns: minmax(140px, 260px) auto; }
.profile-seasons { width: 100%; min-width: 0; }
.club-spell + .club-spell { border-top: 1px solid var(--line); }
@media (max-width: 850px) {
  .player-profile { grid-template-columns: minmax(170px, 220px) minmax(0, 1fr); }
}
@media (max-width: 640px) {
  .paired-lineups { grid-template-columns: minmax(0, 1fr); }
  .paired-lineups .team-heading { display: none; }
  .mobile-team { display: inline; }
  .lineup-section:nth-child(even) { border-left: 0; }
  .lineup-section { border-bottom: 1px solid var(--line); padding: 10px; }
  .player-profile { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .profile-summary { display: grid; grid-template-columns: minmax(0, 1fr); }
  .player-portrait { max-width: 280px; }
  .profile-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .profile-seasons th, .profile-seasons td { padding: 10px 8px; }
}

/* Compact results from United's perspective, with a readable outcome marker. */
.context-matches a { gap: 3px 10px; grid-template-columns: minmax(0, 1fr) auto; }
.context-matches strong { min-width: 0; overflow-wrap: anywhere; }
.context-score { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.context-matches .result-d { background: #fff0c2; color: #654b00; }
.context-penalties { grid-column: 2; text-align: right; }

/* On this day: compact anniversary records with a persistent main navigation link. */
.otd-heading { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 12px; }
.otd-heading p { margin: 3px 0 0; color: var(--link); font-size: 1.4rem; font-weight: 700; }
.otd-date { display: flex; align-items: center; gap: 8px; }
.otd-date label { white-space: nowrap; font-size: .875rem; }
.otd-date select { width: 165px; }
.otd-day-nav { display: flex; justify-content: space-between; margin-bottom: 14px; font-size: .875rem; }
.otd-layout { display: grid; grid-template-columns: minmax(0, 1.8fr) minmax(290px, 1fr); gap: 16px; align-items: start; }
.otd-main, .otd-sidebar { display: grid; gap: 16px; min-width: 0; }
.otd-layout h3 { font-size: 1.08rem; margin: 0 0 5px; line-height: 1.3; }
.otd-layout .panel-heading > span { font-size: .8125rem; white-space: nowrap; }
.otd-feature { border-top: 5px solid var(--gold); }
.otd-feature .panel-heading { border-top: 0; }
.otd-feature-body { padding: 14px; display: flex; gap: 14px; align-items: start; }
.otd-feature-body > div { min-width: 0; }
.otd-feature-body p { margin: 6px 0 10px; font-size: .9375rem; }
.otd-feature-body .otd-big-number { font-size: 1.8rem; font-weight: 800; line-height: 1.1; margin: 0 0 10px; color: var(--ink); }
.otd-portrait { margin: 0; flex: 0 0 110px; width: 110px; }
.otd-portrait img { width: 100%; height: auto; max-height: 155px; object-fit: contain; display: block; user-select: none; }
.otd-portrait figcaption { font-size: .625rem; line-height: 1.3; margin-top: 5px; overflow-wrap: anywhere; color: var(--muted); }
.otd-portrait figcaption p { margin: 3px 0 0; font-size: inherit; }
.otd-match-link { font-size: .875rem; }
.otd-matches, .otd-list { list-style: none; margin: 0; padding: 0; }
.otd-matches > li { display: flex; gap: 12px; align-items: center; padding: 12px; border-bottom: 1px solid var(--line); }
.otd-matches > li:last-child, .otd-list > li:last-child { border-bottom: 0; }
.otd-matches > li:hover, .otd-list > li:hover { background: var(--hover); }
.otd-programme { display: block; flex: 0 0 60px; text-align: center; font-size: .625rem; }
.otd-programme img { display: block; width: 60px; height: 82px; object-fit: contain; margin-bottom: 3px; }
.otd-match-copy { flex: 1; min-width: 0; }
.otd-match-copy h3 a { color: var(--ink); text-decoration: none; }
.otd-match-copy p { margin: 0; font-size: .8125rem; color: var(--muted); }
.otd-match-top { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; margin-bottom: 5px; font-size: .75rem; }
.otd-reason { color: var(--link); font-weight: 700; }
.otd-result { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; justify-content: end; flex: 0 0 96px; }
.otd-result > a { font-size: 1.3rem; font-weight: 800; color: var(--ink); text-decoration: none; }
.otd-result small { width: 100%; text-align: right; font-size: .6875rem; }
.otd-layout .result-d { background: #fff0c2; color: #654b00; }
.otd-list > li { padding: 10px 12px; border-bottom: 1px solid var(--line); font-size: .9375rem; }
.otd-list > li > div:not(.otd-portrait) { min-width: 0; }
.otd-list > li > div { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.otd-list small { display: block; color: var(--muted); font-size: .75rem; margin-top: 3px; }
.otd-list a { color: var(--ink); }
.otd-empty { padding: 14px; margin: 0; font-size: .875rem; color: var(--muted); }
.otd-signing-stats { display: flex; gap: 24px; margin: 10px 0 5px; }
.otd-signing-stats dt { font-size: .75rem; color: var(--muted); }
.otd-signing-stats dd { margin: 0; font-weight: 800; font-size: 1.5rem; line-height: 1.2; }
.otd-feature-body small { font-size: .75rem; color: var(--muted); }
.otd-birthdays > li { display: flex; gap: 12px; align-items: start; }
.otd-birthdays > li > div { display: block; }
.otd-birthdays .otd-portrait { flex-basis: 85px; width: 85px; }
.otd-rip { font-size: .6875rem; color: var(--muted); font-weight: 400; }
.otd-more summary, .otd-method summary { padding: 10px 12px; font-size: .8125rem; cursor: pointer; }
.otd-method > div { padding: 0 12px 8px; font-size: .8125rem; }
.otd-more summary:hover, .otd-method summary:hover { background: var(--hover); }
.nav-inner > a { white-space: nowrap; }
@media (min-width: 761px) and (max-width: 1150px) {
  .nav-inner > a, .more-nav > summary { padding-left: 12px; padding-right: 12px; }
  .otd-layout { grid-template-columns: minmax(0, 1.5fr) minmax(275px, 1fr); }
  .otd-feature-body { flex-wrap: wrap; }
  .otd-feature-body .otd-portrait { flex-basis: 85px; width: 85px; }
}
@media (max-width: 760px) {
  .otd-heading { align-items: start; flex-wrap: wrap; }
  .otd-date { width: 100%; }
  .otd-date select { flex: 1; width: auto; }
  .otd-layout { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .otd-main, .otd-sidebar { gap: 12px; }
  .otd-feature-body { padding: 12px; gap: 10px; }
  .otd-feature-body .otd-big-number { font-size: 1.4rem; }
  .otd-portrait { flex-basis: 85px; width: 85px; }
  .otd-matches > li { gap: 8px; padding: 10px; flex-wrap: wrap; }
  .otd-match-copy { min-width: 130px; }
  .otd-result { flex-basis: 70px; }
  .otd-result > a { font-size: 1.15rem; }
  .otd-programme { flex-basis: 45px; }
  .otd-programme img { width: 45px; height: 65px; }
  .otd-programme span { font-size: .5625rem; }
  .otd-layout h3 { font-size: 1rem; }
}
/* Keep the promoted menu item visible at intermediate tablet widths. */
.nav-inner { flex-wrap: wrap; }

/* Shared sponsors and archive identity. */
.archive-footer { margin-top: 24px; border-top: 4px solid var(--gold); background: #000; color: #eee; }
.footer-inner { max-width: var(--page-width); margin: auto; padding: 22px; }
.archive-footer h2 { margin: 0 0 12px; font-size: .9375rem; font-weight: 700; }
.sponsor-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; }
.sponsor-grid a { display: flex; align-items: center; justify-content: center; height: 150px; padding: 8px; background: #000; border-radius: 3px; }
.sponsor-grid img { width: 100%; height: 100%; object-fit: contain; filter: grayscale(100%); transition: filter .2s; }
.sponsor-grid a:hover img, .sponsor-grid a:focus-visible img { filter: grayscale(0); }
.footer-bottom { display: grid; grid-template-columns: 200px minmax(0, 1fr) auto; align-items: center; gap: 24px; border-top: 1px solid #444; margin-top: 20px; padding-top: 20px; }
.footer-brand img { display: block; width: 100%; height: auto; max-height: 105px; object-fit: contain; }
.footer-bottom p { margin: 5px 0; font-size: .8125rem; color: #ddd; }
.footer-bottom nav { display: grid; gap: 6px; font-size: .8125rem; }
.footer-bottom a { color: #fff; }

/* The feature image stays beside its text through tablet widths. */
@media (min-width: 641px) {
  .otd-main .otd-feature-body { flex-wrap: nowrap; }
  .otd-main .otd-feature-body .otd-portrait { flex: 0 0 110px; width: 110px; }
}
@media (max-width: 640px) { .otd-main .otd-feature-body { flex-wrap: wrap; } }

/* Biography disclosure displays the first 100 words until expanded. */
.biography-disclosure summary { padding: 16px; list-style: none; cursor: pointer; font-size: .9375rem; }
.biography-disclosure summary::-webkit-details-marker { display: none; }
.biography-excerpt { display: block; margin-bottom: 10px; }
.biography-disclosure .read-more, .biography-disclosure .read-less { color: var(--link); text-decoration: underline; font-weight: 700; }
.biography-disclosure .read-less { display: none; }
.biography-disclosure[open] .biography-excerpt, .biography-disclosure[open] .read-more { display: none; }
.biography-disclosure[open] .read-less { display: inline; }
.biography-disclosure[open] .prose { padding-top: 0; }
.profile-filter { display: flex; flex-wrap: wrap; align-items: end; gap: 12px; }
.profile-filter > label { flex: 1 1 180px; }
.club-spell { border-left: 3px solid var(--gold); padding: 3px 0 4px 15px; margin-bottom: 24px; }
.club-spell:last-child { margin-bottom: 4px; }
.club-spell h3 { font-size: .875rem; margin: 0 0 8px; }
.club-spell p { margin: 8px 0 12px; }
.club-spell .spell-dates { font-size: .875rem; margin-top: 0; }
.goal-records td, .goal-records th { padding: 9px 10px; font-size: .8125rem; }
.goal-records td:last-child { white-space: nowrap; }

/* Programme/media columns and accessible shared dialog. */
.programme-cell { width: 48px; text-align: center; }
.programme-thumb { display: block; margin: auto; width: 28px; height: 38px; object-fit: contain; }
.programme-status { display: inline-block; min-width: 28px; color: #686868; font-weight: 700; }
.programme-placeholder { display: inline-grid; place-items: center; width: 28px; height: 38px; border: 1px solid #bbb; background: repeating-linear-gradient(0deg, #eee, #eee 4px, #fafafa 4px, #fafafa 8px); color: #666; }
.attendance-cell { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.highlights-cell { width: 44px; text-align: center; }
.youtube-link { display: inline-flex; min-width: 32px; min-height: 36px; align-items: center; justify-content: center; }
.youtube-link img { object-fit: contain; }
.youtube-fallback { display: inline-grid; place-items: center; width: 24px; height: 18px; border-radius: 4px; background: #c00; color: white; font-size: .7rem; }
.match-table-media td, .match-table-media th { padding: 8px; }
.archive-media-dialog { padding: 12px; border: 0; max-width: 94vw; max-height: 94vh; }
.archive-media-dialog::backdrop { background: #000d; }
.archive-media-dialog [data-media-body] { margin-top: 10px; }
.archive-media-dialog[data-kind=video] { width: 950px; }
.archive-media-dialog iframe { display: block; border: 0; width: 100%; aspect-ratio: 16/9; }
.archive-media-dialog img { display: block; max-width: 100%; max-height: 80vh; margin: auto; object-fit: contain; }

/* Manager appointments are a horizontal, newest-first sequence of contract cards. */
.manager-timeline-controls { display: flex; justify-content: space-between; align-items: end; gap: 16px; margin-bottom: 16px; }
.manager-timeline-controls > div { display: flex; gap: 8px; }
.manager-timeline-controls label { font-size: .8125rem; max-width: 360px; }
.manager-timeline-controls button { font-size: .8125rem; }
button:disabled { opacity: .4; cursor: default; }
.manager-timeline { display: flex; gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 8px 0 18px; position: relative; cursor: grab; scrollbar-color: var(--gold) #ddd; }
.manager-timeline.is-dragging { scroll-snap-type: none; cursor: grabbing; user-select: none; }
.manager-card { flex: 0 0 min(365px, 86vw); scroll-snap-align: start; border-top: 4px solid var(--gold); display: flex; flex-direction: column; }
.manager-card-date { padding: 10px 12px; display: flex; justify-content: space-between; font-size: .8125rem; background: #b5121b; color: white; }
.manager-card-date span { color: #fff; }
.manager-card-intro { display: flex; gap: 12px; padding: 14px 12px 6px; align-items: start; }
.manager-card h2 { font-size: 1.25rem; margin: 0 0 5px; line-height: 1.2; }
.manager-card h2 a { color: var(--ink); text-decoration: none; }
.manager-card-intro p { margin: 0; font-size: .75rem; color: var(--muted); }
.manager-photo { width: 82px; height: 108px; object-fit: contain; object-position: top; flex-shrink: 0; user-select: none; }
.manager-stats { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); padding: 12px; gap: 8px; margin: 0; }
.manager-stats dt { font-size: .6875rem; color: var(--muted); }
.manager-stats dd { font-size: 1.4rem; font-weight: 800; margin: 0; }
.manager-card .manager-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px 8px; }
.manager-card .manager-stats dd { font-size: 1.25rem; }
.manager-card-description { font-size: .8125rem; padding: 0 12px; margin: 0 0 12px; }
.manager-card-detail { padding: 10px 12px; font-size: .75rem; display: flex; justify-content: space-between; gap: 6px; background: #f5f5f5; margin-top: auto; }
.manager-profile-link { padding: 12px; display: block; font-size: .875rem; font-weight: 700; }
.manager-profile-link:hover { background: var(--hover); }
.manager-note { font-size: .75rem; color: var(--muted); padding: 10px 12px; margin: 0; }
.manager-profile-heading { display: flex; gap: 18px; align-items: center; padding: 16px; margin-bottom: 16px; border-top: 4px solid var(--gold); }
.manager-profile-heading p { font-size: .875rem; margin: 8px 0 0; }
.manager-profile-grid { display: grid; grid-template-columns: minmax(0, 1fr) 310px; gap: 16px; align-items: start; }
.manager-profile-main, .manager-profile-sidebar { display: grid; gap: 16px; min-width: 0; }
.manager-filter { display: flex; flex-wrap: wrap; align-items: end; gap: 12px; }
.manager-filter > label { flex: 1 1 200px; }
.manager-record-strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 0; padding: 12px; border-top: 1px solid var(--line); gap: 12px; }
.manager-record-strip dt { font-size: .75rem; color: var(--muted); }
.manager-record-strip dd { font-size: 1.3rem; font-weight: 700; margin: 0; }
.manager-breakdown th, .manager-breakdown td { font-size: .75rem; padding: 8px; }
.manager-breakdown { table-layout: fixed; min-width: 560px; }
.manager-label-column { width: 30%; }
.manager-number-column { width: 10%; }
.manager-breakdown td, .manager-breakdown thead th:not(:first-child) { text-align: right; }
.manager-breakdown th:first-child { min-width: 100px; }
.manager-spell { padding: 14px; border-bottom: 1px solid var(--line); }
.manager-spell h3 { font-size: .875rem; margin: 0 0 8px; }
.manager-spell p { font-size: .8125rem; margin: 8px 0; }
.manager-spell small { color: var(--muted); font-size: .75rem; }
.manager-key-matches, .manager-leaders { list-style: none; margin: 0; padding: 0; }
.manager-key-matches li, .manager-leaders li { padding: 10px 12px; border-bottom: 1px solid var(--line); font-size: .8125rem; }
.manager-key-matches strong { display: block; margin-bottom: 4px; }
.manager-key-matches li:hover, .manager-leaders li:hover { background: var(--hover); }
.manager-leaders li { display: flex; justify-content: space-between; gap: 10px; }
@media (max-width: 1050px) {
  .manager-profile-grid { grid-template-columns: minmax(0, 1fr); }
  .manager-profile-sidebar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-bottom { grid-template-columns: 160px minmax(0, 1fr); }
  .footer-bottom nav { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 16px; }
  .sponsor-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (min-width: 641px) and (max-width: 900px) {
  .match-table-media td, .match-table-media th { padding: 7px 5px; font-size: .75rem; }
  .match-table-media .score { padding: 3px 5px; }
  .match-table-media .score-cell { min-width: 58px; }
  .match-table-media .competition-cell { max-width: 115px; }
}
@media (max-width: 640px) {
  .sponsor-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .sponsor-grid a { height: 120px; }
  .footer-inner { padding: 18px 12px; }
  .footer-bottom { grid-template-columns: 1fr; gap: 12px; }
  .footer-brand { max-width: 200px; }
  .match-table-media .attendance-cell { display: none; }
  .match-table-media .programme-cell { grid-column: 1; grid-row: 3; width: auto; text-align: left; }
  .match-table-media .programme-thumb { width: 24px; height: 32px; margin: 0; }
  .match-table-media .programme-placeholder { width: 24px; height: 32px; }
  .match-table-media .highlights-cell { grid-column: 2; grid-row: 3; width: auto; }
  .match-table-media td.score-cell { grid-column: 2; grid-row: 2; }
  .match-table td.away-team { grid-column: 3; grid-row: 2; overflow-wrap: anywhere; }
  .manager-timeline-controls { flex-wrap: wrap; }
  .manager-timeline-controls label { max-width: none; width: 100%; }
  .manager-profile-sidebar { grid-template-columns: minmax(0, 1fr); }
  .manager-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .manager-record-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .goal-records th:nth-child(4), .goal-records td:nth-child(4) { display: none; }
  .goal-records td, .goal-records th { padding: 8px 6px; font-size: .75rem; }
}
@media (hover: none) { .sponsor-grid img { filter: none; } }
@media (prefers-reduced-motion: reduce) { .sponsor-grid img { transition: none; } }
@media print { .archive-footer, .manager-timeline-controls { display: none; } .manager-timeline { display: block; overflow: visible; } .manager-card { break-inside: avoid; margin-bottom: 12px; } }
.match-date-long { display: none; }
.match-report-credit { padding: 0 16px 12px; margin: 0; }
.scorers > div > div > span { white-space: nowrap; }
@media (min-width: 1101px) {
  .match-date-short { display: none; }
  .match-date-long { display: inline; }
}

.match-table-media .programme-cell { width: 42px; padding: 4px; }
.match-table-media .programme-cell img { width: 26px; height: 36px; object-fit: contain; }
/* Let the licence use the card width, while the photograph stays beside the achievement. */
.otd-main .otd-milestone .otd-feature-body { display: grid; grid-template-columns: 95px minmax(0, 1fr); gap: 12px; }
.otd-milestone .otd-feature-body > .otd-portrait { display: contents; }
.otd-milestone .otd-portrait img { grid-column: 1; grid-row: 1; width: 95px; max-height: 145px; }
.otd-milestone .otd-feature-body > div { grid-column: 2; grid-row: 1; min-width: 0; }
.otd-milestone .otd-portrait figcaption { grid-column: 1 / -1; grid-row: 2; font-size: .75rem; line-height: 1.4; }
.otd-milestone .otd-feature-body:not(:has(.otd-portrait)) { grid-template-columns: 1fr; }
.otd-milestone .otd-feature-body:not(:has(.otd-portrait)) > div { grid-column: 1; }
.kit-gallery { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.kit-card { background: #fff; border: 1px solid var(--line); border-top: 3px solid var(--gold); }
.kit-card > a { display: block; height: 100%; color: var(--ink); text-decoration: none; }
.kit-card > a:hover, .kit-card > a:focus-visible { background: var(--hover); }
.kit-artwork { height: 230px; display: flex; align-items: center; justify-content: center; padding: 14px; }
.kit-artwork img { width: 100%; height: 100%; object-fit: contain; }
.kit-card-copy { border-top: 1px solid var(--line); padding: 12px; }
.kit-card-copy h2 { font-size: 1.1rem; margin: 0 0 4px; }
.kit-card-copy small { display: block; color: var(--muted); margin-top: 4px; }
.kit-profile { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.kit-main-artwork { margin: 0; padding: 24px; display: flex; justify-content: center; min-height: 300px; }
.kit-main-artwork img { max-width: 100%; max-height: 720px; object-fit: contain; }
.kit-profile-copy h1 { font-size: 1.6rem; }
.kit-profile-copy h1 span { display: block; font-size: 1rem; margin-top: 5px; }
.kit-launch { margin: 16px 0; }
.kit-launch img { display: block; width: 100%; height: auto; }
.kit-launch figcaption { padding: 10px; }
.kit-related { margin-top: 24px; }
.kit-image-missing { color: var(--muted); align-self: center; text-align: center; }
@media (max-width: 1000px) { .kit-gallery { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 640px) {
  .match-table-media .programme-cell { display: none; }
  .otd-main .otd-milestone .otd-feature-body { grid-template-columns: 74px minmax(0, 1fr); gap: 10px; }
  .otd-milestone .otd-portrait img { width: 74px; max-height: 112px; }
  .otd-milestone .otd-feature-body .otd-big-number { font-size: 1.25rem; margin-bottom: 6px; }
  .otd-milestone .otd-feature-body h3 { font-size: 1.05rem; }
  .kit-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .kit-artwork { height: 180px; padding: 10px; }
  .kit-card-copy { padding: 10px; }
  .kit-profile { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .kit-main-artwork img { max-height: 430px; }
}
/* Programme collection: large focus cover, compact browsing cards. */
.programme-focus { margin-bottom: 20px; border-top: 4px solid var(--gold); }
.programme-focus-body { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 24px; align-items: center; padding: 20px; }
.programme-cover-link { display: block; background: #f3f3f3; padding: 12px; }
.programme-cover-link img { display: block; width: 100%; height: 230px; object-fit: contain; }
.programme-cover-link:hover { background: var(--hover); }
.programme-focus .programme-cover-link img { height: 250px; }
.programme-focus h3 { font-size: 1.5rem; margin: 8px 0; }
.programme-focus-date { color: var(--link); font-weight: 700; margin: 0; }
.programme-feature-tag { display: inline-block; border-left: 3px solid var(--gold); padding-left: 8px; margin: 6px 12px 6px 0; }
.programme-gallery { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.programme-gallery-card > div { padding: 12px; }
.programme-gallery-card h2 { font-size: 1rem; margin: 0 0 6px; }
.programme-gallery-card p { font-size: .875rem; margin: 4px 0; }
.programme-gallery-card small { display: block; color: var(--muted); }
@media (max-width: 1000px) { .programme-gallery { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 640px) {
  .programme-focus-body { grid-template-columns: 105px minmax(0, 1fr); gap: 12px; padding: 12px; align-items: start; }
  .programme-focus .programme-cover-link { padding: 5px; }
  .programme-focus .programme-cover-link img { height: 155px; }
  .programme-focus h3 { font-size: 1.125rem; }
  .programme-focus-body p { font-size: .875rem; }
  .programme-focus .panel-heading { flex-wrap: wrap; gap: 8px; }
  .programme-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .programme-gallery .programme-cover-link img { height: 170px; }
  .programme-gallery-card > div { padding: 10px; }
}
/* Records: dense leaderboards with one strong numeric column. */
.records-filter { display: flex; gap: 12px; align-items: end; }
.records-filter label { flex: 0 1 300px; }
.records-jump { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 18px; }
.records-jump a { padding: 7px 12px; border: 1px solid var(--line); background: #fff; text-decoration: none; }
.records-jump a:hover { background: var(--hover); }
.record-totals { display: grid; grid-template-columns: repeat(4,1fr); background: #b5121b; border-top: 4px solid var(--gold); margin-bottom: 24px; }
.record-totals a { padding: 18px; color: #fff; text-decoration: none; border-right: 1px solid #444; }
.record-totals strong { display: block; color: #fff; font-size: 2rem; line-height: 1.1; }
.record-totals span { display: block; margin-top: 6px; font-size: .875rem; }
.record-category { scroll-margin-top: 20px; margin-bottom: 24px; }
.record-category > h2 { font-size: 1.4rem; margin: 0 0 10px; border-left: 5px solid var(--gold); padding-left: 10px; }
.record-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 14px; align-items: start; }
.record-panel .panel-heading { min-height: 58px; padding: 12px; }
.record-panel h3 { margin: 0; font-size: 1rem; }
.record-leaders { list-style: none; margin: 0; padding: 0; }
.record-leaders li { display: grid; grid-template-columns: 20px minmax(0,1fr) auto; gap: 9px; align-items: start; padding: 12px; border-top: 1px solid var(--line); }
.record-leaders li:hover { background: var(--hover); }
.record-leaders li:first-child > strong { color: var(--link); font-size: 1.4rem; }
.record-leaders a { font-size: .875rem; }
.record-leaders strong { font-variant-numeric: tabular-nums; text-align: right; font-size: 1.1rem; }
.record-leaders small { display: block; font-size: .75rem; font-weight: 400; line-height: 1.4; margin-top: 3px; color: var(--muted); }
.record-leaders small a { font-size: inherit; }
.record-rank { color: var(--muted); font-size: .75rem; padding-top: 3px; }
.record-empty { padding: 12px; color: var(--muted); }
.record-more summary, .record-definitions summary { padding: 12px; cursor: pointer; }
.record-definitions { margin-top: 20px; }
@media(max-width:1100px) { .record-grid { grid-template-columns: repeat(2,minmax(0,1fr)); } }
@media(max-width:640px) {
  .record-grid { grid-template-columns: minmax(0,1fr); gap: 10px; }
  .record-totals { grid-template-columns: repeat(2,1fr); }
  .record-totals a { padding: 14px; border-bottom: 1px solid #444; }
  .record-totals strong { font-size: 1.65rem; }
  .records-jump a { padding: 7px 9px; }
  .record-panel .panel-heading { min-height: 0; }
}
/* Shared player features retain full-width credits beneath photo and text. */
.record-holder-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; margin-bottom: 24px; }
.record-holder .panel-heading { flex-wrap: wrap; gap: 6px; }
.record-holder .panel-heading strong { color: var(--link); }
.feature-person { display: grid; grid-template-columns: 130px minmax(0,1fr); gap: 16px; padding: 16px; }
.feature-person > .otd-portrait { display: contents; }
.feature-person .otd-portrait img { grid-column: 1; grid-row: 1; width: 130px; height: auto; max-height: 210px; object-fit: contain; object-position: top; }
.feature-person .otd-portrait figcaption { grid-column: 1 / -1; grid-row: 2; font-size: .75rem; line-height: 1.45; border-top: 1px solid var(--line); padding-top: 8px; }
.feature-person-copy { grid-column: 2; grid-row: 1; min-width: 0; }
.feature-person-copy h3 { margin: 0 0 8px; font-size: 1.5rem; }
.feature-person-copy p { margin: 6px 0 12px; font-size: .9375rem; }
.feature-person:not(:has(.otd-portrait)) { grid-template-columns: 1fr; }
.feature-person:not(:has(.otd-portrait)) .feature-person-copy { grid-column: 1; }
.home-welcome { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 16px; }
.home-welcome h1 { font-size: 1.9rem; margin: 0 0 8px; }
.home-welcome p { margin: 0; }
.home-welcome > a { white-space: nowrap; }
.home-routes { display: grid; grid-template-columns: repeat(6,minmax(0,1fr)); gap: 8px; margin-bottom: 20px; }
.home-routes a { display: block; padding: 12px 8px; background: #b5121b; color: #fff; text-align: center; text-decoration: none; border-bottom: 3px solid var(--gold); font-weight: 700; }
.home-routes a:hover { background: #333; }
.home-features { display: grid; grid-template-columns: minmax(0,1.2fr) minmax(0,1fr); gap: 18px; margin-bottom: 18px; align-items: start; }
.home-features .panel { border-top: 4px solid var(--gold); }
.home-programme-body { display: grid; grid-template-columns: 150px minmax(0,1fr); gap: 16px; padding: 16px; }
.home-programme-body .programme-cover-link img { height: 220px; }
.home-programme-body h3 { margin: 8px 0; font-size: 1.4rem; }
.home-player-position { color: var(--muted); }
.home-history-row { display: grid; grid-template-columns: minmax(0,1.2fr) minmax(0,1fr); gap: 18px; margin-bottom: 18px; }
.home-records-invite { background: #b5121b; color: #fff; border-top: 4px solid var(--gold); padding: 22px; }
.home-records-invite h2 { margin: 0; font-size: 1.6rem; }
.home-records-invite a { color: #fff; }
.home-record-scopes { display: flex; gap: 20px; margin-top: 18px; }
.home-section-link { display: block; padding: 12px 16px; }
.home-empty { padding: 16px; }
.home-lower { display: grid; grid-template-columns: minmax(0,3fr) minmax(230px,1fr); gap: 18px; align-items: start; }
.home-collections { margin-top: 22px; }
.home-collections h2 { font-size: 1.3rem; }
.home-counts { margin-top: 20px; }
@media(max-width:1050px) {
  .home-features { grid-template-columns: minmax(0,1fr); }
  .home-lower { grid-template-columns: minmax(0,1fr); }
  .home-routes { grid-template-columns: repeat(3,minmax(0,1fr)); }
}
@media(max-width:640px) {
  .home-welcome { display: block; }
  .home-welcome h1 { font-size: 1.6rem; }
  .home-welcome > a { display: inline-block; margin-top: 10px; }
  .home-history-row, .record-holder-grid { grid-template-columns: minmax(0,1fr); }
  .feature-person { grid-template-columns: 85px minmax(0,1fr); padding: 12px; gap: 12px; }
  .feature-person .otd-portrait img { width: 85px; max-height: 140px; }
  .feature-person-copy h3 { font-size: 1.2rem; }
  .home-programme-body { grid-template-columns: 110px minmax(0,1fr); padding: 12px; gap: 12px; }
  .home-programme-body .programme-cover-link img { height: 165px; }
  .home-routes a { font-size: .875rem; }
}

/* Existing wide archive photographs, one per visit, with a readable overlay. */
.home-welcome { position: relative; isolation: isolate; overflow: hidden; min-height: 235px; display: flex; align-items: center; justify-content: space-between; padding: 30px; background: #b5121b; color: #fff; border-bottom: 4px solid var(--gold); }
.home-backdrop { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; object-position: center; }
.home-welcome::before { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg,rgba(0,0,0,.7),rgba(0,0,0,.52)); }
.home-welcome-copy { max-width: 630px; }
.home-welcome h1 { color: #fff; text-shadow: 0 1px 3px #000; }
.home-welcome p { max-width: 560px; line-height: 1.5; }
.home-welcome > a { color: #fff; background: rgba(0,0,0,.68); border: 1px solid rgba(255,255,255,.65); padding: 12px; text-decoration: none; }
.home-welcome > a:hover { color: #fff; border-color: #fff; }
@media(max-width:640px) {
  .home-welcome { display: block; min-height: 210px; padding: 22px 16px; }
  .home-welcome h1 { font-size: 1.65rem; }
  .home-welcome > a { margin-top: 16px; }
  .home-backdrop { object-position: 40% center; }
}

.season-detail-layout { display: grid; grid-template-columns: minmax(0,1.6fr) minmax(370px,1fr); gap: 18px; align-items: start; }
.season-detail-main, .season-detail-sidebar { display: grid; gap: 16px; min-width: 0; }
.season-note { padding: 10px 14px; margin: 0; font-size: .875rem; color: var(--muted); }
.season-honours { margin: 16px 0; border-top: 4px solid var(--gold); }
.season-squad { table-layout: fixed; }
.season-squad td, .season-squad th { padding: 9px; font-size: .8125rem; text-align: center; font-variant-numeric: tabular-nums; }
.season-squad tr > :first-child { width: 44%; text-align: left; overflow-wrap: anywhere; }
.season-squad tr > :nth-child(2) { width: 10%; }
.season-squad tr > :nth-child(3) { width: 19%; white-space: nowrap; }
.season-squad tr > :nth-child(n+4) { width: 9%; }
/* Keep standings columns consistent, including their headings. */
.season-league { min-width: 380px; table-layout: fixed; }
.season-league td, .season-league th { padding: 7px 5px; font-size: .75rem; text-align: center; font-variant-numeric: tabular-nums; }
.season-league tr > :first-child { width: 3rem; }
.season-league tr > :nth-child(2) { text-align: left; overflow-wrap: anywhere; }
.season-league tr > :nth-child(n+3) { width: 8%; }
.season-league .united-row > th { background: inherit; }
.season-league .split-boundary > * { border-top: 3px solid var(--ink); }
.season-manager { padding: 12px 14px; border-bottom: 1px solid var(--line); }
.season-manager h3 { margin: 0 0 6px; font-size: 1rem; }
.season-manager p { margin: 5px 0; font-size: .875rem; }
.season-milestone { padding: 10px 14px; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.season-programme .programme-cover-link { margin: 12px; }
.season-programme p { padding: 0 14px; }
.recent-edits small { display: block; color: var(--muted); margin-top: 4px; font-size: .75rem; }
@media(max-width:1100px) { .season-detail-layout { grid-template-columns: minmax(0,1fr); } .season-detail-sidebar { grid-template-columns: repeat(2,minmax(0,1fr)); } }
@media(max-width:640px) { .season-detail-sidebar { grid-template-columns: minmax(0,1fr); } .season-squad { min-width: 470px; } }

/* Opponent history: compact cards, with readable programme previews. */
.opponent-heading{display:flex;align-items:center;gap:1rem;padding:1rem}.opponent-heading>img{width:64px;height:72px;object-fit:contain}.opponent-heading h1,.opponent-heading p{margin:.2rem 0}
.opponent-directory{display:grid;grid-template-columns:repeat(3,minmax(0,1fr))}.opponent-directory>a{display:flex;align-items:center;gap:.7rem;padding:1rem;border-bottom:1px solid #ddd}.opponent-directory img{width:38px;height:44px;object-fit:contain}.opponent-directory small{display:block;color:#555;margin-top:.3rem}
.opponent-memorable{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:1px;background:#ddd}.opponent-memorable article{background:#fff;padding:1rem}.opponent-memorable h3{font-size:1.5rem;margin:.4rem 0}.opponent-memorable p{margin:0}
.opponent-programmes{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:1rem;padding:1rem}.opponent-programmes article{min-width:0}.opponent-programmes img{width:100%;height:180px;object-fit:contain}.opponent-programmes article>a:not(.programme-cover-link),.opponent-programmes small{display:block;margin-top:.35rem}
@media(max-width:850px){.opponent-directory{grid-template-columns:repeat(2,minmax(0,1fr))}.opponent-memorable{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:540px){.opponent-directory{grid-template-columns:1fr}.opponent-programmes{grid-template-columns:repeat(2,minmax(0,1fr))}.opponent-programmes img{height:150px}.opponent-heading h1{font-size:1.6rem}.opponent-memorable article{padding:.7rem}}

/* Homepage options share content. Only composition and backdrop treatment change. */
.workspace.workspace-full{max-width:none;padding:0}
.home-layout .home-welcome{margin:0;min-height:330px;padding:42px max(24px,calc((100% - 1360px)/2));align-items:flex-end;gap:24px}
.home-layout .home-welcome h1{font-size:clamp(1.8rem,3.7vw,3.4rem);line-height:1.08;max-width:720px;letter-spacing:-.035em}
.home-layout .home-welcome p{font-size:1rem;margin-top:14px}
.home-layout .home-welcome::before{background:linear-gradient(90deg,rgba(0,0,0,.82),rgba(0,0,0,.12)),linear-gradient(0deg,rgba(0,0,0,.65),transparent 85%)}
.home-layout .home-backdrop{object-position:center 45%}
.home-body{max-width:1408px;margin:auto;padding:20px 24px 28px}
.home-layout .home-routes{gap:0;border:1px solid #ccc;margin-bottom:20px}
.home-layout .home-routes a{background:#fff;color:#111;border-bottom:3px solid var(--gold);border-right:1px solid #ddd;padding:13px 8px}
.home-layout .home-routes a:hover{background:#fff1f1}
.home-layout .home-features{gap:20px;grid-template-columns:minmax(0,1.2fr) minmax(0,1fr);align-items:stretch}
.home-layout .home-features .panel{margin-bottom:0}
.home-layout .home-programme-body{grid-template-columns:minmax(100px,155px) minmax(0,1fr)}
.home-layout .home-lower{margin-bottom:20px}
.home-layout .recent-edits{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}
.home-layout .recent-edits li{min-width:0}
.home-layout .recent-edits a{display:grid;grid-template-columns:60px minmax(0,1fr);justify-content:start;gap:12px;align-items:start;height:100%;text-align:left}
.home-layout .recent-edits a>div{min-width:0;overflow-wrap:anywhere}
.home-layout .recent-edits a>div>strong,.home-layout .recent-edits a>div>span{display:block}
.home-layout .recent-edits a>div>span{margin-top:3px}
.home-layout .recent-edits .edit-kind{justify-self:start}
.home-layout .home-lower aside .record-list a{justify-content:flex-start;text-align:left}
.home-layout .home-lower aside .record-list strong{flex:0 0 80px}
@media(max-width:1100px){.home-layout .recent-edits{grid-template-columns:1fr}}
.home-layout .recent-edits strong{font-size:.94rem;line-height:1.4}
.home-layout .recent-edits small{font-size:.75rem}
.home-layout .edit-kind{display:inline-block;flex-shrink:0;font-size:.68rem;line-height:1.4;padding:3px 6px;border-radius:3px;margin-top:2px;font-weight:700;color:#202020}
.home-layout .edit-kind-player{background:#dae9f6}.home-layout .edit-kind-match{background:#f8e8bf}
.home-layout .home-counts a{text-decoration:none}
/* A quieter introduction beside an unobscured panoramic photograph. */
.home-layout-split .home-welcome{min-height:310px;display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);align-content:center;padding-right:52%;gap:16px;background:#111}
.home-layout-split .home-backdrop{left:48%;width:52%;object-position:center}
.home-layout-split .home-welcome::before{background:linear-gradient(90deg,#111 42%,transparent 65%)}
.home-layout-split .home-welcome-copy{grid-column:1 / -1}
.home-layout-split .home-welcome h1{font-size:clamp(1.8rem,3vw,2.75rem)}
.home-layout-split .home-welcome>a{grid-column:1 / -1;justify-self:start}
/* A shorter welcome puts the archive's latest edits in the first screen. */
.home-layout-compact .home-welcome{min-height:190px;align-items:center;padding-top:28px;padding-bottom:28px}
.home-layout-compact .home-welcome h1{font-size:clamp(1.8rem,2.7vw,2.6rem)}
.home-layout-compact .home-body{padding-top:14px}
.home-layout-compact .home-lower{grid-template-columns:minmax(0,3fr) minmax(190px,1fr)}
@media(min-width:1600px){.home-layout .home-welcome{min-height:370px}.home-layout-compact .home-welcome{min-height:210px}}
@media(max-width:1000px){.home-layout .home-features{grid-template-columns:1fr}.home-layout .home-lower{grid-template-columns:1fr}.home-layout .home-welcome{padding-left:20px;padding-right:20px}.home-layout-split .home-welcome{padding-right:50%}.home-layout .home-features .feature-person{grid-template-columns:155px minmax(0,1fr)}.home-layout .home-features .otd-portrait img{width:155px;max-height:220px}}
@media(max-width:640px){.home-body{padding:12px 10px 20px}.home-layout .home-welcome{display:block;min-height:255px;padding:24px 16px}.home-layout .home-welcome h1{font-size:2rem}.home-layout .home-welcome>a{display:inline-block;margin-top:18px;padding:9px 12px}.home-layout .home-welcome p{font-size:.9rem}.home-layout .home-routes a{font-size:.8rem;padding:10px 4px}.home-layout .recent-edits{grid-template-columns:1fr}.home-layout .home-features .feature-person{grid-template-columns:90px minmax(0,1fr);gap:12px}.home-layout .home-features .otd-portrait img{width:90px;max-height:150px}.home-layout .home-programme-body{grid-template-columns:100px minmax(0,1fr)}.home-layout-split .home-backdrop{left:0;width:100%;opacity:.45}.home-layout-split .home-welcome::before{background:linear-gradient(90deg,rgba(0,0,0,.8),rgba(0,0,0,.1))}.home-layout-compact .home-welcome{min-height:185px;padding:18px 16px}.home-layout-compact .home-welcome h1{font-size:1.7rem}}

/* Milestone links inherit no generic record-list spacing. */
.season-milestone-list{list-style:none;margin:0;padding:0}
.season-milestone-list .season-milestone{display:grid;grid-template-columns:minmax(0,1fr) minmax(150px,1fr) 110px;align-items:start;gap:8px 16px;text-align:left;border-bottom:1px solid var(--line)}
.season-milestone-list a{display:inline;padding:0;text-align:left;overflow-wrap:anywhere}
.season-milestone-list .season-milestone:hover{background:var(--hover)}
@media(max-width:640px){.season-milestone-list .season-milestone{grid-template-columns:minmax(0,1fr) auto}.season-milestone-list strong{grid-column:1;grid-row:2}.season-milestone-list a:last-child{grid-column:2;grid-row:1 / 3;font-size:.8rem}}
.kit-magnifier{max-width:100%;min-width:0;text-align:left}
.kit-zoom-surface{position:relative;max-width:100%;width:fit-content;margin:auto;line-height:0}
.kit-zoom-surface>img{display:block;max-width:100%;height:auto}
.kit-zoom-lens{position:absolute;left:0;top:0;width:150px;height:150px;border:2px solid #111;border-radius:50%;box-shadow:0 2px 12px #0005;pointer-events:none;background:white}
.kit-zoom-lens[hidden]{display:none}
.kit-zoom-surface.zoom-enabled{touch-action:none;cursor:crosshair}
.kit-zoom-toggle{margin-top:12px}
.kit-zoom-help{font-size:.8rem;color:var(--muted);line-height:1.5;max-width:480px}

.card-heading{height:18px;width:auto;max-width:18px;vertical-align:middle}
.player-tallies{padding:12px 14px;margin-bottom:14px}.player-tallies summary{font-weight:700;cursor:pointer}.player-tallies nav{display:flex;flex-wrap:wrap;gap:8px 20px;padding-top:12px}

/* Player tally pages: fixed columns for comparison, individual evidence underneath. */
.player-tallies h2{font-size:1rem;margin:0}.player-tallies a[aria-current]{font-weight:700;color:var(--ink);text-decoration-thickness:3px}
.tally-table{width:100%;border-collapse:collapse}.tally-table>thead th{text-align:right}.tally-table>thead th:first-child{text-align:left;min-width:170px}
.tally-table .tally-summary>td{text-align:right;font-variant-numeric:tabular-nums;font-weight:700}.tally-table .tally-summary>th{text-align:left}
.tally-summary th small{font-size:.75rem;font-weight:400}.tally-context>td{text-align:left;padding:0 14px 12px;border-bottom:2px solid var(--line)}
.tally-fact{margin:0 0 8px;font-size:.85rem}.tally-detail>summary{font-size:.85rem;cursor:pointer;color:var(--link)}
.tally-detail-grid{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.3fr);gap:20px;padding:14px 0}
.tally-detail-grid h3{font-size:1rem;margin:8px 0}.tally-facts{margin:0}.tally-facts>div{display:flex;justify-content:space-between;gap:16px;padding:6px 0;border-bottom:1px solid var(--line)}.tally-facts dt{font-size:.85rem}.tally-facts dd{margin:0;font-weight:700;font-variant-numeric:tabular-nums}
.tally-season-table th,.tally-season-table td{font-size:.8rem}.tally-match-list{padding-left:18px;font-size:.85rem}.tally-match-list li{margin-bottom:8px}
.tally-definitions{padding:14px;font-size:.8rem;line-height:1.6}.tally-definitions summary{cursor:pointer;font-weight:700}
@media(max-width:800px){.tally-detail-grid{grid-template-columns:1fr}.tally-table{min-width:590px}.tally-table th,.tally-table td{padding:9px}.tally-detail-grid>div{max-width:calc(100vw - 55px)}.tally-filters{grid-template-columns:repeat(2,minmax(0,1fr))}.player-tallies nav{gap:10px 16px}}

/* Keep tally controls compact at every screen size. */
.filter-panel.tally-filters{grid-template-columns:minmax(140px,1fr) minmax(120px,.85fr) minmax(160px,1.2fr) minmax(160px,1.2fr) minmax(135px,.8fr) auto;gap:12px;align-items:end}
.tally-filters>label,.tally-filters>.filter-actions{min-width:0;grid-column:auto}
.tally-filters input,.tally-filters select{width:100%;min-width:0}
.tally-filters>.filter-actions{min-height:42px;flex-wrap:wrap;gap:8px}
@media(max-width:1150px){.filter-panel.tally-filters{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:700px){.filter-panel.tally-filters{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.tally-filters>label:first-child{grid-column:auto}}
@media(max-width:360px){.filter-panel.tally-filters{grid-template-columns:minmax(0,1fr)}}

@media(min-width:1151px){.filter-panel.tally-filters-onegame{grid-template-columns:minmax(140px,1fr) minmax(120px,.85fr) minmax(160px,1.2fr) minmax(160px,1.2fr) auto}}

/* Compact controls across archive pages. */
form.filter-panel{display:flex;flex-wrap:wrap;align-items:flex-end;gap:12px}
form.filter-panel>label{flex:0 1 200px;min-width:150px;max-width:280px;grid-column:auto}
form.filter-panel>label:has(input[type=search]){flex-basis:240px}
form.filter-panel .filter-actions{flex:0 0 auto}
@media(max-width:640px){form.filter-panel>label{flex:1 1 calc(50% - 12px);min-width:0;max-width:none}form.filter-panel>label:has(input[type=search]){flex-basis:100%}}

/* European history. SVG countries remain native links without JavaScript. */
.europe-map-layout{display:grid;grid-template-columns:minmax(0,2fr) minmax(230px,1fr)}
.europe-map-wrap{background:#e5edf0;overflow:hidden;border-right:1px solid #ccd5d8}
.europe-map{display:block;width:100%;max-height:560px}
.map-country path{fill:#d0d7d9;stroke:#fff;stroke-width:1;vector-effect:non-scaling-stroke}
.map-country.visited path,.map-country.visited circle{fill:#b5121b}
/* Black denotes selection only. Hover and keyboard focus remain visually distinct. */
.map-country.visited:not(.selected):hover path,.map-country.visited:not(.selected):hover circle,
.map-country.visited:not(.selected):focus-visible path,.map-country.visited:not(.selected):focus-visible circle{fill:#ffd19a;stroke:#151515;stroke-width:2}
.map-country.selected path,.map-country.selected circle{fill:#151515;stroke:#b5121b;stroke-width:2}
.map-country:not(.visited){pointer-events:none}
.map-country:focus{outline:none}
.map-small-country{fill:#d0d7d9;stroke:#fff;stroke-width:1}
.map-home{fill:#fff;stroke:#111;stroke-width:2;pointer-events:none}
.map-label{font:700 13px sans-serif;fill:#111;paint-order:stroke;stroke:#fff;stroke-width:3px;pointer-events:none}
.europe-map-guide{padding:20px;display:flex;flex-direction:column;gap:12px;justify-content:center}
.europe-map-guide p,.europe-map-guide h3{margin:0}
.europe-map-guide small{margin-top:8px}
.europe-totals{display:grid;grid-template-columns:repeat(6,1fr);background:#151515;color:#fff;margin:14px 0}
.europe-totals>div{padding:14px;border-right:1px solid #444}
.europe-totals strong{display:block;font-size:1.65rem;color:#b5121b}
.europe-totals span{font-size:.9rem}
.europe-facts{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}
.europe-opponents{padding:16px;display:flex;flex-wrap:wrap;gap:8px 18px}
.europe-leaders{margin:0;padding:8px 16px;list-style:none}
.europe-leaders li{display:flex;justify-content:space-between;gap:14px;padding:8px 0;border-bottom:1px solid #eee}
.europe-memorable{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:14px;padding:16px}
.europe-memorable strong,.europe-memorable small,.europe-matches small{display:block}
.europe-memorable a{display:block;margin:7px 0}
.europe-programmes{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:16px;padding:16px}
.europe-programmes figure{margin:0;min-width:0}
.europe-programmes img{display:block;max-width:100%;height:180px;object-fit:contain;margin:auto}
.europe-programmes figcaption{font-size:.85rem;margin-top:8px;text-align:left}
.europe-campaign{display:flex;gap:20px;align-items:center;padding:14px 16px;background:#f2f2f2;border-top:3px solid #b5121b}
.europe-campaign h4{margin:0;font-size:1.2rem}
.europe-score{white-space:nowrap}
.europe-matches th,.europe-matches td{text-align:left}
#europe-results[aria-busy=true]{opacity:.6}
@media(max-width:900px){.europe-map-layout{grid-template-columns:1fr}.europe-map-guide{padding:14px;gap:8px}.europe-map-guide p{font-size:.9rem}.europe-map-wrap{border-right:0}.europe-facts{grid-template-columns:1fr 1fr}.europe-facts>section:first-child{grid-column:1/-1}.europe-programmes{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:560px){.europe-totals{grid-template-columns:repeat(3,1fr)}.europe-totals>div{padding:10px}.europe-facts{grid-template-columns:1fr}.europe-programmes{grid-template-columns:repeat(2,minmax(0,1fr))}.europe-programmes img{height:150px}.europe-campaign{align-items:flex-start;flex-direction:column;gap:4px}.europe-map-panel .panel-heading{align-items:flex-start;flex-direction:column;gap:5px}.europe-matches{min-width:650px}}
.crest-history{display:grid;gap:18px}.crest-entry{display:grid;grid-template-columns:minmax(150px,240px) minmax(0,1fr);margin:0;overflow:hidden}.crest-art{display:flex;align-items:center;justify-content:center;min-height:210px;padding:24px;background:#eee;border-right:1px solid #ddd}.crest-art img{display:block;width:auto;height:auto;max-width:100%;max-height:230px;object-fit:contain}.crest-story{padding:22px 26px;min-width:0;text-align:left}.crest-story h2{margin:0 0 12px}.crest-story p{max-width:78ch}.crest-year{font-weight:700;margin:0 0 6px;color:var(--link,#b5121b)}
@media(max-width:640px){.crest-entry{grid-template-columns:110px minmax(0,1fr)}.crest-art{min-height:140px;padding:14px;align-items:flex-start}.crest-art img{max-height:140px}.crest-story{padding:16px}.crest-story h2{font-size:1.15rem}}
@media(max-width:380px){.crest-entry{grid-template-columns:1fr}.crest-art{border-right:0;border-bottom:1px solid #ddd;min-height:0}.crest-art img{max-height:140px}}
form.filter-panel>label{order:2}form.filter-panel>label:has(select[name=season]){order:0}form.filter-panel>label:has(select[name=competition]),form.filter-panel>label:has(select[name=scope]){order:1}form.filter-panel>.filter-actions,form.filter-panel>button{order:4}

/* A quieter collection: compact scans, natural proportions and no featured banner. */
.ticket-image{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;padding:16px;background:#f2f2f2;min-height:180px}
.ticket-image img{display:block;width:auto;max-width:100%;height:auto;max-height:135px;object-fit:contain}
.ticket-image span{font-size:.8rem}
.ticket-image:hover,.ticket-image:focus-visible{background:#fff1f1}
@media(max-width:560px){.ticket-image{padding:10px;min-height:145px}.ticket-image img{max-height:105px}}

/* Original articles: compact discovery cards and a comfortable long-form reading width. */
.article-filters label:first-child{flex:2 1 20rem}
.article-count{margin:0 0 .7rem;color:#555}
.article-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:1rem;align-items:start}
.article-card{display:flex;gap:1rem;margin:0;padding:1rem;min-width:0}
.article-card-image{width:clamp(90px,10vw,145px);height:160px;object-fit:contain;object-position:top;flex:none}
.article-card-copy{min-width:0;flex:1;text-align:left}
.article-card time,.article-meta{font-size:.9rem;color:#555}
.article-card h2{font-size:1.25rem;line-height:1.3;margin:.3rem 0 .6rem}
.article-card p{margin:.5rem 0;line-height:1.5}
.article-read{display:inline-block;margin-top:.4rem}
.article-back{display:flex;justify-content:space-between;gap:1rem;flex-wrap:wrap;margin:0 0 1rem}
.archive-article{max-width:1120px;margin:0 auto 1rem;border-top:5px solid var(--accent,#b5121b)}
.article-header{padding:1.4rem 1.6rem 1rem;border-bottom:1px solid #ddd}
.article-kicker{color:#555;margin:0 0 .4rem;font-size:.9rem}
.article-header h1{font-size:clamp(1.7rem,3vw,2.6rem);line-height:1.15;margin:0 0 .8rem;max-width:30ch}
.article-meta{margin:0;line-height:1.5}
.article-layout{padding:1.5rem 1.6rem;display:grid;grid-template-columns:minmax(0,1fr);gap:1.5rem}
.article-layout.has-photo{grid-template-columns:minmax(0,1fr) minmax(150px,230px)}
.article-portrait{grid-column:2;grid-row:1;margin:0;min-width:0}
.article-portrait img{width:100%;height:auto;display:block}
.article-body{grid-column:1;grid-row:1;max-width:75ch;min-width:0;margin:0 auto;line-height:1.7;overflow-wrap:anywhere;text-align:left}
.article-body p{margin:0 0 1em}
.article-body img{max-width:100%;height:auto;display:block;margin:1rem auto}
.article-body figure{margin:1rem 0}
.article-body figcaption,.article-body small{font-size:.88em;color:#555;line-height:1.45}
.article-body blockquote{margin:1.2rem 0;padding:.3rem 1rem;border-left:3px solid var(--accent,#b5121b);background:#fafafa}
.article-body table{display:block;max-width:100%;overflow:auto}
.article-player{border-top:1px solid #ddd;padding:1rem 1.6rem;display:flex;gap:.8rem;flex-wrap:wrap}
.article-player span{color:#555}
@media(max-width:850px){.article-grid{grid-template-columns:1fr}.article-card-image{width:120px}.article-layout.has-photo{grid-template-columns:minmax(0,1fr) 160px}}
@media(max-width:600px){.article-header,.article-layout{padding:1rem}.article-layout.has-photo{grid-template-columns:minmax(0,1fr)}.article-portrait{grid-column:1;grid-row:1;max-width:240px;margin:0 auto}.article-body{grid-column:1;grid-row:auto}.article-card{gap:.8rem;padding:.8rem}.article-card-image{width:85px;height:115px}.article-card h2{font-size:1.12rem}.article-header h1{max-width:none}.article-player{padding:1rem}}

/* Programme editorial alongside the original cover. */
.programme-editorial{padding:16px}.programme-editorial summary{cursor:pointer;text-decoration:underline}
.programme-editorial-dialog{width:min(720px,90vw);max-height:85vh;overflow:auto;padding:24px;border:0;border-radius:8px}
.programme-editorial-dialog::backdrop{background:rgb(0 0 0 / .7)}
.programme-editorial-dialog>button{float:right}.programme-editorial-dialog .prose{clear:both}

.home-moment iframe{display:block;width:100%;aspect-ratio:16/9;border:0}.home-moment-caption{padding:16px}.home-moment-caption h3{margin:0 0 8px}.home-features:has(.home-moment){grid-template-columns:minmax(0,1.35fr) minmax(0,1fr)}.home-feature-stack{display:grid;gap:20px;min-width:0;align-content:start}.home-layout .home-features:has(.home-moment){align-items:start}.home-feature-stack .home-programme-body{grid-template-columns:110px minmax(0,1fr)}.home-feature-stack .home-programme-body p{margin-top:0;margin-bottom:10px}
.international-board{display:grid;gap:16px}.international-entry{padding:20px}.international-entry h2{margin-top:0}.international-entry .prose{max-width:80ch}.international-flag{width:24px;height:auto;vertical-align:middle;margin-right:8px}
@media(max-width:1000px){.home-layout .home-features:has(.home-moment){grid-template-columns:minmax(0,1fr)}.international-entry{padding:14px}}

.manager-portrait{margin:0;flex:0 0 120px;max-width:160px}.manager-portrait .manager-photo{display:block;width:100%;height:auto;object-fit:contain}.manager-portrait figcaption{font-size:.66rem;line-height:1.4;color:#555;margin-top:7px}.manager-portrait figcaption p{margin:5px 0 0}

/* Manager photographs: keep attribution below the whole heading. */
.manager-profile-heading {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: start;
    gap: 14px 20px;
}
.manager-profile-heading > .manager-portrait,
.manager-card-intro > .manager-portrait { display: contents; }
.manager-profile-heading .manager-portrait .manager-photo {
    grid-column: 1;
    grid-row: 1;
    width: 160px;
    max-width: 100%;
    height: auto;
    max-height: 230px;
    object-fit: contain;
    object-position: left top;
}
.manager-profile-heading > div { grid-column: 2; grid-row: 1; min-width: 0; }
.manager-profile-heading > div:only-child { grid-column: 1 / -1; }
.manager-profile-heading h1 { margin-top: 0; }
.manager-profile-heading .manager-portrait figcaption,
.manager-card-intro .manager-portrait figcaption {
    grid-column: 1 / -1;
    grid-row: 2;
    border-top: 1px solid #e2e2e2;
    padding-top: 8px;
    margin: 0;
    font-size: .7rem;
    line-height: 1.5;
    color: #555;
}
.manager-profile-heading .manager-portrait figcaption p,
.manager-card-intro .manager-portrait figcaption p {
    display: inline;
    margin: 0 0 0 .35em;
    font-size: inherit;
    line-height: inherit;
}
.manager-card-intro {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 10px 12px;
}
.manager-card-intro .manager-portrait .manager-photo {
    grid-column: 1;
    grid-row: 1;
    width: 82px;
    height: auto;
    max-height: 120px;
    object-fit: contain;
    object-position: left top;
}
.manager-card-intro > div { grid-column: 2; grid-row: 1; min-width: 0; }
.manager-card-intro > div:only-child { grid-column: 1 / -1; }
@media (max-width: 540px) {
    .manager-profile-heading { gap: 12px; padding: 12px; }
    .manager-profile-heading .manager-portrait .manager-photo { width: 96px; max-height: 145px; }
    .manager-profile-heading h1 { font-size: 1.5rem; }
}
@media (max-width: 360px) {
    .manager-profile-heading .manager-portrait .manager-photo { width: 72px; }
}

/* Appointment cards reserve the same heading space with or without a photograph. */
.manager-card .manager-card-intro {
    display: flex;
    align-items: flex-start;
    min-height: 128px;
    box-sizing: border-box;
    gap: 12px;
}
.manager-card .manager-card-intro > .manager-photo {
    width: 66px;
    height: 96px;
    flex: 0 0 66px;
    object-fit: contain;
    object-position: top left;
}
.manager-card .manager-card-intro > div { flex: 1; min-width: 0; }
.manager-card-credit {
    margin: 0 12px 12px;
    padding-top: 8px;
    border-top: 1px solid #e2e2e2;
    font-size: .6875rem;
    line-height: 1.45;
    color: #555;
}
.manager-card-credit p { display: inline; font-size: inherit; margin: 0 0 0 .3em; line-height: inherit; }

/* Social links stay at the right of the masthead; search gets its own row on smaller screens. */
.header-socials { display:flex; flex:0 0 auto; gap:4px; margin-left:auto; align-self:flex-start; }
.social-links a { display:inline-flex; align-items:center; justify-content:center; width:40px; height:40px; color:#fff; border-radius:4px; transition:background-color .15s,color .15s; }
.social-links svg { display:block; fill:currentColor; }
.social-links a:hover, .social-links a:focus-visible { background:var(--gold); color:#fff; }
.social-links a:focus-visible { outline:2px solid #fff; outline-offset:3px; }
@media(max-width:1000px) {
  .masthead-inner { flex-wrap:wrap; gap:14px; }
  .masthead-inner .global-search { order:3; flex-basis:100%; max-width:none; }
}
@media(max-width:420px) {
  .header-socials { width:100%; justify-content:flex-end; }
}
@media print { .header-socials { display:none; } }

/* Header and footer share the same icon buttons and interaction states. */
.footer-bottom .footer-socials { display:flex; flex-wrap:wrap; gap:4px; justify-content:flex-end; }
@media(max-width:900px) { .footer-bottom .footer-socials { justify-content:flex-start; } }
@media print { .footer-socials { display:none !important; } }

/* Formartine United Archive: one club theme across all historical dates. */
body.era-modern { --gold:#b5121b; --accent:#b5121b; --link:#b5121b; --hover:#fff1f1; }
.social-links a.trust-link { width:auto; padding:0 9px; font-size:.78rem; white-space:nowrap; }
.footer-bottom > p { margin:0; color:#fff; }
.footer-bottom > p a { color:#fff; }


.home-welcome-copy { max-width:850px; }
.home-welcome-copy p { max-width:78ch; }
.match-photograph { margin:0 0 18px; }
.match-photograph img { display:block; width:100%; height:auto; }
.match-photograph figcaption { margin-top:8px; font-size:.8rem; color:var(--muted); }

.home-match-photo { margin:0; }
.home-match-photo > img { display:block; width:100%; height:auto; max-height:410px; object-fit:contain; background:#eee; }
.home-match-photo figcaption { padding:8px 14px; color:var(--muted); font-size:.75rem; }
.home-match-photo figcaption p { margin:4px 0 0; }
.home-collections .collection-links { grid-template-columns:repeat(3,minmax(0,1fr)); }
@media(max-width:420px) { .home-collections .collection-links { grid-template-columns:1fr; } }

/* Circular Trust badge sits alongside the header social buttons. */
.header-socials { align-items:center; align-self:center; }
.social-links a.trust-logo { width:40px; height:40px; flex:0 0 40px; padding:4px; margin:0; border-radius:50%; }
.trust-logo img { display:block; width:32px; height:32px; object-fit:contain; border-radius:50%; }


/* One footer row: main sponsor, archive credit, then social links. */
.formartine-footer-row { display:flex; flex-wrap:nowrap; align-items:center; gap:clamp(8px,2vw,24px); padding-top:18px; padding-bottom:18px; }
.footer-sponsor-link { display:block; flex:0 1 260px; min-width:80px; }
.footer-sponsor-link img { display:block; width:100%; height:auto; object-fit:contain; background:transparent; border-radius:0; }
.formartine-footer-row .footer-copy { flex:1 1 auto; min-width:0; margin:0; font-size:.8125rem; color:#fff; }
.footer-copy a { color:#fff; }
.formartine-footer-row .footer-socials { display:flex; flex:0 0 auto; flex-wrap:nowrap; align-items:center; gap:4px; margin:0; }
@media(max-width:600px) {
  .footer-sponsor-link { flex:0 0 80px; }
  .formartine-footer-row .footer-copy { font-size:.6875rem; }
  .formartine-footer-row .footer-socials { gap:0; }
  .formartine-footer-row .footer-socials a { width:28px; height:32px; flex:0 0 28px; }
  .formartine-footer-row .footer-socials a.trust-logo { padding:2px; }
  .formartine-footer-row .footer-socials .trust-logo img { width:24px; height:24px; }
  .formartine-footer-row .footer-socials svg { width:18px; height:18px; }
}
