:root {
  --tso-mobile-navy: #071d33;
  --tso-mobile-ink: #10233f;
  --tso-mobile-paper: #f2f4f7;
  --tso-mobile-white: #fff;
  --tso-mobile-line: #dce2e9;
  --tso-mobile-muted: #536276;
  --tso-mobile-gold: #f7cf70;
  --tso-mobile-link: #174779;
}

.tso-mobile-nav { display: none; }
.tso-table-scroll { max-width: 100%; min-width: 0; overflow-x: auto; }
.tso-table-scroll:focus-visible { outline: 3px solid #3277bd; outline-offset: -3px; }
.tso-hub-directory > summary {
  cursor: pointer;
  list-style-position: inside;
  padding: .7rem .85rem;
  font-weight: 800;
  color: var(--tso-mobile-ink);
  background: var(--tso-mobile-white);
  border: 1px solid var(--tso-mobile-line);
  border-radius: .55rem;
}
.tso-hub-directory[open] > summary { margin-bottom: .5rem; }
.tso-hub-directory > .shell { width: 100%; max-width: none; margin-inline: 0; }

.tso-app-home {
  color-scheme: light;
  background: var(--tso-mobile-paper);
  color: var(--tso-mobile-ink);
}
.tso-app-home body > header {
  background: var(--tso-mobile-navy);
  color: var(--tso-mobile-white);
  border-bottom: 3px solid var(--tso-mobile-gold);
}
.tso-app-home main > h1 { font: 850 clamp(1.9rem, 6vw, 3rem)/1.12 system-ui, sans-serif; }
.tso-app-home main > section { margin-top: .9rem; }
.tso-app-home nav.grid { margin-top: 1.25rem; }
.tso-app-home .tile,
.tso-app-home .story,
.tso-app-home .usage {
  background: var(--tso-mobile-white);
  color: var(--tso-mobile-ink);
  border: 1px solid var(--tso-mobile-line);
}
.tso-app-home .tile { min-height: 4.7rem; }
.tso-app-home .tile strong,
.tso-app-home .section-title a,
.tso-app-home footer a,
.tso-app-home .usage summary { color: var(--tso-mobile-link); }
.tso-app-home .tile small,
.tso-app-home .status,
.tso-app-home footer { color: var(--tso-mobile-muted); }
.tso-app-home .arrow { display: none; }
.tso-app-home .story img { height: auto; }
.tso-app-home :is(a, button, summary):focus-visible { outline-color: #3277bd; }
.tso-app-home .usage button { min-height: 44px; }
.tso-app-home .install { min-height: 44px; }

@media (max-width: 959px), (display-mode: standalone) {
  body.tso-has-quick-nav { padding-bottom: calc(62px + env(safe-area-inset-bottom)); }
  .tso-mobile-nav {
    position: fixed;
    z-index: 85;
    inset: auto 0 0;
    display: flex;
    justify-content: center;
    padding: 0 env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
    background: var(--tso-mobile-navy);
    color: #e7eef6;
    border-top: 1px solid #425972;
  }
  .tso-mobile-nav a {
    display: grid;
    align-content: center;
    justify-items: center;
    gap: .17rem;
    flex: 0 1 7rem;
    min-width: 0;
    min-height: 60px;
    padding: .2rem .1rem;
    color: inherit;
    font: 750 clamp(.68rem, 3.1vw, .8rem)/1.15 system-ui, sans-serif;
    text-decoration: none;
  }
  .tso-mobile-nav a[aria-current] {
    color: var(--tso-mobile-gold);
    background: #122c47;
    box-shadow: inset 0 2px var(--tso-mobile-gold);
  }
  .tso-mobile-nav a:focus-visible { outline: 2px solid var(--tso-mobile-gold); outline-offset: -3px; }
  .tso-mobile-nav svg {
    width: 21px;
    height: 21px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
  }
  body.tso-has-quick-nav .tso-cc { bottom: calc(61px + env(safe-area-inset-bottom)); }
  body:has(dialog[open]) .tso-mobile-nav { visibility: hidden; }
}

@media (max-width: 959px) {
  body.tso-has-quick-nav { background: var(--tso-mobile-paper); }
  body.tso-has-quick-nav > .site-header {
    background: var(--tso-mobile-navy) !important;
    border-bottom: 3px solid var(--tso-mobile-gold);
  }
  body.tso-has-quick-nav > .site-header > .masthead {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: .65rem !important;
    min-height: 72px !important;
    padding-block: .6rem !important;
  }
  .site-header > .masthead :is(.masthead-logo,.masthead-edition,.masthead-kicker) { display: none !important; }
  .site-header > .masthead > .masthead-title {
    min-width: 0;
    margin: 0 auto 0 0 !important;
    padding: 0 !important;
    color: #fff !important;
    text-align: left;
    text-decoration: none;
  }
  .site-header .masthead-name {
    display: block !important;
    color: #fff !important;
    font: 850 clamp(1rem, 4.6vw, 1.45rem)/1.14 system-ui, sans-serif !important;
    letter-spacing: -.035em;
    text-transform: none !important;
  }
  .site-header .masthead-name span { color: inherit !important; }
  .site-header .masthead-tagline {
    display: block !important;
    margin-top: .22rem;
    color: #c9d6e4 !important;
    font: 500 .78rem/1.2 system-ui, sans-serif !important;
    text-transform: none !important;
  }
  .site-header > .masthead > .menu-toggle {
    display: inline-flex !important;
    align-items: center;
    gap: .35rem;
    min-height: 44px;
    padding: .4rem .65rem;
    color: #fff !important;
    background: #122c47 !important;
    border: 1px solid #65809b !important;
    border-radius: .5rem;
    font-size: .875rem;
  }
  body.tso-has-quick-nav :is(.utility-bar,.top-strip) { display: none !important; }
  .site-header .nav-band { background: var(--tso-mobile-navy) !important; }
  .site-header .nav-inner { min-height: 0 !important; padding-block: 0 !important; }
  .site-header .primary-nav:not(.open) { display: none !important; }
  .site-header .primary-nav.open {
    display: grid !important;
    grid-template-columns: repeat(2,minmax(0,1fr));
    width: 100%;
    padding: .5rem 0;
    gap: .15rem;
  }
  .site-header .primary-nav.open a {
    display: flex;
    align-items: center;
    min-height: 44px;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .tso-news-home > .match-ribbon {
    position: static !important;
    margin-block: .4rem 0 !important;
    background: #e7edf5 !important;
    color: var(--tso-mobile-ink) !important;
    border: 0 !important;
  }
  .tso-news-home .match-ribbon-inner { min-height: 0; padding-block: .35rem; gap: .3rem .6rem; }
  .tso-news-home .match-ribbon:not(:has([data-match-live="1"], .is-live, [data-status="LIVE"])) { margin-bottom: .3rem !important; }
  .tso-news-home .hero.shell { grid-template-columns: minmax(0,1fr) !important; gap: .75rem !important; padding-top: .45rem !important; }
  .tso-news-home .hero-story {
    min-height: 0 !important;
    overflow: hidden;
    border: 1px solid var(--tso-mobile-line) !important;
    border-radius: .82rem !important;
    background: #fff !important;
    color: var(--tso-mobile-ink) !important;
  }
  .tso-news-home .hero-art {
    position: relative !important;
    display: block !important;
    inset: auto !important;
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    aspect-ratio: 3 / 1;
  }
  .tso-news-home .hero-art img { width: 100% !important; height: auto !important; }
  .tso-news-home .hero-story::before, .tso-news-home .hero-art::after { display: none !important; }
  .tso-news-home .hero-content {
    position: relative !important;
    z-index: auto !important;
    padding: .9rem 1rem 1rem !important;
    margin: 0 !important;
    max-width: none !important;
    border-top: 3px solid var(--tso-mobile-gold);
    background: #fff !important;
    color: var(--tso-mobile-ink) !important;
  }
  .tso-news-home .hero-content h1 {
    font: 850 clamp(1.65rem, 5.5vw, 2.5rem)/1.12 system-ui,sans-serif !important;
    letter-spacing: -.04em;
    margin-block: .4rem .5rem !important;
  }
  .tso-news-home .hero-content :is(h1,h1 a) { color: var(--tso-mobile-ink) !important; text-shadow: none !important; }
  .tso-news-home .hero-content :is(.tso-lead-summary,.story-meta) { color: var(--tso-mobile-muted) !important; text-shadow: none !important; }
  .tso-news-home .hero-content .hero-labels .eyebrow { background: transparent; color: #674705 !important; padding: 0; }
  .tso-news-home :is(.hero-edition,.hero-content .hero-actions,.hero-content .author-chip,.now-strip) { display: none !important; }
  .tso-news-home .hero-scorebug { position: static !important; width: auto !important; margin: 0; border-radius: 0; }
  .tso-news-home .hero-rail { display: grid !important; grid-template-columns: minmax(0,1fr) !important; gap: .7rem; }
  .tso-news-home :is(.next-card,.status-panel,.ticket-live-card,.shrimpie-prompt) {
    border-radius: .82rem !important;
    min-width: 0;
  }
  .tso-news-home .next-card { background: var(--tso-mobile-navy) !important; color: #fff !important; }
  .tso-news-home .next-card :is(.card-topline,.next-date,.big-fixture,strong) { color: #fff !important; }
  .tso-news-home .next-card .eyebrow { color: var(--tso-mobile-gold) !important; }
  .tso-news-home .next-card .btn { min-height: 44px; background: var(--tso-mobile-gold) !important; color: var(--tso-mobile-navy) !important; }
  .tso-news-home .newsroom-section { margin-top: .9rem !important; }
  .tso-news-home .newsroom-section .section-heading > div > :is(.eyebrow,p) { display: none; }
  .tso-news-home .news-grid { grid-template-columns: minmax(0,1fr) !important; gap: .55rem; }
  .tso-news-home .news-card { display: grid; grid-template-columns: minmax(5rem, 28%) minmax(0,1fr); align-items: stretch; }
  .tso-news-home .news-card .news-art { height: 100% !important; min-height: 100%; aspect-ratio: auto !important; }
  .tso-news-home .news-card .news-art img { width: 100%; height: 100%; object-fit: cover; }
  .tso-news-home .news-card .news-copy { padding: .6rem .75rem; }
  .tso-news-home .news-card h3 { font-size: 1rem; }

  main.football-hub-page .tso-hub-directory { margin-block: .65rem; }
  .tso-hub-directory .hub-wordmark { display: none !important; }
  main.football-hub-page .tso-hub-directory :is(.hub-topnav,.hub-topnav-links,.hub-global-nav) {
    display: flex !important;
    align-items: stretch;
    flex-wrap: wrap !important;
    gap: .32rem;
  }
  main.football-hub-page .tso-hub-directory a {
    display: inline-flex;
    min-height: 44px;
    align-items: center;
    white-space: normal;
  }
  main.football-hub-page .hub-hero {
    background: var(--tso-mobile-navy) !important;
    color: #fff !important;
    padding-block: .9rem !important;
  }
  main.football-hub-page .hub-hero :is(h1,p) { color: #fff !important; }
  main.football-hub-page .hub-hero-layout { grid-template-columns: minmax(0,1fr) !important; }
  main.football-hub-page .hub-hero h1 { font: 850 clamp(1.75rem,6vw,2.7rem)/1.12 system-ui,sans-serif !important; }
  main.football-hub-page :is(.hub-hero .hub-shrimpie,.hub-hero .hub-slanted-label) { display: none !important; }
  main.football-hub-page .hub-tabbar {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: .35rem !important;
    position: static !important;
    max-width: 100%;
    padding: .4rem !important;
    background: #e4ebf3 !important;
    border: 1px solid var(--tso-mobile-line) !important;
    border-radius: .65rem;
  }
  main.football-hub-page .hub-tabbar .hub-tab {
    flex: 1 0 auto;
    max-width: 100%;
    min-height: 44px !important;
    padding: .35rem .7rem !important;
    white-space: normal !important;
    background: transparent !important;
    border-color: transparent !important;
    color: var(--tso-mobile-ink) !important;
    font-size: .875rem !important;
  }
  main.football-hub-page .hub-tabbar .hub-tab[aria-selected="true"] {
    color: var(--tso-mobile-ink) !important;
    background: #fff !important;
    border-color: #bccbdd !important;
  }
  main.football-hub-page .hub-live-lineups,
  main.football-hub-page .hub-match-strip { grid-template-columns: minmax(0,1fr) !important; }
  main.football-hub-page .hub-live-score { min-width: 0; }
  main.football-hub-page .hub-live-tabs button { min-height: 44px; }

  main.community-page :is(.cm-nav,.cm-crumbs),
  main.editorial :is(.ed-nav,.ed-breadcrumb),
  main.tk-page .tk-nav,
  main.sl-page .sl-nav { min-width: 0; max-width: 100%; }
  main.community-page :is(.cm-nav,.cm-crumbs) a,
  main.editorial .ed-nav a,
  main.tk-page .tk-nav a,
  main.sl-page .sl-nav a { min-height: 44px; display: inline-flex; align-items: center; }
  main.community-page .cm-nav > div,
  main.tk-page .tk-nav > div,
  main.sl-page .sl-nav > div,
  main.editorial .ed-nav > div { flex-wrap: wrap !important; }
  main.community-page :is(.cm-layout,.ch2-hero-grid,.ch2-feature-grid,.cm-dash) {
    grid-template-columns: minmax(0,1fr) !important;
  }
  main.community-page :is(.cm-hero,.ch2-hero) { padding-block: 1rem !important; }
  main.community-page :is(.cm-hero h1,.ch2-hero h1) {
    font: 850 clamp(1.8rem,6vw,2.7rem)/1.1 system-ui,sans-serif !important;
    overflow-wrap: anywhere;
  }
  main.community-page :is(.cm-hero-grid,.cm-room-grid,.ch2-card-grid,.cv-spotlights) {
    grid-template-columns: minmax(0,1fr) !important;
  }
  main.community-page :is(.cm-shrimpie,.ch2-mascot) { display: none !important; }
  main.community-page :is(.cv-topic-head,.cv-intro,.cv-posts,.cv-composer,.cm-main) { min-width: 0; }
  main.community-page :is(.cv-topic-head,.cv-posts,.cv-intro) { overflow-wrap: anywhere; }
  main.community-page :is(.cm-memberline,.ch2-join-actions) { flex-wrap: wrap !important; }
  main.community-page :is(textarea,input[type="text"],input[type="search"]) { font-size: 1rem; max-width: 100%; }

  main.tk-page :is(.tk-detail-layout,.tk-hero-grid),
  main.sl-page :is(.sl-hero-grid,.sl-overview),
  main.editorial :is(.ed-front,.ed-story-layout),
  main.replay-page .replay-hero-grid {
    grid-template-columns: minmax(0,1fr) !important;
  }
  main.editorial .ed-prose,
  main.editorial .ed-story-layout { overflow-wrap: anywhere; }
  main.editorial :is(.ed-article-head h1,.ed-index-head h1),
  main.tk-page h1, main.sl-page h1, main.replay-page h1 {
    font-size: clamp(1.75rem, 6vw, 2.7rem) !important;
    line-height: 1.12 !important;
  }
  main :is(.ed-story-layout,.tk-detail-main,.sl-hero-grid,.replay-results,.hub-workspace,.cg-workspace) {
    min-width: 0;
  }
  main :is(.replay-filters,.hub-inline-form,.hub-player-search,.ed-search) :is(input,select,button) {
    max-width: 100%;
    min-height: 44px;
  }
  main img:not(.leaflet-tile,.leaflet-marker-icon,.leaflet-marker-shadow) { max-width: 100%; }
}

.tso-hub-primary { display: none; }
.tso-hub-extra-links { display: flex; align-items: center; flex-wrap: wrap; gap: .35rem; }
@media (min-width: 960px) {
  .tso-hub-more > summary { display: none; }
}
@media (max-width: 959px) {
  .tso-news-home .hero-content { box-sizing: border-box; width: 100% !important; }
  .tso-news-home .identity-strip.shell { display: none; }
  .tso-has-quick-nav [aria-label="Matchday shortcuts"] { display: none !important; }
  .tso-news-home #football-summary > #football-score { margin-block: .6rem; }
  .tso-news-home #football-summary > #football-score .hero-scorebug {
    border: 1px solid var(--tso-mobile-line);
    border-radius: .7rem;
  }
  main.tk-page .tk-filters { flex-wrap: wrap !important; gap: .4rem; }
  main.tk-page .tk-filters a { white-space: normal; min-height: 44px; }
  main.football-hub-page > .tso-launch-hero.tso-hub-redesign-hero {
    min-height: 0 !important;
    padding: 1rem !important;
    margin-block: .6rem !important;
  }
  main.football-hub-page > .tso-launch-hero.tso-hub-redesign-hero h1 {
    font: 850 clamp(1.75rem,6vw,2.7rem)/1.12 system-ui,sans-serif !important;
  }
  main.football-hub-page > .tso-launch-hero.tso-hub-redesign-hero p { margin-block: .4rem; }
  main.football-hub-page > .tso-hub-menu { position: static !important; display: block !important; }
  .tso-hub-primary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: .375rem;
    padding: .4rem;
    background: #e4ebf3;
    border-radius: .65rem;
  }
  main.football-hub-page .tso-hub-primary a {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: .27rem !important;
    border: 1px solid #ced8e5;
    border-radius: .45rem;
    background: #fff !important;
    color: var(--tso-mobile-ink) !important;
    font-weight: 800;
  }
  .tso-hub-more { width: 100%; margin-top: .35rem; }
  .tso-hub-more > summary { min-height: 44px; padding: .6rem; font-weight: 800; cursor: pointer; }
  .tso-hub-more .tso-hub-extra-links { margin-top: .35rem; }
  .tso-hub-extra-links :is(a,summary) { min-height: 44px; }
}

@media (max-width: 959px) {
  main.community-page .cm-nav .cm-wordmark { display: none; }
  main.community-page .cm-nav { gap: .3rem !important; }
  main.community-page .cm-nav a { white-space: normal; }
  main.community-page .cv-latest { margin: .45rem 0 .95rem; }
  main.community-page .cv-search { display: flex; flex-wrap: wrap; gap: .35rem; }
  main.community-page .cv-search input { min-width: 0; flex: 1 1 10rem; }
  main.community-page .cv-search :is(input, button) { min-height: 44px; }
  main.community-page .cv-spotlights { margin-block: .8rem; }
}
