/* Sign-in and other auth pages (templates/auth_base.html). Form first in the DOM; a still brand panel on the left on
   wide screens. The form is the page: the only motion answers what the person does (inline messages). */
.auth { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1fr); background: var(--bg); }
.auth__form { padding: 1rem 1rem 2rem; display: flex; flex-direction: column; align-items: center; gap: 1rem; }
.auth__mhead { width: 100%; max-width: 400px; display: flex; flex-direction: column; gap: .15rem; }
.auth__tagline { margin: 0; color: var(--ink-2); font-size: var(--fs-14); font-weight: 600; }
.auth__card { width: 100%; max-width: 400px; }
.auth__card > .card { padding: 1.4rem; margin-bottom: .75rem; }
.auth__card h1 { font-size: 1.6rem; margin-bottom: .25rem; }
.auth__sub { color: var(--ink-2); margin-bottom: 1.1rem; }
.auth__step { font-size: var(--fs-14); font-weight: 600; color: var(--ink-3); margin: 0 0 .5rem; }
.auth input[type=email], .auth input[type=password], .auth input[type=text] { min-height: 48px; font-size: 1rem; }
.auth .btn--block { min-height: 50px; font-size: 1rem; }
.auth .btn[aria-busy=true] { opacity: .8; cursor: progress; }
.auth__next { margin: 0 0 1.1rem; padding-left: 1.2rem; font-size: var(--fs-14); color: var(--ink-2); }
.auth__next li { margin-bottom: .3rem; }
.auth__alt { margin: 1rem 0 0; padding-top: 1rem; border-top: 1px solid var(--line-2); font-size: var(--fs-14); }
.auth__links { display: flex; flex-wrap: wrap; justify-content: center; gap: .25rem 1rem; font-size: var(--fs-14); padding: .25rem 0; }
.auth__links a { overflow-wrap: anywhere; }
.auth__about { width: 100%; max-width: 400px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: .85rem 1rem; font-size: var(--fs-14); }
.auth__about summary { min-height: 28px; }
.auth__about ol { padding-left: 1.2rem; font-weight: 600; }
.auth__note { font-size: var(--fs-14); }
.pw-wrap { position: relative; }
.pw-wrap input { padding-right: 4.6rem; }
.pw-toggle { position: absolute; right: 2px; top: 2px; bottom: 2px; min-width: 64px; border: 0; border-radius: 8px; background: var(--surface-2); color: var(--brand); font: inherit; font-size: var(--fs-14); font-weight: 800; cursor: pointer; }
.pw-toggle[aria-pressed=true] { background: var(--brand-soft); }
.caps-hint { margin: .35rem 0 0; font-size: .82rem; font-weight: 700; color: var(--warn); }
.pw-rules { list-style: none; margin: -.4rem 0 1rem; padding: 0; font-size: .82rem; color: var(--ink-2); }
.pw-rules li { display: flex; gap: .4rem; align-items: center; margin-top: .2rem; }
.pw-rules li::before { content: ""; width: .8rem; height: .8rem; border-radius: 50%; border: 2px solid var(--line-strong); flex: none; }
.pw-rules li.is-met { color: var(--ok); font-weight: 700; }
.pw-note { margin: -.6rem 0 1rem; font-size: .8rem; color: var(--ink-3); }
.pw-rules li.is-met::before { border-color: var(--ok); background: var(--ok); box-shadow: inset 0 0 0 2px #fff; }
.qr svg, .qr img { max-width: 100%; height: auto; }

/* ---------- brand panel (≥ 768 px): navy, the official reverse symbol large and cropped by the edge, one line. Still. */
.auth__show { display: none; position: relative; overflow: hidden; background: var(--navy-900); color: var(--on-navy-2); }
.show__mark { position: absolute; left: -14%; bottom: -16%; width: 118%; max-width: none; height: auto; opacity: .16; pointer-events: none; }
.show__in { position: relative; z-index: 1; height: 100%; display: flex; flex-direction: column; justify-content: space-between; gap: 2rem; padding: 2rem 2.25rem 2.5rem; }
.show__in .brand { align-self: flex-start; }
.show__in .brand:focus-visible { outline-color: #fff; }
.show__lead { color: #fff; font-size: clamp(1.9rem, 3.4vw, 2.8rem); font-weight: 800; line-height: 1.08; letter-spacing: -.035em; margin: auto 0 0; max-width: 11ch; }
.show__sub { margin: -1rem 0 0; font-size: var(--fs-14); font-weight: 600; max-width: 30ch; }

@media (min-width: 768px) {
  .auth { grid-template-columns: minmax(0, 40fr) minmax(0, 60fr); }
  .auth__show { display: block; grid-column: 1; grid-row: 1; }
  .auth__form { grid-column: 2; grid-row: 1; justify-content: center; padding: 2rem 1.5rem; background: var(--surface); }
  .auth__mhead, .auth__about { display: none; }
  .auth__card > .card { border: 0; box-shadow: none; padding: 0; }
}
@media (min-width: 1200px) { .auth { grid-template-columns: minmax(0, 36fr) minmax(0, 64fr); } .show__in { padding: 2.5rem 3rem 3rem; } }

/* inline field messages (forms with data-validate): say what to fix; appear when a field is left */
.field-msg { margin: .35rem 0 0; font-size: var(--fs-14); font-weight: 600; color: var(--bad); }
.field.is-valid > label::after { content: ""; display: inline-block; width: .7em; height: .38em; margin-left: .45rem; border: solid var(--ok); border-width: 0 0 2px 2px; transform: translateY(-.2em) rotate(-45deg); }
.auth input[aria-invalid=true] { border-color: var(--bad); }
@media (prefers-reduced-motion: no-preference) {
  .field-msg:not([hidden]) { animation: wz-msg .18s var(--ease); }
  .field.is-valid > label::after { animation: wz-tick .2s var(--ease); }
}
@keyframes wz-msg { from { opacity: 0; transform: translateY(-4px); } }
@keyframes wz-tick { from { opacity: 0; transform: translateY(-.2em) rotate(-45deg) scale(.4); } }
@media (max-width: 359px) { .auth__form { padding: .75rem .6rem 1.5rem; } .auth__card > .card { padding: 1rem; } .auth__card h1 { font-size: clamp(1.35rem, 7vw, 1.6rem); } }
.auth__next { font-size: .85rem; } .auth__next li { margin-bottom: .15rem; }
.pw-rules { margin-top: -.25rem; }

/* ---------- minimalist sign-in */
.signin h1 { margin-bottom: 1.1rem; }
.signin__links { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem 1rem; margin: 1rem 0 0; font-size: var(--fs-14); font-weight: 700; }
.signin__links span { color: var(--ink-3); font-weight: 600; }
.signin__trust { display: flex; justify-content: center; align-items: center; gap: .35rem; margin: 1.1rem 0 0; font-size: var(--fs-12); font-weight: 700; color: var(--ink-3); }
.signin__trust svg { color: var(--teal-ink); }
.auth-page--register .auth__step { margin: 1rem 0 0; }
