/* ── SimpleProxy purchase page ── */

.hero { padding: 26px 0 10px; }

h1 {
  margin: 0;
  font-size: clamp(36px, 6vw, 62px);
  line-height: 0.98;
  letter-spacing: -0.04em;
  max-width: 760px;
}

.lead {
  margin: 18px 0 0;
  font-size: 18px;
  line-height: 1.65;
  color: var(--muted);
  max-width: 700px;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.meta-pill {
  padding: 10px 14px;
  border-radius: 999px;
  font-size: 14px;
  color: var(--muted);
  background: rgba(116, 135, 155, 0.08);
  border: 1px solid var(--line);
}

section.block { padding: 28px 0; }

/* ── billing toggle ── */
.billing-switch {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px;
  border-radius: 999px;
  background: rgba(116, 135, 155, 0.08);
  border: 1px solid var(--line);
  margin-bottom: 24px;
}

.switch-option {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 9px 16px;
  border-radius: 999px;
  cursor: pointer;
  font: inherit;
  font-weight: 600;
  font-size: 14px;
  transition: background 0.15s, color 0.15s;
}

.switch-option.active {
  background: var(--blue);
  color: var(--text);
  font-weight: 700;
}

/* ── tariff cards ── */
.tariff-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.tariff-card {
  border-radius: 20px;
  padding: 22px;
  cursor: pointer;
  background: var(--panel);
  border: 1px solid var(--line);
  transition: transform 0.22s ease, border-color 0.22s ease;
  position: relative;
  overflow: hidden;
}

.tariff-card:hover {
  border-color: rgba(116, 135, 155, 0.60);
  transform: translateY(-4px);
}

.tariff-card.is-active {
  border-color: rgba(116, 213, 138, 0.45);
  background: rgba(116, 213, 138, 0.05);
  transform: translateY(-4px);
}

.tariff-badge {
  display: inline-flex;
  align-items: center;
  padding: 7px 12px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  background: rgba(116, 135, 155, 0.10);
  border: 1px solid var(--line);
  margin-bottom: 14px;
}

.tariff-price {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 8px;
}

.tariff-price strong {
  font-size: 36px;
  line-height: 1;
  letter-spacing: -0.04em;
}

.tariff-price span {
  font-size: 14px;
  color: var(--muted);
}

.tariff-year {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 14px;
  min-height: 16px;
  opacity: 0.75;
}

.tariff-title {
  margin: 0 0 10px;
  font-size: 22px;
  letter-spacing: -0.03em;
}

.tariff-note {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
  font-size: 15px;
}

/* ── checkout form ── */
.pay-row {
  display: flex;
  justify-content: center;
  margin-top: 28px;
}

.checkout-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: end;
  margin-top: 24px;
  padding: 18px;
  border-radius: 20px;
  background: rgba(116, 135, 155, 0.06);
  border: 1px solid var(--line);
}

.field label { color: var(--muted); }

.checkout-account {
  display: none;
  align-self: end;
  min-height: 54px;
  padding: 9px 18px;
  border-radius: 16px;
  background: rgba(116, 135, 155, 0.08);
  border: 1px solid var(--line);
}

.checkout-account span {
  display: block;
  margin-bottom: 2px;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
}

.checkout-account strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text);
  font-size: 15px;
}

.checkout-form.has-session .email-field  { display: none; }
.checkout-form.has-session .checkout-account { display: block; }

.form-note,
.form-error { grid-column: 1 / -1; margin: 0; font-size: 13px; line-height: 1.55; }

.offer-consent {
  grid-column: 1 / -1;
  display: inline-flex;
  align-items: flex-start;
  gap: 10px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.offer-consent.has-error {
  border: 1px solid rgba(255, 99, 89, 0.60);
  border-radius: 14px;
  padding: 10px 12px;
  background: rgba(255, 99, 89, 0.08);
}

.offer-consent input {
  margin-top: 2px;
  width: 16px;
  height: 16px;
  min-height: 16px;
  padding: 0;
  border-radius: 3px;
  accent-color: var(--blue);
}

.offer-consent a { color: var(--text); text-underline-offset: 2px; }

.field.has-error label  { color: #ff7070; }

.field.has-error input  {
  border-color: rgba(255, 99, 89, 0.80);
  box-shadow: 0 0 0 4px rgba(255, 99, 89, 0.14);
}

.form-note  { color: var(--muted); }
.form-error { color: #ff9090; display: none; }

@media (max-width: 1024px) {
  .tariff-grid,
  .apps-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 720px) {
  .lead, .app-link p { font-size: 14px; line-height: 1.55; }
  .tariff-grid, .apps-grid, .checkout-form { grid-template-columns: 1fr; }
  .panel, .tariff-card { padding: 18px; border-radius: 20px; }
  .tariff-price strong { font-size: 30px; }
}

.tariff-card[data-plan="trial"] {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}

.tariff-card[data-plan="trial"] .tariff-badge { margin-bottom: 0; }
.tariff-card[data-plan="trial"] .tariff-price { margin-bottom: 0; order: -1; }
.tariff-card[data-plan="trial"] .tariff-title { margin: 0; }
.tariff-card[data-plan="trial"] .tariff-year  { margin-bottom: 0; opacity: 1; min-height: 0; }
.tariff-card[data-plan="trial"] .tariff-note  { flex: 1 1 200px; margin: 0; font-size: 14px; }

#payButton {
  background: rgba(116, 135, 155, 0.08);
  border: 1px solid var(--line);
  color: var(--text);
  opacity: 0.55;
  transition: background 0.2s ease, border-color 0.2s ease, opacity 0.2s ease, transform 0.18s ease;
}

.checkout-form:has(#offerConsentInput:checked) #payButton {
  background: var(--green);
  border-color: transparent;
  color: #0e1a2b;
  opacity: 1;
}

#sentView {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 24px;
  padding: 80px 0;
}

#sentView[hidden] { display: none; }
