/* QUIZ styles — oridis.ru/quiz (mobile-first, palette: #005b7f / #e0a522, PT Sans) */
#quiz-app { --qz-blue:#005b7f; --qz-blue2:#007aaa; --qz-yellow:#e0a522; --qz-dark:#3f4344; --qz-gray:#646b70; --qz-line:#dfe7ec; --qz-bg:#f4f8fa; }
#quiz-app * , #quiz-app *::before, #quiz-app *::after { box-sizing: border-box; }
#quiz-app { font-family: "PT Sans", Arial, sans-serif; color: var(--qz-dark); background: var(--qz-bg); max-width: 860px; margin: 0 auto; padding: 20px 16px 44px; position: relative; }
/* Пока помощник показывается, оставляем ему место внизу справа — чтобы
   он не ложился на последние карточки ответов и кнопку. */
body.qz-assist-on #quiz-app { padding-bottom: 104px; }
#quiz-app button { font-family: inherit; cursor: pointer; }
#quiz-app :focus-visible { outline: 3px solid var(--qz-yellow); outline-offset: 2px; }

/* header / progress */
.qz-header { display: flex; align-items: center; gap: 12px; margin-bottom: 22px; }
.qz-back { border: 0; background: none; color: var(--qz-blue); font-size: 14px; padding: 6px 8px; white-space: nowrap; }
.qz-back:hover { text-decoration: underline; }
.qz-progress { flex: 1; height: 8px; background: #dce7ec; border-radius: 8px; overflow: hidden; }
.qz-bar { height: 100%; width: 0; background: linear-gradient(90deg, var(--qz-yellow), #f0b93e); border-radius: 8px; transition: width .45s ease; }
.qz-count { color: var(--qz-gray); font-size: 13px; white-space: nowrap; }

/* step */
.qz-view { animation: qzFade .3s ease; }
.qz-view:focus { outline: none; }
@keyframes qzFade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.qz-question { font-size: 26px; line-height: 1.25; color: var(--qz-blue); margin: 0 0 6px; font-weight: 700; }
.qz-hint { color: var(--qz-gray); margin: 0 0 20px; font-size: 15px; }

.qz-cards { display: grid; grid-template-columns: 1fr; gap: 12px; }
.qz-card { text-align: left; border: 2px solid var(--qz-line); border-radius: 14px; background: #fff; padding: 16px; display: flex; align-items: flex-start; gap: 14px; transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease; }
.qz-card:hover { border-color: var(--qz-blue2); transform: translateY(-2px); box-shadow: 0 6px 18px rgba(0,91,127,.10); }
.qz-icon { font-size: 28px; line-height: 1; flex: 0 0 auto; width: 40px; text-align: center; }
.qz-label { font-size: 17px; font-weight: 700; color: var(--qz-dark); display: block; }
.qz-sub { display: block; margin-top: 4px; font-size: 13.5px; color: var(--qz-gray); font-weight: 400; }
.qz-card.is-active { border-color: var(--qz-blue); background: #eef6fa; box-shadow: 0 0 0 3px rgba(0,122,170,.15); }

/* ============================ первый экран ============================
   Порядок блоков: badge → H1 → лид → ОДНА кнопка → преимущества →
   технологии → «что будет в конце» → стоимость.
   Стиль — современный digital product: свободное пространство, крупная
   типографика, одна иерархия акцентов, лёгкие границы вместо тяжёлых
   карточек. Никаких дополнительных конкурирующих CTA.               */
.qz-intro { animation: qzFade .4s ease; }

/* --- hero ---------------------------------------------------------- */
.qz-hero {
  background: linear-gradient(170deg, #ffffff 0%, #fbfdfe 62%, #f3f9fc 100%);
  border: 1px solid var(--qz-line);
  border-radius: 22px;
  padding: 24px 20px 26px;
  margin-bottom: 26px;
  box-shadow: 0 14px 34px rgba(0, 91, 127, .07);
}
.qz-badge {
  display: inline-block;
  background: rgba(0, 91, 127, .08);
  color: var(--qz-blue);
  border: 1px solid rgba(0, 91, 127, .18);
  border-radius: 999px;
  padding: 7px 15px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .01em;
}
.qz-intro-title {
  font-size: clamp(27px, 7.4vw, 44px);
  line-height: 1.1;
  font-weight: 700;
  letter-spacing: -.015em;
  color: var(--qz-blue);
  margin: 16px 0 12px;
  max-width: 20ch;
}
.qz-intro-lead {
  font-size: 16.5px;
  line-height: 1.6;
  color: var(--qz-gray);
  margin: 0;
  max-width: 54ch;
}
.qz-start { margin-top: 22px; }
.qz-fine { margin: 10px 0 0; font-size: 13.5px; color: var(--qz-gray); }

/* --- секции -------------------------------------------------------- */
.qz-sec { margin-bottom: 30px; }
.qz-sec-title {
  font-size: 19px;
  line-height: 1.3;
  font-weight: 700;
  color: var(--qz-blue);
  margin: 0 0 14px;
  letter-spacing: -.005em;
}
/* заголовок секции на финале («Что дальше?») — та же типографика */
.qz-panel-title { font-size: 17px; font-weight: 700; color: var(--qz-blue); margin: 0 0 12px; }

/* Преимущества: компактные лёгкие блоки, не «тяжёлые карточки». */
.qz-benefits { display: grid; grid-template-columns: 1fr; gap: 12px; }
.qz-benefit {
  background: #fff;
  border: 1px solid var(--qz-line);
  border-radius: 16px;
  padding: 16px 16px 17px;
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}
.qz-benefit:hover { border-color: #cfe0ea; box-shadow: 0 8px 22px rgba(0, 91, 127, .07); transform: translateY(-2px); }
.qz-benefit__icon {
  display: flex; align-items: center; justify-content: center;
  width: 34px; height: 34px;
  border-radius: 11px;
  background: rgba(224, 165, 34, .16);
  font-size: 17px;
  margin-bottom: 10px;
}
.qz-benefit__title { font-size: 16px; font-weight: 700; color: var(--qz-dark); margin: 0 0 5px; }
.qz-benefit__text { font-size: 14.5px; line-height: 1.5; color: var(--qz-gray); margin: 0; }

/* Блок технологий: одна широкая карточка + чипы. */
.qz-sec--tech {
  background: #fff;
  border: 1px solid var(--qz-line);
  border-radius: 18px;
  padding: 20px 18px 22px;
}
.qz-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.qz-chip {
  font-size: 13px; font-weight: 700; color: var(--qz-blue);
  background: #f2f7fa; border: 1px solid var(--qz-line);
  border-radius: 999px; padding: 6px 13px;
}
.qz-tech-note { margin: 14px 0 0; font-size: 14.5px; line-height: 1.5; color: var(--qz-gray); }

/* «Что будет в конце»: горизонтальная последовательность на десктопе,
   вертикальная на мобильном. */
.qz-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr; gap: 16px; }
.qz-step {
  display: flex; flex-direction: column; gap: 6px;
  border-top: 2px solid var(--qz-line);
  padding-top: 12px;
}
.qz-step__num {
  font-size: 26px; line-height: 1; font-weight: 700;
  color: #b87e00; letter-spacing: -.02em; /* аудит 12.10.26: #e0a522 давал2:1 на #f4f8fa — брали3:1 для крупного текста */
}
.qz-step__text { font-size: 15px; line-height: 1.5; color: var(--qz-dark); }

.qz-note { background: #fff7e6; border: 2px dashed #f0cd8a; border-radius: 16px; padding: 16px 18px; margin: 0; }
.qz-note--muted { background: #f2f7fa; border-color: #cfe0ea; }
.qz-note-title { display: block; font-size: 15.5px; color: var(--qz-blue); margin-bottom: 6px; }
.qz-note-text { margin: 0; font-size: 14.5px; line-height: 1.55; color: #5b6165; }
.qz-note-text--small { margin: 8px 0 0; font-size: 13px; line-height: 1.5; color: var(--qz-gray); }

/* обещание сверху («покажем цену...») */
.qz-promise {
  margin: 0 0 10px;
  font-size: 14.5px;
  line-height: 1.5;
  color: var(--qz-blue);
  font-weight: 600;
  text-align: center;
}

/* список цен */
.qz-note--price { background: #fff; border: 2px solid var(--qz-line); }
.qz-price-list { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 8px; }
.qz-price-item { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 10px 12px; background: #f8fbfd; border: 1px solid var(--qz-line); border-radius: 12px; }
.qz-price-label { font-size: 15px; font-weight: 600; color: var(--qz-dark); }
.qz-price-from { font-size: 15px; font-weight: 700; color: var(--qz-blue); white-space: nowrap; }

/* ценовой ориентир в блоке результата */
.qz-price-tier {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 18px 0 22px;
  padding: 14px 18px;
  background: linear-gradient(135deg, #f0f7fc 0%, #e8f2fa 100%);
  border: 2px solid var(--qz-blue);
  border-radius: 14px;
  text-align: center;
}
.qz-price-tier__label {
  font-size: 15px;
  line-height: 1.5;
  color: var(--qz-gray);
  font-weight: 500;
}
.qz-price-tier__value {
  font-size: 22px;
  line-height: 1.2;
  font-weight: 700;
  color: var(--qz-blue);
  white-space: nowrap;
}

/* пояснение про стоимость — в самом конце, после формы */
.qz-price-explanation {
  margin-top: 36px;
  padding-top: 20px;
  border-top: 1px solid var(--qz-line);
}
.qz-price-explanation .qz-note-title { font-size: 15px; }
.qz-price-explanation .qz-note-text { font-size: 14px; line-height: 1.55; }

.qz-cta.qz-cta--big { display: block; width: 100%; font-size: 18px; padding: 17px 22px; border-radius: 14px; }

/* toast */
.qz-toast { position: fixed; left: 50%; bottom: 26px; transform: translate(-50%, 20px); background: var(--qz-blue); color: #fff; padding: 12px 20px; border-radius: 30px; font-size: 15px; box-shadow: 0 10px 26px rgba(0,60,90,.35); opacity: 0; transition: opacity .25s ease, transform .25s ease; z-index: 60; max-width: 92vw; text-align: center; }
.qz-toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

/* ======================= виртуальный помощник =======================
   Живёт в document.body (вне #quiz-app), поэтому здесь не действуют
   скоуп-правила #quiz-app. Правила из ТЗ: маленький, не перекрывает CTA,
   можно свернуть, не мешает на мобильном, без постоянной анимации.   */
.qz-assistant {
  position: fixed;
  right: 14px;
  bottom: calc(14px + env(safe-area-inset-bottom, 0px));
  z-index: 50;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  max-width: min(74vw, 260px);
  font-family: "PT Sans", Arial, sans-serif;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity .3s ease, transform .3s ease;
}
.qz-assistant.is-shown { opacity: 1; transform: none; }

.qz-assistant__bubble {
  box-sizing: border-box;
  background: #fff;
  color: var(--qz-dark, #3f4344);
  border: 1px solid #dfe7ec;
  border-radius: 16px 16px 5px 16px;
  padding: 10px 14px;
  font-size: 14px;
  line-height: 1.45;
  box-shadow: 0 12px 30px rgba(0, 60, 90, .16);
}
.qz-assistant.is-min .qz-assistant__bubble { display: none; }

.qz-assistant__btn {
  position: relative;
  width: 46px; height: 46px;
  padding: 0; border: 0; border-radius: 50%;
  background: linear-gradient(150deg, #005b7f, #007aaa);
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(0, 60, 90, .28);
  transition: transform .15s ease, box-shadow .15s ease;
  font-family: inherit;
}
.qz-assistant__btn:hover { transform: translateY(-2px); box-shadow: 0 14px 28px rgba(0, 60, 90, .34); }
.qz-assistant__btn:focus-visible { outline: 3px solid var(--qz-yellow, #e0a522); outline-offset: 3px; }
.qz-assistant__avatar { display: block; font-size: 22px; line-height: 46px; text-align: center; }
.qz-assistant__chev {
  position: absolute; right: -3px; bottom: -3px;
  width: 19px; height: 19px; border-radius: 50%;
  background: #fff; border: 1px solid #dfe7ec;
  color: #005b7f; font-size: 10px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.qz-assistant.is-min .qz-assistant__chev { transform: rotate(180deg); }

@media (max-width: 479px) {
  /* На телефоне держим помощника компактным, чтобы не закрывал ответы. */
  .qz-assistant { max-width: min(68vw, 232px); right: 10px; bottom: calc(10px + env(safe-area-inset-bottom, 0px)); }
  .qz-assistant__bubble { font-size: 13.5px; padding: 9px 12px; }
}

/* ============================ финал ============================ */
.qz-result { animation: qzFade .35s ease; }
.qz-result-msg { font-size: 24px; line-height: 1.3; color: var(--qz-blue); font-weight: 700; margin: 6px 0 8px; }
.qz-result-note { color: var(--qz-gray); font-size: 15px; margin: 0 0 18px; }

.qz-next { background: #fff; border: 2px solid var(--qz-line); border-radius: 16px; padding: 18px; margin: 0 0 16px; }
.qz-next-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.qz-next-item { display: flex; gap: 12px; align-items: flex-start; }
.qz-next-icon { flex: 0 0 auto; width: 30px; height: 30px; border-radius: 9px; background: rgba(224,165,34,.16); display: flex; align-items: center; justify-content: center; font-size: 16px; }
.qz-next-body { display: block; }
.qz-next-item b { display: block; font-size: 15.5px; color: var(--qz-dark); margin-bottom: 2px; }
.qz-next-text { display: block; font-size: 14.5px; line-height: 1.45; color: var(--qz-gray); }

/* form */
.qz-form { background: #fff; border: 2px solid var(--qz-line); border-radius: 16px; padding: 20px; margin-bottom: 16px; }
.qz-form h3 { margin: 0 0 6px; font-size: 20px; color: var(--qz-dark); }
.qz-form-note { margin: 0 0 16px; color: var(--qz-gray); font-size: 14.5px; line-height: 1.5; }
#qz-lead-form { display: grid; gap: 10px; }
#qz-lead-form input { border: 2px solid var(--qz-line); border-radius: 10px; padding: 13px 14px; font-size: 16px; font-family: inherit; color: var(--qz-dark); width: 100%; }
#qz-lead-form input:focus { outline: none; border-color: var(--qz-blue2); }
.qz-hp { position: absolute !important; left: -9999px !important; width: 1px !important; height: 1px !important; opacity: 0 !important; pointer-events: none !important; }
.qz-error { color: #c62828; font-size: 13.5px; min-height: 18px; margin: 0; }
#qz-lead-form input[aria-invalid="true"] { border-color: #c62828; background: #fff6f6; }
/* текст только для скринридера (label под поля формы) */
.qz-sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.qz-cta { border: 0; border-radius: 10px; background: var(--qz-yellow); color: #352500; font-size: 17px; font-weight: 700; padding: 14px 18px; transition: background .15s ease, transform .15s ease; }
.qz-cta:hover { background: #f0b93e; transform: translateY(-1px); }
.qz-cta:disabled { opacity: .6; cursor: default; transform: none; }
.qz-consent { font-size: 12px; color: var(--qz-gray); margin: 0; text-align: center; }
.qz-consent-link { color: var(--qz-blue); text-decoration: underline; text-underline-offset: 2px; }
.qz-consent-link:hover { color: var(--qz-blue2); }
.qz-success { text-align: center; padding: 10px 0; }
.qz-success-icon { font-size: 40px; }
.qz-success h3 { margin-bottom: 6px; }
.qz-restart { border: 0; background: none; color: var(--qz-blue); font-size: 14px; text-decoration: underline; padding: 6px; margin: 0 auto; display: block; }

@media (min-width: 640px) {
  #quiz-app { padding: 34px 28px 64px; }
  body.qz-assist-on #quiz-app { padding-bottom: 116px; }

  .qz-cards { grid-template-columns: 1fr 1fr; }
  .qz-question { font-size: 30px; }
  .qz-body { padding: 0 8px; }

  .qz-hero { padding: 34px 34px 36px; border-radius: 26px; margin-bottom: 34px; }
  .qz-intro-lead { font-size: 17.5px; }
  .qz-sec { margin-bottom: 40px; }
  .qz-sec-title { font-size: 20px; margin-bottom: 18px; }
  .qz-sec--tech { padding: 26px 28px 28px; }

  /* Три преимущества в ряд — компактно и без «тяжёлых» карточек. */
  .qz-benefits { grid-template-columns: repeat(3, 1fr); gap: 14px; }

  /* «Что будет в конце» — горизонтальная последовательность 01/02/03. */
  .qz-steps { grid-template-columns: repeat(3, 1fr); gap: 20px; }

  .qz-cta.qz-cta--big { width: auto; min-width: 300px; }

  .qz-next-list { grid-template-columns: repeat(3, 1fr); gap: 16px; }
  .qz-next-item { flex-direction: column; gap: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  #quiz-app *, #quiz-app *::before, #quiz-app *::after,
  .qz-assistant, .qz-assistant * {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
}
