.auth-page {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background: var(--bg);
}

.auth-header {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  min-height: 4rem;
}

.auth-brand {
  justify-self: start;
  font-size: 1.125rem;
  font-weight: 750;
}

.auth-brand strong { color: var(--accent); }
.auth-brand__mark { width: 1.75rem; height: 1.75rem; fill: var(--accent); }
.auth-brand__mark .auth-brand__cut { fill: var(--bg); }
.auth-brand__mark circle[stroke-width] { stroke: var(--accent); }
.auth-brand__mark .auth-brand__line { fill: none; stroke: var(--bg); }

.auth-nav { display: flex; gap: clamp(0.75rem, 2vw, 1.5rem); }

.auth-nav a {
  color: var(--ink-soft);
  font-size: 0.875rem;
  font-weight: 550;
  text-decoration: none;
}

.auth-nav a:hover { color: var(--ink); text-decoration: underline; }

.auth-theme {
  justify-self: end;
  border-radius: var(--radius-sm);
}

.auth-theme svg { width: 1rem; height: 1rem; }
.auth-theme__moon, [data-theme="light"] .auth-theme__sun { display: none; }
[data-theme="light"] .auth-theme__moon { display: block; }

@media (prefers-color-scheme: light) {
  :root:not([data-theme]) .auth-theme__sun { display: none; }
  :root:not([data-theme]) .auth-theme__moon { display: block; }
}

.auth-main { flex: 1; padding-block: clamp(1.5rem, 4vw, 3rem); }
.auth-back { margin-block-end: 1.5rem; }

.auth-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: 1.5rem;
}

.auth-panel {
  display: grid;
  gap: 1.25rem;
  padding: clamp(1.25rem, 3vw, 2rem);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.auth-panel h1 {
  margin-block-end: 0.75rem;
  font-size: clamp(1.5rem, 3.5vw, 2.25rem);
  line-height: 1.18;
}

.auth-panel h2 { font-size: 1.5rem; scroll-margin-block-start: 5rem; }
.auth-panel h2:focus { outline: 2px solid var(--focus); outline-offset: 3px; }

.auth-kicker {
  margin-block-end: 0.4rem;
  color: var(--accent);
  font-size: 0.8125rem;
  font-weight: 650;
}

.auth-description { margin: 0; color: var(--ink-soft); }
.auth-card .auth-description { color: var(--muted); font-size: 0.9375rem; }

.auth-features {
  display: grid;
  gap: 0.65rem;
  margin: 0;
  padding: 1.25rem 0 0;
  border-top: 1px solid var(--line);
  color: var(--ink-soft);
  font-size: 0.875rem;
  list-style: none;
}

.auth-features li { display: flex; align-items: baseline; gap: 0.7rem; }
.auth-features li span { color: var(--accent); font: 650 0.8125rem/1.4 var(--mono); }

.auth-form { display: grid; gap: 1rem; margin: 0; }
.auth-field { display: grid; gap: 0.375rem; }
.auth-field label { color: var(--ink-soft); font-size: 0.875rem; font-weight: 600; }

.auth-field input {
  width: 100%;
  min-height: 2.75rem;
  padding: 0.55rem 0.75rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--bg);
  color: var(--ink);
  font: inherit;
}

.auth-field input::placeholder { color: var(--muted); }
.auth-password { position: relative; }
.auth-password input { padding-inline-end: 3rem; }

.auth-password__toggle {
  position: absolute;
  inset: 0 0.25rem 0 auto;
  display: grid;
  place-items: center;
  width: 2.5rem;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.auth-password__toggle[hidden] { display: none; }
.auth-password__toggle:hover { color: var(--ink); }
.auth-password__toggle svg, .auth-error svg { width: 1.125rem; height: 1.125rem; }
.auth-password__hide, [aria-pressed="true"] .auth-password__show { display: none; }
[aria-pressed="true"] .auth-password__hide { display: block; }

.auth-error {
  display: flex;
  gap: 0.625rem;
  padding: 0.75rem;
  border: 1px solid color-mix(in srgb, var(--danger) 45%, transparent);
  border-radius: var(--radius-sm);
  background: var(--danger-soft);
  color: var(--danger);
  font-size: 0.9375rem;
}

.auth-error svg { flex: none; margin-block-start: 0.125rem; }

.auth-help {
  margin: 0;
  padding-block-start: 1rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.8125rem;
}

@media (max-width: 63.99rem) {
  .auth-grid { grid-template-columns: 1fr; }
}

@media (max-width: 47.99rem) {
  .auth-header { grid-template-columns: 1fr auto; }
  .auth-nav { display: none; }
}
