.section {
  border-block: 1px solid var(--border-standard);
  background:
    radial-gradient(
      circle at 50% 0%,
      color-mix(in srgb, var(--status-info-surface) 74%, transparent),
      transparent 42%
    ),
    var(--surface-page);
}

.header {
  max-inline-size: 54rem;
  margin-inline: auto;
}

.controls {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(16rem, 0.5fr);
  gap: var(--space-5);
  padding: var(--space-5);
  border: 1px solid var(--border-standard);
  border-radius: var(--radius-lg);
  background: var(--surface-elevated);
  box-shadow: var(--shadow-subtle);
}

.controlGroup {
  min-inline-size: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.controlGroup legend {
  margin-block-end: var(--space-3);
  color: var(--text-primary);
  font-size: var(--type-label-size);
  font-weight: 800;
}

.optionGrid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--space-2);
}

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

.option {
  position: relative;
  min-inline-size: 0;
}

.option input {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  opacity: 0;
  pointer-events: none;
}

.option label {
  display: flex;
  min-block-size: var(--size-touch-min);
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-3);
  border: 1px solid var(--border-standard);
  border-radius: var(--radius-sm);
  background: var(--surface-primary);
  color: var(--text-secondary);
  font-size: var(--type-label-size);
  font-weight: 700;
  text-align: center;
  cursor: pointer;
  transition:
    border-color var(--duration-fast) var(--easing-productive),
    background var(--duration-fast) var(--easing-productive),
    color var(--duration-fast) var(--easing-productive);
}

.option input:checked + label {
  border-color: var(--interactive-primary);
  background: var(--status-info-surface);
  color: var(--text-primary);
}

.option input:focus-visible + label {
  outline: 3px solid var(--focus-ring);
  outline-offset: 2px;
}

.savings {
  display: inline-flex;
  padding: 0.12rem 0.42rem;
  border-radius: var(--radius-pill);
  background: var(--status-success-surface);
  color: var(--status-success-text);
  font-size: 0.72rem;
  font-weight: 800;
  white-space: nowrap;
}

.planGrid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: stretch;
  gap: var(--space-5);
}

.planCard {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
  min-inline-size: 0;
  padding: clamp(var(--space-5), 3vw, var(--space-8));
  border: 1px solid var(--border-standard);
  border-radius: var(--radius-lg);
  background: var(--surface-elevated);
  box-shadow: var(--shadow-subtle);
}

.recommendedCard {
  border-color: var(--interactive-primary);
  box-shadow: var(--shadow-card);
  transform: translateY(-0.35rem);
}

.recommendedBadge {
  position: absolute;
  inset-block-start: 0;
  inset-inline-end: var(--space-5);
  padding: var(--space-2) var(--space-3);
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  background: var(--interactive-primary);
  color: var(--text-inverse);
  font-size: var(--type-caption-size);
  font-weight: 800;
}

.planHeader {
  display: grid;
  gap: var(--space-3);
  padding-block-start: var(--space-2);
}

.planName {
  margin: 0;
  color: var(--text-primary);
  font-size: var(--type-heading-3-size);
  line-height: var(--line-heading);
}

.audience {
  min-block-size: 5.2rem;
  margin: 0;
  color: var(--text-secondary);
}

.priceBlock {
  display: grid;
  align-content: start;
  gap: var(--space-1);
  min-block-size: 5.75rem;
}

.priceLabel,
.priceMeta {
  margin: 0;
  color: var(--text-secondary);
  font-size: var(--type-caption-size);
}

.priceLine {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--space-2);
  color: var(--text-primary);
}

.price {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 850;
  line-height: 1;
  letter-spacing: -0.035em;
}

.pendingPrice,
.customPrice {
  max-inline-size: 16ch;
  color: var(--text-primary);
  font-size: 1.25rem;
  font-weight: 800;
  line-height: 1.25;
}

.featureList,
.basisList,
.moduleList,
.assuranceList {
  margin: 0;
  padding: 0;
  list-style: none;
}

.featureList {
  display: grid;
  gap: var(--space-3);
  flex: 1;
}

.featureList li,
.basisList li,
.assuranceList li {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: var(--space-3);
}

.featureList svg,
.basisList svg,
.assuranceList svg {
  margin-block-start: 0.22rem;
  color: var(--interactive-primary);
}

.planAction {
  inline-size: 100%;
  margin-block-start: auto;
}

.detailsGrid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-5);
}

.detailCard {
  display: grid;
  gap: var(--space-4);
  padding: var(--space-6);
  border: 1px solid var(--border-standard);
  border-radius: var(--radius-md);
  background: var(--surface-primary);
}

.detailCard h3 {
  margin: 0;
  color: var(--text-primary);
  font-size: 1.125rem;
}

.basisList {
  display: grid;
  gap: var(--space-3);
}

.moduleList {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.moduleList li {
  padding: var(--space-2) var(--space-3);
  border: 1px solid var(--border-standard);
  border-radius: var(--radius-pill);
  background: var(--surface-muted);
  color: var(--text-secondary);
  font-size: var(--type-label-size);
}

.assuranceRow {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: var(--space-6);
  padding: var(--space-5) var(--space-6);
  border: 1px solid var(--border-standard);
  border-radius: var(--radius-md);
  background: var(--surface-strong);
}

.assuranceList {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3) var(--space-6);
}

.assuranceList li {
  color: var(--text-secondary);
  font-size: var(--type-label-size);
  font-weight: 700;
}

.compareBlock {
  display: grid;
  justify-items: end;
  gap: var(--space-2);
  text-align: end;
}

.compareBlock p,
.configurationNote {
  margin: 0;
  color: var(--text-secondary);
}

.configurationNote {
  max-inline-size: 80ch;
  margin-inline: auto;
  font-size: var(--type-caption-size);
  text-align: center;
}

@media (max-width: 1023px) {
  .controls,
  .assuranceRow {
    grid-template-columns: 1fr;
  }

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

  .planCard:last-child {
    grid-column: 1 / -1;
  }

  .compareBlock {
    justify-items: start;
    text-align: start;
  }
}

@media (max-width: 767px) {
  .optionGrid,
  .planGrid,
  .detailsGrid {
    grid-template-columns: 1fr;
  }

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

  .recommendedCard {
    order: -1;
    transform: none;
  }

  .planCard:last-child {
    grid-column: auto;
  }

  .audience,
  .priceBlock {
    min-block-size: auto;
  }

  .assuranceList {
    display: grid;
  }
}

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

  .recommendedCard {
    transform: none;
  }
}

@media (forced-colors: active) {
  .recommendedCard,
  .option input:checked + label {
    border-width: 2px;
  }
}
