body.auth-page main {
  background: radial-gradient(ellipse at 42% 28%, #06327722, transparent 64%);
}

.auth-mobile-steps,
.auth-mobile-login {
  display: none;
}

.auth-section {
  padding: 145px 0 80px;
  min-height: 88svh;
}

.auth-layout {
  display: grid;
  grid-template-columns: 0.95fr 1fr;
  width: min(100%, 1140px);
  margin-inline: auto;
  border: 1px solid var(--release-edge);
  border-radius: 24px;
  overflow: hidden;
  background: var(--surface-gradient);
  box-shadow:
    0 25px 65px #0004,
    inset 0 1px #adc8ee08;
}

.auth-identity {
  position: relative;
  min-width: 0;
  padding: 36px 42px;
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--release-edge);
  background: linear-gradient(155deg, #0b204040, #071225);
}

.auth-back {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 10px;
  padding: 4px 0;
  border: 0;
  background: none;
  color: var(--steel);
  font: 13px/1.5 var(--font);
}

.auth-identity-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 42px;
}

.auth-identity-mark {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid #2453a0;
  border-radius: 12px;
  background: #081a35;
  color: var(--blue);
  & svg {
    width: 28px;
    stroke: currentColor;
    stroke-width: 1.3;
  }
}

.auth-identity-brand > strong {
  color: var(--white);
  font-size: 32px;
  letter-spacing: -0.05em;
  font-weight: 650;
  line-height: 1.2;
}

.auth-identity-brand > strong > span,
.auth-brand-copy h2 > span {
  color: var(--blue);
}

.auth-brand-copy {
  position: relative;
  z-index: 1;
  margin-top: 35px;
}

.auth-eyebrow {
  color: var(--dim);
  font: 10px/1.6 var(--mono);
  letter-spacing: 0.08em;
}

body.multipage {
  & .auth-brand-copy h2 {
    font-size: 35px;
    line-height: 1.25;
    letter-spacing: -0.035em;
    margin-top: 16px;
    font-weight: 550;
    max-width: 18ch;
  }
  & .auth-brand-copy p {
    color: var(--steel);
    font-size: 14px;
    line-height: 1.75;
    max-width: 36ch;
    margin-top: 18px;
  }
}

.auth-brand-art {
  display: block;
  width: min(100%, 400px);
  max-height: 230px;
  margin: auto auto 12px;
}

.auth-art-grid {
  stroke: #254476;
  stroke-opacity: 0.18;
  stroke-width: 1;
}

.auth-explore {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px 26px;
  padding-top: 20px;
  border-top: 1px solid #203451;
  & a {
    color: var(--steel);
    font-size: 12px;
  }
  & a > span {
    margin-left: 6px;
    color: var(--blue);
  }
}

.auth-workspace {
  min-width: 0;
  padding: 36px 44px 30px;
  background: #060f1d60;
}

.auth-mode {
  display: flex;
  gap: 28px;
  border-bottom: 1px solid #223650;
  margin-bottom: 32px;
  & > a {
    position: relative;
    padding: 7px 2px 15px;
    color: var(--dim);
    font-size: 14px;
  }
  & > a[aria-current] {
    color: var(--white);
  }
  & > a[aria-current]::after {
    content: '';
    position: absolute;
    height: 2px;
    left: 0;
    right: 0;
    bottom: -1px;
    background: var(--blue);
    box-shadow: 0 0 14px #0066ff40;
  }
}

.auth-heading {
  display: block;
}

body.multipage {
  & .auth-heading :is(h1, h2) {
    color: var(--white);
    font-size: 32px;
    line-height: 1.2;
    font-weight: 600;
    letter-spacing: -0.03em;
    margin: 12px 0;
  }
  & .auth-heading p {
    color: var(--steel);
    font-size: 14px;
    line-height: 1.65;
    margin: 0;
    max-width: 40ch;
  }
}

.auth-form {
  display: grid;
  gap: 20px;
  margin-top: 28px;
}

.auth-field {
  min-width: 0;
  & > label {
    display: block;
    margin-bottom: 8px;
    color: #dce5f4;
    font-size: 13px;
    line-height: 1.5;
  }
}

body.multipage .auth-field input {
  display: block;
  min-width: 0;
  width: 100%;
  height: 50px;
  padding: 12px 14px;
  border: 1px solid #29405f;
  border-radius: 9px;
  background: var(--surface-inset);
  color: var(--white);
  font: 16px/1.5 var(--font);
  outline: none;
  transition:
    border-color 0.2s,
    box-shadow 0.2s;
}

.auth-field input::placeholder {
  color: #8a9ab3;
}

.auth-field input:focus-visible {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px #0066ff22;
}

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

.auth-password {
  position: relative;
}

body.multipage .auth-password input {
  padding-right: 95px;
}

.auth-password-toggle {
  position: absolute;
  top: 4px;
  right: 4px;
  min-height: 42px;
  padding: 10px;
  border: 0;
  background: transparent;
  color: var(--steel);
  border-radius: 6px;
  font: 12px/1.5 var(--font);
}

.auth-hint,
.auth-field-error,
.auth-capslock {
  display: block;
  font-size: 12px;
  line-height: 1.6;
  margin-top: 8px;
  color: var(--dim);
}

.auth-field-error {
  color: #f0a9bb;
}

.auth-capslock {
  color: #dcc193;
}

.auth-form-options {
  display: flex;
  justify-content: flex-end;
  margin-top: -10px;
}

.auth-recovery-link {
  border: 0;
  background: none;
  color: var(--steel);
  padding: 3px 0;
  font: 12px/1.5 var(--font);
  min-height: 30px;
}

.auth-status {
  border-left: 2px solid var(--blue);
  background: #08182c;
  padding: 13px 15px;
  color: var(--ice);
  font-size: 13px;
  line-height: 1.65;
}

body.multipage .auth-submit {
  min-height: 50px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-size: 14px;
  padding: 12px 17px;
}

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

.auth-privacy {
  width: fit-content;
  margin-inline: auto;
  font-size: 11px;
  color: var(--dim);
  & > span {
    margin-left: 5px;
    color: var(--blue);
  }
}

.auth-assistance {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  border-top: 1px solid #223650;
  margin-top: 30px;
  padding-top: 21px;
  color: var(--dim);
  font-size: 12px;
  & a {
    color: var(--ice);
  }
  & a > span {
    margin-left: 5px;
    color: var(--blue);
  }
}

.auth-recovery-view > .auth-back {
  margin-bottom: 24px;
}

.auth-recovery-view .auth-heading h2:focus {
  outline: none;
}
/* Адаптация для (width >= 1800px). */
@media (width >= 1800px) {
  .auth-section {
    padding-top: 160px;
  }
  .auth-layout {
    width: min(100%, 1280px);
  }
  .auth-identity {
    padding: 40px 48px;
  }
  .auth-workspace {
    padding: 40px 52px 34px;
  }
  body.multipage {
    & .auth-brand-copy h2 {
      font-size: 40px;
    }
    & .auth-brand-copy p {
      font-size: 16px;
    }
  }
}
/* Адаптация для (width >= 900px) and (width <= 1399px). */
@media (width >= 900px) and (width <= 1399px) {
  .auth-section {
    padding-top: 185px;
  }
  .auth-identity {
    padding: 30px;
  }
  .auth-workspace {
    padding: 30px;
  }
  body.multipage .auth-brand-copy h2 {
    font-size: 31px;
  }
  .auth-explore {
    gap: 15px;
  }
}
/* Адаптация для (width <= 899px). */
@media (width <= 899px) {
  .auth-section {
    padding-top: 115px;
  }
  .auth-layout {
    grid-template-columns: 1fr;
    max-width: 540px;
  }
  .auth-identity {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 22px 28px;
    border-right: 0;
    border-bottom: 1px solid var(--release-edge);
  }
  .auth-identity-brand {
    margin: 0;
    order: -1;
    gap: 10px;
    & > strong {
      font-size: 25px;
    }
  }
  .auth-identity-mark {
    width: 36px;
    height: 36px;
    border-radius: 9px;
    & svg {
      width: 23px;
    }
  }
  .auth-brand-copy,
  .auth-brand-art,
  .auth-explore {
    display: none;
  }
  .auth-workspace {
    padding: 28px;
  }
}
/* Адаптация для (width <= 480px). */
@media (width <= 480px) {
  .auth-section {
    padding: 96px 0 50px;
  }
  .auth-layout {
    border-radius: 18px;
  }
  .auth-identity {
    padding: 18px 20px;
  }
  .auth-back {
    font-size: 11px;
  }
  .auth-workspace {
    padding: 24px 20px;
  }
  body.multipage .auth-heading :is(h1, h2) {
    font-size: 28px;
  }
  .auth-mode {
    margin-bottom: 25px;
  }
  .auth-assistance {
    font-size: 11px;
  }
}
/* Адаптация для (hover: hover) and (pointer: fine). */
@media (hover: hover) and (pointer: fine) {
  .auth-back:hover,
  .auth-mode a:hover,
  .auth-recovery-link:hover,
  .auth-assistance a:hover,
  .auth-explore a:hover,
  .auth-privacy:hover {
    color: var(--white);
  }
  .auth-password-toggle:hover {
    color: var(--white);
    background: #0a1b33;
  }
}
/* Сокращение движения по настройке пользователя. */
@media (prefers-reduced-motion: reduce) {
  .auth-field input {
    transition: none;
  }
}

.auth-consent {
  margin-block: 16px;
  font-size: 13px;
  line-height: 1.65;
  & label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
  }
  & input[type='checkbox'] {
    width: 18px;
    height: 18px;
    min-height: 18px;
    flex: 0 0 18px;
    margin-top: 3px;
    accent-color: #1774ec;
  }
  & a {
    color: #8eb8f3;
    text-decoration: underline;
    text-underline-offset: 3px;
  }
}

.auth-honeypot {
  display: none !important;
}

/* Поля регистрации и второй шаг подтверждения используют общую форму. */
.auth-registration-fields {
  display: grid;
  gap: 20px;
  min-inline-size: 0;
  border: 0;
  margin: 0;
  padding: 0;
  &[hidden] {
    display: none;
  }
}
.auth-verification-recipient {
  margin-bottom: 24px;
  & h2 {
    font-size: 20px;
    margin-bottom: 8px;
  }
  & p {
    color: var(--release-muted);
    overflow-wrap: anywhere;
  }
  & strong {
    color: var(--white);
  }
}
.auth-field .auth-code-input {
  font-size: 26px;
  letter-spacing: 0.28em;
  font-variant-numeric: tabular-nums;
}
.auth-verification-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 20px;
  margin-block: 8px 20px;
  & button {
    appearance: none;
    background: transparent;
    border: 0;
    padding: 0;
    min-height: 44px;
    cursor: pointer;
    color: #8eb8f3;
    font-size: 13px;
    text-align: left;
  }
  & button:disabled {
    color: var(--release-muted);
    cursor: default;
  }
}

/* Форма регистрации учитывает высоту общей навигации и не растягивает поля на весь экран. */
body.multipage.auth-page[data-page='register'] {
  & main > .auth-section {
    padding-block: calc(var(--site-header-height, 94px) + 32px) 64px;
    min-height: 100svh;
  }
  & .auth-layout {
    width: min(100%, 1280px);
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  }
  & :is(.auth-identity, .auth-workspace) {
    padding: clamp(28px, 2.5vw, 44px);
  }
  & .auth-mode {
    margin-bottom: 24px;
  }
  & .auth-heading h1 {
    font-size: clamp(28px, 2.4vw, 40px);
    line-height: 1.2;
    text-wrap: balance;
  }
  & .auth-brand-copy h2 {
    font-size: clamp(28px, 2vw, 36px);
  }
  & :is(.auth-brand-copy p, .auth-heading p) {
    font-size: 15px;
  }
  & .auth-form {
    margin-top: 0;
    gap: 18px;
  }
  & .auth-registration-fields {
    gap: 18px;
  }
  & .auth-consent {
    margin-block: 0;
  }
  & .auth-assistance {
    margin-top: 24px;
  }
}

/* На планшетах и телефонах информационная колонка становится компактной шапкой формы. */
@media (width <= 899px) {
  body.multipage.auth-page[data-page='register'] {
    & main > .auth-section {
      padding-block: calc(var(--site-header-height, 80px) + 24px) 40px;
    }
    & .auth-layout {
      grid-template-columns: minmax(0, 1fr);
      max-width: 580px;
    }
    & .auth-identity {
      padding: 18px 24px;
    }
    & .auth-workspace {
      padding: 28px 24px;
    }
  }
}
@media (width <= 480px) {
  body.multipage.auth-page[data-page='register'] {
    & main > .auth-section {
      padding-top: calc(var(--site-header-height, 80px) + 16px);
    }
    & .auth-identity {
      padding: 16px 18px;
    }
    & .auth-workspace {
      padding: 24px 18px;
    }
    & .auth-mode {
      margin-bottom: 20px;
    }
    & .auth-privacy {
      line-height: 1.6;
      text-align: center;
    }
  }
}

/* На телефоне форма остаётся единственной поверхностью; повторный бренд-блок скрыт. */
@media (width <= 700px) {
  body.multipage.auth-page[data-page] {
    & main > .auth-section {
      padding: calc(var(--site-header-height, 80px) + 24px) 0 32px;
      min-height: calc(100svh - 80px);
    }
    & .auth-section .auth-layout {
      max-width: 480px;
      border: 0;
      border-radius: 0;
      background: none;
      box-shadow: none;
      overflow: visible;
    }
    & .auth-identity,
    & .auth-heading > .auth-eyebrow {
      display: none;
    }
    & .auth-workspace {
      padding: 0;
      background: none;
    }
    & .auth-form {
      margin-top: 0;
      gap: 20px;
    }
    & .auth-heading h1 {
      font-size: clamp(1.875rem, 8vw, 2.25rem);
      line-height: 1.15;
      text-align: left;
      text-wrap: balance;
      margin: 0 0 14px;
    }
    & .auth-heading p {
      font-size: 0.9375rem;
      line-height: 1.6;
    }
    & .auth-registration-fields {
      gap: 18px;
    }
    & .auth-field > label {
      font-size: 0.875rem;
    }
    & .auth-field input {
      min-height: 52px;
      border-radius: 12px;
      padding: 14px;
      scroll-margin-top: calc(var(--site-header-height, 80px) + 20px);
    }
    & .auth-password input {
      padding-right: 96px;
    }
    & .auth-consent {
      margin-block: 0;
      line-height: 1.6;
    }
    & .auth-consent label {
      min-height: 44px;
    }
    & .auth-consent input[type='checkbox'] {
      width: 20px;
      height: 20px;
      flex-basis: 20px;
    }
    & .auth-submit {
      min-height: 52px;
      border-radius: 12px;
    }
    & .auth-privacy {
      justify-content: center;
      font-size: 0.8125rem;
      min-height: 44px;
      margin-top: -8px;
    }
    & .auth-mobile-steps {
      display: flex;
      gap: 24px;
      list-style: none;
      padding: 0;
      margin: 0 0 24px;
      font-size: 0.75rem;
      color: var(--release-muted);
    }
    & .auth-mobile-steps li {
      display: flex;
      align-items: center;
      gap: 8px;
    }
    & .auth-mobile-steps li > span {
      display: grid;
      place-items: center;
      flex: 0 0 26px;
      width: 26px;
      height: 26px;
      border: 1px solid var(--release-edge);
      border-radius: 50%;
      font-variant-numeric: tabular-nums;
    }
    & .auth-mobile-steps li:is(.is-current, .is-complete) {
      color: var(--ice);
    }
    & .auth-mobile-steps .is-current > span {
      border-color: var(--blue);
      background: color-mix(in srgb, var(--blue) 18%, transparent);
      color: var(--white);
    }
    & .auth-mobile-steps .is-complete > span {
      color: var(--ray);
      border-color: var(--ray);
    }
    & .auth-mobile-login {
      display: flex;
      justify-content: center;
      align-items: center;
      gap: 8px;
      min-height: 48px;
      padding-top: 16px;
      border-top: 1px solid var(--release-edge);
      font-size: 0.875rem;
      color: var(--steel);
    }
    & .auth-mobile-login strong {
      color: var(--ice);
      font-weight: 600;
    }
    & .auth-assistance {
      margin-top: 24px;
      padding-top: 20px;
      font-size: 0.8125rem;
    }
    & .site-footer {
      display: none;
    }
    &[data-page='register'] .auth-mode {
      display: none;
    }
    & .auth-verification-actions {
      display: grid;
      gap: 4px;
      margin-block: 0;
    }
    & .auth-verification-recipient,
    & .auth-verification-recipient p {
      margin: 0;
    }
    & .auth-field .auth-code-input {
      font-size: 1.75rem;
      letter-spacing: 0.35em;
      text-align: center;
    }
    & .auth-verification-actions button {
      min-height: 48px;
      padding-block: 8px;
      font-size: 0.875rem;
    }
  }
}
