/* MoFutbol homepage polish layer.
   Keep new homepage hierarchy fixes here instead of adding more rescue rules to legacy CSS. */

:root {
  --mf-polish-max: min(1280px, calc(100vw - 2rem));
  --mf-polish-ink: #fff8df;
  --mf-polish-muted: rgba(236, 243, 236, 0.74);
  --mf-polish-line: rgba(245, 200, 66, 0.18);
  --mf-polish-panel: rgba(4, 12, 8, 0.88);
}

html {
  scroll-behavior: smooth;
}

.stl-container,
.site-container,
.mf-page-shell .stl-container {
  max-width: var(--mf-polish-max) !important;
}

body.mf-system-home {
  background:
    radial-gradient(circle at 8% 0, rgba(245, 200, 66, 0.07), transparent 22rem),
    radial-gradient(circle at 90% 6%, rgba(45, 184, 75, 0.065), transparent 24rem),
    #020403 !important;
}

body.mf-system-home .site-header {
  background: rgba(2, 6, 4, 0.94) !important;
  border-bottom-color: rgba(245, 200, 66, 0.14) !important;
  backdrop-filter: blur(18px);
}

body.mf-system-home .site-nav__list {
  gap: 0.28rem !important;
}

body.mf-system-home .site-nav__link,
body.mf-system-home .site-nav__toggle,
body.mf-system-home .site-header__cta,
body.mf-system-home .site-theme-toggle {
  min-height: 2.18rem !important;
  border-radius: 8px !important;
  font-size: 0.72rem !important;
  line-height: 1 !important;
}

body.mf-system-home .site-nav__link,
body.mf-system-home .site-nav__toggle {
  padding: 0.52rem 0.68rem !important;
}

body.mf-system-home .site-header__cta {
  padding-inline: 0.76rem !important;
}

body.mf-system-home .site-header__cta--media {
  background: #f5c842 !important;
  border-color: #f5c842 !important;
  color: #071009 !important;
}

body.mf-system-home .site-header__cta--contributor,
body.mf-system-home .site-theme-toggle {
  background: rgba(255, 255, 255, 0.035) !important;
  border-color: rgba(245, 200, 66, 0.16) !important;
  color: rgba(255, 248, 223, 0.86) !important;
}

body.mf-system-home .site-theme-toggle {
  width: auto !important;
  padding-inline: 0.7rem !important;
}

body.mf-system-home .site-nav__icon,
body.mf-system-home .site-nav__panel-icon {
  display: inline-grid !important;
  place-items: center !important;
  min-width: 2.05rem !important;
  height: 1.65rem !important;
  border: 1px solid rgba(245, 200, 66, 0.2) !important;
  border-radius: 7px !important;
  background: rgba(245, 200, 66, 0.075) !important;
  color: #f5c842 !important;
  font: 800 0.58rem/1 var(--f-mono, monospace) !important;
  letter-spacing: 0.04em !important;
  text-transform: uppercase !important;
}

body.mf-system-home .site-drawer {
  z-index: 1220 !important;
  width: min(100%, 23rem) !important;
  padding: 1rem !important;
  background:
    radial-gradient(circle at 18% 0, rgba(245, 200, 66, 0.08), transparent 18rem),
    rgba(2, 6, 4, 0.98) !important;
}

body.mf-system-home .site-backdrop {
  z-index: 1210 !important;
  background: rgba(1, 4, 3, 0.78) !important;
  backdrop-filter: blur(8px);
}

body.mf-system-home .site-drawer__section {
  border-bottom: 1px solid rgba(245, 200, 66, 0.08);
  padding-block: 0.75rem !important;
}

body.mf-system-home .site-drawer__section a {
  min-height: 3.25rem !important;
  border-radius: 8px !important;
}

body.mf-system-home .mf-score-ribbon {
  min-height: 2.45rem !important;
  max-height: 2.85rem !important;
  border-bottom: 1px solid rgba(245, 200, 66, 0.1);
  opacity: 0.88;
}

body.mf-system-home .mf-score-ribbon__league,
body.mf-system-home .mf-score-ribbon__date {
  font-size: 0.54rem !important;
}

body.mf-system-home .mf-score-ribbon__card {
  min-width: 11.4rem !important;
}

body.mf-system-home .mf-daily-hero {
  position: relative !important;
  overflow: hidden !important;
  min-height: auto !important;
  padding: clamp(1.25rem, 3vw, 2.4rem) 0 clamp(1rem, 2.2vw, 1.65rem) !important;
  border-bottom: 1px solid rgba(245, 200, 66, 0.08);
}

body.mf-system-home .mf-daily-home {
  display: flex;
  flex-direction: column;
}

body.mf-system-home .mf-daily-hero {
  order: 0;
}

body.mf-system-home #home-content-discovery {
  order: 1;
}

body.mf-system-home #home-stl-soccer {
  order: 2;
}

body.mf-system-home #home-player-tracker {
  order: 3;
}

body.mf-system-home #home-match-center {
  order: 4;
}

body.mf-system-home #home-partners {
  order: 5;
}

body.mf-system-home .mf-daily-hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 7rem;
  pointer-events: none;
  background: linear-gradient(180deg, transparent, #020403);
}

body.mf-system-home .mf-home-hero-grid {
  position: relative;
  z-index: 1;
  grid-template-columns: minmax(0, 0.95fr) minmax(22rem, 1.05fr) !important;
  align-items: stretch !important;
  gap: clamp(1rem, 2.4vw, 1.55rem) !important;
}

body.mf-system-home .mf-home-hero-copy,
body.mf-system-home .mf-home-hero-feed {
  border-radius: 12px !important;
}

body.mf-system-home .mf-home-hero-copy {
  padding: clamp(1rem, 2.1vw, 1.55rem) !important;
  border-color: rgba(245, 200, 66, 0.16) !important;
  background:
    linear-gradient(145deg, rgba(8, 18, 12, 0.92), rgba(2, 6, 4, 0.96)),
    radial-gradient(circle at 4% 8%, rgba(245, 200, 66, 0.12), transparent 15rem) !important;
  box-shadow: 0 22px 56px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.08) !important;
}

body.mf-system-home .mf-hero-title-streamlined {
  max-width: 15ch !important;
  margin-block: 0.55rem 0.55rem !important;
  color: var(--mf-polish-ink) !important;
  font-size: clamp(2rem, 5.1vw, 4.85rem) !important;
  line-height: 0.92 !important;
  letter-spacing: 0 !important;
  text-wrap: balance !important;
}

body.mf-system-home .mf-hero-title-streamlined span {
  display: inline !important;
}

body.mf-system-home .mf-home-hero-copy .stl-muted {
  max-width: 54ch !important;
  color: var(--mf-polish-muted) !important;
  font-size: clamp(0.94rem, 1.2vw, 1.08rem) !important;
  line-height: 1.5 !important;
}

body.mf-system-home .mf-home-hero-actions {
  margin-top: 1rem !important;
  gap: 0.55rem !important;
}

body.mf-system-home .mf-home-hero-actions .stl-btn {
  min-height: 2.55rem !important;
  border-radius: 8px !important;
  font-size: 0.82rem !important;
}

body.mf-system-home .mf-home-hero-actions .stl-btn--primary {
  min-width: 8.25rem;
}

body.mf-system-home .mf-home-quicklinks {
  margin-top: 1rem !important;
  gap: 0.38rem !important;
}

body.mf-system-home .mf-home-quicklinks a {
  border-radius: 7px !important;
  font-size: 0.62rem !important;
}

body.mf-system-home .mf-home-hero-copy [data-sponsor-zone] {
  display: none !important;
}

body.mf-system-home .mf-home-hero-feed {
  align-content: stretch !important;
  padding: 0.72rem !important;
  border-color: rgba(245, 200, 66, 0.26) !important;
  background:
    linear-gradient(180deg, rgba(11, 23, 16, 0.9), rgba(2, 6, 4, 0.98)),
    radial-gradient(circle at 50% 0, rgba(245, 200, 66, 0.08), transparent 16rem) !important;
}

body.mf-system-home .mf-home-youtube-player__stage,
body.mf-system-home .mf-home-youtube-hero__frame {
  border-radius: 10px !important;
}

body.mf-system-home .mf-home-youtube-player__play {
  position: relative;
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  min-height: inherit !important;
  padding: 0 !important;
  overflow: hidden;
  border: 0 !important;
  border-radius: inherit !important;
  background: #020403 !important;
  color: #071009 !important;
  cursor: pointer;
}

body.mf-system-home .mf-home-youtube-player__play img {
  display: block;
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  filter: saturate(1.08) contrast(1.04);
  transition: transform 220ms cubic-bezier(0.16, 1, 0.3, 1), filter 220ms ease;
}

body.mf-system-home .mf-home-youtube-player__play::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(2, 4, 3, 0.02), rgba(2, 4, 3, 0.34));
}

body.mf-system-home .mf-home-youtube-player__play span {
  position: absolute !important;
  left: 50% !important;
  top: 50% !important;
  z-index: 1;
  display: inline-grid !important;
  place-items: center;
  width: 4.4rem !important;
  height: 4.4rem !important;
  min-width: 0 !important;
  min-height: 0 !important;
  padding: 0 !important;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px !important;
  background: #f5c842 !important;
  color: #071009 !important;
  font: 900 0.72rem/1 var(--f-mono, monospace) !important;
  letter-spacing: 0.08em !important;
  text-transform: uppercase;
  transform: translate(-50%, -50%);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.32);
}

body.mf-system-home .mf-home-youtube-player__play:hover img,
body.mf-system-home .mf-home-youtube-player__play:focus-visible img {
  filter: saturate(1.16) contrast(1.08);
  transform: scale(1.025);
}

body.mf-system-home .mf-daily-ticker {
  position: relative;
  z-index: 1;
  width: min(100% - 2rem, 74rem) !important;
  margin: 0.85rem auto 0 !important;
  border-radius: 999px !important;
}

body.mf-system-home .mf-home-worldcup-wrap,
body.mf-system-home #mf-daily-worldcup,
body.mf-system-home [data-world-cup-matchday="home"] {
  display: none !important;
}

body.mf-system-home #home-partners {
  padding: clamp(0.5rem, 1.2vw, 0.8rem) 0 !important;
  opacity: 0.88;
}

body.mf-system-home #home-content-discovery,
body.mf-system-home #home-stl-soccer,
body.mf-system-home #home-player-tracker,
body.mf-system-home #home-match-center {
  padding-block: clamp(2.4rem, 5vw, 4.25rem) !important;
}

body.mf-system-home .stl-section-header-row {
  align-items: end !important;
  margin-bottom: clamp(1rem, 2vw, 1.35rem) !important;
}

body.mf-system-home .stl-section-header-row > div:first-child {
  min-width: 0 !important;
}

body.mf-system-home .stl-section-header-row .stl-subheading {
  max-width: 22ch !important;
  overflow: visible !important;
  color: var(--mf-polish-ink) !important;
  font-size: clamp(1.7rem, 3.35vw, 3.15rem) !important;
  line-height: 0.98 !important;
  letter-spacing: 0 !important;
  text-overflow: clip !important;
  text-wrap: balance !important;
  white-space: normal !important;
}

body.mf-system-home .stl-section-header-row .mf-section-intro {
  max-width: 58ch !important;
  color: var(--mf-polish-muted) !important;
  font-size: 0.94rem !important;
  line-height: 1.52 !important;
}

body.mf-system-home #home-stl-soccer .mf-home-product-grid,
body.mf-system-home #home-player-tracker .mf-home-product-grid,
body.mf-system-home #home-match-center .mf-home-product-grid {
  grid-template-columns: minmax(0, 1.05fr) minmax(20rem, 0.72fr) !important;
  gap: clamp(1rem, 2vw, 1.35rem) !important;
}

body.mf-system-home #home-content-discovery {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.012), rgba(255, 255, 255, 0.026) 55%, transparent),
    #020403 !important;
}

body.mf-system-home .mf-home-command-card,
body.mf-system-home .mf-pathway-preview,
body.mf-system-home .mf-pathway-note,
body.mf-system-home .mf-daily-tab-panel,
body.mf-system-home .mf-front-item {
  border-radius: 10px !important;
  border-color: rgba(245, 200, 66, 0.15) !important;
  background:
    linear-gradient(180deg, rgba(10, 20, 14, 0.9), rgba(3, 8, 5, 0.98)) !important;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.045) !important;
}

body.mf-system-home .mf-pathway-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
}

body.mf-system-home .mf-pathway-card {
  border-radius: 8px !important;
}

body.mf-system-home .stl-btn,
body.mf-system-home button,
body.mf-system-home [role="button"] {
  transition: transform 180ms cubic-bezier(0.16, 1, 0.3, 1), border-color 180ms ease, background 180ms ease !important;
}

body.mf-system-home .stl-btn:active,
body.mf-system-home button:active,
body.mf-system-home [role="button"]:active {
  transform: translateY(1px) scale(0.99) !important;
}

#mo-toasts {
  z-index: 1120 !important;
}

body:has(.site-drawer.is-open) #mo-toasts {
  display: none !important;
}

@media (max-width: 1024px) {
  body.mf-system-home .site-theme-toggle {
    display: none !important;
  }

  body.mf-system-home .mf-home-hero-grid,
  body.mf-system-home #home-stl-soccer .mf-home-product-grid,
  body.mf-system-home #home-player-tracker .mf-home-product-grid,
  body.mf-system-home #home-match-center .mf-home-product-grid {
    grid-template-columns: 1fr !important;
  }

  body.mf-system-home .mf-hero-title-streamlined {
    max-width: 12ch !important;
  }
}

@media (max-width: 760px) {
  :root {
    --mf-polish-max: min(100% - 1rem, 100vw - 1rem);
  }

  body.mf-system-home .site-header__cta--media {
    display: none !important;
  }

  body.mf-system-home .site-brand__logo {
    width: 2rem !important;
    height: 2rem !important;
  }

  body.mf-system-home .mf-score-ribbon {
    display: grid !important;
    grid-template-columns: auto minmax(0, 1fr) auto !important;
    gap: 0.28rem !important;
    max-height: 2.7rem !important;
    overflow: hidden !important;
  }

  body.mf-system-home .mf-score-ribbon__rail {
    min-width: 0 !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    scrollbar-width: none !important;
  }

  body.mf-system-home .mf-score-ribbon__rail::-webkit-scrollbar {
    display: none !important;
  }

  body.mf-system-home .mf-score-ribbon__rail.is-marquee .mf-score-ribbon__track,
  body.mf-system-home .mf-score-ribbon__track {
    display: flex !important;
    width: max-content !important;
    min-width: 0 !important;
    max-width: none !important;
    transform: none !important;
    animation: none !important;
  }

  body.mf-system-home .mf-score-ribbon__brand span,
  body.mf-system-home .mf-score-ribbon__utility,
  body.mf-system-home .mf-score-ribbon__date,
  body.mf-system-home .mf-score-ribbon__card small {
    display: none !important;
  }

  body.mf-system-home .mf-score-ribbon__card {
    min-width: 8.5rem !important;
    max-width: 8.5rem !important;
    padding: 0.28rem 0.42rem !important;
  }

  body.mf-system-home .mf-score-ribbon__match {
    width: 100% !important;
    min-width: 0 !important;
    overflow: hidden !important;
  }

  body.mf-system-home .mf-score-ribbon__team img,
  body.mf-system-home .mf-score-ribbon__mark {
    width: 1.05rem !important;
    height: 1.05rem !important;
  }

  body.mf-system-home .mf-score-ribbon__team b {
    font-size: 0.56rem !important;
  }

  body.mf-system-home .mf-daily-hero {
    padding-top: 1rem !important;
  }

  body.mf-system-home .mf-home-hero-copy {
    padding: 1rem !important;
  }

  body.mf-system-home .mf-hero-title-streamlined {
    max-width: 11ch !important;
    font-size: clamp(2rem, 12vw, 3.25rem) !important;
  }

  body.mf-system-home .mf-home-hero-actions .stl-btn {
    flex: 1 1 100%;
    justify-content: center;
  }

  body.mf-system-home .mf-home-quicklinks {
    display: none !important;
  }

  body.mf-system-home #home-partners {
    padding-block: 0.55rem !important;
  }

  body.mf-system-home #home-content-discovery,
  body.mf-system-home #home-stl-soccer,
  body.mf-system-home #home-player-tracker,
  body.mf-system-home #home-match-center {
    padding-block: 2rem !important;
  }

  body.mf-system-home .stl-section-header-row {
    grid-template-columns: 1fr !important;
    align-items: start !important;
  }

  body.mf-system-home .stl-section-header-row .stl-subheading {
    max-width: 13ch !important;
    font-size: clamp(1.55rem, 8vw, 2.25rem) !important;
  }

  body.mf-system-home .stl-section-header-row > .stl-btn,
  body.mf-system-home .stl-section-header-row .stl-btn {
    justify-self: start !important;
  }

  body.mf-system-home .mf-pathway-grid {
    grid-template-columns: 1fr !important;
  }
}
