.auth-shell {
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.auth-shell__brand {
  background: var(--text-primary);
  color: var(--on-dark-surface);
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: var(--sp-8);
  overflow: hidden;
}

[data-theme='dark'] .auth-shell__brand { background: var(--bg-sunken); }

.auth-shell__brand::before {
  content: '';
  position: absolute;
  top: -30%;
  right: -20%;
  width: 70%;
  height: 70%;
  background: radial-gradient(circle, var(--brand) 0%, transparent 70%);
  opacity: 0.35;
  filter: blur(10px);
}

.auth-shell__mark {
  font-family: var(--font-display);
  font-size: var(--fs-2);
  font-weight: var(--fw-extrabold);
  letter-spacing: var(--ls-snug);
  color: var(--on-dark-surface);
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  margin: 0;
}

.auth-shell__pitch {
  position: relative;
  z-index: 1;
}

.auth-shell__pitch h2 {
  color: var(--on-dark-surface);
  font-size: var(--fs-5);
  font-weight: var(--fw-extrabold);
  line-height: var(--lh-tight);
  letter-spacing: var(--ls-tight);
  max-width: 10ch;
}

.auth-shell__pitch p {
  color: var(--on-dark-surface-muted);
  max-width: 32ch;
  font-size: var(--fs-1);
}

.auth-shell__badges {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
  margin-top: var(--sp-5);
  position: relative;
  z-index: 1;
}

/* Badge variant for the always-dark auth brand panel. Uses the
   same fixed on-dark-surface tokens as the rest of the panel —
   never the theme-flipping --bg-sunken/--text-tertiary pair,
   which is exactly what caused the Phase 2.1 invisible-text bug. */
.badge-on-dark {
  background: hsl(0 0% 100% / 0.08);
  color: var(--on-dark-surface-muted);
  border: 1px solid hsl(0 0% 100% / 0.16);
}

.auth-shell__panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--sp-6);
  position: relative;
}

.auth-shell__topbar {
  position: absolute;
  top: var(--sp-5);
  right: var(--sp-5);
  z-index: 2;
}

.auth-form {
  width: 100%;
  max-width: 380px;
}

.auth-form fieldset {
  border: none;
  padding: 0;
  margin: 0;
  min-width: 0;
}

.step-progress {
  display: flex;
  gap: var(--sp-2);
  margin-bottom: var(--sp-5);
}

.step-progress__seg {
  height: 4px;
  flex: 1;
  border-radius: var(--r-full);
  background: var(--border);
  transition: background var(--dur-med) var(--ease);
}

.step-progress__seg.is-active { background: var(--brand-strong); }

.auth-form .eyebrow { margin-bottom: var(--sp-2); }
.auth-form h1 { font-size: var(--fs-3); margin-bottom: var(--sp-1); }
.auth-form > p { margin-bottom: var(--sp-6); }

.auth-form__footer {
  text-align: center;
  margin-top: var(--sp-5);
  font-size: var(--fs-00);
  color: var(--text-tertiary);
}

/* ============================================================
   RESPONSIVE — auth shell stacks vertically below tablet width.
   The brand panel becomes a compact header band instead of
   vanishing, so the page never loses its identity on mobile.
   Type sizes are fluid (clamp()) so most of this pass is layout
   only, not font-size firefighting per breakpoint.
   ============================================================ */
@media (max-width: 860px) {
  .auth-shell {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr;
  }

  .auth-shell__brand {
    padding: var(--sp-6) var(--sp-5);
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: var(--sp-4);
  }

  .auth-shell__pitch h2 { max-width: 16ch; }
  .auth-shell__pitch p,
  .auth-shell__badges { display: none; } /* keep the compact header lean */

  .auth-shell__panel {
    padding: var(--sp-6) var(--sp-5) var(--sp-8);
    align-items: flex-start;
  }

  .auth-shell__topbar {
    position: static;
    align-self: flex-start;
    margin-bottom: var(--sp-5);
  }

  .auth-form { max-width: none; }
}

@media (max-width: 480px) {
  .auth-shell__brand { padding: var(--sp-5) var(--sp-4); }
  .auth-shell__pitch h2 { max-width: 14ch; }
  .auth-shell__panel { padding: var(--sp-5) var(--sp-4) var(--sp-7); }
  .auth-shell__mark { font-size: var(--fs-1); }
  .brand-mark { width: 22px; height: 22px; }
}

/* Required-field indicator (Fix-4, §8) — used on the public Admission form
   where some fields are required and some are optional, unlike most other
   forms in the app where every field is required by default. */
.field-required {
  color: var(--danger-strong);
  margin-left: 2px;
}
