.auth-page {
  background: var(--paper);
}

.auth-layout {
  display: grid;
  grid-template-columns: minmax(390px, 44%) minmax(0, 1fr);
  min-height: 100svh;
}

.auth-story {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 100svh;
  padding: clamp(32px, 4.1vw, 70px);
  overflow: hidden;
  background: radial-gradient(
    circle at 88% 74%,
    #275858 0,
    #1b484a 33%,
    #173f43 72%
  );
  color: #eaf2eb;
}

.auth-story::after {
  content: "";
  position: absolute;
  inset: auto -35% -64% 18%;
  height: 70%;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(194, 216, 191, 0.08),
    transparent 64%
  );
  pointer-events: none;
  z-index: -1;
}

.auth-orbit,
.auth-orbit span {
  position: absolute;
  display: block;
  border: 1px solid rgba(207, 228, 210, 0.11);
  border-radius: 50%;
  pointer-events: none;
}

.auth-orbit {
  width: min(67vw, 690px);
  aspect-ratio: 1;
  top: 23%;
  right: -46%;
  z-index: -1;
}

.auth-orbit span:first-child {
  inset: 12%;
}

.auth-orbit span:last-child {
  inset: 27%;
  border-color: rgba(207, 228, 210, 0.18);
}

.auth-story-top,
.auth-story-footer,
.auth-topline,
.auth-bottomline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.auth-story-top,
.auth-story-copy,
.auth-story-footer {
  position: relative;
  z-index: 1;
}

.auth-brand {
  display: inline-flex;
  align-items: center;
  gap: 13px;
  color: #fff;
  flex-shrink: 0;
}

.auth-brand img {
  width: 50px;
  height: 50px;
}

.auth-brand > span {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.auth-brand strong {
  font: 500 24px/1.05 var(--serif);
  letter-spacing: -0.045em;
  white-space: nowrap;
}

.auth-brand small {
  font: 700 9px/1.25 var(--sans);
  letter-spacing: 0.16em;
  color: #c4dacf;
}

.auth-story-index,
.auth-story-kicker,
.auth-story-footer,
.auth-topline,
.auth-eyebrow {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.13em;
}

.auth-story-index {
  color: #c4dacf;
  white-space: nowrap;
}

.auth-story-copy {
  max-width: 570px;
  margin-block: 85px 110px;
}

.auth-story-kicker {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: #d1e1d0;
}

.auth-story-kicker i {
  display: inline-block;
  width: 26px;
  height: 1px;
  background: #b0c9b2;
}

.auth-story h2 {
  max-width: 540px;
  margin: 31px 0 26px;
  font: 500 clamp(46px, 4.6vw, 74px) / 1.11 var(--serif);
  letter-spacing: -0.055em;
  color: #fff;
}

.auth-story h2 em {
  color: #bdd1c2;
  font-style: italic;
}

.auth-story-copy p {
  max-width: 405px;
  color: #d3e3d8;
  font-size: 15px;
  line-height: 1.75;
}

.auth-story-footer {
  align-items: flex-end;
  padding-top: 23px;
  border-top: 1px solid rgba(224, 238, 225, 0.25);
  color: #bcd2c4;
  font-size: 9px;
  line-height: 1.5;
}

.auth-story-footer i {
  display: inline-block;
  width: 3px;
  height: 3px;
  margin: 0 7px 2px;
  border-radius: 50%;
  background: #d4e3d7;
}

.auth-story :focus-visible {
  outline-color: #f1dba9;
}

.auth-main {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 38px clamp(38px, 6.2vw, 106px) 31px;
  background: var(--paper);
}

.auth-topline {
  color: #45615e;
  line-height: 1.4;
}

.auth-topline a,
.auth-bottomline a,
.auth-switch a {
  color: var(--ink);
  font-weight: 700;
  transition: color 200ms ease;
}

.auth-topline a {
  font-size: 12px;
  letter-spacing: 0;
  white-space: nowrap;
}

.auth-topline a:hover,
.auth-bottomline a:hover,
.auth-switch a:hover {
  color: #567f68;
}

.auth-topline a span,
.auth-switch a span {
  display: inline-block;
  margin-left: 3px;
  transition: transform 200ms ease;
}

.auth-topline a:hover span,
.auth-switch a:hover span {
  transform: translate(3px, -2px);
}

.auth-content {
  width: min(100%, 530px);
  margin: auto 0;
  padding-block: 55px;
}

.auth-eyebrow {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #45615e;
}

.auth-eyebrow span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 27px;
  height: 27px;
  margin-right: 4px;
  border: 1px solid #9fbaa9;
  border-radius: 50%;
  letter-spacing: 0;
}

.auth-content h1 {
  margin: 24px 0 16px;
  font: 500 clamp(49px, 4.4vw, 70px) / 1.1 var(--serif);
  letter-spacing: -0.055em;
}

.auth-content h1 em {
  color: #678876;
  font-style: italic;
}

.auth-lede {
  max-width: 460px;
  color: #4f6462;
  font-size: 15px;
  line-height: 1.72;
}

.auth-fields {
  display: grid;
  gap: 18px;
}

.auth-login .auth-fields {
  margin-top: 33px;
}

.auth-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.auth-field[hidden],
.auth-environment[hidden],
.auth-form-message[hidden],
.auth-field-error[hidden] {
  display: none !important;
}

.auth-environment {
  margin: 22px 0 -5px;
  padding: 12px 15px;
  border-left: 3px solid #527966;
  background: #eaf2eb;
  color: #214c41;
  font-size: 12px;
  line-height: 1.6;
}

.auth-environment[data-tone="warning"] {
  border-color: #9d6e2b;
  background: #f8efe0;
  color: #64471c;
}

.auth-field label,
.auth-account-choice legend {
  color: #243f40;
  font-size: 12px;
  font-weight: 700;
}

.auth-field input {
  width: 100%;
  height: 54px;
  padding: 0 16px;
  border: 1px solid #cbdad1;
  border-radius: 3px;
  background: #fff;
  color: #2b4142;
  font: 400 14px var(--sans);
  box-shadow: 0 3px 14px rgba(24, 62, 62, 0.025);
}

.auth-field input:disabled {
  opacity: 1;
  cursor: not-allowed;
}

.auth-field input::placeholder {
  color: #627970;
  opacity: 1;
}

.auth-field input[aria-invalid="true"] {
  border-color: #a44938;
}

.auth-hint {
  color: #45615e;
  font-size: 11px;
  line-height: 1.5;
}

.auth-field-error {
  display: block;
  color: #862e25;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.5;
}

.auth-form-message {
  margin: 18px 0 0;
  padding: 15px 17px;
  border-left: 3px solid #a44938;
  background: #fff0ec;
  color: #722c23;
  font-size: 12px;
  line-height: 1.6;
}

.auth-form-message[data-tone="success"] {
  border-color: #527966;
  background: #eaf2eb;
  color: #214c41;
}

.auth-login #loginForm[hidden],
.auth-signed-in[hidden] {
  display: none !important;
}

.auth-signed-in {
  margin-top: 26px;
  padding: 25px 28px;
  border: 1px solid #d2e3d3;
  border-left: 3px solid #79a287;
  background: #edf5eb;
}

.auth-signed-in > span {
  color: #3f7355;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.13em;
}

.auth-signed-in h2 {
  margin: 10px 0 7px;
  color: #173f43;
  font: 500 clamp(25px, 3vw, 32px) / 1.2 var(--serif);
}

.auth-signed-in p {
  color: #415f55;
  font-size: 13px;
  line-height: 1.6;
}

.auth-signed-in button {
  min-height: 44px;
  margin-top: 15px;
  padding: 9px 15px;
  border: 1px solid #24564b;
  background: transparent;
  color: #24564b;
  font: 700 12px var(--sans);
  cursor: pointer;
}

.auth-submit {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 56px;
  margin-top: 24px;
  padding: 0 18px;
  border: 0;
  border-radius: 3px;
  background: #345957;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
  transition:
    background 180ms ease,
    transform 180ms ease;
}

.auth-submit:not(:disabled):hover {
  background: #173f43;
  transform: translateY(-1px);
}

.auth-submit:disabled {
  cursor: not-allowed;
  opacity: 0.72;
}

.auth-submit span {
  font-size: 21px;
  font-weight: 400;
}

.auth-privacy-note {
  max-width: 530px;
  margin: 10px 0 0;
  color: #4a625d;
  font-size: 11px;
  line-height: 1.65;
}

.auth-onboarding-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 13px;
  padding: 15px 16px;
  border: 1px solid #d3e2d4;
  background: #edf5eb;
}

.auth-onboarding-link[hidden] {
  display: none !important;
}

.auth-onboarding-link > div {
  display: grid;
  gap: 4px;
}

.auth-onboarding-link strong {
  color: #224b42;
  font-size: 12px;
}

.auth-onboarding-link small {
  max-width: 420px;
  color: #526c5d;
  font-size: 11px;
  line-height: 1.55;
}

.auth-onboarding-link a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  color: #275f49;
  font-size: 11px;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.auth-onboarding-link a:hover {
  color: #173f43;
}

.auth-switch {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px 15px;
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid #dce3df;
  font-size: 13px;
}

.auth-switch > span {
  color: #4f6462;
}

.auth-bottomline {
  color: #45615e;
  font-size: 11px;
  flex-wrap: wrap;
}

.auth-bottomline a {
  font-size: 11px;
}
.auth-bottomline-links {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 2px 18px;
}

.auth-account-choice {
  min-width: 0;
  margin: 0 0 27px;
  padding: 0;
  border: 0;
}

.auth-register .auth-account-choice {
  margin-top: 32px;
}

.auth-account-choice legend {
  margin-bottom: 11px;
  padding: 0;
}

.auth-choice-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.auth-choice {
  position: relative;
  min-width: 0;
  cursor: pointer;
}

.auth-choice input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.auth-choice-face {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-height: 144px;
  height: 100%;
  padding: 15px 17px;
  border: 1px solid #cbdad1;
  border-radius: 3px;
  background: #fff;
  transition:
    border-color 200ms ease,
    background 200ms ease,
    transform 200ms ease;
}

.auth-choice input:checked + .auth-choice-face {
  border-color: #537f68;
  background: #eaf2e9;
}

.auth-choice input:focus-visible + .auth-choice-face {
  outline: 3px solid #9d6e2b;
  outline-offset: 3px;
}

.auth-choice:hover .auth-choice-face {
  border-color: #688c79;
  transform: translateY(-2px);
}

.auth-choice-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  margin-bottom: 9px;
  border: 1px solid #93ad9c;
  border-radius: 50%;
  color: var(--ink);
}

.auth-choice-icon svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  stroke-width: 1.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.auth-choice-face strong {
  color: var(--ink);
  font-size: 14px;
  line-height: 1.3;
}

.auth-choice-face small {
  display: block;
  max-width: 205px;
  margin-top: 4px;
  color: #45615e;
  font-size: 11px;
  line-height: 1.4;
}

.auth-choice-check {
  position: absolute;
  top: 17px;
  right: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border: 1px solid #9cb8a4;
  border-radius: 50%;
  color: transparent;
  font-size: 11px;
  line-height: 1;
}

.auth-choice input:checked + .auth-choice-face .auth-choice-check {
  border-color: var(--ink);
  background: var(--ink);
  color: #fff;
}

.auth-next-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 31px;
  padding-top: 18px;
  border-top: 1px solid #dce3df;
}

.auth-next-steps span {
  color: #45615e;
  font-size: 11px;
  line-height: 1.4;
}

.auth-next-steps b {
  display: block;
  margin-bottom: 5px;
  color: var(--ink);
  font-size: 10px;
  letter-spacing: 0.1em;
}

.auth-register .auth-content {
  padding-block: 50px;
}

.auth-register .auth-switch {
  margin-top: 24px;
}

.auth-company-dialog {
  width: min(540px, calc(100% - 36px));
  max-height: min(86vh, 720px);
  padding: clamp(28px, 4vw, 48px);
  border: 1px solid #d9e4da;
  border-radius: 5px;
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 30px 90px rgba(12, 37, 38, 0.3);
  overflow: auto;
}

.auth-company-dialog:not([open]) {
  display: none;
}

.auth-company-dialog::backdrop {
  background: rgba(11, 36, 38, 0.65);
  backdrop-filter: blur(6px);
}

.auth-company-dialog-mark {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  margin-bottom: 30px;
  border-radius: 50%;
  background: #173f43;
}

.auth-company-dialog-kicker {
  color: #527661;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.15em;
}

.auth-company-dialog h2 {
  margin: 13px 0 18px;
  font: 500 clamp(32px, 6vw, 46px) / 1.12 var(--serif);
  letter-spacing: -0.045em;
}

.auth-company-dialog h2 em {
  color: #688876;
  font-style: italic;
}

.auth-company-dialog p {
  max-width: 420px;
  color: #425f57;
  font-size: 15px;
  line-height: 1.7;
}

.auth-company-dialog .auth-company-dialog-note {
  margin: 22px 0 0;
  padding: 14px 16px;
  border-left: 2px solid #83a78a;
  background: #eaf2e9;
  color: #345a4c;
  font-size: 13px;
}

.auth-company-dialog-action {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  min-height: 54px;
  margin-top: 30px;
  padding: 0 18px;
  border: 0;
  border-radius: 3px;
  background: #173f43;
  color: #fff;
  font: 700 13px var(--sans);
  cursor: pointer;
}

.auth-company-dialog-action:hover {
  background: #2d5b53;
}

.auth-company-dialog-action:focus-visible {
  outline: 3px solid #ab8652;
  outline-offset: 3px;
}

.auth-company-dialog-action span {
  font-size: 21px;
  font-weight: 400;
}

@media (prefers-reduced-motion: no-preference) {
  .auth-story-copy,
  .auth-content {
    animation: quiet-arrival 700ms cubic-bezier(0.22, 0.7, 0.2, 1) both;
  }

  .auth-content {
    animation-delay: 110ms;
  }

  .auth-orbit {
    animation: auth-orbit-enter 1100ms cubic-bezier(0.22, 0.7, 0.2, 1) both;
  }

  .auth-company-dialog[open] {
    animation: quiet-arrival 350ms ease-out both;
  }
}

@keyframes auth-orbit-enter {
  from {
    opacity: 0.55;
    transform: scale(0.94);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@media (max-width: 1100px) {
  .auth-layout {
    grid-template-columns: minmax(310px, 41%) minmax(0, 1fr);
  }

  .auth-story {
    padding: 38px;
  }

  .auth-story h2 {
    font-size: clamp(40px, 4.7vw, 55px);
  }

  .auth-main {
    padding-inline: 48px;
  }
}

@media (max-width: 900px) {
  .auth-layout {
    display: flex;
    flex-direction: column;
  }

  .auth-story {
    min-height: 340px;
    padding: 27px 32px;
  }

  .auth-orbit {
    width: 430px;
    top: -18%;
    right: -20%;
  }

  .auth-story-copy {
    margin: 44px 0 0;
  }

  .auth-story h2 {
    max-width: 610px;
    margin: 13px 0 12px;
    font-size: 42px;
  }

  .auth-story-copy p {
    max-width: 550px;
    font-size: 13px;
    line-height: 1.55;
  }

  .auth-story-footer {
    display: none;
  }

  .auth-main {
    flex: 1;
    min-height: 650px;
    padding: 29px 32px 27px;
  }

  .auth-content {
    width: min(100%, 560px);
    margin: auto;
    padding-block: 48px;
  }
}

@media (max-width: 480px) {
  .auth-company-dialog {
    width: calc(100% - 32px);
    padding: 27px 23px;
  }

  .auth-company-dialog-mark {
    margin-bottom: 22px;
  }

  .auth-story {
    min-height: 270px;
    padding: 20px 20px 22px;
  }

  .auth-story-copy {
    margin-top: 28px;
  }

  .auth-brand img {
    width: 44px;
    height: 44px;
  }

  .auth-brand strong {
    font-size: 19px;
  }

  .auth-brand small {
    font-size: 7px;
  }

  .auth-story-index {
    font-size: 9px;
  }

  .auth-story-kicker {
    font-size: 9px;
  }

  .auth-story h2 {
    margin: 10px 0;
    font-size: clamp(31px, 8.4vw, 38px);
  }

  .auth-story-copy p {
    font-size: 12px;
    line-height: 1.5;
  }

  .auth-main {
    padding: 20px 20px 22px;
  }

  .auth-topline {
    font-size: 9px;
  }

  .auth-topline a {
    font-size: 11px;
    display: inline-flex;
    align-items: center;
    min-height: 44px;
  }

  .auth-content,
  .auth-register .auth-content {
    padding-block: 30px;
  }

  .auth-content h1 {
    font-size: clamp(39px, 10.5vw, 50px);
  }

  .auth-lede {
    font-size: 14px;
  }

  .auth-login .auth-fields {
    margin-top: 27px;
  }

  .auth-register .auth-account-choice {
    margin-top: 25px;
  }

  .auth-choice-grid {
    grid-template-columns: 1fr;
  }

  .auth-choice-face {
    min-height: 0;
    padding: 13px 16px 13px 58px;
  }

  .auth-choice-icon {
    position: absolute;
    top: 17px;
    left: 15px;
    margin-bottom: 0;
  }

  .auth-choice-check {
    top: 19px;
  }

  .auth-choice-face strong {
    padding-right: 25px;
  }

  .auth-next-steps {
    grid-template-columns: 1fr;
    gap: 9px;
  }

  .auth-next-steps span {
    display: flex;
    gap: 11px;
  }

  .auth-next-steps b {
    margin-bottom: 0;
  }

  .auth-bottomline {
    flex-wrap: wrap;
    gap: 9px;
  }

  .auth-switch a,
  .auth-bottomline a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
  }
}
