:root {
  color: #172033;
  background: #f3f6f9;
  font-family:
    Inter,
    "Segoe UI",
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    sans-serif;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-width: 320px;
  min-height: 100%;
  margin: 0;
}

body {
  min-height: 100vh;
  min-height: 100svh;
  background: #f3f6f9;
}

button,
input {
  font: inherit;
}

a {
  color: #205c52;
  font-weight: 650;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover {
  color: #143f39;
}

a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 3px solid #2563eb;
  outline-offset: 3px;
}

.auth-skip-link {
  position: fixed;
  z-index: 10;
  top: 12px;
  left: 12px;
  padding: 10px 14px;
  transform: translateY(-180%);
  border-radius: 8px;
  background: #ffffff;
  color: #172033;
  box-shadow: 0 8px 28px rgba(15, 23, 42, 0.2);
}

.auth-skip-link:focus {
  transform: translateY(0);
}

.auth-shell {
  display: grid;
  grid-template-columns: minmax(360px, 0.88fr) minmax(520px, 1.12fr);
  min-height: 100vh;
  min-height: 100svh;
}

.auth-story {
  display: flex;
  min-height: 100%;
  padding: clamp(32px, 5vw, 72px);
  background: #172033;
  color: #f8fafc;
}

.auth-story__inner {
  display: flex;
  width: 100%;
  max-width: 580px;
  margin: 0 auto;
  flex-direction: column;
}

.auth-brand {
  display: inline-flex;
  width: fit-content;
  color: #24302b;
  text-decoration: none;
}

.auth-brand:hover {
  color: #24302b;
}

.auth-brand .brand-lockup {
  display: inline-flex;
  height: 52px;
  align-items: center;
  gap: 11px;
  color: inherit;
  white-space: nowrap;
}

.auth-brand .brand-lockup__mark {
  display: block;
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
}

.auth-brand .brand-lockup__divider {
  width: 1px;
  height: 38px;
  flex: 0 0 1px;
  background: currentColor;
  opacity: 0.58;
}

.auth-brand .brand-lockup__copy {
  display: grid;
  align-content: center;
  gap: 3px;
  font-size: 14px;
  line-height: 1;
  text-align: center;
}

.auth-brand .brand-lockup__primary {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 2em;
  font-weight: 760;
  letter-spacing: 0.12em;
}

.auth-brand .brand-lockup__secondary {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.2em;
  font-weight: 400;
  letter-spacing: 0.03em;
}

.auth-story .auth-brand {
  padding: 0;
  color: #fff;
}

.auth-story .auth-brand:hover {
  color: #fff;
}

.auth-story__copy {
  margin: auto 0;
  padding: 80px 0;
}

.auth-eyebrow {
  margin: 0 0 14px;
  color: #7c928b;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.17em;
  text-transform: uppercase;
}

.auth-story .auth-eyebrow {
  color: #a8c4ba;
}

.auth-story h2 {
  max-width: 520px;
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(42px, 5vw, 68px);
  font-weight: 500;
  letter-spacing: -0.035em;
  line-height: 1.04;
}

.auth-story__lead {
  max-width: 480px;
  margin: 28px 0 0;
  color: #cbd5e1;
  font-size: 18px;
  line-height: 1.65;
}

.auth-capabilities {
  display: grid;
  margin: 0;
  padding: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.18);
  grid-template-columns: repeat(3, minmax(0, 1fr));
  list-style: none;
}

.auth-capabilities li {
  padding: 20px 18px 0 0;
}

.auth-capabilities strong,
.auth-capabilities span {
  display: block;
}

.auth-capabilities strong {
  margin-bottom: 7px;
  font-size: 13px;
}

.auth-capabilities span {
  color: #9eabbc;
  font-size: 12px;
  line-height: 1.55;
}

.auth-entry {
  display: grid;
  min-width: 0;
  padding: clamp(24px, 5vw, 72px);
  place-items: center;
}

.auth-card {
  width: min(100%, 470px);
  padding: clamp(32px, 4vw, 48px);
  border: 1px solid #dbe3ee;
  border-radius: 24px;
  background: #ffffff;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.1);
}

.auth-card--signup {
  width: min(100%, 500px);
}

.auth-card--signup .auth-form {
  gap: 16px;
  margin-top: 26px;
}

.auth-brand--mobile {
  display: none;
  margin-bottom: 40px;
  color: #24302b;
}

.auth-card__heading h1 {
  margin: 0;
  color: #172033;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(34px, 4vw, 43px);
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.auth-card__heading > p:last-child {
  margin: 14px 0 0;
  color: #64748b;
  font-size: 15px;
  line-height: 1.6;
}

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

.auth-field {
  display: grid;
  gap: 9px;
}

.auth-field label,
.auth-remember label {
  color: #263248;
  font-size: 13px;
  font-weight: 700;
}

.auth-field__label-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
}

.auth-field__label-row a {
  font-size: 12px;
}

.auth-field input {
  width: 100%;
  min-height: 50px;
  border: 1px solid #bdc9d8;
  border-radius: 11px;
  background: #ffffff;
  padding: 12px 14px;
  color: #172033;
  transition:
    border-color 140ms ease,
    box-shadow 140ms ease;
}

.auth-field input::placeholder {
  color: #7a8798;
}

.auth-field input:hover {
  border-color: #8291a5;
}

.auth-field input:focus-visible {
  border-color: #2563eb;
  box-shadow: 0 0 0 1px #2563eb;
}

.auth-remember {
  display: flex;
  align-items: center;
  gap: 10px;
}

.auth-remember input {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: #172033;
}

.auth-submit,
.auth-alternatives button,
.auth-secondary-action {
  display: inline-flex;
  min-height: 50px;
  align-items: center;
  justify-content: center;
  border-radius: 11px;
  font-weight: 750;
}

.auth-submit {
  width: 100%;
  border: 1px solid #172033;
  background: #172033;
  color: #ffffff;
  cursor: pointer;
  transition:
    background 140ms ease,
    transform 140ms ease;
}

.auth-submit:hover {
  background: #263248;
}

.auth-submit:active {
  transform: translateY(1px);
}

.auth-messages,
.auth-errors {
  margin-top: 22px;
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 13px;
  line-height: 1.5;
}

.auth-messages {
  border: 1px solid #9ec5b9;
  background: #eff8f4;
  color: #174b40;
}

.auth-errors,
.auth-field__errors {
  color: #9f1d2d;
}

.auth-errors {
  border: 1px solid #efb4bc;
  background: #fff3f4;
}

.auth-messages p,
.auth-errors ul,
.auth-field__errors ul {
  margin: 0;
}

.auth-errors ul,
.auth-field__errors ul {
  padding-left: 20px;
}

.auth-field__errors {
  font-size: 12px;
  line-height: 1.45;
}

.auth-help {
  color: #64748b;
  font-size: 12px;
  line-height: 1.45;
}

.auth-help ul {
  display: grid;
  gap: 3px;
  margin: 0;
  padding-left: 19px;
}

.auth-alternatives,
.auth-social {
  display: grid;
  gap: 12px;
  margin-top: 26px;
  padding-top: 26px;
  border-top: 1px solid #e2e8f0;
}

.auth-alternatives > span {
  color: #64748b;
  font-size: 12px;
  text-align: center;
}

.yandex-auth-form {
  display: grid;
}

.yandex-id-button {
  position: relative;
  display: flex;
  width: 100%;
  min-height: 56px;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 12px;
  padding: 0 48px;
  background: #000000;
  color: #ffffff;
  cursor: pointer;
  font-family: Arial, sans-serif;
  font-size: 16px;
  font-weight: 500;
  line-height: 1;
}

.yandex-id-button:hover,
.yandex-id-button:active {
  background: #000000;
  color: #ffffff;
}

.yandex-id-button__icon {
  position: absolute;
  left: 16px;
  width: 24px;
  height: 24px;
}

.yandex-id-button__icon svg {
  display: block;
  width: 100%;
  height: 100%;
}

.auth-social__note {
  margin: 0;
  color: #7a8798;
  font-size: 12px;
  line-height: 1.5;
  text-align: center;
}

.auth-alternatives button,
.auth-secondary-action {
  border: 1px solid #bdc9d8;
  background: #ffffff;
  color: #172033;
  text-decoration: none;
}

.auth-signup {
  margin: 28px 0 0;
  color: #526176;
  font-size: 14px;
  text-align: center;
}

.auth-note {
  margin: 24px 0 0;
  padding-top: 20px;
  border-top: 1px solid #e2e8f0;
  color: #7a8798;
  font-size: 12px;
  line-height: 1.5;
  text-align: center;
}

.auth-state-action {
  display: grid;
  margin: 32px 0 0;
}

@media (max-width: 900px) {
  .auth-shell {
    grid-template-columns: 1fr;
  }

  .auth-story {
    display: none;
  }

  .auth-entry {
    padding: 24px;
  }

  .auth-brand--mobile {
    display: inline-flex;
  }
}

@media (max-width: 520px) {
  body {
    background: #ffffff;
  }

  .auth-entry {
    align-items: start;
    padding: 24px 20px 40px;
  }

  .auth-card {
    padding: 20px 0 0;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .auth-brand--mobile {
    margin-bottom: 64px;
  }

  .auth-field__label-row {
    align-items: flex-start;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
