/* Auth viewport resilience: keeps every authentication state reachable at browser zoom. */

.home-neon.auth-locked #authGate {
  box-sizing: border-box;
  min-width: 0;
  min-height: 100dvh;
  max-width: 100vw;
  overscroll-behavior: contain;
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-gutter: stable;
}

.home-neon.auth-locked #authGate :where(.auth-gate-brand, .auth-gate-card, .auth-gate-forms, form, section, fieldset) {
  box-sizing: border-box;
  min-width: 0;
  max-width: 100%;
}

.home-neon.auth-locked #authGate .auth-gate-card {
  align-self: start;
  width: min(610px, 100%);
  max-height: none;
  overflow-x: hidden;
  overflow-y: visible;
}

.home-neon.auth-locked #authGate .auth-provider-notice {
  margin: 0;
  padding: 10px 12px;
  border: 1px solid rgba(247, 220, 99, .42);
  border-radius: 8px;
  background: rgba(247, 220, 99, .08);
  color: #fff0ac;
  font-size: 11px;
  line-height: 1.45;
}

.home-neon.auth-locked #authGate :where(.auth-recovery-panel, .auth-email-verify-panel, .auth-qr-panel) {
  justify-self: stretch;
  width: 100%;
  min-width: 0;
  overflow: hidden;
}

.home-neon.auth-locked #authGate :where(.auth-recovery-panel, .auth-email-verify-panel, .auth-qr-panel)[hidden],
.home-neon.auth-locked #authGate :where(.auth-gate-forms, .auth-social-row, .auth-divider, .auth-mode-tabs)[hidden] {
  display: none !important;
}

.home-neon.auth-locked #authGate [hidden] {
  display: none !important;
}

.home-neon.auth-locked #authGate :where(input, select, textarea, button, code, p, strong, small, span) {
  min-width: 0;
  overflow-wrap: anywhere;
}

@supports (height: 100svh) {
  .home-neon.auth-locked #authGate {
    min-height: 100svh;
    height: 100svh;
  }

  .home-neon.auth-locked #authGate .auth-gate-card { max-height: none; }
}

/* Browser zoom reduces the CSS viewport. Switch before the old two-column grid can collapse. */
@media (max-width: 1100px) {
  .home-neon.auth-locked #authGate {
    grid-template-columns: minmax(0, 1fr) !important;
    grid-auto-rows: max-content;
    align-content: start;
    align-items: start;
    gap: 18px;
    padding: 18px;
  }

  .home-neon.auth-locked #authGate .auth-gate-card {
    order: 1;
    justify-self: center;
    max-height: none;
    overflow: visible;
  }

  .home-neon.auth-locked #authGate .auth-gate-brand {
    order: 2;
    justify-self: center;
    width: min(610px, 100%);
  }

  .home-neon.auth-locked #authGate :where(.auth-brand-lockup, .auth-gate-brand > h1, .auth-gate-brand > p, .auth-benefits, .auth-product-preview, .auth-tool-stream) {
    display: none !important;
  }
}

@media (min-width: 1101px) and (max-height: 820px) {
  .home-neon.auth-locked #authGate {
    align-items: start;
    padding-block: 18px;
  }

  .home-neon.auth-locked #authGate .auth-gate-card { max-height: none; }
}

@media (max-width: 600px) {
  .home-neon.auth-locked #authGate {
    gap: 10px;
    padding: 8px;
  }

  .home-neon.auth-locked #authGate .auth-gate-card {
    width: 100%;
    padding: 14px 12px;
    border-radius: 16px;
  }

  .home-neon.auth-locked #authGate :where(.auth-interest-grid, .auth-recovery-otp) {
    grid-template-columns: minmax(0, 1fr);
  }

  .home-neon.auth-locked #authGate .auth-card-heading {
    grid-template-columns: 40px minmax(0, 1fr);
  }
}

.home-neon.auth-locked #authGate[data-auth-layout="compact"] .auth-gate-card {
  transform: none !important;
  perspective: none !important;
}

.home-neon.auth-locked #authGate[data-auth-special-panel="true"] .auth-gate-card {
  align-self: start;
}

@media (prefers-reduced-motion: reduce) {
  .home-neon.auth-locked #authGate {
    scroll-behavior: auto !important;
  }
}
