.purchase {
  padding: clamp(56px, 8vw, 104px) 0;
}

.purchase-intro {
  max-width: 650px;
  margin: 0 auto clamp(32px, 5vw, 56px);
  text-align: center;
}

.purchase-intro > p:last-child {
  max-width: 47ch;
  margin: 16px auto 0;
}

.purchase-intro .eyebrow {
  color: var(--body);
  font-size: 0.875rem;
}

.purchase-plans {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px clamp(20px, 4vw, 48px);
}

.purchase-plan {
  display: grid;
  grid-template-rows: subgrid;
  grid-row: span 4;
  justify-items: center;
  align-items: start;
  text-align: center;
}

.purchase-plan-image {
  display: grid;
  align-items: end;
  justify-items: center;
  width: 100%;
  max-width: 300px;
  aspect-ratio: 798 / 657;
  margin-bottom: 6px;
}

/* Scale the original compositions by the measured width of the front envelope. */
.purchase-plan-image img {
  height: auto;
  width: 100%;
}

.purchase-plan-image img[src$="/one-edition.png"] {
  width: 67.3%;
}

.purchase-plan-image img[src$="/three-editions.png"] {
  width: 81.2%;
}

.purchase-plan h3 {
  text-wrap: balance;
}

.purchase-plan-pricing {
  display: grid;
  align-content: start;
  justify-items: center;
  gap: 3px;
}

.purchase-plan p {
  margin: 0;
}

.purchase-plan-terms {
  font-size: 0.875rem;
}

.purchase-plan-description {
  max-width: 29ch;
}

.purchase .purchase-price {
  color: var(--ink);
  font: 400 30px/1.25 Prata, Georgia, serif;
}

.purchase-price span {
  font: 400 15px/1.5 'DM Sans', sans-serif;
  white-space: nowrap;
}

.purchase-launch a {
  text-underline-offset: 0.2em;
}

.purchase-launch {
  margin-top: clamp(28px, 4vw, 48px);
  text-align: center;
}

.purchase-launch > p {
  margin: 0 0 12px;
}

@media (max-width: 700px) {
  .purchase-plans {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .purchase-plan {
    grid-row: auto;
    grid-template-rows: auto;
    row-gap: 8px;
  }
}

.purchase-extras {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(36px, 6vw, 72px) clamp(20px, 4vw, 48px);
  margin-top: clamp(48px, 7vw, 88px);
}

.purchase-extra {
  text-align: center;
}

.purchase-extra-image {
  display: grid;
  grid-template: minmax(0, 1fr) / minmax(0, 1fr);
  place-items: center;
  aspect-ratio: 3 / 2;
}

.purchase-extra-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.purchase-extra-copy {
  max-width: 44ch;
  margin: 20px auto 0;
}

.purchase-extra-copy h3 {
  text-wrap: balance;
}

.purchase-extra-copy p {
  margin: 12px 0 0;
}

.purchase-extra-copy .button {
  margin-top: 20px;
}

@media (max-width: 700px) {
  .purchase-extras {
    grid-template-columns: 1fr;
  }
}

.purchase-extra-copy .purchase-price {
  margin-top: 12px;
}

.purchase-extra-copy .purchase-price + p {
  margin-top: 4px;
}

.purchase-checkout:not([hidden]) {
  margin-top: 14px;
}

.purchase-checkout [role="status"]:empty {
  margin: 0;
}

/* Keep the three edition cards aligned when their checkout links are enabled. */
.purchase-plans:has(.purchase-checkout:not([hidden])) .purchase-plan {
  grid-row: span 5;
}

@media (max-width: 700px) {
  .purchase-plans:has(.purchase-checkout:not([hidden])) .purchase-plan {
    grid-row: auto;
  }
}
