/* 6 · «Тест на акне» (/variant-2/, 06.11) — разметка: delo-src/partials/v2-test.html, логика: assets/js/b6.js
   Вид — синяя карточка приглашения к тесту с главной 9300 (home.css, .qt): правила перенесены сюда под своими именами
   (q6-…), чтобы правка главной не задела блок. Тест проходится целиком в белой карточке: вопрос сменяется наплывом,
   высоту карточки ведёт b6.js (белая карточка — явная высота по содержимому, переход height). Анимации — только opacity
   и transform; на телефоне без размытий и backdrop-filter. Фон раздела прозрачный — за ним размытая девушка */

.v2-quiz { position: relative; z-index: 3; padding: clamp(96px, 14vh, 170px) var(--pad) 0; color: var(--ink); }
.q6 { position: relative; max-width: 1180px; margin: 0 auto; padding: clamp(34px, 3.8vw, 58px); color: #fff;
  display: grid; grid-template-columns: minmax(0, 0.86fr) minmax(0, 1.14fr); grid-template-rows: auto 1fr;
  grid-template-areas: "copy card" "book card"; column-gap: clamp(36px, 4.4vw, 76px); row-gap: 30px; }
.q6 > * { position: relative; }
/* синяя подложка — отдельным слоем (появление: поднимается и раскрывается, b6.js); знак клиники в ней крупно и бледно */
/* overflow-anchor: none — подложка и знак не годятся в «якорь» прокрутки Chrome: знак стоит от высоты карточки, и при
   смене вопроса браузер сдвигал бы страницу вслед за ним (замер 06.11: +38 px) */
.q6-bg { position: absolute !important; inset: 0; border-radius: 32px; overflow: hidden; background: var(--blue); overflow-anchor: none;
  box-shadow: 0 40px 90px -40px rgba(39, 93, 167, 0.7); }
.q6-mark { position: absolute; left: -8%; bottom: -40%; width: 46%; aspect-ratio: 1; opacity: 0.09; background: #fff; pointer-events: none; overflow-anchor: none;
  -webkit-mask: url(../brand/mark.svg) center / contain no-repeat; mask: url(../brand/mark.svg) center / contain no-repeat; }

/* ── слева: подпись, заголовок, лид; под ними — запись ── */
.q6-copy { grid-area: copy; align-self: start; padding-top: 8px; }
.q6-label { color: rgba(255, 255, 255, 0.86); font-size: 12.5px; margin-bottom: 20px; }
.q6-t { margin: 0; font-family: var(--head), var(--font); font-weight: 600; font-size: clamp(34px, 3vw, 50px); line-height: 1.04; letter-spacing: -0.015em;
  color: #fff; text-wrap: balance; }
.q6-t .q6-w { display: inline-block; white-space: nowrap; }
.q6-t .q6-c { display: inline-block; }
.q6-lead { margin-top: 16px; max-width: 25em; font-size: clamp(16px, 1.2vw, 19px); line-height: 1.5; color: rgba(255, 255, 255, 0.86); text-wrap: pretty; }
.q6-book { grid-area: book; align-self: end; display: flex; flex-direction: column; align-items: flex-start; gap: 14px; }
.q6-book .cta { box-shadow: 0 18px 38px -20px rgba(10, 30, 70, 0.7); }
.q6-fine { max-width: 27em; font-size: 13px; line-height: 1.45; color: rgba(255, 255, 255, 0.72); }

/* ── справа: белая карточка вопроса. Внешняя — высота (b6.js, по .q6-in), внутренняя — содержимое ── */
.q6-card { --cp: 28px; --bz: 28px; grid-area: card; align-self: center; border-radius: 24px; overflow: hidden; color: var(--ink); background: #fff;
  box-shadow: 0 30px 60px -30px rgba(10, 30, 70, 0.6); transition: height 0.55s var(--ease); }
.q6-card.q6-hfix { transition: none; }
.q6-in { position: relative; padding: var(--cp) var(--cp) calc(var(--cp) + var(--bz)); }
.q6-steps { position: relative; }
.q6-step[hidden], .q6-nav[hidden], .q6 .form-done[hidden], .q6-form[hidden] { display: none !important; }
/* уходящий вопрос — поверх нового, без места в потоке, пока гаснет */
.q6-step.q6-leaving { position: absolute; left: 0; right: 0; top: 0; pointer-events: none; }
.q6-l { display: block; margin: 0; }
.q6-l:focus { outline: none; }
.q6-n { display: flex; align-items: center; min-height: 40px; margin-top: -6px; font: 600 12.5px/1.2 var(--font); letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--terra); }
.q6-qt { display: block; margin: 6px 0 20px; font-family: var(--font); font-weight: 400; font-size: clamp(23px, 1.9vw, 30px); line-height: 1.16; letter-spacing: -0.02em;
  color: var(--ink); text-wrap: balance; }
.q6-hint { margin: -10px 0 16px; font-size: 15px; line-height: 1.4; color: var(--ink2); }

/* «Назад» — стрелка в круге, как у кнопок-переходов страницы (.more), только влево */
.q6-back { position: absolute; z-index: 2; top: 20px; right: 22px; display: inline-flex; align-items: center; gap: 10px; height: 44px; padding: 0 16px 0 5px;
  border-radius: 999px; font-size: 15.5px; font-weight: 500; color: var(--blue); background: #fff; box-shadow: inset 0 0 0 1.5px rgba(39, 93, 167, 0.2);
  opacity: 0; visibility: hidden; transform: translateX(8px);
  transition: opacity .35s ease, transform .5s var(--ease), visibility 0s .35s, box-shadow .3s, background-color .3s; }
.q6-back::before { content: ''; flex: none; width: 34px; height: 34px; border-radius: 50%; transition: transform .5s var(--ease);
  background: var(--blue) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='12' fill='none' stroke='%23fff' stroke-width='1.8'%3E%3Cpath d='M16 6H2M7 1L2 6l5 5'/%3E%3C/svg%3E") center / 15px 11px no-repeat; }
.q6-back.on { opacity: 1; visibility: visible; transform: none; transition: opacity .35s ease, transform .5s var(--ease), visibility 0s, box-shadow .3s, background-color .3s; }
@media (hover: hover) {
  .q6-back:hover { box-shadow: inset 0 0 0 1.5px rgba(39, 93, 167, 0.5); }
  .q6-back:hover::before { transform: translateX(-3px); }
}

/* варианты ответа: крупные, текст 16+ px; одиночный выбор — по центру (как на главной), отмеченный — синий */
.q6-opts { display: grid; gap: 10px; }
.q6-c3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.q6-c3 .q6-o > span { padding-left: 8px; padding-right: 8px; }
.q6-c2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.q6-wide { grid-column: 1 / -1; }
.q6-o { position: relative; display: flex; min-width: 0; -webkit-tap-highlight-color: transparent; }
.q6-o input { position: absolute; left: 0; top: 0; width: 1px; height: 1px; opacity: 0; margin: 0; }
.q6-o > span { flex: 1; min-width: 0; display: flex; align-items: center; justify-content: center; gap: 12px; min-height: 58px; padding: 10px 14px; border-radius: 16px; text-align: center;
  font-size: 16.5px; line-height: 1.25; color: var(--ink); background: #fff; border: 1.5px solid rgba(22, 41, 74, 0.12); cursor: pointer;
  transition: border-color .3s, color .3s, background-color .3s, transform .3s var(--ease); }
.q6-o:active > span { transform: scale(0.98); }
.q6-o input:checked + span { color: #fff; background: var(--blue); border-color: var(--blue); }
.q6-o input:focus-visible + span { outline: 2px solid var(--blue); outline-offset: 3px; }
@media (hover: hover) {
  .q6-o:hover > span { border-color: var(--blue); color: var(--blue); background: rgba(39, 93, 167, 0.05); transform: translateY(-2px); }
  .q6-o:hover input:checked + span { color: #fff; background: var(--blue); }
}
/* несколько вариантов: слева квадрат-галочка, отмеченный — синяя рамка и лёгкая заливка (не сплошной, как одиночный) */
.q6-m > span { justify-content: flex-start; text-align: left; padding-left: 16px; }
.q6-m > span::before { content: ''; flex: none; width: 22px; height: 22px; border-radius: 7px; box-shadow: inset 0 0 0 1.5px rgba(22, 41, 74, 0.28);
  transition: background-color .25s, box-shadow .25s; }
.q6-m input:checked + span, .q6-m:hover input:checked + span { color: var(--blue); background: rgba(39, 93, 167, 0.07); border-color: var(--blue); }
.q6-m input:checked + span::before { box-shadow: none;
  background: var(--blue) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='10' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M1 5.2 4.4 8.5 11 1.5'/%3E%3C/svg%3E") center / 12px 10px no-repeat; }
/* шкала 1–10: на компьютере — в ряд, на телефоне — две строки по пять */
.q6-scale { grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 7px; }
.q6-scale .q6-o > span { min-height: 54px; padding: 0; font: 600 18px/1 var(--font); }
.q6-scale-l { display: flex; justify-content: space-between; margin-top: 10px; font-size: 14px; color: var(--ink2); }
.q6-hm { display: none; }
.q6-err { min-height: 0; margin: 0; font-size: 14.5px; line-height: 1.35; color: var(--terra-d); }
.q6-err:not(:empty) { margin-top: 12px; }
.q6-nav { display: flex; justify-content: flex-end; margin-top: 18px; }
.q6-nav .cta { height: 50px; padding: 0 24px; font-size: 16px; }

/* контакты: поля из общих стилей формы (base.css), здесь — крупнее подписи и галочка согласия */
.q6 .form-row { gap: 12px; }
.q6 .fld > span { font-size: 12.5px; letter-spacing: 0.12em; }
.q6 .fld input { height: 54px; font-size: 16.5px; background: #fff; border-color: rgba(22, 41, 74, 0.16); }
.q6 .fld.bad input { border-color: var(--terra); }
.q6 .agree { margin: 16px 0 0; font-size: 14px; line-height: 1.45; cursor: pointer; }
.q6 .agree input { width: 22px; height: 22px; margin: 0; }
.q6 .form-err { min-height: 0; margin: 0; font-size: 14.5px; line-height: 1.35; }
.q6 .form-err:not(:empty) { margin-top: 12px; }
.q6-send { margin-top: 20px; }

/* спасибо */
.q6-done { padding: 4px 0 2px; }
.q6-ok { display: block; width: 52px; height: 52px; margin-bottom: 18px; border-radius: 50%; background: var(--blue) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='18' fill='none' stroke='%23fff' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 9.5 8.5 16 22 2'/%3E%3C/svg%3E") center / 22px 17px no-repeat;
  box-shadow: 0 14px 28px -14px rgba(39, 93, 167, 0.9); }
.q6-done .q6-n { min-height: 0; margin: 0 0 10px; }
.q6-done-t { font-family: var(--head), var(--font); font-weight: 600; font-size: clamp(32px, 2.6vw, 42px); line-height: 1.04; color: var(--ink); margin-bottom: 14px; }
.q6-done-t:focus { outline: none; }
.q6-done-p { max-width: 30em; font-size: 16.5px; line-height: 1.5; color: var(--ink2); }
.q6-done-p + .q6-done-p { margin-top: 10px; }

/* полоска прогресса (scaleX ставит b6.js) — у нижнего края карточки; место под неё — нижнее поле .q6-in (--bz) */
.q6-bar { position: absolute !important; left: var(--cp); right: var(--cp); bottom: var(--cp); height: 4px; border-radius: 4px; background: rgba(22, 41, 74, 0.08); overflow: hidden; }
.q6-bar i { display: block; height: 100%; background: var(--blue); transform-origin: 0 50%; transform: scaleX(0.17); transition: transform .8s var(--ease); }

/* появление (b6.js снимает класс, когда блок въехал на экран, и ведёт проявление сам) */
.q6-pre .q6-bg, .q6-pre .q6-copy > *, .q6-pre .q6-card, .q6-pre .q6-book { opacity: 0; }

/* ── компьютер ── */
@media (min-width: 761px) {
  .q6-step[data-step="contact"] .q6-send { min-width: 260px; }
}
/* невысокий экран ноутбука: вопрос и варианты плотнее */
@media (min-width: 761px) and (max-height: 760px) {
  .q6-card { --cp: 24px; --bz: 22px; }
  .q6-back { top: 16px; right: 18px; }
  .q6-o > span { min-height: 52px; }
  .q6-qt { margin-bottom: 16px; }
}
@media (min-width: 761px) and (max-width: 1060px) {
  .q6 { grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); }
  .q6-c3 { grid-template-columns: minmax(0, 1fr); }
}

/* ── телефон: одна колонка — подпись, заголовок, лид → белая карточка → запись ── */
@media (max-width: 760px) {
  .v2-quiz { padding: 64px 14px 0; }
  .q6 { display: block; padding: 26px 20px 22px; }
  .q6-bg { border-radius: 26px; }
  .q6-mark { left: auto; right: -22%; top: -100px; bottom: auto; width: 82%; opacity: 0.08; }
  .q6-copy { padding-top: 0; }
  .q6-label { margin-bottom: 14px; font-size: clamp(12.5px, 3.5vw, 14px); letter-spacing: 0.11em; gap: 10px; }
  .q6-label::before { width: 20px; height: 20px; }
  .q6-t { font-size: clamp(29px, 8.2vw, 34px); line-height: 1.05; }
  .q6-lead { margin-top: 12px; font-size: 16px; line-height: 1.45; }
  /* тень короче: высота карточки меняется плавно, и тень перерисовывается — на телефоне ей лучше быть лёгкой */
  .q6-card { --cp: 18px; --bz: 22px; margin-top: 22px; border-radius: 22px; box-shadow: 0 18px 34px -22px rgba(10, 30, 70, 0.6); }
  .q6-back { top: 15px; right: 12px; height: 44px; padding-right: 14px; font-size: 15px; gap: 8px; }
  .q6-back::before { width: 32px; height: 32px; }
  /* палец: кнопке «Назад» — запас вокруг (касание 52 px) */
  .q6-back::after { content: ''; position: absolute; inset: -4px -6px; }
  .q6-n { min-height: 40px; margin-top: -2px; }
  .q6-qt { margin: 4px 0 16px; font-size: clamp(22px, 6.1vw, 24px); line-height: 1.18; }
  .q6-hint { margin: -8px 0 14px; }
  .q6-opts { gap: 8px; }
  .q6-c3, .q6-c2 { grid-template-columns: minmax(0, 1fr); }
  .q6-o > span { min-height: 54px; font-size: 16.5px; padding: 10px 16px; border-radius: 15px; }
  .q6-scale { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
  .q6-scale .q6-o > span { min-height: 54px; font-size: 19px; }
  .q6-scale-l, .q6-hd { display: none; }
  .q6-hm { display: inline; }
  .q6-nav .cta { width: 100%; height: 54px; }
  .q6 .fld input { height: 54px; }
  .q6-send { width: 100%; height: 56px; font-size: 16.5px; }
  .q6-ok { width: 48px; height: 48px; margin-bottom: 14px; }
  .q6-done-t { font-size: 32px; }
  .q6-done-p { font-size: 16px; }
  .q6-book { margin-top: 18px; align-items: stretch; gap: 12px; }
  .q6-book .cta { width: 100%; height: 56px; padding: 0 16px; font-size: 16.5px; }
  .q6-fine { font-size: 13px; text-align: center; margin: 0 auto; max-width: 24em; }
}
@media (max-width: 380px) {
  .q6 { padding: 22px 16px 18px; }
  .q6-card { --cp: 16px; }
  .q6-back { top: 13px; right: 10px; }
  .q6-scale { gap: 6px; }
}
