﻿/* =============================================================================
 * ScoreEnDirect — Football native (2026-10-13 — v3 full feature set).
 * -----------------------------------------------------------------------------
 * Every value here is taken from the DevTools inspection dumps in
 * `fichiers CSS inspecter devtools page football widget/`. Mapping documented
 * in `scripts/_devtools-essentials/CORRESPONDENCE.md`.
 *
 * All classes are owned by ScoreEnDirect : prefix `.sed-football-*`. Zero
 * `.ls-*`, zero `.wc-livescore-scope`, zero vendor stylesheet loaded.
 *
 * Features reproduced :
 *   - toolbar sticky shell with filter row + absolute-centered date nav
 *   - league group header with count badge, pin, collapse chevron
 *   - match row with status / home / score / away / favorite column
 *   - collapsed state (chevron rotates, matches hidden)
 *   - dark theme via [data-theme="dark"] token swap
 *   - responsive stacked row at <= 500px
 * ============================================================================ */

/* Scope base — Golden Master visual contract (2026-10-13).
 * Mirrors the DevTools .widget-shell:
 *   background: var(--bg-elev) = #ffffff
 *   border: 1px solid var(--border) = #e3e7ee
 *   border-radius: var(--radius-md) = 12px
 *   overflow: hidden
 *   box-shadow: var(--shadow-sm)
 * The toolbar and group headers are the only green surfaces INSIDE this shell;
 * white strips between them come from the shell background showing through. */
#sed-football-livescore {
  color: #0f172a;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.22;
  text-transform: none;
  letter-spacing: 0;
  min-height: 640px;
  background: #ffffff;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #e3e7ee;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 1px 3px rgba(15, 23, 42, 0.03);
  display: flex;
  flex-direction: column;
}

/* =============================================================================
 * TOOLBAR — Golden Master : 2 lignes dans un shell vert très clair
 *   top    : date-nav centré + actions à droite
 *   bottom : filtres à gauche
 * ============================================================================ */
.sed-football-toolbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  flex-direction: column;
  background: #e8f0e7;                  /* shell vert très clair du Golden */
  padding: 6px 14px;
  gap: 2px;
  border-radius: 8px;                   /* pill style, même que les groupes */
}

/* ---- Row 1 : date-nav centré + actions à droite ---- */
.sed-football-toolbar__top {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  width: 100%;
}

/* Datenav = clone pixel-for-pixel du widget football (.ls-date-strip .sed-datenav). */
.sed-football-datenav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 4px;
  width: auto;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  box-sizing: border-box;
  user-select: none;
}
.sed-football-datenav__arrow {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  background: #f8fafc;
  border: 1px solid #e5eaf1;
  color: #64748b;
  border-radius: 10px;
  cursor: pointer;
  transition: background-color .14s ease-out, color .14s ease-out, border-color .14s ease-out;
}
.sed-football-datenav__arrow:hover { background: #eef2f7; border-color: #cfd7e2; color: #0f172a; }
.sed-football-datenav__arrow:focus-visible { outline: 2px solid #0f172a; outline-offset: 2px; }
.sed-football-datenav__arrow > svg { width: 14px; height: 14px; display: block; }
.sed-football-datenav__label {
  flex: 0 1 auto;
  min-width: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 14px;
  height: 36px;
  background: #f8fafc;
  border: 1px solid #e5eaf1;
  color: #0f172a;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .01em;
  white-space: nowrap;
  text-transform: uppercase;
  cursor: pointer;
  font-family: inherit;
  transition: background-color .14s ease-out, border-color .14s ease-out, color .14s ease-out;
}
.sed-football-datenav__label:hover { background: #eef2f7; border-color: #cfd7e2; }
.sed-football-datenav__label:focus-visible { outline: 2px solid #0f172a; outline-offset: 2px; }

/* ---- Actions droite (search / calendar / star / settings) ---- */
.sed-football-toolbar__actions {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  gap: 2px;
}
.sed-football-toolbar__action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 6px;
  color: #64748b;
  cursor: pointer;
  transition: background 120ms ease, color 120ms ease;
  font-family: inherit;
}
.sed-football-toolbar__action:hover { background: rgba(15,23,42,0.06); color: #0f172a; }
.sed-football-toolbar__action > svg {
  width: 15px;
  height: 15px;
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ---- Row 2 : filtres à gauche ---- */
.sed-football-toolbar__bottom {
  display: flex;
  align-items: center;
  min-height: 32px;
  width: 100%;
}
.sed-football-filter-row {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: 1 1 auto;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
}
.sed-football-filter-row::-webkit-scrollbar { display: none; }

.sed-football-filter {
  position: relative;
  /* Button geometry never depends on the counter's text or badge width. */
  --filter-width: 128px;
  --counter-slot-width: 30px;
  box-sizing: border-box;
  width: var(--filter-width);
  min-width: var(--filter-width);
  max-width: var(--filter-width);
  flex: 0 0 var(--filter-width);
  display: inline-grid;
  grid-template-columns: max-content var(--counter-slot-width);
  align-items: center;
  gap: 4px;
  padding: 4px 6px 4px calc(6px + 0.6mm);
  min-height: 26px;
  font-size: 12px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0;
  color: #334155;
  background: transparent;
  border: 0;
  border-radius: 14px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 100ms ease, color 100ms ease;
  font-family: inherit;
}
.sed-football-filter[data-filter="mine"] { grid-template-columns: minmax(0, 1fr); }
.sed-football-filter__label { display: inline-flex; align-items: center; gap: 6px; text-align: left; }
.sed-football-filter__counter-slot {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  width: var(--counter-slot-width);
  min-width: var(--counter-slot-width);
}
.sed-football-filter:hover:not(.is-active) { background: rgba(15,23,42,0.04); color: #0f172a; }
.sed-football-filter.is-active {
  background: #d9e5d8;
  color: #0f172a;
  font-weight: 600;
}
.sed-football-filter__dot {
  position: absolute;
  left: 1px;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: #e23636;
  flex-shrink: 0;
}
.sed-football-filter__count {
  /* Grow rightward inside the reserved slot, close to the fixed label. */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  width: auto;
  flex: 0 0 auto;
  padding: 1px 3px;
  font-size: 10px;
  font-weight: 600;
  border-radius: 999px;
  background: #e9eef5;
  color: #64748b;
  line-height: 1.4;
  font-variant-numeric: tabular-nums;
}
.sed-football-filter--live .sed-football-filter__count { background: #fde8e8; color: #e23636; }

@media (max-width: 480px) {
  .sed-football-filter-row { gap: 4px; }
  .sed-football-filter { --filter-width: 124px; --counter-slot-width: 30px; padding-inline: calc(4px + 0.6mm) 4px; font-size: 11px; }
  .sed-football-datenav__arrow { width: 32px; height: 32px; border-radius: 10px; }
  .sed-football-datenav__label { padding: 6px 12px; height: 32px; font-size: 12px; border-radius: 10px; }
  .sed-football-toolbar__action { width: 26px; height: 26px; }
}


/* =============================================================================
 * LEAGUE GROUP (competition)
 * ============================================================================ */
/* Groups are rounded green pills stacked inside the white shell.
 * Golden measurements : group border-radius ≈ 8px, group→group gap ≈ 10px,
 * toolbar→first group gap ≈ 4px.
 * The group__header holds the radius (not .sed-football-group, so that
 * open groups can keep the top header rounded while the match rows below
 * remain square — matching the Golden "open group" treatment). */
.sed-football-group {
  background: transparent;
  max-width: 100%;
  min-width: 0;
  padding: 0;
  box-sizing: border-box;
  border-radius: 8px;
  overflow: hidden;
}
.sed-football-group + .sed-football-group { margin-top: 6px; }

/* Space between the toolbar bottom edge and the first league group */
.sed-football-toolbar + .sed-football-group { margin-top: 4px; }

/* ---- Group header row (Golden : fond vert clair, coins arrondis) ---- */
.sed-football-group__header {
  display: flex;
  align-items: center;
  cursor: pointer;
  gap: 8px;
  min-height: 40px;
  padding: 6px 14px;
  background: #e8f0e7;
  color: #0f172a;
  position: relative;
  user-select: none;
}
/* NB : pas de :hover sur le header — le changement de couleur masquait les
 * coins arrondis du bas de la pilule quand le groupe est ouvert. */

.sed-football-group__logo {
  width: 18px;
  height: 18px;
  border-radius: 2px;                 /* --ls-flag-radius */
  object-fit: contain;
  flex-shrink: 0;
  background: transparent;
}

.sed-football-group__content {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 0;
  min-width: 0;
  line-height: 1;
}

.sed-football-group__title-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  min-width: 0;
}

.sed-football-group__title {
  font-size: 13px;
  font-weight: 600;
  text-transform: none;
  letter-spacing: 0;
  line-height: 1.3;
  color: #0f172a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}
.sed-football-group__title-link { color: inherit; text-decoration: none; transition: color 120ms ease; }
.sed-football-group__title-link:hover { color: #0f172a; text-decoration: underline; }

.sed-football-group__country {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
  color: #64748b;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sed-football-group__country::before {
  content: "";
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='M2 12h20M12 2a15.3 15.3 0 0 1 4 10 15.3 15.3 0 0 1-4 10 15.3 15.3 0 0 1-4-10 15.3 15.3 0 0 1 4-10z'/%3E%3C/svg%3E") center/contain no-repeat;
  flex-shrink: 0;
}

/* ---- Group badges rail (count chip) ---- */
.sed-football-group__badges {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
  padding-left: 4px;
  flex: 0 0 auto;
}
.sed-football-group__count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 20px;
  padding: 0 8px;
  font-size: 11px;
  font-weight: 500;
  color: #64748b;
  background: #ffffff;
  border: 1px solid #d5e2d5;
  border-radius: 999px;
  font-variant-numeric: tabular-nums;
}

/* Same live count colors as the Basketball league headers. */
.sed-football-group__header[data-has-live="true"] .sed-football-group__count { color: var(--live, #ef4f67); }
[data-theme="dark"] .sed-football-group__header[data-has-live="true"] .sed-football-group__count { color: #ff6a80; }

/* ---- Group actions rail (external link + collapse) ---- */
.sed-football-group__actions {
  display: flex;
  align-items: center;
  gap: 6px;                           /* --ls-league-row-action-gap */
  min-height: 28px;                   /* --ls-league-row-action-rail-size */
  flex-shrink: 0;
}
.sed-football-group__external,
.sed-football-group__collapse {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 6px;
  color: #94a3b8;                     /* --ls-text-three */
  cursor: pointer;
  transition: background 120ms ease, color 120ms ease, transform 150ms ease;
  font-family: inherit;
}
.sed-football-group__external:hover,
.sed-football-group__collapse:hover { background: #e9eef5; color: #0f172a; }
.sed-football-group__external > svg,
.sed-football-group__collapse > svg { width: 16px; height: 16px; display: block; }

/* Collapse chevron rotates when group is open */
.sed-football-group.is-collapsed .sed-football-group__collapse > svg { transform: rotate(-90deg); }

/* Collapsed state hides the match stack */
.sed-football-group.is-collapsed .sed-football-group__matches { display: none; }


/* =============================================================================
 * MATCH ROW
 * ============================================================================ */
.sed-football-match {
  display: grid;
  grid-template-columns: 70px minmax(0, 1fr) auto minmax(0, 1fr) 28px;
  align-items: center;
  column-gap: 10px;
  min-height: 38px;
  padding: 6px 14px;
  cursor: pointer;
  background: #ffffff;
  color: #0f172a;
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.2;
  transition: background 40ms ease;
}
.sed-football-group__matches > .sed-football-match:nth-child(even) {
  background: #f7f8f6;
}
.sed-football-match:hover { background: #ecf3eb; }

/* Status cell */
.sed-football-match__status {
  text-align: left;
  font-size: 13px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  color: #64748b;
  line-height: 1.2;
}
.sed-football-match__status--live {
  color: #e23636;
  font-weight: 700;
}
.sed-football-match__status--finished {
  color: #64748b;
  font-size: 12px;
  text-transform: none;
  letter-spacing: 0;
}

/* Teams */
.sed-football-match__home,
.sed-football-match__away {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  overflow: hidden;
}
.sed-football-match__home { justify-content: flex-end; }
.sed-football-match__away { justify-content: flex-start; }
.sed-football-match__team-name {
  font-size: 13px;
  font-weight: 500;
  color: inherit;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sed-football-match__home .sed-football-match__team-name { text-align: right; }
.sed-football-match__away .sed-football-match__team-name { text-align: left; }

.sed-football-match__logo {
  width: 20px;
  height: 20px;
  object-fit: contain;
  flex-shrink: 0;
  background: transparent;
  border-radius: 50%;
}

/* Score centre : light pill, red when live */
.sed-football-match__score {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-width: 60px;
  padding: 3px 12px;
  background: #eef2f5;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  color: #0f172a;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0;
  line-height: 1;
}
.sed-football-match__score > span { min-width: 10px; text-align: center; }
.sed-football-match__score-sep { color: #94a3b8; font-weight: 500; }
.sed-football-match--live .sed-football-match__score { background: #fde8e8; color: #e23636; }
.sed-football-match__score--empty {
  min-width: 60px;
  color: #94a3b8;
  font-weight: 500;
  background: transparent;
}

/* Favorite column (trailing) */
.sed-football-match__fav {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 6px;
  color: #cbd5e1;
  cursor: pointer;
  transition: color 120ms ease, background 120ms ease, transform 120ms ease;
  font-family: inherit;
}
.sed-football-match__fav:hover { color: #f5a623; background: rgba(245,166,35,0.08); }
.sed-football-match__fav.is-on { color: #f5a623; }
.sed-football-match__fav > svg { width: 15px; height: 15px; display: block; fill: none; stroke: currentColor; stroke-width: 1.8; }
.sed-football-match__fav.is-on > svg { fill: currentColor; }


/* =============================================================================
 * EMPTY / LOADING / ERROR
 * ============================================================================ */
.sed-football-empty,
.sed-football-loading,
.sed-football-error {
  padding: 48px 24px;
  text-align: center;
  color: #6b7585;
  font-size: 13px;
  font-weight: 500;
}


/* =============================================================================
 * MOBILE (<= 500px) — stacked row
 * ============================================================================ */
@media (max-width: 500px) {
  .sed-football-toolbar__row { padding: 0 10px; gap: 8px; }
  .sed-football-group__header { padding: 5px 10px; }
  .sed-football-match {
    grid-template-columns: 40px minmax(0, 1fr) auto 28px;
    grid-template-rows: auto auto;
    grid-template-areas:
      "status home  score fav"
      "status away  score fav";
    row-gap: 2px;
    column-gap: 8px;
    min-height: 64px;
    padding: 8px 10px;
    align-items: stretch;
  }
  .sed-football-match__status { grid-area: status; align-self: center; }
  .sed-football-match__home   { grid-area: home;   justify-content: flex-start; }
  .sed-football-match__away   { grid-area: away;   justify-content: flex-start; }
  .sed-football-match__home .sed-football-match__team-name,
  .sed-football-match__away .sed-football-match__team-name { text-align: left; }
  .sed-football-match__score  { grid-area: score;  align-self: center; }
  .sed-football-match__fav    { grid-area: fav;    align-self: center; }
  .sed-football-match__logo   { width: 18px; height: 18px; }
}


/* =============================================================================
 * DARK MODE — token swap mirroring styles.css [data-theme="dark"]
 * ============================================================================ */
[data-theme="dark"] #sed-football-livescore {
  background: #131c2c;
  color: #e8eefc;
}
[data-theme="dark"] .sed-football-toolbar { background: #131c2c; border-color: #253354; }
[data-theme="dark"] .sed-football-filter { background: #1e2a42; color: #9aa6bc; }
[data-theme="dark"] .sed-football-filter.is-active { background: #5b8def; color: #0a1220; }
[data-theme="dark"] .sed-football-filter:hover:not(.is-active) { background: #253354; color: #e8eefc; }
[data-theme="dark"] .sed-football-datenav__arrow,
[data-theme="dark"] .sed-football-datenav__label { background: #182338; border-color: #253354; color: #cbd5e1; }
[data-theme="dark"] .sed-football-datenav__arrow:hover,
[data-theme="dark"] .sed-football-datenav__label:hover { background: rgba(59,130,246,.14); border-color: rgba(59,130,246,.3); color: #60a5fa; }
[data-theme="dark"] .sed-football-group { background: #131c2c; }
[data-theme="dark"] .sed-football-group__header { background: #182338; color: #e8eefc; }
[data-theme="dark"] .sed-football-group__header:hover { background: #202b45; }
[data-theme="dark"] .sed-football-group__title { color: #e8eefc; }
[data-theme="dark"] .sed-football-group__country { color: #9aa6bc; }
[data-theme="dark"] .sed-football-group__count { background: #253354; color: #cbd5e1; }
[data-theme="dark"] .sed-football-group__external:hover,
[data-theme="dark"] .sed-football-group__collapse:hover { background: #253354; color: #e8eefc; }
[data-theme="dark"] .sed-football-group + .sed-football-group { border-color: #253354; }
[data-theme="dark"] .sed-football-match { background: #131c2c; color: #e8eefc; border-color: #253354; }
[data-theme="dark"] .sed-football-group__matches > .sed-football-match:nth-child(even) { background: #182338; }
[data-theme="dark"] .sed-football-group__matches > .sed-football-match:hover { background: #202b45; }
[data-theme="dark"] .sed-football-group__logo { background: #fff; padding: 1px; box-sizing: border-box; }
[data-theme="dark"] .sed-football-match:hover { background: rgba(255,255,255,.04); }
[data-theme="dark"] .sed-football-match__team-name { color: #e8eefc; }
[data-theme="dark"] .sed-football-match__status { color: #9aa6bc; }
[data-theme="dark"] .sed-football-match__status--live { color: #ff5a5a; }
[data-theme="dark"] .sed-football-match__score { background: #253354; color: #e8eefc; }
[data-theme="dark"] .sed-football-match--live .sed-football-match__score { background: rgba(255,90,90,.14); color: #ff5a5a; }
[data-theme="dark"] .sed-football-match__logo { background: #253354; }


/* =============================================================================
 * MATCH DETAIL — REFERENCE SKIN (2026-10-14 — v4)
 * -----------------------------------------------------------------------------
 * Target : MATCH-LIVE-REFERENCE.png
 *   Hero (top strip + teams/score + possession) → Tabs → Résumé (2 columns of
 *   events + 3-card insights grid) → full-stats tab.
 * Classes prefix : .fn-* (lives inside the main .fn-match-shell container).
 * Tokens taken from public/styles.css (--bg-elev, --border, --text, --live, …).
 * ============================================================================ */

/* Reset the plain shell so the new hero can own its own padding/radius. */
.fn-match-shell {
  background: var(--bg-elev, #ffffff);
  border: 1px solid var(--border, #e3e7ee);
  border-radius: 14px;
  padding: 0;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(15, 25, 40, 0.04), 0 1px 3px rgba(15, 25, 40, 0.03);
  color: var(--text, #1a2230);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* ---- HERO ---------------------------------------------------------------- */
.fn-hero {
  padding: 10px 18px 12px;
  border-bottom: 1px solid var(--border, #e3e7ee);
  background: var(--bg-elev, #ffffff);
}

.fn-hero__top {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 14px;
  padding-bottom: 4px;
}

.fn-hero__comp { display: flex; align-items: center; gap: 10px; min-width: 0; }
.fn-hero__comp-logo {
  width: 22px; height: 22px; object-fit: contain; flex-shrink: 0;
  background: transparent;
}
.fn-hero__comp-text { min-width: 0; }
.fn-hero__comp-name {
  font-size: 13px; font-weight: 700; color: var(--text, #0f172a);
  line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.fn-hero__comp-country {
  font-size: 11px; font-weight: 500; color: var(--text-muted, #64748b);
  line-height: 1.2; display: inline-flex; align-items: center; gap: 4px;
  margin-top: 2px;
}
.fn-hero__comp-dot { color: #94a3b8; font-size: 10px; }

.fn-hero__datebox {
  justify-self: center;
  display: inline-flex; align-items: center; justify-content: center;
  padding: 6px 14px; min-width: 160px;
  background: var(--bg-elev-2, #f1f5f9);
  border: 1px solid var(--border, #e3e7ee);
  border-radius: 999px;
  font-size: 11px; font-weight: 700; letter-spacing: .04em;
  color: var(--text, #0f172a);
  font-variant-numeric: tabular-nums;
  text-transform: uppercase;
  line-height: 1;
}

.fn-hero__venue { text-align: right; min-width: 0; }
.fn-hero__venue-name {
  font-size: 12px; font-weight: 600; color: var(--text, #0f172a);
  line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.fn-hero__venue-city {
  font-size: 11px; font-weight: 500; color: var(--text-muted, #64748b);
  line-height: 1.3; margin-top: 2px;
}

/* ---- HERO body : teams + score ------------------------------------------ */
.fn-hero__body {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 20px;
  padding: 2px 0 2px;
}
.fn-hero__team { display: flex; align-items: center; gap: 12px; min-width: 0; }
/* HOME: block hugs the score (center of page). In row-reverse, flex-start = right. */
.fn-hero__team--home { flex-direction: row-reverse; justify-content: flex-start; }
/* AWAY: block hugs the score (center of page). Natural row, flex-start = left. */
.fn-hero__team--away { flex-direction: row; justify-content: flex-start; }
.fn-hero__team-meta { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.fn-hero__team--home .fn-hero__team-meta { align-items: flex-end; text-align: right; }
.fn-hero__team--away .fn-hero__team-meta { align-items: flex-start; text-align: left; }
.fn-hero__logo-wrap { flex-shrink: 0; }
.fn-hero__logo {
  width: 48px; height: 48px; object-fit: contain;
  background: transparent;
}
.fn-hero__logo--placeholder {
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--bg-elev-2, #f1f5f9);
  border-radius: 50%;
  font-weight: 800; color: var(--text-muted, #64748b);
}
.fn-hero__team-name {
  font-size: 15px; font-weight: 700; color: var(--text, #0f172a);
  line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  min-width: 0; max-width: 240px;
}
.fn-hero__team--home .fn-hero__team-name { text-align: right; }
.fn-hero__team--away .fn-hero__team-name { text-align: left; }

/* Team summary chips (goals, yellows count rule, reds repeated-icon rule) */
.fn-team-summary {
  display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px;
}
.fn-chip {
  display: inline-flex; align-items: center; gap: 3px;
  padding: 2px 7px; min-height: 20px;
  font-size: 11px; font-weight: 700; line-height: 1;
  border-radius: 999px;
  background: var(--bg-elev-2, #f1f5f9);
  color: var(--text, #0f172a);
  font-variant-numeric: tabular-nums;
}
.fn-chip__icon { font-size: 11px; line-height: 1; }
.fn-chip--yellow { background: #fff4c6; color: #7a5a00; }
.fn-chip--red    { background: #fde0e0; color: #a11818; }
.fn-chip--goals  { background: #e3f1ff; color: #0b4ea2; }

/* Center — minute + score */
.fn-hero__center { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.fn-hero__minute {
  font-size: 12px; font-weight: 800; letter-spacing: .04em;
  color: var(--text-muted, #64748b);
  text-transform: uppercase;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
.fn-hero__minute.is-live { color: var(--live, #e23636); }
.fn-hero__minute.is-finished { color: var(--text-muted, #64748b); }
.fn-hero__score {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 5px 20px;
  background: #ffe4e4;
  border-radius: 10px;
  font-size: 26px; font-weight: 800;
  color: #c1272d;
  font-variant-numeric: tabular-nums;
  letter-spacing: .02em;
  line-height: 1;
}
.fn-hero__center:not(.is-live) .fn-hero__score {
  background: var(--bg-elev-2, #f1f5f9);
  color: var(--text, #0f172a);
}
.fn-hero__score-sep { opacity: .55; font-weight: 600; }
.fn-hero__score-val { min-width: 18px; text-align: center; }

/* Possession bar under score */
.fn-poss {
  display: grid;
  grid-template-columns: 48px 1fr 48px;
  align-items: center;
  gap: 10px;
  max-width: 460px;
  margin: 6px auto 0;
  position: relative;
}
.fn-poss__val {
  font-size: 12px; font-weight: 700; color: var(--text, #0f172a);
  font-variant-numeric: tabular-nums;
}
.fn-poss__val--home { text-align: right; }
.fn-poss__val--away { text-align: left; }
.fn-poss__bar {
  display: flex; width: 100%; height: 6px; border-radius: 999px; overflow: hidden;
  background: var(--bg-elev-2, #f1f5f9);
}
.fn-poss__bar-home { background: #2f7d3b; }
.fn-poss__bar-away { background: #c7d2db; }
.fn-poss__label {
  grid-column: 1 / -1; text-align: center;
  font-size: 10px; font-weight: 600; letter-spacing: .06em;
  color: var(--text-muted, #64748b); text-transform: uppercase; margin-top: 2px;
}

/* ---- TABS --------------------------------------------------------------- */
.fn-tabs {
  display: flex; align-items: center; gap: 2px;
  padding: 0 12px;
  border-bottom: 1px solid var(--border, #e3e7ee);
  overflow-x: auto; scrollbar-width: none;
  background: var(--bg-elev, #ffffff);
}
.fn-tabs::-webkit-scrollbar { display: none; }
.fn-tabs__tab {
  position: relative;
  padding: 12px 14px;
  background: transparent; border: 0;
  font-size: 13px; font-weight: 600;
  color: var(--text-muted, #64748b);
  cursor: pointer; white-space: nowrap;
  font-family: inherit;
  transition: color 120ms ease;
}
.fn-tabs__tab:hover { color: var(--text, #0f172a); }
.fn-tabs__tab.is-active { color: var(--text, #0f172a); }
.fn-tabs__tab.is-active::after {
  content: ""; position: absolute; left: 10px; right: 10px; bottom: -1px;
  height: 2px; background: #2f7d3b; border-radius: 2px 2px 0 0;
}

/* ---- MIRROR TIMELINE (replaces the old 2-column list) ------------------
 * Reference: Référence nous t'aimons JESUS.png
 * Vertical spine at center. HOME events on left half, AWAY on right.
 * HOME half uses flex-direction:row-reverse so HTML order (content|icon|time)
 * renders visually as time|icon|content with time nearest the spine.
 * AWAY half uses natural flex direction: content|icon|time renders
 * content|icon|time → put content FIRST in HTML; then CSS reorders so time
 * is nearest the spine. (See .fn-tl__half--away rules below.)
 * -------------------------------------------------------------------------- */
.fn-timeline {
  padding: 14px 20px 4px;
  background: var(--bg-elev, #ffffff);
}
.fn-timeline__head {
  display: grid;
  grid-template-columns: 1fr 2px 1fr;
  gap: 20px;
  padding: 0 8px 10px;
  border-bottom: 1px solid var(--border, #e3e7ee);
  margin-bottom: 10px;
  align-items: center;
}
.fn-timeline__head-spine { background: var(--border, #e3e7ee); align-self: stretch; height: 100%; }
.fn-timeline__team {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 700; color: var(--text, #0f172a);
}
.fn-timeline__team--home { justify-content: flex-end; }
.fn-timeline__team--away { justify-content: flex-start; }
.fn-timeline__team-logo { width: 20px; height: 20px; object-fit: contain; flex-shrink: 0; }
.fn-timeline__list {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-direction: column; gap: 2px;
}
.fn-timeline__empty {
  padding: 24px; text-align: center;
  font-size: 12px; color: var(--text-muted, #64748b);
}

/* Row = three cells: home half | 2-px spine | away half */
.fn-tl {
  display: grid;
  grid-template-columns: 1fr 2px 1fr;
  align-items: stretch;
  min-height: 36px;
}
.fn-tl__spine {
  background: var(--border, #e3e7ee);
  align-self: stretch;
  width: 2px;
}

/* Each half is a flex row that holds (in HTML order) content, icon, minute.
 * HOME: flex-direction:row-reverse → visually minute | icon | content.
 * AWAY: flex-direction:row         → visually content | icon | minute.
 * Then we flip AWAY logical reading using the mirror CSS below so AWAY
 * ends up visually as minute | icon | content TOO — wait, re-read:
 * REFERENCE orders:
 *   HOME: Content | Icon | Minute  (minute toward the spine, content far-left)
 *   AWAY: Minute  | Icon | Content (minute toward the spine, content far-right)
 * We render HTML content|icon|minute in BOTH halves.
 * HOME half uses flex-direction:row (natural) with justify-content:flex-end
 *   so the whole group hugs the spine. Order: content | icon | minute,
 *   with minute right next to the spine.
 * AWAY half uses flex-direction:row-reverse with justify-content:flex-end
 *   so visually: minute | icon | content, minute right next to the spine. */
.fn-tl__half {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  min-height: 36px;
}
.fn-tl__half--home {
  flex-direction: row;
  justify-content: flex-end;
  text-align: right;
}
.fn-tl__half--away {
  flex-direction: row-reverse;
  justify-content: flex-end;
  text-align: left;
}

.fn-tl__content { min-width: 0; flex: 0 1 auto; font-size: 13px; color: var(--text, #0f172a); line-height: 1.3; }
.fn-tl__content b, .fn-tl__player { font-weight: 700; }
.fn-tl__annot  { color: var(--text-muted, #64748b); font-weight: 500; font-size: 12px; }
.fn-tl__muted  { color: var(--text-muted, #64748b); font-style: italic; }

.fn-tl__icon {
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0; min-width: 22px; height: 22px;
  font-size: 14px; line-height: 1; font-weight: 700;
}
.fn-tl__icon--var {
  font-size: 9px; letter-spacing: .04em;
  padding: 2px 5px;
  background: #e3f1ff; color: #0b4ea2;
  border-radius: 4px;
}
.fn-tl__icon--substitution { color: #2f7d3b; font-size: 16px; }
.fn-tl__icon--goal, .fn-tl__icon--own_goal, .fn-tl__icon--penalty { font-size: 17px; }
.fn-tl__icon--yellow_card, .fn-tl__icon--red_card { font-size: 13px; }

.fn-tl__time {
  flex-shrink: 0;
  min-width: 44px;
  padding: 2px 8px;
  background: var(--bg-elev-2, #f1f5f9);
  border-radius: 6px;
  font-size: 11px; font-weight: 700; color: var(--text-muted, #64748b);
  font-variant-numeric: tabular-nums;
  text-align: center;
  line-height: 1.3;
}

/* Substitution content : two stacked lines ↑ in / ↓ out */
.fn-tl__sub { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.fn-tl__sub-in,
.fn-tl__sub-out {
  display: inline-flex; align-items: baseline; gap: 4px;
  font-size: 13px; line-height: 1.25;
}
.fn-tl__half--home .fn-tl__sub-in,
.fn-tl__half--home .fn-tl__sub-out { justify-content: flex-end; }
.fn-tl__half--away .fn-tl__sub-in,
.fn-tl__half--away .fn-tl__sub-out { justify-content: flex-start; flex-direction: row; }
.fn-tl__half--home .fn-tl__sub-in,
.fn-tl__half--home .fn-tl__sub-out { flex-direction: row-reverse; }
.fn-tl__arrow { font-weight: 800; font-size: 13px; line-height: 1; }
.fn-tl__arrow--in  { color: #1b8a2d; }
.fn-tl__arrow--out { color: #c62525; }
.fn-tl__sub-in b   { color: var(--text, #0f172a); font-weight: 700; }
.fn-tl__sub-out    { color: var(--text-muted, #64748b); font-weight: 500; }

/* VAR content: short decision label */
.fn-tl__var { font-size: 13px; font-weight: 600; color: var(--text, #0f172a); }
.fn-tl__var--muted { color: var(--text-muted, #64748b); font-style: italic; font-weight: 500; }

/* Legacy classes retained for safety; new layout uses .fn-timeline */
.fn-events-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 12px; padding: 14px 14px 0;
}
.fn-events-col {
  background: var(--bg-elev, #ffffff);
  border: 1px solid var(--border, #e3e7ee);
  border-radius: 10px;
  overflow: hidden;
}
.fn-events-col__head {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px;
  background: var(--bg-elev-2, #f8fafc);
  border-bottom: 1px solid var(--border, #e3e7ee);
  min-height: 42px;
}
.fn-events-col__logo { width: 22px; height: 22px; object-fit: contain; }
.fn-events-col__name {
  font-size: 13px; font-weight: 700; color: var(--text, #0f172a);
  line-height: 1.2; flex: 1 1 auto;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.fn-events-col__status {
  font-size: 11px; font-weight: 700; letter-spacing: .04em;
  color: var(--text-muted, #64748b); font-variant-numeric: tabular-nums;
}
.fn-events-col__status.is-live {
  color: var(--live, #e23636);
}
.fn-events-col__list {
  list-style: none; margin: 0; padding: 4px 0;
}
.fn-events-col__empty {
  padding: 20px 14px; text-align: center;
  font-size: 12px; color: var(--text-muted, #64748b);
}

.fn-event {
  display: grid;
  grid-template-columns: 48px 28px 1fr;
  align-items: start;
  gap: 10px;
  padding: 8px 14px;
  border-top: 1px solid var(--border, #e8ebef);
}
.fn-events-col__list > .fn-event:first-child { border-top: 0; }
.fn-event__time {
  font-size: 12px; font-weight: 700;
  color: var(--text-muted, #64748b);
  font-variant-numeric: tabular-nums;
  padding-top: 2px;
  text-align: left;
}
.fn-event__icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 24px; height: 24px;
  font-size: 14px; line-height: 1;
  background: var(--bg-elev-2, #f1f5f9);
  border-radius: 6px; color: var(--text, #0f172a); font-weight: 700;
}
.fn-event__icon--var { font-size: 9px; letter-spacing: .04em; background: #e3f1ff; color: #0b4ea2; }
.fn-event__icon--yellow_card { background: transparent; }
.fn-event__icon--red_card    { background: transparent; }
.fn-event__icon--second_yellow_card { background: transparent; letter-spacing: -2px; }
.fn-event__icon--goal, .fn-event__icon--penalty, .fn-event__icon--own_goal { background: transparent; font-size: 18px; }
.fn-event__icon--substitution { background: #e8f3eb; color: #2f7d3b; font-size: 15px; }
.fn-event__icon--big_chance { background: #fff2d1; color: #a26c0e; }
.fn-event__body { min-width: 0; }
.fn-event__type {
  font-size: 12px; font-weight: 700; color: var(--text, #0f172a);
  line-height: 1.25;
}
.fn-event__detail {
  font-size: 11px; color: var(--text-muted, #64748b);
  line-height: 1.3; margin-top: 2px;
  overflow: hidden; text-overflow: ellipsis;
}

/* ---- INSIGHTS grid (1, 2, or 3 cards) ----------------------------------- */
.fn-insights {
  display: grid; grid-template-columns: 1fr 1fr 1fr;
  gap: 12px; padding: 12px 14px 16px;
}
.fn-insights.fn-insights--1 { grid-template-columns: 1fr; max-width: 480px; margin: 0 auto; }
.fn-insights.fn-insights--2 { grid-template-columns: 1fr 1fr; }
.fn-insights.fn-insights--3 { grid-template-columns: 1fr 1fr 1fr; }

/* ---- Fil chronologique (Commentaires tab) ------------------------------- */
.fn-comments__list { list-style: none; margin: 0; padding: 0 14px 14px; display: flex; flex-direction: column; gap: 4px; }
.fn-comments__item { display: grid; grid-template-columns: 48px 28px 1fr; gap: 8px; align-items: center; padding: 6px 0; border-top: 1px solid var(--border, #eef1f5); font-size: 13px; }
.fn-comments__item:first-child { border-top: 0; }
.fn-comments__time { font-weight: 700; font-size: 12px; color: var(--text-muted, #64748b); font-variant-numeric: tabular-nums; }
.fn-comments__icon { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; font-size: 13px; }
.fn-comments__text { color: var(--text, #0f172a); }
.fn-comments__item--home .fn-comments__icon,
.fn-comments__item--away .fn-comments__icon { background: var(--bg-elev-2, #f1f5f9); border-radius: 4px; }

.fn-card {
  background: var(--bg-elev, #ffffff);
  border: 1px solid var(--border, #e3e7ee);
  border-radius: 10px;
  display: flex; flex-direction: column; min-width: 0;
  overflow: hidden;
}
.fn-card__head {
  padding: 10px 14px;
  background: var(--bg-elev-2, #f8fafc);
  border-bottom: 1px solid var(--border, #e3e7ee);
}
.fn-card__title {
  font-size: 12px; font-weight: 700; letter-spacing: .04em;
  text-transform: uppercase; color: var(--text, #0f172a);
}
.fn-card__body { padding: 10px 14px; }
.fn-card__empty {
  padding: 20px 14px; text-align: center;
  font-size: 12px; color: var(--text-muted, #64748b);
}

/* Statrow (used in Key Stats card AND full-stats tab) */
.fn-statrow {
  display: grid; grid-template-columns: 44px 1fr 44px;
  align-items: center; gap: 10px;
  padding: 6px 0;
}
.fn-statrow__val {
  font-size: 13px; font-weight: 700; color: var(--text, #0f172a);
  font-variant-numeric: tabular-nums;
}
.fn-statrow__val--home { text-align: right; }
.fn-statrow__val--away { text-align: left; }
.fn-tabpane--stats .fn-stats-frame { margin: 12px; border: 1px solid var(--border, #e2e8f0); border-radius: 11px; overflow: hidden; }
.fn-tabpane--stats .fn-stats-table { width: 100%; table-layout: fixed; border-collapse: separate; border-spacing: 0; font-size: 13px; color: var(--text, #334155); font-variant-numeric: tabular-nums; }
.fn-tabpane--stats .fn-stats-table th,
.fn-tabpane--stats .fn-stats-table td { padding: 10px 12px; line-height: 1.4; vertical-align: middle; border-bottom: 1px solid var(--border, #e2e8f0); }
.fn-tabpane--stats .fn-stats-table thead { background: #e7f1ff; color: #193a62; }
.fn-tabpane--stats .fn-stats-table thead th { font-size: 12px; font-weight: 600; overflow-wrap: anywhere; text-align: center; }
.fn-tabpane--stats .fn-stats-table th:first-child { width: 40%; text-align: left; }
.fn-tabpane--stats .fn-stats-table tbody th { font-weight: 500; }
.fn-tabpane--stats .fn-stats-table td { text-align: center; font-weight: 550; border-left: 1px solid var(--border, #e2e8f0); }
.fn-tabpane--stats .fn-stats-team { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; min-height: 54px; }
.fn-tabpane--stats .fn-stats-team-logo { display: block; flex: none; width: 30px; height: 30px; }
.fn-tabpane--stats .fn-stats-team img { width: 30px; height: 30px; object-fit: contain; }
.fn-tabpane--stats .fn-stats-table tbody tr:nth-child(odd) { background: rgba(100, 116, 139, .045); }
.fn-tabpane--stats .fn-stats-table tbody tr:last-child > * { border-bottom: 0; }
.fn-tabpane--stats .fn-stats-label { display: flex; align-items: center; gap: 10px; overflow-wrap: anywhere; }
.fn-tabpane--stats .fn-stat-icon { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 18px; width: 18px; height: 18px; color: #64748b; }
.fn-tabpane--stats .fn-stat-icon svg { width: 18px; height: 18px; }
.fn-tabpane--stats .fn-stats-caption { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
[data-theme="dark"] .fn-tabpane--stats .fn-stats-table { color: var(--text, #e6ebf3); }
[data-theme="dark"] .fn-tabpane--stats .fn-stats-table thead { background: #c1dbfa; color: #193a62; }
[data-theme="dark"] .fn-tabpane--stats .fn-stat-icon { color: #a6b6cd; }
@media (max-width: 600px) {
  .fn-tabpane--stats .fn-stats-frame { margin: 8px; }
  .fn-tabpane--stats .fn-stats-table th,
  .fn-tabpane--stats .fn-stats-table td { padding: 9px 6px; font-size: 11.5px; }
  .fn-tabpane--stats .fn-stats-table thead th { font-size: 11px; }
  .fn-tabpane--stats .fn-stats-table th:first-child { width: 42%; }
  .fn-tabpane--stats .fn-stats-label { gap: 6px; }
}
.fn-statrow__middle { display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 0; }
.fn-statrow__label {
  font-size: 11px; font-weight: 600; letter-spacing: .03em;
  text-transform: uppercase; color: var(--text-muted, #64748b);
}
.fn-statrow__bar {
  display: flex; width: 100%; height: 5px; border-radius: 999px; overflow: hidden;
  background: var(--bg-elev-2, #f1f5f9);
}
.fn-statrow__bar-home { background: #2f7d3b; }
.fn-statrow__bar-away { background: #c7d2db; }

/* Highlights (temps forts) */
.fn-hl__list { list-style: none; margin: 0; padding: 10px 14px 14px; display: flex; flex-direction: column; gap: 8px; }
.fn-hl {
  display: grid; grid-template-columns: 40px 24px 1fr;
  gap: 8px; align-items: start;
  font-size: 12px; color: var(--text, #0f172a); line-height: 1.3;
}
.fn-hl__time {
  font-weight: 700; color: var(--text-muted, #64748b);
  font-variant-numeric: tabular-nums;
}
.fn-hl__icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 20px; height: 20px; font-size: 13px; line-height: 1;
}
.fn-hl--var    .fn-hl__icon { font-size: 9px; font-weight: 700; letter-spacing: .04em; color: #0b4ea2; }
.fn-hl--goal   .fn-hl__icon,
.fn-hl--penalty .fn-hl__icon { font-size: 16px; }
.fn-hl__text { color: var(--text, #0f172a); font-weight: 500; }

/* Key players */
.fn-kp__body {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
  padding: 10px 12px 14px;
}
.fn-kp {
  display: flex; flex-direction: column; gap: 2px;
  padding: 10px; min-width: 0;
  background: var(--bg-elev-2, #f8fafc);
  border: 1px solid var(--border, #e3e7ee);
  border-radius: 8px;
}
.fn-kp__name {
  font-size: 13px; font-weight: 700; color: var(--text, #0f172a); line-height: 1.2;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.fn-kp__team { font-size: 11px; color: var(--text-muted, #64748b); line-height: 1.2; margin-bottom: 4px; }
.fn-kp__stats { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.fn-kp__stat {
  display: flex; align-items: baseline; gap: 6px;
  font-size: 12px; color: var(--text, #0f172a);
}
.fn-kp__stat-val { font-weight: 700; font-variant-numeric: tabular-nums; }
.fn-kp__stat-label { color: var(--text-muted, #64748b); }

/* Full-stats tab wrapper */
.fn-tabpane { padding: 14px; }

/* ---- Responsive --------------------------------------------------------- */
@media (max-width: 1024px) {
  .fn-insights.fn-insights--3 { grid-template-columns: 1fr 1fr; }
  .fn-insights.fn-insights--3 .fn-card--kp { grid-column: 1 / -1; }
}
@media (max-width: 720px) {
  .fn-hero { padding: 12px 14px 14px; }
  .fn-hero__top { grid-template-columns: 1fr; gap: 8px; text-align: center; }
  .fn-hero__comp { justify-content: center; }
  .fn-hero__venue { text-align: center; }
  .fn-hero__body { grid-template-columns: 1fr auto 1fr; gap: 10px; }
  .fn-hero__team--home { flex-direction: column-reverse; }
  .fn-hero__team--away { flex-direction: column; }
  .fn-hero__team-meta { align-items: center !important; text-align: center !important; }
  .fn-hero__team-name { font-size: 13px; max-width: 110px; text-align: center; }
  .fn-hero__logo { width: 44px; height: 44px; }
  .fn-hero__score { font-size: 24px; padding: 5px 14px; }
  .fn-timeline { padding: 10px 10px 4px; }
  .fn-timeline__head { padding: 0 2px 8px; gap: 10px; }
  .fn-tl { grid-template-columns: 1fr 2px 1fr; }
  .fn-tl__half { padding: 6px 8px; gap: 6px; }
  .fn-tl__time { min-width: 36px; padding: 2px 5px; font-size: 10px; }
  .fn-tl__content { font-size: 12px; }
  .fn-events-grid { grid-template-columns: 1fr; }
  .fn-insights, .fn-insights.fn-insights--1, .fn-insights.fn-insights--2, .fn-insights.fn-insights--3 { grid-template-columns: 1fr; max-width: none; }
  .fn-insights .fn-card--kp { grid-column: auto; }
  .fn-kp__body { grid-template-columns: 1fr; }
}

/* ---- Dark mode ---------------------------------------------------------- */
[data-theme="dark"] .fn-match-shell {
  background: var(--bg-elev, #161e2b);
  border-color: var(--border, #232c3b);
  color: var(--text, #e6ebf3);
}
[data-theme="dark"] .fn-hero { background: var(--bg-elev, #161e2b); border-bottom-color: var(--border, #232c3b); }
[data-theme="dark"] .fn-hero__datebox { background: var(--bg-elev-2, #1c2533); border-color: var(--border, #232c3b); color: var(--text, #e6ebf3); }
[data-theme="dark"] .fn-hero__comp-name,
[data-theme="dark"] .fn-hero__venue-name,
[data-theme="dark"] .fn-hero__team-name { color: var(--text, #e6ebf3); }
[data-theme="dark"] .fn-hero__comp-country,
[data-theme="dark"] .fn-hero__venue-city { color: var(--text-muted, #95a0b3); }
[data-theme="dark"] .fn-chip { background: var(--bg-elev-2, #1c2533); color: var(--text, #e6ebf3); }
[data-theme="dark"] .fn-chip--yellow { background: #3b3104; color: #f5d04b; }
[data-theme="dark"] .fn-chip--red    { background: #3a1414; color: #ff6b6b; }
[data-theme="dark"] .fn-chip--goals  { background: #0f2a4d; color: #78aefc; }
[data-theme="dark"] .fn-hero__minute { color: var(--text-muted, #95a0b3); }
[data-theme="dark"] .fn-hero__minute.is-live { color: var(--live, #ff5050); }
[data-theme="dark"] .fn-hero__score { background: #3a1818; color: #ff6b6b; }
[data-theme="dark"] .fn-hero__center:not(.is-live) .fn-hero__score { background: var(--bg-elev-2, #1c2533); color: var(--text, #e6ebf3); }
[data-theme="dark"] .fn-poss__bar  { background: var(--bg-elev-2, #1c2533); }
[data-theme="dark"] .fn-poss__bar-home { background: #4caf6a; }
[data-theme="dark"] .fn-poss__bar-away { background: #3c4a60; }
[data-theme="dark"] .fn-poss__label { color: var(--text-muted, #95a0b3); }
[data-theme="dark"] .fn-tabs { background: var(--bg-elev, #161e2b); border-bottom-color: var(--border, #232c3b); }
[data-theme="dark"] .fn-tabs__tab { color: var(--text-muted, #95a0b3); }
[data-theme="dark"] .fn-tabs__tab.is-active { color: var(--text, #e6ebf3); }
[data-theme="dark"] .fn-tabs__tab.is-active::after { background: #4caf6a; }
[data-theme="dark"] .fn-events-col,
[data-theme="dark"] .fn-card { background: var(--bg-elev, #161e2b); border-color: var(--border, #232c3b); }
[data-theme="dark"] .fn-events-col__head,
[data-theme="dark"] .fn-card__head { background: var(--bg-elev-2, #1c2533); border-bottom-color: var(--border, #232c3b); }
[data-theme="dark"] .fn-event { border-top-color: var(--border, #232c3b); }
[data-theme="dark"] .fn-event__time,
[data-theme="dark"] .fn-events-col__status,
[data-theme="dark"] .fn-statrow__label,
[data-theme="dark"] .fn-card__empty,
[data-theme="dark"] .fn-event__detail,
[data-theme="dark"] .fn-events-col__empty,
[data-theme="dark"] .fn-kp__team,
[data-theme="dark"] .fn-kp__stat-label,
[data-theme="dark"] .fn-hl__time { color: var(--text-muted, #95a0b3); }
[data-theme="dark"] .fn-event__type,
[data-theme="dark"] .fn-events-col__name,
[data-theme="dark"] .fn-card__title,
[data-theme="dark"] .fn-statrow__val,
[data-theme="dark"] .fn-kp__name,
[data-theme="dark"] .fn-kp__stat-val,
[data-theme="dark"] .fn-hl__text { color: var(--text, #e6ebf3); }
[data-theme="dark"] .fn-event__icon { background: var(--bg-elev-2, #1c2533); color: var(--text, #e6ebf3); }
[data-theme="dark"] .fn-event__icon--var { background: #0f2a4d; color: #78aefc; }
[data-theme="dark"] .fn-event__icon--substitution { background: #0f3321; color: #6fcf8d; }
[data-theme="dark"] .fn-event__icon--big_chance { background: #3b2a05; color: #e5b36b; }
[data-theme="dark"] .fn-statrow__bar { background: var(--bg-elev-2, #1c2533); }
[data-theme="dark"] .fn-statrow__bar-home { background: #4caf6a; }
[data-theme="dark"] .fn-statrow__bar-away { background: #3c4a60; }
[data-theme="dark"] .fn-kp { background: var(--bg-elev-2, #1c2533); border-color: var(--border, #232c3b); }

/* Mirror timeline — dark */
[data-theme="dark"] .fn-timeline { background: var(--bg-elev, #161e2b); }
[data-theme="dark"] .fn-timeline__head { border-bottom-color: var(--border, #232c3b); }
[data-theme="dark"] .fn-timeline__head-spine { background: var(--border, #232c3b); }
[data-theme="dark"] .fn-timeline__team,
[data-theme="dark"] .fn-tl__content,
[data-theme="dark"] .fn-tl__player,
[data-theme="dark"] .fn-tl__var,
[data-theme="dark"] .fn-tl__sub-in b { color: var(--text, #e6ebf3); }
[data-theme="dark"] .fn-tl__spine { background: var(--border, #232c3b); }
[data-theme="dark"] .fn-tl__time { background: var(--bg-elev-2, #1c2533); color: var(--text-muted, #95a0b3); }
[data-theme="dark"] .fn-tl__icon--var { background: #0f2a4d; color: #78aefc; }
[data-theme="dark"] .fn-tl__icon--substitution { color: #6fcf8d; }
[data-theme="dark"] .fn-tl__annot,
[data-theme="dark"] .fn-tl__sub-out,
[data-theme="dark"] .fn-tl__muted,
[data-theme="dark"] .fn-tl__var--muted,
[data-theme="dark"] .fn-timeline__empty { color: var(--text-muted, #95a0b3); }
[data-theme="dark"] .fn-tl__arrow--in  { color: #4caf6a; }
[data-theme="dark"] .fn-tl__arrow--out { color: #ff6b6b; }
[data-theme="dark"] .fn-comments__item { border-top-color: var(--border, #232c3b); }
[data-theme="dark"] .fn-comments__time { color: var(--text-muted, #95a0b3); }
[data-theme="dark"] .fn-comments__text { color: var(--text, #e6ebf3); }
[data-theme="dark"] .fn-comments__item--home .fn-comments__icon,
[data-theme="dark"] .fn-comments__item--away .fn-comments__icon { background: var(--bg-elev-2, #1c2533); }

/* =============================================================================
 * LEGACY INTERNAL CONTENT (match detail + league pages, retained for safety)
 * ============================================================================ */
.sed-football-breadcrumb { padding: 8px 16px 12px; font-size: 12px; }
.sed-football-breadcrumb a { color: var(--text-muted); text-decoration: none; }
.sed-football-breadcrumb a:hover { color: var(--accent); }

.sed-football-match-detail__header {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px;
  padding: 24px 20px; border-bottom: 1px solid var(--border);
}
.sed-football-match-detail__side { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.sed-football-match-detail__team-logo { width: 56px; height: 56px; object-fit: contain; background: var(--bg-elev-2); border-radius: 50%; }
.sed-football-match-detail__team-name { font-size: 15px; font-weight: 700; text-align: center; color: var(--text-strong); }
.sed-football-match-detail__center { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.sed-football-match-detail__score { font-size: 36px; font-weight: 800; color: var(--text-strong); letter-spacing: .02em; }
.sed-football-match-detail__status { font-size: 12px; font-weight: 700; letter-spacing: .04em; color: var(--text-muted); text-transform: uppercase; }
.sed-football-match-detail__status--live { color: var(--live, #e23636); }
.sed-football-match-detail__meta { font-size: 11px; color: var(--text-muted); text-align: center; margin-top: 2px; }

.sed-football-events { padding: 16px 20px; }
.sed-football-events__title { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--text-muted); margin-bottom: 10px; }
.sed-football-event { display: grid; grid-template-columns: 48px 1fr; gap: 10px; padding: 8px 0; border-top: 1px solid var(--border); font-size: 13px; }
.sed-football-event:first-child { border-top: none; }
.sed-football-event__time { font-weight: 700; color: var(--text-muted); font-size: 12px; }
.sed-football-event__detail { color: var(--text-strong); }
.sed-football-event__type { display: inline-block; padding: 1px 6px; border-radius: 4px; font-size: 10px; font-weight: 700; text-transform: uppercase; margin-right: 6px; background: var(--bg-elev-2); color: var(--text-muted); }

.sed-football-stats { padding: 16px 20px; border-top: 1px solid var(--border); }
.sed-football-stats__title { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--text-muted); margin-bottom: 12px; }
.sed-football-stat { display: grid; grid-template-columns: 56px 1fr 56px; align-items: center; gap: 10px; padding: 6px 0; }
.sed-football-stat__home, .sed-football-stat__away { font-weight: 700; color: var(--text-strong); font-size: 13px; font-variant-numeric: tabular-nums; }
.sed-football-stat__home { text-align: right; }
.sed-football-stat__away { text-align: left; }
.sed-football-stat__middle { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.sed-football-stat__label { font-size: 11px; color: var(--text-muted); font-weight: 600; text-transform: uppercase; letter-spacing: .03em; }
.sed-football-stat__bar { display: flex; width: 100%; height: 6px; border-radius: 3px; overflow: hidden; background: var(--bg-elev-2); }
.sed-football-stat__bar-home { background: #1976d2; }
.sed-football-stat__bar-away { background: #d64545; }

.sed-football-tv { padding: 16px 20px; border-top: 1px solid var(--border); }
.sed-football-tv__list { display: flex; flex-wrap: wrap; gap: 6px; }
.sed-football-tv__chip { padding: 4px 10px; border-radius: 999px; font-size: 11px; background: var(--bg-elev-2); color: var(--text-strong); font-weight: 600; }

.sed-football-week-section { margin-bottom: 16px; }
.sed-football-week-section__title { padding: 10px 14px 6px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--text-muted); }

.sed-football-standings__table { width: 100%; border-collapse: collapse; font-size: 13px; }
.sed-football-standings__table th { text-align: left; padding: 8px 6px; font-size: 11px; font-weight: 700; text-transform: uppercase; color: var(--text-muted); border-bottom: 1px solid var(--border); }
.sed-football-standings__table td { padding: 10px 6px; border-bottom: 1px solid var(--border); color: var(--text-strong); }
.sed-football-standings__pos { text-align: center; font-weight: 700; color: var(--text-muted); width: 32px; }
.sed-football-standings__team { display: flex; align-items: center; gap: 8px; }
.sed-football-standings__team-logo { width: 20px; height: 20px; object-fit: contain; background: var(--bg-elev-2); border-radius: 50%; }
.sed-football-standings__num { text-align: center; width: 36px; font-variant-numeric: tabular-nums; }
.sed-football-standings__pts { font-weight: 700; text-align: center; width: 44px; }

@media (max-width: 720px) {
  .sed-football-match-detail__header { grid-template-columns: 1fr; gap: 10px; padding: 16px; }
  .sed-football-match-detail__team-logo { width: 44px; height: 44px; }
  .sed-football-match-detail__score { font-size: 28px; }
  .sed-football-standings__table { font-size: 11px; }
  .sed-football-standings__table th, .sed-football-standings__table td { padding: 6px 3px; }
}

/* Football match — digital polish. All overrides are restricted to this page.
 * Both timeline halves share the same track sizes, gaps and axis inset.
 * Site color tokens supply the light/dark palette without changing other sports.
 */
#fn-match {
  --fn-surface: color-mix(in srgb, var(--bg-elev) 90%, var(--bg-page) 10%);
  --fn-line: var(--border-soft, var(--border));
  --fn-primary: var(--text-main, var(--text));
  --fn-secondary: var(--text-secondary, var(--text-muted));
  --fn-muted: var(--text-dim, var(--text-muted));
  --fn-axis-width: 1px;
  --fn-axis-inset: 12px;
  --fn-event-gap: 10px;
  --fn-time-width: 44px;
  --fn-icon-width: 24px;
  --fn-in: color-mix(in srgb, var(--success) 84%, var(--fn-primary) 16%);
  --fn-out: color-mix(in srgb, var(--live) 80%, var(--fn-primary) 20%);
  background: var(--fn-surface);
  border-color: var(--fn-line);
  border-radius: var(--radius-md, 12px);
  box-shadow: 0 2px 8px rgba(25, 45, 75, .025);
  color: var(--fn-primary);
  font-weight: 400;
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
#fn-match *, #fn-match *::before, #fn-match *::after { box-sizing: border-box; }
.football-match-page .fn-nav-icon { display: inline-block; flex-shrink: 0; vertical-align: -2px; margin-right: 3px; }

#fn-match .fn-hero { padding: 8px 20px 10px; background: var(--fn-surface); border-color: var(--fn-line); }
/* Same translucent veil as the Hockey hero, layered below all match content. */
.football-match-page #fn-match .fn-hero {
  background-image: linear-gradient(rgba(255, 255, 255, 0.86), rgba(255, 255, 255, 0.86)),
    url("/images/bacground%20toolbar/background_football.webp");
  background-repeat: no-repeat;
  background-position: center center;
  background-size: cover;
}
[data-theme="dark"] .football-match-page #fn-match .fn-hero {
  background-image: linear-gradient(rgba(10, 14, 23, 0.76), rgba(10, 14, 23, 0.76)),
    url("/images/bacground%20toolbar/background_football.webp");
}

#fn-match .fn-hero__top { grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 14px; padding-bottom: 2px; }
#fn-match .fn-hero__comp { gap: 8px; }
#fn-match .fn-hero__comp-name { font-weight: 600; color: var(--fn-primary); }
#fn-match .fn-hero__comp-country { font-weight: 400; color: var(--fn-secondary); }
#fn-match .fn-hero__datebox {
  min-width: 0; min-height: 24px; padding: 4px 12px;
  border-radius: 7px; border-color: var(--fn-line);
  background: color-mix(in srgb, var(--bg-elev-2) 75%, var(--fn-surface) 25%);
  color: var(--fn-secondary); font-weight: 500; font-size: 10px; letter-spacing: .035em;
}
#fn-match .fn-hero__venue-name { color: var(--fn-secondary); font-weight: 400; font-size: 11px; }
#fn-match .fn-hero__venue-city { color: var(--fn-muted); font-weight: 400; font-size: 10px; }
#fn-match .fn-hero__body { grid-template-columns: minmax(0, 1fr) 112px minmax(0, 1fr); gap: 24px; padding: 0; }
#fn-match .fn-hero__team { gap: 14px; }
#fn-match .fn-hero__team-meta { gap: 6px; }
#fn-match .fn-hero__logo { display: block; width: 44px; height: 44px; }
#fn-match .fn-hero__team-name { color: var(--fn-primary); font-weight: 600; font-size: 15px; letter-spacing: -.015em; }
#fn-match .fn-hero__center { gap: 5px; }
#fn-match .fn-hero__minute { color: var(--fn-secondary); font-size: 9px; font-weight: 500; letter-spacing: .12em; }
#fn-match .fn-hero__minute.is-live { color: var(--live); }
#fn-match .fn-hero__score {
  width: 100%; justify-content: center; gap: 12px; padding: 5px 10px;
  border: 1px solid var(--fn-line); border-radius: 8px;
  background: color-mix(in srgb, var(--bg-elev-2) 65%, var(--fn-surface) 35%);
  color: var(--fn-primary); font-size: 30px; font-weight: 600; letter-spacing: -.04em;
  font-variant-numeric: tabular-nums lining-nums;
}
#fn-match .fn-hero__center.is-live .fn-hero__score { color: var(--live); background: var(--live-soft); }
#fn-match .fn-hero__score-sep { color: var(--fn-muted); font-size: 20px; font-weight: 400; opacity: 1; }
#fn-match .fn-team-summary { gap: 7px; min-height: 20px; }
#fn-match .fn-chip { padding: 0; gap: 5px; min-height: 20px; border-radius: 0; background: transparent; color: var(--fn-secondary); font-weight: 500; font-size: 11px; }
#fn-match .fn-chip__icon { display: inline-flex; align-items: center; justify-content: center; width: 14px; height: 20px; }

#fn-match .fn-tabs { gap: 16px; padding: 0 20px; background: var(--fn-surface); border-color: var(--fn-line); }
#fn-match .fn-tabs__tab { padding: 11px 2px; color: var(--fn-secondary); font-weight: 500; font-size: 12px; line-height: 16px; }
#fn-match .fn-tabs__tab:hover, #fn-match .fn-tabs__tab.is-active { color: var(--fn-primary); }
#fn-match .fn-tabs__tab.is-active { font-weight: 600; }
#fn-match .fn-tabs__tab.is-active::after { left: 0; right: 0; bottom: 0; height: 2px; background: var(--success); border-radius: 1px; }
#fn-match .fn-tabs__tab:focus-visible { outline: 2px solid var(--success); outline-offset: -3px; border-radius: 3px; }

#fn-match .fn-timeline { padding: 8px 18px 6px; background: var(--fn-surface); }
#fn-match .fn-timeline__head {
  grid-template-columns: minmax(0, 1fr) var(--fn-axis-width) minmax(0, 1fr);
  gap: 0; min-height: 36px; padding: 0; margin: 0;
  border-bottom: 0; background: transparent;
}
#fn-match .fn-timeline__team { min-width: 0; gap: 8px; padding: 8px var(--fn-axis-inset); color: var(--fn-secondary); font-weight: 600; font-size: 12px; }
#fn-match .fn-timeline__team--home { flex-direction: row-reverse; justify-content: flex-start; }
#fn-match .fn-timeline__team-logo { width: 18px; height: 18px; }
#fn-match .fn-timeline__team-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#fn-match .fn-timeline__head-spine { background: var(--fn-line); width: var(--fn-axis-width); }
#fn-match .fn-timeline__list { gap: 0; }
#fn-match .fn-tl {
  grid-template-columns: minmax(0, 1fr) var(--fn-axis-width) minmax(0, 1fr);
  min-height: 42px; border-radius: 5px; background: transparent;
  transition: background-color 150ms ease;
}
#fn-match .fn-tl--substitution { min-height: 44px; }
#fn-match .fn-tl__spine { position: relative; width: var(--fn-axis-width); background: var(--fn-line); }
#fn-match .fn-tl__spine::after {
  content: ""; position: absolute; top: 50%; left: 50%; width: 3px; height: 3px;
  transform: translate(-50%, -50%); border-radius: 50%;
  background: color-mix(in srgb, var(--fn-muted) 42%, var(--fn-surface) 58%);
}
#fn-match .fn-tl__half {
  display: grid; align-items: center; column-gap: var(--fn-event-gap);
  padding: 5px var(--fn-axis-inset); min-width: 0; min-height: 0;
}
#fn-match .fn-tl__half--home { grid-template-columns: minmax(0, 1fr) var(--fn-icon-width) var(--fn-time-width); grid-template-areas: "content icon time"; text-align: right; }
#fn-match .fn-tl__half--away { grid-template-columns: var(--fn-time-width) var(--fn-icon-width) minmax(0, 1fr); grid-template-areas: "time icon content"; text-align: left; }
#fn-match .fn-tl__content { grid-area: content; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; color: var(--fn-primary); font-size: 12.5px; line-height: 17px; }
#fn-match .fn-tl__content b, #fn-match .fn-tl__player, #fn-match .fn-tl__sub-in b { color: var(--fn-primary); font-weight: 600; }
#fn-match .fn-tl__annot { color: var(--fn-secondary); font-size: 10.5px; font-weight: 400; }
#fn-match .fn-tl__muted { color: var(--fn-muted); font-style: normal; }
#fn-match .fn-tl__icon {
  grid-area: icon; display: flex; align-items: center; justify-content: center;
  width: var(--fn-icon-width); min-width: 0; height: 20px; padding: 0;
  border: 0; border-radius: 0; background: transparent; color: var(--fn-secondary); line-height: 1;
}
#fn-match .fn-tl__time {
  grid-area: time; width: var(--fn-time-width); min-width: 0; padding: 3px 1px;
  border: 1px solid var(--fn-line); border-radius: 5px;
  background: color-mix(in srgb, var(--bg-elev-2) 65%, var(--fn-surface) 35%);
  color: var(--fn-secondary); font-size: 10px; font-weight: 600; line-height: 14px;
  font-variant-numeric: tabular-nums lining-nums; white-space: nowrap;
}
#fn-match .fn-tl__sub { gap: 0; }
#fn-match .fn-tl__sub-in, #fn-match .fn-tl__sub-out { display: block; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: inherit; line-height: 17px; }
#fn-match .fn-tl__sub-out { color: var(--fn-secondary); font-weight: 400; }
#fn-match .fn-tl__var { color: var(--fn-primary); font-size: inherit; font-weight: 500; }
#fn-match .fn-tl__var--muted { color: var(--fn-secondary); font-style: normal; font-weight: 400; font-size: 11px; }

#fn-match .fn-event-svg { display: block; width: 20px; height: 20px; flex-shrink: 0; }
#fn-match .fn-card-mark { display: block; width: 12px; height: 17px; border-radius: 2.5px; border: 1px solid rgba(120, 82, 15, .23); }
#fn-match .fn-card-mark--yellow { background: linear-gradient(145deg, #edca64, #dfb239); }
#fn-match .fn-card-mark--red { background: linear-gradient(145deg, #e46a73, #c94754); border-color: rgba(121, 32, 46, .25); }
#fn-match .fn-card-pair { position: relative; width: 20px; height: 21px; }
#fn-match .fn-card-pair .fn-card-mark { position: absolute; top: 0; left: 0; }
#fn-match .fn-card-pair .fn-card-mark--red { top: 4px; left: 7px; }
#fn-match .fn-event-substitution { flex-direction: column; gap: 0; height: 34px; }
#fn-match .fn-event-arrow { display: block; width: 17px; height: 17px; flex-shrink: 0; stroke-width: 1.6; }
#fn-match .fn-event-arrow--in { color: var(--fn-in); }
#fn-match .fn-event-arrow--out { color: var(--fn-out); }
#fn-match .fn-var-badge { display: inline-flex; align-items: center; justify-content: center; width: 25px; height: 17px; border: 1px solid color-mix(in srgb, var(--accent) 28%, var(--fn-line) 72%); border-radius: 3px; color: var(--accent); background: color-mix(in srgb, var(--accent) 3%, var(--fn-surface) 97%); font-size: 7px; font-weight: 600; letter-spacing: .01em; }

#fn-match .fn-insights { padding: 8px 18px 16px; gap: 12px; }
#fn-match .fn-insights.fn-insights--1 { width: 100%; max-width: none; margin: 0; }
#fn-match .fn-card { background: var(--fn-surface); border-color: var(--fn-line); border-radius: 8px; }
#fn-match .fn-card__head { padding: 9px 12px; border-color: var(--fn-line); background: color-mix(in srgb, var(--bg-elev-2) 50%, var(--fn-surface) 50%); }
#fn-match .fn-card__title { color: var(--fn-secondary); text-transform: none; font-weight: 600; font-size: 12px; letter-spacing: 0; }
#fn-match .fn-hl__list { display: grid; gap: 0 24px; padding: 4px 12px 6px; }
#fn-match .fn-hl { grid-template-columns: var(--fn-time-width) var(--fn-icon-width) minmax(0, 1fr); align-items: center; gap: var(--fn-event-gap); min-height: 34px; color: var(--fn-primary); }
#fn-match .fn-hl__time, #fn-match .fn-comments__time { color: var(--fn-secondary); font-weight: 600; font-size: 10px; font-variant-numeric: tabular-nums; }
#fn-match .fn-hl__icon, #fn-match .fn-comments__icon { display: flex; align-items: center; justify-content: center; width: var(--fn-icon-width); height: 20px; background: transparent; color: var(--fn-secondary); }
#fn-match .fn-hl__text { color: var(--fn-primary); font-size: 12px; font-weight: 400; }
#fn-match .fn-statrow__val, #fn-match .fn-kp__name, #fn-match .fn-kp__stat-val { font-weight: 600; color: var(--fn-primary); }
#fn-match .fn-statrow__label, #fn-match .fn-kp__team, #fn-match .fn-kp__stat-label { color: var(--fn-secondary); font-weight: 400; }
#fn-match .fn-comments__list { padding: 2px 12px 10px; gap: 0; }
#fn-match .fn-comments__item { min-height: 42px; grid-template-columns: var(--fn-time-width) var(--fn-icon-width) minmax(0, 1fr); gap: var(--fn-event-gap); border: 0; padding: 5px 0; }
#fn-match .fn-comments__item .fn-tl__content { grid-area: auto; }
#fn-match .fn-comments__icon.fn-event-substitution { height: 34px; }

@media (hover: hover) {
  #fn-match .fn-tl:hover { background: color-mix(in srgb, var(--success) 3%, var(--fn-surface) 97%); }
}
@media (min-width: 800px) { #fn-match .fn-hl__list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) {
  #fn-match { --fn-axis-inset: 6px; --fn-event-gap: 5px; --fn-time-width: 34px; --fn-icon-width: 24px; }
  #fn-match .fn-hero { padding: 10px 12px 12px; }
  #fn-match .fn-hero__top { grid-template-columns: minmax(0, 1fr) auto; gap: 8px 6px; text-align: left; padding-bottom: 12px; }
  #fn-match .fn-hero__comp { justify-content: flex-start; gap: 6px; }
  #fn-match .fn-hero__comp-logo { width: 20px; height: 20px; }
  #fn-match .fn-hero__comp-name { font-size: 11px; }
  #fn-match .fn-hero__comp-country { font-size: 10px; }
  #fn-match .fn-hero__datebox { padding: 4px 7px; font-size: 8.5px; min-height: 23px; }
  #fn-match .fn-hero__venue { grid-column: 1 / -1; display: flex; align-items: baseline; justify-content: center; gap: 6px; text-align: center; }
  #fn-match .fn-hero__venue-name { font-size: 9px; }
  #fn-match .fn-hero__venue-city { font-size: 9px; margin-top: 0; }
  #fn-match .fn-hero__body { grid-template-columns: minmax(0, 1fr) 76px minmax(0, 1fr); gap: 8px; }
  #fn-match .fn-hero__team { flex-direction: column; gap: 6px; }
  #fn-match .fn-hero__team-meta { align-items: center; gap: 4px; width: 100%; }
  #fn-match .fn-hero__team-name { display: flex; align-items: center; justify-content: center; min-height: 30px; width: 100%; max-width: 100%; white-space: normal; text-align: center; font-size: 12px; line-height: 15px; }
  #fn-match .fn-hero__logo { width: 36px; height: 36px; }
  #fn-match .fn-hero__score { font-size: 26px; gap: 7px; padding: 5px 6px; }
  #fn-match .fn-hero__score-sep { font-size: 16px; }
  #fn-match .fn-hero__minute { font-size: 8px; }
  #fn-match .fn-team-summary { gap: 6px; }
  #fn-match .fn-tabs { gap: 18px; padding: 0 12px; }
  #fn-match .fn-tabs__tab { font-size: 11px; padding: 10px 0; }
  #fn-match .fn-timeline { padding: 5px 6px; }
  #fn-match .fn-timeline__team { gap: 5px; font-size: 10.5px; padding-block: 7px; }
  #fn-match .fn-timeline__team-logo { width: 16px; height: 16px; }
  #fn-match .fn-tl__content { font-size: 11px; }
  #fn-match .fn-tl__var--muted { font-size: 10px; }
  #fn-match .fn-tl__annot { font-size: 9px; }
  #fn-match .fn-tl__time { font-size: 9px; padding: 2px 0; }
  #fn-match .fn-insights { padding: 6px 10px 10px; }
}
@media (prefers-reduced-motion: reduce) { #fn-match .fn-tl { transition: none; } }

/* Reference completion: add the summary sections without changing event geometry. */
#fn-match .fn-timeline > .fn-poss {
  width: min(560px, 100%); max-width: 560px; margin: 0 auto 10px; padding: 4px 12px 2px;
  grid-template: "label label label" 14px "home bar away" 14px / 36px minmax(0, 1fr) 36px;
  gap: 3px 10px;
}
#fn-match .fn-poss__label { grid-area: label; margin: 0; color: var(--fn-secondary); text-transform: none; font-size: 10px; font-weight: 400; letter-spacing: 0; line-height: 14px; }
#fn-match .fn-poss__val { color: var(--fn-primary); font-size: 10px; font-weight: 600; line-height: 14px; }
#fn-match .fn-poss__val--home { grid-area: home; }
#fn-match .fn-poss__val--away { grid-area: away; }
#fn-match .fn-poss__bar { grid-area: bar; height: 5px; gap: 2px; background: var(--bg-elev-3, var(--bg-elev-2)); }
#fn-match .fn-poss__bar-home { background: var(--success); border-radius: 3px; }
#fn-match .fn-poss__bar-away { background: var(--fn-secondary); border-radius: 3px; }
#fn-match .fn-poss--unavailable .fn-poss__val { color: var(--fn-muted); }
#fn-match .fn-poss--unavailable .fn-poss__bar { background: var(--fn-line); }

#fn-match .fn-insights--summary { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); }
#fn-match .fn-insights--summary .fn-card--kp { grid-column: auto; }
#fn-match .fn-insights--summary .fn-card__head { display: flex; align-items: center; gap: 7px; }
#fn-match .fn-card__title-icon { display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px; color: var(--fn-secondary); }
#fn-match .fn-card__title-icon svg { width: 17px; height: 17px; }
#fn-match .fn-card__note { margin: 0; padding: 0 12px 10px; color: var(--fn-secondary); font-size: 10.5px; font-weight: 400; line-height: 15px; }
#fn-match .fn-card--stats .fn-card__body { padding: 8px 12px; }
#fn-match .fn-statrow { grid-template-columns: 30px minmax(0, 1fr) 84px minmax(0, 1fr) 30px; gap: 10px; min-height: 22px; padding: 3px 0; }
#fn-match .fn-statrow__val { color: var(--fn-primary); font-size: 11px; line-height: 16px; font-weight: 600; }
#fn-match .fn-statrow__val--home { text-align: left; }
#fn-match .fn-statrow__val--away { text-align: right; }
#fn-match .fn-statrow__label { min-width: 0; color: var(--fn-secondary); text-align: center; font-size: 10.5px; font-weight: 400; line-height: 16px; text-transform: none; letter-spacing: 0; }
#fn-match .fn-statrow__track { display: flex; align-items: center; height: 4px; border-radius: 3px; overflow: hidden; background: var(--fn-line); }
#fn-match .fn-statrow__track--away { justify-content: flex-end; }
#fn-match .fn-statrow__fill { display: block; height: 100%; border-radius: inherit; }
#fn-match .fn-statrow__fill--home { background: var(--success); }
#fn-match .fn-statrow__fill--away { background: var(--fn-secondary); }
#fn-match .fn-kp__body { flex: 1; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; padding: 10px 12px; }
#fn-match .fn-kp { gap: 12px; padding: 10px; background: color-mix(in srgb, var(--bg-elev-2) 55%, var(--fn-surface) 45%); border-color: var(--fn-line); border-radius: 6px; }
#fn-match .fn-kp__identity { display: grid; grid-template-columns: 30px minmax(0, 1fr); align-items: center; gap: 8px; }
#fn-match .fn-kp__badge { display: flex; align-items: center; justify-content: center; width: 30px; height: 30px; color: var(--fn-secondary); }
#fn-match .fn-kp__badge img { display: block; width: 24px; height: 24px; object-fit: contain; }
#fn-match .fn-kp__meta { min-width: 0; }
#fn-match .fn-kp__name { font-size: 12px; font-weight: 600; line-height: 17px; }
#fn-match .fn-kp__team { margin: 2px 0 0; font-size: 10px; font-weight: 400; line-height: 14px; }
#fn-match .fn-kp--unavailable .fn-kp__name { color: var(--fn-muted); font-weight: 400; font-size: 10.5px; }
#fn-match .fn-kp__stats { gap: 8px; }
#fn-match .fn-kp__stat { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 6px; font-size: 11px; }
#fn-match .fn-kp__stat-label { font-size: 11px; }
@media (max-width: 800px) {
  #fn-match .fn-insights--summary { grid-template-columns: minmax(0, 1fr); }
  #fn-match .fn-kp__body { min-height: 98px; }
}
@media (max-width: 600px) {
  #fn-match .fn-timeline > .fn-poss { padding-inline: 6px; grid-template-columns: 30px minmax(0, 1fr) 30px; }
  #fn-match .fn-tabs { gap: 0; }
  #fn-match .fn-tabs__tab { flex: 1 0 auto; padding-inline: 7px; font-size: 10px; }
  #fn-match .fn-tabs__tab:first-child { padding-left: 0; }
  #fn-match .fn-statrow { grid-template-columns: 24px minmax(0, 1fr) 76px minmax(0, 1fr) 24px; gap: 7px; }
  #fn-match .fn-kp { padding: 8px; }
  #fn-match .fn-kp__identity { grid-template-columns: 24px minmax(0, 1fr); gap: 6px; }
  #fn-match .fn-kp__badge { width: 24px; height: 28px; }
}


/* Native league links now expose these existing match rows. Keep their
 * presentation scoped to the league page, sharing the site's theme tokens. */
#fn-league-body .fn-week-section {
  margin-bottom: 14px; border: 1px solid var(--border); border-radius: 8px; overflow: hidden;
}
#fn-league-body .fn-week-section__title {
  padding: 10px 12px; background: var(--bg-elev-2, #f4f6f9);
  color: var(--text-muted); font-size: 12px; font-weight: 600;
}
#fn-league-body .fn-match {
  display: grid; grid-template-columns: 48px minmax(0, 1fr) auto minmax(0, 1fr) 14px;
  gap: 10px; align-items: center; min-height: 44px; padding: 8px 12px;
  background: var(--bg-elev, #fff); color: var(--text-strong); text-decoration: none; font-size: 13px;
}
#fn-league-body .fn-match:nth-child(odd) { background: var(--bg-elev-2, #f4f6f9); }
#fn-league-body .fn-match:hover { background: var(--accent-bg, rgba(59,130,246,.08)); }
#fn-league-body .fn-match__status { font-size: 11px; color: var(--text-muted); }
#fn-league-body .fn-match__status--live { color: var(--live, #e23636); }
#fn-league-body .fn-match__side { display: flex; align-items: center; gap: 6px; min-width: 0; }
#fn-league-body .fn-match__side--home { justify-content: flex-end; text-align: right; }
#fn-league-body .fn-match__team-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#fn-league-body .fn-match__team-logo { width: 18px; height: 18px; object-fit: contain; flex: 0 0 18px; }
#fn-league-body .fn-match__center {
  display: flex; align-items: center; justify-content: center; gap: 5px;
  min-width: 48px; padding: 4px 7px; border-radius: 5px; background: var(--bg-elev-2, #f4f6f9);
  color: var(--text-strong); font-weight: 600; font-variant-numeric: tabular-nums;
}
#fn-league-body .fn-match__external { color: var(--text-muted); }
[data-theme="dark"] .fn-league-header__logo { background: #fff; padding: 3px; border-radius: 5px; }
@media (max-width: 600px) {
  #fn-league-body .fn-match {
    grid-template-columns: 34px minmax(0, 1fr) 50px 12px;
    grid-template-areas: "status home score external" "status away score external";
    gap: 5px 8px; padding: 9px 8px;
  }
  #fn-league-body .fn-match__status { grid-area: status; }
  #fn-league-body .fn-match__side--home { grid-area: home; justify-content: flex-start; text-align: left; }
  #fn-league-body .fn-match__side--away { grid-area: away; }
  #fn-league-body .fn-match__center { grid-area: score; }
  #fn-league-body .fn-match__external { grid-area: external; }
}

/* Presentation only: country identity then league identity on the same row. */
#sed-football-livescore .sed-football-group__content {
  flex-direction: row; align-items: center; gap: 12px; overflow: hidden;
}
#sed-football-livescore .sed-football-group__country {
  flex: 0 1 auto; min-width: 0; max-width: 32%; gap: 5px; line-height: 1.3;
}
#sed-football-livescore .sed-football-group__country::before { display: none; }
#sed-football-livescore .sed-football-group__country-emblem {
  width: 17px; height: 13px; object-fit: contain; flex: 0 0 17px;
}
#sed-football-livescore .sed-football-group__country-name {
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
#sed-football-livescore .sed-football-group__title-row {
  flex: 1 1 0; align-items: center; gap: 6px; overflow: hidden;
}
#sed-football-livescore .sed-football-group__title-link { min-width: 0; overflow: hidden; }
#sed-football-livescore .sed-football-group__title { display: block; }
@media (max-width: 600px) {
  #sed-football-livescore .sed-football-group__content { gap: 6px; }
  #sed-football-livescore .sed-football-group__country { max-width: 40%; gap: 3px; font-size: 10px; }
  #sed-football-livescore .sed-football-group__country-emblem { width: 14px; height: 11px; flex-basis: 14px; }
  #sed-football-livescore .sed-football-group__logo { width: 15px; height: 15px; }
  #sed-football-livescore .sed-football-group__title-row { gap: 4px; }
  #sed-football-livescore .sed-football-group__title { font-size: 11px; }
}

/* Football calendar and date-organized fixtures. Basketball remains untouched. */
.sed-football-toolbar{background:var(--bg-elev,#fff);border-bottom:1px solid var(--border,#e3e7ee);padding:10px 14px;gap:8px;}
.sed-football-toolbar__top{min-height:32px;}
.sed-football-toolbar .sed-football-datenav{gap:4px;min-height:30px;border:1px solid var(--border,#e3e7ee);border-radius:999px;background:var(--bg-elev-2,#f5f7fa);padding:2px;overflow:visible;}
.sed-football-toolbar .sed-football-datenav__arrow{width:26px;height:26px;border:0;border-radius:50%;background:transparent;}
.sed-football-toolbar .sed-football-datenav__label{height:28px;padding:4px 10px;border:0;border-radius:999px;gap:6px;background:var(--bg-elev,#fff);color:var(--text-main,#0f172a);letter-spacing:normal;}
.sed-football-toolbar .sed-football-datenav__arrow:hover,.sed-football-toolbar .sed-football-datenav__label:hover{background:rgba(39,128,68,.12);color:#278044;}
.fc-icon{display:inline-flex;align-items:center;justify-content:center;flex:0 0 16px;}
.fc-icon svg{width:16px;height:16px;display:block;}
.fc-chevron{font-size:10px;opacity:.7;}
.fc-button{display:inline-flex;align-items:center;justify-content:center;gap:7px;min-height:34px;padding:6px 11px;border:1px solid var(--border,#e3e7ee);border-radius:999px;background:var(--bg-elev,#fff);color:var(--text-main,#0f172a);font-family:inherit;font-weight:600;font-size:12px;cursor:pointer;white-space:nowrap;}
.fc-toggle:focus-visible,.football-calendar-pop button:focus-visible{outline:2px solid #278044;outline-offset:2px;}
.football-calendar-pop{--fc-accent:#278044;position:fixed;z-index:2500;box-sizing:border-box;max-width:calc(100vw - 24px);padding:12px;border:1px solid var(--border,#e3e7ee);border-radius:10px;background:var(--bg-elev,#fff);color:var(--text-main,#0f172a);box-shadow:0 6px 20px rgba(15,23,42,.12),0 2px 6px rgba(15,23,42,.05);font-family:Inter,system-ui,sans-serif;}
.fc-head{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:10px;}
.fc-title{flex:1;text-align:center;font-size:14px;text-transform:capitalize;}
.football-calendar-pop .fc-nav{width:28px;height:28px;min-height:28px;display:grid;place-items:center;border:1px solid var(--border,#e3e7ee);border-radius:6px;background:var(--bg-elev-2,#f5f7fa);color:var(--text-muted,#64748b);padding:0;cursor:pointer;font-size:18px;}
.fc-weekdays,.fc-grid{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:2px;}
.fc-weekdays{padding-bottom:4px;margin-bottom:4px;border-bottom:1px solid var(--border,#e3e7ee);}
.fc-weekdays span{text-align:center;font-size:10px;font-weight:700;color:var(--text-muted,#64748b);text-transform:uppercase;padding:4px 0;}
.football-calendar-pop .fc-day{height:32px;min-height:32px;display:grid;place-items:center;padding:0;border:0;border-radius:6px;background:transparent;color:inherit;font-size:12px;font-weight:500;cursor:pointer;}
.football-calendar-pop .fc-day.is-other{color:var(--text-muted,#64748b);opacity:.5;}
.football-calendar-pop .fc-day.is-today{box-shadow:inset 0 0 0 1px var(--fc-accent);color:var(--fc-accent);font-weight:700;}
.football-calendar-pop .fc-day.is-selected{background:var(--fc-accent);color:#fff;font-weight:700;opacity:1;}
.football-calendar-pop .fc-day:hover:not(.is-selected),.football-calendar-pop .fc-nav:hover{background:rgba(39,128,68,.13);color:var(--fc-accent);}
.fc-foot{border-top:1px solid var(--border,#e3e7ee);margin-top:8px;padding-top:8px;text-align:center;}
.football-calendar-pop .fc-today{border:0;background:transparent;color:var(--fc-accent);padding:4px 12px;font-size:12px;font-weight:600;cursor:pointer;}
.fp-fixtures-toolbar{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:14px;}
.fp-fixtures-toolbar .fp-subnav{margin:0;min-width:0;}
.fp-fixtures-heading{font-size:13px;letter-spacing:.04em;text-transform:uppercase;color:var(--text-muted,#64748b);margin:18px 0 12px;}
.fp-date-group{border:1px solid var(--border,#e3e7ee);border-radius:10px;overflow:hidden;margin:0 0 14px;}
.fp-date-heading{display:flex;align-items:center;justify-content:space-between;gap:10px;margin:0;padding:10px 13px;background:var(--bg-elev-2,#f5f7fa);font-size:12px;font-weight:700;color:var(--text-main,#0f172a);}
.fp-date-heading .fp-round-label{max-width:48%;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;font-weight:500;font-size:11px;color:var(--text-muted,#64748b);}
.fp-date-group .fn-match:last-child{border-bottom:0;}
.fp-pagination{display:flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:5px;margin:22px 0 8px;}
.fp-page{display:inline-flex;align-items:center;justify-content:center;min-width:32px;min-height:34px;padding:5px 9px;border:1px solid var(--border,#e3e7ee);border-radius:7px;color:var(--text-main,#0f172a);background:var(--bg-elev,#fff);font:inherit;font-size:12px;cursor:pointer;}
.fp-page[aria-current="page"]{background:#278044;border-color:#278044;color:#fff;}
.fp-page:disabled{opacity:.4;cursor:default;}
.fp-page-gap{color:var(--text-muted,#64748b);padding:0 3px;}
.fp-stale{padding:10px 14px;font-size:12px;color:var(--text-muted,#64748b);background:var(--bg-elev-2,#f5f7fa);}
[data-theme="dark"] .football-calendar-pop{--fc-accent:#53b977;box-shadow:0 8px 25px rgba(0,0,0,.5);}
@media(max-width:600px){
 .sed-football-toolbar{padding:10px 8px;}
 .sed-football-toolbar__actions{display:none;}
 .sed-football-toolbar .sed-football-datenav__label{font-size:12px;padding:4px 8px;}
 .fp-fixtures-toolbar{gap:6px;}
 .fp-fixtures-toolbar .fc-button{padding:7px 9px;}
 .fp-fixtures-toolbar .fc-button-label{display:none;}
 .fp-fixtures-toolbar .fp-subtab{font-size:11px;padding:7px 8px;}
 .fp-date-heading{padding:9px 10px;font-size:11px;}
 .fp-pagination{gap:4px;}
 .fp-page-word{display:none;}
}

.fp-fixtures-sectionhead{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:2px 0 12px;}
.fp-fixtures-sectionhead .fp-fixtures-heading{margin:0;}
.fp-round-controls{display:flex;align-items:center;gap:8px;min-width:0;}
.fp-round-controls .fp-subtab{font-size:11px;padding:5px 8px;}
.fp-fixtures-toolbar .fp-subtab.is-active{background:#278044;border-color:#278044;color:#fff;}
@media(max-width:600px){.fp-fixtures-sectionhead{gap:6px;}.fp-round-controls .fp-rounds{max-width:150px;}}

[data-theme="dark"] .sed-football-toolbar .sed-football-datenav__label:hover,[data-theme="dark"] .sed-football-toolbar .sed-football-datenav__arrow:hover{color:#7cda9b;background:rgba(83,185,119,.12);}
[data-theme="dark"] .football-calendar-pop .fc-day.is-selected{color:#102318;}

/* Live Football dates are fixed to today, using the same disabled controls on every page. */
.sed-football-toolbar{color:#0f172a;font-family:Inter,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;font-size:14px;font-weight:500;line-height:1.22;letter-spacing:0;text-transform:none;}
[data-theme="dark"] .sed-football-toolbar{color:#e8eefc;}
.sed-football-toolbar .sed-football-datenav.is-frozen{opacity:.62;}
.sed-football-toolbar button:disabled{cursor:not-allowed;}
.sed-football-toolbar button:disabled:hover{background:transparent;color:var(--text-muted,#64748b);}

/* Bound repaint damage to each already-rendered league during live updates. */
.sed-football-group{contain:layout paint;}

/* Finished Football results: same winner/loser emphasis as Basketball. */
.sed-football-match--home-won .sed-football-match__home .sed-football-match__team-name,
.sed-football-match--away-won .sed-football-match__away .sed-football-match__team-name {
  color: var(--text-strong, #172033);
  font-weight: 600;
}
.sed-football-match--home-won .sed-football-match__away .sed-football-match__team-name,
.sed-football-match--away-won .sed-football-match__home .sed-football-match__team-name {
  color: #8a94a3;
  font-weight: 500;
}
.sed-football-match--home-won .sed-football-match__score-home,
.sed-football-match--away-won .sed-football-match__score-away {
  color: var(--text-strong, #172033);
  font-weight: 650;
}
.sed-football-match--home-won .sed-football-match__score-away,
.sed-football-match--away-won .sed-football-match__score-home {
  color: #8a94a3;
  font-weight: 550;
}
[data-theme="dark"] .sed-football-match--home-won .sed-football-match__home .sed-football-match__team-name,
[data-theme="dark"] .sed-football-match--away-won .sed-football-match__away .sed-football-match__team-name,
[data-theme="dark"] .sed-football-match--home-won .sed-football-match__score-home,
[data-theme="dark"] .sed-football-match--away-won .sed-football-match__score-away { color: #F2E9DF; }
[data-theme="dark"] .sed-football-match--home-won .sed-football-match__away .sed-football-match__team-name,
[data-theme="dark"] .sed-football-match--away-won .sed-football-match__home .sed-football-match__team-name,
[data-theme="dark"] .sed-football-match--home-won .sed-football-match__score-away,
[data-theme="dark"] .sed-football-match--away-won .sed-football-match__score-home { color: #6c7686; }

/* Mobile: logo + home / logo + away, each aligned with its own score. */
@media (max-width: 600px) {
  #sed-football-livescore .sed-football-match,
  #sed-football-livescore .sed-match-row--football > .sed-football-match {
    grid-template-columns: 60px minmax(0, 1fr) 28px;
    grid-template-rows: 22px 22px;
    grid-template-areas: "status home homescore" "status away awayscore";
    gap: 4px 8px;
    padding: 8px 10px;
    min-height: 64px;
    align-items: center;
  }
  #sed-football-livescore .sed-football-match:has(> .sed-football-match__fav) {
    grid-template-columns: 60px minmax(0, 1fr) 28px 28px;
    grid-template-areas: "status home homescore fav" "status away awayscore fav";
  }
  #sed-football-livescore .sed-football-match__status { grid-area: status; align-self: center; }
  #sed-football-livescore .sed-football-match__home { grid-area: home; }
  #sed-football-livescore .sed-football-match__away { grid-area: away; }
  #sed-football-livescore .sed-football-match__home,
  #sed-football-livescore .sed-football-match__away { justify-content: flex-start; gap: 8px; }
  #sed-football-livescore .sed-football-match__team-name { text-align: left; }
  #sed-football-livescore .sed-football-match__logo { order: -1; width: 22px; height: 22px; }
  #sed-football-livescore .sed-football-match__score:not(.sed-football-match__score--empty) { display: contents; }
  #sed-football-livescore .sed-football-match__score-home { grid-area: homescore; }
  #sed-football-livescore .sed-football-match__score-away { grid-area: awayscore; }
  #sed-football-livescore .sed-football-match__score-home,
  #sed-football-livescore .sed-football-match__score-away { justify-self: end; text-align: right; }
  #sed-football-livescore .sed-football-match__score-sep { display: none; }
  #sed-football-livescore .sed-football-match__score--empty {
    background: transparent;
    grid-area: homescore / homescore / awayscore / awayscore;
    min-width: 0;
    padding: 0;
    justify-self: end;
    align-self: center;
  }
  #sed-football-livescore .sed-football-match__fav { grid-area: fav; align-self: center; }
}

/* Basketball clock: 11px/600; form team: 13px/700; secondary metadata tokens. */
.fn-tl__time,.fn-event__time,.sed-football-event__time{font-size:11px;font-weight:600;color:var(--text-secondary);font-variant-numeric:tabular-nums}
.fn-tl__player,.fn-event__type,.sed-football-event__detail{font-size:13px;font-weight:700;color:var(--text-main)}
.fn-tl__annot,.fn-tl__sub-out,.fn-event__detail{color:var(--text-secondary)}

/* Kickoff remains visible alongside the current match status, in Paris time. */
#fn-match .fn-hero__datebox { flex-direction: column; gap: 3px; }
#fn-match .fn-hero__kickoff { display: block; margin-top: 0; color: var(--fn-primary); font-size: 11px; font-weight: 600; letter-spacing: 0; font-variant-numeric: tabular-nums; }

/* Same score metrics as Hockey: emphasis changes weight, never size or slots. */
#sed-football-livescore .sed-football-match__score {
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.02em;
  align-items: baseline;
  gap: 3px;
}
#sed-football-livescore .sed-football-match__score-sep,
#sed-football-livescore .sed-football-match__score--empty { font-weight: 400; }
#sed-football-livescore .sed-football-match__score-home,
#sed-football-livescore .sed-football-match__score-away {
  font-family: inherit;
  font-size: inherit;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  min-width: 20px;
}
@media (max-width: 600px) {
  #sed-football-livescore .sed-football-match__score { font-size: 15px; }
}


.sed-football-group__external > svg { width: 14px; height: 14px; }
.sed-football-group__external:focus-visible { outline: 2px solid var(--accent, #2878ee); outline-offset: 2px; }

/* Match navigation stays separate from its favorite button. */
#sed-football-livescore .sed-match-row--football{display:grid;grid-template-columns:minmax(0,1fr)28px 36px;align-items:center;min-width:0}
.sed-football-match__external{display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;color:var(--text-muted,#64748b);text-decoration:none;border-radius:6px}
.sed-football-match__external svg{width:14px;height:14px}
.sed-football-match__external:hover{background:var(--bg-elev-2,#edf1f5)}
.sed-football-match__external:focus-visible{outline:2px solid var(--accent,#2878ee);outline-offset:-2px}
@media(max-width:600px){#sed-football-livescore .sed-match-row--football{grid-template-columns:minmax(0,1fr)28px 44px}}

/* League fixture rows use the existing two-team mobile rhythm. */
@media(max-width:760px){
 #fn-league-body .fn-match{grid-template-columns:52px minmax(0,1fr) 26px 12px;grid-template-rows:minmax(23px,auto) minmax(23px,auto);grid-template-areas:"status home homeScore external" "status away awayScore external";gap:3px 7px;}
 #fn-league-body .fn-match__center{display:contents;}
 #fn-league-body .fn-match__score--home{grid-area:homeScore;}
 #fn-league-body .fn-match__score--away{grid-area:awayScore;}
 #fn-league-body .fn-match__score{text-align:right;font-variant-numeric:tabular-nums;font-size:13px;line-height:23px;font-weight:600;}
 #fn-league-body .fn-match__score-sep{display:none;}
 #fn-league-body .fn-match__side--home,#fn-league-body .fn-match__side--away{justify-content:flex-start;text-align:left;min-width:0;}
 #fn-league-body .fn-match__side--home{grid-area:home;}#fn-league-body .fn-match__side--away{grid-area:away;}
 #fn-league-body .fn-match__status{grid-area:status;white-space:normal;overflow-wrap:anywhere;line-height:1.3;}
 #fn-league-body .fn-match__external{grid-area:external;}
 #fn-league-body .fn-match:focus-visible{outline:2px solid var(--accent);outline-offset:-2px;}
}

@media (min-width:761px){.fn-match__side--home .fn-match__team-logo{order:1}}

