/* Scoped artwork integration. Content, club badges and live data retain their markup. */
.tso-art-live-icon{display:inline-block;width:1.1em;height:1.1em;flex:0 0 auto;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round;vertical-align:-.15em;pointer-events:none}
.tso-art-has-icon{display:inline-flex!important;align-items:center;gap:6px}
#primary-nav .tso-art-live-icon{width:14px;height:14px;color:#ffd76a}
.ag-jumps .tso-art-live-icon{width:16px;height:16px}
main .tso-art-live-hero{background-color:#071d33!important;background-image:linear-gradient(90deg,#071d33e8,#071d33a8 58%,#071d3366),var(--tso-live-art)!important;background-position:center!important;background-size:cover!important;border-bottom:4px solid #ffd76a;color:#fff!important}
main .tso-art-live-hero :is(h1,h2,p){color:#fff!important}
main .tso-art-live-hero h1 em{color:#ffd76a!important}
main .tso-art-live-hero :is(.cm-kicker,.ch2-kicker,.sl-tag,.ip-tag,.ag-label,.hub-slanted-label){background:#ffd76a!important;color:#071d33!important;text-shadow:none!important}
main .tso-art-live-hero :is(.cm-shrimpie,.sl-connection-card,.ip-identity){background:#071d33dd!important;border:1px solid #ffffff40;color:#fff}
.tso-art-live-mascot{object-fit:contain!important}
.cm-room-icon:has(.tso-room-badge),.cv-row-icon:has(.tso-room-badge){background:transparent!important;border:0!important;box-shadow:none!important;padding:0!important}
.tso-room-badge{object-fit:contain}
@media(min-width:901px){#primary-nav{flex-wrap:wrap}#primary-nav a{padding-inline:8px}}
@media(max-width:700px){.tso-art-has-icon{gap:5px}main .tso-art-live-hero{background-position:65% center!important}.hub-topnav-links .tso-art-live-icon{width:14px;height:14px}}

/* TSO site-wide matchday styling. Core templates and data are served by the site. */
:root {
  --tso-mobile-navy: #071d33;
  --tso-mobile-deep: #051526;
  --tso-mobile-yellow: #ffce44;
  --tso-mobile-gold: #ffd76a;
  --tso-mobile-ink: #10233f;
  --tso-mobile-paper: #fffdf7;
  --tso-mobile-line: #d7d3c4;
}
.tso-mobile-jump { display: none; }
.site-header .nav-band { border-bottom: 3px solid var(--tso-mobile-yellow); }
.site-header #primary-nav a:focus-visible,
main :is(a, button, summary, input, select, textarea, [tabindex="0"]):focus-visible,
.tso-mobile-jump a:focus-visible {
  outline: 3px solid #2765ae !important;
  outline-offset: 3px;
  box-shadow: 0 0 0 2px #fff;
}
#main mark { background: #ffe99a; color: var(--tso-mobile-navy); }
#main a:not([class]) { text-underline-offset: .17em; }
#main .tso-mobile-mark {
  width: auto;
  height: clamp(39px, 5vw, 60px);
  max-width: 100%;
  margin: 0 0 .8rem;
  display: block;
  object-fit: contain;
  object-position: left;
}
#main :is(.hero-story, .ed-lead, .ed-card, .news-card, .replay-card, .tk-card, .sl-service-card, .cm-room-card, .ch2-feature, .ag-card, .agd-club) {
  border-radius: 12px;
  border: 1px solid var(--tso-mobile-line);
  box-shadow: 0 6px 18px #071d3312;
  min-width: 0;
}
#main :is(.ed-card, .news-card, .cm-room-card, .sl-service-card) { border-top: 3px solid #c6a15b; }
#main .hero-story { border-bottom: 5px solid var(--tso-mobile-yellow); }
#main .next-card {
  border: 0;
  border-left: 5px solid #aa7421;
  border-radius: 0 17px 12px 12px;
  background: var(--tso-mobile-gold);
  color: var(--tso-mobile-navy);
  box-shadow: 0 6px 18px #071d3318;
}
#main .next-card :is(h2, h3, time, .card-topline, .card-head, .big-fixture, .eyebrow) { color: var(--tso-mobile-navy); }
#main :is(.hero-scorebug, .hub-match-strip .latest-result) {
  border: 1px solid #b48a42;
  border-radius: 4px 14px 4px 14px;
  box-shadow: inset 0 3px #dbb561;
}
#main :is(.tk-card, .hub-match-strip .latest-result, .hub-match-strip .upcoming-result) { border-top: 4px solid #c6a15b; }
#main :is(.hub-table-scroll, .history-season-table, .tso-mobile-table) { max-width: 100%; min-width: 0; }
#main .tso-mobile-table { overflow-x: auto; overscroll-behavior-inline: contain; }
#main :is(.summary-cards, .stat-strip, .forecast-summary, .quick-links, .fixture-grid, .hub-replay-cards) > * { min-width: 0; }
#main .summary-cards > * { border-radius: 10px; border-top: 3px solid #c6a15b; }
#main :is(.summary-cards, .stat-strip) :is(strong, b) { font-variant-numeric: tabular-nums; }
#main :is(.agd-club, .club-grid a)[data-tso-club] {
  border-inline-start: 5px solid var(--tso-club-primary);
  color: var(--tso-mobile-ink);
  background: var(--tso-mobile-paper);
}
#main :is(.agd-club, .club-grid a)[data-tso-club]:is(:hover, :focus-visible) {
  background: var(--tso-club-primary);
  color: #fff;
}
#main[data-tso-club] :is(.hub-hero, .ag-hero, .agd-hero) {
  background-color: var(--tso-club-primary) !important;
  background-image: linear-gradient(105deg,var(--tso-club-primary) 15%,color-mix(in srgb,var(--tso-club-primary) 93%,black) 84%) !important;
  border-bottom: 6px solid var(--tso-club-secondary) !important;
  color: white !important;
}
#main[data-tso-club] :is(.hub-hero, .ag-hero, .agd-hero) :is(h1,h2,p) { color: white !important; }
#main[data-tso-club] :is(.hub-slanted-label, .ag-label) {
  background: var(--tso-club-secondary) !important;
  color: var(--tso-club-secondary-ink) !important;
}
#main .tso-mobile-shrimpie {
  width: min(100%, 132px);
  height: auto;
  object-fit: contain;
  flex: 0 1 auto;
  filter: drop-shadow(0 5px 4px #0515262b);
}
#main .tso-mobile-shrimpie--extra { float: right; width: clamp(64px, 12vw, 115px); margin: 0 0 .5rem .75rem; }
#main :is(.ed-index-head, .agd-hero, #tso-ask-shrimpie) { display: flow-root; }
#main .tso-mobile-shrimpie--extra + h1 { overflow-wrap: anywhere; }
@media (max-width: 820px) {
  .tso-mobile-jump {
    display: grid;
    grid-template-columns: repeat(4,minmax(0,1fr));
    gap: 1px;
    background: #314658;
    border-bottom: 1px solid #314658;
  }
  .tso-mobile-jump a {
    display: grid;
    place-items: center;
    min-height: 48px;
    padding: .25rem .1rem;
    background: var(--tso-mobile-navy);
    color: #fff;
    font: 750 clamp(.7rem,2.7vw,.875rem)/1.15 system-ui,sans-serif;
    text-decoration: none;
    text-align: center;
  }
  .tso-mobile-jump a[aria-current="page"] { background: var(--tso-mobile-yellow); color: var(--tso-mobile-navy); }
  #main :is(.ed-filters a, .ed-filters button, .hub-topnav a, .hub-global-nav a, .cm-nav a, .ag-jumps a, .tk-nav a, .sl-nav a, .replay-filters button, .ed-pagination a) {
    min-height: 44px;
    align-content: center;
  }
  #main :is(input:not([type=checkbox]):not([type=radio]):not([type=hidden]), select, textarea) { font-size: 1rem; }
  #main :is(.hub-workspace, .cg-workspace, .ed-front, .hub-live-score, .hero-rail, .ch2-places, .sl-explore, .tk-card, .cm-topic) { min-width: 0; }
  #main :is(h1, h2, h3, .cm-topic-copy, .agd-club) { overflow-wrap: anywhere; }
  #main :is(.hub-topnav, .hub-global-nav) { max-width: 100%; }
}
@media (max-width: 590px) {
  .site-header .masthead { min-height: 0; }
  #main .hero { gap: .8rem; }
  #main .hero-rail { gap: .65rem; }
  #main .hero-content h1 { font-size: clamp(1.65rem, 7vw, 2.5rem); line-height: 1.05; }
  #main :is(.hero-art, .ed-card-image, .replay-thumb) img { max-width: 100%; }
  #main :is(.hero-actions, .tk-hero-actions, .ag-jumps, .replay-card-links) { flex-wrap: wrap; gap: .45rem; }
  #main .tso-mobile-mark { height: 38px; margin-bottom: .55rem; }
  #main .tso-mobile-shrimpie--extra { width: 75px; }
}
@media (prefers-reduced-motion: reduce) {
  .tso-mobile-jump, .tso-mobile-jump *, #main .tso-mobile-shrimpie { animation: none !important; transition: none !important; }
}
/* Keep fallback text readable when an editorial image is still loading. */
#main .hero-art { color: #fff; background-color: var(--tso-mobile-navy); }
#main .hero-art img { color: #fff; }
@media (max-width: 590px) {
  .site-header .masthead { padding-block: .55rem; gap: .55rem; }
  .site-header .masthead .masthead-kicker { display: none; }
  #main .hub-league-hero, #main .hub-hero { margin-inline: auto; max-width: calc(100% - 24px); }
}
@media (max-width: 420px) {
  #main .ag-form-grid { grid-template-columns: minmax(0, 1fr); }
  #main .ag-rail-form :is(label, input, select) { min-width: 0; max-width: 100%; }
  #main .ag-rail-form :is(input, select) { width: 100%; min-height: 44px; }
  #main .ed-nav { min-width: 0; max-width: calc(100% - 24px); overflow-x: auto; }
  #main .ed-search { min-width: 0; grid-template-columns: minmax(0, 1fr) auto; }
  #main .ed-search input { min-width: 0; }
}
@media (max-width: 420px) {
  #main .ed-pagination { flex-wrap: wrap; justify-content: flex-start; max-width: 100%; }
}

/* Keep the score chip's foreground paired with its fill when hub table
   readability rules assign a text colour to table descendants. */
#main.football-hub-page .h2h-panel .h2h-table .h2h-score > b.s {
  background-color: #0a1c33;
  color: #ffd76a !important;
}
#main.football-hub-page .h2h-panel .h2h-table .h2h-score > b.o {
  background-color: #f0ece1;
  color: #071d33 !important;
}
#main.football-hub-page .h2h-panel .h2h-table .h2h-score > span {
  color: #52616d !important;
}

/* Football Hub: let the content and its tables use the panel width. Keep
   a readable inset around headings and controls inside the panel itself. */
#main.football-hub-page {
  --tso-hub-panel-inset: clamp(12px, 2vw, 24px);
}

#main.football-hub-page .hub-panel-body.hub-source:has(> .fh2-main) {
  padding: 0 !important;
}

#main.football-hub-page .hub-source > .fh2-main {
  padding-inline: 0;
  min-inline-size: 0;
}

#main.football-hub-page .hub-source > .fh2-main :is(.panel:has(> .hub-table-scroll), .h2h-panel) {
  padding-inline: 0 !important;
}

#main.football-hub-page .hub-source > .fh2-main :is(.panel:has(> .hub-table-scroll), .h2h-panel)
  > :not(.hub-table-scroll, .tso-mobile-table, .h2h-table, .panel-head) {
  margin-inline: var(--tso-hub-panel-inset);
}

#main.football-hub-page .hub-source > .fh2-main :is(.hub-table-scroll, .h2h-panel > .tso-mobile-table) {
  min-inline-size: 0;
  max-inline-size: 100%;
}

#main.football-hub-page .hub-source .h2h-table :is(th, td):first-child {
  padding-inline-start: var(--tso-hub-panel-inset) !important;
}

#main.football-hub-page .hub-source .h2h-table :is(th, td):last-child {
  padding-inline-end: var(--tso-hub-panel-inset) !important;
}

#main.football-hub-page .hub-source .h2h-table :is(th, td):not(:nth-child(3)) {
  text-align: start !important;
}

#main.football-hub-page .hub-source .h2h-table :is(th, td):nth-child(3) {
  text-align: center !important;
}
