#fighter-head-to-head {
  width: min(100%, var(--standings-width));
  min-width: 0;
  margin: 12px auto 0;
}

.head-to-head-panel {
  padding: clamp(10px, 2vw, 16px);
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--surface);
  --head-to-head-first: var(--accent);
  --head-to-head-second: var(--down);
}

.head-to-head-panel > summary {
  padding-block: 2px;
  color: var(--text);
  cursor: pointer;
  font-size: .96rem;
  font-weight: 750;
}

.head-to-head-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px 12px;
  margin-top: 9px;
}

.head-to-head-fields label {
  display: grid;
  min-width: 0;
  gap: 3px;
  color: var(--secondary);
  font-size: .77rem;
  font-weight: 650;
}

.head-to-head-filter { grid-column: 1 / -1; }

.head-to-head-fields :is(select, input) {
  width: 100%;
  min-width: 0;
  min-height: 38px;
  padding: 5px 8px;
  border: 1px solid var(--control-edge);
  border-radius: 7px;
  background: var(--control-surface);
  color: var(--text);
  font: 500 .84rem/1.2 var(--body);
}

.head-to-head-status {
  margin-top: 7px;
  color: var(--secondary);
  font-size: .8rem;
}

.head-to-head-summaries,
.head-to-head-tables {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  margin-top: 8px;
}

.head-to-head-fighter {
  min-width: 0;
  padding: 6px 9px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #f9fbf8;
}

.head-to-head-fighter-0 { border-top: 2px solid var(--head-to-head-first); }
.head-to-head-fighter-1 { border-top: 2px dashed var(--head-to-head-second); }

.head-to-head-history {
  min-height: 32px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text);
  font: 750 .86rem/1.3 var(--body);
  text-align: start;
  text-decoration: underline;
  text-decoration-color: var(--control-edge);
  text-underline-offset: 3px;
}

.head-to-head-history:hover { color: var(--accent); text-decoration-color: var(--accent); }

.head-to-head-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
  margin: 1px 0 0;
}

.head-to-head-stats dt { color: var(--secondary); font-size: .72rem; }
.head-to-head-stats dd { margin: 0; color: var(--text); font-size: .79rem; font-weight: 700; }
.head-to-head-fighter .head-to-head-status { margin-top: 3px; font-size: .72rem; }

.head-to-head-chart { margin: 10px 0 0; }
.head-to-head-chart svg { display: block; width: 100%; height: auto; max-height: 320px; }
.head-to-head-chart text { fill: var(--secondary); font: 9px var(--body); }
.head-to-head-chart .head-to-head-grid { stroke: var(--line); stroke-width: .65px; }
.head-to-head-chart .head-to-head-plot-0 { color: var(--head-to-head-first); }
.head-to-head-chart .head-to-head-plot-1 { color: var(--head-to-head-second); }
.head-to-head-chart circle { fill: currentColor; }
.head-to-head-chart path { fill: none; stroke: currentColor; stroke-width: 1.4px; }
.head-to-head-chart .head-to-head-plot-1 .head-to-head-trace { stroke-dasharray: 3 2; }
.head-to-head-chart .head-to-head-unknown { stroke-width: 1px; }
.head-to-head-chart figcaption { margin-top: 0; }

.head-to-head-values { margin-top: 8px; }
.head-to-head-values summary { color: var(--accent); cursor: pointer; font-size: .82rem; font-weight: 650; }
.head-to-head-tables table { width: 100%; border-collapse: collapse; font-size: .77rem; text-align: start; }
.head-to-head-tables caption { color: var(--text); font-weight: 700; text-align: start; }
.head-to-head-tables :is(th, td) { padding: 4px; border-bottom: 1px solid var(--line); text-align: start; }
.head-to-head-tables th { color: var(--secondary); }

@media (max-width: 420px) {
  .head-to-head-fields, .head-to-head-tables { grid-template-columns: minmax(0, 1fr); }
  .head-to-head-fighter { padding-inline: 6px; }
}
