/* All account-access pages share one explicitly sized column. The legacy
   .auth-layout has two columns; .auth-layout-single previously changed only
   the wrapper width, leaving recovery and broker signup in half of a card. */
html[data-theme] .site-shell .helm-auth-page.section {
  display: block;
  min-height: 0;
  padding: clamp(28px, 5vw, 64px) 20px clamp(40px, 6vw, 80px);
  color: #173f52;
}

section.helm-auth-page > .container.helm-auth-container {
  width: 100%;
  max-width: 640px;
  min-width: 0;
  margin-inline: auto;
  padding: 0;
}

.helm-auth-page .auth-layout.auth-layout-single {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  width: 100%;
  max-width: 560px;
  min-width: 0;
  gap: 0;
  margin-inline: auto;
  justify-content: stretch;
  align-items: start;
}

html[data-theme] .site-shell .helm-auth-page .auth-panel {
  box-sizing: border-box;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 22px;
  width: 100%;
  min-width: 0;
  max-width: none;
  margin: 0;
  padding: clamp(24px, 4vw, 36px);
  color: #173f52;
  background: #fff !important;
  border: 1px solid #d9e4ea;
  border-radius: 10px !important;
  box-shadow: 0 12px 40px rgb(16 44 59 / 8%);
}

.helm-auth-page .auth-panel > *,
.helm-auth-page .auth-card-brand > div,
.helm-auth-page .input-shell {
  min-width: 0;
  max-width: 100%;
}

.helm-auth-page .auth-card-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 0 0 22px;
  border-bottom: 1px solid #e0e8ed;
  text-align: center;
}

.helm-auth-page .auth-card-brand img {
  box-sizing: border-box;
  flex: 0 0 58px;
  width: 58px;
  height: 58px;
  max-width: 100%;
  object-fit: contain;
  padding: 3px;
  background: #fff;
  border: 1px solid #e0e8ed;
  border-radius: 8px;
}

html[data-theme] .site-shell .helm-auth-page .auth-card-brand h1 {
  width: auto;
  max-width: none;
  margin: 6px 0 0;
  color: #173f52;
  font-family: inherit;
  font-size: clamp(26px, 3vw, 32px);
  font-weight: 550;
  line-height: 1.25;
  letter-spacing: -0.5px;
  overflow-wrap: normal;
  word-break: normal;
}

.helm-auth-page .auth-card-brand .eyebrow {
  margin: 0;
  color: #886328;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.6;
  letter-spacing: 1.3px;
}

.helm-auth-page .auth-recovery-description,
.helm-auth-page .helper-text {
  margin: 0;
  color: #526d7d;
  font-size: 15px;
  line-height: 1.7;
  overflow-wrap: anywhere;
}

.helm-auth-page .auth-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px 14px;
  width: 100%;
  min-width: 0;
  margin: 0;
}

.helm-auth-page .auth-form .full-span {
  grid-column: 1 / -1;
}

.helm-auth-page .input-shell {
  display: grid;
  gap: 8px;
  margin: 0;
}

html[data-theme] .site-shell .helm-auth-page .input-shell label {
  color: #264a5c;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.5;
}

html[data-theme] .site-shell .helm-auth-page .input-shell input {
  box-sizing: border-box;
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  min-height: 50px;
  margin: 0;
  padding: 12px 14px;
  color: #173f52 !important;
  background: #fff !important;
  border: 1px solid #bdced8 !important;
  border-radius: 6px;
  font-size: 16px;
  line-height: 1.5;
}

html[data-theme] .site-shell .helm-auth-page input::placeholder {
  color: #687f8d;
  opacity: 1;
}

.helm-auth-page :is(a, button, input, summary):focus-visible {
  outline: 3px solid #3a819b;
  outline-offset: 3px;
}

.helm-auth-page .auth-panel .btn {
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  max-width: 100%;
  min-width: 0;
  min-height: 48px;
  height: auto;
  margin: 0;
  padding: 12px 16px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.5;
  text-align: center;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: normal;
  text-transform: none;
  letter-spacing: normal;
  transform: none;
}

.helm-auth-page :is(.auth-submit-button, .auth-cta) {
  width: 100%;
}

.helm-auth-page .auth-switch-panel {
  display: grid;
  gap: 12px;
  margin: 0;
  padding-top: 20px;
  border-top: 1px solid #e0e8ed;
}

.helm-auth-page .auth-switch-panel > span {
  color: #526d7d;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.5;
  letter-spacing: 1px;
}

.helm-auth-page .auth-switch-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  width: 100%;
  min-width: 0;
}

.helm-auth-page .auth-switch-actions .auth-switch-link {
  flex: 1 1 180px;
  width: auto;
  min-width: 0;
  white-space: normal;
}

.helm-auth-page .auth-recovery-link {
  margin: 0;
  font-size: 14px;
  line-height: 1.6;
}

.helm-auth-page .auth-recovery-link a {
  color: #205b74;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.helm-auth-page .auth-email-code {
  min-width: 0;
  margin: 0;
  padding-top: 20px;
  border-top: 1px solid #e0e8ed;
}

html[data-theme] .site-shell .helm-auth-page .auth-email-code summary {
  color: #244e63;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.6;
  cursor: pointer;
}

.helm-auth-page .auth-email-code > :is(p, div, form) {
  margin-top: 16px;
}

html[data-theme] .site-shell .helm-auth-page :is(.error-banner, .success-banner, .compact-banner) {
  box-sizing: border-box;
  display: block;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  margin: 0;
  padding: 14px 16px;
  border: 1px solid #c7d9e4;
  border-radius: 6px;
  color: #294d60;
  background: #f0f6f9;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.65;
  overflow-wrap: anywhere;
}

html[data-theme] .site-shell .helm-auth-page .error-banner {
  color: #813b34;
  background: #fff4f2;
  border-color: #ebc9c3;
}

html[data-theme] .site-shell .helm-auth-page .success-banner {
  color: #275b49;
  background: #eff8f3;
  border-color: #c6dfd1;
}

.helm-auth-page :is(.error-banner, .success-banner, .compact-banner) strong {
  color: inherit;
  font-weight: 600;
}

.helm-auth-page :is(.error-banner, .success-banner, .compact-banner) .btn {
  width: auto;
  margin-top: 12px;
  margin-right: 8px;
}

.helm-auth-page [hidden] {
  display: none !important;
}

@media (max-width: 480px) {
  html[data-theme] .site-shell .helm-auth-page.section {
    padding: 24px 14px 40px;
  }

  html[data-theme] .site-shell .helm-auth-page .auth-panel {
    gap: 20px;
    padding: 24px 20px;
  }

  .helm-auth-page .auth-form {
    grid-template-columns: minmax(0, 1fr);
  }

  .helm-auth-page .auth-switch-actions .auth-switch-link {
    flex-basis: 100%;
  }

  .helm-auth-page .auth-card-brand {
    gap: 12px;
  }
}
