/* Kisure Sports v593 — latest-first events, unclipped momentum tooltip, dark-mode polish */
.football-section--commentary {
    overflow: hidden;
}

.football-section--momentum {
    overflow: visible;
    position: relative;
}

.football-section--commentary,
.football-section--momentum,
.football-section--match-stats-inline {
    background: var(--surface, #fff);
    color: var(--text, #122033);
}

.football-commentary-live-state {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    max-width: 100%;
    padding: .48rem .78rem;
    border-radius: 999px;
    background: color-mix(in srgb, var(--brand, #008d86) 11%, transparent);
    color: var(--brand, #007e78);
    font-size: .82rem;
    font-weight: 800;
    line-height: 1.2;
    white-space: normal;
}

.football-commentary-live-state.is-finished {
    background: color-mix(in srgb, currentColor 7%, transparent);
    color: var(--text-soft, #5b6b82);
}

.football-commentary-stream {
    display: grid;
    gap: .72rem;
}

.football-commentary-card {
    position: relative;
    display: grid;
    gap: .72rem;
    padding: 1rem 1.05rem;
    border: 1px solid color-mix(in srgb, var(--text, #122033) 12%, transparent);
    border-radius: 18px;
    background: var(--surface, #fff);
    box-shadow: 0 7px 24px rgba(15, 23, 42, .035);
}

.football-commentary-card.is-major {
    border-color: color-mix(in srgb, var(--brand, #008d86) 22%, transparent);
    background: linear-gradient(180deg, color-mix(in srgb, var(--brand, #008d86) 8%, var(--surface, #fff)) 0%, var(--surface, #fff) 45%);
}

.football-commentary-card.is-phase {
    padding: .74rem .95rem;
    border-style: dashed;
    background: color-mix(in srgb, var(--text, #122033) 2.5%, var(--surface, #fff));
}

.football-commentary-card__head {
    display: flex;
    align-items: center;
    gap: .62rem;
    min-width: 0;
}

.football-commentary-card__head time {
    flex: 0 0 auto;
    min-width: 2.45rem;
    padding: .23rem .48rem;
    border-radius: 999px;
    background: color-mix(in srgb, var(--text, #122033) 6%, transparent);
    color: var(--text, #122033);
    font-size: .76rem;
    font-weight: 900;
    text-align: center;
}

.football-commentary-card.is-major .football-commentary-card__head time {
    background: var(--text, #122033);
    color: var(--surface, #fff);
}

.football-commentary-card__head strong {
    min-width: 0;
    color: var(--text, #122033);
    font-size: 1rem;
    font-weight: 900;
}

.football-commentary-card__score {
    margin-left: auto;
    padding: .26rem .56rem;
    border-radius: 999px;
    background: color-mix(in srgb, var(--brand, #008d86) 12%, transparent);
    color: var(--brand, #007e78);
    font-size: .78rem;
    font-weight: 900;
}

.football-commentary-card__body {
    margin: 0;
    color: var(--text, #122033);
    font-size: .9rem;
    line-height: 1.55;
}

.football-commentary-person-row {
    display: flex;
    align-items: center;
    gap: .62rem;
    min-width: 0;
    padding: .52rem .62rem;
    border-radius: 14px;
    background: color-mix(in srgb, var(--text, #122033) 3.5%, transparent);
}

.football-commentary-team-logo {
    width: 28px;
    height: 28px;
    object-fit: contain;
    flex: 0 0 auto;
}

.football-commentary-person {
    display: flex;
    align-items: center;
    gap: .62rem;
    min-width: 0;
    color: inherit;
    text-decoration: none;
}

.football-commentary-person > span:last-of-type {
    display: grid;
    gap: .08rem;
    min-width: 0;
}

.football-commentary-person strong {
    overflow: hidden;
    color: var(--text, #122033);
    font-size: .84rem;
    font-weight: 850;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.football-commentary-person small {
    color: var(--text-soft, #5b6b82);
    font-size: .69rem;
}

.football-commentary-person__avatar {
    position: relative;
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
    overflow: visible;
    border-radius: 50%;
    background: color-mix(in srgb, var(--text, #122033) 7%, transparent);
}

.football-commentary-person__avatar img {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
}

.football-commentary-person__avatar i {
    font-style: normal;
    font-weight: 900;
}

.football-commentary-person__avatar b {
    position: absolute;
    right: -2px;
    bottom: -2px;
    display: grid;
    place-items: center;
    width: 18px;
    height: 18px;
    border: 2px solid var(--surface, #fff);
    border-radius: 50%;
    font-size: 10px;
    line-height: 1;
}

.football-commentary-person.is-in .football-commentary-person__avatar b {
    background: #17b26a;
    color: #fff;
}

.football-commentary-person.is-out .football-commentary-person__avatar b {
    background: #f04438;
    color: #fff;
}

.football-commentary-assist {
    margin-left: auto;
    color: var(--text-soft, #5b6b82);
    font-size: .76rem;
    font-weight: 700;
}

.football-commentary-substitution {
    display: grid;
    overflow: hidden;
    border-radius: 14px;
    background: color-mix(in srgb, var(--text, #122033) 3.5%, transparent);
}

.football-commentary-substitution .football-commentary-person {
    padding: .5rem .62rem;
}

.football-commentary-substitution .football-commentary-person + .football-commentary-person {
    border-top: 1px solid color-mix(in srgb, var(--text, #122033) 8%, transparent);
}

.football-commentary-substitution .football-commentary-person em {
    margin-left: auto;
    font-size: .67rem;
    font-style: normal;
    font-weight: 900;
}

.football-commentary-person.is-in em { color: #079455; }
.football-commentary-person.is-out em { color: #d92d20; }

.football-momentum-legend {
    display: flex;
    flex-wrap: wrap;
    gap: .65rem 1rem;
    margin-bottom: .75rem;
}

.football-momentum-legend > span {
    display: grid;
    grid-template-columns: 10px auto;
    grid-template-rows: auto auto;
    column-gap: .46rem;
    align-items: center;
}

.football-momentum-legend i {
    grid-row: 1 / 3;
    width: 10px;
    height: 28px;
    border-radius: 999px;
}

.football-momentum-legend .is-home i { background: #2374c6; }
.football-momentum-legend .is-away i { background: #2f3034; }
.football-momentum-legend strong { font-size: .82rem; color: var(--text, #122033); }
.football-momentum-legend small { font-size: .67rem; color: var(--text-soft, #5b6b82); }

.football-momentum-liquid {
    position: relative;
    min-height: 300px;
    padding: .55rem .65rem 1.7rem;
    border: 1px solid color-mix(in srgb, var(--text, #122033) 9%, transparent);
    border-radius: 18px;
    background: linear-gradient(180deg, color-mix(in srgb, #2374c6 3%, var(--surface, #fff)) 0 50%, color-mix(in srgb, #2f3034 3%, var(--surface, #fff)) 50% 100%);
}

.football-momentum-liquid svg {
    display: block;
    width: 100%;
    height: 270px;
    overflow: visible;
}

.football-momentum-liquid__baseline {
    stroke: color-mix(in srgb, var(--text, #122033) 22%, transparent);
    stroke-width: 1.5;
    stroke-dasharray: 5 7;
    vector-effect: non-scaling-stroke;
}

.football-momentum-liquid__area {
    stroke-width: 1.6;
    vector-effect: non-scaling-stroke;
    transition: d .25s ease;
}

.football-momentum-liquid__area.is-home { stroke: #2374c6; }
.football-momentum-liquid__area.is-away { stroke: #2f3034; }
[id^="kisureMomentumHome"] stop { stop-color: #2374c6; }
[id^="kisureMomentumAway"] stop { stop-color: #2f3034; }

.football-momentum-goal-layer {
    position: absolute;
    z-index: 4;
    top: .55rem;
    right: .65rem;
    left: .65rem;
    height: 270px;
    pointer-events: none;
}

.football-momentum-goal {
    position: absolute;
    width: 30px;
    height: 30px;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: inherit;
    cursor: pointer;
    pointer-events: auto;
    transform: translate(-50%, -50%);
    display: grid;
    place-items: center;
    font: inherit;
    line-height: 1;
    -webkit-tap-highlight-color: transparent;
}

.football-momentum-goal__ball {
    display: block;
    width: 22px;
    height: 22px;
    font-size: 20px;
    line-height: 22px;
    text-align: center;
    white-space: nowrap;
    transform: none;
    filter: drop-shadow(0 2px 4px rgba(15,23,42,.28));
    transition: transform .14s ease, filter .14s ease;
}

.football-momentum-goal:focus-visible {
    outline: 2px solid color-mix(in srgb, #0f9f94 72%, white);
    outline-offset: 2px;
    border-radius: 7px;
}

.football-momentum-goal:hover .football-momentum-goal__ball,
.football-momentum-goal:focus .football-momentum-goal__ball {
    transform: scale(1.12);
    filter: drop-shadow(0 3px 7px rgba(15,23,42,.38));
}

@media (max-width: 640px) {
    .football-momentum-goal {
        width: 34px;
        height: 34px;
    }

    .football-momentum-goal__ball {
        width: 24px;
        height: 24px;
        font-size: 22px;
        line-height: 24px;
    }
}

.football-momentum-tooltip {
    position: fixed;
    z-index: 100000;
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr);
    gap: .65rem;
    align-items: center;
    min-width: 190px;
    max-width: 260px;
    padding: .7rem .8rem;
    border: 1px solid color-mix(in srgb, var(--text, #122033) 10%, transparent);
    border-radius: 15px;
    background: var(--surface, #fff);
    box-shadow: 0 18px 44px rgba(15, 23, 42, .15);
    pointer-events: none;
    transform: none;
}

.football-momentum-tooltip[hidden] { display: none; }
.football-momentum-tooltip img,
.football-momentum-tooltip .football-momentum-tooltip__avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    object-fit: cover;
    background: color-mix(in srgb, var(--text, #122033) 7%, transparent);
}
.football-momentum-tooltip span { display: grid; gap: .12rem; min-width: 0; }
.football-momentum-tooltip strong { font-size: .82rem; color: var(--text, #122033); }
.football-momentum-tooltip small { font-size: .7rem; color: var(--text-soft, #5b6b82); }

.football-momentum-axis {
    position: absolute;
    right: .7rem;
    bottom: .45rem;
    left: .7rem;
    display: flex;
    justify-content: space-between;
    color: var(--text-soft, #5b6b82);
    font-size: .68rem;
    font-weight: 800;
}

.football-momentum-note {
    margin: .72rem 0 0;
    color: var(--text-soft, #5b6b82);
    font-size: .76rem;
    line-height: 1.45;
}

.football-section--live-now[hidden] { display: none !important; }
.football-schedule-list--live { margin-top: .2rem; }
.football-schedule-list--live .football-schedule-competition { margin-bottom: .8rem; }

html[data-theme="dark"] .football-commentary-card,
html[data-theme="dark"] .football-momentum-tooltip,
body.dark-mode .football-commentary-card,
body.dark-mode .football-momentum-tooltip {
    box-shadow: none;
}

@media (max-width: 760px) {
    .football-commentary-card { padding: .88rem; border-radius: 15px; }
    .football-commentary-card__head { align-items: flex-start; flex-wrap: wrap; }
    .football-commentary-card__score { margin-left: 0; }
    .football-commentary-person-row { align-items: center; }
    .football-commentary-assist { flex-basis: 100%; margin-left: 54px; }
    .football-momentum-liquid { min-height: 250px; padding-inline: .35rem; }
    .football-momentum-liquid svg { height: 225px; }
    .football-momentum-tooltip { min-width: 170px; max-width: 215px; }
}

.football-momentum-empty {
    position: absolute;
    inset: 50% auto auto 50%;
    z-index: 2;
    width: min(88%, 440px);
    transform: translate(-50%, -50%);
    color: var(--text-soft, #5b6b82);
    font-size: .82rem;
    font-weight: 750;
    line-height: 1.45;
    text-align: center;
    pointer-events: none;
}

.football-momentum-empty[hidden] { display: none !important; }

/* v592 — professional event stream */
.football-commentary-heading {
    align-items: center;
}

.football-commentary-intro {
    margin: -.15rem 0 1rem;
    color: var(--text-soft, #5b6b82);
    font-size: .84rem;
    line-height: 1.5;
}

.football-commentary-card {
    padding: .92rem 1rem;
    border-radius: 16px;
    box-shadow: none;
}

.football-commentary-card__head {
    gap: .52rem;
}

.football-commentary-card__icon {
    display: inline-grid;
    place-items: center;
    min-width: 24px;
    height: 24px;
    padding: 0 .24rem;
    flex: 0 0 auto;
    border-radius: 8px;
    background: color-mix(in srgb, var(--text, #122033) 6%, transparent);
    color: var(--text, #122033);
    font-size: .66rem;
    font-weight: 950;
    line-height: 1;
}

.football-commentary-card__icon.is-goal,
.football-commentary-card__icon.is-own-goal,
.football-commentary-card__icon.is-penalty {
    background: color-mix(in srgb, #079455 12%, transparent);
    color: #067647;
    font-size: .86rem;
}

.football-commentary-card__icon.is-yellow-card {
    background: #fdb022;
    color: transparent;
    width: 15px;
    min-width: 15px;
    height: 20px;
    padding: 0;
    border-radius: 3px;
}

.football-commentary-card__icon.is-red-card {
    background: #d92d20;
    color: transparent;
    width: 15px;
    min-width: 15px;
    height: 20px;
    padding: 0;
    border-radius: 3px;
}

.football-commentary-card.is-phase {
    border-style: solid;
    border-color: color-mix(in srgb, var(--text, #122033) 9%, transparent);
    background: color-mix(in srgb, var(--text, #122033) 2%, var(--surface, #fff));
}

.football-commentary-card.is-full-time {
    border-color: color-mix(in srgb, var(--brand, #008d86) 24%, transparent);
}

.football-commentary-substitution {
    gap: 0;
    border: 1px solid color-mix(in srgb, var(--text, #122033) 7%, transparent);
    background: color-mix(in srgb, var(--text, #122033) 2.5%, transparent);
}

.football-commentary-substitution .football-commentary-person {
    width: 100%;
    padding: .58rem .68rem;
}

.football-commentary-substitution__connector {
    display: block;
    padding: .12rem .7rem;
    border-top: 1px solid color-mix(in srgb, var(--text, #122033) 6%, transparent);
    border-bottom: 1px solid color-mix(in srgb, var(--text, #122033) 6%, transparent);
    color: var(--text-soft, #5b6b82);
    font-size: .64rem;
    font-weight: 800;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.football-commentary-person.is-in em,
.football-commentary-person.is-out em {
    display: inline-grid;
    place-items: center;
    min-width: 34px;
    padding: .22rem .4rem;
    border-radius: 999px;
}

.football-commentary-person.is-in em {
    background: color-mix(in srgb, #17b26a 12%, transparent);
}

.football-commentary-person.is-out em {
    background: color-mix(in srgb, #f04438 10%, transparent);
}

@media (max-width: 640px) {
    .football-commentary-live-state {
        width: 100%;
        border-radius: 12px;
    }
    .football-commentary-intro {
        margin-top: .15rem;
    }
    .football-commentary-card__head time {
        min-width: 2.25rem;
    }
}

/* v592 phase spine: make added time and shootout attempts read as factual match phases. */
.football-commentary-card.is-added-time {
    border-color: color-mix(in srgb, #f79009 28%, transparent);
    background: linear-gradient(180deg, color-mix(in srgb, #f79009 7%, var(--surface, #fff)), var(--surface, #fff));
}

.football-commentary-card.is-end-regulation,
.football-commentary-card.is-end-extra-time,
.football-commentary-card.is-penalty-shootout {
    border-color: color-mix(in srgb, var(--text, #122033) 16%, transparent);
}

.football-commentary-card.is-penalty-shootout-scored {
    border-color: color-mix(in srgb, #17b26a 34%, transparent);
    background: linear-gradient(180deg, color-mix(in srgb, #17b26a 7%, var(--surface, #fff)), var(--surface, #fff));
}

.football-commentary-card.is-penalty-shootout-missed {
    border-color: color-mix(in srgb, #f04438 30%, transparent);
    background: linear-gradient(180deg, color-mix(in srgb, #f04438 6%, var(--surface, #fff)), var(--surface, #fff));
}

.football-commentary-card__icon.is-penalty-shootout-scored {
    color: #079455;
}

.football-commentary-card__icon.is-penalty-shootout-missed {
    color: #d92d20;
}

/* v593 — explicit team key for statistics */
.football-match-stats-legend {
    display: flex;
    align-items: stretch;
    justify-content: space-between;
    gap: .75rem;
    margin: -.15rem 0 .85rem;
}
.football-match-stats-legend > span {
    display: flex;
    align-items: center;
    gap: .55rem;
    min-width: 0;
}
.football-match-stats-legend > span > i {
    width: 9px;
    height: 30px;
    border-radius: 999px;
    flex: 0 0 auto;
}
.football-match-stats-legend .is-home > i { background: var(--primary, #0ea5a4); }
.football-match-stats-legend .is-away > i { background: var(--bg-contrast, #0f172a); }
.football-match-stats-legend .is-away { text-align: right; flex-direction: row-reverse; margin-left: auto; }
.football-match-stats-legend .is-away span { text-align: right; }
.football-match-stats-legend span span { display: grid; gap: .05rem; min-width: 0; }
.football-match-stats-legend strong { color: var(--text, #122033); font-size: .82rem; line-height: 1.2; }
.football-match-stats-legend small { color: var(--text-soft, #5b6b82); font-size: .68rem; line-height: 1.2; }

/* v593 — match-experience dark mode */
html[data-theme="dark"] .football-section--commentary,
html[data-theme="dark"] .football-section--momentum,
html[data-theme="dark"] .football-section--match-stats-inline,
body.dark-mode .football-section--commentary,
body.dark-mode .football-section--momentum,
body.dark-mode .football-section--match-stats-inline {
    background: var(--surface, #0f172a);
    border-color: var(--border, rgba(148,163,184,.16));
}
html[data-theme="dark"] .football-commentary-card,
body.dark-mode .football-commentary-card {
    background: var(--surface-strong, #162033);
    border-color: var(--border, rgba(148,163,184,.16));
    color: var(--text, #e5edf8);
}
html[data-theme="dark"] .football-commentary-card.is-major,
body.dark-mode .football-commentary-card.is-major {
    background: linear-gradient(180deg, color-mix(in srgb, var(--primary, #4fd1c5) 9%, var(--surface-strong, #162033)) 0%, var(--surface-strong, #162033) 48%);
}
html[data-theme="dark"] .football-commentary-card.is-phase,
body.dark-mode .football-commentary-card.is-phase,
html[data-theme="dark"] .football-commentary-person-row,
body.dark-mode .football-commentary-person-row {
    background: color-mix(in srgb, var(--surface-strong, #162033) 88%, #fff 12%);
}
html[data-theme="dark"] .football-commentary-card__head strong,
html[data-theme="dark"] .football-commentary-card__body,
html[data-theme="dark"] .football-commentary-person strong,
body.dark-mode .football-commentary-card__head strong,
body.dark-mode .football-commentary-card__body,
body.dark-mode .football-commentary-person strong {
    color: var(--text, #e5edf8);
}
html[data-theme="dark"] .football-momentum-liquid,
body.dark-mode .football-momentum-liquid {
    border-color: var(--border, rgba(148,163,184,.16));
    background: linear-gradient(180deg, color-mix(in srgb, #2374c6 13%, var(--surface, #0f172a)) 0 50%, color-mix(in srgb, var(--accent, #fb923c) 10%, var(--surface, #0f172a)) 50% 100%);
}
html[data-theme="dark"] .football-momentum-liquid__area.is-away,
body.dark-mode .football-momentum-liquid__area.is-away { stroke: var(--accent, #fb923c); }
html[data-theme="dark"] [id^="kisureMomentumAway"] stop,
body.dark-mode [id^="kisureMomentumAway"] stop { stop-color: var(--accent, #fb923c); }
html[data-theme="dark"] .football-momentum-legend .is-away i,
body.dark-mode .football-momentum-legend .is-away i { background: var(--accent, #fb923c); }
html[data-theme="dark"] .football-match-stats-legend .is-away > i,
body.dark-mode .football-match-stats-legend .is-away > i { background: var(--text, #e5edf8); }
html[data-theme="dark"] .football-momentum-tooltip,
body.dark-mode .football-momentum-tooltip {
    background: var(--surface-strong, #162033);
    border-color: var(--border-strong, rgba(148,163,184,.26));
}

@media (max-width: 560px) {
    .football-match-stats-legend { align-items: flex-start; }
    .football-match-stats-legend small { max-width: 120px; }
}

/* ========================================================================
   v596 — normalized team palettes + extra-time axis + face-first portraits
   Team colors come from Data Engine's stored logo extraction/manual fallback.
   ======================================================================== */

/* Momentum: theme only the two teams; semantic phase/goal UI stays neutral. */
.football-page--team-themed .football-momentum-legend .is-home i,
[style*="--ks-home-team-color"] .football-momentum-legend .is-home i {
    background: var(--ks-home-team-accent, var(--ks-home-team-color, #2374c6));
}
.football-page--team-themed .football-momentum-legend .is-away i,
[style*="--ks-away-team-color"] .football-momentum-legend .is-away i {
    background: var(--ks-away-team-accent, var(--ks-away-team-color, #f28c28));
}
.football-page--team-themed .football-momentum-liquid__area.is-home {
    stroke: var(--ks-home-team-accent, var(--ks-home-team-color, #2374c6));
}
.football-page--team-themed .football-momentum-liquid__area.is-away {
    stroke: var(--ks-away-team-accent, var(--ks-away-team-color, #f28c28));
}
.football-page--team-themed [id^="kisureMomentumHome"] stop {
    stop-color: var(--ks-home-team-accent, var(--ks-home-team-color, #2374c6));
}
.football-page--team-themed [id^="kisureMomentumAway"] stop {
    stop-color: var(--ks-away-team-accent, var(--ks-away-team-color, #f28c28));
}
.football-page--team-themed .football-momentum-liquid {
    background:
        linear-gradient(180deg,
            color-mix(in srgb, var(--ks-home-team-color, #2374c6) 5%, var(--surface, #fff)) 0 49.8%,
            color-mix(in srgb, var(--text, #122033) 12%, transparent) 49.8% 50.2%,
            color-mix(in srgb, var(--ks-away-team-color, #f28c28) 5%, var(--surface, #fff)) 50.2% 100%);
}

/* Extra-time-aware momentum axis. Values are absolute percentages, not flex
   slots, so 90' remains at 75% when the data range expands to 120'. */
.football-momentum-axis {
    display: block;
    height: 1.1rem;
}
.football-momentum-axis > span {
    position: absolute;
    bottom: 0;
    left: 0;
    transform: translateX(-50%);
    white-space: nowrap;
}
.football-momentum-axis > span:first-of-type { transform: none; }
.football-momentum-axis > span:last-of-type { transform: translateX(-100%); }
.football-momentum-axis > em {
    position: absolute;
    right: 0;
    bottom: 1.05rem;
    padding: .12rem .36rem;
    border: 1px solid color-mix(in srgb, var(--text, #122033) 13%, transparent);
    border-radius: 999px;
    background: var(--surface, #fff);
    color: var(--text-soft, #5b6b82);
    font-size: .58rem;
    font-style: normal;
    font-weight: 900;
    letter-spacing: .04em;
}
.football-momentum-axis.is-extra-time::before,
.football-momentum-axis.is-extra-time::after {
    content: "";
    position: absolute;
    bottom: 1.35rem;
    height: 226px;
    border-left: 1px dashed color-mix(in srgb, var(--text, #122033) 11%, transparent);
    pointer-events: none;
}
.football-momentum-axis.is-extra-time::before { left: 75%; }
.football-momentum-axis.is-extra-time::after { left: 87.5%; }

/* Match statistics: left = home theme, right = away theme. */
.football-page--team-themed .football-match-stats-legend .is-home > i {
    background: var(--ks-home-team-accent, var(--ks-home-team-color, #0ea5a4));
}
.football-page--team-themed .football-match-stats-legend .is-away > i {
    background: var(--ks-away-team-accent, var(--ks-away-team-color, #475569));
}
.football-page--team-themed .football-match-stat-bar i {
    background: var(--ks-home-team-accent, var(--ks-home-team-color, #0ea5a4));
}
.football-page--team-themed .football-match-stat-bar b {
    background: var(--ks-away-team-accent, var(--ks-away-team-color, #475569));
}
.football-page--team-themed .football-match-stat-row__value--home {
    color: var(--ks-home-team-accent, var(--text, #122033));
}
.football-page--team-themed .football-match-stat-row__value--away {
    color: var(--ks-away-team-accent, var(--text, #122033));
}

/* Commentary: factual event type remains visible, but the team that owns the
   event is identifiable at a glance without flooding the card with club color. */
.football-commentary-card.is-home-team {
    border-inline-start: 4px solid var(--ks-home-team-accent, var(--ks-home-team-color, #2374c6));
    background: linear-gradient(90deg,
        color-mix(in srgb, var(--ks-home-team-color, #2374c6) 7%, var(--surface, #fff)),
        var(--surface, #fff) 22%);
}
.football-commentary-card.is-away-team {
    border-inline-start: 4px solid var(--ks-away-team-accent, var(--ks-away-team-color, #f28c28));
    background: linear-gradient(90deg,
        color-mix(in srgb, var(--ks-away-team-color, #f28c28) 7%, var(--surface, #fff)),
        var(--surface, #fff) 22%);
}
.football-commentary-card.is-home-team .football-commentary-person strong,
.football-commentary-card.is-home-team .football-commentary-card__score {
    color: var(--ks-home-team-accent, var(--text, #122033));
}
.football-commentary-card.is-away-team .football-commentary-person strong,
.football-commentary-card.is-away-team .football-commentary-card__score {
    color: var(--ks-away-team-accent, var(--text, #122033));
}

/* One face-first crop rule for Match Events, momentum scorer popups and transfer
   photos. It changes presentation only; original normalized media is untouched. */
.football-commentary-person__avatar,
.football-momentum-tooltip img,
.ks-transfer-player-photo,
.ks-top-transfer-row__photo {
    overflow: hidden;
}
.football-commentary-person__avatar img,
.football-momentum-tooltip img,
.ks-transfer-player-photo img.ks-player-face-img,
.ks-top-transfer-row__photo img.ks-player-face-img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    object-position: 50% 8% !important;
    transform: scale(1.26) !important;
    transform-origin: 50% 12% !important;
}

/* Team-colored match cards, chips, hover states and score surfaces. These
   selectors intentionally use subtle accents so Kisure's own visual identity
   remains dominant. */
.football-match-card[style*="--ks-home-team-color"],
.ks-match[style*="--ks-home-team-color"],
.ks-desk-match[style*="--ks-home-team-color"] {
    box-shadow:
        inset 3px 0 0 color-mix(in srgb, var(--ks-home-team-accent, var(--ks-home-team-color)) 82%, transparent),
        inset -3px 0 0 color-mix(in srgb, var(--ks-away-team-accent, var(--ks-away-team-color)) 82%, transparent);
}
.football-match-card__team:not(.football-match-card__team--away),
.ks-desk-match__team--home,
.ks-match__team--home {
    border-radius: 12px;
    background: color-mix(in srgb, var(--ks-home-team-color, #0f8583) 6%, transparent);
}
.football-match-card__team--away,
.ks-desk-match__team--away,
.ks-match__team--away {
    border-radius: 12px;
    background: color-mix(in srgb, var(--ks-away-team-color, #475569) 6%, transparent);
}
.football-match-card__team:not(.football-match-card__team--away):hover,
.ks-desk-match__team--home:hover,
.ks-match__team--home:hover {
    background: color-mix(in srgb, var(--ks-home-team-color, #0f8583) 13%, transparent);
}
.football-match-card__team--away:hover,
.ks-desk-match__team--away:hover,
.ks-match__team--away:hover {
    background: color-mix(in srgb, var(--ks-away-team-color, #475569) 13%, transparent);
}
.football-match-card__score,
.ks-match__score,
.ks-desk-match__score,
.football-header-match-row > b {
    box-shadow:
        inset 3px 0 0 var(--ks-home-team-accent, var(--ks-home-team-color, #0f8583)),
        inset -3px 0 0 var(--ks-away-team-accent, var(--ks-away-team-color, #475569));
}
.football-header-match-row[style*="--ks-home-team-color"]:hover {
    background: linear-gradient(90deg,
        color-mix(in srgb, var(--ks-home-team-color, #0f8583) 8%, var(--surface, #fff)),
        color-mix(in srgb, var(--ks-away-team-color, #475569) 8%, var(--surface, #fff)));
}
.football-header-match-row__team:not(.football-header-match-row__team--away) img,
.ks-desk-match__team--home img,
.ks-match__team--home img {
    outline: 2px solid color-mix(in srgb, var(--ks-home-team-accent, var(--ks-home-team-color, #0f8583)) 28%, transparent);
    outline-offset: 2px;
}
.football-header-match-row__team--away img,
.ks-desk-match__team--away img,
.ks-match__team--away img {
    outline: 2px solid color-mix(in srgb, var(--ks-away-team-accent, var(--ks-away-team-color, #475569)) 28%, transparent);
    outline-offset: 2px;
}

/* Transfer team chips use the originating and destination club palettes. */
.ks-transfer-table__row[style*="--ks-from-team-color"] .ks-transfer-team-cell--from > a,
.ks-transfer-table__row[style*="--ks-from-team-color"] .ks-transfer-team-cell--from > span,
.ks-top-transfer-row[style*="--ks-from-team-color"] .ks-top-transfer-team-mark:first-of-type {
    border-radius: 10px;
    background: color-mix(in srgb, var(--ks-from-team-color, #64748b) 8%, transparent);
}
.ks-transfer-table__row[style*="--ks-to-team-color"] .ks-transfer-team-cell--to > a,
.ks-transfer-table__row[style*="--ks-to-team-color"] .ks-transfer-team-cell--to > span,
.ks-top-transfer-row[style*="--ks-to-team-color"] .ks-top-transfer-team-mark:last-of-type {
    border-radius: 10px;
    background: color-mix(in srgb, var(--ks-to-team-color, #0f8583) 8%, transparent);
}
.ks-transfer-table__row .ks-transfer-team-cell--from > a:hover {
    background: color-mix(in srgb, var(--ks-from-team-color, #64748b) 15%, transparent);
}
.ks-transfer-table__row .ks-transfer-team-cell--to > a:hover {
    background: color-mix(in srgb, var(--ks-to-team-color, #0f8583) 15%, transparent);
}
.ks-transfer-table__row .ks-transfer-team-cell--from .ks-transfer-team-logo {
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--ks-from-team-accent, var(--ks-from-team-color, #64748b)) 35%, transparent);
}
.ks-transfer-table__row .ks-transfer-team-cell--to .ks-transfer-team-logo {
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--ks-to-team-accent, var(--ks-to-team-color, #0f8583)) 35%, transparent);
}

/* Dark mode: derived accent colors remain visible without turning whole cards
   into club-colored panels. */
html[data-theme="dark"] .football-page--team-themed .football-momentum-liquid,
body.dark-mode .football-page--team-themed .football-momentum-liquid {
    background:
        linear-gradient(180deg,
            color-mix(in srgb, var(--ks-home-team-color, #2374c6) 11%, #0b1528) 0 49.8%,
            rgba(255,255,255,.11) 49.8% 50.2%,
            color-mix(in srgb, var(--ks-away-team-color, #f28c28) 11%, #0b1528) 50.2% 100%);
}
html[data-theme="dark"] .football-commentary-card.is-home-team,
body.dark-mode .football-commentary-card.is-home-team {
    background: linear-gradient(90deg, color-mix(in srgb, var(--ks-home-team-color, #2374c6) 17%, #0b1528), #0b1528 25%);
}
html[data-theme="dark"] .football-commentary-card.is-away-team,
body.dark-mode .football-commentary-card.is-away-team {
    background: linear-gradient(90deg, color-mix(in srgb, var(--ks-away-team-color, #f28c28) 17%, #0b1528), #0b1528 25%);
}
html[data-theme="dark"] .football-commentary-card.is-home-team .football-commentary-person strong,
html[data-theme="dark"] .football-commentary-card.is-home-team .football-commentary-card__score,
body.dark-mode .football-commentary-card.is-home-team .football-commentary-person strong,
body.dark-mode .football-commentary-card.is-home-team .football-commentary-card__score {
    color: color-mix(in srgb, var(--ks-home-team-accent, #5ca8ff) 72%, white);
}
html[data-theme="dark"] .football-commentary-card.is-away-team .football-commentary-person strong,
html[data-theme="dark"] .football-commentary-card.is-away-team .football-commentary-card__score,
body.dark-mode .football-commentary-card.is-away-team .football-commentary-person strong,
body.dark-mode .football-commentary-card.is-away-team .football-commentary-card__score {
    color: color-mix(in srgb, var(--ks-away-team-accent, #ffad62) 72%, white);
}
html[data-theme="dark"] .football-page--team-themed .football-match-stat-row__value--home,
body.dark-mode .football-page--team-themed .football-match-stat-row__value--home {
    color: color-mix(in srgb, var(--ks-home-team-accent, #5ca8ff) 74%, white);
}
html[data-theme="dark"] .football-page--team-themed .football-match-stat-row__value--away,
body.dark-mode .football-page--team-themed .football-match-stat-row__value--away {
    color: color-mix(in srgb, var(--ks-away-team-accent, #ffad62) 74%, white);
}

@media (max-width: 760px) {
    .football-momentum-axis.is-extra-time::before,
    .football-momentum-axis.is-extra-time::after { height: 185px; }
    .football-commentary-person__avatar img,
    .football-momentum-tooltip img { transform: scale(1.23) !important; }
}

/* Homepage/Sports Desk compact team chips. */
.ks-match[style*="--ks-home-team-color"] .ks-match__teams .ks-team:first-child {
    border-radius: 9px;
    background: color-mix(in srgb, var(--ks-home-team-color, #0f8583) 6%, transparent);
}
.ks-match[style*="--ks-away-team-color"] .ks-match__teams .ks-team:last-child {
    border-radius: 9px;
    background: color-mix(in srgb, var(--ks-away-team-color, #475569) 6%, transparent);
}
.ks-match[style*="--ks-home-team-color"] .ks-match__teams .ks-team:first-child .ks-team__logo-wrap {
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--ks-home-team-accent, var(--ks-home-team-color, #0f8583)) 32%, transparent);
}
.ks-match[style*="--ks-away-team-color"] .ks-match__teams .ks-team:last-child .ks-team__logo-wrap {
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--ks-away-team-accent, var(--ks-away-team-color, #475569)) 32%, transparent);
}

/* Match-page scorecard: neutral surface with club accents at each edge. */
.football-page--team-themed .article-match-scoreboard {
    box-shadow:
        inset 4px 0 0 var(--ks-home-team-accent, var(--ks-home-team-color, #2374c6)),
        inset -4px 0 0 var(--ks-away-team-accent, var(--ks-away-team-color, #f28c28));
}
.football-page--team-themed .article-match-scoreboard__team--home:hover,
.football-page--team-themed .article-match-scoreboard__crest--home:hover {
    color: var(--ks-home-team-accent, var(--ks-home-team-color, #2374c6));
}
.football-page--team-themed .article-match-scoreboard__team--away:hover,
.football-page--team-themed .article-match-scoreboard__crest--away:hover {
    color: var(--ks-away-team-accent, var(--ks-away-team-color, #f28c28));
}
.football-page--team-themed .article-match-scoreboard__crest--home img {
    filter: drop-shadow(0 0 8px color-mix(in srgb, var(--ks-home-team-color, #2374c6) 18%, transparent));
}
.football-page--team-themed .article-match-scoreboard__crest--away img {
    filter: drop-shadow(0 0 8px color-mix(in srgb, var(--ks-away-team-color, #f28c28) 18%, transparent));
}
