/* Auth card (phase-6 spec §2): one centred card for every sign-in screen.
   Reads openf1-tokens.css only — no hex here, so both themes come from the tokens. */
.of-auth{
  min-height:100vh;margin:0;display:flex;flex-direction:column;align-items:center;justify-content:center;
  gap:var(--of-space-4);padding:var(--of-space-5) var(--of-space-4);box-sizing:border-box;
  background:var(--of-bg);color:var(--of-text);font-family:var(--of-font);
  font-size:var(--of-fs-body);line-height:var(--of-lh-body);
}
.of-auth *,.of-auth *::before,.of-auth *::after{box-sizing:border-box}
/* The notices and field groups set display:flex/grid, which would beat the UA's [hidden]. */
.of-auth [hidden]{display:none!important}
.of-auth__card{
  width:100%;max-width:400px;padding:var(--of-space-6);background:var(--of-surface);
  border:1px solid var(--of-border);border-top:3px solid var(--of-brand);border-radius:var(--of-radius-lg);
}
.of-auth--recovery .of-auth__card{border-top-color:var(--of-warning)}
.of-auth__overline{
  margin:0 0 var(--of-space-2);font-family:var(--of-mono);font-size:var(--of-fs-xs);line-height:var(--of-lh-xs);
  font-weight:700;letter-spacing:.06em;text-transform:uppercase;color:var(--of-text-muted);
}
.of-auth__title{margin:0;font-size:var(--of-fs-h1);line-height:var(--of-lh-h1);font-weight:700}
.of-auth__lede{margin:var(--of-space-2) 0 var(--of-space-5);color:var(--of-text-muted)}
.of-auth__form{display:grid;gap:var(--of-space-4)}
.of-auth__field{display:grid;gap:var(--of-space-1)}
.of-auth__label{font-size:var(--of-fs-sm);line-height:var(--of-lh-sm);font-weight:600}
.of-auth__hint{margin:0;font-size:var(--of-fs-sm);line-height:var(--of-lh-sm);color:var(--of-text-muted)}
.of-auth__input{
  width:100%;min-height:var(--of-touch);padding:0 var(--of-space-3);border:1px solid var(--of-border-input);
  border-radius:var(--of-radius);background:var(--of-surface);color:var(--of-text);font:inherit;
  scroll-margin-bottom:96px;
}
.of-auth__input:hover{border-color:var(--of-text-muted)}
.of-auth__input:focus-visible{outline:2px solid var(--of-focus);outline-offset:2px}
.of-auth__input:disabled{opacity:.5;cursor:not-allowed}
.of-auth__password{display:flex;gap:var(--of-space-2)}
.of-auth__password .of-auth__input{flex:1 1 auto;min-width:0}
.of-auth__reveal{flex-shrink:0;min-width:var(--of-touch)}
.of-auth__caps{color:var(--of-warning)}
.of-auth__captcha{display:flex;align-items:center;gap:var(--of-space-2)}
.of-auth__captcha img{display:block;max-width:100%;height:auto;border-radius:var(--of-radius);border:1px solid var(--of-border)}
.of-auth__submit{width:100%}
.of-auth__submit:disabled{opacity:.5;cursor:not-allowed}
.of-auth__submit:disabled:hover{background:var(--of-accent)}

/* Notices: colour is never the only signal, so each carries an icon and words. */
.of-auth__notice{
  display:flex;gap:var(--of-space-2);align-items:flex-start;margin:0 0 var(--of-space-4);
  padding:var(--of-space-3);border-radius:var(--of-radius);border:1px solid var(--of-notice-c);
  background:color-mix(in srgb,var(--of-notice-c) var(--of-tint-pill),var(--of-surface));
  font-size:var(--of-fs-sm);line-height:var(--of-lh-sm);scroll-margin-top:64px;
}
.of-auth__notice:focus{outline:2px solid var(--of-focus);outline-offset:2px}
.of-auth__notice i{color:var(--of-notice-c);margin-top:2px}
.of-auth__notice--error{--of-notice-c:var(--of-danger);font-weight:600}
.of-auth__notice--warning{--of-notice-c:var(--of-warning)}
.of-auth__notice--info{--of-notice-c:var(--of-info)}

.of-auth__strip{
  margin:0;font-family:var(--of-mono);font-size:var(--of-fs-xs);line-height:var(--of-lh-xs);color:var(--of-text-muted);
}
.of-auth__strip a{color:var(--of-brand)}
.of-auth__strip a:focus-visible{outline:2px solid var(--of-focus);outline-offset:2px}
.of-auth__spinner{display:none}
.of-auth__submit[aria-busy=true] .of-auth__spinner{display:inline-block;animation:of-auth-spin 1s linear infinite}
@keyframes of-auth-spin{to{transform:rotate(360deg)}}

@media (max-width:390px){
  .of-auth{justify-content:flex-start;padding:var(--of-space-4)}
  .of-auth__card{padding:var(--of-space-5) var(--of-space-4)}
  .of-auth__input{font-size:16px}
}
@media (prefers-reduced-motion:reduce){
  .of-auth__submit[aria-busy=true] .of-auth__spinner{animation:none}
}
