.level-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 290px), 1fr));
  gap: clamp(10px, 1.7vw, 19px);
}

.level-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  min-height: 130px;
  gap: 12px;
  padding: clamp(12px, 2vw, 21px);
  border: 1px solid #314466;
  border-radius: 16px;
  color: var(--white);
  background: #111f3a;
  text-decoration: none;
  transition: background-color .16s, border-color .16s;
}

.level-card:hover,
.level-card:focus-visible {
  border-color: var(--lila);
  background: #192946;
}

.level-code {
  max-width: 12ch;
  padding: 6px 8px;
  border-radius: 8px;
  background: #243455;
  color: #cde9ff;
  font-size: .82rem;
  font-weight: 750;
  line-height: 1.12;
  text-align: center;
}

.level-number {
  display: block;
  margin-bottom: 3px;
  color: var(--white);
}

.level-card:nth-child(2n) .level-code {
  background: #372c53;
  color: #eadcff;
}

.level-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.level-copy strong {
  font-size: clamp(17px, 2vw, 23px);
  line-height: 1.13;
  overflow-wrap: break-word;
}

.level-summary {
  color: var(--muted);
  font-size: .84rem;
  line-height: 1.28;
}

.level-count {
  color: #b1f3ec;
  font-size: .78rem;
}

.level-intro {
  max-width: 72ch;
  margin: -9px 0 18px;
  color: var(--muted);
  font-size: .95rem;
}

.level-mixed-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 100%;
  min-height: 44px;
  margin-bottom: clamp(14px, 2vw, 22px);
  padding: 7px 12px;
  border: 1px solid #587799;
  border-radius: 10px;
  color: var(--white);
  background: #233850;
  font-size: .92rem;
  font-weight: 700;
  text-decoration: none;
}

.level-mixed-link span { color: var(--turquesa); }

.level-mixed-link:is(:hover, :focus-visible) {
  border-color: var(--turquesa);
  background: #2b4962;
}

.task-card.is-mixed small { color: #b1eae5; }

.task-grid.has-stages {
  display: block;
}

.level-stage + .level-stage,
.level-warmups {
  margin-top: clamp(24px, 4vw, 42px);
}

.level-stage h2,
.level-warmups h2 {
  margin-bottom: 12px;
  font-size: clamp(20px, 2.5vw, 28px);
}

@media (max-width: 420px) {
  .level-card {
    min-height: 105px;
    gap: 9px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .level-card { transition: none; }
}
