/* Racials page. */
.races-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.legend {
  margin: 0;
  font-size: 0.85rem;
  color: var(--muted);
}
.race-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}
.race-card {
  padding: 20px;
}
.race-card[data-faction='alliance'] {
  --faction: var(--alliance);
}
.race-card[data-faction='horde'] {
  --faction: var(--horde);
}
.race-card::before {
  content: '';
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  border-radius: 8px 8px 0 0;
  background: linear-gradient(90deg, transparent, var(--faction), transparent);
  opacity: 0.8;
}
.race-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  padding-bottom: 14px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--line);
}
.race-name {
  font-size: 1.4rem;
  color: var(--gold-300);
}
.race-sub {
  margin: 6px 0 0;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.race-summary {
  font-size: 0.8rem;
  color: var(--muted);
}
.race-classes {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 4px;
  max-width: 220px;
}
.race-class {
  position: relative;
}
.race-class.is-new::after {
  content: '';
  position: absolute;
  right: -2px;
  top: -2px;
  width: 8px;
  height: 8px;
  transform: rotate(45deg);
  background: var(--new);
  border: 1px solid #061316;
}
.ability-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 14px;
}
.ability {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 12px;
  align-items: start;
}
.ability img {
  border-radius: 8px;
  border: 1px solid rgba(241, 217, 160, 0.4);
}
.ability-body p {
  margin: 0;
}
.ability-head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 2px !important;
}
.ability-name {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  color: var(--cream);
  margin-right: 2px;
}
.ability-cd {
  font-size: 0.75rem;
  color: var(--sky);
}
.ability-desc {
  font-size: 0.92rem;
  color: var(--muted);
  line-height: 1.5;
}

/* Race x class table */
.combo-wrap {
  overflow-x: auto;
  padding: 8px;
}
.combo-table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
  font-size: 0.9rem;
}
.combo-table th,
.combo-table td {
  padding: 10px 6px;
  text-align: center;
  border-bottom: 1px solid rgba(241, 217, 160, 0.1);
}
.combo-table thead th {
  font-family: var(--font-display);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  vertical-align: bottom;
}
.combo-table thead .class-medal {
  display: grid;
  margin: 0 auto 6px;
}
.combo-table thead th:first-child,
.combo-table tbody th {
  text-align: left;
  font-family: var(--font-display);
  color: var(--gold-300);
  padding-left: 12px;
}
.combo-table tbody tr:hover {
  background: rgba(127, 220, 236, 0.05);
}
.combo-yes {
  color: var(--parchment);
  opacity: 0.8;
}
.combo-new {
  display: inline-block;
  width: 11px;
  height: 11px;
  transform: rotate(45deg);
  background: var(--new);
  box-shadow: 0 0 8px rgba(111, 224, 138, 0.5);
}
.combo-table small {
  display: block;
  font-size: 0.65rem;
  color: var(--muted);
}

@media (max-width: 900px) {
  .race-grid {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 480px) {
  .race-head {
    flex-direction: column;
  }
  .race-classes {
    justify-content: flex-start;
    max-width: none;
  }
  .race-card {
    padding: 16px;
  }
}
