.auth-flow {
  color-scheme: dark;
  --paper: #100c19;
  --ink: #fbf7ff;
  --accent: #d1b6ff;
  --accent-strong: #e4d2ff;
  --accent-ink: #201235;
  --muted: #c8bdd6;
  --rule: #4b385e;
  min-height: 100vh;
  background: var(--paper);
  color: var(--ink);
}
.auth-flow :focus-visible { outline-color: #ae80ec; }
.auth-header, main { width: min(1030px, calc(100% - 64px)); margin-inline: auto; }
.auth-header {
  display: flex;
  min-height: 72px;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border-bottom: 1px solid var(--rule);
}
.auth-flow .brand-mark { border: 0; border-radius: 50%; background: #302040; color: var(--accent); }
.back-link { color: var(--muted); font-size: .9375rem; text-decoration: none; }
.back-link:hover { color: var(--ink); text-decoration: underline; }
main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 1.1fr);
  align-items: start;
  gap: clamp(20px, 6vw, 75px);
  padding-block: clamp(32px, 7vw, 78px);
}
.auth-context {
  min-width: 0;
  padding: clamp(21px, 3.6vw, 39px);
  border-radius: 16px;
  background: linear-gradient(140deg, #21152efc 24%, #21152ed5 68%, #21152ec7), url("./knight-study.jpg") 76% 49% / cover;
  color: #f8f0ff;
}
.auth-context-title { margin: 0; font: 400 clamp(2.6rem, 5vw, 4.8rem)/.92 var(--display); letter-spacing: -.028em; }
.auth-steps { display: grid; gap: 12px; margin: 21px 0 0; padding: 0; list-style: none; }
.auth-steps li { display: grid; gap: 4px; padding: 9px 12px; border: 1px solid #58446d; border-radius: 9px; }
.auth-steps li[aria-current="step"] { border-color: #bd95f3; color: var(--accent); }
.auth-steps span { color: #cbb7dc; font-size: .875rem; line-height: 1.45; }
.auth-flow:not([data-auth-mode="signup"]) .auth-steps { display: none; }
.auth-card {
  padding: clamp(19px, 3.1vw, 34px);
  border: 1px solid #654c7c;
  border-radius: 16px;
  background: #241930;
  box-shadow: 0 16px 42px #07030b7a;
}
h1 { margin: 0 0 .5rem; font: 400 clamp(3.05rem, 4.9vw, 4.45rem)/.94 var(--display); letter-spacing: -.027em; }
#mode-switch { margin: 0 0 18px; color: var(--muted); line-height: 1.5; }
#mode-switch a, .help a { color: #dcc0ff; font-weight: 600; text-underline-offset: .2em; }
.actions, .providers { display: grid; gap: 8px; margin-block: 13px; }
.auth-card button, .providers > a { width: 100%; }
.providers > a, .auth-card button:not(.button):not(.text-button) {
  display: grid;
  min-height: 47px;
  place-items: center;
  padding: .64rem .8rem;
  border: 1px solid #7a5f97;
  border-radius: 8px;
  background: #2c1e3a;
  color: #fdf5ff;
  font: 600 .9375rem/1.35 Geist, system-ui, sans-serif;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}
.providers > a[data-provider="google"] { background: #e5d6f9; color: #241334; border-color: #e5d6f9; }
.providers > a[data-provider="google"]:hover { background: #f1e4ff; }
.providers > a:hover, .auth-card button:not(.button):hover:not(:disabled) { border-color: #ae80ec; }
.auth-flow .button.primary { box-shadow: none; border-color: #b792e6; }
.auth-card button:disabled { opacity: .57; cursor: wait; }
.email-divider { display: flex; align-items: center; gap: 11px; margin-block: 14px; color: var(--muted); font-size: .875rem; }
.email-divider::before, .email-divider::after { flex: 1; height: 1px; background: var(--rule); content: ""; }
.help, #signin-status { color: var(--muted); font-size: .9rem; line-height: 1.55; overflow-wrap: anywhere; }
#signin-status { padding: 9px 12px; border: 1px solid #70518d; border-radius: 8px; background: #39294a; color: #f2e5fc; }
#signin-status:empty { display: none; }
.policy { margin: 15px 0 0; }
details { margin-block: 14px; color: #c8bdd6; font-size: .9375rem; }
summary { padding-block: 7px; cursor: pointer; }
summary:hover { color: var(--ink); }
form, #replacement-code { margin-block: 13px; }
label, input { display: block; }
label { font-size: .9375rem; font-weight: 620; }
input {
  width: 100%;
  min-height: 46px;
  margin-block: 6px 11px;
  padding: .69rem .75rem;
  border: 1px solid #7a5f97;
  border-radius: 8px;
  background: #171020;
  color: var(--ink);
}
input::placeholder { color: #ad9abf; }
#email-code { font-variant-numeric: tabular-nums; letter-spacing: .18em; }
.text-button { min-height: 44px; border: 0; background: transparent; color: #dcc0ff; text-decoration: underline; text-underline-offset: .2em; cursor: pointer; }
@media (max-width: 730px) {
  .auth-header, main { width: calc(100% - 32px); }
  .auth-header { min-height: 61px; }
  main { grid-template-columns: minmax(0, 1fr); gap: 17px; padding-block: 22px 36px; }
  .auth-card { grid-row: 1; }
}
