/* Soccer Archive — public styles
   Palette: kit green, floodlight gold, cool pitch-side grey. Type: Barlow Condensed for
   names and numbers (reads like shirt lettering), Source Sans 3 for everything else. */
:root {
  --bg: #eef1ef;
  --surface: #ffffff;
  --ink: #17211d;
  --muted: #5c6a64;
  --line: #d9e0dc;
  --green: #0b4a3b;
  --green-2: #11694f;
  --gold: #d99a1e;
  --win: #1f7a4d;
  --draw: #8a8f8c;
  --loss: #b3412f;
  --radius: 10px;
  --display: "Barlow Condensed", "Arial Narrow", Arial, sans-serif;
  --body: "Source Sans 3", "Segoe UI", Arial, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 17px/1.5 var(--body); }
a { color: var(--green-2); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
a:focus-visible, input:focus-visible, button:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
img { max-width: 100%; }
h1, h2, h3 { font-family: var(--display); font-weight: 700; line-height: 1.1; margin: 0 0 .5rem; letter-spacing: .01em; }
h1 { font-size: clamp(2rem, 5vw, 3rem); }
h2 { font-size: 1.6rem; }
h3 { font-size: 1.25rem; }
p { margin: 0 0 .75rem; }
.muted { color: var(--muted); }
.small { font-size: .9rem; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 1rem; }

/* Header */
.site-header { background: var(--green); color: #fff; border-bottom: 4px solid var(--gold); }
.header-row { display: flex; align-items: center; gap: 1rem; min-height: 64px; flex-wrap: wrap; padding-top: .5rem; padding-bottom: .5rem; }
.brand { color: #fff; font-family: var(--display); font-size: 1.6rem; font-weight: 700; letter-spacing: .02em; }
.brand:hover { text-decoration: none; }
.header-search { margin-left: auto; flex: 1 1 260px; max-width: 420px; }
.header-search input { width: 100%; padding: .55rem .8rem; border-radius: 999px; border: 0; font: inherit; font-size: .95rem; }

.main { padding-top: 1.5rem; padding-bottom: 3rem; }
.site-footer { border-top: 1px solid var(--line); padding: 1.5rem 0 2.5rem; font-size: .9rem; color: var(--muted); }

/* Layout */
.grid { display: grid; gap: 1.25rem; }
.grid-2 { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
@media (max-width: 860px) { .grid-2 { grid-template-columns: 1fr; } }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem 1.2rem; margin-bottom: 1.25rem; }
.panel > h2:first-child { margin-top: 0; }
.panel-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; }

/* Profile header */
.profile { display: grid; grid-template-columns: auto 1fr; gap: 1.25rem; align-items: center; margin-bottom: 1.25rem; }
.profile-photo { width: 120px; height: 120px; border-radius: 50%; object-fit: cover; background: var(--line); border: 3px solid var(--surface); box-shadow: 0 0 0 1px var(--line); }
.profile-crest { width: 110px; height: 110px; object-fit: contain; }
.profile-photo.empty, .profile-crest.empty { display: grid; place-items: center; font-family: var(--display); font-size: 2.6rem; color: var(--muted); }
.profile h1 { margin-bottom: .2rem; }
.profile .sub { color: var(--muted); font-size: 1.05rem; }
@media (max-width: 560px) { .profile { grid-template-columns: 1fr; } .profile-photo, .profile-crest { width: 88px; height: 88px; } }

/* The shirt-number stat strip */
.stat-strip { display: flex; flex-wrap: wrap; gap: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 1.25rem; overflow: hidden; }
.stat { flex: 1 1 120px; padding: .9rem 1rem; border-right: 1px solid var(--line); }
.stat:last-child { border-right: 0; }
.stat .num { display: block; font-family: var(--display); font-weight: 700; font-size: 2.4rem; line-height: 1; font-variant-numeric: tabular-nums; }
.stat .lbl { color: var(--muted); font-size: .9rem; }
.stat.intl .num { color: var(--green); }

/* Facts list */
.facts { display: grid; grid-template-columns: max-content 1fr; gap: .35rem 1rem; margin: 0; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; }

/* Tables */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
th, td { padding: .5rem .5rem; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
th { font-size: .85rem; color: var(--muted); font-weight: 600; }
tr:last-child td { border-bottom: 0; }
td.num, th.num { text-align: right; white-space: nowrap; }
tfoot td { font-weight: 700; border-top: 2px solid var(--line); }
.group-row td { background: #f6f8f7; font-weight: 600; font-size: .9rem; color: var(--muted); }

/* Teams, crests, badges */
.crest { width: 20px; height: 20px; object-fit: contain; vertical-align: middle; }
.crest-empty { display: inline-block; border-radius: 50%; background: var(--line); vertical-align: middle; }
.team-link { color: var(--ink); display: inline-flex; align-items: center; gap: .4rem; }
.badge { display: inline-block; font-size: .75rem; font-weight: 700; padding: .1rem .45rem; border-radius: 4px; background: var(--bg); color: var(--muted); vertical-align: middle; }
.badge.loan { background: #e3f0fb; color: #1d5b8f; }
.badge.current { background: #e2f3ea; color: var(--win); }
.shirt { display: inline-block; min-width: 2rem; font-family: var(--display); font-weight: 700; font-size: 1.15rem; color: var(--muted); }

/* Matches */
.match-row td { padding-top: .6rem; padding-bottom: .6rem; }
.match-row .home { text-align: right; }
.score { display: inline-block; min-width: 3.4rem; text-align: center; font-family: var(--display); font-weight: 700; font-size: 1.15rem; color: var(--ink); background: var(--bg); border-radius: 6px; padding: .05rem .4rem; }
.score-pending { font-weight: 600; color: var(--muted); font-size: 1rem; }
.res { display: inline-grid; place-items: center; width: 1.5rem; height: 1.5rem; border-radius: 4px; color: #fff; font-weight: 700; font-size: .8rem; }
.res-W { background: var(--win); } .res-D { background: var(--draw); } .res-L { background: var(--loss); }

/* Squad */
.squad-group { margin-bottom: 1rem; }
.squad-group h3 { color: var(--muted); font-size: 1.05rem; border-bottom: 2px solid var(--gold); display: inline-block; padding-bottom: .1rem; }
.squad-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: .15rem 1rem; }
.squad-list li { display: flex; align-items: center; gap: .5rem; padding: .3rem 0; border-bottom: 1px solid var(--line); }

/* Search */
.search-big { display: flex; gap: .5rem; margin-bottom: 1.25rem; }
.search-big input { flex: 1; padding: .75rem 1rem; font: inherit; border: 1px solid var(--line); border-radius: var(--radius); }
.search-big button, .btn { padding: .7rem 1.2rem; font: inherit; font-weight: 600; border: 0; border-radius: var(--radius); background: var(--green); color: #fff; cursor: pointer; }
.result-list { list-style: none; margin: 0; padding: 0; }
.result-list li { display: flex; align-items: center; gap: .75rem; padding: .55rem 0; border-bottom: 1px solid var(--line); }
.result-list li:last-child { border-bottom: 0; }
.thumb { display: inline-block; width: 36px; height: 36px; border-radius: 50%; object-fit: cover; background: var(--line); flex: none; }

/* Home */
.hero { padding: 1.5rem 0 1rem; }
.hero h1 { max-width: 20ch; }
.hero p { color: var(--muted); max-width: 60ch; }

.empty { color: var(--muted); font-style: italic; }

/* ---- Competition ---- */
.season-switch { margin-top: .5rem; display: flex; gap: .5rem; align-items: center; }
.season-switch select { font: inherit; padding: .3rem .5rem; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); }
.champion-bar { display: flex; align-items: center; gap: .9rem; flex-wrap: wrap; background: var(--surface); border: 1px solid var(--line); border-left: 6px solid var(--gold); border-radius: var(--radius); padding: .8rem 1rem; margin-bottom: 1.25rem; }
.champion-name { font-family: var(--display); font-size: 1.5rem; font-weight: 700; }
.champion-name a { color: var(--ink); }
.standings td, .standings th { padding: .4rem .35rem; }
.standings .form .res { width: 1.2rem; height: 1.2rem; font-size: .7rem; margin-right: 2px; }
.zone-champion td:first-child { box-shadow: inset 4px 0 0 var(--gold); }
.zone-promoted td:first-child { box-shadow: inset 4px 0 0 var(--win); }
.zone-playoff td:first-child  { box-shadow: inset 4px 0 0 #6b8fb3; }
.zone-relegated td:first-child { box-shadow: inset 4px 0 0 var(--loss); }
.legend .key { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin: 0 .25rem 0 .6rem; vertical-align: middle; }
.legend .key.zone-champion { background: var(--gold); } .legend .key.zone-promoted { background: var(--win); }
.legend .key.zone-playoff { background: #6b8fb3; } .legend .key.zone-relegated { background: var(--loss); }
@media (max-width: 560px) { .hide-sm { display: none; } }
details.round { border-bottom: 1px solid var(--line); padding: .35rem 0; }
details.round:last-child { border-bottom: 0; }
details.round summary { cursor: pointer; font-weight: 600; padding: .35rem 0; }

/* ---- Match ---- */
.crumbs a { color: var(--muted); }
.scoreboard { display: grid; grid-template-columns: 1fr auto 1fr; gap: 1rem; align-items: start; background: var(--surface);
  border: 1px solid var(--line); border-top: 5px solid var(--green); border-radius: var(--radius); padding: 1.5rem 1rem; margin-bottom: 1.25rem; text-align: center; }
.sb-crest { width: 72px; height: 72px; object-fit: contain; display: block; margin: 0 auto .4rem; }
.sb-crest.crest-empty { display: block; margin: 0 auto .4rem; }
.sb-name { font-family: var(--display); font-size: 1.5rem; font-weight: 700; color: var(--ink); line-height: 1.1; display: block; }
.sb-mid { padding-top: .6rem; min-width: 9rem; }
.sb-score { font-family: var(--display); font-weight: 700; font-size: 3.6rem; line-height: 1; font-variant-numeric: tabular-nums; }
.sb-score span { color: var(--muted); margin: 0 .2rem; }
.sb-score.sb-small { font-size: 2rem; color: var(--muted); }
.sb-note { font-weight: 600; margin-top: .3rem; }
.sb-scorers { list-style: none; padding: 0; margin: .6rem 0 0; font-size: .9rem; }
.badge.live { background: var(--loss); color: #fff; }
@media (max-width: 560px) {
  .scoreboard { grid-template-columns: 1fr auto 1fr; padding: 1rem .5rem; gap: .5rem; }
  .sb-crest { width: 48px; height: 48px; } .sb-name { font-size: 1.1rem; } .sb-score { font-size: 2.6rem; } .sb-mid { min-width: 6rem; }
}
.lineups { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
@media (max-width: 560px) { .lineups { grid-template-columns: 1fr; } }
.lineup { list-style: none; padding: 0; margin: 0 0 .75rem; }
.lineup li { display: flex; align-items: center; gap: .4rem; padding: .3rem 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.lineup .marks { margin-left: auto; font-size: .85rem; display: inline-flex; gap: .3rem; }
.lineup .on { color: var(--win); } .lineup .off { color: var(--loss); } .lineup .og { filter: grayscale(1); }
.timeline { list-style: none; padding: 0; margin: 0; }
.timeline li { display: grid; grid-template-columns: 3.5rem 3.5rem 1fr; align-items: center; padding: .4rem 0; border-bottom: 1px solid var(--line); }
.timeline li:last-child { border-bottom: 0; }
.timeline .tl-min { font-family: var(--display); font-weight: 700; color: var(--muted); }
.timeline li.tl-home .tl-min { color: var(--green); }

/* ---- Match lists: fixed columns so scores line up across groups ---- */
.match-table { table-layout: fixed; }
.match-table .col-score { width: 6rem; }
.match-table td.center { text-align: center; }
.match-table .team-link span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.match-table td.home .team-link { flex-direction: row-reverse; }
.comp-row td { padding-top: .55rem; padding-bottom: .4rem; font-size: .9rem; font-weight: 600; border-bottom: 1px solid var(--line); }
.comp-row a { color: var(--ink); display: inline-flex; align-items: center; gap: .4rem; }
.group-row + .comp-row td { border-top: 0; }

/* ---- Breadcrumbs ---- */
.breadcrumbs ol { list-style: none; margin: 0 0 1rem; padding: 0; display: flex; flex-wrap: wrap; gap: .25rem; color: var(--muted); }
.breadcrumbs li + li::before { content: "›"; margin-right: .35rem; color: var(--line); }
.breadcrumbs a { color: var(--muted); }