:root {
  --bg: #171817;
  --panel: #1f2228;
  --panel-2: #252830;
  --line: #33363d;
  --text: #f4f4f5;
  --muted: #a4a5ad;
  --green: #38f681;
  --green-dark: #2f9358;
  --blue: #007aff;
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  padding: 0px;
  color: var(--text);
  background: #050505;
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
}

button,
input {
  font: inherit;
}

.app-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
}

.screen {
  display: none;
  height: min(100vh);
  width: min(100%, 460px);
  background: var(--bg);
  border: 1px solid #2d2f31;
  box-shadow: 0 30px 80px rgb(0 0 0 / 45%);
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  place-items: center;
}

.screen::-webkit-scrollbar {
  display: none;
}

.screen.active {
  display: block;
  place-items: center;
}

#loading-screen.active {
  display: grid;
  place-items: center;
}

.screen-inner {
  min-height: inherit;
  padding: 58px 15px;
}

.top-balanced {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.compact {
  padding-top: 54px;
}

.brand-center {
  width: 100%;
  min-height: auto;
  display: grid;
  place-items: center;
  align-content: center;
}

.brand-top {
  display: grid;
  justify-items: center;
  gap: 3px;
  margin-bottom: 34px;
}

.trust-logo {
  display: block;
  width: 112px;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 10px 18px rgb(0 0 0 / 28%));
}

.large-logo {
  width: 100px;
}

.login-logo {
  width: 88px;
  margin-top: 62px;
  margin-bottom: 25px;
}

.small-logo {
  width: 96px;
}

.tagline {
  max-width: 390px;
  margin: 0 0 42px;
  color: #eeeeef;
  font-size: 20px;
  font-weight: 500;
  line-height: 1.34;
  text-align: center;
}

.form-stack {
  width: 100%;
}

.field-label {
  display: block;
  margin-bottom: 14px;
  font-size: 17px;
  font-weight: 600;
}

.password-wrap {
  display: flex;
  align-items: center;
  height: 65px;
  border: 1px solid var(--line);
  border-radius: 9px;
  margin-bottom: 0;
  background: #181918;
}

.field-invalid {
  border-color: #ff5c70;
}

.password-wrap input {
  width: 100%;
  height: 100%;
  min-width: 0;
  color: var(--text);
  background: transparent;
  border: 0;
  outline: 0;
  padding: 0 16px;
}

.icon-button {
  width: 58px;
  height: 58px;
  border: 0;
  color: var(--green);
  background: transparent;
  display: grid;
  place-items: center;
  cursor: pointer;
}

.icon-button svg {
  width: 20px;
  height: 20px;
  stroke-width: 3;
}

.primary-button {
  width: 100%;
  height: 55px;
  border: 0;
  border-radius: 999px;
  color: #101512;
  font-size: 19px;
  font-weight: 700;
  cursor: pointer;
  transition:
    transform 160ms ease,
    filter 160ms ease,
    background 160ms ease,
    opacity 160ms ease;
}

.primary-button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
  filter: grayscale(0.2);
}

.primary-button:not(:disabled) {
  opacity: 1;
  filter: none;
}

.primary-button:hover:not(:disabled) {
  filter: brightness(1.08);
}

.primary-button:active:not(:disabled) {
  transform: translateY(1px);
}

.primary-button.muted {
  background: #556a5b;
  color: #edf8ef;
}

.primary-button.ready {
  background: linear-gradient(135deg, #38f681 0%, #6efb95 100%);
  color: #090c08;
  box-shadow: 0 18px 35px rgba(56, 246, 129, 0.42);
  transform: translateY(-1px);
}

.primary-button.ready:hover:not(:disabled) {
  transform: translateY(-1px) scale(1.01);
  filter: brightness(1.18);
}

.primary-button.bright {
  background: var(--green);
}

.reset-area {
  width: 100%;
  margin-top: auto;
  border-top: 1px solid #222527;
  padding-top: 22px;
  color: #a7a8ad;
  text-align: center;
  font-size: 17px;
  font-weight: 400;
  line-height: 1.45;
}

.form-error {
  min-height: 21px;
  margin: 10px 0 14px;
  color: #ff7586;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
}

.reset-area button {
  margin-top: 15px;
  border: 0;
  color: #ececef;
  background: transparent;
  font-size: 17px;
  font-weight: 500;
  cursor: pointer;
}

.title {
  margin: 0 0 16px;
  color: #eeeeef;
  font-size: 28px;
  line-height: 1.1;
  font-weight: 600;
  text-align: center;
}

.version,
.update-copy {
  margin: 0;
  color: #eeeeef;
  font-size: 20px;
  font-weight: 500;
  line-height: 1.42;
  text-align: center;
}

.notice {
  margin: 30px 10px 30px;
  padding: 22px 21px;
  border-left: 5px solid #0b8dff;
  background: #1a2025;
  color: #eeeeef;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.35;
}

.change-list {
  margin: 30px 10px;
  /* margin: 0 18px 42px; */
  padding: 21px 28px 21px 46px;
  border-radius: 4px;
  background: var(--panel-2);
  color: #eeeeef;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.5;
}

.change-list li {
  margin-top: 10px;
  list-style: disc;
}

.help-text {
  margin: 21px 0 0;
  color: #eeeeef;
  font-size: 17px;
  font-weight: 500;
  text-align: center;
}

.help-text a,
.text-button {
  color: var(--green);
  text-decoration: none;
}

.updating-layout {
  padding-left: 41px;
  padding-right: 41px;
}

.progress-block {
  margin-top: 64px;
}

.progress-track {
  height: 11px;
  overflow: hidden;
  border-radius: 999px;
  background: #272a32;
}

.progress-fill {
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: var(--green);
  transition: width 240ms ease;
}

.progress-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 16px;
  color: #eeeeef;
  font-size: 17px;
  font-weight: 500;
}

.quiet-copy {
  max-width: 360px;
  margin: 57px auto 0;
  color: #8f919b;
  font-size: 17px;
  font-weight: 400;
  line-height: 1.42;
  text-align: center;
}

.phrase-inner {
  position: relative;
  padding: 24px 19px 31px;
}

.phrase-content {
  position: relative;
  z-index: 1;
  transition: filter 180ms ease;
}

.phrase-content.blurred {
  filter: blur(6px) saturate(0.9);
}

.phrase-brand {
  margin-bottom: 29px;
}

.phrase-title {
  margin: 0 0 16px;
  color: #eeeeef;

  text-align: center;
  font-size: 28px;
  line-height: 1.1;
  font-weight: 600;
}

.phrase-dropdown {
  position: relative;
  margin-bottom: 29px;
}

.select-button {
  width: 100%;
  min-height: 62px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 18px 0 22px;
  border: 0;
  border-radius: 5px;
  color: #eeeeef;
  background: var(--panel-2);
  font-size: 17px;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
}

.phrase-menu {
  display: none;
  position: absolute;
  z-index: 10;
  top: calc(100% + 6px);
  left: 0;
  width: 100%;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--panel-2);
  box-shadow: 0 16px 36px rgb(0 0 0 / 35%);
}

.phrase-menu.open {
  display: block;
}

.phrase-menu button {
  width: 100%;
  min-height: 54px;
  padding: 0 22px;
  border: 0;
  color: #eeeeef;
  background: transparent;
  font-size: 17px;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
}

.phrase-menu button:hover,
.phrase-menu button[aria-selected="true"] {
  background: #2d3038;
}

.chevron {
  color: #a9abb2;
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
}

.phrase-form {
  display: flex;
  min-height: 0;
  flex-direction: column;
}

.phrase-loader {
  display: grid;
  position: absolute;
  inset: 0;
  z-index: 999;
  place-items: center;
  background: rgba(0, 0, 0, 0.72);
  pointer-events: all;
  opacity: 1;
}

.phrase-loader.hidden {
  display: none !important;
  opacity: 0;
}

.hidden {
  display: none !important;
}

.loader-content {
  display: grid;
  place-items: center;
  gap: 18px;
  padding: 28px 24px;
  border-radius: 18px;
  background: rgba(18, 23, 29, 0.98);
  text-align: center;
}

.loader-content p {
  margin: 0;
  color: #f3f3f5;
  font-size: 16px;
  font-weight: 600;
}

.spinner {
  width: 56px;
  height: 56px;
  border: 5px solid rgba(255, 255, 255, 0.14);
  border-top-color: var(--green);
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.word-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
  max-height: 510px;
  overflow-y: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding-right: 2px;
}

.word-grid::-webkit-scrollbar {
  display: none;
}

.word-field {
  height: 62px;
  display: flex;
  align-items: center;
  gap: 7px;
  border: 1px solid transparent;
  padding: 0 11px;
  border-radius: 5px;
  background: var(--panel-2);
  color: #f3f3f5;
  font-size: 17px;
  font-weight: 600;
}

.word-field input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  color: #f2f2f4;
  background: transparent;
  font-weight: 500;
}

.word-field input::placeholder {
  color: #8e9098;
  opacity: 1;
}

.word-eye {
  flex: 0 0 auto;
  color: #8c909c;
  width: 24px;
  height: 24px;
  stroke-width: 3;
}

.phrase-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 20px;
  margin-top: auto;
}

.text-button {
  border: 0;
  background: transparent;
  font-size: 17px;
  font-weight: 500;
  cursor: pointer;
}

.next-button {
  height: 55px;
}

.success-inner {
  display: flex;
  min-height: inherit;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding-left: 32px;
  padding-right: 32px;
  text-align: center;
}

.success-mark {
  width: 94px;
  height: 94px;
  display: grid;
  place-items: center;
  margin-bottom: 28px;
  border-radius: 999px;
  color: #101512;
  background: var(--green);
  animation: success-pop 520ms cubic-bezier(0.2, 0.9, 0.25, 1.25) both;
}

.success-mark svg {
  width: 50px;
  height: 50px;
  stroke-width: 3.4;
}

.success-copy {
  max-width: 320px;
  margin: 0 0 42px;
  color: #a7a8ad;
  font-size: 17px;
  font-weight: 400;
  line-height: 1.45;
  animation: success-fade 520ms ease 120ms both;
}

#success-screen .title,
#finish-button {
  animation: success-fade 520ms ease 80ms both;
}

@keyframes success-pop {
  0% {
    opacity: 0;
    transform: scale(0.68);
  }

  65% {
    opacity: 1;
    transform: scale(1.08);
  }

  100% {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes success-fade {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 420px) {
  .app-shell {
    padding: 0;
  }

  .screen {
    width: 100%;
    min-height: 100vh;
    border-left: 0;
    border-right: 0;
  }

  .screen-inner {
    padding-left: 20px;
    padding-right: 20px;
  }

  .title {
    font-size: 28px;
  }

  .phrase-title {
    font-size: 27px;
  }

  .select-button,
  .word-field,
  .primary-button {
    font-size: 17px;
  }

  .word-field {
    padding-inline: 9px;
  }
}
