/* Kisure Sports Frontend v850
 * Final mobile owner for linked article Match Summary and Match Centre event-heading clarity.
 * Presentation only: no fixture/data/state contract changes.
 *
 * Fixes:
 * - article-linked scoreboards no longer squeeze the five desktop columns on phones;
 * - team crest/name lanes stay independent from the centred score/status lane;
 * - goal, missed-penalty, assist and red-card rows expose exactly one centred text heading on mobile;
 * - decorative/custom event icons are suppressed in the heading lane on mobile so labels are never duplicated;
 * - legacy aria-label ::before heading generation is retired so only the explicit title can render;
 * - half-time pills keep balanced breathing room from the panel edge and the first Goals row;
 * - home/away event columns stay aligned and wrap instead of colliding or clipping.
 */

/* --------------------------------------------------------------------------
   ARTICLE-LINKED MATCH SUMMARY — PHONE GEOMETRY
   -------------------------------------------------------------------------- */
@media (max-width: 700px) {
  html body.site-body.is-news-article-page .article-linked-data-stack {
    box-sizing: border-box !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    margin-left: auto !important;
    margin-right: auto !important;
    overflow: visible !important;
  }

  html body.site-body.is-news-article-page .article-linked-data-stack .article-match-summary-block {
    box-sizing: border-box !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  html body.site-body.is-news-article-page .article-linked-data-stack .article-match-summary-block__header {
    box-sizing: border-box !important;
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto !important;
    align-items: start !important;
    gap: .65rem !important;
    width: 100% !important;
    min-width: 0 !important;
  }

  html body.site-body.is-news-article-page .article-linked-data-stack .article-match-summary-block__header > div,
  html body.site-body.is-news-article-page .article-linked-data-stack .article-match-summary-block__header h2 {
    min-width: 0 !important;
    max-width: 100% !important;
    overflow-wrap: anywhere !important;
  }

  html body.site-body.is-news-article-page .article-linked-data-stack .article-match-scoreboard {
    box-sizing: border-box !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    padding: .78rem .7rem .7rem !important;
    overflow: visible !important;
  }

  html body.site-body.is-news-article-page .article-linked-data-stack .article-match-scoreboard__meta {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    justify-items: center !important;
    gap: .22rem !important;
    width: 100% !important;
    margin: 0 0 .72rem !important;
    text-align: center !important;
  }

  html body.site-body.is-news-article-page .article-linked-data-stack .article-match-scoreboard__meta > * {
    min-width: 0 !important;
    max-width: 100% !important;
    margin: 0 !important;
    text-align: center !important;
    white-space: normal !important;
  }

  /* DOM order is team, crest, score, crest, team. On phones the crests sit
     above their own names and the score occupies the protected centre lane. */
  html body.site-body.is-news-article-page .article-linked-data-stack .article-match-scoreboard__main {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) minmax(76px, 84px) minmax(0, 1fr) !important;
    grid-template-areas:
      "home-crest score away-crest"
      "home-team  score away-team" !important;
    grid-template-rows: auto auto !important;
    align-items: center !important;
    justify-items: center !important;
    column-gap: 7px !important;
    row-gap: 5px !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    min-height: 0 !important;
    margin: 0 auto !important;
  }

  html body.site-body.is-news-article-page .article-linked-data-stack .article-match-scoreboard__team,
  html body.site-body.is-news-article-page .article-linked-data-stack .article-match-scoreboard__team--home,
  html body.site-body.is-news-article-page .article-linked-data-stack .article-match-scoreboard__team--away {
    box-sizing: border-box !important;
    display: flex !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    align-items: flex-start !important;
    justify-content: center !important;
    margin: 0 !important;
    padding: 0 !important;
    text-align: center !important;
    line-height: 1.12 !important;
  }

  html body.site-body.is-news-article-page .article-linked-data-stack .article-match-scoreboard__team--home {
    grid-area: home-team !important;
  }

  html body.site-body.is-news-article-page .article-linked-data-stack .article-match-scoreboard__team--away {
    grid-area: away-team !important;
  }

  html body.site-body.is-news-article-page .article-linked-data-stack .article-match-scoreboard__team strong {
    display: block !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    margin: 0 !important;
    font-size: .79rem !important;
    line-height: 1.12 !important;
    text-align: center !important;
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: clip !important;
    overflow-wrap: anywhere !important;
    word-break: normal !important;
  }

  html body.site-body.is-news-article-page .article-linked-data-stack .article-match-scoreboard__crest--home {
    grid-area: home-crest !important;
  }

  html body.site-body.is-news-article-page .article-linked-data-stack .article-match-scoreboard__crest--away {
    grid-area: away-crest !important;
  }

  html body.site-body.is-news-article-page .article-linked-data-stack .article-match-scoreboard__crest,
  html body.site-body.is-news-article-page .article-linked-data-stack .article-match-scoreboard__crest img {
    width: 36px !important;
    height: 36px !important;
    min-width: 36px !important;
    min-height: 36px !important;
    max-width: 36px !important;
    max-height: 36px !important;
    margin: 0 !important;
    padding: 0 !important;
    object-fit: contain !important;
  }

  html body.site-body.is-news-article-page .article-linked-data-stack .article-match-scoreboard__score {
    grid-area: score !important;
    align-self: center !important;
    justify-self: center !important;
    display: grid !important;
    grid-template-columns: auto 2px auto !important;
    align-items: center !important;
    justify-items: center !important;
    column-gap: 6px !important;
    row-gap: 3px !important;
    width: auto !important;
    min-width: 76px !important;
    max-width: 84px !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    text-align: center !important;
  }

  html body.site-body.is-news-article-page .article-linked-data-stack .article-match-scoreboard__score b {
    font-size: 1.55rem !important;
    line-height: .95 !important;
  }

  html body.site-body.is-news-article-page .article-linked-data-stack .article-match-scoreboard__score em {
    width: 2px !important;
    height: 27px !important;
    margin: 0 !important;
  }

  html body.site-body.is-news-article-page .article-linked-data-stack .article-match-scoreboard__score > span {
    grid-column: 1 / -1 !important;
    display: block !important;
    width: 100% !important;
    min-width: 0 !important;
    margin: 0 !important;
    font-size: .55rem !important;
    line-height: 1.05 !important;
    letter-spacing: .035em !important;
    text-align: center !important;
    white-space: nowrap !important;
  }

  html body.site-body.is-news-article-page .article-linked-data-stack .article-match-scoreboard__more,
  html body.site-body.is-news-article-page .article-linked-data-stack .article-match-scoreboard__more-body {
    box-sizing: border-box !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
  }
}

@media (max-width: 360px) {
  html body.site-body.is-news-article-page .article-linked-data-stack .article-match-scoreboard__main {
    grid-template-columns: minmax(0, 1fr) 72px minmax(0, 1fr) !important;
    column-gap: 5px !important;
  }

  html body.site-body.is-news-article-page .article-linked-data-stack .article-match-scoreboard__score {
    min-width: 72px !important;
    max-width: 72px !important;
    column-gap: 5px !important;
  }

  html body.site-body.is-news-article-page .article-linked-data-stack .article-match-scoreboard__team strong {
    font-size: .74rem !important;
  }
}

/* --------------------------------------------------------------------------
   MOBILE EVENT ROWS — ARTICLE EXPANDED DETAILS + FULL MATCH CENTRE
   -------------------------------------------------------------------------- */
@media (max-width: 900px) {
  html body.site-body.is-news-article-page .article-linked-data-stack .article-match-scoreboard__more-body :is(
    .article-match-scoreboard__support--goals,
    .article-match-scoreboard__support--penalties,
    .article-match-scoreboard__support--assists:not(.article-match-scoreboard__support--single),
    .article-match-scoreboard__support--red-cards
  ),
  html body.site-body main.football-page .article-match-scoreboard--match-page :is(
    .article-match-scoreboard__support--goals,
    .article-match-scoreboard__support--penalties,
    .article-match-scoreboard__support--assists:not(.article-match-scoreboard__support--single),
    .article-match-scoreboard__support--red-cards
  ) {
    box-sizing: border-box !important;
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
    grid-template-areas:
      "event-title event-title"
      "home-events away-events" !important;
    align-items: start !important;
    column-gap: clamp(10px, 3.4vw, 20px) !important;
    row-gap: 6px !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
  }

  html body.site-body.is-news-article-page .article-linked-data-stack .article-match-scoreboard__more-body .article-match-scoreboard__support-center,
  html body.site-body main.football-page .article-match-scoreboard--match-page .article-match-scoreboard__support-center {
    grid-area: event-title !important;
    grid-column: 1 / -1 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    justify-self: stretch !important;
    gap: 0 !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    min-height: 22px !important;
    margin: 0 !important;
    padding: 0 !important;
    text-align: center !important;
    visibility: visible !important;
    opacity: 1 !important;
  }

  /* FE850: one mobile heading only. Custom event-icon values may already contain
     text and artwork, so rendering them beside the explicit support title produced
     duplicate labels such as “Goals GOALS ⚽”. Keep the icon available on desktop,
     but suppress it inside the mobile event-title lane. */
  html body.site-body.is-news-article-page .article-linked-data-stack .article-match-scoreboard__more-body .article-match-scoreboard__support-center > .football-event-icon,
  html body.site-body.is-news-article-page .article-linked-data-stack .article-match-scoreboard__more-body .article-match-scoreboard__support-center > span.football-event-icon,
  html body.site-body main.football-page .article-match-scoreboard--match-page .article-match-scoreboard__support-center > .football-event-icon,
  html body.site-body main.football-page .article-match-scoreboard--match-page .article-match-scoreboard__support-center > span.football-event-icon {
    display: none !important;
    visibility: hidden !important;
    width: 0 !important;
    height: 0 !important;
    min-width: 0 !important;
    min-height: 0 !important;
    max-width: 0 !important;
    max-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    overflow: hidden !important;
  }

  html body.site-body.is-news-article-page .article-linked-data-stack .article-match-scoreboard__more-body .article-match-scoreboard__support-title,
  html body.site-body main.football-page .article-match-scoreboard--match-page .article-match-scoreboard__support-title {
    display: flex !important;
    align-items: center !important;
    width: 100% !important;
    min-width: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    color: inherit !important;
    -webkit-text-fill-color: currentColor !important;
    font-family: inherit !important;
    font-size: .72rem !important;
    font-weight: 900 !important;
    line-height: 1 !important;
    letter-spacing: .015em !important;
    text-transform: none !important;
    justify-content: center !important;
    text-align: center !important;
    white-space: nowrap !important;
    visibility: visible !important;
    opacity: 1 !important;
  }

  /* FE850 robust single-owner rule: legacy v393/base rules generated a second
     visible heading through ::before { content: attr(aria-label) }.  The Blade/JS
     now provide the real support-title, so both pseudo slots are explicitly
     retired here as a final defensive guard. */
  html body.site-body.is-news-article-page .article-linked-data-stack .article-match-scoreboard__more-body .article-match-scoreboard__support-center::before,
  html body.site-body.is-news-article-page .article-linked-data-stack .article-match-scoreboard__more-body .article-match-scoreboard__support-center::after,
  html body.site-body main.football-page .article-match-scoreboard--match-page .article-match-scoreboard__support-center::before,
  html body.site-body main.football-page .article-match-scoreboard--match-page .article-match-scoreboard__support-center::after {
    content: none !important;
    display: none !important;
    width: 0 !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  /* Balanced half-time breathing room.  HT stays visually separate from the
     panel edge above and the first Goals row below, without adding dead space. */
  html body.site-body.is-news-article-page .article-linked-data-stack .article-match-scoreboard__more-body .article-match-scoreboard__details--halftime {
    box-sizing: border-box !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    min-height: 0 !important;
    margin: 0 0 9px !important;
    padding: 3px 0 4px !important;
  }

  html body.site-body.is-news-article-page .article-linked-data-stack .article-match-scoreboard__more-body .article-match-scoreboard__halftime-pill {
    box-sizing: border-box !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-height: 26px !important;
    margin: 0 auto !important;
    padding: .28rem .62rem !important;
    line-height: 1 !important;
  }

  html body.site-body.is-news-article-page .article-linked-data-stack .article-match-scoreboard__more-body .article-match-scoreboard__details--halftime + .article-match-scoreboard__support--goals {
    margin-top: 0 !important;
    padding-top: 5px !important;
  }

  html body.site-body main.football-page .article-match-scoreboard--match-page .article-match-scoreboard__details--halftime {
    box-sizing: border-box !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    min-height: 0 !important;
    margin: 8px auto 9px !important;
    padding: 0 !important;
  }

  html body.site-body main.football-page .article-match-scoreboard--match-page .article-match-scoreboard__halftime-pill {
    box-sizing: border-box !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-height: 24px !important;
    margin: 0 auto !important;
    padding: .26rem .56rem !important;
    line-height: 1 !important;
  }

  html body.site-body main.football-page .article-match-scoreboard--match-page .article-match-scoreboard__details--halftime + .article-match-scoreboard__support--goals {
    margin-top: 0 !important;
    padding-top: 5px !important;
  }

  html body.site-body.is-news-article-page .article-linked-data-stack .article-match-scoreboard__more-body .article-match-scoreboard__support-col--home,
  html body.site-body main.football-page .article-match-scoreboard--match-page .article-match-scoreboard__support-col--home {
    grid-area: home-events !important;
    grid-column: 1 !important;
    display: flex !important;
    justify-content: flex-end !important;
    align-items: flex-start !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    overflow: visible !important;
    text-align: right !important;
  }

  html body.site-body.is-news-article-page .article-linked-data-stack .article-match-scoreboard__more-body .article-match-scoreboard__support-col--away,
  html body.site-body main.football-page .article-match-scoreboard--match-page .article-match-scoreboard__support-col--away {
    grid-area: away-events !important;
    grid-column: 2 !important;
    display: flex !important;
    justify-content: flex-start !important;
    align-items: flex-start !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    overflow: visible !important;
    text-align: left !important;
  }

  html body.site-body.is-news-article-page .article-linked-data-stack .article-match-scoreboard__more-body .article-match-scoreboard__support-col strong,
  html body.site-body main.football-page .article-match-scoreboard--match-page .article-match-scoreboard__support-col strong {
    box-sizing: border-box !important;
    display: grid !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    gap: 3px !important;
    margin: 0 !important;
    white-space: normal !important;
    overflow: visible !important;
    overflow-wrap: anywhere !important;
    word-break: normal !important;
  }

  html body.site-body.is-news-article-page .article-linked-data-stack .article-match-scoreboard__more-body .article-match-scoreboard__support-col--home strong {
    justify-items: end !important;
    text-align: right !important;
  }

  html body.site-body.is-news-article-page .article-linked-data-stack .article-match-scoreboard__more-body .article-match-scoreboard__support-col--away strong {
    justify-items: start !important;
    text-align: left !important;
  }

  html body.site-body.is-news-article-page .article-linked-data-stack .article-match-scoreboard__more-body .article-match-scoreboard__support-col strong > span,
  html body.site-body.is-news-article-page .article-linked-data-stack .article-match-scoreboard__more-body .article-match-scoreboard__player-link,
  html body.site-body main.football-page .article-match-scoreboard--match-page .article-match-scoreboard__support-col strong > span,
  html body.site-body main.football-page .article-match-scoreboard--match-page .article-match-scoreboard__player-link {
    min-width: 0 !important;
    max-width: 100% !important;
    white-space: normal !important;
    overflow-wrap: anywhere !important;
    word-break: normal !important;
  }

  html body.site-body.is-news-article-page .article-linked-data-stack .article-match-scoreboard__more-body .article-match-scoreboard__support-col--home :is(strong > span,.article-match-scoreboard__player-link),
  html body.site-body main.football-page .article-match-scoreboard--match-page .article-match-scoreboard__support-col--home :is(strong > span,.article-match-scoreboard__player-link) {
    text-align: right !important;
  }

  html body.site-body.is-news-article-page .article-linked-data-stack .article-match-scoreboard__more-body .article-match-scoreboard__support-col--away :is(strong > span,.article-match-scoreboard__player-link),
  html body.site-body main.football-page .article-match-scoreboard--match-page .article-match-scoreboard__support-col--away :is(strong > span,.article-match-scoreboard__player-link) {
    text-align: left !important;
  }

  /* A single unsplit assist list remains a one-column row. */
  html body.site-body.is-news-article-page .article-linked-data-stack .article-match-scoreboard__more-body .article-match-scoreboard__support--single,
  html body.site-body main.football-page .article-match-scoreboard--match-page .article-match-scoreboard__support--single {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
  }
}

@media (max-width: 560px) {
  html body.site-body main.football-page .article-match-scoreboard--match-page .article-match-scoreboard__support-title {
    font-size: .68rem !important;
  }

  html body.site-body main.football-page .article-match-scoreboard--match-page .article-match-scoreboard__support-center {
    justify-content: center !important;
    gap: 0 !important;
  }
}
