/* Season overview */
.season-counts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  list-style: none;
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
}
.season-counts li {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding-inline: clamp(12px, 3vw, 42px);
}
.season-counts li:first-child {padding-left: 0}
.season-counts li + li {border-left: 1px solid var(--border)}
.season-counts strong {
  color: var(--navy);
  font: 700 clamp(26px, 3vw, 38px)/1.1 Georgia, var(--serif);
  font-variant-numeric: lining-nums tabular-nums;
}
.season-counts span, .sync-info {font-size: 13px; color: var(--muted)}
.sync-info {margin-top: 14px; line-height: 1.7; overflow-wrap: anywhere}
.archive-about {
  margin-top: 36px;
  padding: 20px 0;
  border-block: 1px solid var(--border);
}
.archive-about h2 {font: 700 22px/1.4 var(--serif)}
.archive-about p {max-width: 55em; margin-top: 6px; color: var(--muted)}
.archive-grid + .minor-grid:has(a:nth-child(3)) {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

/* Team sheet and match formations */
.squad-layout, .wall-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: start;
  gap: clamp(24px, 4vw, 64px);
  margin-top: 24px;
}
.squad-layout h2, .wall-layout h2, .offline-wall h2 {
  font: 700 clamp(22px, 2.4vw, 30px)/1.35 var(--serif);
}
.squad-layout section {min-width: 0}
.squad-layout h2 small {
  margin-left: 5px;
  font: 500 13px/1.5 var(--sans);
  color: var(--muted);
}
.lineup-select, .controls label:has(#squad-year) {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  color: var(--muted);
  font-size: 13px;
}
.lineup-select {margin: 14px 0}
.lineup-select select, #squad-year {
  min-width: 0;
  max-width: 100%;
  min-height: 38px;
  border: 1px solid var(--border);
  border-radius: 2px;
  padding: 5px 10px;
  background: white;
  color: var(--navy);
}
.lineup-info {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 2px 10px;
  padding: 10px 0;
  border-top: 1px solid var(--border);
}
.lineup-info b {color: var(--muted); font-size: 12px; font-weight: 500}
.lineup-info p {font-weight: 650; color: var(--navy)}
.lineup-field {
  --pitch-line: #7491a8;
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-rows: repeat(4, 1fr);
  gap: 4px;
  min-height: clamp(316px, 33vw, 440px);
  padding: 17px 8px;
  background-color: #173c58;
  background-image:
    linear-gradient(var(--pitch-line), var(--pitch-line)),
    radial-gradient(circle at center, transparent 0 30px, var(--pitch-line) 30px 31px, transparent 31px),
    repeating-linear-gradient(0deg, transparent 0 12.5%, #ffffff05 12.5% 25%);
  background-size: calc(100% - 14px) 1px, 100% 100%, 100% 100%;
  background-position: center;
  background-repeat: no-repeat;
}
.lineup-field::before, .lineup-field::after {
  content: "";
  position: absolute;
  z-index: -1;
  pointer-events: none;
}
.lineup-field::before {inset: 7px; border: 1px solid var(--pitch-line)}
.lineup-field::after {
  inset: 7px 30%;
  background:
    linear-gradient(var(--pitch-line), var(--pitch-line)) left top / 1px 9%,
    linear-gradient(var(--pitch-line), var(--pitch-line)) right top / 1px 9%,
    linear-gradient(var(--pitch-line), var(--pitch-line)) center 9% / 100% 1px,
    linear-gradient(var(--pitch-line), var(--pitch-line)) left bottom / 1px 9%,
    linear-gradient(var(--pitch-line), var(--pitch-line)) right bottom / 1px 9%,
    linear-gradient(var(--pitch-line), var(--pitch-line)) center 91% / 100% 1px;
  background-repeat: no-repeat;
}
.field-line {
  display: flex;
  align-items: center;
  justify-content: space-evenly;
  gap: 2px;
}
.field-line span {
  display: grid;
  justify-items: center;
  align-content: start;
  flex: 1 1 0;
  min-width: 0;
  max-width: 104px;
  text-align: center;
  color: white;
}
.field-line b {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 1px solid white;
  border-radius: 50%;
  background: white;
  color: var(--navy);
  font: 700 15px/1 Georgia, serif;
}
.field-line:last-child b {background: var(--purple); color: white}
.field-line em {
  max-width: 100%;
  min-height: 2.8em;
  margin-top: 3px;
  padding: 1px 3px;
  font: 500 12px/1.4 var(--sans);
  overflow-wrap: anywhere;
  text-shadow: 0 1px 2px #173c58;
}
.formation-caption, .formations, .squad-roster > p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.8;
}
.formation-caption, .formations {margin-top: 10px}
.formation-section .textlink {display: inline-block; margin-top: 5px; font-size: 13px}
.formations {padding-top: 10px; border-top: 1px solid var(--line)}
.squad-roster > p {margin: 5px 0 12px}
.squad-roster table {
  width: 100%;
  border-collapse: collapse;
  border-top: 2px solid var(--navy);
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}
.squad-roster th, .squad-roster td {
  padding: 8px 4px;
  text-align: right;
  border-bottom: 1px solid var(--line);
}
.squad-roster thead th {font-size: 12px; font-weight: 500; color: var(--muted)}
.squad-roster :is(th, td):nth-child(-n+3) {text-align: left}
.squad-roster tbody th {color: var(--navy); overflow-wrap: anywhere}

/* Supporters' photographic archive */
.tifo-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 30px;
  margin-top: 18px;
}
.tifo-grid article {min-width: 0; padding-bottom: 16px; border-bottom: 1px solid var(--border)}
.tifo-grid article:first-child {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
  gap: clamp(20px, 3vw, 46px);
  align-items: center;
}
.tifo-photo {
  display: block;
  width: 100%;
  padding: 0;
  background: var(--card);
  border: 0;
  cursor: zoom-in;
}
.tifo-photo img {width: 100%; height: clamp(200px, 26vw, 336px); object-fit: contain}
.tifo-grid article:first-child img {height: auto}
.tifo-grid article > div {padding-top: 12px}
.tifo-grid small {color: var(--purple); font-size: 12px; font-variant-numeric: tabular-nums}
.tifo-grid h2 {font: 700 clamp(22px, 2.5vw, 33px)/1.4 var(--serif); margin: 5px 0}
.tifo-grid p {max-width: 40em; color: #44505a; line-height: 1.85}
.tifo-grid .source-link {
  display: inline-block;
  margin-top: 8px;
  color: var(--navy);
  font-size: 12px;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Fan wall */
.wall-layout {grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr)}
.wall-form {padding: clamp(16px, 2.2vw, 30px); background: var(--card); border-top: 2px solid var(--navy)}
.wall-form label {display: block; margin-top: 14px; color: var(--navy); font-weight: 600}
.wall-form input, .wall-form textarea {
  display: block;
  width: 100%;
  min-width: 0;
  margin-top: 5px;
  padding: 9px 10px;
  border: 1px solid #b7c7d4;
  border-radius: 2px;
  background: white;
  color: var(--ink);
  font: 400 16px/1.55 var(--sans);
}
.wall-form textarea {resize: vertical}
.wall-form textarea:focus-visible {outline: 2px solid var(--purple); outline-offset: 3px}
.wall-form input[type=file] {padding: 6px; font-size: 13px}
.wall-form input::file-selector-button {
  margin-right: 8px;
  padding: 4px 9px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--navy);
  font: inherit;
  cursor: pointer;
}
.wall-form small, .wall-status, .wall-empty, .offline-wall p {color: var(--muted)}
.wall-form small {display: block; margin: 8px 0 14px; font-size: 12px}
.wall-preview {margin-top: 10px}
.wall-preview img {max-height: 175px; max-width: 100%; object-fit: contain}
.wall-preview button {border: 0; background: transparent; padding: 6px 0}
.wall-send, .wall-posts > button {
  min-height: 42px;
  padding: 8px 18px;
  border: 1px solid var(--navy);
  border-radius: 2px;
  background: var(--navy);
  color: white;
  font-weight: 600;
}
.wall-send:enabled:hover {background: var(--purple)}
.wall-send:disabled {border-color: #dce4ea; background: #dce4ea; color: #4d5e6d}
.wall-status {font-size: 13px; margin-top: 8px}
.wall-status:empty {margin: 0}
.wall-posts h2 {padding-bottom: 12px; border-bottom: 2px solid var(--navy)}
.wall-posts > button {margin-top: 14px; background: white; color: var(--navy)}
.wall-entry {padding-block: 16px; border-bottom: 1px solid var(--line)}
.wall-entry header {display: flex; align-items: baseline; flex-wrap: wrap; gap: 2px 12px}
.wall-entry b {color: var(--navy); overflow-wrap: anywhere}
.wall-entry time {font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums}
.wall-entry p {margin-top: 6px; white-space: pre-wrap; overflow-wrap: anywhere}
.wall-entry a {display: block; width: fit-content; max-width: 100%; margin-top: 10px}
.wall-entry img {max-height: 440px; object-fit: contain; object-position: left center}
.wall-empty {padding-block: 18px}
.offline-wall {max-width: 720px; padding: 20px; background: var(--card); border-left: 3px solid var(--purple)}
.offline-wall p {margin: 8px 0 12px}

@media (max-width: 760px) {
  .wall-layout, .squad-layout {grid-template-columns: minmax(0, 1fr); gap: 28px}
  .lineup-field {min-height: 350px}
  .tifo-grid {gap: 18px}
}
@media (max-width: 600px) {
  .page-head h1 {text-wrap: balance}
  .controls {flex-wrap: wrap; align-items: flex-end; gap: 6px 12px}
  .controls .tabs {flex-wrap: wrap; gap: 0 12px; font-size: 14px}
  .controls > label {margin-bottom: 5px}
  .tifo-grid, .tifo-grid article:first-child {display: block}
  .tifo-grid article + article {margin-top: 22px}
  .tifo-photo img {height: auto; max-height: 420px}
  .archive-grid + .minor-grid:has(a:nth-child(3)) {grid-template-columns: minmax(0, 1fr); gap: 12px}
}
@media (max-width: 420px) {
  .season-counts li {flex-direction: column; gap: 3px}
  .lineup-field {min-height: 322px; padding-inline: 8px}
  .squad-roster table {font-size: 13px}
  .squad-roster :is(th, td) {padding-inline: 2px}
}

/* Line up numerals across scores, ranks, seasons and the yearly totals. */
:root {--numerals: "Helvetica Neue", Arial, "PingFang SC", "Microsoft YaHei", sans-serif}
.season-counts strong, .pair-score, .league-table .rank, .score-row time,
.story-year, .chapter-year, .field-line b, .squad-roster td, .timeline a {
  font-family: var(--numerals); font-variant-numeric: lining-nums tabular-nums;
}
.season-counts strong, .pair-score {letter-spacing: -.025em}
.score-clock {display:block;color:var(--purple);font:600 10px/1.4 var(--numerals);white-space:normal}
.club-total {display:grid;grid-template-columns:minmax(190px,1fr) 2.4fr;gap:36px;margin:34px 0 0;padding:22px 26px;background:var(--card);border-left:3px solid var(--navy)}
.club-total h3 {color:var(--navy);font:700 20px/1.45 var(--serif);margin-bottom:5px}
.club-total p {line-height:1.7}
.club-total b {font:650 clamp(32px,4vw,48px)/1.35 var(--numerals);font-variant-numeric:tabular-nums;letter-spacing:-.045em;color:var(--navy)}
.club-total small,.club-total span {color:var(--muted)}
.club-total .source-box {margin:9px 0 0;padding:0;border:0}
.full-fixtures .club-name,.table-club span {min-width:0;overflow-wrap:anywhere}
.reading-modes a+a {margin-left:0}
@media(max-width:600px){.club-total{grid-template-columns:1fr;gap:15px;padding:16px}.season-counts li{min-width:0}.season-counts li span{white-space:normal}}
