/* Shared fade-out used by live DOM pruning. */
.live-prune-fade {
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.42s ease, transform 0.42s ease;
}
/* =====================================================================
   HOME DASHBOARD — Phase 3 restyle (2026-04-24)
   Tokens from theme.css — no hard-coded hex outside hero gradient scope.
   ===================================================================== */

/* ─── Container ──────────────────────────────────────────────────────── */
.home-container {
  width: 100%;
  max-width: none;
  margin: 0 auto;
  padding-left: 0;
  padding-right: 0;
}

/* ============================================================
   HERO — stadium banner with gradient wash
   ============================================================ */
.home-hero {
  --hm-hero-radius: 20px;

  position: relative;
  isolation: isolate;
  overflow: hidden;
  border-radius: var(--hm-hero-radius);
  padding: 28px 32px 32px;
  margin-bottom: var(--space-6);
  color: var(--home-hero-ink);
  background: var(--home-hero-bg);
  box-shadow: var(--home-hero-shadow);
  min-height: 240px;
}

/* Stadium backdrop — CSS-only fallback if no asset is provided.
   Replace the background of .home-hero__bg with a photo via an
   `.home-hero--with-photo` modifier if/when we ship one. */
.home-hero__bg {
  position: absolute;
  inset: 0;
  background: var(--home-hero-deco-bg);
  opacity: 0.95;
  pointer-events: none;
  z-index: 0;
}

.home-hero__wash {
  position: absolute;
  inset: 0;
  background: var(--home-hero-wash-bg);
  opacity: var(--home-hero-wash-opacity);
  pointer-events: none;
  mix-blend-mode: var(--home-hero-wash-blend);
  z-index: 0;
}

.home-hero > :not(.home-hero__bg):not(.home-hero__wash) {
  position: relative;
  z-index: 1;
}

/* Hero content block — title only (season + matches live in app chrome) */
.home-hero__content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0;
  max-width: 680px;
}

.home-hero__title {
  margin: 0;
  font-size: clamp(2rem, 4.2vw, 3.2rem);
  font-weight: 900;
  line-height: 1.02;
  letter-spacing: -0.028em;
  color: var(--home-hero-ink);
}
.home-hero__title-line { display: block; }
.home-hero__title-accent {
  display: block;
  background: linear-gradient(90deg, var(--primary-fixed), var(--primary-container));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

/* ============================================================
   HERO STAT CARDS
   ============================================================ */
.home-hero-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 22px;
}

.home-stat {
  --hm-stat-accent: var(--primary-fixed);
  --hm-stat-spark: color-mix(in srgb, var(--hm-stat-accent) 70%, transparent);
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 14px 16px 18px;
  border-radius: 14px;
  background: var(--home-hero-stat-bg);
  backdrop-filter: blur(6px);
  overflow: hidden;
  transition: background 160ms ease, transform 160ms ease, box-shadow 160ms ease;
  min-height: 118px;
}
.home-stat:hover {
  background: var(--home-hero-stat-bg-hover);
  transform: translateY(-2px);
  box-shadow: var(--home-hero-stat-shadow);
}

.home-stat--live   { --hm-stat-accent: var(--error); }
.home-stat--today  { --hm-stat-accent: var(--primary-fixed); }
.home-stat--leagues{ --hm-stat-accent: var(--home-hero-stat-accent-leagues); }
.home-stat--ranked { --hm-stat-accent: var(--home-hero-stat-accent-ranked); }

.home-stat__head {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--home-hero-stat-head);
}
.home-stat__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: color-mix(in srgb, var(--hm-stat-accent) 18%, transparent);
  color: var(--hm-stat-accent);
  font-size: 0.9rem;
}
.home-stat-label {
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: inherit;
}

.home-stat-value {
  font-size: clamp(1.8rem, 2.6vw, 2.4rem);
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  color: var(--hm-stat-accent);
  margin: 4px 0 2px;
}

.home-stat-sub {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--home-hero-stat-sub);
}

.home-stat__spark {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 28px;
  stroke: var(--hm-stat-spark);
  stroke-width: 1.5;
  fill: none;
  opacity: 0.85;
  pointer-events: none;
}
.home-stat__spark path {
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ============================================================
   LIVE MATCHES SECTION
   ============================================================ */
.home-live-section {
  margin-bottom: var(--space-6);
  padding: 4px 0 0;
}

.home-live-section__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 4px 4px 14px;
}
.home-live-section__title {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.home-live-section__title-text {
  margin: 0;
  font-size: 0.8rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--on-surface);
}
.home-live-section__count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 7px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--error) 14%, transparent);
  color: var(--error);
  font-size: 0.7rem;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}
.home-live-section__refresh {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--on-surface-variant);
}

.home-live-section__body {
  position: relative;
}

/* Horizontal scroll — 3×2 cards per viewport on desktop; dots + snap driven by JS. */
.home-live-grid {
  --hm-live-gap: 14px;
  --hm-live-cols: 3;
  --hm-live-rows: 2;
  --hm-live-track-rows: 2;
  --hm-live-total-cols: 1;
  --hm-live-col-px: 280px;
  /* One fixed height for every live card (all pages / slots); content clips inside. */
  --home-live-card-h: 22rem;
  display: grid;
  grid-template-rows: repeat(var(--hm-live-track-rows), var(--home-live-card-h));
  grid-template-columns: repeat(var(--hm-live-total-cols), minmax(0, var(--hm-live-col-px)));
  column-gap: var(--hm-live-gap);
  row-gap: var(--hm-live-gap);
  grid-auto-flow: row;
  align-content: start;
  align-items: stretch;
  box-sizing: border-box;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  padding: 4px 2px 10px;
  margin: -4px -2px -10px;
}
.home-live-grid::-webkit-scrollbar { display: none; }

/* Pulse dot */
.home-live-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--error);
  box-shadow: 0 0 0 0 color-mix(in srgb, var(--error) 70%, transparent);
  animation: live-pulse 1.8s ease-in-out infinite;
  flex-shrink: 0;
}

/* ─── Live card ──────────────────────────────────────────────────────── */
.home-live-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px 16px 14px;
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
  scroll-snap-align: none;
  border-radius: 16px;
  background: linear-gradient(180deg,
    color-mix(in srgb, var(--error) 14%, var(--surface-container)) 0%,
    var(--surface-container) 70%);
  box-shadow:
    inset 0 0 0 1px color-mix(in srgb, var(--error) 22%, transparent),
    0 12px 26px color-mix(in srgb, var(--error) 9%, transparent);
  color: var(--on-surface);
  text-decoration: none;
  overflow: hidden;
  transition: transform 160ms ease, box-shadow 160ms ease;
}
.home-live-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--error);
  opacity: 0.85;
}
.home-live-card:hover {
  transform: translateY(-2px);
  box-shadow:
    inset 0 0 0 1px color-mix(in srgb, var(--error) 32%, transparent),
    0 18px 36px color-mix(in srgb, var(--error) 16%, transparent);
  color: var(--on-surface);
}

/* Fixed card box: same pixel height for every slot; overrides premium row margins/padding. */
#home-live-grid > .home-live-card {
  height: var(--home-live-card-h);
  min-height: var(--home-live-card-h);
  max-height: var(--home-live-card-h);
  align-self: stretch;
  margin-bottom: 0;
  padding: 14px 16px 14px;
  gap: 8px;
}
/* When ratings are hidden, absorb leftover column space so layout stays even. */
#home-live-grid > .home-live-card:not(:has([data-live-ratings-block]:not(.d-none)))::after {
  content: "";
  flex: 1 1 auto;
  min-height: 0;
}

.home-live-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-shrink: 0;
  min-height: 2rem;
}
.home-live-top .match-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--error) 16%, transparent);
  color: var(--error);
  font-size: 0.65rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  flex-shrink: 0;
}
.home-live-top .match-status-badge--ht {
  background: color-mix(in srgb, var(--te-caution) 16%, transparent);
  color: var(--te-caution);
}
.home-live-minute {
  font-size: 0.95rem;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
  color: var(--on-surface);
  flex: 0 1 auto;
  min-width: 0;
  text-align: right;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.home-live-minute--tick {
  color: var(--error);
}
.home-live-minute--phase { color: var(--error); font-weight: 900; }

/* Team row — logo | name | score */
.home-live-row {
  display: grid;
  grid-template-columns: 36px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 6px 10px;
  border-radius: 10px;
  background: color-mix(in srgb, var(--surface-container) 60%, transparent);
  flex-shrink: 0;
  min-height: 0;
}
.home-live-row .premium-team-logo,
.home-live-row .premium-team-logo-sm {
  width: 36px;
  height: 36px;
  padding: 4px;
  border-radius: 8px;
  background: var(--surface-container-low);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}
.home-live-row .premium-team-logo img,
.home-live-row .premium-team-logo-sm img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.home-live-team {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--on-surface);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
  line-height: 1.2;
}
.home-live-score {
  font-size: 1.4rem;
  font-weight: 900;
  color: var(--on-surface);
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  min-width: 28px;
  text-align: center;
  line-height: 1;
}

.home-live-section .home-live-score {
  color: var(--danger);
}

.home-live-league {
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--on-surface-variant);
  text-align: center;
  padding: 2px 0;
  margin-top: 2px;
  flex-shrink: 0;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Ratings — keep payload; compact look */
.home-live-ratings {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1 1 auto;
  min-height: 0;
  padding: 10px 12px;
  border-radius: 10px;
  background: color-mix(in srgb, var(--on-surface) 4%, transparent);
  margin-top: 0;
  overflow: hidden;
}
.home-live-ratings__averages {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-shrink: 0;
  min-width: 0;
}
.home-live-ratings__top {
  display: grid;
  grid-template-rows: repeat(3, minmax(0, 1.35em));
  gap: 4px;
  align-content: start;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
}
/* Legacy flat DOM (cached older builds): home badge | away badge | top players as siblings */
#home-live-grid > .home-live-card .live-ratings-inline {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 8px;
  align-content: start;
  flex: 1 1 auto;
  min-height: 0;
  padding: 10px 12px;
  border-radius: 10px;
  background: color-mix(in srgb, var(--on-surface) 4%, transparent);
  margin-top: 0;
  overflow: hidden;
}
#home-live-grid > .home-live-card .live-ratings-inline > [data-live-rating-home] {
  grid-column: 1;
  grid-row: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
#home-live-grid > .home-live-card .live-ratings-inline > [data-live-rating-away] {
  grid-column: 2;
  grid-row: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
#home-live-grid > .home-live-card .live-ratings-inline > [data-live-top-players-wrap] {
  grid-column: 1 / -1;
  grid-row: 2;
  display: grid;
  grid-template-rows: repeat(3, minmax(0, 1.35em));
  gap: 4px;
  align-content: start;
  min-height: 0;
  overflow: hidden;
}
#home-live-grid .home-live-card .live-rating-top-player {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}
#home-live-grid .home-live-card .home-live-ratings__averages .live-rating-badge {
  flex: 1 1 0;
  min-width: 0;
  max-width: calc(50% - 5px);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.home-live-card.home-live-card--final {
  background: var(--live-final-surface);
  opacity: var(--live-final-opacity);
  pointer-events: none;
}
.home-live-card.home-live-card--fadeout {
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 600ms ease, transform 600ms ease;
  pointer-events: none;
}

/* Carousel dot indicators — populated by JS, one per page */
.home-live-section__dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding-top: 14px;
}
.home-live-section__dots[hidden] { display: none; }
.home-live-section__dot {
  width: 8px;
  height: 8px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: color-mix(in srgb, var(--on-surface) 18%, transparent);
  cursor: pointer;
  transition: background 140ms ease, transform 140ms ease, width 140ms ease;
}
.home-live-section__dot:hover {
  background: color-mix(in srgb, var(--primary-container) 40%, transparent);
}
.home-live-section__dot.is-active {
  background: var(--primary-container);
  width: 22px;
  border-radius: 999px;
}
.home-live-section__dot:focus-visible {
  outline: 2px solid var(--primary-container);
  outline-offset: 2px;
}

/* Empty state */
.home-live-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 16px;
  text-align: center;
  gap: 6px;
  border-radius: 16px;
  background: var(--surface-container);
}
.home-live-empty__icon {
  font-size: 2rem;
  opacity: 0.35;
  margin-bottom: 4px;
}
.home-live-empty__title {
  margin: 0;
  font-weight: 700;
  color: var(--on-surface);
}
.home-live-empty__sub {
  margin: 0;
  font-size: 0.875rem;
  color: var(--on-surface-variant);
}

/* ============================================================
   FILTER BAR — pill tabs + filter button
   ============================================================ */
.home-filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: var(--space-5);
  padding: 6px;
  border-radius: 14px;
  background: var(--surface-container);
  box-shadow: 0 8px 22px color-mix(in srgb, var(--primary-container) 5%, transparent);
}
.home-filter-bar__tabs {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}
.home-filter-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--on-surface-variant);
  font-family: inherit;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 140ms ease, color 140ms ease;
}
.home-filter-btn i { font-size: 0.95rem; }
.home-filter-btn:hover {
  background: color-mix(in srgb, var(--on-surface) 5%, transparent);
  color: var(--on-surface);
}
.home-filter-btn.is-active {
  background: color-mix(in srgb, var(--primary-container) 14%, transparent);
  color: var(--primary-container);
}
.home-filter-btn--live .home-filter-btn__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--error);
  animation: live-pulse 1.8s ease-in-out infinite;
}
.home-filter-btn--live.is-active {
  background: color-mix(in srgb, var(--error) 12%, transparent);
  color: var(--error);
}

.home-filter-bar__sort {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border: 0;
  border-radius: 10px;
  background: color-mix(in srgb, var(--on-surface) 5%, transparent);
  color: var(--on-surface);
  font-family: inherit;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 140ms ease;
}
.home-filter-bar__sort:hover {
  background: color-mix(in srgb, var(--primary-container) 10%, transparent);
  color: var(--primary-container);
}

/* ============================================================
   SECTION HEADERS (shared)
   ============================================================ */
.home-section-title {
  font-size: clamp(1.25rem, 2vw, 1.5rem);
  font-weight: 900;
  letter-spacing: -0.015em;
  color: var(--on-surface);
  margin: 0;
}

/* ============================================================
   TWO-COLUMN MAIN LAYOUT
   ============================================================ */
.home-layout-row {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: var(--space-6);
  align-items: start;
}

.home-sidebar {
  position: sticky;
  top: 76px;
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
}

/* ============================================================
   TODAY'S MATCHES — premium redesign
   ============================================================ */
.home-today-section {
  background: var(--surface-container);
  border-radius: var(--te-radius-xl);
  box-shadow: var(--te-shadow-md);
  overflow: hidden;
  padding-bottom: 4px;
}

/* ── Section header ── */
.home-today-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px 16px;
}
.home-today-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--on-surface);
}
.home-today-title__bar {
  width: 4px;
  height: 20px;
  border-radius: 2px;
  background: var(--error);
  flex-shrink: 0;
}
.home-today-badge {
  font-size: var(--te-label-size);
  font-weight: var(--te-label-weight);
  letter-spacing: 0.07em;
  padding: 4px 12px;
  border-radius: var(--te-radius-full);
  background: var(--surface-container-high);
  color: var(--on-surface-variant);
}

/* ── League group ── */
.home-league-block {
  margin-bottom: 0;
}
.home-league-block + .home-league-block {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid color-mix(in srgb, var(--on-surface) 6%, transparent);
}

/* League header — logo left, name centered, count right */
.home-league-header {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 8px 20px 10px;
  background: var(--surface-container-high);
  border-radius: var(--te-radius-md);
  margin: 0 12px 6px;
}
.home-league-header__link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--on-surface);
  text-decoration: none;
  justify-self: center;
}
.home-league-header__link:hover { color: var(--primary-container); }
.home-league-header__logo {
  width: 26px;
  height: 26px;
  border-radius: var(--te-radius-sm);
  background: var(--surface-container);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
  box-shadow: var(--te-shadow-sm);
}
.home-league-header__logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.home-league-header__logo span {
  font-size: 0.5625rem;
  font-weight: 800;
  color: var(--on-surface-variant);
}
.home-league-header__name {
  font-size: 0.8125rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: var(--on-surface);
}
.home-league-count {
  font-size: var(--te-label-size);
  font-weight: var(--te-label-weight);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--on-surface-variant);
  background: var(--surface-container);
  padding: 3px 10px;
  border-radius: var(--te-radius-full);
  white-space: nowrap;
  justify-self: end;
}

/* ── Match list container ── */
.home-match-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 0 12px 8px;
}
.home-match-row + .home-match-row {
  border-top: 1px solid color-mix(in srgb, var(--on-surface) 5%, transparent);
}

/* ── Match row base ──
   7 fixed cols: time | status | home-team | center(score/VS) | away-team | right(dash/empty) | chevron
   Every row type emits exactly 7 grid items → identical row widths. */
.home-match-row {
  display: grid;
  grid-template-columns: 48px 72px 1fr 72px 1fr 38px 18px;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  border-radius: var(--te-radius-lg);
  text-decoration: none;
  color: var(--on-surface);
  transition: background 140ms ease;
}
.home-match-row:hover {
  background: var(--surface-container-high);
  color: var(--on-surface);
}

/* ── Live row — inset shadow for left accent so box model stays identical ── */
.home-match-row--live {
  background: linear-gradient(
    90deg,
    color-mix(in srgb, var(--error) 14%, transparent) 0%,
    color-mix(in srgb, var(--error) 4%, transparent) 60%,
    transparent 100%
  );
  box-shadow: inset 3px 0 0 var(--error);
  border-radius: var(--te-radius-lg);
}
.home-match-row--live:hover {
  background: linear-gradient(
    90deg,
    color-mix(in srgb, var(--error) 20%, transparent) 0%,
    color-mix(in srgb, var(--error) 8%, transparent) 60%,
    transparent 100%
  );
}

/* ── FT row — default all names to muted/normal ── */
.home-match-row--ft .home-match-row__name {
  font-weight: 400;
  color: var(--on-surface-variant);
}
.home-match-row__name--winner {
  font-weight: 800 !important;
  color: var(--on-surface) !important;
}
.home-match-row__name--loser {
  font-weight: 400;
  color: var(--on-surface-variant);
}

/* ── FT score digits ── */
.home-match-row__score--ft {
  display: inline-flex;
  align-items: center;
  gap: 3px;
}
.home-match-row__score-sep {
  font-weight: 400;
  color: var(--on-surface-variant);
}
.home-match-row__goal--winner {
  font-weight: 900;
  color: var(--on-surface);
}
.home-match-row__goal--loser {
  font-weight: 400;
  color: var(--on-surface-variant);
}

/* ── Time column ── */
.home-match-row__time {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
  font-size: 0.875rem;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  color: var(--on-surface-variant);
}

/* ── Status badges ── */
.home-match-row__status {
  font-size: 0.5rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 2px 6px;
  border-radius: var(--te-radius-full);
  white-space: nowrap;
  width: fit-content;
  justify-self: center;
  display: inline-flex;
  align-items: center;
}
.home-match-row__status--live {
  color: var(--error);
  background: color-mix(in srgb, var(--error) 12%, transparent);
  gap: 2px;
  flex-direction: column;
  align-items: center;
  padding: 4px 8px;
}
.home-match-row__minute {
  font-size: 0.5rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--error);
  opacity: 0.85;
  line-height: 1;
}
.home-match-row__minute--phase {
  opacity: 0.6;
}
.home-match-row__status--ft {
  color: color-mix(in srgb, var(--te-win) 90%, #000 10%);
  background: color-mix(in srgb, var(--te-win) 12%, transparent);
}
.home-match-row__status--ns {
  color: color-mix(in srgb, var(--secondary) 85%, #000 15%);
  background: color-mix(in srgb, var(--secondary) 10%, transparent);
}
.home-match-row__status--pst {
  color: color-mix(in srgb, var(--te-draw) 90%, #000 10%);
  background: color-mix(in srgb, var(--te-draw) 12%, transparent);
}
.home-match-row__status--canc {
  color: color-mix(in srgb, var(--error) 75%, #000 25%);
  background: color-mix(in srgb, var(--error) 8%, transparent);
}

/* ── Team columns ── */
.home-match-row__team {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.home-match-row__team--away {
  flex-direction: row-reverse;
  text-align: right;
}
.home-match-row__logo-wrap {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.home-match-row__logo {
  width: 28px;
  height: 28px;
  object-fit: contain;
  border-radius: 50%;
}
.home-match-row__logo-fallback {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--surface-container-high);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.5625rem;
  font-weight: 800;
  color: var(--on-surface-variant);
}
.home-match-row__name {
  font-size: 0.9375rem;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ── Center column (holds score box or VS) ── */
.home-match-row__center {
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ── VS label ── */
.home-match-row__vs {
  font-size: var(--te-label-size);
  font-weight: var(--te-label-weight);
  letter-spacing: 0.07em;
  color: var(--on-surface-variant);
}

/* ── Score box — compact, wraps only the numbers ── */
.home-match-row__score {
  font-size: 0.9375rem;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
  white-space: nowrap;
  padding: 5px 10px;
  border-radius: var(--te-radius-md);
  background: color-mix(in srgb, var(--on-surface) 7%, transparent);
  color: var(--on-surface);
  display: inline-block;
}
.home-match-row__score--live {
  background: color-mix(in srgb, var(--error) 28%, var(--surface-container));
  color: color-mix(in srgb, var(--error) 85%, #000 15%);
  font-weight: 900;
}
.home-match-row__score--ft {
  background: var(--surface-container-high);
  font-size: 0.9375rem;
}

/* ── Right column (dash for upcoming, empty for live/ft) ── */
.home-match-row__right {
  font-size: 0.8125rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  color: var(--on-surface-variant);
  text-align: center;
}
.home-match-row__right--dash {
  color: var(--on-surface-variant);
}

/* ── Chevron ── */
.home-match-row__chevron {
  font-size: 0.875rem;
  color: var(--on-surface-variant);
  opacity: 0.5;
  flex-shrink: 0;
}
.home-match-row:hover .home-match-row__chevron { opacity: 1; }

/* ── Empty / footer ── */
.home-today-empty {
  padding: 20px 24px;
  color: var(--on-surface-variant);
  font-size: 0.875rem;
}
.home-today-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 12px 24px 16px;
  font-size: var(--te-label-size);
  font-weight: var(--te-label-weight);
  letter-spacing: 0.05em;
  color: var(--on-surface-variant);
}

/* ============================================================
   COMPETITIONS (League Cards)
   ============================================================ */
.home-competitions-section { margin-top: var(--space-2); }
.home-competitions-section > .d-flex { margin-bottom: 16px; }
.home-competitions-section .home-competitions-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)) !important;
  gap: 16px !important;
  align-items: stretch;
}

/* Header normalisation for league overview cards: keep the title on one line
   and hide the Official/Live toggle so every card's standings table starts at
   the same y. Without these rules a longer name like "2. Bundesliga" wraps,
   the toggle wraps with it, and adjacent cards drift out of alignment. */
.home-competitions-grid-item > .premium-card > .premium-card-header {
  flex-wrap: nowrap;
  min-height: 56px;
  align-items: center;
}
.home-competitions-grid-item .standings-card-title-group {
  flex-direction: row !important;
  align-items: center !important;
  flex-wrap: nowrap;
  min-width: 0;
  flex: 1 1 auto;
}
.home-competitions-grid-item .standings-card-title-group .mc-standings-heading {
  min-width: 0;
  flex: 1 1 auto;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.home-competitions-grid-item .standings-card-title-group .mc-standings-heading > img {
  flex-shrink: 0;
}
.home-competitions-grid-item .standings-mode-toggle {
  display: none;
}

.home-competitions-section .home-competitions-grid.home-competitions-grid--two-col {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
}

.standings-card-league-logo {
  width: 14px;
  height: 14px;
  object-fit: contain;
  flex-shrink: 0;
}

@media (max-width: 720px) {
  .home-competitions-section .home-competitions-grid.home-competitions-grid--two-col {
    grid-template-columns: 1fr !important;
  }
}

.home-competitions-section .home-league-card.premium-card {
  background: var(--surface-container);
  border: 0;
  border-radius: 14px;
  box-shadow: 0 8px 22px color-mix(in srgb, var(--primary-container) 7%, transparent);
  transition: box-shadow 180ms ease;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.home-competitions-section .home-league-card.premium-card:hover {
  box-shadow: 0 14px 32px color-mix(in srgb, var(--primary-container) 14%, transparent);
}
.home-competitions-section .home-league-card > .premium-card-header {
  padding: 14px 16px;
  border-bottom: 0;
  background: linear-gradient(180deg,
    color-mix(in srgb, var(--primary-container) 4%, transparent),
    transparent);
  gap: 10px;
}
.home-competitions-section .home-league-card > .premium-card-header a:first-child {
  min-width: 0;
  flex: 1 1 auto;
  align-items: center !important;
  color: var(--on-surface) !important;
  gap: 10px !important;
}
.home-competitions-section .home-league-card > .premium-card-header a:first-child > span:last-child {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--on-surface);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.home-competitions-section .home-league-card .premium-league-logo-sm {
  width: 32px;
  height: 32px;
  padding: 3px;
  background: var(--surface-container);
  border-radius: 8px;
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--on-surface) 6%, transparent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.home-competitions-section .home-league-card .premium-league-logo-sm img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.home-competitions-section .home-league-card .premium-btn-outline {
  padding: 4px 12px !important;
  font-size: 0.6875rem !important;
  font-weight: 800 !important;
  letter-spacing: 0.08em !important;
  text-transform: uppercase !important;
  border-radius: 999px !important;
  border: 0 !important;
  background: color-mix(in srgb, var(--primary-container) 12%, transparent) !important;
  color: var(--primary-container) !important;
  transition: background 140ms ease !important;
}
.home-competitions-section .home-league-card .premium-btn-outline:hover {
  background: color-mix(in srgb, var(--primary-container) 22%, transparent) !important;
  color: var(--primary-container) !important;
}
.home-competitions-section .home-league-card > .premium-card-body {
  padding: 4px 14px 14px !important;
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
}

.home-competitions-section .home-standings-mini {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.home-competitions-section .home-standings-row {
  display: grid;
  grid-template-columns: 22px 1fr auto;
  gap: 8px;
  align-items: center;
  padding: 6px 6px;
  border-radius: 6px;
  transition: background 140ms ease;
}
.home-competitions-section .home-standings-row:hover {
  background: color-mix(in srgb, var(--primary-container) 5%, transparent);
}
.home-competitions-section .home-standings-row > span:first-child {
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--on-surface-variant);
  font-variant-numeric: tabular-nums;
  text-align: center;
}
.home-competitions-section .home-standings-row:first-child > span:first-child,
.home-competitions-section .home-standings-row:first-child > strong {
  color: var(--primary-container);
}
.home-competitions-section .home-standings-team {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--on-surface);
  text-decoration: none;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.home-competitions-section .home-standings-team:hover { color: var(--primary-container); }
.home-competitions-section .home-standings-team .premium-team-logo-sm {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}
.home-competitions-section .home-standings-team .premium-team-logo-sm img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.home-competitions-section .home-standings-row > strong {
  font-size: 0.9rem;
  font-weight: 900;
  color: var(--on-surface);
  font-variant-numeric: tabular-nums;
}

.home-competitions-section .home-league-next {
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid color-mix(in srgb, var(--on-surface) 6%, transparent);
}
.home-competitions-section .home-league-next__label {
  font-size: 0.6rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--on-surface-variant);
  margin-bottom: 8px;
}
.home-competitions-section .home-league-next-link {
  display: block;
  padding: 10px 12px;
  border-radius: 8px;
  background: color-mix(in srgb, var(--on-surface) 4%, transparent);
  color: var(--on-surface);
  text-decoration: none;
  transition: background 140ms ease;
}
.home-competitions-section .home-league-next-link:hover {
  background: color-mix(in srgb, var(--primary-container) 8%, transparent);
}
.home-competitions-section .home-league-next-link .home-match-main {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.home-competitions-section .home-league-next-link .home-match-team {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--on-surface);
  min-width: 0;
}
.home-competitions-section .home-league-next-link .home-match-team .premium-team-logo-sm {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}
.home-competitions-section .home-league-next-link .home-match-team .premium-team-logo-sm img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.home-competitions-section .home-league-next-team-name {
  font-weight: 700;
  color: var(--on-surface);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.home-competitions-section .home-league-next__kickoff {
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px dashed color-mix(in srgb, var(--on-surface) 8%, transparent);
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--on-surface-variant);
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.home-competitions-section .home-league-next__live-row {
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px dashed color-mix(in srgb, var(--on-surface) 8%, transparent);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.home-competitions-section .home-league-next__score {
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--on-surface);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}
.home-competitions-section .home-league-next--empty {
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid color-mix(in srgb, var(--on-surface) 6%, transparent);
  font-size: 0.8rem;
  color: var(--on-surface-variant);
  font-style: italic;
}

/* ============================================================
   SIDEBAR — POWER RANKINGS + QUICK LINKS
   ============================================================ */
.home-widget.premium-card {
  background: var(--surface-container);
  border: 0;
  border-radius: 14px;
  box-shadow: 0 8px 22px color-mix(in srgb, var(--primary-container) 7%, transparent);
  overflow: hidden;
}
.home-widget.premium-card > .premium-card-header {
  padding: 14px 16px 10px;
  border-bottom: 0;
  background: transparent;
}
.home-widget.premium-card .premium-section-title {
  font-size: 0.75rem !important;
  font-weight: 800 !important;
  letter-spacing: 0.1em !important;
  text-transform: uppercase !important;
  color: var(--on-surface-variant) !important;
  background: transparent !important;
  background-image: none !important;
  -webkit-text-fill-color: currentColor !important;
}
.home-widget.premium-card > .premium-card-header a.small {
  font-size: 0.6875rem !important;
  font-weight: 800 !important;
  letter-spacing: 0.06em !important;
  text-transform: uppercase !important;
  color: var(--primary-container) !important;
  text-decoration: none !important;
  padding: 4px 10px;
  border-radius: 999px;
  transition: background 140ms ease;
}
.home-widget.premium-card > .premium-card-header a.small:hover {
  background: color-mix(in srgb, var(--primary-container) 12%, transparent) !important;
}
.home-widget.premium-card > .premium-card-body {
  padding: 4px 10px 12px !important;
}

/* Power rows */
.home-power-row {
  display: grid;
  grid-template-columns: 28px 32px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border-radius: 10px;
  position: relative;
  transition: background 140ms ease;
}
.home-power-row + .home-power-row {
  border-top: 1px solid color-mix(in srgb, var(--on-surface) 5%, transparent);
}
.home-power-row:hover {
  background: color-mix(in srgb, var(--primary-container) 6%, transparent);
}

.home-power-rank {
  font-size: 0.8rem;
  font-weight: 900;
  color: var(--on-surface-variant);
  text-align: center;
  font-variant-numeric: tabular-nums;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: color-mix(in srgb, var(--on-surface) 6%, transparent);
  line-height: 1;
}
.home-power-rank--gold {
  color: #7a5a00;
  background: linear-gradient(135deg, var(--warning), var(--warning));
  box-shadow: 0 3px 10px color-mix(in srgb, var(--warning) 38%, transparent);
}
.home-power-rank--silver {
  color: var(--on-surface-variant);
  background: linear-gradient(135deg, var(--surface-highest), var(--outline));
  box-shadow: 0 3px 10px color-mix(in srgb, var(--outline) 30%, transparent);
}
.home-power-rank--bronze {
  color: #5a2e11;
  background: linear-gradient(135deg, var(--warning), var(--warning));
  box-shadow: 0 3px 10px color-mix(in srgb, var(--warning) 36%, transparent);
}
.home-power-row .premium-team-logo-sm {
  width: 28px;
  height: 28px;
  background: transparent;
  padding: 0;
  box-shadow: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.home-power-row .premium-team-logo-sm img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.home-power-team {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--on-surface);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}
a.home-power-team.lu-link-team {
  display: block;
  color: var(--on-surface);
  text-decoration: none;
}
a.home-power-team.lu-link-team:hover { color: var(--primary-container); }
.home-power-score {
  font-size: 0.8rem;
  font-weight: 900;
  color: var(--primary-container);
  font-variant-numeric: tabular-nums;
  padding: 4px 10px;
  border-radius: 8px;
  background: color-mix(in srgb, var(--primary-container) 10%, transparent);
  min-width: 46px;
  text-align: center;
}

/* Quick links */
.home-quick-links {
  display: grid;
  gap: 8px;
}
.home-quick-links .premium-btn {
  padding: 10px 14px !important;
  font-size: 0.75rem !important;
  font-weight: 800 !important;
  letter-spacing: 0.06em !important;
  text-transform: uppercase !important;
  border-radius: 10px !important;
  border: 0 !important;
  background: color-mix(in srgb, var(--on-surface) 5%, transparent) !important;
  color: var(--on-surface) !important;
  text-align: left !important;
  transition: background 140ms ease, color 140ms ease !important;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.home-quick-links .premium-btn::after {
  content: "→";
  font-size: 0.85rem;
  color: var(--on-surface-variant);
  transition: transform 160ms ease;
}
.home-quick-links .premium-btn:hover {
  background: color-mix(in srgb, var(--primary-container) 10%, transparent) !important;
  color: var(--primary-container) !important;
}
.home-quick-links .premium-btn:hover::after {
  transform: translateX(3px);
  color: var(--primary-container);
}

/* Bookmakers */
.home-bookmakers-widget .premium-card-body {
  display: grid;
  gap: 12px;
}
.home-bookmakers-pill {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--on-surface-variant);
}
.home-bookmakers-list { display: grid; gap: 6px; }
.home-bookmaker-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  background: color-mix(in srgb, var(--on-surface) 4%, transparent);
  border-radius: 10px;
  padding: 8px 12px;
  transition: background 140ms ease;
}
.home-bookmaker-row:hover {
  background: color-mix(in srgb, var(--primary-container) 7%, transparent);
}
.home-bookmaker-main {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.home-bookmaker-logo {
  width: 20px;
  height: 20px;
  object-fit: contain;
}
.home-bookmaker-name {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--on-surface);
}
.home-bookmaker-metrics {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.home-bookmaker-score {
  font-size: 0.6875rem;
  font-weight: 800;
  color: var(--on-surface-variant);
}
.home-bookmaker-rank {
  font-size: 0.875rem;
  font-weight: 900;
  color: var(--primary-container);
}
.home-bookmakers-summary {
  background: color-mix(in srgb, var(--on-surface) 4%, transparent);
  border-radius: 10px;
  padding: 12px;
  display: grid;
  gap: 8px;
}
.home-bookmakers-summary-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.home-bookmakers-label {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--on-surface-variant);
}
.home-bookmakers-value,
.home-bookmakers-confidence {
  font-size: 0.875rem;
  font-weight: 800;
  color: var(--on-surface);
  font-variant-numeric: tabular-nums;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1199px) {
  .home-hero { padding: 24px 24px 28px; }
  .home-hero-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .home-layout-row { grid-template-columns: 1fr; }
  .home-sidebar    { position: static; }
  .home-competitions-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
}

/* Live strip: keep 3×2 until narrower than typical laptop content column */
@media (max-width: 991px) {
  .home-live-grid {
    --hm-live-cols: 2;
    --hm-live-rows: 2;
  }
}

@media (max-width: 767px) {
  .home-container { padding-left: 0; padding-right: 0; }
  .home-hero {
    padding: 26px 20px;
    min-height: auto;
  }
  .home-hero__customize {
    position: static;
    align-self: flex-end;
    margin-bottom: 12px;
  }
  .home-hero-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-top: 24px;
  }
  .home-stat { padding: 14px 16px 20px; min-height: 120px; }
  .home-live-section__header { flex-wrap: wrap; }
  .home-live-grid {
    --hm-live-cols: 1;
    --hm-live-rows: 2;
    --home-live-card-h: 21.5rem;
  }
  .home-live-row {
    grid-template-columns: 32px 1fr auto;
    gap: 10px;
  }
  .home-live-score { font-size: 1.2rem; }
  #home-today-section .home-match-card {
    grid-template-columns: 52px 1fr auto;
    padding: 10px 12px 10px 14px;
  }
  #home-today-section .home-match-time { font-size: 0.85rem; }
  #home-today-section .home-match-team { font-size: 0.85rem; }
  .home-competitions-section .home-competitions-grid {
    grid-template-columns: 1fr !important;
  }
}

@media (max-width: 520px) {
  .home-hero__title { font-size: 1.85rem; }
  .home-hero-stats { grid-template-columns: 1fr; }
}
