:root { color-scheme: light; }
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; display: grid; place-items: center; padding: 24px; background: var(--bg); }
.auth-card { width: min(100%, 488px); padding: 34px 36px 36px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 12px 34px rgba(21, 35, 49, .045); }
.auth-brand { display: inline-flex; align-items: baseline; gap: 0; margin: 0 0 28px; color: var(--ink); font-size: 26px; font-weight: 780; letter-spacing: -.035em; line-height: 1; text-decoration: none; }
.auth-brand span { color: var(--accent); }
.auth-mode-switch { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; margin: 0 0 28px; padding: 4px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface-2); }
.auth-mode-switch a { display: grid; min-height: 40px; place-items: center; padding: 0 12px; border-radius: 6px; color: var(--muted); font-size: 14px; font-weight: 700; text-decoration: none; }
.auth-mode-switch a:hover { color: var(--accent-strong); background: var(--surface); }
.auth-mode-switch a[aria-current="page"] { color: var(--ink); background: var(--surface); box-shadow: 0 1px 4px rgba(21, 35, 49, .12); }
h1 { margin: 0 0 12px; font-size: 28px; line-height: 1.2; letter-spacing: -.025em; }
p { line-height: 1.5; }
.auth-intro, .auth-note, .auth-field-help, .auth-secondary-copy { color: var(--muted); }
.auth-intro { margin: 0 0 24px; }
.auth-form { display: grid; gap: 18px; }
.auth-field { display: grid; gap: 7px; min-width: 0; }
.auth-field label, .auth-consent label { font-weight: 650; }
.auth-field input:not([type="hidden"]) { width: 100%; min-height: 48px; border: 1px solid #bbcbd5; border-radius: 7px; padding: 11px 12px; color: var(--ink); background: #fbfcfd; font: inherit; }
.auth-field input:focus { outline: 3px solid #c3e4dc; outline-offset: 1px; border-color: #177562; }
.auth-field-help { margin: 0; font-size: 12px; line-height: 1.45; }
.auth-consent { display: grid; grid-template-columns: 20px minmax(0, 1fr); align-items: start; gap: 10px; }
.auth-consent input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--accent); }
.auth-consent label { font-size: 13px; line-height: 1.45; }
.auth-primary, .auth-secondary { display: grid; width: 100%; min-height: 48px; place-items: center; padding: 0 16px; border-radius: 7px; font: inherit; font-weight: 700; text-align: center; text-decoration: none; cursor: pointer; }
.auth-primary { margin-top: 6px; border: 1px solid var(--accent); color: #fff; background: var(--accent); }
.auth-primary:hover { border-color: var(--accent-strong); background: var(--accent-strong); }
.auth-secondary { border: 1px solid var(--line-strong); color: var(--ink); background: var(--surface); }
.auth-secondary:hover { color: var(--accent-strong); border-color: #9ec3b9; }
.auth-primary:focus-visible, .auth-secondary:focus-visible, .auth-mode-switch a:focus-visible, .auth-brand:focus-visible { outline: 3px solid #172b3b; outline-offset: 3px; }
.errorlist { margin: 0; padding-left: 20px; color: #9f302d; font-size: 13px; line-height: 1.45; }
.auth-errors { padding: 12px 14px; border: 1px solid #efc0bc; border-radius: 8px; color: #8b3733; background: var(--danger-soft); }
.auth-errors .errorlist { padding-left: 18px; }
.auth-note { margin: 24px 0 0; font-size: 13px; }
.auth-help-link { color: var(--accent-strong); font-weight: 650; text-underline-offset: 3px; }
.auth-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 26px 0; padding: 0; list-style: none; counter-reset: auth-step; }
.auth-steps li { position: relative; min-width: 0; padding-top: 30px; color: var(--muted); font-size: 11px; line-height: 1.35; counter-increment: auth-step; }
.auth-steps li::before { position: absolute; top: 0; left: 0; display: grid; width: 23px; height: 23px; place-items: center; border: 1px solid var(--line-strong); border-radius: 50%; content: counter(auth-step); background: var(--surface); font-size: 11px; font-weight: 750; }
.auth-steps li:not(:last-child)::after { position: absolute; top: 11px; right: 2px; left: 31px; height: 1px; content: ""; background: var(--line); }
.auth-steps li.complete::before { color: #fff; border-color: var(--accent); background: var(--accent); }
.auth-steps li.current { color: var(--ink); font-weight: 700; }
.auth-steps li.current::before { color: var(--accent-strong); border-color: var(--accent); background: var(--accent-soft); box-shadow: 0 0 0 3px rgba(22, 112, 92, .09); }
.auth-state { margin: 0 0 24px; }
.auth-state-mark { display: grid; width: 48px; height: 48px; place-items: center; margin-bottom: 18px; border-radius: 50%; color: var(--accent-strong); background: var(--accent-soft); }
.auth-state-mark.warning { color: #8b5e18; background: var(--warning-soft); }
.auth-state-mark.error { color: #913b37; background: var(--danger-soft); }
.auth-state-mark svg { width: 23px; height: 23px; }
.auth-state p { margin: 0; color: var(--muted); }
.auth-email { display: inline-block; max-width: 100%; margin: 14px 0 0; padding: 7px 10px; overflow-wrap: anywhere; border-radius: 6px; color: #3f5362; background: var(--surface-2); font-size: 13px; font-weight: 650; }
.auth-actions { display: grid; gap: 10px; }
.auth-actions-spaced { margin-top: 20px; }
.auth-resend { display: grid; gap: 12px; margin-top: 22px; padding-top: 22px; border-top: 1px solid var(--line); }
.auth-resend label { font-size: 13px; font-weight: 650; }
.auth-secondary-copy { margin: 0; font-size: 12px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
@media (max-width: 520px) {
  body { display: block; padding: 0; background: var(--surface); }
  .auth-card { width: 100%; min-height: 100vh; padding: 28px 22px 32px; border: 0; border-radius: 0; box-shadow: none; }
  .auth-brand { font-size: 25px; }
  h1 { font-size: 26px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; } }
