.team-stats {
  display: flex;
  flex-direction: column;
  gap: 16px;
  font-family: "Onest", sans-serif;
}

.team-stats__slice {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.team-stats__slice[hidden] {
  display: none;
}

.team-stats__slices {
  margin: 0;
}

.team-stats__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 16px;
  padding: 16px 20px;
  border-radius: 14px;
  background: #fff;
}

.team-stats__scope {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
}

.team-stats__tournament {
  color: #232323;
  font-size: 16px;
  font-weight: 700;
  text-decoration: none;
}

a.team-stats__tournament:hover {
  color: #9345d8;
}

.team-stats__season,
.team-stats__type {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 8px;
  background: #f4f4f4;
  color: #3d3d3d;
  font-size: 13px;
}

.team-stats__updated {
  color: #7d7d7d;
  font-size: 13px;
}

.team-stats__tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

.team-stats__tile {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 16px 18px;
  border-radius: 14px;
  background: #fff;
}

.team-stats__tile-label {
  color: #7d7d7d;
  font-size: 13px;
  line-height: 1.3;
}

.team-stats__tile-value {
  color: #232323;
  font-size: 26px;
  font-weight: 700;
  line-height: 1.1;
}

.team-stats__group {
  border-radius: 14px;
  background: #fff;
  overflow: hidden;
}

.team-stats__group-title {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 16px 20px;
  cursor: pointer;
  color: #232323;
  font-size: 16px;
  font-weight: 600;
  list-style: none;
}

.team-stats__group-title::-webkit-details-marker {
  display: none;
}

.team-stats__group-title::after {
  content: "";
  width: 8px;
  height: 8px;
  margin-left: auto;
  border-right: 2px solid #7d7d7d;
  border-bottom: 2px solid #7d7d7d;
  transform: rotate(45deg);
  transform-origin: center;
  transition: transform 0.15s ease;
}

.team-stats__group[open] .team-stats__group-title::after {
  transform: rotate(-135deg);
}

.team-stats__group-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  padding: 0 6px;
  border-radius: 10px;
  background: #f4f4f4;
  color: #7d7d7d;
  font-size: 12px;
  font-weight: 600;
}

.team-stats__legend {
  padding: 0 20px 8px;
  color: #7d7d7d;
  font-size: 12px;
}

.team-stats__rows {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 0 24px;
  padding: 0 20px 12px;
}

.team-stats__row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  border-top: 1px solid #f4f4f4;
  font-size: 14px;
  line-height: 1.3;
}

.team-stats__row-label {
  min-width: 0;
  color: #3d3d3d;
}

.team-stats__row-value {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  flex: 0 0 auto;
  color: #232323;
  font-weight: 600;
  white-space: nowrap;
}

.team-stats__row-against {
  color: #7d7d7d;
  font-weight: 400;
}

.team-stats__row-against::before {
  content: "/";
  margin-right: 8px;
  color: #d5d5d5;
}

@media (max-width: 768px) {
  .team-stats__header {
    padding: 14px 16px;
  }

  .team-stats__tiles {
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 8px;
  }

  .team-stats__tile {
    padding: 12px 14px;
  }

  .team-stats__tile-value {
    font-size: 22px;
  }

  .team-stats__group-title {
    padding: 14px 16px;
    font-size: 15px;
  }

  .team-stats__legend {
    padding: 0 16px 8px;
  }

  .team-stats__rows {
    grid-template-columns: minmax(0, 1fr);
    padding: 0 16px 12px;
  }
}

.team-stats-seasons__body--loading {
  opacity: 0.55;
  pointer-events: none;
  transition: opacity 0.15s ease;
}
.team-stats-seasons .league-stats__seasons {
  margin-bottom: 16px;
}
.team-stats-seasons .league-stats__seasons-label {
  font-size: 16px;
}
