/* Counter Galaxy workspace treatment for the training catalog.
   Game mechanics stay in the existing challenge styles; this final layer
   only aligns hierarchy, density and surfaces with the other product pages. */

.challenge-product {
  background: radial-gradient(circle at 72% 18%, rgba(23, 34, 51, .72), transparent 34%), #0b101b;
}

.challenge-product::after {
  opacity: .28;
  mix-blend-mode: normal;
}

.challenge-product .challenge-page {
  width: min(1440px, calc(100% - 48px));
  padding: 20px 0 64px;
}

.challenge-product .challenge-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 390px);
  gap: 32px;
  align-items: center;
  min-height: 0;
  padding: 28px 32px;
  border: 1px solid rgba(222, 232, 241, .1);
  border-radius: 18px;
  background: rgba(17, 25, 39, .94);
  box-shadow: none;
}

.challenge-product .challenge-hero::before {
  opacity: .035;
}

.challenge-product .challenge-hero::after,
.challenge-product .challenge-radar {
  display: none;
}

.challenge-product .challenge-hero-copy {
  max-width: 720px;
}

.challenge-product .challenge-hero-copy > span,
.challenge-product .section-heading span,
.challenge-product .achievement-panel header span {
  color: #738193;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .14em;
}

.challenge-product .challenge-hero-copy h1 {
  max-width: none;
  margin: 8px 0 10px;
  color: #e8edf2;
  font-size: clamp(30px, 3vw, 36px);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -.035em;
  text-shadow: none;
  text-wrap: balance;
}

.challenge-product .challenge-hero-copy p {
  max-width: 620px;
  margin: 0;
  color: #a8b4c1;
  font-size: 13px;
  line-height: 1.55;
  text-shadow: none;
  text-wrap: pretty;
}

.challenge-product .challenge-hero-actions {
  gap: 8px;
  margin-top: 20px;
}

.challenge-product .challenge-hero-actions button,
.challenge-product .challenge-hero-actions a,
.challenge-product .challenge-game-card button,
.challenge-product .result-actions button {
  min-height: 44px;
  padding: 0 16px;
  border-radius: 10px;
  font-family: "Onest", "Segoe UI", sans-serif;
  font-size: 12px;
  font-weight: 650;
  line-height: 1;
  letter-spacing: 0;
  text-transform: none;
  transition: filter 140ms cubic-bezier(.23, 1, .32, 1), transform 140ms cubic-bezier(.23, 1, .32, 1), background-color 140ms cubic-bezier(.23, 1, .32, 1);
}

.challenge-product .challenge-hero-actions :is(button, a):active,
.challenge-product .challenge-game-card button:active {
  transform: scale(.97);
}

.challenge-product .challenge-totals {
  position: static;
  display: grid;
  grid-template-columns: 1fr;
  min-height: 0;
  overflow: hidden;
  border: 1px solid rgba(222, 232, 241, .08);
  border-radius: 14px;
  background: #0d1522;
  backdrop-filter: none;
}

.challenge-product .challenge-totals article {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 2px 12px;
  min-width: 0;
  min-height: 64px;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(222, 232, 241, .07);
}

.challenge-product .challenge-totals article:last-child {
  border-bottom: 0;
}

.challenge-product .challenge-totals article::after {
  display: none;
}

.challenge-product .challenge-totals span {
  grid-column: 1;
  align-self: end;
  color: #738193;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: .12em;
}

.challenge-product .challenge-totals b {
  grid-column: 2;
  grid-row: 1 / 3;
  align-self: center;
  color: #e8edf2;
  font-family: "JetBrains Mono", monospace;
  font-size: 20px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.challenge-product .challenge-totals small {
  grid-column: 1;
  color: #738193;
  font-size: 10px;
}

.challenge-product :is(.challenge-section, .challenge-board-section) {
  margin-top: 24px;
}

.challenge-product .section-heading {
  min-height: 0;
  margin-bottom: 12px;
  padding-left: 0;
  border-left: 0;
}

.challenge-product .section-heading h2,
.challenge-product .achievement-panel h2 {
  margin: 4px 0 0;
  color: #e8edf2;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -.02em;
}

.challenge-product .section-heading p {
  max-width: 520px;
  color: #738193;
  font-size: 11px;
  line-height: 1.5;
}

.challenge-product .challenge-games {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.challenge-product .challenge-game-card {
  min-height: 248px;
  padding: 16px;
  overflow: hidden;
  border: 1px solid rgba(222, 232, 241, .09);
  border-radius: 14px;
  background: rgba(17, 25, 39, .92);
  box-shadow: none;
  animation-duration: .2s;
  transition: border-color 140ms cubic-bezier(.23, 1, .32, 1), transform 140ms cubic-bezier(.23, 1, .32, 1), background-color 140ms cubic-bezier(.23, 1, .32, 1);
}

.challenge-product .challenge-game-card:hover,
.challenge-product .challenge-game-card.violet:hover,
.challenge-product .challenge-game-card.green:hover {
  transform: translateY(-1px);
  border-color: rgba(141, 182, 201, .28);
  background: rgba(23, 34, 51, .94);
  box-shadow: none;
}

.challenge-product .challenge-game-card::before {
  opacity: .12;
  box-shadow: none;
}

.challenge-product .game-card-index {
  right: 14px;
  top: 10px;
  color: rgba(168, 180, 193, .15);
  font-family: "JetBrains Mono", monospace;
  font-size: 24px;
}

.challenge-product .game-card-tag {
  color: #8db6c9 !important;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: .12em;
}

.challenge-product .game-card-visual {
  width: 58px;
  height: 58px;
  margin: 12px 0;
  border-color: rgba(141, 182, 201, .16);
  background: rgba(141, 182, 201, .04) !important;
  box-shadow: none;
}

.challenge-product .game-card-visual::before {
  inset: 7px;
}

.challenge-product .game-card-visual::after {
  inset: 17px;
}

.challenge-product .game-card-visual b {
  font-family: "JetBrains Mono", monospace;
  font-size: 15px;
  font-weight: 600;
}

.challenge-product .challenge-game-card h3 {
  margin: 0;
  color: #e8edf2;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.25;
}

.challenge-product .challenge-game-card > p {
  min-height: 42px;
  margin: 7px 0 10px;
  color: #8d9aaa;
  font-size: 11px;
  line-height: 1.45;
  text-wrap: pretty;
}

.challenge-product .game-card-stats {
  gap: 6px;
  margin: auto 0 10px;
}

.challenge-product .game-card-stats span {
  padding: 7px 8px;
  border-color: rgba(222, 232, 241, .07);
  border-radius: 8px;
  color: #738193;
}

.challenge-product .game-card-stats b {
  margin-top: 3px;
  color: #e8edf2;
  font-family: "JetBrains Mono", monospace;
  font-variant-numeric: tabular-nums;
}

.challenge-product .challenge-board-main,
.challenge-product .achievement-panel,
.challenge-product .coach-focus {
  border: 1px solid rgba(222, 232, 241, .09);
  border-radius: 14px;
  background: rgba(17, 25, 39, .92);
  box-shadow: none;
}

.challenge-product .roadmap-section {
  display: none;
}

@media (max-width: 1180px) {
  .challenge-product .challenge-games {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .challenge-product .challenge-page {
    width: calc(100% - 32px);
  }

  .challenge-product .challenge-hero {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 24px;
  }

  .challenge-product .challenge-totals {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .challenge-product .challenge-totals article {
    display: block;
    min-height: 76px;
    padding: 12px;
    border-right: 1px solid rgba(222, 232, 241, .07);
    border-bottom: 0;
  }

  .challenge-product .challenge-totals article:last-child {
    border-right: 0;
  }

  .challenge-product .challenge-totals b,
  .challenge-product .challenge-totals small {
    display: block;
    margin-top: 5px;
  }

  .challenge-product .challenge-games {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .challenge-product .challenge-page {
    width: calc(100% - 20px);
    padding-top: 10px;
  }

  .challenge-product .challenge-hero {
    padding: 20px;
  }

  .challenge-product .challenge-hero-copy h1 {
    font-size: 30px;
  }

  .challenge-product .challenge-hero-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .challenge-product .challenge-totals small {
    display: none;
  }

  .challenge-product .challenge-games {
    grid-template-columns: 1fr;
  }

  .challenge-product .challenge-game-card {
    min-height: 236px;
  }

  .challenge-product .section-heading {
    display: block;
  }

  .challenge-product .section-heading p {
    margin-top: 8px;
    text-align: left;
  }
}

@media (prefers-reduced-motion: reduce) {
  .challenge-product .challenge-game-card {
    animation: none;
    transition: none;
  }
}
