/* Match detail has a unique comparison composition; shared controls and table density remain global. */
.match-hero {
  position: relative;
  max-width: 1120px;
  margin: 0.72rem 0 1rem;
  padding: 0.78rem 0 0.88rem;
  border-top: 1px solid var(--border-strong);
  border-bottom: 1px solid var(--border-strong);
}

.match-hero::before {
  position: absolute;
  top: -1px;
  left: 0;
  width: 4.5rem;
  height: 2px;
  background: var(--accent-yellow-muted);
  content: "";
}

.match-hero__context {
  display: flex;
  min-height: 1.45rem;
  align-items: center;
  gap: 0.45rem;
  margin-bottom: 0.52rem;
  color: var(--text-muted);
  font-size: var(--tdb-type-small);
  line-height: 1.3;
}

.match-hero__context > span:not(:first-child, .match-live-state)::before {
  margin-right: 0.45rem;
  color: var(--border-strong);
  content: "\00b7";
}

.match-hero__round {
  color: var(--text-strong);
  font-size: var(--tdb-type-label);
  font-weight: 750;
  letter-spacing: 0.065em;
  text-transform: uppercase;
}

.match-hero__context a {
  font-weight: 650;
  text-decoration: none;
}

.match-hero__context .match-live-state {
  margin-left: auto;
}

.match-detail-title {
  display: grid;
  width: 100%;
  max-width: none;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: clamp(0.6rem, 1.8vw, 1.4rem);
  margin: 0;
  align-items: center;
  font-size: clamp(1.48rem, 2.35vw, 2.15rem);
  line-height: 1.1;
  letter-spacing: -0.035em;
}

.match-hero__player {
  min-width: 0;
}

.match-hero__player--opponent {
  text-align: right;
}

.match-hero__player .match-player {
  color: var(--text-strong);
  text-decoration: none;
}

.match-hero__player .match-player:hover {
  color: var(--link);
}

.match-hero__player .match-player-meta {
  display: flex;
  gap: 0.3rem;
  margin-top: 0.32rem;
  align-items: center;
  color: var(--text-muted);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0;
}

.match-hero__player--opponent .match-player-meta {
  justify-content: flex-end;
}

.match-hero__separator {
  color: var(--text-muted);
  font-size: 0.66rem;
  font-weight: 750;
  letter-spacing: 0.07em;
  text-align: center;
  text-transform: uppercase;
}

.match-score-line {
  display: flex;
  min-height: 2.4rem;
  margin: 0.62rem 0 0;
  padding: 0.42rem 0.58rem;
  align-items: baseline;
  justify-content: center;
  gap: 0.6rem;
  border: 1px solid var(--border);
  border-radius: var(--tdb-radius-control);
  background: var(--surface-subtle);
}

.match-score-line .match-score-hero {
  margin: 0;
  font-size: clamp(1.06rem, 1.6vw, 1.35rem);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.015em;
}

.match-score-line .helper-text,
.match-live-freshness {
  margin: 0;
}

.match-fact-summary {
  max-width: 94ch;
  margin: 0.58rem auto 0;
  text-align: center;
}

.match-detail-section {
  max-width: 1120px;
}

.match-metadata-grid {
  grid-template-columns: repeat(auto-fit, minmax(126px, 1fr));
}

.table-wrap.table-compact.match-stat-table-wrap {
  display: block;
  width: min(100%, 720px);
}

.match-stat-table {
  width: 100%;
}

.match-stat-table th:first-child {
  width: 46%;
}

.match-stat-table :is(th, td):not(:first-child) {
  width: 27%;
  text-align: right;
}

.match-stat-table tbody th {
  color: var(--text-muted);
  font-weight: 550;
}

.match-stat-table tbody td {
  color: var(--text-strong);
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}

.match-comparison-table {
  width: 100%;
}

.prematch-h2h-card {
  border-color: var(--border);
  border-left-color: var(--accent-yellow-muted);
  border-radius: var(--tdb-radius-panel);
  background: linear-gradient(100deg, color-mix(in srgb, var(--surface) 88%, var(--accent-yellow-muted)), var(--surface));
  box-shadow: none;
}

.match-related-list {
  max-width: 82ch;
}

html[data-theme="dark"] .match-hero__player .match-player {
  color: var(--text-strong);
}

html[data-theme="dark"] .match-score-line {
  background: var(--surface-subtle);
}

@media (max-width: 720px) {
  .match-hero {
    margin-top: 0.55rem;
    padding-top: 0.68rem;
  }

  .match-hero__context {
    flex-wrap: wrap;
  }

  .match-hero__context .match-live-state {
    margin-left: 0;
  }

  .match-detail-title {
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    gap: 0.48rem;
    font-size: clamp(1.08rem, 5.3vw, 1.4rem);
  }

  .match-hero__player .match-player-meta {
    font-size: 0.62rem;
  }

  .match-score-line {
    flex-wrap: wrap;
  }

  .match-fact-summary {
    text-align: left;
  }

  .match-metadata-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 420px) {
  .match-hero__season {
    display: none;
  }

  .match-detail-title {
    grid-template-columns: minmax(0, 1fr) 2rem minmax(0, 1fr);
    font-size: 1.05rem;
  }

  .match-hero__player .match-player-meta {
    align-items: flex-start;
  }
}
