body {
  isolation: isolate;
  position: relative;
}

body::before {
  background:
    radial-gradient(circle at 20% 15%, color-mix(in srgb, var(--accent) 12%, transparent), transparent 32rem),
    radial-gradient(circle at 85% 80%, color-mix(in srgb, #14b8a6 9%, transparent), transparent 28rem);
  content: "";
  inset: 0;
  pointer-events: none;
  position: fixed;
  z-index: -1;
}

body > header {
  border-bottom: 0;
  margin-bottom: 0;
}

.auth-shell {
  display: grid;
  min-height: min(40rem, calc(100vh - 7.5rem));
  padding: clamp(1rem, 5vh, 3.5rem) 0 4rem;
  place-items: center;
}

.auth-card {
  background: color-mix(in srgb, var(--surface) 96%, transparent);
  border: 1px solid var(--line);
  border-radius: 1.35rem;
  box-shadow: var(--shadow);
  overflow: hidden;
  padding: clamp(1.5rem, 5vw, 2.25rem);
  position: relative;
  width: min(100%, 27rem);
}

.auth-card::before {
  background: linear-gradient(90deg, var(--accent), #14b8a6);
  content: "";
  height: .25rem;
  inset: 0 0 auto;
  position: absolute;
}

.auth-mark {
  align-items: center;
  background: linear-gradient(145deg, var(--accent), var(--accent-strong));
  border-radius: .85rem;
  box-shadow: 0 .65rem 1.5rem color-mix(in srgb, var(--accent) 22%, transparent);
  color: #fff;
  display: flex;
  font-size: 1rem;
  font-weight: 800;
  height: 2.75rem;
  justify-content: center;
  letter-spacing: -.04em;
  margin-bottom: 1.35rem;
  width: 2.75rem;
}

.auth-intro h2 {
  font-size: clamp(1.65rem, 5vw, 2rem);
  letter-spacing: -.04em;
  line-height: 1.15;
  margin: .25rem 0 .5rem;
}

.auth-intro > p:last-child {
  color: var(--muted);
  margin: 0;
}

.auth-eyebrow {
  color: var(--accent);
  font-size: .75rem;
  font-weight: 800;
  letter-spacing: .12em;
  margin: 0;
  text-transform: uppercase;
}

.auth-errors {
  background: color-mix(in srgb, #dc2626 9%, var(--surface));
  border: 1px solid color-mix(in srgb, #dc2626 35%, var(--line));
  border-radius: .7rem;
  color: color-mix(in srgb, #dc2626 88%, var(--text));
  font-size: .9rem;
  margin-top: 1.25rem;
  padding: .7rem .8rem;
}

.auth-errors p {
  margin: 0;
}

.auth-form {
  display: grid;
  gap: 1rem;
  margin-top: 1.65rem;
}

.auth-field {
  display: grid;
  gap: .4rem;
}

.auth-field label {
  font-size: .875rem;
  font-weight: 700;
}

.auth-field input {
  background: var(--surface);
  color: var(--text);
  max-width: none;
  min-height: 3rem;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

.auth-field input:hover {
  border-color: color-mix(in srgb, var(--accent) 45%, var(--line));
}

.auth-field input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 .2rem color-mix(in srgb, var(--accent) 13%, transparent);
}

.auth-field-errors {
  color: color-mix(in srgb, #dc2626 88%, var(--text));
  font-size: .82rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.auth-submit {
  margin-top: .25rem;
  min-height: 3rem;
  width: 100%;
}

.auth-submit svg {
  fill: none;
  height: 1.1rem;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
  width: 1.1rem;
}

.auth-switch {
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: .9rem;
  margin: 1.5rem 0 0;
  padding-top: 1.25rem;
  text-align: center;
}

.auth-switch a {
  font-weight: 750;
}

@media (max-width: 32rem) {
  body > header {
    min-height: 3rem;
  }

  .auth-shell {
    align-items: start;
    min-height: auto;
    padding-top: 1rem;
  }

  .auth-card {
    border-radius: 1rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .auth-field input {
    transition: none;
  }
}
