.affiliate-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  padding: 40px;
  border: 1px solid var(--line);
  border-radius: 25px;
  background: linear-gradient(135deg, rgba(79, 70, 229, .2), rgba(219, 39, 119, .14));
}

.pricing-shell {
  width: min(1200px, calc(100vw - 40px));
  margin: 34px auto 0;
  padding: 38px;
  border-radius: 36px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background:
    radial-gradient(circle at top right, rgba(249, 115, 22, 0.14), transparent 28%),
    radial-gradient(circle at top left, rgba(99, 102, 241, 0.14), transparent 30%),
    linear-gradient(180deg, rgba(11, 20, 38, 0.98), rgba(8, 15, 31, 0.98));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 24px 70px rgba(0, 0, 0, 0.28);
}

.pricing-switcher {
  display: flex;
  justify-content: center;
  gap: 0;
  margin: 0 auto 30px;
  flex-wrap: nowrap;
  padding: 6px;
  border-radius: 18px;
  background: linear-gradient(135deg, #ff8a1c, #ff6b00);
  border: 1px solid rgba(255, 123, 0, 0.45);
  width: fit-content;
  box-shadow: 0 14px 34px rgba(255, 123, 0, 0.22);
}

.pricing-switch {
  appearance: none;
  border: 0;
  background: transparent;
  color: rgba(255,255,255,.88);
  border-radius: 14px;
  padding: 14px 18px;
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  line-height: 1;
  transition: .22s ease;
  white-space: nowrap;
}

.pricing-switch:hover {
  background: rgba(255,255,255,.14);
  color: #fff;
}

.pricing-switch.active {
  background: #ffffff;
  color: #171717;
  box-shadow:
    0 8px 20px rgba(255, 255, 255, 0.28),
    inset 0 1px 0 rgba(255,255,255,.7);
}

.pricing-panel {
  display: none;
}

.pricing-panel.active {
  display: block;
}

.pricing-panel-head {
  text-align: center;
  max-width: 760px;
  margin: 0 auto 26px;
}

.pricing-panel-head h3 {
  margin: 0;
  color: #f8fafc;
  font-size: clamp(22px, 3vw, 36px);
  letter-spacing: -0.9px;
}

.pricing-panel-head p:last-child {
  margin: 12px 0 0;
  color: #94a3b8;
  font-size: 15px;
}

.pricing-kicker {
  margin: 0 0 8px;
  color: #f97316;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 1.4px;
  text-transform: uppercase;
}

.pricing-brief {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  margin: 0 auto 30px;
  border: 1px solid rgba(249, 115, 22, 0.36);
  border-radius: 18px;
  overflow: hidden;
  background: rgba(249, 115, 22, 0.06);
}

.pricing-brief span {
  padding: 16px 18px;
  font-size: 14px;
  line-height: 1.55;
  color: #fed7aa;
  border-right: 1px solid rgba(249, 115, 22, 0.18);
  text-align: center;
}

.pricing-brief span:last-child {
  border-right: 0;
}

.pricing-panel-grid {
  display: grid;
  gap: 18px;
  align-items: stretch;
}

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

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

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

.pricing-shell .pricing-offer {
  display: flex;
  min-height: 540px;
  flex-direction: column;
  padding: 30px;
  background:
    linear-gradient(180deg, rgba(17, 24, 39, 0.96), rgba(15, 23, 42, 0.96));
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.03),
    0 18px 34px rgba(0, 0, 0, 0.18);
  transition: transform .24s ease, border-color .24s ease, box-shadow .24s ease;
}

.pricing-shell .pricing-offer:hover {
  transform: translateY(-4px);
  border-color: rgba(249, 115, 22, 0.45);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.04),
    0 24px 50px rgba(0, 0, 0, 0.24);
}

.pricing-shell .pricing-offer ul {
  flex: 1;
  list-style: none;
  padding: 0;
  margin: 24px 0 0;
}

.pricing-shell .pricing-offer .button {
  margin-top: 24px;
}

.trial-badge {
  background: #16a34a;
}

.pricing-shell .trial-card {
  border-color: rgba(34, 197, 94, .45);
  background: linear-gradient(180deg, rgba(7, 28, 24, 0.96), rgba(9, 35, 31, 0.96));
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.03),
    0 18px 34px rgba(0, 0, 0, 0.18),
    0 0 0 1px rgba(34, 197, 94, .08);
}

.pricing-shell .pricing-offer.featured {
  border-color: rgba(249, 115, 22, .78);
  background:
    radial-gradient(circle at top right, rgba(99, 102, 241, 0.12), transparent 38%),
    linear-gradient(180deg, rgba(24, 31, 60, 0.98), rgba(20, 27, 52, 0.98));
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.04),
    0 22px 46px rgba(79, 70, 229, .14);
}

.pricing-shell .pricing-offer.featured:hover {
  border-color: rgba(249, 115, 22, .95);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.05),
    0 28px 56px rgba(79, 70, 229, .18);
}

.pricing-shell .pricing-offer li {
  padding: 10px 0;
  border-bottom-color: rgba(148, 163, 184, 0.18);
  color: #cbd5e1;
  border-bottom-style: solid;
  border-bottom-width: 1px;
}

.pricing-shell .pricing-offer .price {
  margin: 20px 0 8px;
  font-size: 32px;
  font-weight: 900;
  letter-spacing: -0.8px;
  color: #ffffff;
}

.pricing-shell .pricing-offer .button {
  border-radius: 18px;
  min-height: 52px;
  box-shadow: 0 16px 26px rgba(99, 102, 241, 0.2);
}

.pricing-shell .pricing-offer h3 {
  color: #ffffff;
  font-size: 22px;
  margin: 10px 0 0;
}

.pricing-shell .plan {
  color: #f97316;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 1.4px;
  text-transform: uppercase;
}

.pricing-shell .badge {
  background: linear-gradient(135deg, #f97316, #fb7185);
}

.affiliate-box h2 {
  font-size: clamp(28px, 4vw, 43px);
}

.affiliate-box p {
  max-width: 730px;
  color: var(--muted);
}

.affiliate-box .button {
  flex-shrink: 0 !important;
  white-space: nowrap !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
}

@media (max-width: 820px) {
  .affiliate-box {
    display: block;
  }

  .affiliate-box .button {
    margin-top: 18px;
    white-space: nowrap !important;
  }

  .pricing-shell {
    padding: 20px;
    border-radius: 24px;
  }

  .pricing-brief {
    grid-template-columns: 1fr;
  }

  .pricing-brief span {
    border-right: 0;
    border-bottom: 1px solid rgba(249, 115, 22, 0.18);
  }

  .pricing-brief span:last-child {
    border-bottom: 0;
  }

  .pricing-shell .pricing-panel-grid {
    grid-template-columns: 1fr !important;
  }

  .pricing-shell .pricing-offer {
    min-height: auto;
  }

  .pricing-switcher {
    justify-content: stretch;
    width: 100%;
    border-radius: 22px;
    flex-wrap: wrap;
  }

  .pricing-switch {
    width: 100%;
    text-align: center;
  }
}

@media (min-width: 821px) and (max-width: 1180px) {
  .software-grid,
  .rental-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .business-grid {
    grid-template-columns: 1fr;
  }
}
