html {
  scrollbar-width: none;
}

html::-webkit-scrollbar {
  display: none;
}

body.auth-body {
  --auth-page-gutter: 0.75rem;
  --auth-page-top: max(var(--auth-page-gutter), env(safe-area-inset-top));
  --auth-page-bottom: max(var(--auth-page-gutter), env(safe-area-inset-bottom));

  min-height: 100dvh;
  margin: 0;
  padding: var(--auth-page-top) max(var(--auth-page-gutter), env(safe-area-inset-right)) var(--auth-page-bottom) max(var(--auth-page-gutter), env(safe-area-inset-left));
  background:
    linear-gradient(rgba(5, 14, 30, 0.66), rgba(5, 14, 30, 0.82)),
    url('/DougFirJasperBackground.jpg') center 18% / cover no-repeat,
    #071426;
  color: #f8fafc;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

body.auth-body:has(.auth-page-shell) {
  background: url('/DougFirJasperBackground.jpg') center 18% / cover no-repeat fixed #071426;
}

body.auth-body:has(.auth-page-shell)::before {
  content: '';
  position: fixed;
  inset: 0;
  background: rgba(5, 14, 30, 0.72);
  pointer-events: none;
}

.auth-page-shell {
  position: relative;
  width: min(1180px, 100%);
  min-height: calc(100dvh - var(--auth-page-top) - var(--auth-page-bottom));
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(390px, 0.82fr);
  gap: clamp(1.5rem, 4vw, 4rem);
}

.auth-info-panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: clamp(1.1rem, 2.4vh, 1.7rem);
}

.auth-home-link {
  width: fit-content;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  border: 1px solid rgba(191, 219, 254, 0.26);
  border-radius: 999px;
  padding: 0 1rem;
  background: rgba(7, 20, 38, 0.72);
  color: #dbeafe;
  font-size: 0.9rem;
  font-weight: 800;
  text-decoration: none;
  box-shadow: 0 18px 40px rgba(3, 10, 24, 0.22);
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.auth-home-link:hover {
  transform: translateY(-1px);
  border-color: rgba(147, 197, 253, 0.55);
  background: rgba(30, 64, 175, 0.38);
}

.auth-info-copy {
  max-width: 680px;
}

.auth-wordmark {
  margin: 0;
  color: #f8fafc;
  font-size: clamp(1.25rem, 2.4vw, 1.875rem);
  font-weight: 750;
  line-height: 1.2;
  text-align: center;
}

.auth-wordmark span {
  color: #93c5fd;
}

.auth-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0 0 1.1rem;
  color: #93c5fd;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.auth-info-copy h1 {
  max-width: 12ch;
  margin: 0;
  color: #fff;
  font-size: clamp(3rem, 5.35vw, 5.1rem);
  line-height: 0.9;
  font-weight: 900;
  letter-spacing: 0;
}

.auth-info-copy h1 + p {
  max-width: 620px;
  margin: clamp(0.8rem, 1.8vh, 1.1rem) 0 0;
  color: rgba(219, 234, 254, 0.9);
  font-size: clamp(0.98rem, 1.2vw, 1.1rem);
  line-height: 1.55;
}

.auth-form-panel {
  width: min(100%, 470px);
  display: grid;
  align-content: start;
  gap: 0.8rem;
  padding-top: clamp(0.5rem, 1.5vh, 1rem);
  justify-self: end;
}

.auth-card {
  --auth-card-padding: 1.5rem;
  --auth-form-row-gap: 1.15rem;

  min-width: 0;
  background: var(--ara-glass-background) !important;
  border-color: var(--ara-glass-border) !important;
  backdrop-filter: blur(var(--ara-glass-blur));
  -webkit-backdrop-filter: blur(var(--ara-glass-blur));
  box-shadow: 0 28px 80px rgba(3, 10, 24, 0.5);
  padding: var(--auth-card-padding) !important;
}

.auth-card > :not([hidden]) ~ :not([hidden]),
.auth-card form > :not([hidden]) ~ :not([hidden]) {
  margin-top: var(--auth-form-row-gap) !important;
}

.auth-card input {
  min-height: 44px;
}

.auth-card input[type='checkbox'] {
  min-height: 0;
  flex-shrink: 0;
  width: 1.05rem;
  height: 1.05rem;
  border-radius: 0.28rem;
  border: 2px solid rgba(147, 197, 253, 0.62);
  background-color: rgba(15, 23, 42, 0.86);
  cursor: pointer;
}

.auth-card input[type='checkbox']:checked {
  border-color: #3b82f6;
  background-color: #3b82f6;
}

.auth-card input[type='checkbox']:focus {
  outline: 2px solid transparent;
  outline-offset: 2px;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.28);
}

.email-consent-control {
  border: 1px solid rgba(147, 197, 253, 0.18);
  border-radius: 0.85rem;
  padding: 0.8rem 0.9rem;
  background: rgba(15, 23, 42, 0.48);
}

.email-consent-control__label {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  color: #f8fafc;
  font-size: 0.9rem;
  font-weight: 760;
  line-height: 1.25;
  cursor: pointer;
}

.email-consent-control p {
  margin: 0.35rem 0 0 1.72rem;
  color: rgba(203, 213, 225, 0.78);
  font-size: 0.78rem;
  line-height: 1.4;
}

.auth-text-button {
  padding: 0;
  border: 0;
  background: transparent;
  font: inherit;
  cursor: pointer;
}

.auth-flow-heading {
  text-align: center;
}

.auth-flow-heading > .material-symbols-outlined {
  width: 46px;
  height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.9rem;
  background: rgba(59, 130, 246, 0.16);
  color: #93c5fd;
}

.auth-flow-heading h3,
.auth-reset-sent h3 {
  margin: 0.8rem 0 0;
  color: #fff;
  font-size: 1.45rem;
  line-height: 1.1;
  font-weight: 900;
}

.auth-flow-heading p,
.auth-reset-sent p {
  margin: 0.6rem 0 0;
  color: rgba(203, 213, 225, 0.82);
  font-size: 0.92rem;
  line-height: 1.5;
}

.auth-secondary-button {
  width: 100%;
  min-height: 44px;
  border: 1px solid rgba(147, 197, 253, 0.28);
  border-radius: 0.7rem;
  background: rgba(15, 23, 42, 0.68);
  color: #dbeafe;
  font: inherit;
  font-size: 0.92rem;
  font-weight: 850;
  cursor: pointer;
}

.auth-secondary-button:hover {
  border-color: rgba(96, 165, 250, 0.62);
  background: rgba(30, 64, 175, 0.34);
  color: #fff;
}

.auth-reset-sent {
  text-align: center;
}

.auth-reset-sent > .auth-reset-sent__icon {
  width: 58px;
  height: 58px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 1rem;
  background: rgba(34, 197, 94, 0.16);
  color: #86efac;
  line-height: 1;
  text-align: center;
}

.auth-reset-sent__note {
  color: rgba(191, 219, 254, 0.74) !important;
  font-size: 0.86rem !important;
}

.auth-reset-sent .auth-secondary-button {
  margin-top: 1.35rem;
}

.material-symbols-outlined {
  font-family: 'Material Symbols Rounded';
  font-weight: 400;
  font-style: normal;
  font-size: 24px;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  display: inline-block;
  white-space: nowrap;
  word-wrap: normal;
  direction: ltr;
  font-feature-settings: 'liga';
  font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
  -webkit-font-smoothing: antialiased;
}

.account-created-body {
  display: block;
}

.account-created-shell {
  min-height: calc(100dvh - 1.5rem);
  width: min(920px, 100%);
  margin: 0 auto;
  display: grid;
  place-items: center;
  text-align: center;
}

.account-created-message {
  width: min(780px, 100%);
  padding: clamp(2rem, 6vw, 4rem);
}

.account-created-message .auth-eyebrow {
  justify-content: center;
  margin-bottom: 1rem;
}

.account-created-message h1 {
  margin: 0;
  color: #fff;
  font-size: clamp(3rem, 6.6vw, 6.15rem);
  line-height: 0.9;
  font-weight: 950;
  letter-spacing: 0;
}

.account-created-lead {
  margin: 1.25rem auto 0;
  color: rgba(219, 234, 254, 0.92);
  font-size: clamp(1.08rem, 1.65vw, 1.35rem);
  line-height: 1.45;
}

.account-created-note {
  margin: 0.55rem auto 0;
  color: rgba(191, 219, 254, 0.78);
  font-size: clamp(0.95rem, 1.15vw, 1.06rem);
  line-height: 1.45;
}

.account-created-warning {
  width: min(640px, 100%);
  margin: 1.55rem auto 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.8rem;
  border: 1px solid rgba(245, 158, 11, 0.34);
  border-radius: 1rem;
  padding: 1rem 1.15rem;
  background: rgba(120, 53, 15, 0.34);
  color: #fcd34d;
}

.account-created-warning .material-symbols-rounded {
  flex: 0 0 auto;
  color: #fbbf24;
}

.account-created-warning p {
  margin: 0;
  font-size: clamp(1rem, 1.35vw, 1.16rem);
  line-height: 1.38;
  font-weight: 900;
}

.account-created-actions {
  margin-top: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.8rem;
  flex-wrap: wrap;
}

.account-created-link {
  min-height: 50px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border: 1px solid rgba(147, 197, 253, 0.34);
  border-radius: 999px;
  padding: 0 1.2rem;
  background: rgba(7, 20, 38, 0.78);
  color: #dbeafe;
  font-weight: 850;
  text-decoration: none;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease, color 0.18s ease;
}

.account-created-link:hover {
  transform: translateY(-1px);
  border-color: rgba(96, 165, 250, 0.7);
  color: #fff;
  background: rgba(37, 99, 235, 0.38);
}

.account-created-link--primary {
  border-color: rgba(96, 165, 250, 0.82);
  background: #2563eb;
  color: #fff;
}

.account-created-link--primary:hover {
  background: #1d4ed8;
}

button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

@media (min-width: 460px) and (max-height: 820px), (460px <= width <= 820px), (375px <= width < 460px) and (max-height: 880px) {
  #registerForm:not(.hidden) {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--auth-form-row-gap) 0.8rem;
  }

  #registerForm > * {
    margin-top: 0 !important;
    grid-column: 1 / -1;
  }
}

@media (min-width: 460px) {
  #registerForm > .auth-register-field {
    grid-column: auto;
  }
}

@media (375px <= width < 460px) and (max-height: 880px) {
  #registerForm > .auth-register-password {
    grid-column: auto;
  }

  .auth-register-password input::placeholder {
    font-size: 0.875rem;
  }
}

@media (min-width: 821px) and (max-height: 820px) {
  .auth-page-shell {
    gap: clamp(1rem, 2.5vw, 2.5rem);
  }

  .auth-home-link {
    min-height: 40px;
  }

  .auth-info-copy h1 {
    font-size: clamp(2.8rem, 4.8vw, 4.35rem);
  }

  .auth-info-copy h1 + p {
    max-width: 560px;
    font-size: 0.96rem;
    line-height: 1.45;
  }

  .auth-card {
    --auth-card-padding: 1.1rem;
    --auth-form-row-gap: 0.85rem;
  }
}

@media (min-width: 821px) and (max-height: 680px) {
  .auth-page-shell {
    grid-template-columns: minmax(0, 0.92fr) minmax(360px, 0.82fr);
  }

  .auth-info-panel {
    gap: 0.8rem;
  }

  .auth-info-copy h1 {
    font-size: clamp(2.35rem, 4vw, 3.6rem);
  }

  .auth-info-copy h1 + p {
    display: none;
  }

  .auth-card {
    --auth-card-padding: 0.95rem;
    --auth-form-row-gap: 0.7rem;
  }
}

@media (min-width: 821px) and (max-height: 600px) {
  .auth-page-shell {
    grid-template-columns: minmax(0, 1fr) minmax(430px, 0.85fr);
  }

  .auth-card {
    --auth-card-padding: 0.75rem;
    --auth-form-row-gap: 0.5rem;
  }

  .email-consent-control {
    padding: 0.42rem 0.75rem;
  }
}

@media (min-width: 821px) and (max-height: 560px) {
  body.auth-body:has(.auth-page-shell) {
    --auth-page-gutter: 0.5rem;
  }

  .auth-form-panel {
    gap: 0.45rem;
    padding-top: 0;
  }

  .auth-wordmark {
    font-size: 1.25rem;
  }

  .auth-card {
    --auth-card-padding: 0.6rem;
    --auth-form-row-gap: 0.375rem;
  }
}

@media (max-width: 820px) {
  body.auth-body {
    --auth-page-gutter: 1rem;
  }

  .auth-page-shell {
    width: min(520px, 100%);
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto 1fr;
    gap: 0.85rem;
  }

  .auth-info-panel {
    gap: 0.65rem;
  }

  .auth-info-copy h1 {
    max-width: none;
    font-size: clamp(1.2rem, 3.8vw, 1.65rem);
    line-height: 1.18;
  }

  .auth-info-copy h1 + p {
    display: none;
  }

  .auth-form-panel {
    width: 100%;
    gap: 0.55rem;
    padding-top: 0;
  }

  .auth-wordmark {
    font-size: 1.125rem;
  }

  .auth-card {
    --auth-card-padding: 1rem;
    --auth-form-row-gap: 0.85rem;
  }

  .account-created-shell {
    min-height: calc(100dvh - 2rem);
  }
}

@media (max-width: 520px) {
  body.auth-body {
    --auth-page-gutter: 0.75rem;
  }

  .auth-home-link {
    padding: 0 0.85rem;
  }

  .auth-card {
    --auth-card-padding: 0.85rem;
    --auth-form-row-gap: 0.65rem;
  }

  .account-created-message {
    padding: 2rem 0.35rem;
  }

  .account-created-message h1 {
    font-size: 2.72rem;
  }

  .account-created-warning {
    align-items: flex-start;
    text-align: left;
  }

  .account-created-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .account-created-link {
    width: 100%;
  }
}

@media (max-width: 520px) and (max-height: 640px) {
  body.auth-body {
    --auth-page-gutter: 0.55rem;
  }

  .auth-card {
    --auth-card-padding: 0.72rem;
    --auth-form-row-gap: 0.48rem;
  }

  .email-consent-control {
    padding: 0.55rem 0.65rem;
  }
}
