/* ==========================================================================
   Fasotalents - site stylesheet
   Replaces: dsg-widgets wl/css/main.css (274 KB), dsg.css, gsa.css, gsa_main.css,
             17 page <style> blocks and ~660 inline style="" attributes.
   Structure: 1 tokens · 2 base · 3 layout · 4 header/nav · 5 components
              6 pages · 7 widget theme (server-side DSG widgets) · 8 utilities
   ========================================================================== */

/* 1. Tokens -------------------------------------------------------------- */
:root {
  --brand: #1c3476;                 /* overridden from DB (widget_clients.subheader) */
  --brand-ink: #fff;
  --accent: #ef2729;                /* Burkina red */
  --green: #009e49;                 /* Burkina green */
  --gold: #fcd116;                  /* star */
  --ink: #0f172a;
  --ink-2: #334155;
  --muted: #64748b;
  --bg: #f2f4f7;
  --surface: #fff;
  --surface-2: #f8fafc;
  --line: #e4e8ee;
  --live: #e11d48;
  --win: #16a34a; --draw: #94a3b8; --loss: #dc2626;

  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-display: "Barlow Condensed", "Inter", system-ui, sans-serif;

  --radius: 14px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px rgb(15 23 42 / .06), 0 8px 24px -12px rgb(15 23 42 / .18);
  --gap: clamp(12px, 2vw, 20px);
  --container: 1240px;
  --header-h: 72px;
}

/* 2. Base ----------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font: 400 15px/1.5 var(--font);
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  /* sticky footer: header / main / footer column that always fills the viewport */
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
}
img, svg { max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent); }
h1, h2, h3 { margin: 0; line-height: 1.15; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 70%, white); outline-offset: 2px; border-radius: 4px; }
[hidden] { display: none !important; }

.icon { width: 20px; height: 20px; flex: none; }
.icon--sm { width: 14px; height: 14px; }

/* 3. Layout --------------------------------------------------------------- */
.container { width: min(100% - 2 * var(--gap), var(--container)); margin-inline: auto; }
.site-main { flex: 1 0 auto; width: 100%; padding-block: var(--gap) calc(var(--gap) * 2); display: grid; gap: var(--gap); align-content: start; }
.site-header, .site-footer { flex-shrink: 0; }
.stack { display: grid; gap: var(--gap); align-content: start; min-width: 0; }
.cluster { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

.home-grid { display: grid; gap: var(--gap); grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: start; }
.news-layout, .layout-main-side { display: grid; gap: var(--gap); grid-template-columns: minmax(0, 2fr) minmax(300px, 1fr); align-items: start; }
@media (max-width: 1100px) { .home-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .home-grid > :last-child { grid-column: 1 / -1; } }
@media (max-width: 900px)  { .news-layout, .layout-main-side { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 720px)  { .home-grid { grid-template-columns: minmax(0, 1fr); } }

.page-head { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; }
.page-head__title { display: flex; align-items: center; gap: 12px; }
.page-head__logo { width: 50px; height: 50px; object-fit: contain; }
.page-title { font: 700 clamp(24px, 3.2vw, 34px)/1.1 var(--font-display); text-transform: uppercase; letter-spacing: .01em; }

/* 4. Header / navigation ------------------------------------------------- */
.skip-link { position: absolute; inset-inline-start: 8px; top: -60px; z-index: 100; padding: 8px 14px; background: var(--surface); border-radius: var(--radius-sm); box-shadow: var(--shadow); }
.skip-link:focus { top: 8px; }

.site-header {
  position: relative; z-index: 50;   /* not sticky: with team strip + nav it would cover ~180px */
  color: var(--brand-ink);
  background: linear-gradient(135deg, var(--brand), color-mix(in srgb, var(--brand) 70%, black));
  box-shadow: 0 6px 20px -12px rgb(0 0 0 / .5);
}
.site-header__bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: var(--header-h); }
.brand { display: flex; align-items: center; gap: 12px; color: inherit; }
.brand:hover { color: inherit; }
.brand__logo { width: 56px; height: 56px; object-fit: contain; filter: drop-shadow(0 2px 4px rgb(0 0 0 / .3)); }
.brand__text { display: grid; }
.brand__name { font: 700 26px/1 var(--font-display); text-transform: uppercase; letter-spacing: .02em; }
.brand__season { font-size: 13px; color: var(--gold); font-weight: 600; }
.site-header__actions { display: flex; align-items: center; gap: 10px; }
.powered img { height: 24px; width: auto; opacity: .85; }
.powered:hover img { opacity: 1; }
@media (max-width: 600px) { .powered { display: none; } .brand__logo { width: 44px; height: 44px; } .brand__name { font-size: 22px; } }

.icon-btn {
  display: inline-grid; place-items: center; width: 40px; height: 40px;
  border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--ink);
  transition: background .15s, color .15s, transform .15s;
}
.icon-btn:hover { color: var(--accent); transform: translateY(-1px); }
.site-header .icon-btn, .icon-btn--light { background: rgb(255 255 255 / .12); border-color: rgb(255 255 255 / .25); color: #fff; }
.site-header .icon-btn:hover, .icon-btn--light:hover { background: rgb(255 255 255 / .22); color: #fff; }
.icon-btn:disabled { opacity: .4; cursor: default; transform: none; }

.nav-toggle { display: none; }
.nav-toggle .icon--close { display: none; }
.nav-toggle[aria-expanded="true"] .icon--open { display: none; }
.nav-toggle[aria-expanded="true"] .icon--close { display: block; }

/* team strip */
.team-strip { position: relative; display: flex; align-items: center; gap: 4px; padding: 6px var(--gap); background: rgb(0 0 0 / .18); }
.team-strip__list { display: flex; gap: 6px; margin: 0 auto; padding: 0; list-style: none; overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: none; max-width: var(--container); }
.team-strip__list::-webkit-scrollbar { display: none; }
.team-strip__item { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 12px; scroll-snap-align: start; transition: background .15s, transform .15s; }
.team-strip__item:hover { background: rgb(255 255 255 / .14); transform: translateY(-2px); }
.team-strip__item img { width: 36px; height: 36px; object-fit: contain; }
.team-strip__btn { flex: none; display: grid; place-items: center; width: 32px; height: 32px; border: 0; border-radius: 999px; background: rgb(255 255 255 / .12); color: #fff; }
.team-strip__btn:hover { background: rgb(255 255 255 / .25); }

/* main nav */
.site-nav { background: rgb(0 0 0 / .28); }
.site-nav__list { display: flex; flex-wrap: wrap; gap: 2px; margin-block: 0; padding: 0; list-style: none; }
.site-nav__item { position: relative; }
.site-nav__link {
  display: flex; align-items: center; gap: 6px; padding: 12px 14px;
  border: 0; background: none; color: #fff; font-weight: 600; font-size: 14px; letter-spacing: .02em;
  border-bottom: 3px solid transparent; white-space: nowrap;
}
.site-nav__link:hover, .site-nav__link[aria-expanded="true"] { color: #fff; border-bottom-color: var(--gold); background: rgb(255 255 255 / .06); }
.subnav {
  position: absolute; inset-inline-start: 0; top: 100%; z-index: 60; min-width: 280px;
  margin: 0; padding: 8px; list-style: none; border-radius: 0 0 var(--radius) var(--radius);
  background: var(--surface); color: var(--ink); box-shadow: var(--shadow);
  opacity: 0; visibility: hidden; transform: translateY(-6px); transition: opacity .15s, transform .15s, visibility .15s;
}
.has-sub.is-open .subnav { opacity: 1; visibility: visible; transform: none; }
.subnav a { display: block; padding: 9px 12px; border-radius: var(--radius-sm); font-weight: 500; }
.subnav a:hover { background: var(--surface-2); color: var(--accent); }

@media (max-width: 960px) {
  .nav-toggle { display: inline-grid; }
  .site-nav { display: none; max-height: calc(100dvh - var(--header-h)); overflow-y: auto; }
  .site-nav.is-open { display: block; }
  .site-nav__list { flex-direction: column; padding-block: 8px; }
  .site-nav__link { width: 100%; justify-content: space-between; border-bottom: 0; border-inline-start: 3px solid transparent; }
  .subnav { position: static; display: none; opacity: 1; visibility: visible; transform: none; box-shadow: none; border-radius: var(--radius-sm); margin: 0 8px 8px; }
  .has-sub.is-open .subnav { display: block; }
}

/* footer */
.site-footer { margin-top: auto; color: #e2e8f0; background: color-mix(in srgb, var(--brand) 35%, #0b1220); }
.site-footer__grid { display: grid; gap: 28px; padding-block: 40px; grid-template-columns: 1.2fr repeat(3, 1fr); }
.site-footer__brand { display: grid; gap: 12px; align-content: start; justify-items: start; }
.site-footer__brand p { margin: 0; color: #94a3b8; }
.site-footer__title { font: 700 16px/1 var(--font-display); text-transform: uppercase; letter-spacing: .06em; color: var(--gold); margin-bottom: 12px; }
.site-footer__col ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.site-footer__col a { color: #cbd5e1; font-size: 14px; }
.site-footer__col a:hover { color: #fff; }
.site-footer__bottom { padding-block: 16px; border-top: 1px solid rgb(255 255 255 / .08); font-size: 13px; color: #94a3b8; }
@media (max-width: 800px) { .site-footer__grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .site-footer__grid { grid-template-columns: 1fr; } }

/* 5. Components ----------------------------------------------------------- */
.card { position: relative; min-width: 0; background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.card__header {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px;
  padding: 14px 18px; border-bottom: 1px solid var(--line);
}
.card__title { font: 700 20px/1.1 var(--font-display); text-transform: uppercase; letter-spacing: .03em; display: flex; align-items: center; gap: 10px; }
.card__title::before { content: ""; width: 4px; height: 18px; border-radius: 2px; background: linear-gradient(var(--accent) 50%, var(--green) 50%); }
.card__actions { display: flex; flex-wrap: wrap; gap: 8px; }
.card__more {
  display: flex; align-items: center; justify-content: flex-end; gap: 6px;
  padding: 12px 18px; border-top: 1px solid var(--line); font-weight: 600; font-size: 14px; color: var(--brand);
}
.card__more .icon { width: 16px; height: 16px; transition: transform .15s; }
.card__more:hover .icon { transform: translateX(3px); }
.empty { margin: 0; padding: 24px; text-align: center; color: var(--muted); }

/* buttons, inputs */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 16px; border: 1px solid transparent; border-radius: 999px; font-weight: 600; font-size: 14px;
  transition: background .15s, color .15s, border-color .15s;
}
.btn .icon { width: 18px; height: 18px; }
.btn--primary { background: var(--accent); color: #fff; }
.btn--primary:hover { background: color-mix(in srgb, var(--accent) 85%, black); color: #fff; }
.btn--ghost { background: var(--surface-2); border-color: var(--line); color: var(--ink-2); }
.btn--ghost:hover { border-color: var(--brand); color: var(--brand); }
.btn--light { background: rgb(255 255 255 / .14); color: #fff; border-color: rgb(255 255 255 / .25); }
.btn--light:hover { background: rgb(255 255 255 / .24); color: #fff; }
.btn--block { width: 100%; border-radius: 0; border-inline: 0; border-bottom: 0; }

.select, .input {
  min-height: 40px; padding: 8px 12px; border: 1px solid var(--line); border-radius: var(--radius-sm);
  background-color: var(--surface); color: var(--ink); max-width: 100%;
}
.select { padding-inline-end: 32px; appearance: none; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center; background-size: 16px; }
[dir="rtl"] .select { background-position: left 10px center; padding-inline: 32px 12px; }
.select--sm { min-height: 34px; padding-block: 4px; font-size: 14px; }
.select:hover, .input:hover { border-color: #cbd5e1; }
.select:focus, .input:focus { border-color: var(--brand); outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 20%, transparent); }

/* tabs */
.tabs { display: flex; gap: 4px; padding: 6px; margin: 0; overflow-x: auto; scrollbar-width: none; border-bottom: 1px solid var(--line); background: var(--surface-2); }
.tabs__tab {
  flex: 1 0 auto; padding: 9px 14px; border: 0; border-radius: var(--radius-sm); background: none;
  font-weight: 600; font-size: 14px; color: var(--muted); white-space: nowrap;
}
.tabs__tab:hover { color: var(--ink); background: var(--surface); }
.tabs__tab[aria-selected="true"] { background: var(--surface); color: var(--brand); box-shadow: 0 1px 3px rgb(15 23 42 / .12); }
.panel-toolbar { display: flex; justify-content: flex-end; padding: 12px 18px; border-bottom: 1px solid var(--line); }

/* gameweek switcher */
.week-switch { display: inline-flex; align-items: center; gap: 6px; }
.week-switch .select { min-width: 140px; text-align: center; }
.gameweek__bar { display: flex; justify-content: center; padding: 10px; border-bottom: 1px solid var(--line); }

/* match list */
.match-list { display: grid; }
.match-list[aria-busy="true"] { opacity: .5; transition: opacity .2s; }
.match-list__heading { padding: 10px 18px 6px; font: 700 14px/1 var(--font-display); text-transform: uppercase; letter-spacing: .06em; color: var(--muted); border-top: 1px solid var(--line); }
.match-date {
  padding: 8px 18px; font-size: 12px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase;
  color: var(--muted); background: var(--surface-2); border-block: 1px solid var(--line);
}
.match {
  position: relative; display: grid; align-items: center; column-gap: 8px;
  grid-template-columns: 52px minmax(0, 1fr) auto minmax(0, 1fr);
  min-height: 52px; padding: 6px 14px; border-bottom: 1px solid var(--line); transition: background .15s;
}
.match.has-badge { grid-template-columns: 28px 52px minmax(0, 1fr) auto minmax(0, 1fr); }
.match.has-form  { grid-template-columns: 52px minmax(0, 1fr) auto minmax(0, 1fr) 28px; }
.match.has-badge.has-form { grid-template-columns: 28px 52px minmax(0, 1fr) auto minmax(0, 1fr) 28px; }
.match:last-child { border-bottom: 0; }
.match:hover { background: var(--surface-2); }
.match__link { position: absolute; inset: 0; z-index: 1; }       /* whole row -> match page */
.match__team, .match__badge { position: relative; z-index: 2; }  /* team links sit above it  */
.match__time { font-size: 13px; font-weight: 600; color: var(--muted); font-variant-numeric: tabular-nums; }
.match__team { display: flex; align-items: center; gap: 8px; min-width: 0; font-weight: 600; }
.match__team--home { justify-content: flex-end; text-align: end; }
.match__name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.match__logo { width: 28px; height: 28px; object-fit: contain; flex: none; }
.match__logo--empty { display: inline-block; }
.match__badge { width: 24px; height: 24px; object-fit: contain; }
.match__score {
  min-width: 64px; padding: 5px 10px; border-radius: var(--radius-sm); text-align: center;
  font: 700 17px/1 var(--font-display); letter-spacing: .03em; background: var(--surface-2); font-variant-numeric: tabular-nums;
}
.match__note { margin-inline-start: 4px; font: 600 11px/1 var(--font); color: var(--muted); text-decoration: none; vertical-align: super; }
.match.is-live .match__score { background: var(--live); color: #fff; }
.match.is-live .match__time { color: var(--live); animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .45; } }
.form-badge { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 999px; color: #fff; font-size: 12px; font-weight: 700; }
.form-badge--w { background: var(--win); } .form-badge--d { background: var(--draw); } .form-badge--l { background: var(--loss); }
.match-agg { display: flex; justify-content: center; gap: 12px; padding: 10px; font-weight: 600; background: var(--surface-2); border-bottom: 1px solid var(--line); }

.name-short { display: none; }
@media (max-width: 640px) {
  .name-full { display: none; } .name-short { display: inline; }
  .match { grid-template-columns: 44px minmax(0, 1fr) auto minmax(0, 1fr); padding-inline: 10px; column-gap: 6px; }
  .match.has-badge, .match.has-form, .match.has-badge.has-form { grid-template-columns: 44px minmax(0, 1fr) auto minmax(0, 1fr); }
  .match__badge, .form-badge { display: none; }
  .match__logo { width: 24px; height: 24px; }
  .match__score { min-width: 54px; font-size: 15px; }
}

/* top players */
.leaders { margin: 0; padding: 0; list-style: none; counter-reset: none; }
.leader { display: grid; grid-template-columns: 28px 44px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 10px 18px; border-bottom: 1px solid var(--line); }
.leader:first-child { padding-block: 16px; background: linear-gradient(90deg, color-mix(in srgb, var(--gold) 22%, transparent), transparent); }
.leader:first-child .leader__photo { width: 56px; height: 56px; }
.leader:last-child { border-bottom: 0; }
.leader__pos { font: 700 18px/1 var(--font-display); color: var(--muted); text-align: center; }
.leader__photo { width: 44px; height: 44px; border-radius: 999px; object-fit: cover; background: var(--surface-2); border: 2px solid var(--surface); box-shadow: 0 0 0 1px var(--line); }
.leader__info { display: grid; min-width: 0; }
.leader__name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.leader__team { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); }
.leader__team img { width: 18px; height: 18px; object-fit: contain; }
.leader__value { font: 700 24px/1 var(--font-display); color: var(--brand); }

/* tables */
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th, .table td { padding: 10px 12px; text-align: start; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table thead th { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); background: var(--surface-2); }
.table tbody tr:hover { background: var(--surface-2); }
.table tfoot th, .table tfoot td { font-weight: 700; border-top: 2px solid var(--line); background: var(--surface-2); }
.table .num { text-align: center; font-variant-numeric: tabular-nums; }
.table .strong { font-weight: 700; }
.team-cell { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; }
.team-cell img { width: 20px; height: 20px; object-fit: contain; }
.pos { display: inline-grid; place-items: center; min-width: 28px; height: 26px; padding-inline: 4px; border-radius: 6px; font-weight: 700; background: var(--surface-2); border-inline-start: 4px solid var(--zone, var(--line)); }
/* standings: the team column absorbs the remaining width and may wrap, so numbers never get clipped */
.table--standings { table-layout: auto; }
.table--standings th, .table--standings td { padding-inline: 8px; }
.table--standings td:nth-child(2) { width: 100%; white-space: normal; }
.table--standings .team-cell { display: flex; line-height: 1.25; }
.table--standings .num { width: 1%; }
.sticky-col { position: sticky; inset-inline-start: 0; z-index: 1; background: var(--surface); }
thead .sticky-col, tfoot .sticky-col { background: var(--surface-2); }
.comp-cell { display: inline-flex; align-items: center; gap: 8px; max-width: 280px; overflow: hidden; text-overflow: ellipsis; }
.table--stats tr.is-extra { display: none; }
.table--stats.is-expanded tr.is-extra { display: table-row; }

/* news */
.news-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.news-grid--archive { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.news-card { border-bottom: 1px solid var(--line); }
.news-card__link { display: grid; gap: 12px; padding: 14px 18px; height: 100%; }
.news-card__img { width: 100%; object-fit: cover; border-radius: var(--radius-sm); background: var(--surface-2); }
.news-card--feature .news-card__img { aspect-ratio: 16 / 9; }
.news-card--feature .news-card__title { font-size: 18px; font-weight: 700; line-height: 1.3; }
.news-card--list { grid-column: 1 / -1; }
.news-card--list .news-card__link { grid-template-columns: 96px minmax(0, 1fr); align-items: center; padding-block: 10px; }
.news-card--list .news-card__img { aspect-ratio: 3 / 2; }
.news-card__body { display: grid; gap: 4px; align-content: start; }
.news-card__date { font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.news-card__title { font-weight: 600; line-height: 1.35; }
.news-card__link:hover .news-card__title { color: var(--accent); }
.news-card__link:hover .news-card__img { filter: brightness(1.05); }
@media (min-width: 700px) { .news-grid--archive .news-card--list { grid-column: auto; } }
@media (max-width: 700px) { .news-grid, .news-grid--archive { grid-template-columns: minmax(0, 1fr); } }

.fb-embed { display: grid; place-items: center; min-height: 160px; padding: 12px; }
.fb-embed .fb-page, .fb-embed iframe { width: 100% !important; }

/* ads */
.ad-slot { padding: 10px 18px; border-top: 1px solid var(--line); }
.ad-slot__ins { display: block; width: 100%; min-height: 100px; max-height: 128px; }

/* hero: match */
.match-hero { color: #fff; background: linear-gradient(135deg, color-mix(in srgb, var(--brand) 85%, black), var(--brand)); }
.match-hero__grid { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: var(--gap); padding-block: clamp(20px, 4vw, 40px); }
.match-hero__team { display: grid; justify-items: center; gap: 10px; text-align: center; font: 700 clamp(18px, 2.6vw, 26px)/1.1 var(--font-display); text-transform: uppercase; color: #fff; }
.match-hero__team:hover { color: var(--gold); }
.match-hero__team img { width: clamp(56px, 10vw, 96px); height: clamp(56px, 10vw, 96px); object-fit: contain; filter: drop-shadow(0 4px 10px rgb(0 0 0 / .35)); }
.match-hero__center { display: grid; justify-items: center; gap: 6px; }
.match-hero__score { font: 700 clamp(40px, 8vw, 72px)/1 var(--font-display); letter-spacing: .04em; font-variant-numeric: tabular-nums; }
.match-hero__score--fixture { font-size: clamp(20px, 3vw, 28px); }
.match-hero__note, .match-hero__meta { font-size: 13px; color: rgb(255 255 255 / .75); }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.pill--live { background: var(--live); color: #fff; }
.pill--live::before { content: ""; width: 6px; height: 6px; border-radius: 999px; background: #fff; animation: pulse 1.6s infinite; }
.match-hero.is-live .match-hero__score { color: #fff; text-shadow: 0 0 24px rgb(225 29 72 / .6); }

/* hero: player / team */
.profile-hero { color: #fff; background: radial-gradient(120% 140% at 0% 0%, color-mix(in srgb, var(--brand) 70%, white 0%) 0%, color-mix(in srgb, var(--brand) 60%, black) 100%); }
.profile-hero__grid { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: clamp(16px, 3vw, 32px); padding-block: clamp(20px, 4vw, 36px); }
.profile-hero__photo { width: clamp(96px, 14vw, 150px); height: clamp(96px, 14vw, 150px); border-radius: 999px; object-fit: cover; background: rgb(255 255 255 / .12); border: 4px solid rgb(255 255 255 / .85); }
.profile-hero__crest { width: clamp(80px, 12vw, 120px); height: clamp(80px, 12vw, 120px); object-fit: contain; filter: drop-shadow(0 6px 14px rgb(0 0 0 / .35)); }
.profile-hero__main { display: grid; gap: 14px; }
.profile-hero__name { font: 700 clamp(28px, 5vw, 48px)/1 var(--font-display); text-transform: uppercase; letter-spacing: .01em; }
.profile-hero__first { display: block; font-size: .55em; font-weight: 600; color: var(--gold); }
.profile-hero__side { display: grid; justify-items: center; gap: 10px; }
.profile-hero__club img { width: 72px; height: 72px; object-fit: contain; filter: drop-shadow(0 4px 10px rgb(0 0 0 / .35)); }
.shirt-number { font: 700 56px/1 var(--font-display); color: var(--gold); }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px 20px; margin: 0; }
.facts div { min-width: 0; }
.facts dt { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: rgb(255 255 255 / .7); }
.facts dd { margin: 2px 0 0; font-weight: 600; }
@media (max-width: 640px) {
  .profile-hero__grid { grid-template-columns: auto minmax(0, 1fr); }
  .profile-hero__side { grid-column: 1 / -1; grid-auto-flow: column; justify-content: start; }
  .shirt-number { font-size: 40px; }
}

/* career list */
.timeline-list { margin: 0; padding: 8px 0; list-style: none; }
.timeline-list__item { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 8px 18px; }
.timeline-list__item img { width: 30px; height: 30px; object-fit: contain; }
.timeline-list__item a { font-weight: 600; }
.timeline-list__date { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }

/* trophies */
.trophies { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; margin: 0; padding: 16px 18px; list-style: none; }
.trophy { display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; grid-template-areas: "img title times" "img last times"; align-items: center; column-gap: 12px; padding: 12px; border-radius: var(--radius-sm); background: var(--surface-2); }
.trophy img { grid-area: img; width: 48px; height: 48px; object-fit: contain; }
.trophy__title { grid-area: title; font-weight: 600; line-height: 1.2; }
.trophy__last { grid-area: last; font-size: 13px; color: var(--muted); }
.trophy__times { grid-area: times; font: 700 26px/1 var(--font-display); color: var(--brand); }

/* article */
.article__figure { margin: 0; }
.article__figure img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: var(--surface-2); }
.article__body { display: grid; gap: 14px; padding: clamp(16px, 3vw, 32px); }
.article__date { font-size: 13px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.article__title { font: 700 clamp(26px, 4vw, 40px)/1.1 var(--font-display); }
.share { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding-block: 4px 12px; border-bottom: 1px solid var(--line); }
.prose { font-size: 17px; line-height: 1.7; color: var(--ink-2); }
.prose p { margin: 0 0 1em; }
.prose img { border-radius: var(--radius-sm); }
.prose a { color: var(--brand); text-decoration: underline; }
.related { margin: 0; padding: 8px 0; list-style: none; }
.related__item { display: flex; align-items: center; gap: 10px; padding: 8px 18px; font-weight: 600; }
.related__item img { width: 32px; height: 32px; object-fit: contain; }
.related__item img.is-round { border-radius: 999px; object-fit: cover; }
.related__match .match { border-top: 1px solid var(--line); }

/* videos */
.video-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; padding: 18px; }
.video { position: relative; display: block; padding: 0; border: 0; border-radius: var(--radius-sm); overflow: hidden; background: #000; aspect-ratio: 16 / 9; text-align: start; }
.video img { width: 100%; height: 100%; object-fit: cover; opacity: .9; transition: opacity .2s, transform .3s; }
.video:hover img { opacity: 1; transform: scale(1.03); }
.video__play { position: absolute; inset: 0; display: grid; place-items: center; color: #fff; }
.video__play .icon { width: 56px; height: 56px; padding: 14px; border-radius: 999px; background: var(--accent); box-shadow: 0 6px 20px rgb(0 0 0 / .4); }
.video__title { position: absolute; inset-inline: 0; bottom: 0; padding: 24px 12px 10px; color: #fff; font-weight: 600; font-size: 14px; background: linear-gradient(transparent, rgb(0 0 0 / .8)); }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* contact */
.contact { display: grid; grid-template-columns: minmax(260px, 1fr) minmax(0, 2fr); gap: var(--gap); align-items: start; }
@media (max-width: 800px) { .contact { grid-template-columns: minmax(0, 1fr); } }
.contact__list { display: grid; gap: 12px; margin: 0; padding: 18px; list-style: none; }
.contact__list li { display: flex; align-items: center; gap: 10px; }
.contact__list .icon { color: var(--accent); }
.form { display: grid; gap: 14px; padding: 18px; }
.form__row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 600px) { .form__row { grid-template-columns: minmax(0, 1fr); } }
.field { display: grid; gap: 6px; }
.field__label { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.input, .field .select { width: 100%; }
textarea.input { resize: vertical; min-height: 140px; }
.form .btn { justify-self: start; }
.alert { margin: 18px 18px 0; padding: 12px 14px; border-radius: var(--radius-sm); font-weight: 600; }
.alert--success { background: #dcfce7; color: #166534; }
.alert--error { background: #fee2e2; color: #991b1b; }

/* spinner */
.spinner { width: 40px; height: 40px; margin: 32px auto; border-radius: 999px; border: 4px solid var(--line); border-top-color: var(--accent); border-inline-end-color: var(--green); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* 6. Page specifics ------------------------------------------------------- */
.cup-round__group { padding: 12px 18px 6px; font: 700 15px/1 var(--font-display); text-transform: uppercase; letter-spacing: .05em; color: var(--brand); }

/* 7. DSG widget theme ------------------------------------------------------
   Widgets are fetched server-side from dsg-widgets.com and ship their own
   layout CSS (floats, widths). We only theme them: typography, headers,
   colours and the toggles the old jQuery code handled.                     */
.widget { display: flow-root; }
.widget, .widget * { font-family: var(--font) !important; }
.widget a { color: var(--ink); }
.widget a:hover { color: var(--accent); }
.widget .gsa_subheader_2, .widget .info_header, .widget .lineup_header, .widget .subs_header, .widget .h2h_header, .widget .timeline_header {
  display: flex !important; align-items: center; gap: 10px; float: none !important; width: auto !important; height: auto !important;
  margin: 0 !important; padding: 14px 18px !important; border-bottom: 1px solid var(--line);
  background: none !important; color: var(--ink) !important; text-align: start !important;
  font: 700 20px/1.1 var(--font-display) !important; text-transform: uppercase; letter-spacing: .03em;
}
.widget .gsa_subheader_2::before { content: ""; width: 4px; height: 18px; border-radius: 2px; background: linear-gradient(var(--accent) 50%, var(--green) 50%); }
.widget .player_header, .widget .ranking_player_row_header { background: var(--surface-2) !important; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .04em; font-weight: 700; }
.widget .player_row, .widget .ranking_player_row, .widget .timeline_row, .widget .subs_row, .widget .lineup_row, .widget .info_row, .widget .gsa_h2h_row, .widget .pa_row { border-bottom: 1px solid var(--line) !important; }
.widget .player_row:hover, .widget .ranking_player_row:hover, .widget .gsa_h2h_row:hover, .widget .pa_row:hover { background: var(--surface-2); }
.widget .ranking_value, .widget .col_data.bold, .widget .timeline_time { font-variant-numeric: tabular-nums; }
.widget .ranking_value { font-weight: 700; color: var(--brand); }
.widget img { max-width: none; }
.widget select { min-height: 34px; padding: 4px 28px 4px 10px; border: 1px solid var(--line) !important; border-radius: var(--radius-sm); background-color: var(--surface); }
.widget--flat { box-shadow: none; border-radius: 0; border-bottom: 1px solid var(--line); }
.widget .match_date_sep, .legacy-widget .match_date_sep { padding: 8px 18px !important; height: auto !important; border: 0 !important; border-block: 1px solid var(--line) !important; background: var(--surface-2) !important; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .05em; }
.legacy-widget, .legacy-widget * { font-family: var(--font) !important; }
.legacy-widget a { color: var(--ink); }
.legacy-widget .curgw { scroll-margin-top: calc(var(--header-h) + 60px); }
#roster_year { float: none !important; margin: 0 !important; width: auto !important; height: auto !important; }
.widget--roster > select, .widget--roster #roster_year { margin: 12px 18px !important; }
/* the widget wraps its table in <div id="roster_container" style="float:left"> - a float shrinks to its content */
.widget--roster #roster_container { float: none !important; width: 100% !important; }
/* timeline: compact rows on small screens (was a jQuery resize handler) */
.widget--timeline .timeline_row_v2 { display: none !important; }
@media (max-width: 500px) {
  .widget--timeline .timeline_row { display: none !important; }
  .widget--timeline .timeline_row_v2 { display: block !important; }
}
/* standings widget in the narrow sidebar: use the short name the widget already provides
   (it ships fullname / shortname / tla_name spans and only switched by viewport width) */
aside .widget--table .fullname { display: none !important; }
aside .widget--table .shortname { display: inline-block !important; }
aside .widget--table .tla_name { display: none !important; }
/* the widget's position column (5-10% wide) is too narrow for two-digit ranks in the sidebar */
/* (floats summing to 100% - do not change widths; shrink the inline 17px font instead) */
aside .widget--table .col_shirt { white-space: nowrap; font-size: 13px !important; letter-spacing: -.02em; overflow: visible; }
.widget .stat_hide, .widget .stat_hide_resp { display: none; }
.widget .stat_hide.is-shown, .widget .stat_hide_resp.is-shown { display: flex !important; }
.widget .team_header, .widget .formation_header, .widget .team_sub_header, #event_show, #event_show_resp { cursor: pointer; }
.widget .is-active-team { font-weight: 700 !important; color: var(--brand); }
/* team A/B switch on small screens: the widgets hide team B with their own media queries;
   site.js stores the chosen team on <body> (data-lineup-team / data-subs-team) */
.widget .team_header, .widget .team_sub_header, .widget .formation_header { box-sizing: border-box; padding-inline: 8px; background: var(--surface-2) !important; }
#lineup_a_header_name:not(.is-active-team), #lineup_b_header_name:not(.is-active-team), #subs_a_header_name:not(.is-active-team), #subs_b_header_name:not(.is-active-team) { font-weight: 400 !important; }
@media (max-width: 550px) {
  [data-lineup-team="b"] .widget .lineup_row_a, [data-subs-team="b"] .widget .subs_row_a { display: none !important; }
  [data-lineup-team="b"] .widget .lineup_row_b, [data-subs-team="b"] .widget .subs_row_b { display: flex !important; }
}
@media (max-width: 916px) {
  [data-lineup-team="b"] .widget #formation_a { display: none !important; }
  [data-lineup-team="b"] .widget #formation_b { display: flex !important; }
}
.widget img.is-broken { visibility: hidden; }
.widget--h2h .match_date, .widget--h2h .datetime { white-space: nowrap; font-size: 12px !important; color: var(--muted); }
/* head-to-head: always the short names (the widget switched only by viewport width, so the
   narrow sidebar showed full names wrapped on two lines) */
.widget--h2h .team_full { display: none !important; }
.widget--h2h .team_short { display: inline !important; font-size: inherit !important; }
/* head-to-head logos are 30x30 background images; the widget scales them (background-size: contain
   below 640px) to the 38px cell - keep them at their real size */
/* (the cell is width:5% in a table-layout:fixed row, which ignores its min-width:38px -> 18-20px wide, logo cut off) */
.widget--h2h .team_a_img, .widget--h2h .team_b_img { width: 38px !important; background-size: 30px 30px !important; background-position: center !important; background-repeat: no-repeat !important; }
/* match page: 12px for the widget contents (h2h, match info, events, lineups, bench, coaches).
   The widgets set 16-22px inline / in their own CSS, hence !important. Card titles
   (.widget .gsa_subheader_2 etc., more specific) keep their size. */
.widget--h2h *, .widget--info *, .widget--timeline *, .widget--lineup *, .widget--subs *, .widget--coaches * { font-size: 12px !important; }

/* 8. Utilities ------------------------------------------------------------ */
.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.select-field { display: inline-block; }
img[data-fallback].is-fallback { object-fit: contain; padding: 4px; background: var(--surface-2); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
@media print {
  .site-header, .site-footer, .share, .tabs, .week-switch, .ad-slot, .card--embed { display: none !important; }
  .card { box-shadow: none; border: 1px solid #ccc; }
}
