/* ============================================================
   Curious: sign in and sign up.
   Task pages, so quieter than the rest of the site: one card for the form,
   one reassurance panel beside it. Loads after site.css and only adds to it.
   ============================================================ */

.auth {
  padding-top: clamp(6.5rem, 10vw, 9rem);
  padding-bottom: clamp(3.5rem, 7vw, 6rem);
  isolation: isolate;
}
/* a low ember glow behind the card, nothing more */
.auth::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: 2rem;
  left: 50%;
  width: min(70rem, 120vw);
  height: 38rem;
  transform: translateX(-50%);
  background: radial-gradient(45% 50% at 32% 40%, rgba(247, 112, 30, 0.1), transparent 70%);
  pointer-events: none;
}

.auth__grid {
  max-width: 76rem;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(2rem, 6vw, 6rem);
  align-items: center;
}

/* ---------- the form card ---------- */
.auth__card {
  display: grid;
  gap: clamp(1.4rem, 2.4vw, 1.9rem);
  width: 100%;
  max-width: 32rem;
  justify-self: end;
  padding: clamp(1.4rem, 3.4vw, 2.6rem);
  border-radius: var(--r-lg);
  border: 1px solid var(--line);
  background: radial-gradient(120% 60% at 0% 0%, var(--panel-hi) 0%, var(--panel) 60%);
  box-shadow: 0 40px 80px -30px rgb(var(--sh-rgb) / calc(0.6 * var(--sh-k)));
  animation: auth-in var(--t-reveal) var(--ease) both;
}
.auth__head { display: grid; gap: 0.7rem; justify-items: start; }
.auth__title { font-size: clamp(2.2rem, 3.6vw, 3rem); line-height: 1; letter-spacing: -0.048em; font-weight: 720; }
.auth__head p { color: var(--tx-mute); max-width: 38ch; }

.auth__form { display: grid; gap: 1.05rem; }
.auth__form .field input { min-height: 3.1rem; }
/* site.css removes the outline on focus and shifts the border to ember; add a
   ring so focus reads clearly at a glance */
.auth__form .field input:focus { box-shadow: 0 0 0 3px var(--ember-a40); }
.auth__form .field input[aria-invalid="true"] { border-color: var(--alert); }
.auth__form .field input[aria-invalid="true"]:focus { box-shadow: 0 0 0 3px rgba(255, 138, 122, 0.35); }
.auth__hint { font-size: var(--fs-fine); color: var(--tx-dim); }

.auth__submit { width: 100%; min-height: 3.25rem; margin-top: 0.35rem; }
.auth__submit[aria-busy="true"] { cursor: progress; }

/* sign in: auth.js shows this by setting style.display = "block" */
.auth__error {
  display: none;
  padding: 0.75rem 1rem;
  border-radius: var(--r-sm);
  border: 1px solid rgba(255, 138, 122, 0.35);
  background: rgba(255, 138, 122, 0.08);
  color: var(--alert);
  font-size: 0.93rem;
}

/* sign up: the live status line */
.auth__status { font-size: 0.93rem; color: var(--tx-mute); }
.auth__status:empty { display: none; }
.auth__status.is-error {
  padding: 0.75rem 1rem;
  border-radius: var(--r-sm);
  border: 1px solid rgba(255, 138, 122, 0.35);
  background: rgba(255, 138, 122, 0.08);
  color: var(--alert);
}
.auth__status.is-ok { color: var(--live); }

.auth__links { list-style: none; margin: 0; padding: 1.1rem 0 0; border-top: 1px solid var(--line); display: grid; gap: 0.1rem; font-size: 0.93rem; color: var(--tx-mute); }
.auth__links a { display: inline-flex; align-items: center; min-height: 44px; color: var(--tx); font-weight: 600; text-underline-offset: 0.2em; }
.auth__links a:hover { color: var(--ember); }

/* ---------- the reassurance panel ---------- */
.auth__aside { display: grid; gap: clamp(1.4rem, 3vw, 2.2rem); max-width: 34rem; animation: auth-in var(--t-reveal) var(--ease) 120ms both; }
.auth__aside .laptop { width: 92%; margin-inline: auto; }
.auth__aside-copy { display: grid; gap: 0.7rem; }
.auth__aside-copy p { color: var(--tx-mute); max-width: 44ch; }

/* sign up: the chosen plan, in the pricing page's own vocabulary */
.auth__plan {
  display: grid;
  gap: 1rem;
  justify-items: start;
  padding: clamp(1.4rem, 3vw, 2.4rem);
  border-radius: var(--r-lg);
  border: 1px solid var(--line);
  background: var(--panel);
}
.auth__plan--best { border-color: var(--ember-a40); background: radial-gradient(120% 70% at 50% 0%, var(--ember-a12), var(--panel) 60%); }
.auth__plan .plan__name { width: 100%; }
.auth__plan .plan__name h2 { font-size: clamp(1.8rem, 2.8vw, 2.3rem); letter-spacing: -0.04em; font-weight: 720; }
.auth__plan .plan__blurb { min-height: 0; }
.auth__plan .ticks { font-size: 0.97rem; }
.auth__plan .link-arrow { min-height: 44px; }
.auth__terms {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem 0;
  padding-top: 1rem;
  width: 100%;
  border-top: 1px solid var(--line);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--tx-mute);
}
.auth__terms span { white-space: nowrap; }
.auth__terms span + span::before { content: "·"; margin: 0 0.7em; color: var(--tx-dim); }

/* ---------- one column: the form first ---------- */
@media (max-width: 900px) {
  .auth__grid { grid-template-columns: minmax(0, 1fr); justify-items: center; }
  .auth__card, .auth__aside { justify-self: center; max-width: 32rem; }
}
@media (max-width: 420px) {
  .auth__terms { gap: 0.35rem 1rem; }
  .auth__terms span + span::before { display: none; }
}

@keyframes auth-in { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .auth__card, .auth__aside { animation: none; }
  .auth__links a, .btn { transition: none; }
}

/* the line under Create account */
.auth__legal { margin: 0.2rem 0 0; color: var(--tx-dim); font-size: var(--fs-fine); }
.auth__legal a { color: var(--tx-mute); }

/* ---------- welcome page (after payment): what happens next ---------- */
.welcome__steps { margin: 0; padding: 0; list-style: none; counter-reset: wstep; display: grid; gap: 1rem; }
.welcome__steps li { counter-increment: wstep; display: grid; grid-template-columns: 2rem minmax(0, 1fr); column-gap: 0.9rem; color: var(--tx-body); line-height: 1.5; }
.welcome__steps li::before { content: counter(wstep); grid-row: span 2; width: 2rem; height: 2rem; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--line-hi); color: var(--tx); font-weight: 600; font-size: 0.9rem; }
.welcome__steps b { color: var(--tx); font-weight: 600; }

/* Step 2: Stripe's embedded checkout. Its iframe is white; the panel matches it while it loads. */
.auth__pay { min-height: 24rem; border-radius: var(--r-md); background: #fff; overflow: hidden; }
