/* The sign-up journey (Register, ConfirmEmail, Onboarding). Rain ID only: rain.css is shared with
   Rain Console and stays untouched. Everything here uses rain.css tokens and sits in its
   components layer, so the utilities still win. Load after rain.css. */
@layer components {
  /* Where you are in sign-up: Email, Password, About you (_SignupSteps). Steps behind you carry a
     check, the current one is filled, the line into a reached step is tinted. */
  .su-steps { display: flex; align-items: center; gap: 8px; margin: 0 0 28px; padding: 0; color: var(--fg-3); font-size: 12px; line-height: 16px; font-weight: 500; }
  .su-step { display: flex; align-items: center; gap: 6px; min-width: 0; white-space: nowrap; }
  .su-step:not(:first-child) { flex: 1 1 auto; }
  .su-step:not(:first-child)::before { content: ""; flex: 1 1 12px; min-width: 12px; height: 1px; margin-right: 2px; background: var(--line-2); }
  .su-step.is-done:not(:first-child)::before, .su-step[aria-current]:not(:first-child)::before { background: var(--accent-line); }
  .su-step-n { flex: none; display: grid; place-items: center; width: 20px; height: 20px; border: 1px solid var(--line-3); border-radius: 50%; font-size: 11px; line-height: 1; font-variant-numeric: tabular-nums; }
  .su-step-n > .i { width: 12px; height: 12px; stroke-width: 2; }
  .su-step.is-done { color: var(--fg-2); }
  .su-step.is-done > .su-step-n { border-color: transparent; background: var(--accent-soft); color: var(--accent-text); }
  .su-step[aria-current] { color: var(--fg-1); }
  .su-step[aria-current] > .su-step-n { border-color: var(--accent); background: var(--accent); color: var(--accent-ink); font-weight: 700; }

  /* "Where did you hear about us?" and its free-text answer, which shows only while "Other" is
     the selected option. Browsers without :has() keep it visible, with the "(if you chose
     Other)" note. */
  .su-source { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
  @supports selector(:has(a)) {
    .su-source:not(:has(option[data-su-other]:checked)) .su-other { display: none; }
    .su-other .opt { display: none; }
  }

  /* "Check your email": the code box reads like the code in the email, and the resend line sits
     as one centered sentence with its button looking like a link. */
  .su-code { text-align: center; font-family: var(--font-mono, ui-monospace, "SF Mono", Menlo, Consolas, monospace); font-size: 22px; line-height: 28px; letter-spacing: .3em; font-variant-numeric: tabular-nums; padding-top: 12px; padding-bottom: 12px; }
  .su-code::placeholder { color: var(--fg-4, var(--fg-3)); opacity: .5; }
  .su-resend { display: flex; flex-wrap: wrap; justify-content: center; align-items: baseline; gap: 4px; text-align: center; }
  .su-resend > .btn-link { padding: 0; border: 0; background: none; color: var(--accent-text); font: inherit; cursor: pointer; }
  .su-resend > .btn-link:hover { text-decoration: underline; }
}
