/* Phase 1: onboarding and subscription flow polish. */
.signup-fields {
  gap: 14px;
  padding: 15px;
  border-color: #dfe6f1;
  background: linear-gradient(145deg, #f8faff, #fff 82%);
  animation: onboarding-enter .24s ease-out both;
}
.signup-progress {
  display: grid;
  grid-template-columns: 1fr 28px 1fr;
  align-items: center;
  gap: 8px;
  padding: 1px 0 5px;
}
.signup-progress > span:not(.signup-progress-line) {
  display: flex;
  align-items: center;
  gap: 7px;
  color: #8793a4;
  font-size: 9px;
  transition: color .2s ease;
}
.signup-progress > span > i {
  display: grid;
  flex: none;
  width: 24px;
  height: 24px;
  place-items: center;
  border: 1px solid #d9e1ee;
  border-radius: 50%;
  background: white;
  color: #718097;
  font-size: 9px;
  font-style: normal;
  font-weight: 800;
  transition: background .2s ease, color .2s ease, border-color .2s ease;
}
.signup-progress > span.is-current,
.signup-progress > span.is-complete { color: #2549c5; }
.signup-progress > span.is-current > i,
.signup-progress > span.is-complete > i { border-color: #4162ed; background: #4162ed; color: white; }
.signup-progress-line { height: 1px; background: #dce3ed; }
.signup-step { display: grid; gap: 10px; animation: onboarding-enter .22s ease-out both; }
.signup-step[hidden] { display: none; }
.signup-step .form-hint { font-size: 10px; line-height: 1.8; }
.signup-back { justify-self: start; padding: 5px 0; border: 0; background: transparent; color: #52688b; font: inherit; font-size: 10px; font-weight: 700; cursor: pointer; }
.signup-back:hover { color: #304fd2; }
.auth-form .signup-fields label { gap: 5px; color: #41536a; font-size: 10px; font-weight: 700; }
.auth-form .signup-fields input,
.auth-form .signup-fields select { min-height: 45px; border-color: #d8e1ee; border-radius: 12px; background: rgba(255,255,255,.92); font-size: 11px; }
.auth-form .signup-fields :is(input,select):focus-visible { outline: 3px solid rgba(65,98,237,.15); border-color: #4162ed; }
.auth-buttons .button:disabled { cursor: wait; opacity: .58; transform: none; }
.subscription-launch-offer[hidden] { display: none; }
.subscription-page .subscription-launch-offer { animation: onboarding-enter .35s ease-out both; }
.subscription-page .plan-option:focus-within { outline: 3px solid rgba(65,98,237,.15); outline-offset: 3px; }
.subscription-page .pay-option:focus-within { outline: 3px solid rgba(65,98,237,.15); outline-offset: 2px; }
.subscription-page .subscription-form .button:disabled { cursor: wait; opacity: .6; transform: none; }
.subscription-auth-gate { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 20px; max-width: 980px; margin: 28px auto; padding: 23px 26px; border: 1px solid #dce4f2; border-radius: 20px; background: linear-gradient(120deg, #fff, #f2f5ff); box-shadow: 0 14px 34px rgba(24,48,76,.07); animation: onboarding-enter .28s ease-out both; }
.subscription-auth-gate[hidden], .subscription-page .subscription-layout[hidden] { display: none; }
.auth-gate-icon { display: grid; width: 48px; height: 48px; place-items: center; border-radius: 15px; background: #eaf6f0; color: #25815d; font-size: 21px; font-weight: 800; }
.subscription-auth-gate h2 { margin: 0 0 5px; color: #183452; font-size: 16px; }
.subscription-auth-gate p { max-width: 620px; margin: 0; color: #66778e; font-size: 11px; line-height: 1.9; }
.auth-gate-actions { display: grid; justify-items: stretch; gap: 8px; min-width: 190px; }
.auth-gate-actions .button { min-height: 45px; font-size: 10px; }
.auth-gate-help { color: #65758a; font-size: 9px; text-align: center; }
.subscription-page .subscription-layout { animation: onboarding-enter .24s ease-out both; }
html[data-theme="dark"] .subscription-auth-gate { border-color: #34496c; background: linear-gradient(120deg,#17263a,#1d2d47); }
html[data-theme="dark"] .subscription-auth-gate h2 { color: #eef4ff; }
html[data-theme="dark"] .subscription-auth-gate p,
html[data-theme="dark"] .auth-gate-help { color: #b4c1d2; }
html[data-theme="dark"] .signup-fields { border-color: #34496c; background: linear-gradient(145deg,#17263a,#1d2d47); }
html[data-theme="dark"] .auth-form .signup-fields label { color: #c8d3e3; }
html[data-theme="dark"] .auth-form .signup-fields :is(input,select) { border-color: #394a61; background: #132033; color: #edf3fc; }
html[data-theme="dark"] .signup-progress-line { background: #394a61; }
html[data-theme="dark"] .signup-back { color: #bdc9db; }
@keyframes onboarding-enter {
  from { opacity: 0; transform: translateY(7px); }
  to { opacity: 1; transform: translateY(0); }
}
@media (max-width: 650px) {
  .signup-fields { padding: 13px; }
  .signup-progress > span:not(.signup-progress-line) { gap: 5px; font-size: 8px; }
  .subscription-page .offer-counter { align-items: center; }
  .subscription-auth-gate { grid-template-columns: auto minmax(0,1fr); gap: 13px; padding: 18px; }
  .subscription-auth-gate h2 { font-size: 14px; }
  .auth-gate-actions { grid-column: 1 / -1; }
}
@media (prefers-reduced-motion: reduce) {
  .signup-fields, .signup-step, .subscription-page .subscription-launch-offer { animation: none; }
  .signup-progress > span, .signup-progress > span > i { transition: none; }
}
