body[data-mode="formal"][data-view="auth"] .portal > .heading,
body[data-mode="formal"][data-view="auth"] .portal > .intro { display: none; }

.formal-auth-shell {
  display: grid;
  grid-template-columns: minmax(0, .93fr) minmax(0, 1.07fr);
  margin: 24px auto 0;
  max-width: 1040px;
  background: var(--ly-surface);
  border: 1px solid var(--ly-border);
  border-radius: 12px;
  overflow: hidden;
  min-height: 520px;
}
.formal-brand { min-width: 0; }
@media (min-width: 761px) {
  .formal-brand {
    background: #faf8f4 url("assets/intake-access-panel.webp") 30% 50% / cover no-repeat;
  }
}
.formal-auth-panel {
  width: min(100%, 492px);
  align-self: center;
  justify-self: center;
  min-width: 0;
  padding: 40px 32px;
}
.formal-auth-panel form { display: grid; gap: 16px; }
.formal-form-heading h1 { margin: 0; }
.formal-form-heading p { color: var(--ly-text-muted); margin: 8px 0 0; }
.formal-form-heading { margin-bottom: 6px; }
.formal-submit { width: 100%; min-height: 44px; }
.formal-login-footer { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 16px; color: var(--ly-text-muted); }
.formal-environment { color: var(--ly-text-muted); margin: 18px 0 0; font-size: 13px; }
.formal-environment:empty { display: none; }
.formal-progress {
  list-style: none; margin: 16px 0;
  padding: 0; display: flex; align-items: center; justify-content: space-between; gap: 8px;
  border-bottom: 1px solid var(--ly-border);
}
.formal-progress li { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 0 0 8px; color: var(--ly-text-secondary); flex: 1; }
.formal-progress li[aria-current="step"] { color: var(--ly-primary-hover); border-bottom: 2px solid var(--ly-primary); font-weight: 600; }
.formal-progress li span { display: inline-grid; width: 23px; height: 23px; place-items: center; border-radius: 50%; background: var(--ly-surface-soft); }
.formal-progress li[aria-current="step"] span { background: var(--ly-selected-bg); }
.formal-code-field { display: grid; gap: var(--ly-space-label); }
.formal-code-entry { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 8px; }
.formal-code-note { color: var(--ly-text-secondary); padding: 8px; margin: 0; background: var(--ly-surface-soft); border-radius: 6px; }
.formal-auth-panel .registration-error { margin: 0; }
.formal-verified { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; color: var(--ly-success); background: var(--ly-success-bg); border-radius: 6px; padding: 8px; }
.formal-verified strong { font-weight: 600; white-space: nowrap; }
#pending-application { overflow-wrap: anywhere; }
@media (max-width: 760px) {
  .formal-auth-shell { grid-template-columns: minmax(0,1fr); margin: 12px auto 0; min-height: 0; }
  .formal-brand { display: none; }

  .formal-auth-panel { padding: 20px 16px; }
  .formal-auth-panel form { gap: 12px; }
}
.formal-login-options { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.formal-login-options a, .text-action { display: inline-flex; align-items: center; min-height: 44px; color: var(--ly-primary-hover); }
.text-action { padding: 4px 0; border: 0; background: transparent; text-decoration: underline; text-underline-offset: 3px; }
.text-action:hover { background: transparent; }
.password-entry { display: flex; align-items: stretch; gap: 8px; min-width: 0; }
.password-entry input { min-width: 0; flex: 1; }
.password-entry button { flex: 0 0 52px; padding: 6px 8px; }
#formal-recovery .formal-form-heading { margin-bottom: 16px; }
#recovery-password-help { margin: 0; }
