@font-face {
  font-family: "HarmonyOS Sans SC";
  src: url("fonts/harmonyos-sans-sc-regular.ttf") format("truetype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "HarmonyOS Sans SC";
  src: url("fonts/harmonyos-sans-sc-medium.ttf") format("truetype");
  font-style: normal;
  font-weight: 500;
  font-display: swap;
}

:root {
  color-scheme: light;
  font-family: "HarmonyOS Sans SC", "Noto Sans SC", Arial, sans-serif;
  background: #f7f7f7;
  color: #000;
}

* {
  box-sizing: border-box;
}

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

body {
  min-height: 100vh;
  min-height: 100dvh;
  background: #f7f7f7;
}

::selection {
  background: #b3d7fe;
  color: #000;
}

.brand-header {
  position: fixed;
  z-index: 2;
  top: 0;
  left: 50%;
  display: flex;
  width: min(calc(100% - 56px), 1100px);
  min-height: 72px;
  align-items: center;
  justify-content: space-between;
  transform: translateX(-50%);
}

.brand-header__logo,
.brand-header__back {
  color: #000;
  text-decoration: none;
}

.brand-header__logo img {
  display: block;
  width: 88px;
  height: auto;
}

.brand-header__back {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  padding: 0 13px;
  border: 1px solid rgba(0, 0, 0, .14);
  border-radius: 20px;
  background: #fff;
  font-size: 13px;
  font-weight: 500;
}

.brand-header__back:hover {
  border-color: rgba(0, 0, 0, .28);
}

.brand-header a:focus-visible,
.password-form button:focus-visible {
  outline: 2px solid #000;
  outline-offset: 3px;
}

.auth-hero {
  display: grid;
  min-height: 100vh;
  min-height: 100dvh;
  place-items: center;
  padding: 112px 28px 72px;
}

.auth-hero__content {
  width: min(100%, 520px);
  text-align: center;
}

.auth-hero__status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 22px;
  color: rgba(0, 0, 0, .58);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .08em;
}

.auth-hero__status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #c0fe06;
}

.auth-hero h1 {
  margin: 0;
  color: #000;
  font-size: clamp(38px, 4.4vw, 52px);
  font-weight: 400;
  letter-spacing: -.045em;
  line-height: 1.05;
}

.auth-hero__intro {
  max-width: 440px;
  margin: 18px auto 0;
  color: rgba(0, 0, 0, .60);
  font-size: 17px;
  font-weight: 400;
  line-height: 1.5;
}

.password-form {
  display: grid;
  margin-top: 38px;
  text-align: left;
}

.password-form label {
  margin-bottom: 9px;
  font-size: 14px;
  font-weight: 500;
}

.password-code {
  position: relative;
  width: 100%;
  min-height: 64px;
}

.password-code__input {
  position: absolute;
  z-index: 1;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 16px;
  opacity: 0;
  cursor: text;
}

.password-code__slots {
  display: grid;
  min-height: 64px;
  grid-template-columns: repeat(6, minmax(0, 56px));
  justify-content: space-between;
  gap: 10px;
}

.password-code__slot {
  display: grid;
  min-width: 0;
  place-items: center;
  border: 1px solid rgba(0, 0, 0, .16);
  border-radius: 16px;
  background: #fff;
  color: #000;
  font-size: 30px;
  line-height: 1;
  transition: border-color 160ms ease, box-shadow 160ms ease, background-color 160ms ease;
}

.password-code:hover .password-code__slot {
  border-color: rgba(0, 0, 0, .28);
}

.password-code:focus-within .password-code__slot.is-current {
  border-color: #000;
  box-shadow: 0 0 0 2px #000;
}

.password-code__slot.is-filled {
  background: #f0f0f0;
}

.password-code.is-error .password-code__slot {
  border-color: rgba(180, 35, 24, .72);
}

.password-code.is-error:focus-within .password-code__slot.is-current {
  border-color: #b42318;
  box-shadow: 0 0 0 2px #b42318;
}

.password-form__hint {
  margin: 8px 2px 0;
  color: rgba(0, 0, 0, .52);
  font-size: 12px;
  line-height: 1.4;
}

.password-form button {
  min-height: 48px;
  margin-top: 20px;
  padding: 0 18px;
  border: 1px solid #000;
  border-radius: 20px;
  background: #000;
  color: #fff;
  cursor: pointer;
  font: inherit;
  font-size: 15px;
  font-weight: 500;
}

.password-form button:hover {
  background: #171717;
}

.password-form button:disabled {
  cursor: wait;
  opacity: .58;
}

.feedback-message {
  min-height: 22px;
  margin: 14px 0 0;
  color: rgba(0, 0, 0, .60);
  font-size: 13px;
  line-height: 1.5;
  text-align: center;
}

.feedback-message.is-error {
  color: #b42318;
}

@media (max-width: 809px) {
  .brand-header {
    width: calc(100% - 40px);
    min-height: 58px;
  }

  .brand-header__logo img {
    width: 82px;
  }

  .auth-hero {
    padding: 92px 20px 52px;
  }

  .auth-hero h1 {
    font-size: clamp(36px, 10.5vw, 44px);
  }

  .auth-hero__intro {
    margin-top: 16px;
    font-size: 16px;
  }

  .password-form {
    margin-top: 32px;
  }

  .password-code,
  .password-code__slots {
    min-height: 58px;
  }

  .password-code__slots {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 8px;
  }

  .password-code__slot {
    border-radius: 14px;
    font-size: 26px;
  }
}

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