/* ----- Wizard page shell ----- */
.page-wizard {
  background:
    radial-gradient(ellipse 90% 60% at 50% -10%, rgba(37, 99, 235, 0.08), transparent 55%),
    linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
}

.page-wizard .site-header {
  background: rgba(255, 255, 255, 0.88);
  border-bottom-color: var(--gf-border-soft);
}

.wizard-main {
  width: 100%;
  max-width: min(1040px, 100%);
  margin: 0 auto;
  padding: clamp(2rem, 5vw, 3.25rem) var(--gf-section-x) 4.5rem;
  box-sizing: border-box;
  flex: 1;
}

/* ----- Progress stepper ----- */
.wizard-progress {
  list-style: none;
  margin: 0 0 1.75rem;
  padding: 0;
  display: flex;
  align-items: flex-start;
  gap: 0;
}

.wizard-step {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  position: relative;
  min-width: 0;
  text-align: center;
}

.wizard-step:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 1.05rem;
  left: calc(50% + 1.25rem);
  right: calc(-50% + 1.25rem);
  height: 2px;
  background: var(--gf-border-soft);
  z-index: 0;
}

.wizard-step.is-done:not(:last-child)::after {
  background: #86efac;
}

.wizard-step-indicator {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.125rem;
  height: 2.125rem;
  border-radius: 999px;
  border: 2px solid var(--gf-border-soft);
  background: #fff;
  color: var(--gf-text-subtle);
  font-size: var(--text-sm);
  font-weight: 700;
  transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.wizard-step-name {
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--gf-text-subtle);
  line-height: 1.2;
}

.wizard-step.is-active .wizard-step-indicator {
  border-color: var(--gf-primary);
  background: var(--gf-primary);
  color: #fff;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.wizard-step.is-active .wizard-step-name {
  color: var(--gf-text);
}

.wizard-step.is-done .wizard-step-indicator {
  border-color: #059669;
  background: #ecfdf5;
  color: #059669;
}

.wizard-step.is-done .wizard-step-name {
  color: #047857;
}

/* ----- Main card ----- */
.wizard-card {
  background: #fff;
  border: 1px solid var(--gf-border-soft);
  border-radius: var(--gf-radius-lg);
  padding: clamp(2rem, 4vw, 3rem);
  box-shadow:
    0 1px 2px rgba(15, 23, 42, 0.04),
    0 16px 48px rgba(15, 23, 42, 0.08);
}

.wizard-panel[hidden] {
  display: none !important;
}

.wizard-panel > h1 {
  margin: 0 0 0.5rem;
  font-size: var(--text-display);
  font-weight: 800;
  letter-spacing: -0.025em;
  color: var(--gf-text);
}

.wizard-panel > .signup-subtitle {
  margin: 0 0 2rem;
  padding-bottom: 1.75rem;
  border-bottom: 1px solid var(--gf-border);
  font-size: var(--text-base);
  line-height: 1.6;
  color: var(--gf-text-muted);
  max-width: 42rem;
}

.wizard-panel .signup-form {
  max-width: 36rem;
}

/* ----- Form polish (wizard only) ----- */
.page-wizard .form-field span:first-child {
  margin-bottom: 0.4rem;
  font-size: var(--text-sm);
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--gf-text-subtle);
}

.page-wizard .form-field input {
  padding: 0.7rem 0.95rem;
  font-size: var(--text-base);
  border: 1px solid var(--gf-border-soft);
  border-radius: 10px;
  background: #fff;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.page-wizard .form-field input:focus {
  border-color: var(--gf-primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.page-wizard .password-toggle {
  padding: 0.45rem 0.85rem;
  font-size: var(--text-sm);
  font-weight: 600;
  border-radius: 8px;
  border: 1px solid var(--gf-border-soft);
  background: var(--gf-surface);
  color: var(--gf-text-muted);
}

.page-wizard .password-toggle:hover {
  background: #fff;
  border-color: #cbd5e1;
  color: var(--gf-text);
}

.page-wizard .btn-primary {
  box-shadow: 0 1px 2px rgba(37, 99, 235, 0.2);
}

.page-wizard .btn-secondary {
  border-color: var(--gf-border-soft);
  color: var(--gf-text-muted);
}

.page-wizard .btn-secondary:hover {
  border-color: #cbd5e1;
  color: var(--gf-text);
  background: var(--gf-surface);
}

/* ----- Plan step ----- */
.plan-trial-wrap {
  margin: 0 0 2rem;
}

.plan-paid-section {
  padding-top: 2rem;
  border-top: 1px solid var(--gf-border);
}

.plan-complete-notice {
  margin: 0 0 1.25rem;
  padding: 1rem 1.15rem;
  border: 1px solid #bfdbfe;
  border-radius: var(--gf-radius-md);
  background: linear-gradient(180deg, #f8fbff 0%, #eff6ff 100%);
}

.plan-complete-notice p {
  margin: 0;
  font-size: var(--text-md);
  line-height: 1.55;
  color: #1e3a8a;
}

.complete-contact-card {
  margin-top: 0.5rem;
  padding: 1.75rem;
  border: 1px solid var(--gf-border-soft);
  border-radius: var(--gf-radius-lg);
  background: var(--gf-surface);
}

.complete-contact-summary {
  margin: 0 0 1rem;
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--gf-text);
}

.complete-contact-copy {
  margin: 0 0 1.5rem;
  font-size: var(--text-base);
  line-height: 1.6;
  color: var(--gf-text-muted);
  max-width: 40rem;
}

.complete-contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.complete-contact-email-line {
  margin-bottom: 1rem;
}

.complete-contact-email-line a {
  color: var(--gf-primary);
  font-weight: 600;
  text-decoration: none;
}

.complete-contact-email-line a:hover {
  text-decoration: underline;
}

.complete-contact-basic-hint {
  margin-bottom: 0;
  max-width: 40rem;
}

.plan-paid-label {
  margin: 0 0 1rem;
  font-size: var(--text-sm);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--gf-text-subtle);
}

.plan-tier-grid {
  display: grid;
  gap: 1.25rem;
  margin: 1.25rem 0 0;
  grid-template-columns: 1fr;
}

@media (min-width: 768px) {
  .plan-tier-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.plan-card {
  position: relative;
  border: 1px solid var(--gf-border-soft);
  border-radius: var(--gf-radius-lg);
  padding: 1.5rem 1.35rem 1.35rem;
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
  background: #fff;
  text-align: left;
  width: 100%;
  box-sizing: border-box;
  font-family: inherit;
}

.plan-card:hover {
  border-color: #c7d2fe;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
  transform: translateY(-1px);
}

.plan-card.is-selected {
  border-color: var(--gf-primary);
  box-shadow:
    0 0 0 1px var(--gf-primary),
    0 12px 32px rgba(37, 99, 235, 0.12);
  background: linear-gradient(180deg, #fff 0%, #f8fbff 100%);
}

.plan-card.is-selected::after {
  content: "";
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 1.25rem;
  height: 1.25rem;
  border-radius: 999px;
  background: var(--gf-primary)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='M3.5 8.5L6.5 11.5L12.5 4.5' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E")
    center / 0.75rem no-repeat;
}

.plan-card.is-selected::after {
  display: block;
  margin-bottom: 0.35rem;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--gf-text-subtle);
  letter-spacing: 0.02em;
}

.plan-card-title {
  margin: 0 0 0.75rem;
  font-size: var(--text-lg);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--gf-text);
}

.plan-card .plan-price {
  margin: 0 0 0.85rem;
  line-height: 1;
}

.plan-price-amount {
  font-size: var(--text-display);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--gf-text);
}

.plan-price-period {
  margin-left: 0.15rem;
  font-size: var(--text-md);
  font-weight: 600;
  color: var(--gf-text-muted);
}

.plan-card .plan-meta {
  margin: 0;
  font-size: var(--text-sm);
  color: var(--gf-text-subtle);
  line-height: 1.45;
}

.plan-card-features {
  list-style: none;
  margin: 0;
  padding: 0;
}

.plan-card-features li {
  position: relative;
  padding-left: 1.35rem;
  font-size: var(--text-md);
  color: var(--gf-text-muted);
  line-height: 1.5;
}

.plan-card-features li + li {
  margin-top: 0.45rem;
}

.plan-card-features li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.45rem;
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 999px;
  background: #86efac;
  box-shadow: 0 0 0 3px #ecfdf5;
}

.plan-card-trial {
  padding-top: 1.35rem;
}

.plan-card-trial.is-selected {
  border-color: #059669;
  box-shadow:
    0 0 0 1px #059669,
    0 12px 32px rgba(5, 150, 105, 0.1);
  background: linear-gradient(180deg, #fff 0%, #f0fdf4 100%);
}

.plan-card-trial.is-selected::after {
  background-color: #059669;
}

.checkout-panel {
  margin-top: 0.5rem;
  padding: 1.5rem;
  border: 1px solid var(--gf-border-soft);
  border-radius: var(--gf-radius-md);
  background: var(--gf-surface);
}

#checkout-container {
  min-height: 420px;
}

.wizard-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--gf-border);
}

.wizard-success-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3.5rem;
  height: 3.5rem;
  margin-bottom: 1rem;
  border-radius: 999px;
  background: #ecfdf5;
  color: #059669;
  font-size: 1.5rem;
  font-weight: 700;
}

.wizard-success-icon span {
  line-height: 1;
}

.wizard-countdown {
  font-size: var(--text-md);
  color: var(--gf-text-muted);
  margin-top: 1rem;
}

.package-toggle-wrap {
  margin: 0;
}

.package-toggle {
  display: inline-flex;
  padding: 0.3rem;
  border: 1px solid var(--gf-border-soft);
  border-radius: 999px;
  background: var(--gf-surface);
  gap: 0.25rem;
}

.package-toggle-btn {
  border: none;
  background: transparent;
  padding: 0.55rem 1.15rem;
  font-size: var(--text-md);
  font-weight: 600;
  cursor: pointer;
  color: var(--gf-text-muted);
  border-radius: 999px;
  font-family: inherit;
  transition: background 0.15s ease, color 0.15s ease;
}

.package-toggle-btn.is-active {
  background: var(--gf-primary);
  color: #fff;
  box-shadow: 0 1px 3px rgba(37, 99, 235, 0.25);
}

.package-toggle-btn:focus-visible {
  outline: 2px solid var(--gf-primary);
  outline-offset: 2px;
}

/* ----- Email verification ----- */
.verification-form {
  margin-top: 0;
}

.verification-code-field {
  margin-bottom: 0.75rem;
}

.verification-code-field .field-label {
  display: block;
  margin-bottom: 0.65rem;
  font-size: var(--text-sm);
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--gf-text-subtle);
}

.verification-code-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0.75rem;
  max-width: 22rem;
}

.verification-digit {
  width: 100%;
  height: 3.5rem;
  border: 1px solid var(--gf-border-soft);
  border-radius: 10px;
  background: #fff;
  color: var(--gf-text);
  font-size: var(--text-xl);
  font-weight: 700;
  text-align: center;
  padding: 0;
  box-sizing: border-box;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.verification-digit:focus {
  outline: none;
  border-color: var(--gf-primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.verification-digit.is-filled {
  border-color: #94a3b8;
  background: var(--gf-surface);
}

.verification-help {
  margin-top: 1.5rem;
  margin-bottom: 0.85rem;
}

#verify-code-submit {
  margin-top: 1.25rem;
}

#resend-btn {
  margin-top: 0.35rem;
}

@media (max-width: 639px) {
  .wizard-progress {
    gap: 0.25rem;
  }

  .wizard-step-name {
    font-size: var(--text-xs);
  }

  .wizard-step-indicator {
    width: 1.875rem;
    height: 1.875rem;
    font-size: var(--text-xs);
  }

  .wizard-step:not(:last-child)::after {
    top: 0.9375rem;
    left: calc(50% + 1rem);
    right: calc(-50% + 1rem);
  }

  .wizard-card {
    padding: 1.5rem 1.25rem;
  }

  .verification-code-grid {
    max-width: none;
    gap: 0.5rem;
  }

  .verification-digit {
    height: 3rem;
    font-size: var(--text-lg);
  }
}
