.test-game-page {
  background: var(--surface-page);
}

.test-game-page .section {
  position: relative;
}

.test-game-hero {
  position: relative;
  overflow: hidden;
  padding-block: clamp(3rem, 7vw, 6rem);
  background: var(--surface-section);
}

.test-game-hero::before {
  position: absolute;
  inset: 0 auto auto 0;
  width: min(58rem, 72vw);
  height: 100%;
  background: radial-gradient(circle at 24% 38%, rgba(255, 181, 71, 0.12), transparent 63%);
  content: "";
  pointer-events: none;
}

.test-game-hero__grid {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  align-items: center;
  gap: clamp(2rem, 4vw, 4rem);
}

.test-game-hero__copy,
.test-game-hero__media,
.test-game-flow__steps,
.test-game-flow__media,
.test-game-upgrades__media,
.test-game-upgrades__rules,
.test-game-verdict__column,
.test-game-reading__card,
.test-game-scope__card,
.test-game-food__panel,
.test-game-progress__card {
  min-width: 0;
}

.test-game-hero__copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  width: 100%;
  max-width: 35rem;
  gap: var(--space-4);
}

.test-game-hero__copy > * {
  margin: 0;
}

.test-game-hero__lead {
  max-width: 32.5rem;
  color: var(--color-cream-300);
  font-size: var(--text-lg);
  line-height: 1.5;
}

.test-game-hero__actions {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  width: 100%;
  gap: var(--space-2);
}

.test-game-hero__store-note {
  margin: 0;
  color: var(--color-cream-300);
  font-size: var(--text-sm);
  line-height: var(--line-sm);
}

.test-game-hero__anchor {
  display: inline-flex;
  min-height: 2.75rem;
  align-items: center;
  font-weight: 700;
}

.test-game-hero__game-id {
  overflow-wrap: anywhere;
}

.test-game-hero__media {
  position: relative;
  width: 100%;
  margin: 0;
}

.test-game-hero__media::after,
.test-game-flow__media::after,
.test-game-upgrades__media::after {
  position: absolute;
  inset: 0;
  border-radius: var(--radius-md);
  background: rgba(13, 15, 18, 0.12);
  content: "";
  pointer-events: none;
}

.test-game-hero__media img {
  width: 100%;
  max-width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.test-game-hero__media figcaption,
.test-game-flow__media figcaption,
.test-game-upgrades__media figcaption {
  margin-block: var(--space-2) 0;
}

.test-game-scope__intro,
.test-game-flow__intro,
.test-game-food__intro,
.test-game-upgrades__intro,
.test-game-progress__intro,
.test-game-verdict__intro,
.test-game-tips__intro,
.test-game-reading__intro {
  width: 100%;
}

.test-game-scope__intro {
  max-width: 42.5rem;
}

.test-game-scope__grid,
.test-game-progress__grid,
.test-game-reading__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-5);
  margin-top: var(--space-6);
}

.test-game-scope__card,
.test-game-progress__card,
.test-game-reading__card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  width: 100%;
  min-width: 0;
  height: 100%;
  padding: var(--space-5);
  gap: var(--space-3);
}

.test-game-scope__card > *,
.test-game-progress__card > *,
.test-game-reading__card > * {
  margin: 0;
}

.test-game-scope__number,
.test-game-progress__number {
  color: var(--color-amber-400);
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 800;
  line-height: 1;
}

.test-game-scope__number::after {
  display: block;
  width: 2.5rem;
  height: 2px;
  margin-top: var(--space-3);
  background: var(--color-amber-400);
  content: "";
}

.test-game-scope__card p,
.test-game-progress__card p,
.test-game-reading__card p {
  color: var(--color-cream-300);
}

.test-game-flow__intro {
  max-width: 40.625rem;
}

.test-game-flow__grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  align-items: center;
  gap: clamp(2rem, 5vw, 5rem);
  margin-top: var(--space-6);
}

.test-game-flow__steps {
  display: flex;
  flex-direction: column;
  width: 100%;
  gap: var(--space-6);
}

.test-game-step,
.test-game-rule,
.test-game-tip {
  display: grid;
  align-items: start;
  width: 100%;
  min-width: 0;
  gap: var(--space-3);
}

.test-game-step {
  grid-template-columns: auto minmax(0, 1fr);
}

.test-game-step__number,
.test-game-rule__number,
.test-game-tip__number {
  display: inline-flex;
  width: 2rem;
  min-width: 2rem;
  height: 2rem;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(255, 181, 71, 0.14);
  color: var(--color-amber-400);
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 800;
  line-height: 1;
}

.test-game-step__body {
  width: 100%;
  min-width: 0;
  max-width: 31.875rem;
}

.test-game-step__body h3,
.test-game-rule h3,
.test-game-tip h3 {
  margin-bottom: var(--space-2);
}

.test-game-step__body p,
.test-game-rule p,
.test-game-tip p {
  color: var(--color-cream-300);
}

.test-game-flow__media,
.test-game-upgrades__media {
  position: relative;
  width: 100%;
  margin: 0;
}

.test-game-flow__media img {
  width: 100%;
  max-width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
}

.test-game-food__intro {
  max-width: 38.75rem;
}

.test-game-food__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-5);
  margin-top: var(--space-6);
}

.test-game-food__panel {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  width: 100%;
  min-width: 0;
  padding: var(--space-5);
  gap: var(--space-3);
}

.test-game-food__panel > * {
  margin: 0;
}

.test-game-food__panel p {
  max-width: 26.25rem;
  color: var(--color-cream-300);
}

.test-game-food__panel--burger {
  border-top-color: var(--color-amber-400);
}

.test-game-food__panel--dessert {
  border-top-color: var(--color-tomato-500);
}

.test-game-food__pressure {
  color: var(--color-tomato-500);
  font-weight: 700;
}

.test-game-food__alert {
  width: min(100%, 47.5rem);
  margin: var(--space-6) 0 0;
}

.test-game-food__alert h3 {
  margin-bottom: var(--space-2);
}

.test-game-upgrades__intro {
  max-width: 38.125rem;
}

.test-game-upgrades__grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  align-items: start;
  gap: clamp(2rem, 5vw, 5rem);
  margin-top: var(--space-6);
}

.test-game-upgrades__media img {
  width: 100%;
  max-width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.test-game-upgrades__rules {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 31.25rem;
  gap: var(--space-5);
}

.test-game-rule {
  grid-template-columns: auto minmax(0, 1fr);
  padding-bottom: var(--space-5);
  border-bottom: var(--border-default);
}

.test-game-rule:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.test-game-progress__intro {
  max-width: 39.375rem;
}

.test-game-progress__grid {
  position: relative;
}

.test-game-progress__card {
  position: relative;
}

.test-game-progress__card:not(:last-child)::after {
  position: absolute;
  top: 2rem;
  right: calc(var(--space-5) * -1);
  width: var(--space-5);
  height: 1px;
  background: var(--color-line-subtle);
  content: "";
}

.test-game-verdict__intro {
  max-width: 38.75rem;
}

.test-game-verdict__panel {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  width: 100%;
  margin-top: var(--space-6);
  padding: 0;
  overflow: hidden;
}

.test-game-verdict__column {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  width: 100%;
  padding: var(--space-5);
  gap: var(--space-3);
}

.test-game-verdict__column > * {
  margin: 0;
}

.test-game-verdict__column p:last-child {
  max-width: 27.5rem;
  color: var(--color-cream-300);
}

.test-game-verdict__column--positive {
  border-right: var(--border-default);
}

.test-game-verdict__column--positive .eyebrow {
  color: var(--color-sage-400);
}

.test-game-verdict__column--consider .eyebrow {
  color: var(--color-tomato-500);
}

.test-game-verdict__summary {
  width: min(100%, 47.5rem);
  margin-top: var(--space-6);
}

.test-game-verdict__summary h3 {
  margin-bottom: var(--space-2);
}

.test-game-verdict__summary p:last-child {
  color: var(--color-cream-300);
}

.test-game-tips__intro {
  max-width: 37.5rem;
}

.test-game-tips__list {
  display: flex;
  flex-direction: column;
  width: min(100%, 38.75rem);
  margin-top: var(--space-6);
  gap: var(--space-5);
}

.test-game-tip {
  grid-template-columns: auto minmax(0, 1fr);
  padding-bottom: var(--space-5);
  border-bottom: var(--border-default);
}

.test-game-tip:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.test-game-reading__intro {
  max-width: 38.75rem;
}

.test-game-reading__card h3 a {
  color: var(--color-cream-50);
  text-decoration-color: transparent;
}

.test-game-reading__card h3 a:hover,
.test-game-reading__card h3 a:focus-visible {
  color: var(--color-amber-400);
  text-decoration-color: currentColor;
}

.test-game-reading__link {
  display: inline-flex;
  min-height: 2.75rem;
  align-items: center;
  margin-top: auto;
  font-weight: 700;
}

.test-game-final {
  padding-top: clamp(var(--space-7), 7vw, var(--space-10));
}

.test-game-final__panel {
  width: min(100%, 62.5rem);
  margin-inline: auto;
  border-top: 3px solid var(--color-amber-400);
  padding: clamp(var(--space-5), 4vw, var(--space-7));
}

.test-game-final__content {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 36.25rem;
  margin-inline: auto;
  text-align: center;
  gap: var(--space-4);
}

.test-game-final__content > * {
  margin: 0;
}

.test-game-final__content > p {
  color: var(--color-cream-300);
}

.test-game-final__button {
  width: auto;
}

.test-game-play-link.test-game-play-link--pulse {
  animation: test-game-play-pulse 700ms ease-out 2;
}

@keyframes test-game-play-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(52, 168, 83, 0); }
  50% { box-shadow: 0 0 0 7px rgba(52, 168, 83, 0.22); }
}

@media (max-width: 61.24rem) {
  .test-game-hero__grid {
    grid-template-columns: minmax(0, 45fr) minmax(0, 55fr);
    gap: var(--space-5);
  }

  .test-game-flow__grid {
    grid-template-columns: minmax(0, 45fr) minmax(0, 55fr);
    gap: var(--space-5);
  }
}

@media (max-width: 57.49rem) {
  .test-game-scope__grid,
  .test-game-progress__grid,
  .test-game-reading__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .test-game-scope__card:nth-child(3),
  .test-game-progress__card:nth-child(3),
  .test-game-reading__card:nth-child(3) {
    grid-column: 1 / -1;
  }

  .test-game-progress__card:nth-child(2)::after {
    display: none;
  }
}

@media (max-width: 57.49rem) {
  .test-game-upgrades__grid {
    grid-template-columns: minmax(0, 45fr) minmax(0, 55fr);
    gap: var(--space-5);
  }
}

@media (max-width: 49.99rem) {
  .test-game-flow__grid,
  .test-game-upgrades__grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .test-game-flow__media,
  .test-game-upgrades__media {
    max-width: 40rem;
  }

  .test-game-flow__media {
    grid-row: 2;
  }

  .test-game-upgrades__rules {
    max-width: 31.25rem;
  }
}

@media (max-width: 47.49rem) {
  .test-game-hero {
    padding-block: var(--space-7);
  }

  .test-game-hero__grid,
  .test-game-scope__grid,
  .test-game-flow__grid,
  .test-game-food__grid,
  .test-game-upgrades__grid,
  .test-game-progress__grid,
  .test-game-verdict__panel,
  .test-game-reading__grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .test-game-hero__copy {
    max-width: none;
  }

  .test-game-hero__lead {
    max-width: 32.5rem;
  }

  .test-game-hero__actions,
  .test-game-hero__actions .button {
    width: 100%;
  }

  .test-game-hero__store-note,
  .test-game-hero__anchor {
    align-self: flex-start;
  }

  .test-game-scope__card:nth-child(3),
  .test-game-progress__card:nth-child(3),
  .test-game-reading__card:nth-child(3) {
    grid-column: auto;
  }

  .test-game-flow__media {
    grid-row: auto;
  }

  .test-game-food__alert,
  .test-game-verdict__summary,
  .test-game-tips__list {
    width: 100%;
  }

  .test-game-progress__card::after {
    display: none;
  }

  .test-game-verdict__column--positive {
    border-right: 0;
    border-bottom: var(--border-default);
  }

  .test-game-final__button {
    width: 100%;
  }
}

@media (max-width: 24.36rem) {
  .test-game-step,
  .test-game-rule,
  .test-game-tip {
    grid-template-columns: minmax(0, 1fr);
  }

  .test-game-step__number,
  .test-game-rule__number,
  .test-game-tip__number {
    grid-column: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .test-game-play-link.test-game-play-link--pulse {
    animation: none;
  }
}
