/* ---------- Page width cap: 1200px instead of Bootstrap's 1320px ---------- */
@media (min-width: 1400px) {
    .container,
    .container-sm,
    .container-md,
    .container-lg,
    .container-xl,
    .container-xxl {
        max-width: 1200px;
    }
}

/* ---------- Theme toggle icon swap ---------- */
[data-bs-theme="light"] .theme-icon-dark {
    display: none;
}

[data-bs-theme="dark"] .theme-icon-light {
    display: none;
}

/* ---------- Vendored fonts ---------- */
@font-face {
    font-family: "Barlow Condensed";
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url("/vendor/fonts/barlow-condensed/barlow-condensed-600.woff2") format("woff2");
}

@font-face {
    font-family: "Barlow Condensed";
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url("/vendor/fonts/barlow-condensed/barlow-condensed-700.woff2") format("woff2");
}

@font-face {
    font-family: "Barlow Condensed";
    font-style: normal;
    font-weight: 900;
    font-display: swap;
    src: url("/vendor/fonts/barlow-condensed/barlow-condensed-900.woff2") format("woff2");
}

/* ---------- ESPN-style palette ---------- */
:root {
    --espn-red: #D2232A;
    --espn-red-dark: #A81B21;
    --espn-red-darker: #8F171C;
    --espn-black: #0D0D0D;
    --espn-black-soft: #1A1A1A;

    --bs-primary: var(--espn-red);
    --bs-primary-rgb: 210, 35, 42;
    --bs-link-color: var(--espn-red);
    --bs-link-color-rgb: 210, 35, 42;
    --bs-link-hover-color: var(--espn-red-dark);
    --bs-link-hover-color-rgb: 168, 27, 33;
}

.btn-primary {
    --bs-btn-bg: var(--espn-red);
    --bs-btn-border-color: var(--espn-red);
    --bs-btn-hover-bg: var(--espn-red-dark);
    --bs-btn-hover-border-color: var(--espn-red-dark);
    --bs-btn-active-bg: var(--espn-red-darker);
    --bs-btn-active-border-color: var(--espn-red-darker);
    --bs-btn-disabled-bg: var(--espn-red);
    --bs-btn-disabled-border-color: var(--espn-red);
    --bs-btn-focus-shadow-rgb: 210, 35, 42;
}

.btn-outline-primary {
    --bs-btn-color: var(--espn-red);
    --bs-btn-border-color: var(--espn-red);
    --bs-btn-hover-bg: var(--espn-red);
    --bs-btn-hover-border-color: var(--espn-red);
    --bs-btn-active-bg: var(--espn-red-dark);
    --bs-btn-active-border-color: var(--espn-red-dark);
}

/* ---------- Typography ---------- */
.eyebrow {
    font-family: "Barlow Condensed", sans-serif;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    font-size: .75rem;
    color: var(--espn-red);
}

.headline {
    font-family: "Barlow Condensed", sans-serif;
    font-weight: 800;
    line-height: 1.05;
    letter-spacing: -.01em;
}

.headline-lg {
    font-weight: 900;
    font-size: clamp(1.75rem, 4vw, 2.75rem);
}

/* ---------- Header / nav ---------- */
.espn-header {
    background-color: var(--espn-black);
    box-shadow: 0 2px 8px rgba(0, 0, 0, .25);
}

/* Tier 1: utility strip */
.espn-utility {
    background-color: #000;
    border-bottom: 1px solid rgba(255, 255, 255, .08);
    font-size: .75rem;
}

.espn-utility .container {
    min-height: 32px;
}

.espn-utility-date {
    color: rgba(255, 255, 255, .55);
    text-transform: uppercase;
    letter-spacing: .05em;
    font-weight: 600;
}

.espn-utility-link {
    color: rgba(255, 255, 255, .75) !important;
    text-decoration: none;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .03em;
    font-size: .75rem;
    line-height: 1;
    border: 0;
    background: none;
    white-space: nowrap;
}

.espn-utility-link:hover {
    color: #fff !important;
}

.espn-utility-link .bi {
    font-size: .9rem;
}

.espn-utility-cta {
    color: #fff !important;
    background-color: var(--espn-red);
    padding: .25rem .6rem;
    border-radius: 3px;
}

.espn-utility-cta:hover {
    background-color: var(--espn-red-dark);
}

/* Tier 2: brand + search */
.espn-brand-mark {
    height: 2rem;
    width: auto;
}

.espn-brand-text {
    font-family: "Barlow Condensed", sans-serif;
    font-weight: 900;
    font-size: 1.6rem;
    line-height: 1;
    letter-spacing: -.01em;
    color: #fff;
    margin-left: .6rem;
    text-transform: uppercase;
}

.espn-brand-accent {
    color: var(--espn-red);
}

.espn-search {
    max-width: 20rem;
    width: 100%;
}

.espn-header .form-control,
.espn-header .input-group-text {
    background-color: var(--espn-black-soft);
    border-color: #333;
    color: #fff;
}

.espn-header .form-control::placeholder {
    color: rgba(255, 255, 255, .5);
}

/* Tier 3: category tab strip */
.espn-tabs {
    background-color: var(--espn-black-soft);
    border-top: 1px solid rgba(255, 255, 255, .06);
}

.espn-tabs-list {
    display: flex;
    align-items: stretch;
    flex-wrap: wrap;
    gap: 0;
    margin: 0;
    padding: 0;
    list-style: none;
    /* overflow must stay visible so the dropdown menus are not clipped */
    overflow: visible;
}

.espn-tab-item {
    flex: 0 0 auto;
}

.espn-tab {
    display: flex;
    align-items: center;
    height: 100%;
    padding: .65rem .9rem;
    color: rgba(255, 255, 255, .8);
    text-decoration: none;
    font-family: "Barlow Condensed", sans-serif;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .03em;
    font-size: .95rem;
    white-space: nowrap;
    border-bottom: 3px solid transparent;
    transition: color .12s ease, border-color .12s ease;
}

.espn-tab:hover,
.espn-tab.active {
    color: #fff;
    border-bottom-color: var(--espn-red);
}

.espn-tab.dropdown-toggle::after {
    margin-left: .35rem;
    opacity: .6;
}

.espn-tab-icon {
    margin-right: .4rem;
    font-size: 1.05em;
    line-height: 1;
    vertical-align: -.1em;
}

.mobile-nav-icon {
    margin-right: .55rem;
    font-size: 1.15em;
    vertical-align: -.1em;
    color: var(--espn-red);
}

/* Open the tab dropdowns on hover (desktop) */
@media (min-width: 1200px) {
    .espn-tab-item.dropdown:hover > .dropdown-menu {
        display: block;
        margin-top: 0;
    }
}

/* Primary-tab flyouts open on hover only (no Popper), so anchor them manually */
.espn-tabs .espn-tab-item.dropdown > .dropdown-menu {
    top: 100%;
    left: 0;
    margin-top: 0;
}

/* ---------- Contextual sub-navigation (ESPN-style league bar) ---------- */
.espn-subnav {
    background-color: var(--bs-body-bg);
    border-bottom: 1px solid var(--bs-border-color);
}

.espn-subnav-list {
    display: flex;
    flex-wrap: wrap;
    margin: 0;
    padding: 0;
    list-style: none;
}

.espn-subnav-link {
    display: inline-block;
    padding: .6rem .9rem;
    color: var(--bs-body-color);
    text-decoration: none;
    font-family: "Barlow Condensed", sans-serif;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .02em;
    font-size: .9rem;
    white-space: nowrap;
    border-bottom: 3px solid transparent;
}

.espn-subnav-link:hover {
    color: var(--espn-red);
}

.espn-subnav-link.active {
    color: var(--espn-red);
    border-bottom-color: var(--espn-red);
}

.espn-tabs .dropdown-menu {
    border: 0;
    border-top: 3px solid var(--espn-red);
    border-radius: 0 0 4px 4px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, .2);
    --bs-dropdown-link-active-bg: var(--espn-red);
    margin-top: 0;
}

.espn-header .dropdown-menu {
    --bs-dropdown-link-active-bg: var(--espn-red);
}

/* "More Sports" dropdown — two columns so the long list stays compact.
   Only lay it out as a grid when Bootstrap actually opens it (.show / hover),
   otherwise `display: grid` would override the base `.dropdown-menu { display: none }`
   and the menu would always be visible. */
.espn-more-menu {
    grid-template-columns: 1fr 1fr;
    gap: 0 .25rem;
    min-width: 22rem;
    padding: .4rem;
}

.espn-more-menu.show {
    display: grid;
}

@media (min-width: 1200px) {
    .espn-tab-item.dropdown:hover > .espn-more-menu {
        display: grid;
    }
}

/* ---------- Mobile: hamburger + offcanvas drawer ---------- */
.espn-hamburger {
    background: none;
    border: 0;
    color: #fff;
    font-size: 1.6rem;
    line-height: 1;
    padding: 0 .85rem 0 0;
    display: inline-flex;
    align-items: center;
}

.espn-offcanvas {
    background-color: var(--espn-black);
    color: #fff;
    max-width: 85vw;
}

.espn-offcanvas .offcanvas-header {
    border-bottom: 1px solid rgba(255, 255, 255, .1);
}

.espn-offcanvas .espn-brand-text {
    font-size: 1.35rem;
}

.mobile-nav,
.mobile-subnav {
    list-style: none;
    margin: 0;
    padding: 0;
}

.mobile-nav > li {
    border-bottom: 1px solid rgba(255, 255, 255, .08);
}

.mobile-nav-row {
    display: flex;
    align-items: center;
}

.mobile-nav-link {
    display: block;
    padding: .7rem .25rem;
    color: rgba(255, 255, 255, .85);
    text-decoration: none;
    font-family: "Barlow Condensed", sans-serif;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .03em;
    font-size: 1.1rem;
}

.mobile-nav-link:hover {
    color: #fff;
}

.mobile-nav-link.active {
    color: var(--espn-red);
}

.mobile-nav-toggle {
    flex: 0 0 auto;
    background: none;
    border: 0;
    color: rgba(255, 255, 255, .55);
    padding: .5rem .35rem;
}

.mobile-nav-toggle .bi {
    transition: transform .15s ease;
}

.mobile-nav-toggle:not(.collapsed) .bi {
    transform: rotate(180deg);
    color: var(--espn-red);
}

.mobile-subnav {
    padding: 0 0 .5rem .85rem;
}

.mobile-subnav .mobile-nav-link {
    padding: .4rem .25rem;
    font-size: .95rem;
    font-weight: 600;
    text-transform: none;
    letter-spacing: 0;
    color: rgba(255, 255, 255, .6);
}

.mobile-subnav .mobile-nav-link:hover {
    color: #fff;
}

/* ---------- Cards / tiles ---------- */
.card-hover {
    transition: transform .15s ease, box-shadow .15s ease;
}

.card-hover:hover {
    transform: translateY(-2px);
    box-shadow: 0 .5rem 1rem rgba(0, 0, 0, .1) !important;
}

.tile {
    border: 0;
    border-radius: 0;
    border-bottom: 1px solid var(--bs-border-color);
}

.tile .card-body {
    padding: .75rem .25rem;
}

/* ---------- Hero (text-over-image) ---------- */
.hero-media {
    position: relative;
    overflow: hidden;
}

.hero-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: flex-end;
    background: linear-gradient(to top, rgba(0, 0, 0, .9) 0%, rgba(0, 0, 0, .45) 55%, rgba(0, 0, 0, 0) 100%);
}

.hero-overlay-content {
    color: #fff;
    padding: 1.5rem;
}

.hero-overlay-content .eyebrow {
    color: #fff;
    opacity: .85;
}

.hero-overlay-content a {
    color: #fff;
}

/* ---------- Featured grid (lead + stacked sub-leads) ---------- */
.hero-card {
    display: block;
    border-radius: .5rem;
    overflow: hidden;
    min-height: 12rem;
}

.hero-card .hero-overlay {
    text-decoration: none;
}

.hero-card .headline {
    color: #fff;
}

/* lg range (992–1199): single full-width lead, taller than the base card */
@media (min-width: 992px) and (max-width: 1199.98px) {
    .featured-lead .hero-card {
        min-height: 20rem;
    }
}

/* xl+ (>=1200): 1 + 2 side layout with matched heights */
@media (min-width: 1200px) {
    .featured-grid {
        min-height: 27rem;
    }

    .featured-lead .hero-card {
        min-height: 27rem;
    }
}

/* ---------- Right rail / sidebar ---------- */
@media (min-width: 992px) {
    .espn-rail {
        position: sticky;
        top: 1.5rem;
    }
}

.rail-card {
    border: 1px solid var(--bs-border-color);
    border-radius: .5rem;
    overflow: hidden;
    background-color: var(--bs-body-bg);
}

.rail-heading {
    font-family: "Barlow Condensed", sans-serif;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .03em;
    font-size: 1.05rem;
    padding: .5rem .8rem;
    border-bottom: 2px solid var(--espn-red);
}

.rail-card .list-group-item {
    border-color: var(--bs-border-color);
    padding: .45rem .75rem;
}

.rail-trend {
    transition: background-color .12s ease;
    gap: .5rem !important;
}

.rail-rank {
    font-family: "Barlow Condensed", sans-serif;
    font-weight: 900;
    font-size: 1.25rem;
    line-height: 1;
    color: var(--espn-red);
    min-width: 1.2rem;
    text-align: center;
}

.rail-thumb {
    width: 3.5rem;
    height: 2.4rem;
    border-radius: .3rem;
    overflow: hidden;
    flex-shrink: 0;
}

.rail-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.rail-trend-title {
    font-weight: 600;
    line-height: 1.25;
}

.rail-dot {
    display: inline-block;
    width: .7rem;
    height: .7rem;
    border-radius: 50%;
    flex: 0 0 auto;
}

.rail-card .list-group-item.active {
    background-color: color-mix(in srgb, var(--espn-red) 12%, transparent);
    border-color: var(--bs-border-color);
    color: var(--bs-body-color);
    font-weight: 700;
}

.rail-card .list-group-item.active .rail-dot {
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--espn-red) 25%, transparent);
}

.rail-tag {
    display: inline-block;
    padding: .25rem .6rem;
    border-radius: 999px;
    font-size: .8rem;
    font-weight: 600;
    color: var(--bs-body-color);
    background-color: var(--bs-secondary-bg);
    border: 1px solid var(--bs-border-color);
    transition: all .12s ease;
}

.rail-tag:hover {
    color: #fff;
    background-color: var(--espn-red);
    border-color: var(--espn-red);
}

/* ---------- Footer ---------- */
.espn-footer {
    background-color: var(--espn-black);
    color: rgba(255, 255, 255, .7);
}

.footer-sports {
    list-style: none;
    margin: 0;
    padding: 0;
    columns: 2;
    column-gap: 1.5rem;
}

@media (min-width: 576px) {
    .footer-sports {
        columns: 3;
    }
}

@media (min-width: 992px) {
    .footer-sports {
        columns: 4;
    }
}

.footer-sports li {
    margin-bottom: .5rem;
    break-inside: avoid;
}

.espn-footer a {
    color: rgba(255, 255, 255, .7);
}

.espn-footer a:hover {
    color: #fff;
}

/* Inline entity links (mentions) */
.entity-link{color:#D2232A;font-weight:500;text-decoration:none;border-bottom:1px dotted currentColor;}
.entity-link:hover{border-bottom-style:solid;}

/* Media embeds (YouTube, Vimeo, generic iframes) */
.np-embed-wrap{margin:1.5rem 0;}
.np-embed{position:relative;width:100%;background:#000;border-radius:8px;overflow:hidden;}
.np-embed-16x9{padding-top:56.25%;}
.np-embed iframe{position:absolute;inset:0;width:100%;height:100%;border:0;}
.article-body img{max-width:100%;height:auto;}
.article-body .twitter-tweet,.article-body .instagram-media{margin:1.5rem auto;}

/* ---------- Comments ---------- */
.comment-count {
    font-family: inherit;
    font-size: .8rem;
    font-weight: 700;
    line-height: 1;
    color: #fff;
    background: #D2232A;
    border-radius: 999px;
    padding: .25rem .6rem;
    letter-spacing: .02em;
}

/* Shared avatar (composer + comments) */
.comment-avatar {
    width: 2.6rem;
    height: 2.6rem;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 700;
    font-size: 1rem;
    text-transform: uppercase;
    box-shadow: 0 1px 2px rgba(0, 0, 0, .18);
    user-select: none;
}
.comment-avatar-sm { width: 2.1rem; height: 2.1rem; font-size: .85rem; }

/* Composer + reply forms */
.comment-form textarea { resize: vertical; border-radius: .6rem; }
.comment-form textarea:focus {
    border-color: #D2232A;
    box-shadow: 0 0 0 .2rem rgba(210, 35, 42, .12);
}
.comment-composer { display: flex; gap: .85rem; align-items: flex-start; }

.comment-login {
    display: flex;
    align-items: center;
    background: var(--bs-tertiary-bg, #f5f2ee);
    border: 1px solid var(--bs-border-color);
    border-radius: .7rem;
    padding: .85rem 1.1rem;
    font-size: .95rem;
}
.comment-login .bi { color: #D2232A; font-size: 1.1rem; }

/* Threads */
.comment-list { display: flex; flex-direction: column; gap: .85rem; }
.comment {
    border: 1px solid var(--bs-border-color);
    border-radius: .8rem;
    padding: 1.1rem 1.2rem;
    background: var(--bs-body-bg);
    transition: border-color .15s ease, box-shadow .15s ease;
}
.comment:hover {
    border-color: var(--bs-secondary-border-subtle, #cfc7bb);
    box-shadow: 0 2px 12px rgba(0, 0, 0, .05);
}
.comment-row { display: flex; gap: .85rem; }
.comment-main { flex: 1 1 auto; min-width: 0; }

.comment-head { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.comment-author { font-weight: 700; color: var(--bs-body-color); }
.comment-badge {
    font-size: .65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: #D2232A;
    background: rgba(210, 35, 42, .1);
    border-radius: 999px;
    padding: .1rem .45rem;
}
.comment-meta { color: var(--bs-secondary-color); font-size: .8rem; }
.comment-meta::before { content: "\00B7"; margin-right: .5rem; }
.comment-body {
    margin: .3rem 0 .5rem;
    line-height: 1.55;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.comment-actions { display: flex; align-items: center; gap: 1rem; }
.comment-action {
    background: none;
    border: 0;
    padding: 0;
    color: var(--bs-secondary-color);
    font-size: .82rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    transition: color .15s ease;
}
.comment-action:hover { color: #D2232A; }
.comment-action-meta { color: var(--bs-secondary-color); font-size: .8rem; }

/* Nested replies with a connector rail */
.comment-replies {
    margin-top: 1rem;
    padding-left: 1.1rem;
    border-left: 2px solid var(--bs-border-color);
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.comment-empty {
    border: 1px dashed var(--bs-border-color);
    border-radius: .8rem;
    color: var(--bs-secondary-color);
}
.comment-empty .bi { font-size: 2rem; opacity: .6; }

/* ---------- League / competition pages ---------- */

/* Full-bleed hero band (always dark, matches the ESPN header) */
.league-hero {
    position: relative;
    overflow: hidden;
    color: #fff;
    background:
        radial-gradient(110% 180% at 88% -30%, rgba(210, 35, 42, .38), transparent 55%),
        radial-gradient(70% 120% at 0% 110%, rgba(210, 35, 42, .12), transparent 60%),
        linear-gradient(150deg, #1c1c1f 0%, var(--espn-black) 55%, #141416 100%);
    box-shadow: inset 0 -1px 0 rgba(255, 255, 255, .06);
}

.league-hero-watermark {
    position: absolute;
    right: -1.5rem;
    bottom: -3.5rem;
    font-size: 14rem;
    line-height: 1;
    color: rgba(255, 255, 255, .035);
    pointer-events: none;
    user-select: none;
}

.league-hero-crest {
    flex: 0 0 auto;
    width: 4.75rem;
    height: 4.75rem;
    border-radius: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.3rem;
    color: #fff;
    background: linear-gradient(160deg, var(--espn-red) 0%, var(--espn-red-darker) 100%);
    box-shadow: 0 12px 28px rgba(210, 35, 42, .35), inset 0 1px 0 rgba(255, 255, 255, .25);
}

@media (max-width: 575.98px) {
    .league-hero-crest {
        width: 3.5rem;
        height: 3.5rem;
        border-radius: .85rem;
        font-size: 1.7rem;
    }
}

/* Uploaded league icon replaces the trophy glyph */
.league-hero-crest.has-logo {
    background: #fff;
    padding: .55rem;
    box-shadow: 0 12px 28px rgba(0, 0, 0, .35), inset 0 1px 0 rgba(255, 255, 255, .25);
}

.league-hero-crest.has-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.league-hero-eyebrow {
    font-family: "Barlow Condensed", sans-serif;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    font-size: .8rem;
    color: rgba(255, 255, 255, .55);
}

.league-hero-eyebrow a {
    color: rgba(255, 255, 255, .75);
    text-decoration: none;
}

.league-hero-eyebrow a:hover {
    color: #fff;
}

.league-hero-flag {
    height: .95rem;
    width: auto;
    border-radius: 2px;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, .15);
}

.league-hero-title {
    font-family: "Barlow Condensed", sans-serif;
    font-weight: 900;
    letter-spacing: -.01em;
    line-height: 1;
    text-transform: uppercase;
    font-size: clamp(2rem, 5vw, 3.25rem);
    color: #fff;
}

.league-hero-season {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .25rem .7rem;
    border-radius: 999px;
    font-size: .78rem;
    font-weight: 600;
    color: rgba(255, 255, 255, .85);
    background: rgba(255, 255, 255, .08);
    border: 1px solid rgba(255, 255, 255, .12);
}

.league-hero-season .live-dot {
    width: .45rem;
    height: .45rem;
    border-radius: 50%;
    background: #3fda85;
    box-shadow: 0 0 0 3px rgba(63, 218, 133, .2);
}

/* Right-hand stat chips */
.league-hero-stat {
    min-width: 5.25rem;
    padding: .55rem .9rem;
    border-radius: .7rem;
    text-align: center;
    background: rgba(255, 255, 255, .06);
    border: 1px solid rgba(255, 255, 255, .09);
    backdrop-filter: blur(4px);
}

.league-hero-stat-value {
    font-family: "Barlow Condensed", sans-serif;
    font-weight: 900;
    font-size: 1.5rem;
    line-height: 1.05;
    color: #fff;
}

.league-hero-stat-label {
    font-size: .68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .07em;
    color: rgba(255, 255, 255, .5);
}

/* Sub-navigation tabs inside the hero */
.league-tabs {
    display: flex;
    align-items: stretch;
    gap: .25rem;
    margin: 0;
    padding: 0;
    list-style: none;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}

.league-tabs::-webkit-scrollbar {
    display: none;
}

.league-tab {
    display: flex;
    align-items: center;
    gap: .4rem;
    padding: .7rem .95rem;
    color: rgba(255, 255, 255, .65);
    text-decoration: none;
    font-family: "Barlow Condensed", sans-serif;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
    font-size: .95rem;
    white-space: nowrap;
    border-bottom: 3px solid transparent;
    transition: color .12s ease, border-color .12s ease;
}

.league-tab:hover {
    color: #fff;
}

.league-tab.active {
    color: #fff;
    border-bottom-color: var(--espn-red);
}

.league-season-btn {
    --bs-btn-color: rgba(255, 255, 255, .8);
    --bs-btn-border-color: rgba(255, 255, 255, .25);
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: rgba(255, 255, 255, .1);
    --bs-btn-hover-border-color: rgba(255, 255, 255, .4);
    --bs-btn-active-color: #fff;
    --bs-btn-active-bg: rgba(255, 255, 255, .15);
    --bs-btn-active-border-color: rgba(255, 255, 255, .4);
    font-size: .8rem;
    font-weight: 600;
}

/* Content panels (shared with the right rail look) */
.league-panel {
    border: 1px solid var(--bs-border-color);
    border-radius: .65rem;
    background-color: var(--bs-body-bg);
    overflow: hidden;
}

.league-panel-heading {
    display: flex;
    align-items: center;
    gap: .5rem;
    font-family: "Barlow Condensed", sans-serif;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .03em;
    font-size: 1.05rem;
    padding: .7rem 1rem;
    border-bottom: 2px solid var(--espn-red);
}

.league-panel-heading .bi {
    color: var(--espn-red);
    font-size: .95em;
}

.league-panel-heading .panel-link {
    margin-left: auto;
    font-family: var(--bs-body-font-family);
    font-weight: 600;
    font-size: .78rem;
    letter-spacing: 0;
    text-transform: none;
    text-decoration: none;
}

/* Match rows */
.match-row {
    display: flex;
    align-items: center;
    gap: .85rem;
    padding: .65rem .9rem;
    text-decoration: none;
    color: var(--bs-body-color);
    transition: background-color .12s ease;
}

.match-row + .match-row {
    border-top: 1px solid var(--bs-border-color);
}

.match-row:hover {
    background-color: var(--bs-tertiary-bg);
}

.match-date {
    flex: 0 0 auto;
    width: 3.4rem;
    text-align: center;
    line-height: 1.2;
}

.match-date-day {
    display: block;
    font-size: .74rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: var(--bs-secondary-color);
}

.match-date-time {
    display: block;
    font-size: .72rem;
    color: var(--bs-tertiary-color, var(--bs-secondary-color));
}

.match-teams {
    flex: 1 1 auto;
    min-width: 0;
    display: grid;
    gap: .3rem;
}

.match-team {
    display: flex;
    align-items: center;
    gap: .5rem;
    min-width: 0;
    font-size: .875rem;
}

.match-team .team-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.match-team.is-winner .team-name {
    font-weight: 700;
}

.match-score {
    flex: 0 0 auto;
    display: grid;
    gap: .3rem;
    min-width: 1.9rem;
    text-align: center;
}

.match-score .goals {
    font-family: "Barlow Condensed", sans-serif;
    font-weight: 700;
    font-size: 1rem;
    line-height: 1.3;
    border-radius: .35rem;
    background: var(--bs-tertiary-bg);
    color: var(--bs-secondary-color);
    padding: 0 .3rem;
}

.match-score .goals.win {
    background: color-mix(in srgb, var(--espn-red) 14%, transparent);
    color: var(--espn-red);
}

.match-score .pending {
    font-size: .72rem;
    color: var(--bs-secondary-color);
    line-height: 1.3;
}

/* Team crest grid */
.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(7.5rem, 1fr));
    gap: .5rem;
}

.team-cell {
    display: flex;
    align-items: center;
    gap: .55rem;
    padding: .5rem .65rem;
    border: 1px solid var(--bs-border-color);
    border-radius: .55rem;
    background-color: var(--bs-body-bg);
    color: var(--bs-body-color);
    text-decoration: none;
    font-size: .82rem;
    font-weight: 600;
    min-width: 0;
    transition: border-color .12s ease, box-shadow .12s ease, transform .12s ease;
}

.team-cell span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.team-cell:hover {
    color: var(--espn-red);
    border-color: color-mix(in srgb, var(--espn-red) 45%, var(--bs-border-color));
    transform: translateY(-1px);
    box-shadow: 0 .35rem .8rem rgba(0, 0, 0, .08);
}

/* Standings */
.standings-table thead th {
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--bs-secondary-color);
    border-bottom-width: 2px;
}

.standings-pos {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.6rem;
    height: 1.6rem;
    border-radius: .45rem;
    font-family: "Barlow Condensed", sans-serif;
    font-weight: 800;
    font-size: .95rem;
    color: var(--bs-secondary-color);
    background: var(--bs-tertiary-bg);
}

.standings-pos.is-first {
    color: #fff;
    background: var(--espn-red);
    box-shadow: 0 3px 8px rgba(210, 35, 42, .35);
}

.form-dot {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.2rem;
    height: 1.2rem;
    border-radius: 50%;
    font-size: .6rem;
    font-weight: 700;
    color: #fff;
}

.form-dot.w { background: #2e9e5b; }
.form-dot.d { background: var(--bs-secondary); }
.form-dot.l { background: var(--espn-red); }

/* Standings sub-view tabs (Standings / Form / Over-Under / HT-FT) */
.standings-subtabs {
    display: flex;
    gap: .25rem;
    margin: 0;
    padding: 0;
    list-style: none;
    border-bottom: 2px solid var(--bs-border-color);
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}

.standings-subtabs::-webkit-scrollbar {
    display: none;
}

.standings-subtabs a {
    display: inline-block;
    padding: .55rem .9rem;
    margin-bottom: -2px;
    color: var(--bs-secondary-color);
    text-decoration: none;
    font-family: "Barlow Condensed", sans-serif;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .03em;
    font-size: .95rem;
    white-space: nowrap;
    border-bottom: 3px solid transparent;
    transition: color .12s ease, border-color .12s ease;
}

.standings-subtabs a:hover {
    color: var(--bs-body-color);
}

.standings-subtabs a.active {
    color: var(--espn-red);
    border-bottom-color: var(--espn-red);
}

/* Promotion / relegation zone legend */
.zone-legend {
    display: flex;
    flex-wrap: wrap;
    gap: .4rem 1.25rem;
    margin-top: .75rem;
    font-size: .8rem;
    color: var(--bs-secondary-color);
}

.zone-legend-item {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
}

.zone-dot {
    display: inline-block;
    width: .7rem;
    height: .7rem;
    border-radius: .2rem;
    flex: 0 0 auto;
}

/* Highlighted "this team" row on team-page standings */
.mini-standings tr.is-self td {
    background: color-mix(in srgb, var(--espn-red) 9%, transparent);
    box-shadow: inset 3px 0 0 var(--espn-red);
}

.mini-standings tr.is-self .team-name {
    font-weight: 700;
}

/* Group label inside the summary rail mini standings */
.mini-standings-group {
    font-family: "Barlow Condensed", sans-serif;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .04em;
    font-size: .85rem;
    color: var(--espn-red);
    padding: .55rem 1rem .1rem;
}

/* Scope switch (Overall / Home / Away) */
.scope-switch {
    display: inline-flex;
    padding: .25rem;
    gap: .25rem;
    border: 1px solid var(--bs-border-color);
    border-radius: 999px;
    background: var(--bs-body-bg);
}

.scope-switch a {
    padding: .3rem 1rem;
    border-radius: 999px;
    font-size: .82rem;
    font-weight: 600;
    color: var(--bs-secondary-color);
    text-decoration: none;
    transition: all .12s ease;
}

.scope-switch a:hover {
    color: var(--bs-body-color);
}

.scope-switch a.active {
    color: #fff;
    background: var(--espn-red);
    box-shadow: 0 2px 6px rgba(210, 35, 42, .3);
}

/* Cross table (checkerboard / head-to-head grid) */
.cross-table {
    table-layout: auto;
}

.cross-table thead th {
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--bs-secondary-color);
    border-bottom-width: 2px;
    text-align: center;
}

.cross-table td,
.cross-table th {
    padding: .45rem .4rem;
    border-inline-end: 1px solid var(--bs-border-color);
}

.cross-table td:last-child,
.cross-table th:last-child {
    border-inline-end: 0;
}

.cross-team-col {
    min-width: 11rem;
    max-width: 13rem;
    text-align: start;
    padding-inline: .9rem !important;
}

.cross-pos {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.35rem;
    font-family: "Barlow Condensed", sans-serif;
    font-weight: 800;
    font-size: .9rem;
    color: var(--bs-secondary-color);
}

.cross-score {
    display: block;
    margin: .1rem auto;
    min-width: 2.4rem;
    padding: .12rem .3rem;
    border-radius: .35rem;
    font-family: "Barlow Condensed", sans-serif;
    font-weight: 700;
    font-size: .92rem;
    line-height: 1.25;
    white-space: nowrap;
}

.cross-score.w {
    color: #1e7a45;
    background: rgba(46, 158, 91, .16);
}

.cross-score.d {
    color: var(--bs-secondary-color);
    background: var(--bs-tertiary-bg);
}

.cross-score.l {
    color: var(--espn-red);
    background: color-mix(in srgb, var(--espn-red) 14%, transparent);
}

[data-bs-theme="dark"] .cross-score.w {
    color: #5fd394;
}

.cross-diag {
    background: repeating-linear-gradient(
        45deg,
        var(--bs-tertiary-bg),
        var(--bs-tertiary-bg) 4px,
        transparent 4px,
        transparent 8px
    );
}

/* ---------- Wide-table horizontal scrolling (mobile-friendly) ---------- */

/* Smooth touch scrolling + slim branded scrollbar */
[data-scroll-x] {
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    scrollbar-width: thin;
    scrollbar-color: color-mix(in srgb, var(--espn-red) 55%, transparent) transparent;
}

[data-scroll-x]::-webkit-scrollbar {
    height: 6px;
}

[data-scroll-x]::-webkit-scrollbar-track {
    background: var(--bs-tertiary-bg);
    border-radius: 999px;
}

[data-scroll-x]::-webkit-scrollbar-thumb {
    background: color-mix(in srgb, var(--espn-red) 55%, transparent);
    border-radius: 999px;
}

[data-scroll-x]::-webkit-scrollbar-thumb:hover {
    background: var(--espn-red);
}

/* First column stays pinned while the rest scrolls under it */
.table-sticky-first th:first-child,
.table-sticky-first td:first-child {
    position: sticky;
    left: 0;
    z-index: 2;
    background-color: var(--bs-body-bg);
}

.table-sticky-first thead th:first-child {
    z-index: 3;
}

/* Edge hints: right-side fade while more columns remain, and a shadow on the
   pinned column once scrolled. Classes toggled from app.js. */
.scroll-x-wrap {
    position: relative;
}

.scroll-x-wrap::after {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    bottom: 6px;
    width: 2rem;
    pointer-events: none;
    opacity: 0;
    transition: opacity .15s ease;
    background: linear-gradient(270deg, var(--bs-body-bg), transparent);
    z-index: 4;
}

.scroll-x-wrap.has-right::after {
    opacity: .9;
}

.scroll-x-wrap.has-left .table-sticky-first th:first-child,
.scroll-x-wrap.has-left .table-sticky-first td:first-child {
    box-shadow: 10px 0 12px -10px rgba(0, 0, 0, .4);
}

/* Tighter cross-table cells on phones */
@media (max-width: 575.98px) {
    .cross-team-col {
        min-width: 8.75rem;
        max-width: 8.75rem;
    }

    .cross-score {
        min-width: 2.1rem;
        font-size: .85rem;
    }

    .cross-table td,
    .cross-table th {
        padding: .4rem .3rem;
    }
}

/* ---------- Category ↔ sports hub banner ---------- */
.sports-hub {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: .8rem 1.1rem;
    border-radius: .65rem;
    color: #fff;
    background:
        radial-gradient(120% 200% at 90% -40%, rgba(210, 35, 42, .45), transparent 55%),
        linear-gradient(140deg, #1c1c1f 0%, var(--espn-black) 70%);
    overflow: hidden;
}

.sports-hub-main {
    display: flex;
    align-items: center;
    gap: .9rem;
    min-width: 0;
    text-decoration: none;
    color: #fff;
}

.sports-hub-crest {
    flex: 0 0 auto;
    width: 2.9rem;
    height: 2.9rem;
    border-radius: .7rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    color: #fff;
    background: linear-gradient(160deg, var(--espn-red) 0%, var(--espn-red-darker) 100%);
    box-shadow: 0 6px 16px rgba(210, 35, 42, .35);
}

.sports-hub-crest img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #fff;
    border-radius: .7rem;
    padding: .3rem;
}

.sports-hub-eyebrow {
    display: block;
    font-family: "Barlow Condensed", sans-serif;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    font-size: .68rem;
    color: rgba(255, 255, 255, .55);
}

.sports-hub-name {
    display: block;
    font-family: "Barlow Condensed", sans-serif;
    font-weight: 800;
    text-transform: uppercase;
    font-size: 1.25rem;
    line-height: 1.1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sports-hub-main:hover .sports-hub-name {
    color: #fff;
    text-decoration: underline;
    text-decoration-color: var(--espn-red);
    text-decoration-thickness: 2px;
    text-underline-offset: 3px;
}

.sports-hub-season {
    display: block;
    font-size: .72rem;
    color: rgba(255, 255, 255, .55);
}

.sports-hub-links {
    margin-left: auto;
    gap: .4rem;
}

.sports-hub-link {
    padding: .35rem .85rem;
    border-radius: 999px;
    font-size: .78rem;
    font-weight: 600;
    color: rgba(255, 255, 255, .85);
    background: rgba(255, 255, 255, .08);
    border: 1px solid rgba(255, 255, 255, .14);
    text-decoration: none;
    white-space: nowrap;
    transition: all .12s ease;
}

.sports-hub-link:hover {
    color: #fff;
    background: var(--espn-red);
    border-color: var(--espn-red);
}

.sports-hub-arrow {
    flex: 0 0 auto;
    color: rgba(255, 255, 255, .5);
    font-size: 1.1rem;
    text-decoration: none;
    padding: .25rem;
}

.sports-hub .sports-hub-links + .sports-hub-arrow {
    margin-left: 0;
}

.sports-hub-arrow:hover {
    color: #fff;
}

/* ---------- Knockout draw / playoff bracket ---------- */
.bracket-scroll {
    overflow-x: auto;
    padding: 1rem;
}

.bracket {
    display: flex;
    align-items: stretch;
    min-width: max-content;
}

.bracket-round {
    display: flex;
    flex-direction: column;
    width: 15.5rem;
    flex: 0 0 auto;
}

.bracket-round + .bracket-round {
    margin-left: 2.25rem;
}

.bracket-round-title {
    font-family: "Barlow Condensed", sans-serif;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .05em;
    font-size: .85rem;
    color: var(--espn-red);
    text-align: center;
    margin-bottom: .5rem;
}

.bracket-slots {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-around;
}

.bracket-slot {
    position: relative;
    display: flex;
    align-items: center;
    flex: 1 0 auto;
    padding: .45rem 0;
}

/* Connectors: each pair feeds the tie centered between them in the next round */
.bracket-round:not(:last-child) .bracket-slot:nth-child(odd)::after {
    content: "";
    position: absolute;
    right: -1.125rem;
    top: 50%;
    bottom: -50%;
    width: 1.125rem;
    border-top: 2px solid var(--bs-border-color);
    border-right: 2px solid var(--bs-border-color);
    border-top-right-radius: .4rem;
}

.bracket-round:not(:last-child) .bracket-slot:nth-child(even)::after {
    content: "";
    position: absolute;
    right: -1.125rem;
    bottom: 50%;
    top: -50%;
    width: 1.125rem;
    border-bottom: 2px solid var(--bs-border-color);
    border-right: 2px solid var(--bs-border-color);
    border-bottom-right-radius: .4rem;
}

/* Lone tie in a round (e.g. the final fed by two semis): straight stub only */
.bracket-round:not(:last-child) .bracket-slot:only-child::after {
    top: 50%;
    bottom: auto;
    height: 2px;
    border: 0;
    background: var(--bs-border-color);
    border-radius: 0;
}

.bracket-round + .bracket-round .bracket-slot::before {
    content: "";
    position: absolute;
    left: -1.125rem;
    top: 50%;
    width: 1.125rem;
    height: 2px;
    background: var(--bs-border-color);
}

/* Tie cards */
.bracket-tie {
    width: 100%;
    border: 1px solid var(--bs-border-color);
    border-radius: .55rem;
    background: var(--bs-body-bg);
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .05);
}

.bracket-team {
    display: flex;
    align-items: center;
    gap: .5rem;
    padding: .5rem .7rem;
    font-size: .85rem;
    min-width: 0;
}

.bracket-team + .bracket-team {
    border-top: 1px solid var(--bs-border-color);
}

.bracket-team .team-name {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.bracket-team.is-winner .team-name {
    font-weight: 700;
}

.tie-score {
    flex: 0 0 auto;
    min-width: 1.5rem;
    text-align: center;
    font-family: "Barlow Condensed", sans-serif;
    font-weight: 700;
    border-radius: .3rem;
    background: var(--bs-tertiary-bg);
    color: var(--bs-secondary-color);
    padding: 0 .3rem;
}

.tie-score.win {
    background: color-mix(in srgb, var(--espn-red) 14%, transparent);
    color: var(--espn-red);
}

.bracket-tie-meta {
    padding: .3rem .7rem;
    font-size: .7rem;
    text-transform: uppercase;
    letter-spacing: .04em;
    font-weight: 600;
    color: var(--bs-secondary-color);
    background: var(--bs-tertiary-bg);
    border-top: 1px solid var(--bs-border-color);
}

@media (max-width: 575.98px) {
    .bracket-round {
        width: 13.5rem;
    }

    .bracket-round + .bracket-round {
        margin-left: 1.75rem;
    }

    .bracket-round:not(:last-child) .bracket-slot::after {
        right: -.875rem !important;
        width: .875rem !important;
    }

    .bracket-round + .bracket-round .bracket-slot::before {
        left: -.875rem;
        width: .875rem;
    }
}

/* Compact standings on phones: tighter cells and a capped, truncating team
   column so the classic table fits a 375px screen without scrolling. */
@media (max-width: 575.98px) {
    .standings-table {
        font-size: .85rem;
    }

    .standings-table td,
    .standings-table th {
        padding: .5rem .3rem;
    }

    .standings-table td:nth-child(2),
    .standings-table th:nth-child(2) {
        max-width: 8.25rem;
        overflow: hidden;
    }

    .standings-table td a {
        min-width: 0;
    }

    .standings-table td a .text-truncate {
        flex: 1 1 auto;
        min-width: 0;
    }

    .standings-pos {
        width: 1.45rem;
        height: 1.45rem;
        font-size: .85rem;
    }
}

/* Mini standings (summary rail) */
.mini-standings {
    table-layout: fixed;
    width: 100%;
}

.mini-standings td,
.mini-standings th {
    padding: .45rem .5rem;
}

.mini-standings th:nth-child(3),
.mini-standings th:nth-child(4),
.mini-standings th:nth-child(5) {
    width: 2.6rem;
}

.mini-standings .team-name {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Archive season list */
.season-row {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .8rem 1rem;
    transition: background-color .12s ease;
}

.season-row:hover {
    background-color: var(--bs-tertiary-bg);
}

.season-row + .season-row {
    border-top: 1px solid var(--bs-border-color);
}

.season-row-name {
    font-family: "Barlow Condensed", sans-serif;
    font-weight: 800;
    font-size: 1.15rem;
    letter-spacing: .01em;
}

/* Empty states */
.league-empty {
    text-align: center;
    padding: 3.5rem 1rem;
    color: var(--bs-secondary-color);
}

.league-empty-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 4rem;
    height: 4rem;
    border-radius: 50%;
    font-size: 1.6rem;
    color: var(--espn-red);
    background: color-mix(in srgb, var(--espn-red) 10%, transparent);
    margin-bottom: .85rem;
}

/* ================= Player profile ================= */

/* Hero headshot */
.player-hero-photo {
    flex: 0 0 auto;
    width: 5.5rem;
    height: 5.5rem;
    border-radius: 1.1rem;
    overflow: hidden;
    background: linear-gradient(160deg, #2a2a2e 0%, #17171a 100%);
    box-shadow: 0 12px 28px rgba(0, 0, 0, .45), inset 0 0 0 1px rgba(255, 255, 255, .12);
}

.player-hero-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
}

.player-hero-photo.is-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.6rem;
    color: rgba(255, 255, 255, .35);
}

@media (max-width: 575.98px) {
    .player-hero-photo {
        width: 4rem;
        height: 4rem;
        border-radius: .85rem;
        font-size: 1.9rem;
    }
}

/* "Currently sidelined" pill in the hero */
.player-hero-injury {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding: .25rem .7rem;
    border-radius: 999px;
    font-size: .78rem;
    font-weight: 600;
    color: #ffd9d9;
    background: rgba(210, 35, 42, .22);
    border: 1px solid rgba(210, 35, 42, .5);
}

.player-hero-injury .bi { font-size: .85em; }

/* Transfer timeline (career path) */
.transfer-timeline {
    position: relative;
    padding: .35rem 1rem .6rem;
}

.transfer-item {
    position: relative;
    display: flex;
    align-items: center;
    gap: .85rem;
    padding: .7rem 0 .7rem 1.35rem;
}

/* The vertical line linking the dots */
.transfer-item::before {
    content: "";
    position: absolute;
    left: .29rem;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--bs-border-color);
}
.transfer-item:first-child::before { top: 50%; }
.transfer-item:last-child::before { bottom: 50%; }

.transfer-dot {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: .62rem;
    height: .62rem;
    border-radius: 50%;
    background: var(--espn-red);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--espn-red) 20%, transparent);
}

.transfer-body { flex: 1 1 auto; min-width: 0; }

.transfer-clubs {
    display: flex;
    align-items: center;
    gap: .5rem;
    font-family: "Barlow Condensed", sans-serif;
    font-weight: 700;
    font-size: 1.05rem;
    line-height: 1.1;
}

.transfer-club {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    min-width: 0;
}
.transfer-club.to .transfer-club-name { color: var(--bs-body-color); }
.transfer-club.from .transfer-club-name { color: var(--bs-secondary-color); }
.transfer-club-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.transfer-club-logo {
    flex: 0 0 auto;
    width: 1.3rem;
    height: 1.3rem;
    object-fit: contain;
}
.transfer-club-logo.is-fallback {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    color: var(--bs-secondary-color);
}

.transfer-arrow { flex: 0 0 auto; color: var(--espn-red); font-size: .85em; }

.transfer-meta {
    display: flex;
    align-items: center;
    gap: .5rem;
    margin-top: .15rem;
}

.transfer-date { font-size: .78rem; color: var(--bs-secondary-color); }

.transfer-type {
    font-size: .64rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
    padding: .1rem .4rem;
    border-radius: .3rem;
    color: var(--bs-secondary-color);
    background: var(--bs-tertiary-bg);
    border: 1px solid var(--bs-border-color);
}

.transfer-fee {
    flex: 0 0 auto;
    font-family: "Barlow Condensed", sans-serif;
    font-weight: 800;
    font-size: 1rem;
    padding: .2rem .6rem;
    border-radius: .4rem;
    color: var(--espn-red);
    background: color-mix(in srgb, var(--espn-red) 9%, transparent);
    border: 1px solid color-mix(in srgb, var(--espn-red) 22%, transparent);
}

/* Profile fact rows */
.player-fact-label {
    width: 6.5rem;
    flex: 0 0 auto;
}

/* Last matches — FlashScore-style per-match stats table */
.lm-table {
    width: 100%;
    border-collapse: collapse;
    font-size: .82rem;
}

.lm-table thead th {
    padding: .5rem .35rem;
    text-align: center;
    font-size: .72rem;
    color: var(--bs-secondary-color);
    border-bottom: 1px solid var(--bs-border-color);
    background: var(--bs-tertiary-bg);
    white-space: nowrap;
}
.lm-table thead th .bi { color: var(--bs-secondary-color); }
.lm-th-stat { width: 2.1rem; }
.lm-th-match { text-align: left; }

.lm-table tbody td {
    padding: .45rem .35rem;
    border-bottom: 1px solid var(--bs-border-color);
    vertical-align: middle;
    text-align: center;
}
.lm-table tbody tr:last-child td { border-bottom: 0; }
.lm-table tbody tr:hover td { background: var(--bs-tertiary-bg); }

.lm-date {
    white-space: nowrap;
    color: var(--bs-secondary-color);
    font-size: .74rem;
    padding-left: .85rem !important;
    text-align: left !important;
    font-variant-numeric: tabular-nums;
}
.lm-comp {
    font-family: "Barlow Condensed", sans-serif;
    font-weight: 700;
    color: var(--espn-red);
    font-size: .78rem;
}

/* Home/away stacked club rows with score */
.lm-match { text-align: left !important; min-width: 11rem; }
.lm-side {
    display: grid;
    grid-template-columns: 1.1rem 1fr auto;
    align-items: center;
    gap: .4rem;
    line-height: 1.5;
}
.lm-side img { width: 1.1rem; height: 1.1rem; object-fit: contain; }
.lm-club { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lm-side.is-winner .lm-club,
.lm-side.is-winner .lm-score { font-weight: 700; }
.lm-score {
    font-variant-numeric: tabular-nums;
    color: var(--bs-secondary-color);
    padding-left: .4rem;
}
.lm-side.is-winner .lm-score { color: var(--bs-body-color); }

/* Rating badge, coloured by band like FlashScore */
.lm-rating {
    display: inline-block;
    min-width: 2rem;
    padding: .12rem .3rem;
    border-radius: .3rem;
    font-family: "Barlow Condensed", sans-serif;
    font-weight: 800;
    font-size: .82rem;
    color: #fff;
    background: var(--bs-secondary);
}
.lm-rating.is-good { background: #2e9e5b; }
.lm-rating.is-avg  { background: #e0872a; }
.lm-rating.is-poor { background: var(--espn-red); }

.lm-stat { font-variant-numeric: tabular-nums; }
.lm-minutes { color: var(--bs-secondary-color); white-space: nowrap; }
.lm-stat.is-on { font-weight: 700; }
.lm-stat.is-off { color: var(--bs-tertiary-color, var(--bs-secondary-color)); opacity: .45; }

.lm-absence {
    text-align: center;
    color: var(--bs-secondary-color);
    font-style: italic;
    font-size: .78rem;
}

/* Little card glyphs used in the header */
.lm-card {
    display: inline-block;
    width: .62rem;
    height: .82rem;
    border-radius: 1px;
    vertical-align: -.1em;
}
.lm-card-y { background: #f4c430; }
.lm-card-r { background: var(--espn-red); }

/* Injury history — a FlashScore-style From / Until / Injury table */
.injury-table {
    width: 100%;
    border-collapse: collapse;
    font-size: .8rem;
}

.injury-table thead th {
    font-family: "Barlow Condensed", sans-serif;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
    font-size: .68rem;
    color: var(--bs-secondary-color);
    text-align: left;
    padding: .5rem .5rem .4rem;
    border-bottom: 1px solid var(--bs-border-color);
    background: var(--bs-tertiary-bg);
}

.injury-table tbody td {
    padding: .45rem .5rem;
    border-bottom: 1px solid var(--bs-border-color);
    vertical-align: middle;
}
.injury-table tbody tr:last-child td { border-bottom: 0; }
.injury-table tbody tr:hover td { background: var(--bs-tertiary-bg); }

.injury-table th:first-child,
.injury-table td:first-child { padding-left: 1rem; }
.injury-table th:last-child,
.injury-table td:last-child { padding-right: 1rem; }

.injury-date {
    color: var(--bs-secondary-color);
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}
.injury-table tr.is-ongoing .injury-until {
    color: var(--espn-red);
    font-weight: 700;
}

.injury-type {
    font-weight: 600;
    line-height: 1.2;
}

/* The red medical cross, matching FlashScore's injury glyph */
.injury-icon {
    width: .72rem;
    height: .72rem;
    fill: var(--espn-red);
    vertical-align: -.06em;
    margin-right: .3rem;
    flex-shrink: 0;
}

.injury-current {
    display: inline-block;
    font-size: .58rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
    padding: .05rem .35rem;
    border-radius: .3rem;
    color: #fff;
    background: var(--espn-red);
    vertical-align: .08em;
    margin-left: .15rem;
}
