:root {
  --auth-paper: var(--brand-off-white);
  --auth-paper-bright: var(--brand-canvas);
  --auth-rule: var(--brand-line);
  --auth-ink: var(--brand-charcoal);
  --auth-accent: var(--brand-blue-700);
  --auth-accent-dark: var(--brand-blue-700);
  --auth-coral: var(--brand-magenta-600);
  --auth-serif: Iowan Old Style, Baskerville, "Times New Roman", serif;
  --auth-sans: "Segoe UI Variable", "Segoe UI", system-ui, sans-serif;
}

.auth-body {
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  display: grid;
  place-items: center;
  padding: clamp(1.25rem, 3vw, 3rem);
  background:
    radial-gradient(circle at 78% 12%, rgb(255 255 255 / 74%), transparent 32rem),
    linear-gradient(135deg, var(--brand-canvas), var(--brand-canvas) 58%, var(--brand-canvas));
  color: var(--auth-ink);
  font-family: var(--auth-sans);
}

.auth-body::before {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.03'/%3E%3C/svg%3E");
  content: "";
}

.auth-shell {
  position: relative;
  z-index: 1;
  width: min(88rem, 100%);
  min-height: min(790px, calc(100dvh - 3rem));
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(25rem, .82fr);
  overflow: hidden;
  border: 1px solid var(--brand-line);
  border-radius: 28px;
  background: var(--auth-paper-bright);
  box-shadow: 0 32px 90px rgb(25 25 25 / 18%);
}

.auth-shell.is-compact {
  width: min(36rem, 100%);
  min-height: auto;
  grid-template-columns: 1fr;
}

.auth-brand {
  position: relative;
  display: flex;
  min-height: 100%;
  flex-direction: column;
  overflow: hidden;
  padding: clamp(2rem, 4.5vw, 4.75rem);
  background:
    radial-gradient(circle at 88% 20%, rgb(6 96 165 / 23%), transparent 29rem),
    linear-gradient(145deg, var(--brand-charcoal), var(--brand-charcoal) 76%);
  color: var(--brand-off-white);
}

.auth-brand::after {
  position: absolute;
  right: -160px;
  bottom: -250px;
  width: 620px;
  height: 620px;
  border: 1px solid rgb(0 128 247 / 20%);
  border-radius: 50%;
  box-shadow: 0 0 0 70px rgb(0 128 247 / 4%), 0 0 0 140px rgb(0 128 247 / 3%);
  content: "";
}

.auth-masthead {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding-bottom: 1.4rem;
  border-bottom: 1px solid rgb(255 255 255 / 17%);
}

.auth-masthead strong {
  color: var(--brand-off-white);
  font-family: var(--auth-serif);
  font-size: clamp(1.6rem, 3vw, 2.25rem);
  font-weight: 500;
  letter-spacing: -.04em;
}

.auth-masthead strong b {
  color: var(--brand-blue-700);
  font-family: var(--auth-sans);
  font-size: 1.15em;
  font-weight: 850;
}

.auth-masthead > span:not(.savvy-logo),
.auth-brand footer small {
  color: rgb(255 255 255 / 53%);
  font-size: .62rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.auth-edition {
  position: relative;
  z-index: 1;
  max-width: 42rem;
  margin: auto 0;
  padding: 4rem 0;
}

.auth-kicker,
.dialog-context {
  margin: 0 0 .85rem;
  color: var(--brand-blue-700);
  font-size: .67rem;
  font-weight: 850;
  letter-spacing: .17em;
  text-transform: none;
}

.auth-edition h1 {
  max-width: 10ch;
  margin: 0;
  color: var(--brand-off-white);
  font-family: var(--auth-serif);
  font-size: clamp(3.6rem, 7vw, 7.1rem);
  font-weight: 560;
  letter-spacing: -.065em;
  line-height: .83;
}

.auth-edition > p:last-child {
  max-width: 34rem;
  margin: 1.8rem 0 0;
  color: rgb(255 255 255 / 72%);
  font-family: var(--auth-serif);
  font-size: clamp(1rem, 1.6vw, 1.3rem);
  line-height: 1.5;
}

.auth-proof {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-block: 1px solid rgb(255 255 255 / 16%);
}

.auth-proof > span {
  display: grid;
  gap: 5px;
  padding: 1.1rem 1rem 1.1rem 0;
  border-right: 1px solid rgb(255 255 255 / 16%);
}

.auth-proof > span + span {
  padding-left: 1rem;
}

.auth-proof > span:last-child {
  border-right: 0;
}

.auth-proof i {
  color: var(--brand-blue-700);
  font-family: var(--auth-serif);
  font-size: .75rem;
}

.auth-proof b {
  color: var(--brand-off-white);
  font-family: var(--auth-serif);
  font-size: .9rem;
}

.auth-proof small {
  color: rgb(255 255 255 / 48%);
  font-size: .62rem;
  line-height: 1.35;
}

.auth-brand footer {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1.25rem;
}

.auth-brand footer > span {
  color: var(--brand-blue-700);
  font-size: .78rem;
  font-weight: 850;
  letter-spacing: .1em;
  text-transform: none;
}

.auth-card {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(2.4rem, 5vw, 5.4rem);
  background:
    radial-gradient(circle at 90% 8%, rgb(6 96 165 / 7%), transparent 16rem),
    var(--auth-paper-bright);
}

.auth-folio {
  position: absolute;
  top: 1.7rem;
  right: 2rem;
  color: var(--brand-charcoal-700);
  font-family: var(--auth-serif);
  font-size: .62rem;
  font-style: italic;
  letter-spacing: .08em;
}

.auth-card header {
  margin-bottom: 2rem;
  padding-bottom: 1.7rem;
  border-bottom: 1px solid var(--auth-rule);
}

.auth-card .dialog-context {
  color: var(--auth-accent-dark);
}

.auth-card h1,
.auth-card h2 {
  margin: .2rem 0 .65rem;
  color: var(--auth-ink);
  font-family: var(--auth-serif);
  font-size: clamp(2.6rem, 4.5vw, 4.5rem);
  font-weight: 580;
  letter-spacing: -.055em;
  line-height: .92;
}

.auth-card header > p:last-child {
  margin: 0;
  color: var(--brand-charcoal-700);
  font-family: var(--auth-serif);
  font-size: 1rem;
}

.auth-card form {
  display: grid;
  gap: 1.35rem;
}

.auth-card .form-field {
  display: grid;
  gap: .55rem;
}

.auth-card .form-field > span:first-child {
  color: var(--auth-ink);
  font-size: .78rem;
  font-weight: 750;
}

.auth-card .form-field > span:first-child i {
  margin-right: .55rem;
  color: var(--auth-accent-dark);
  font-family: var(--auth-serif);
  font-weight: 400;
}

.auth-card input {
  width: 100%;
  min-height: 58px;
  padding: 0 1rem;
  border: 1px solid var(--brand-line-strong);
  border-radius: 12px;
  background: var(--auth-paper-bright);
  color: var(--auth-ink);
  font: inherit;
}

.auth-card input:focus {
  border-color: var(--auth-accent);
  outline: 3px solid rgb(6 96 165 / 13%);
  outline-offset: 1px;
}

.auth-card .button {
  min-height: 58px;
  margin-top: .35rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-inline: 1.2rem;
  border: 1px solid var(--brand-blue-700);
  border-radius: 12px;
  background: linear-gradient(135deg, var(--brand-blue-700), var(--brand-blue-700));
  color: white;
  font-weight: 800;
  box-shadow: 0 12px 28px rgb(6 96 165 / 20%);
}

.auth-card .button:hover {
  background: var(--brand-charcoal-800);
}

.auth-card .button b {
  font-size: 1.25rem;
}

.auth-card .error-summary:empty {
  display: none;
}

.auth-card .error-summary:not(:empty) {
  padding: .85rem 1rem;
  border: 1px solid var(--brand-magenta-600);
  border-left: 4px solid var(--auth-coral);
  background: var(--brand-off-white);
  color: var(--brand-magenta-800);
}

.auth-card [data-valmsg-for] {
  min-height: 1.2em;
  color: var(--brand-magenta-800);
  font-size: .78rem;
}

.auth-security-note {
  display: flex;
  gap: .8rem;
  align-items: flex-start;
  margin-top: 2rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--auth-rule);
}

.auth-security-note > span {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border: 1px solid var(--auth-accent);
  border-radius: 50%;
  color: var(--auth-accent-dark);
}

.auth-security-note p {
  display: grid;
  gap: 3px;
  margin: 0;
}

.auth-security-note strong {
  font-family: var(--auth-serif);
  font-size: .9rem;
}

.auth-security-note small {
  color: var(--brand-charcoal-700);
  line-height: 1.4;
}

@media (max-width: 980px) {
  .auth-body {
    align-items: stretch;
    padding: 0;
  }

  .auth-shell {
    min-height: 100dvh;
    grid-template-columns: 1fr;
    border: 0;
    box-shadow: none;
  }

  .auth-brand {
    min-height: auto;
    padding: 2rem clamp(1.5rem, 6vw, 4rem);
  }

  .auth-edition {
    padding: 3rem 0;
  }

  .auth-edition h1 {
    max-width: 13ch;
    font-size: clamp(3rem, 11vw, 5.5rem);
  }

  .auth-proof,
  .auth-brand footer {
    display: none;
  }

  .auth-card {
    padding: 3rem clamp(1.5rem, 7vw, 5rem) max(3rem, env(safe-area-inset-bottom));
  }
}

@media (max-width: 560px) {
  .auth-masthead > span:not(.savvy-logo) {
    display: none;
  }

  .auth-edition {
    padding: 2.2rem 0 1rem;
  }

  .auth-edition h1 {
    font-size: 3.25rem;
  }

  .auth-edition > p:last-child {
    font-size: 1rem;
  }

  .auth-card h2 {
    font-size: 3rem;
  }
}

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