/* Sign in: the orb above a centred glass card. */

.view-auth {
  display: flex;
  align-items: safe center;
  justify-content: center;
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-width: thin;
  padding: max(32px, env(safe-area-inset-top)) max(20px, env(safe-area-inset-right)) max(32px, env(safe-area-inset-bottom)) max(20px, env(safe-area-inset-left));
}

.auth-stage {
  position: relative;
  width: 100%;
  max-width: 440px;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: auto 0;
  animation: fade-up var(--slow) var(--ease) both;
}

.orb-auth {
  margin-bottom: -34px;
  z-index: 2;
}

.auth-card {
  border-color: transparent;
  position: relative;
  width: 100%;
  padding: 56px 32px 28px;
  border-radius: 28px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .065) 0%, rgba(255, 255, 255, .025) 100%);
  box-shadow: var(--top-light), var(--shadow-3);
}

.auth-card::before {
  /* A brighter top edge that fades out down the sides. */
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .2), rgba(255, 255, 255, .04) 40%, rgba(255, 255, 255, .02));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  pointer-events: none;
}

.brand-auth {
  width: 100%;
  justify-content: center;
  margin-bottom: 14px;
}
.brand-auth .brand-name {
  font-size: 12px;
  font-weight: var(--fw-semibold);
  text-transform: uppercase;
  letter-spacing: .16em;
  color: var(--text-3);
}

.auth-title {
  font-family: var(--font-display);
  font-size: clamp(26px, 5.4vw, 32px);
  line-height: 1.12;
  font-weight: var(--fw-semibold);
  letter-spacing: -.025em;
  text-align: center;
  background: linear-gradient(180deg, #ffffff 0%, rgba(255, 255, 255, .74) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-wrap: balance;
  /* It can carry a business name from an invitation: a long unbroken one wraps
     rather than running out of the card. */
  overflow-wrap: anywhere;
  /* The gradient only paints inside the box, and a 1.12 line box is shorter than
     the glyphs: room for descenders (j, g, y) and accents, taken back by the
     margins so the layout does not move. */
  padding-block: .06em .14em;
  margin-block: -.06em -.14em;
}

.auth-sub {
  margin: 12px auto 24px;
  max-width: 34ch;
  font-size: 14px;
  line-height: 1.55;
  text-align: center;
  color: var(--text-2);
  text-wrap: pretty;
  overflow-wrap: anywhere; /* "Choose a new password for {a long email}." */
}

.notice {
  display: flex;
  gap: 10px;
  margin-bottom: 18px;
  padding: 12px 14px;
  border-radius: var(--r-md);
  border: 1px solid var(--hairline-2);
  background: rgba(255, 255, 255, .04);
  color: var(--text-1);
  font-size: 13px;
  line-height: 1.45;
}
.notice .link-btn { padding: 0; font-size: inherit; }

.auth-form { display: flex; flex-direction: column; }

.field-row {
  display: flex;
  gap: 8px;
}
.field-row .field { flex: 1; min-width: 0; }
.field-row .btn { height: 48px; flex: none; }

.auth-helper {
  margin: 12px 0 20px;
  font-size: 13px;
  line-height: 1.55;
  color: var(--text-2);
  text-align: center;
  overflow-wrap: anywhere;
}

.otp {
  margin: 0 0 18px;
  padding: 0;
  border: 0;
  min-width: 0;
}
.otp legend {
  padding: 0;
  width: 100%;
  text-align: center;
}

.otp-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.otp-gap { width: 6px; height: 2px; border-radius: 1px; background: var(--hairline-3); flex: none; }

.otp-box {
  width: 48px;
  height: 56px;
  min-width: 0;
  flex: 0 1 48px;
  padding: 0;
  border-radius: var(--r-md);
  border: 1px solid var(--hairline-2);
  background: rgba(255, 255, 255, .035);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, .3);
  color: var(--text-1);
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: var(--fw-semibold);
  font-variant-numeric: tabular-nums;
  text-align: center;
  caret-color: var(--iris);
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease), background-color var(--dur) var(--ease);
}
.otp-box:hover { border-color: var(--hairline-3); }
.otp-box:focus {
  outline: 2px solid transparent;
  outline-offset: 2px;
  border-color: var(--accent-line);
  background: rgba(255, 255, 255, .06);
  box-shadow: var(--accent-ring);
}
.otp-box.is-filled { border-color: rgba(255, 255, 255, .2); background: rgba(255, 255, 255, .06); }

.otp-row.is-shake { animation: shake 360ms var(--ease); }
@keyframes shake {
  0%, 100% { transform: none; }
  20% { transform: translateX(-6px); }
  40% { transform: translateX(5px); }
  60% { transform: translateX(-3px); }
  80% { transform: translateX(2px); }
}

.auth-secondary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}
.auth-secondary .btn { flex: 1 1 10rem; height: 40px; font-size: 13px; font-weight: var(--fw-regular); color: var(--text-2); }
.auth-secondary .btn:hover:not(:disabled) { color: var(--text-1); }

.auth-message {
  min-height: 1.5em;
  margin-top: 16px;
  font-size: 13px;
  line-height: 1.5;
  text-align: center;
  color: var(--text-2);
}
.auth-message:empty { margin-top: 8px; }
.auth-message.is-error { color: var(--danger); }

/* ------------------------------------------------------------------ Steps */

/* The heading takes focus when a step changes; it is not a control. */
.auth-title:focus { outline: none; }

/* A step swapped in fades rather than jumps. Reduced motion drops it globally. */
.auth-panel { animation: fade-in var(--dur) var(--ease) both; }

.auth-submit { height: 48px; margin-top: 22px; }

.field-aside {
  display: flex;
  justify-content: flex-end;
  margin-top: 8px;
}

.link-quiet {
  font-size: 13px;
  font-weight: var(--fw-regular);
  color: var(--text-2);
  text-decoration-color: rgba(255, 255, 255, .22);
}
.link-quiet:hover { color: var(--text-1); }

.auth-alt {
  margin-top: 16px;
  font-size: 13px;
  line-height: 1.5;
  text-align: center;
  color: var(--text-2);
  text-wrap: balance;
}
.auth-alt .link-btn { padding: 2px; font-size: 13px; }

.auth-fine {
  margin-top: 12px;
  font-size: 12.5px;
  line-height: 1.5;
  text-align: center;
  color: var(--text-3);
  text-wrap: balance;
}

.auth-foot {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--hairline);
  font-size: 13px;
  line-height: 1.5;
  text-align: center;
  color: var(--text-2);
}
.auth-foot .link-btn { padding: 2px; }

/* Waiting: a few quiet bars where the next step will be, under a working orb. */
.auth-wait {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 4px 0 2px;
}
.auth-skel { height: 48px; border-radius: var(--r-md); }
.auth-skel-short { width: 58%; height: 14px; margin: 4px auto 0; border-radius: var(--r-xs); }

/* ----------------------------------------------------- Revenue range pills */

.pills {
  min-width: 0;
  margin-left: 0;
  margin-right: 0;
  padding: 0;
  border: 0;
}
.pills legend { padding: 0; }

.pill-row {
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

/* The native radio does the work (arrow keys, the group, "2 of 4"); the label is the pill. */
.pill-input {
  position: absolute;
  top: 0;
  left: 0;
  width: 1px;
  height: 1px;
  margin: 0;
  opacity: 0;
  pointer-events: none;
}

.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-width: 0;
  height: 40px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--hairline-2);
  background: rgba(255, 255, 255, .035);
  color: var(--text-2);
  font-size: 13px;
  font-weight: var(--fw-semibold);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
  transition: background-color var(--fast) var(--ease), border-color var(--fast) var(--ease),
    color var(--fast) var(--ease), box-shadow var(--fast) var(--ease);
}
.pill:hover { background: rgba(255, 255, 255, .07); border-color: var(--hairline-3); color: var(--text-1); }

.pill-check { display: none; width: 14px; height: 14px; margin-left: -2px; color: var(--link); }

.pill-input:checked + .pill {
  color: var(--text-1);
  border-color: var(--accent-line);
  background: rgba(156, 140, 255, .14);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08), 0 0 0 3px rgba(156, 140, 255, .1);
}
.pill-input:checked + .pill .pill-check { display: inline-grid; }
.pill-input:focus-visible + .pill { outline: 2px solid var(--focus); outline-offset: 2px; }
.pills.is-invalid .pill { border-color: var(--danger-line); }

/* ------------------------------------------------------- Invite-only card */

.auth-steps {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.auth-step {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--r-md);
  border: 1px solid var(--hairline);
  background: rgba(255, 255, 255, .03);
  box-shadow: var(--top-light);
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-2);
}
.auth-step strong { display: block; margin-bottom: 1px; font-weight: var(--fw-semibold); color: var(--text-1); }
.auth-step-ico {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  flex: none;
  border-radius: 10px;
  border: 1px solid var(--hairline-2);
  background: rgba(255, 255, 255, .05);
  color: var(--text-1);
}
.auth-step-ico .ico { width: 16px; height: 16px; }
.auth-step-text { min-width: 0; padding-top: 1px; overflow-wrap: anywhere; }

@media (forced-colors: active) {
  .pill-input:checked + .pill { outline: 2px solid Highlight; outline-offset: -2px; }
  .pill-input:focus-visible + .pill { outline: 2px solid Highlight; outline-offset: 2px; }
  .pill-check { forced-color-adjust: auto; }
}

@media (max-width: 767.98px) {
  .auth-secondary .btn { height: 44px; }
  .pill { height: 44px; }
  .field-aside .link-btn, .auth-alt .link-btn, .auth-foot .link-btn { padding: 6px 4px; }
}

@media (max-width: 480px) {
  .auth-card { padding: 48px 20px 24px; border-radius: 24px; }
  .field-row { flex-direction: column; }
  .field-row .btn { width: 100%; }
  .otp-row { gap: 6px; }
  .otp-box { height: 52px; font-size: 22px; }
  .otp-gap { width: 4px; }
}
