/* Исправления интерфейса, не затрагивающие собранные assets шаблона. */
.hero__bottom p { font-weight: 500; }

/* Типовые элементы визуального редактора внутри готовой структуры статьи. */
.article-intro > div > ul,
.article-intro > div > ol,
.article-section > div > ul,
.article-section > div > ol {
  margin: 0 0 28px;
  padding-left: 1.35em;
}
.article-intro > div > ul,
.article-section > div > ul { list-style: disc; }
.article-intro > div > ol,
.article-section > div > ol { list-style: decimal; }
.article-intro > div li,
.article-section > div li {
  margin: 0 0 12px;
  padding-left: .25em;
  font: inherit;
  font-size: clamp(19px, 1.35vw, 27px);
  line-height: 1.48;
}
.article-intro > div li::marker,
.article-section > div li::marker { color: #2f5ac0; }
.article-intro > div li > ul,
.article-intro > div li > ol,
.article-section > div li > ul,
.article-section > div li > ol { margin: 12px 0 0; }
.article-intro > div h3,
.article-intro > div h4,
.article-section > div h3,
.article-section > div h4 {
  margin: 36px 0 16px;
  color: #2f5ac0;
  font-family: Faberge, Georgia, serif;
  font-weight: 400;
  line-height: 1.15;
}
.article-intro > div h4,
.article-section > div h4 { font-size: clamp(22px, 1.6vw, 28px); }
.article-intro > div blockquote,
.article-section > div blockquote {
  margin: 32px 0;
  padding: 18px 24px;
  border-left: 3px solid #829cd9;
  background: #eef3fc;
}
.article-intro > div img,
.article-section > div img { max-width: 100%; height: auto; }
.article-intro > div a,
.article-section > div a { color: #2f5ac0; text-decoration: underline; text-underline-offset: .16em; }

@media (max-width: 540px) {
  .article-intro > div > ul,
  .article-intro > div > ol,
  .article-section > div > ul,
  .article-section > div > ol { margin-bottom: 24px; }
  .article-intro > div li,
  .article-section > div li { margin-bottom: 10px; font-size: 18px; line-height: 1.55; }
  .article-intro > div blockquote,
  .article-section > div blockquote { margin: 26px 0; padding: 16px 18px; }
}

.page-base .site-header,
.page-contacts .site-header { color: #2f5ac0; }
.page-base .site-header .brand img,
.page-contacts .site-header .brand img { filter: none; }
.page-base .site-header .menu-toggle span[aria-hidden],
.page-contacts .site-header .menu-toggle span[aria-hidden] { background: #2f5ac0; }

.footer__form .button { width: 100%; min-width: 0; max-width: 300px; min-height: 64px; font-size: 18px; }
.footer__form .form-field select {
  appearance: none;
  cursor: pointer;
  background-color: transparent;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 12'%3E%3Cpath d='m2 2 8 8 8-8' fill='none' stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='2'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 28px center;
  background-size: 14px 9px;
  padding-right: 62px;
}
.footer__form .form-field select:hover { border-color: #fff; }
.footer__form .form-field select:focus { outline: 2px solid #fff; outline-offset: 2px; }

/* На промежуточной ширине первая колонка не должна сжиматься до текста кнопки. */
@media (min-width: 701px) and (max-width: 1500px) {
  .footer__form .consultation-form {
    grid-template-columns: minmax(220px, 280px) minmax(0, 1fr);
    column-gap: 24px;
  }
  .footer__form .button { max-width: 280px; }
  .footer__form .consent { min-width: 0; }
}

.modal--consultation { overflow: visible; }
.modal--consultation .modal__box { padding-block: 40px; }

/* На первом вопросе кнопка «Назад» остаётся видимой, но недоступной — как в макете квиза. */
.page-test .test-quiz__actions { position: relative; z-index: 4; display: flex !important; }
.page-test .test-quiz__arrow { display: grid !important; }
.page-test [data-quiz-prev][hidden] { pointer-events: none; opacity: .55; }

@media (min-width: 641px) {
  .page-test .test-page__content { padding-top: clamp(62px, 7.5vh, 92px); }
  .page-test .test-quiz { margin-top: clamp(32px, 4.5vh, 58px); }
  .page-test .test-quiz__progress { margin-bottom: clamp(34px, 4.5vh, 62px); }
  .page-test .test-quiz__actions { margin-top: clamp(32px, 4vh, 54px); }

  /* Стрелки обычных шагов не зависят от высоты формулировки вопроса. */
  .page-test .test-quiz:not(.is-final) .test-quiz__actions {
    position: fixed;
    z-index: 5;
    right: max(3.5vw, 32px);
    bottom: max(5vh, 32px);
    margin: 0;
  }

  /* Финальный шаг: кнопка и согласие образуют один аккуратный ряд под полями. */
  .page-test .test-quiz.is-final .test-quiz__step--contacts {
    position: relative;
  }
  .page-test .test-quiz.is-final .test-quiz__consent {
    position: absolute;
    top: calc(100% + 48px);
    left: 412px;
    width: min(340px, calc(100% - 412px));
    margin: 0;
  }
  .page-test .test-quiz.is-final .test-quiz__actions {
    margin-top: 28px;
    align-items: center;
  }
}

/* На ноутбуках финальная форма и все вопросы полностью помещаются в экран. */
@media (min-width: 641px) and (max-height: 900px) {
  .page-test .test-page__content {
    width: min(1020px, calc(100% - 40px));
    transform: scale(.88);
    transform-origin: top center;
  }
  .page-test .test-quiz:not(.is-final) .test-quiz__actions {
    right: max(3vw, 24px);
    bottom: max(3vh, 24px);
  }
}

@media (min-width: 641px) and (max-height: 760px) {
  .page-test .test-page__content { transform: scale(.78); }
}

@media (max-width: 640px) {
  .page-test .test-quiz.is-final .test-quiz__consent { position: static; width: auto; }
}

.form-honeypot { position: absolute !important; left: -10000px !important; width: 1px !important; height: 1px !important; opacity: 0 !important; pointer-events: none !important; }

@media (max-width: 700px) {
  .footer__form .button { max-width: none; min-height: 60px; }
  .modal--consultation { overflow: auto; }
}
