/* OWNER: B1. Sign-in, starter, reset, verify and two-step pages. Builds on base.css tokens and never redefines them.
   Phone first: one column, 16px gutters from .wrap, 44px touch targets from --tap.
   Brand pass (2026-11-09): the sign-in page pairs the form with an indigo panel in the mark's colors. */

.auth-card { max-width: 520px; margin-left: auto; margin-right: auto; }
.auth-card h1 { font-size: clamp(1.6rem, 1.4rem + 0.8vw, 1.95rem); }
/* The leading icon sits above the title on these short pages. */
.auth-card h1:has(> .icon:first-child) { display: block; }
.auth-card h1 > .icon:first-child { display: block; margin: 0 0 var(--space-3); font-size: 1.45rem; }
.auth-card .lead { font-size: var(--text-lg); }
.auth-form { margin-top: var(--space-5); }
.auth-form .btn-wide { width: 100%; justify-content: center; margin-top: var(--space-2); min-height: 50px; font-size: 1.05rem; }
.auth-links { margin-top: var(--space-4); margin-bottom: 0; }
.auth-links a { display: inline-flex; min-height: var(--tap); align-items: center; }

/* No rule above a group: on a fieldset it would run through the legend. Space separates the groups instead. */
.auth-group { border-top: 0; padding-top: 0; margin-top: var(--space-6); }
.auth-group:first-of-type { border-top: 0; padding-top: 0; margin-top: 0; }
.auth-group > legend { font-size: var(--text-lg); margin-bottom: var(--space-3); padding: 0; }

.password-row { display: flex; gap: var(--space-2); align-items: stretch; }
.password-row input { flex: 1 1 auto; min-width: 0; }
.btn-toggle { flex: none; min-width: 76px; justify-content: center; }

.error-summary p { margin-bottom: var(--space-2); }
.error-summary ul { margin: 0; padding-left: var(--space-5); font-weight: 600; }
input[aria-invalid="true"] { border-color: var(--bad); border-width: 2px; }

.code-input { font-family: var(--mono); font-size: 1.4rem; letter-spacing: 0.25em; max-width: 12rem; }

.steps { padding-left: var(--space-5); margin: 0 0 var(--space-4); }
.steps > li { margin-bottom: var(--space-3); }
.secret-key {
  font-family: var(--mono); font-size: 1.15rem; letter-spacing: 0.06em; word-spacing: 0.3em;
  background: var(--surface-2); border: 1px dashed var(--line-strong); border-radius: var(--radius-sm);
  padding: var(--space-3); margin: var(--space-2) 0; overflow-wrap: anywhere; user-select: all;
}

/* Sign in: the form first (it is the job), the brand panel after it on a phone and beside it on a wide screen. */
.auth-split { display: grid; gap: var(--space-5); align-items: stretch; }
.auth-split .auth-card { margin: 0 auto; width: 100%; }
.auth-hero {
  position: relative; overflow: hidden; border-radius: var(--radius); padding: var(--space-6) var(--space-5);
  background-color: var(--night);
  background-image: var(--pattern), radial-gradient(120% 90% at 100% 0%, rgba(25, 216, 169, 0.22), transparent 60%),
    radial-gradient(90% 80% at 0% 100%, rgba(185, 15, 138, 0.22), transparent 60%);
  background-repeat: no-repeat; background-size: 340px 340px, auto, auto; background-position: right -110px bottom -110px, 0 0, 0 0;
  color: var(--night-ink);
}
.auth-hero::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: var(--brand-line); }
.auth-hero .eyebrow { color: var(--gold); }
.auth-hero h2 { color: #ffffff; font-size: clamp(1.7rem, 1.3rem + 1.6vw, 2.4rem); line-height: 1.1; margin-bottom: var(--space-3); max-width: 14ch; }
.auth-hero > p { color: var(--night-muted); font-size: var(--text-lg); max-width: 38ch; }
.hero-points { list-style: none; margin: var(--space-5) 0 0; padding: 0; display: grid; gap: var(--space-3); }
.hero-points li { display: flex; gap: var(--space-3); align-items: flex-start; color: var(--night-ink); font-weight: 600; }
.hero-points .icon {
  box-sizing: content-box; width: 18px; height: 18px; padding: 7px; border-radius: 10px; margin-top: -4px;
  background: rgba(255, 255, 255, 0.08); color: var(--teal);
}

@media (min-width: 640px) {
  .auth-card { margin-top: var(--space-5); }
  .auth-split .auth-card { margin-top: 0; }
}
@media (min-width: 900px) {
  .auth-split { grid-template-columns: 1.05fr 1fr; gap: var(--space-6); padding-top: var(--space-3); }
  .auth-split .auth-hero { order: -1; padding: var(--space-7) var(--space-6); min-height: 480px; display: flex; flex-direction: column; justify-content: center; }
  .auth-split .auth-card { align-self: center; padding: var(--space-6); }
}
