/* Тестовый сервер: второй раздел страницы «Файлы».
   Материал берётся у самой страницы: верхний блок, стеклянная оболочка,
   панели и шаги — это её классы. Здесь только то, чего на странице нет:
   карточки загрузки-кнопки, карточка аккаунта, условия, окно регистрации. */

.genesis-files .test-stage {
  margin-top: clamp(20px, 2vw, 40px);
  min-height: clamp(240px, 15vw, 320px);
}

.genesis-files .test-stage h2 {
  max-width: 20ch;
  margin: 0;
  font-size: clamp(28px, 2.15vw, 48px);
  line-height: 1.08;
  font-weight: 800;
  letter-spacing: -0.01em;
  text-shadow: 0 8px 20px rgba(0, 0, 0, 0.42);
}

/* ---------- Загрузка тестового клиента ---------- */

/* Ряд из четырёх карточек, как у боевого раздела; прямая загрузка шире.
   Уже 1600 точек она встаёт отдельной строкой над тремя зеркалами. */
.genesis-files .test-downloads {
  container-type: inline-size;
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) repeat(3, minmax(0, 1fr));
  gap: 12px;
  min-width: 0;
}

@media (max-width: 1599px) {
  .genesis-files .test-downloads {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .genesis-files .test-downloads .test-source-main {
    grid-column: 1 / -1;
    min-height: 104px;
  }
}

/* Кнопка повторяет карточку загрузки верхнего раздела: те же рамка, стекло,
   подъём и зелёный отлив при наведении. */
.genesis-files .test-source {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  min-width: 0;
  margin: 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--text);
  background: rgba(255, 255, 255, 0.025);
  box-shadow: none;
  font: inherit;
  text-align: left;
  text-decoration: none;
  text-transform: none;
  letter-spacing: 0;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.18s ease, border-color 0.18s ease, background-color 0.18s ease,
    background-image 0.18s ease, box-shadow 0.18s ease;
}

.genesis-files .test-source:hover {
  transform: translateY(-2px);
  border-color: rgba(0, 255, 102, 0.34);
  background-color: rgba(0, 255, 102, 0.045);
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.24);
}

.genesis-files .test-source:active {
  transform: translateY(0) scale(0.985);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
  transition-duration: 0.08s;
}

.genesis-files .test-source:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 3px;
  border-color: rgba(0, 255, 102, 0.4);
}

.genesis-files .test-source .source-icon {
  flex: 0 0 46px;
  transition: border-color 0.18s ease, background-color 0.18s ease, box-shadow 0.18s ease;
}

.genesis-files .test-source .source-icon img {
  display: block;
  transition: transform 0.25s cubic-bezier(0.2, 0.7, 0.3, 1);
}

.genesis-files .test-source:hover .source-icon {
  border-color: rgba(0, 255, 102, 0.3);
  background-color: rgba(0, 255, 102, 0.07);
  box-shadow: 0 0 16px rgba(0, 255, 102, 0.12);
}

.genesis-files .test-source:hover .source-icon img {
  transform: scale(1.08);
}

.genesis-files .test-source-text {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.genesis-files .test-source-text strong {
  color: #ffffff;
  font-size: 17px;
  line-height: 1.18;
  font-weight: 800;
}

.genesis-files .test-source-text small {
  color: var(--dim);
  font-size: 13px;
  line-height: 1.4;
  font-weight: 600;
}

/* Основная загрузка: крупнее, с зелёной кромкой как у обязательного шага
   установки и кнопкой-подсказкой, которая заливается при наведении. */
.genesis-files .test-source-main {
  min-height: 124px;
  gap: 18px;
  padding: 22px 24px;
  border-color: rgba(0, 255, 102, 0.22);
  background-image: linear-gradient(90deg, rgba(0, 255, 102, 0.085), transparent 62%);
}

.genesis-files .test-source-main::before {
  content: "";
  position: absolute;
  left: 0;
  top: 18px;
  bottom: 18px;
  width: 2px;
  border-radius: 999px;
  background: var(--green);
  box-shadow: 0 0 12px rgba(0, 255, 102, 0.28);
}

.genesis-files .test-source-main:hover {
  border-color: rgba(0, 255, 102, 0.5);
  background-image: linear-gradient(90deg, rgba(0, 255, 102, 0.13), transparent 70%);
}

.genesis-files .test-source-main .source-icon {
  flex-basis: 58px;
  width: 58px;
  height: 58px;
  border-radius: 14px;
}

.genesis-files .test-source-main .source-icon img {
  max-width: 34px;
  max-height: 34px;
}

.genesis-files .test-source-main:hover .source-icon img {
  transform: translateY(3px);
}

.genesis-files .test-source-main .test-source-text strong {
  font-size: 21px;
}

.genesis-files .test-source-cta {
  flex-shrink: 0;
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 8px 18px;
  border: 1px solid rgba(0, 255, 102, 0.7);
  border-radius: 8px;
  color: var(--green);
  background: rgba(0, 255, 102, 0.05);
  box-shadow: inset 0 0 10px rgba(0, 255, 102, 0.1);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.2;
  text-shadow: 0 0 8px rgba(0, 255, 102, 0.4);
  transition: color 0.3s cubic-bezier(0.25, 0.8, 0.25, 1), background-color 0.3s cubic-bezier(0.25, 0.8, 0.25, 1),
    box-shadow 0.3s cubic-bezier(0.25, 0.8, 0.25, 1), text-shadow 0.3s ease;
}

.genesis-files .test-source-main:hover .test-source-cta {
  color: #0b0d0c;
  background: var(--green);
  text-shadow: none;
  box-shadow: 0 0 20px rgba(0, 255, 102, 0.55), inset 0 0 5px rgba(255, 255, 255, 0.5);
}

.genesis-files .test-source-alt {
  min-height: 96px;
  padding: 16px;
  gap: 12px;
}

.genesis-files .test-source-alt .source-icon {
  flex-basis: 42px;
  width: 42px;
  height: 42px;
  border-radius: 11px;
}

.genesis-files .test-source-alt .source-icon img {
  max-width: 26px;
  max-height: 26px;
}

/* Узкий ряд: зеркала встают столбиком, подсказка основной кнопки уходит
   на отдельную строку. */
@container (max-width: 720px) {
  .genesis-files .test-source-alt {
    flex-direction: column;
    justify-content: center;
    gap: 10px;
    padding: 16px 8px;
    text-align: center;
  }

  .genesis-files .test-source-alt .test-source-text {
    align-items: center;
  }

  .genesis-files .test-source-alt .test-source-text strong {
    font-size: 14px;
  }

  .genesis-files .test-source-alt small {
    display: none;
  }
}

@container (max-width: 470px) {
  .genesis-files .test-source-main {
    flex-wrap: wrap;
    padding: 20px;
  }

  .genesis-files .test-source-main .test-source-text {
    flex: 1 1 160px;
  }

  .genesis-files .test-source-cta {
    flex: 1 0 100%;
    margin-left: 0;
  }
}

/* ---------- Тестовый аккаунт ---------- */

.genesis-files .test-account {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 26px 28px 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    radial-gradient(120% 90% at 100% 0%, rgba(0, 255, 102, 0.1), transparent 58%),
    rgba(255, 255, 255, 0.025);
}

.genesis-files .test-account-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-width: 0;
}

/* Ключ выходит за верхнюю кромку карточки и медленно парит; при наведении
   на карточку разгорается. Место под него держат отступы заголовка. */
.genesis-files .test-account-key {
  --key-size: clamp(132px, 8.4vw, 176px);
  position: absolute;
  top: -16px;
  right: 10px;
  z-index: 1;
  width: var(--key-size);
  height: auto;
  pointer-events: none;
  transform: rotate(-4deg);
  filter: drop-shadow(0 14px 22px rgba(0, 0, 0, 0.45)) drop-shadow(0 0 16px rgba(0, 255, 102, 0.16));
  animation: test-key-float 6s ease-in-out infinite;
  transition: transform 0.45s cubic-bezier(0.2, 0.7, 0.3, 1), filter 0.45s ease;
}

.genesis-files .test-account:hover .test-account-key {
  transform: rotate(-10deg) scale(1.04);
  filter: drop-shadow(0 18px 26px rgba(0, 0, 0, 0.5)) drop-shadow(0 0 26px rgba(0, 255, 102, 0.32));
}

@keyframes test-key-float {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -7px; }
}

.genesis-files .test-label {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 12px;
  color: var(--green) !important;
  font-size: 12px;
  line-height: 1.4;
  font-weight: 900;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.genesis-files .test-label::after {
  content: "";
  width: 40px;
  height: 1px;
  background: linear-gradient(90deg, rgba(0, 255, 102, 0.54), transparent);
}

.genesis-files .test-account h2 {
  max-width: calc(100% - var(--key-room, 150px));
  margin: 0 0 10px;
  padding: 0;
  font-size: 22px;
  line-height: 1.2;
  font-weight: 800;
}

.genesis-files .test-account-text {
  max-width: calc(100% - var(--key-room, 150px));
  margin: 0;
  color: var(--muted) !important;
  font-size: 14px;
  line-height: 1.55;
  font-weight: 600;
}

.genesis-files .test-perks {
  margin: 20px 0 24px;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
}

.genesis-files .test-perks li {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin: 0;
  padding: 12px 0 12px 24px;
  border-bottom: 1px solid var(--line);
}

/* Грань камня из ключа: маркер свойств вместо обычной точки списка. */
.genesis-files .test-perks li::before,
.genesis-files .test-rule h3::before {
  content: "";
  width: 7px;
  height: 7px;
  border: 1px solid rgba(0, 255, 102, 0.62);
  background: rgba(0, 255, 102, 0.2);
  box-shadow: 0 0 8px rgba(0, 255, 102, 0.3);
  transform: rotate(45deg);
}

.genesis-files .test-perks li::before {
  position: absolute;
  left: 3px;
  top: 19px;
}

.genesis-files .test-perks strong {
  color: #ffffff;
  font-size: 15px;
  line-height: 1.3;
  font-weight: 800;
}

.genesis-files .test-perks span {
  color: var(--dim);
  font-size: 13px;
  line-height: 1.45;
  font-weight: 600;
}

.genesis-files .test-account-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: auto;
}

/* Главная кнопка сайта («Личный кабинет»): зелёная рамка и свечение,
   при наведении заливка, подъём и блик. */
.genesis-files .test-register-button,
.test-dialog .test-submit {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  margin: 0;
  padding: 12px 24px;
  border: 1px solid #00ff66;
  border-radius: 8px;
  color: #00ff66;
  background: rgba(0, 255, 102, 0.05);
  box-shadow: inset 0 0 10px rgba(0, 255, 102, 0.1);
  font: 700 14px/1.25 Montserrat, "Segoe UI", Arial, sans-serif;
  letter-spacing: 0.01em;
  text-transform: none;
  text-shadow: 0 0 8px rgba(0, 255, 102, 0.4);
  white-space: normal;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1), color 0.3s cubic-bezier(0.25, 0.8, 0.25, 1),
    background-color 0.3s cubic-bezier(0.25, 0.8, 0.25, 1), box-shadow 0.3s cubic-bezier(0.25, 0.8, 0.25, 1),
    text-shadow 0.3s ease;
}

.genesis-files .test-register-button::after,
.test-dialog .test-submit::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, 0.55) 50%, transparent 65%);
  transform: translateX(-120%);
  pointer-events: none;
}

.genesis-files .test-register-button:hover,
.test-dialog .test-submit:hover {
  transform: translateY(-2px);
  color: #0b0d0c;
  background: #00ff66;
  text-shadow: none;
  box-shadow: 0 0 20px rgba(0, 255, 102, 0.6), inset 0 0 5px rgba(255, 255, 255, 0.5);
}

.genesis-files .test-register-button:hover::after,
.test-dialog .test-submit:hover::after {
  transform: translateX(120%);
  transition: transform 0.8s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.genesis-files .test-register-button:active,
.test-dialog .test-submit:active {
  transform: translateY(0) scale(0.98);
  box-shadow: 0 0 10px rgba(0, 255, 102, 0.45), inset 0 2px 6px rgba(0, 0, 0, 0.25);
  transition-duration: 0.08s;
}

.genesis-files .test-register-button:focus-visible,
.test-dialog .test-submit:focus-visible {
  outline: 2px solid #00ff66;
  outline-offset: 4px;
}

/* Вход в руководство: компактная вторая кнопка с «консолью» и мигающим
   курсором при наведении. */
.genesis-files .test-guide-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 7px 16px 7px 8px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.03);
  font-size: 14px;
  line-height: 1.25;
  font-weight: 700;
  transition: transform 0.18s ease, border-color 0.18s ease, background-color 0.18s ease, color 0.18s ease,
    box-shadow 0.18s ease;
}

.genesis-files .test-guide-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 1px;
  flex: 0 0 32px;
  height: 32px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--dim);
  background: rgba(0, 0, 0, 0.28);
  font: 700 13px/1 "JetBrains Mono", Consolas, monospace;
  transition: color 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.genesis-files .test-guide-mark i {
  width: 7px;
  height: 2px;
  margin-top: 8px;
  background: currentColor;
}

.genesis-files .test-guide-link:hover {
  transform: translateY(-2px);
  border-color: rgba(0, 255, 102, 0.34);
  color: #ffffff;
  background: rgba(0, 255, 102, 0.045);
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.24);
}

.genesis-files .test-guide-link:hover .test-guide-mark {
  color: var(--green);
  border-color: rgba(0, 255, 102, 0.34);
  box-shadow: 0 0 12px rgba(0, 255, 102, 0.18);
}

.genesis-files .test-guide-link:hover .test-guide-mark i {
  animation: test-caret 1s steps(1) infinite;
}

.genesis-files .test-guide-link:active {
  transform: translateY(0) scale(0.98);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
  transition-duration: 0.08s;
}

.genesis-files .test-guide-link:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 4px;
}

@keyframes test-caret {
  50% { opacity: 0; }
}

/* ---------- Установка и условия ---------- */

.genesis-files .test-steps {
  margin: 0;
  padding: 0;
  list-style: none;
}

.genesis-files .test-steps > .step {
  position: relative;
  margin: 0;
}

.genesis-files .test-install {
  margin-top: 22px;
}

/* Шесть шагов установки: на широком экране в одну линию, на среднем двумя
   строками по три. Номера соединены линией, обязательный шаг отмечен зелёной
   кромкой сверху. */
@media (min-width: 1100px) {
  .genesis-files .test-install .test-steps {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .genesis-files .test-install .step {
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
    align-content: start;
    gap: 14px;
    padding: 20px 22px 22px;
  }

  .genesis-files .test-install .step-index {
    justify-self: start;
  }

  .genesis-files .test-install .step:not(:last-child)::after {
    content: "";
    position: absolute;
    top: 37px;
    left: 68px;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, rgba(0, 255, 102, 0.34), rgba(255, 255, 255, 0.04));
  }

  .genesis-files .test-install .step.is-required {
    background:
      linear-gradient(180deg, rgba(0, 255, 102, 0.105), rgba(11, 17, 18, 0.66) 62%),
      rgba(11, 17, 18, 0.66);
  }

  .genesis-files .test-install .step.is-required::before {
    top: 0;
    bottom: auto;
    left: 18px;
    right: 18px;
    width: auto;
    height: 2px;
  }

  .genesis-files .test-install .step:nth-child(3n)::after {
    content: none;
  }
}

@media (min-width: 1700px) {
  .genesis-files .test-install .test-steps {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }

  .genesis-files .test-install .step:nth-child(3n):not(:last-child)::after {
    content: "";
  }
}

.genesis-files .test-path {
  display: inline-block;
  padding: 0 6px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: #c9f5d9;
  background: rgba(0, 0, 0, 0.28);
  font: 600 12px/1.6 "JetBrains Mono", Consolas, monospace;
  white-space: nowrap;
}

.genesis-files .test-rule-grid {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
}

.genesis-files .test-rule {
  min-width: 0;
  padding: 18px 20px;
  background: rgba(11, 17, 18, 0.66);
}

.genesis-files .test-rule-wide {
  grid-column: 1 / -1;
  background:
    linear-gradient(90deg, rgba(0, 255, 102, 0.06), rgba(11, 17, 18, 0.66) 50%),
    rgba(11, 17, 18, 0.66);
}

.genesis-files .test-rule h3 {
  display: flex;
  align-items: center;
  gap: 11px;
  margin: 0 0 6px;
  font-size: 15px;
  line-height: 1.25;
  font-weight: 800;
}

.genesis-files .test-rule h3::before {
  flex: 0 0 7px;
}

.genesis-files .test-rule p {
  margin: 0;
  color: var(--dim) !important;
  font-size: 13px;
  line-height: 1.5;
  font-weight: 600;
}

/* ---------- Появление при прокрутке (включает скрипт) ---------- */

html.test-motion .genesis-files .test-reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1) var(--test-delay, 0ms),
    transform 0.6s cubic-bezier(0.16, 1, 0.3, 1) var(--test-delay, 0ms);
}

html.test-motion .genesis-files .test-reveal.is-in {
  opacity: 1;
  transform: none;
}

.genesis-files .test-account.test-reveal,
.genesis-files .test-rules.test-reveal {
  --test-delay: 90ms;
}

/* ---------- Большие экраны: как у верхнего раздела ---------- */

@media (min-width: 2400px) {
  .genesis-files .test-source-text strong { font-size: 18px; }
  .genesis-files .test-source-main .test-source-text strong { font-size: 24px; }
  .genesis-files .test-source-text small,
  .genesis-files .test-perks span,
  .genesis-files .test-rule p { font-size: 14px; }
  .genesis-files .test-source-main { min-height: 140px; }
  .genesis-files .test-source-main .source-icon { flex-basis: 64px; width: 64px; height: 64px; }
  .genesis-files .test-account { padding: 32px 34px 34px; }
  .genesis-files .test-account h2 { font-size: 26px; }
  .genesis-files .test-account-text { font-size: 15px; }
  .genesis-files .test-perks strong,
  .genesis-files .test-rule h3 { font-size: 16px; }
  .genesis-files .test-register-button,
  .genesis-files .test-guide-link,
  .genesis-files .test-source-cta { font-size: 15px; }
  .genesis-files .test-register-button,
  .genesis-files .test-guide-link { min-height: 52px; }
  .genesis-files .test-path { font-size: 13px; }
}

@media (min-width: 3600px) {
  .genesis-files .test-source { padding: 24px; }
  .genesis-files .test-source-text strong { font-size: 22px; }
  .genesis-files .test-source-main .test-source-text strong { font-size: 28px; }
  .genesis-files .test-source-text small,
  .genesis-files .test-perks span,
  .genesis-files .test-rule p { font-size: 16px; }
  .genesis-files .test-source-main { min-height: 170px; }
  .genesis-files .test-source-main .source-icon { flex-basis: 76px; width: 76px; height: 76px; }
  .genesis-files .test-source-main .source-icon img { max-width: 44px; max-height: 44px; }
  .genesis-files .test-source-alt { min-height: 116px; }
  .genesis-files .test-source-alt .source-icon { flex-basis: 56px; width: 56px; height: 56px; }
  .genesis-files .test-source-alt .source-icon img { max-width: 34px; max-height: 34px; }
  .genesis-files .test-account { --key-room: 230px; padding: 40px 44px 44px; }
  .genesis-files .test-account-key { --key-size: 240px; top: -20px; }
  .genesis-files .test-label { font-size: 14px; }
  .genesis-files .test-account h2 { font-size: 30px; }
  .genesis-files .test-account-text { font-size: 17px; }
  .genesis-files .test-perks strong,
  .genesis-files .test-rule h3 { font-size: 18px; }
  .genesis-files .test-perks li::before { top: 23px; }
  .genesis-files .test-rule { padding: 24px 26px; }
  .genesis-files .test-register-button,
  .genesis-files .test-guide-link,
  .genesis-files .test-source-cta { font-size: 17px; }
  .genesis-files .test-register-button,
  .genesis-files .test-guide-link { min-height: 58px; padding-left: 28px; padding-right: 28px; }
  .genesis-files .test-guide-link { padding-left: 10px; }
  .genesis-files .test-guide-mark { flex-basis: 38px; height: 38px; font-size: 15px; }
  .genesis-files .test-path { font-size: 15px; }
}

/* ---------- Планшет и телефон ---------- */

@media (max-width: 720px) {
  .genesis-files .test-stage {
    margin-top: 12px;
  }

  .genesis-files .test-account {
    --key-room: 96px;
    padding: 22px 20px 22px;
  }

  .genesis-files .test-account-key {
    --key-size: 108px;
    top: -12px;
    right: 4px;
  }

  .genesis-files .test-account h2 {
    font-size: 20px;
  }

  .genesis-files .test-account-actions > * {
    flex: 1 1 100%;
  }

  .genesis-files .test-guide-link {
    justify-content: center;
    font-size: 13px;
  }

  .genesis-files .test-rule-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .genesis-files .test-rule {
    padding: 16px 18px;
  }
}

/* ---------- Окно регистрации ---------- */

.test-dialog {
  --green: #00ff66;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.14);
  --muted: rgba(255, 255, 255, 0.74);
  --dim: rgba(255, 255, 255, 0.56);
  box-sizing: border-box;
  width: min(940px, calc(100% - 32px));
  max-width: none;
  max-height: calc(100dvh - 32px);
  margin: auto;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 18px;
  color: #ffffff;
  background:
    linear-gradient(135deg, rgba(24, 52, 50, 0.34), rgba(10, 14, 15, 0.7)),
    rgba(12, 16, 17, 0.72);
  -webkit-backdrop-filter: blur(16px) saturate(1.1);
  backdrop-filter: blur(16px) saturate(1.1);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  font-family: Montserrat, "Segoe UI", Arial, sans-serif;
  line-height: 1.5;
  overflow: auto;
  overscroll-behavior: contain;
  color-scheme: dark;
}

.test-dialog *,
.test-dialog *::before,
.test-dialog *::after {
  box-sizing: border-box;
}

.test-dialog::backdrop {
  background: rgba(3, 6, 8, 0.58);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
}

.test-dialog[open] {
  animation: test-dialog-in 0.34s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.test-dialog[open]::backdrop {
  animation: test-backdrop-in 0.25s ease both;
}

@keyframes test-dialog-in {
  from { opacity: 0; transform: translateY(16px) scale(0.98); }
  to { opacity: 1; transform: none; }
}

@keyframes test-backdrop-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

body:has(.test-dialog[open]) {
  overflow: hidden;
}

.test-dialog .test-dialog-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.86fr) minmax(0, 1.14fr);
}

.test-dialog .test-dialog-aside {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 28px 32px 32px;
  border-right: 1px solid var(--line);
  background:
    radial-gradient(90% 60% at 0% 0%, rgba(0, 255, 102, 0.1), transparent 70%),
    rgba(0, 0, 0, 0.14);
}

.test-dialog .test-dialog-key {
  display: block;
  width: 128px;
  height: auto;
  margin: 0 0 14px -10px;
  filter: drop-shadow(0 12px 20px rgba(0, 0, 0, 0.45)) drop-shadow(0 0 18px rgba(0, 255, 102, 0.2));
  animation: test-key-float 6s ease-in-out infinite;
}

.test-dialog .test-label {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 12px;
  color: var(--green);
  font-size: 12px;
  line-height: 1.4;
  font-weight: 900;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.test-dialog .test-label::after {
  content: "";
  width: 40px;
  height: 1px;
  background: linear-gradient(90deg, rgba(0, 255, 102, 0.54), transparent);
}

.test-dialog h2 {
  margin: 0 0 12px;
  color: #ffffff;
  font-size: 30px;
  line-height: 1.1;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.test-dialog .test-dialog-lead {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
  font-weight: 600;
}

.test-dialog .test-perks {
  margin: 22px 0 24px;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
}

.test-dialog .test-perks li {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin: 0;
  padding: 12px 0 12px 24px;
  border-bottom: 1px solid var(--line);
}

.test-dialog .test-perks li::before {
  content: "";
  position: absolute;
  left: 3px;
  top: 19px;
  width: 7px;
  height: 7px;
  border: 1px solid rgba(0, 255, 102, 0.62);
  background: rgba(0, 255, 102, 0.2);
  box-shadow: 0 0 8px rgba(0, 255, 102, 0.3);
  transform: rotate(45deg);
}

.test-dialog .test-perks strong {
  color: #ffffff;
  font-size: 15px;
  line-height: 1.3;
  font-weight: 800;
}

.test-dialog .test-perks span {
  color: var(--dim);
  font-size: 13px;
  line-height: 1.45;
  font-weight: 600;
}

.test-dialog .test-dialog-world {
  margin: auto 0 0;
  color: var(--dim);
  font-size: 12px;
  line-height: 1.6;
  font-weight: 600;
}

.test-dialog .test-form-area {
  min-width: 0;
  padding: 36px 36px 32px;
}

.test-dialog .test-form-heading {
  margin: 0 0 26px;
  padding-right: 40px;
}

.test-dialog .test-form-heading h3 {
  margin: 0 0 6px;
  color: #ffffff;
  font-size: 22px;
  line-height: 1.25;
  font-weight: 800;
}

.test-dialog .test-form-heading p {
  margin: 0;
  color: var(--dim);
  font-size: 13px;
  line-height: 1.6;
  font-weight: 600;
}

.test-dialog .test-form {
  display: grid;
  gap: 18px;
  margin: 0;
  padding: 0;
}

.test-dialog .test-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.test-dialog .test-form label {
  display: block;
  margin: 0;
  padding: 0;
  color: rgba(255, 255, 255, 0.86);
  font-size: 13px;
  line-height: 1.4;
  font-weight: 700;
}

.test-dialog .test-optional {
  margin-left: 6px;
  color: var(--dim);
  font-size: 12px;
  font-weight: 600;
}

.test-dialog .test-field small {
  color: var(--dim);
  font-size: 12px;
  line-height: 1.45;
  font-weight: 600;
}

.test-dialog .test-form input {
  display: block;
  width: 100%;
  min-width: 0;
  height: 50px;
  margin: 0;
  padding: 0 16px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.28);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.18);
  font: 600 14px/1.4 Montserrat, "Segoe UI", Arial, sans-serif;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

.test-dialog .test-form input::placeholder {
  color: rgba(255, 255, 255, 0.32);
  opacity: 1;
}

.test-dialog .test-form input:hover {
  border-color: rgba(255, 255, 255, 0.24);
}

.test-dialog .test-form input:focus {
  outline: none;
  border-color: rgba(0, 255, 102, 0.6);
  background: rgba(0, 0, 0, 0.36);
  box-shadow: 0 0 0 3px rgba(0, 255, 102, 0.12), inset 0 1px 3px rgba(0, 0, 0, 0.18);
}

.test-dialog .test-form input[aria-invalid="true"] {
  border-color: rgba(255, 110, 110, 0.65);
  box-shadow: 0 0 0 3px rgba(255, 77, 77, 0.1);
}

.test-dialog .test-form input:-webkit-autofill {
  -webkit-text-fill-color: #ffffff;
  box-shadow: 0 0 0 1000px #0e1413 inset !important;
}

.test-dialog .test-password-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.test-dialog .test-form-error,
.test-dialog .test-result {
  margin: 0;
  padding: 11px 14px;
  border: 1px solid rgba(255, 77, 77, 0.28);
  border-radius: 10px;
  color: #ffb3b3;
  background: rgba(255, 77, 77, 0.08);
  font-size: 13px;
  line-height: 1.5;
  font-weight: 600;
  animation: test-note-in 0.25s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.test-dialog .test-result.is-ok {
  border-color: rgba(0, 255, 102, 0.32);
  color: #b8f7cd;
  background: rgba(0, 255, 102, 0.08);
}

.test-dialog .test-form button.test-submit[type="submit"]:disabled {
  opacity: 0.6;
  cursor: progress;
}

.test-dialog [hidden] {
  display: none !important;
}

@keyframes test-note-in {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: none; }
}

.test-dialog .test-form-submit {
  padding-top: 4px;
}

.test-dialog .test-submit {
  width: 100%;
  min-height: 52px;
  font-size: 15px;
}

/* Тема сайта красит все кнопки отправки своим правилом: вес у него выше,
   а белый цвет текста безусловный. Отвечаем ровно по адресу этой кнопки. */
.test-dialog .test-form button.test-submit[type="submit"] {
  padding: 12px 24px;
  border: 1px solid #00ff66;
  border-radius: 8px;
  color: #00ff66 !important;
  background: rgba(0, 255, 102, 0.05);
  font-size: 15px;
  font-weight: 700;
}

.test-dialog .test-form button.test-submit[type="submit"]:hover {
  border-color: #00ff66;
  color: #0b0d0c !important;
  background: #00ff66;
}

.test-dialog .test-form-caption {
  margin: 12px 0 0;
  color: var(--dim);
  font-size: 12px;
  line-height: 1.6;
  font-weight: 600;
  text-align: center;
}

.test-dialog .test-close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  margin: 0;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.6);
  background: transparent;
  cursor: pointer;
  transition: color 0.18s ease, background-color 0.18s ease, border-color 0.18s ease;
}

.test-dialog .test-close svg {
  width: 12px;
  height: 12px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  transition: transform 0.3s cubic-bezier(0.2, 0.7, 0.3, 1);
}

.test-dialog .test-close:hover {
  border-color: var(--line-strong);
  color: #ffffff;
  background: rgba(255, 255, 255, 0.06);
}

.test-dialog .test-close:hover svg {
  transform: rotate(90deg);
}

.test-dialog .test-close:active {
  transform: scale(0.94);
}

.test-dialog .test-close:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 3px;
}

@media (min-width: 2400px) {
  .test-dialog { width: 1080px; }
  .test-dialog .test-form input,
  .test-dialog .test-form label,
  .test-dialog .test-dialog-lead { font-size: 15px; }
  .test-dialog .test-form input { height: 54px; }
  .test-dialog h2 { font-size: 34px; }
}

@media (min-width: 3600px) {
  .test-dialog { width: 1280px; }
  .test-dialog .test-dialog-aside,
  .test-dialog .test-form-area { padding: 48px; }
  .test-dialog .test-dialog-key { width: 168px; }
  .test-dialog h2 { font-size: 42px; }
  .test-dialog .test-form-heading h3 { font-size: 28px; }
  .test-dialog .test-form input { height: 60px; font-size: 17px; }
  .test-dialog .test-form label,
  .test-dialog .test-dialog-lead,
  .test-dialog .test-form-heading p { font-size: 17px; }
  .test-dialog .test-submit { min-height: 60px; font-size: 18px; }
}

@media (max-width: 760px) {
  .test-dialog .test-dialog-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .test-dialog .test-dialog-aside {
    display: grid;
    grid-template-columns: 76px minmax(0, 1fr);
    column-gap: 14px;
    align-items: center;
    padding: 22px 56px 20px 22px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .test-dialog .test-dialog-key {
    grid-row: 1 / span 2;
    width: 76px;
    margin: 0;
  }

  .test-dialog .test-label {
    margin-bottom: 6px;
  }

  .test-dialog h2 {
    margin: 0;
    font-size: 24px;
  }

  .test-dialog .test-dialog-lead,
  .test-dialog .test-perks {
    grid-column: 1 / -1;
  }

  .test-dialog .test-dialog-lead {
    margin-top: 14px;
    font-size: 13px;
  }

  .test-dialog .test-perks {
    margin: 14px 0 0;
  }

  .test-dialog .test-dialog-world {
    display: none;
  }

  .test-dialog .test-form-area {
    padding: 24px 22px 24px;
  }

  .test-dialog .test-form-heading {
    margin-bottom: 20px;
    padding-right: 0;
  }
}

@media (max-width: 420px) {
  .test-dialog {
    width: calc(100% - 16px);
    max-height: calc(100dvh - 16px);
    border-radius: 14px;
  }

  .test-dialog .test-password-row {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (prefers-reduced-motion: reduce) {
  .genesis-files .test-stage *,
  .genesis-files .test-shell *,
  .genesis-files .test-shell *::before,
  .genesis-files .test-shell *::after,
  .test-dialog,
  .test-dialog *,
  .test-dialog *::after,
  .test-dialog::backdrop {
    animation: none !important;
    transition: none !important;
  }

  .genesis-files .test-source:hover,
  .genesis-files .test-source:active,
  .genesis-files .test-register-button:hover,
  .genesis-files .test-register-button:active,
  .genesis-files .test-guide-link:hover,
  .genesis-files .test-guide-link:active,
  .test-dialog .test-submit:hover,
  .test-dialog .test-submit:active {
    transform: none !important;
  }
}
