.match-context-root {
  display: grid;
  gap: 24px;
  margin-top: 28px;
}

.match-context-block { min-width: 0; }

.match-context-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px 14px;
  margin-bottom: 10px;
  text-align: left;
}

.match-context-heading h3 {
  margin: 0;
  color: var(--muted-strong);
  font-size: 0.82rem;
  font-weight: 680;
}

.match-context-heading span {
  color: var(--muted);
  font-size: 0.68rem;
  line-height: 1.35;
}

section[aria-labelledby="absences-heading"] { display: none; }
#absences-heading + span { display: none; }

.match-context-loading,
.match-context-empty {
  margin: 0;
  padding: 15px 0;
  border: 0;
  border-top: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.5;
  text-align: left;
}

.h2h-list {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: transparent;
}

.h2h-item {
  display: grid;
  gap: 8px;
  padding: 12px 14px 13px;
  border-bottom: 1px solid var(--line);
  background: transparent;
}

.h2h-item:has(.h2h-team--home.is-winner),
.h2h-item:has(.h2h-team--away.is-winner),
.h2h-item:has(.h2h-result--draw) {
  background: transparent;
  box-shadow: none;
}

.h2h-item:last-child { border-bottom: 0; }

.h2h-meta {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: center;
  gap: 7px;
  color: var(--muted);
  font-size: 0.66rem;
  line-height: 1.35;
  text-align: center;
}

.h2h-meta time { white-space: nowrap; }

.h2h-meta-separator {
  color: #555b55;
  font-size: 0.58rem;
}

.h2h-competition {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.h2h-scoreline {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 58px minmax(0, 1fr);
  grid-template-areas: "home score away";
  align-items: center;
  gap: 9px;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
}

.h2h-team {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 7px;
  color: var(--muted-strong);
  font-size: 0.75rem;
  font-weight: 640;
  line-height: 1.25;
}

.h2h-team--home {
  grid-area: home;
  justify-content: flex-end;
  text-align: right;
}

.h2h-team--away {
  grid-area: away;
  justify-content: flex-start;
  text-align: left;
}

.h2h-team-name {
  min-width: 0;
  max-width: 100%;
  overflow-wrap: normal;
  word-break: normal;
  hyphens: none;
  text-wrap: balance;
}

.h2h-team.is-winner .h2h-team-name {
  color: var(--text);
  font-weight: 720;
}

.h2h-team.is-loser .h2h-team-name {
  color: var(--muted);
  font-weight: 620;
}

.h2h-item:has(.h2h-result--draw) .h2h-team-name {
  color: var(--muted-strong);
  font-weight: 650;
}

.h2h-logo {
  width: 21px;
  height: 21px;
  flex: 0 0 auto;
  object-fit: contain;
}

.h2h-score {
  grid-area: score;
  display: grid;
  min-width: 56px;
  min-height: 34px;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  color: var(--text);
  font-size: 0.98rem;
  font-variant-numeric: tabular-nums;
  font-weight: 720;
  letter-spacing: -0.03em;
  overflow-wrap: normal;
  white-space: nowrap;
  word-break: keep-all;
}

.h2h-item:has(.h2h-result--draw) .h2h-score {
  border-color: rgba(231, 199, 94, 0.34);
  background: var(--surface-2);
  color: var(--draw);
}

.h2h-result {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  border: 0;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.h2h-finish {
  margin: -1px 0 0;
  color: var(--muted);
  font-size: 0.61rem;
  line-height: 1.35;
  text-align: center;
}

.h2h-scoreline a,
a[x-apple-data-detectors] {
  color: inherit !important;
  text-decoration: none !important;
  pointer-events: none !important;
}

.absence-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: transparent;
}

.absence-team {
  min-width: 0;
  padding: 14px;
  border-right: 1px solid var(--line);
}

.absence-team:last-child { border-right: 0; }

.absence-team h4 {
  margin: 0 0 11px;
  font-size: 0.76rem;
  font-weight: 670;
  line-height: 1.3;
  text-align: center;
  text-wrap: balance;
}

.absence-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.absence-item {
  display: grid;
  gap: 3px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.absence-item:first-child {
  padding-top: 0;
  border-top: 0;
}

.absence-player {
  font-size: 0.74rem;
  font-weight: 640;
  line-height: 1.3;
}

.absence-detail {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px;
  color: var(--muted);
  font-size: 0.65rem;
  line-height: 1.35;
}

.absence-kind {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.absence-kind::before {
  width: 5px;
  height: 5px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--muted);
  content: "";
}

.absence-kind[data-kind="injury"]::before { background: var(--low); }
.absence-kind[data-kind="suspension"]::before { background: var(--draw); }

.absence-reason::before {
  margin-right: 5px;
  color: #555b55;
  content: "·";
}

.absence-none {
  margin: 0;
  color: var(--muted);
  font-size: 0.7rem;
  line-height: 1.45;
  text-align: center;
}

@media (min-width: 901px) {
  .match-context-heading h3 { font-size: 0.9rem; }
  .match-context-heading span { font-size: 0.76rem; }
  .h2h-meta { font-size: 0.74rem; }
  .h2h-team { font-size: 0.84rem; }
  .h2h-logo { width: 23px; height: 23px; }
  .h2h-score { font-size: 1.06rem; }
}

@media (max-width: 640px) {
  .match-context-root {
    gap: 20px;
    margin-top: 24px;
  }

  .match-context-heading {
    display: grid;
    justify-content: start;
  }

  .h2h-item { padding: 12px 10px 13px; }
  .h2h-meta { gap: 6px; font-size: 0.62rem; }
  .h2h-scoreline { grid-template-columns: minmax(0, 1fr) 52px minmax(0, 1fr); gap: 6px; }
  .h2h-team { gap: 5px; font-size: 0.68rem; }
  .h2h-logo { width: 18px; height: 18px; }
  .h2h-score { min-width: 50px; min-height: 34px; font-size: 0.92rem; }

  .absence-grid { grid-template-columns: 1fr; }
  .absence-team {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .absence-team:last-child { border-bottom: 0; }
}
