/* Публичный квиз «Сколько выплат вам положено» на лендинге детских пособий.
   Пространство имён vq-. Структура — как у виджета анализов: карточка в герое, шаги внутри. */

.vq { container-type: inline-size; position: relative; color: #071537; font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif; text-align: left; }
.vq * { box-sizing: border-box; }
.vq button { font-family: inherit; }

/* ---------- Шапка: заголовок и живая сумма ---------- */
/* Сумма не переносится на вторую строку: заголовок сжимается и переносится сам, сумма держит свою колонку. */
.vq-top { display: flex; align-items: center; justify-content: space-between; gap: 16px 24px; margin: 0 0 16px; }
.vq-top__text { flex: 1 1 auto; min-width: 0; }
.vq-eyebrow { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 8px; color: #0874f9; font: 600 13px/1.2 Inter, sans-serif; letter-spacing: -.01em; }
.vq-eyebrow i { width: 7px; height: 7px; border-radius: 50%; background: #0874f9; box-shadow: 0 0 0 4px rgba(8, 116, 249, .15); }
.vq-title { margin: 0; color: #071537; font: 800 clamp(21px, 2.2vw, 26px)/1.1 Inter, sans-serif; letter-spacing: -.045em; text-wrap: balance; }

.vq-sum { flex: 0 0 auto; padding: 11px 18px 12px; border: 1px solid #dbe8fd; border-radius: 18px; background: linear-gradient(160deg, #f1f7ff, #fff); text-align: right; box-shadow: 0 12px 26px -20px rgba(8, 116, 249, .55); }
.vq-sum__label { display: block; color: #7583b2; font: 500 12.5px/1.2 Inter, sans-serif; white-space: nowrap; }
.vq-sum__value { display: block; margin: 4px 0 0; color: #0874f9; font: 800 clamp(24px, 2.6vw, 30px)/1 Inter, sans-serif; letter-spacing: -.045em; font-variant-numeric: tabular-nums; white-space: nowrap; }
/* пояснение «что изменилось» — отдельной строкой под прогрессом, место зарезервировано: ничего не прыгает */
.vq-sum__delta { display: block; min-height: 18px; margin: -6px 0 14px; color: #b45309; font: 600 12.5px/1.35 Inter, sans-serif; opacity: 0; transform: translateY(-4px); transition: opacity .3s ease, transform .3s ease; }
.vq-sum__delta.is-shown { opacity: 1; transform: none; }
.vq-sum__delta.is-same { color: #0f7a40; }

/* ---------- Прогресс: сегменты по числу вопросов ---------- */
.vq-progress { display: flex; align-items: center; gap: 14px; margin: 0 0 16px; }
.vq-progress__bar { --n: 5; flex: 1; height: 6px; overflow: hidden; border-radius: 999px; background: #e8eefb; -webkit-mask-image: repeating-linear-gradient(90deg, #000 0, #000 calc(100% / var(--n) - 5px), transparent calc(100% / var(--n) - 5px), transparent calc(100% / var(--n))); mask-image: repeating-linear-gradient(90deg, #000 0, #000 calc(100% / var(--n) - 5px), transparent calc(100% / var(--n) - 5px), transparent calc(100% / var(--n))); }
.vq-progress__bar i { display: block; height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, #0874f9, #7c5cff); transition: width .45s cubic-bezier(.22, 1, .36, 1); }
.vq-progress__label { flex: 0 0 auto; color: #7583b2; font: 600 12.5px/1 Inter, sans-serif; white-space: nowrap; }

/* ---------- Сцена: вопрос / результат / вход ---------- */
.vq-stage { position: relative; min-height: 250px; }
.vq-pane { animation: vq-in .4s cubic-bezier(.22, 1, .36, 1) both; }
.vq-pane.is-back { animation-name: vq-in-back; }
@keyframes vq-in { from { opacity: 0; transform: translateX(26px); } to { opacity: 1; transform: none; } }
@keyframes vq-in-back { from { opacity: 0; transform: translateX(-26px); } to { opacity: 1; transform: none; } }

.vq-q { margin: 0 0 4px; color: #071537; font: 700 21px/1.2 Inter, sans-serif; letter-spacing: -.04em; }
.vq-hint { margin: 0 0 16px; color: #7583b2; font: 400 14px/1.4 Inter, sans-serif; letter-spacing: -.01em; }

.vq-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.vq-opt { position: relative; display: flex; align-items: center; gap: 12px; width: 100%; min-height: 56px; padding: 12px 16px; border: 1px solid #dfe7f6; border-radius: 14px; background: #fff; color: #0b193d; font: 600 15px/1.25 Inter, sans-serif; letter-spacing: -.02em; text-align: left; cursor: pointer; transition: border-color .15s ease, background-color .15s ease, transform .15s ease, box-shadow .15s ease; }
.vq-opt::before { content: ''; flex: 0 0 20px; width: 20px; height: 20px; border: 2px solid #c6d3ee; border-radius: 50%; background: #fff; transition: border-color .15s ease, background .15s ease, box-shadow .15s ease; }
/* цвета заданы явно для всех состояний: у темы есть глобальные button:hover / :focus / :active с синим фоном */
.vq-opt:hover, .vq-opt:focus, .vq-opt:active { border-color: #0874f9; background: #f4f8ff; color: #0b193d; transform: translateY(-1px); box-shadow: 0 8px 20px -10px rgba(8, 116, 249, .5); }
.vq-opt:focus-visible { outline: 3px solid rgba(8, 116, 249, .3); outline-offset: 2px; }
.vq-opt.is-picked, .vq-opt.is-picked:hover, .vq-opt.is-picked:focus, .vq-opt.is-picked:disabled { border-color: #0874f9; background: #eef5ff; color: #0b193d; }
.vq-opt.is-picked::before { border-color: #0874f9; background: #0874f9; box-shadow: inset 0 0 0 4px #fff; }
.vq-opt:disabled { cursor: default; color: #0b193d; }
.vq-options--wide { grid-template-columns: minmax(0, 1fr); }
.vq-options > .vq-opt:last-child:nth-child(odd) { grid-column: 1 / -1; }
.vq-opt__key { margin-left: auto; display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px; border: 1px solid #dfe7f6; border-radius: 7px; color: #98a4c4; font: 600 11.5px/1 Inter, sans-serif; background: #f8fbff; }
.vq-opt.is-picked .vq-opt__key { border-color: #b9d6ff; color: #0874f9; background: #fff; }
@media (hover: none) { .vq-opt__key { display: none; } }
@container (max-width: 640px) { .vq-opt__key { display: none; } }

.vq-nav { display: flex; align-items: center; justify-content: space-between; margin: 14px 0 0; }
.vq-back { display: inline-flex; align-items: center; gap: 6px; padding: 6px 0; border: 0; background: none; color: #7583b2; font: 600 13.5px/1 Inter, sans-serif; cursor: pointer; }
.vq-back:hover { color: #0874f9; }
.vq-back[hidden] { display: none; }

/* ---------- Результат ---------- */
.vq-res-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 0 0 10px; }
.vq-res-title { margin: 0; color: #071537; font: 800 20px/1.15 Inter, sans-serif; letter-spacing: -.04em; }
.vq-res-count { color: #7583b2; font: 600 13px/1 Inter, sans-serif; white-space: nowrap; }
.vq-list { margin: 0 0 14px; padding: 0; list-style: none; display: grid; gap: 8px; max-height: 270px; overflow: auto; }
.vq-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 14px; align-items: start; padding: 12px 14px; border: 1px solid #e3ecfb; border-radius: 14px; background: #fff; }
.vq-item__name { margin: 0; color: #071537; font: 700 15px/1.25 Inter, sans-serif; letter-spacing: -.025em; }
.vq-item__short { grid-column: 1; margin: 0; color: #7583b2; font: 400 13px/1.35 Inter, sans-serif; }
.vq-item__sum { grid-column: 2; grid-row: 1 / span 2; align-self: center; padding: 5px 10px; border-radius: 999px; background: #e3f7ea; color: #0f7a40; font: 800 14px/1 Inter, sans-serif; white-space: nowrap; font-variant-numeric: tabular-nums; }
.vq-item__sum--region { background: #eef2fb; color: #5b6b99; font-weight: 700; font-size: 12.5px; }
.vq-item__deadline { grid-column: 1 / -1; display: flex; align-items: center; gap: 6px; margin: 2px 0 0; color: #b45309; font: 600 12px/1.3 Inter, sans-serif; }
.vq-item__deadline svg { flex: 0 0 auto; }

.vq-cta { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; min-height: 56px; padding: 14px 20px; border: 0; border-radius: 14px; background: linear-gradient(135deg, #0d7bff, #0768e9); color: #fff; font: 700 17px/1.2 Inter, sans-serif; letter-spacing: -.02em; cursor: pointer; box-shadow: 0 14px 28px -10px rgba(8, 116, 249, .6); transition: transform .2s ease, box-shadow .2s ease; }
.vq-cta:hover { transform: translateY(-2px); box-shadow: 0 18px 34px -10px rgba(8, 116, 249, .7); }
.vq-cta:disabled { opacity: .7; cursor: default; transform: none; }
.vq-cta svg { transition: transform .25s ease; }
.vq-cta:hover svg { transform: translateX(3px); }
.vq-sub { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 14px; margin: 10px 0 0; color: #7583b2; font: 500 12.5px/1.3 Inter, sans-serif; }
.vq-restart { padding: 0; border: 0; background: none; color: #7583b2; font: 600 12.5px/1.3 Inter, sans-serif; text-decoration: underline; cursor: pointer; }
.vq-restart:hover { color: #0874f9; }

/* ---------- Вход: почта и код ---------- */
.vq-auth-title { margin: 0 0 4px; color: #071537; font: 800 20px/1.15 Inter, sans-serif; letter-spacing: -.04em; }
.vq-auth-text { margin: 0 0 14px; color: #7583b2; font: 400 14px/1.4 Inter, sans-serif; }
.vq-auth-text b { color: #0b193d; font-weight: 600; }
.vq-total { display: inline-block; margin: 0 0 12px; padding: 6px 12px; border-radius: 999px; background: #e3f7ea; color: #0f7a40; font: 800 14px/1 Inter, sans-serif; }
.vq-field { display: block; margin: 0 0 12px; }
.vq-field input[type="email"] { display: block; width: 100%; height: 54px; padding: 0 16px; border: 1px solid #d3deef; border-radius: 14px; background: #fff; color: #071537; font: 500 16px/1 Inter, sans-serif; outline: 0; box-shadow: none; transition: border-color .15s ease, box-shadow .15s ease; }
.vq-field input[type="email"]:focus { border-color: #0874f9; box-shadow: 0 0 0 4px rgba(8, 116, 249, .14); }
.vq-consent { display: flex; align-items: flex-start; gap: 10px; margin: 0 0 12px; color: #7583b2; font: 400 12.5px/1.4 Inter, sans-serif; cursor: pointer; }
.vq-consent input { flex: 0 0 auto; width: 17px; height: 17px; margin: 1px 0 0; accent-color: #0874f9; }
.vq-consent a { color: #0874f9; }
.vq-otp { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; margin: 0 0 14px; }
.vq-otp input { width: 100%; height: 56px; padding: 0; border: 1px solid #d3deef; border-radius: 12px; background: #fff; color: #071537; font: 800 24px/1 Inter, sans-serif; text-align: center; outline: 0; box-shadow: none; transition: border-color .15s ease, box-shadow .15s ease; }
.vq-otp input:focus { border-color: #0874f9; box-shadow: 0 0 0 4px rgba(8, 116, 249, .14); }
.vq-otp.is-error input { border-color: #ef4444; animation: vq-shake .35s ease; }
@keyframes vq-shake { 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }
.vq-msg { min-height: 18px; margin: 8px 0 0; color: #dc2626; font: 500 13px/1.3 Inter, sans-serif; }
.vq-msg.is-ok { color: #0f7a40; }
.vq-link { padding: 0; border: 0; background: none; color: #0874f9; font: 600 13px/1.3 Inter, sans-serif; cursor: pointer; }
.vq-link:disabled { color: #98a4c4; cursor: default; }
.vq-done { display: grid; place-items: center; gap: 10px; min-height: 220px; text-align: center; }
.vq-done__ico { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; background: #e3f7ea; color: #16a34a; }
.vq-done__ico svg { width: 32px; height: 32px; }
.vq-done p { margin: 0; color: #0b193d; font: 700 17px/1.3 Inter, sans-serif; letter-spacing: -.025em; }

.vq-note { margin: 16px 0 0; color: #98a4c4; font: 400 12px/1.45 Inter, sans-serif; }

/* ---------- Мобильные ---------- */
@media (max-width: 767px) {
	.vq-top { flex-direction: column; align-items: stretch; gap: 12px; }
	.vq-title { font-size: 21px; }
	.vq-sum { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; padding: 11px 16px; text-align: left; }
	.vq-sum__value { margin: 0; font-size: 26px; }
	.vq-options { grid-template-columns: minmax(0, 1fr); }
	.vq-opt { min-height: 58px; }
	.vq-q { font-size: 19px; }
	.vq-otp { gap: 6px; }
	.vq-otp input { height: 50px; font-size: 21px; }
	.vq-list { max-height: none; }
	.vq-stage { min-height: 0; }
}

@media (prefers-reduced-motion: reduce) {
	.vq-pane, .vq-pane.is-back { animation: none; }
	.vq-progress__bar i, .vq-opt, .vq-cta, .vq-cta svg, .vq-sum__delta { transition: none; }
}
