.quiz {
  --page-gutter: var(--compact-page-gutter);
  --quiz-ink: var(--intro-title-color);
  --quiz-accent: #7d69d9;
  --quiz-active-text: #6f5f98;
  --quiz-option-text: #f2edfc;
  --quiz-option-border: #c9b4f0;
  --quiz-option-surface: #f9f5ff;
  --quiz-progress-ink: #b1a5d0;
  --quiz-progress-border: #b6aad3;
  --quiz-caption-ink: rgb(255 255 255 / 60%);
  /* Figma's gradientTransform places the first stop at a NEGATIVE offset.
     get_design_context loses that sign; see design/quiz/style-audit.json. */
  --quiz-surface: linear-gradient(rgb(172 152 230 / 64%), rgb(172 152 230 / 64%)), linear-gradient(101.9566110313deg, #6652e9 -58.065%, #f6cafc 131.01%);
  --quiz-marker-surface: linear-gradient(rgb(172 152 230 / 64%), rgb(172 152 230 / 64%)), linear-gradient(97.8548742037deg, #6652e9 -58.065%, #f6cafc 131.01%);
  --quiz-radius: 1.875rem;
  --quiz-underlay: #d5bbff;
  --quiz-underlay-depth: .5625rem;
  --quiz-underlay-inset: .625rem;
  --quiz-underlay-top: 1.375rem;
  --quiz-nav-width: 13.75rem;
  --quiz-nav-height: 3.6875rem;
  --quiz-nav-font-size: .8020625rem;
  --quiz-nav-font-weight: 500;
  --quiz-nav-tracking: -.03em;
  position: relative;
  isolation: isolate;
  background: var(--color-page);
  padding-block: 2.75rem 3rem;
  overflow-wrap: anywhere;
}
/* Steps are excluded so the tablet layout can keep inactive ones in place. */
.quiz [hidden]:not([data-quiz-step]) { display: none !important; }
.quiz__step[hidden] { display: none; }
/* Step change after kvestkids.ru (client 27.10.2026, all widths); quiz.js
   times the swap to these durations. */
.quiz__form { --quiz-step-offset: 14px; }
.quiz__form.is-reversing { --quiz-step-offset: -14px; }
.quiz__form[aria-busy="true"] .quiz__step { pointer-events: none; }
@media (prefers-reduced-motion: no-preference) {
  .quiz__step.is-leaving { animation: quiz-step-out .16s ease-in both; }
  .quiz__step.is-entering { animation: quiz-step-in .24s ease-out both; }
}
@keyframes quiz-step-out {
  to { opacity: 0; transform: translateX(calc(var(--quiz-step-offset) * -1)); }
}
@keyframes quiz-step-in {
  from { opacity: 0; transform: translateX(var(--quiz-step-offset)); }
}
.quiz__container { max-width: var(--container-width); container: quiz / inline-size; }
.quiz__layout { position: relative; display: grid; min-width: 0; }
.quiz__body, .quiz__body-surface { display: contents; }
.quiz__gift, .quiz__status, .quiz__summary { display: none; }
.quiz__intro { min-width: 0; }
.quiz__eyebrow { display: inline-flex; padding: .4375rem 1rem; border-radius: var(--radius-pill); background: var(--intro-label-surface); color: var(--intro-label-color); font-size: .875rem; font-weight: 500; line-height: 1.11; }
.quiz h2 { max-width: 28rem; margin-top: 1.375rem; color: var(--quiz-ink); opacity: var(--intro-title-opacity); font-size: var(--intro-title-size); font-weight: 600; line-height: 1.11; }
.quiz h2 > .quiz__title-accent { color: var(--quiz-accent); }
.quiz__description { max-width: 24.375rem; margin-top: 1.5rem; font-size: .875rem; font-weight: 500; line-height: 1.25; color: var(--intro-description-color); }
.quiz__art { position: relative; width: min(100%, 28rem); aspect-ratio: 448 / 250; justify-self: center; pointer-events: none; }
.quiz__art img { position: absolute; max-width: none; object-fit: contain; }
.quiz__scene { width: 77.6786%; height: auto; left: 0; top: 0; mix-blend-mode: darken; }
.quiz__decoration-small { width: 2.625rem; height: auto; left: 72%; top: 12%; mix-blend-mode: darken; }
.quiz__decoration-left { width: 6.25rem; height: auto; left: -3.3125rem; bottom: -1.75rem; mix-blend-mode: darken; }
.quiz__foreground { width: 56.75rem; height: auto; left: 10.25rem; top: -3.3125rem; mix-blend-mode: darken; }
.quiz__art { overflow: clip; }
.quiz__progress { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .25rem; width: min(100%, 23.25rem); padding: 0; list-style: none; margin: .25rem auto 2.75rem; }
.quiz__progress-step { position: relative; display: grid; justify-items: center; gap: .9375rem; color: var(--quiz-progress-ink); font-size: .6875rem; font-weight: 600; line-height: 1.25; text-align: center; }
.quiz__progress-step + li::before { content: ""; position: absolute; height: .1875rem; top: 1rem; right: calc(50% + 1.625rem); width: calc(100% - 3rem); background: radial-gradient(circle, #ac87e8 1.5px, transparent 1.5px) left center / .5625rem .1875rem repeat-x; }
.quiz__progress-number { display: grid; place-items: center; width: 2.0625rem; height: 2.0625rem; border: .09375rem solid var(--quiz-progress-border); border-radius: 50%; color: var(--quiz-progress-border); font-size: .8348125rem; }
.quiz__progress-number img { width: .8125rem; height: .8125rem; }
.quiz__progress-step[data-state="current"], .quiz__progress-step[data-state="complete"] { color: #a77fe6; }
.quiz__progress-step[data-state="current"] .quiz__progress-number, .quiz__progress-step[data-state="complete"] .quiz__progress-number { border-color: transparent; background: var(--quiz-marker-surface); color: var(--color-white); }
.quiz__progress-step[data-state="current"] .quiz__progress-number img { filter: brightness(0) invert(1); }
.quiz__panel { position: relative; isolation: isolate; min-width: 0; padding: 1.875rem 1rem 1.25rem; border: 1px solid rgb(178 152 251 / 37%); border-radius: var(--quiz-radius); background: var(--quiz-surface); color: var(--color-white); }
.quiz__panel::before { content: ""; position: absolute; z-index: -2; inset: var(--quiz-underlay-top) var(--quiz-underlay-inset) calc(-1 * var(--quiz-underlay-depth)); border-radius: inherit; background: var(--quiz-underlay); }
.quiz__panel::after { content: ""; position: absolute; z-index: -1; inset: 0; border-radius: inherit; background: var(--quiz-surface); }
.quiz__glows { position: absolute; inset: 0; pointer-events: none; }
.quiz__glows img { position: absolute; width: 38.625rem; height: 38.625rem; max-width: none; bottom: 0; }
.quiz__glow-left { left: calc(50% - 17.5rem); }
.quiz__glow-right { left: calc(50% + 9.625rem); }
.quiz__badge { position: absolute; z-index: 1; width: min(7rem, 30cqw); height: auto; top: -3rem; right: .25rem; pointer-events: none; }
.quiz__form { min-width: 0; }
.quiz__step { min-width: 0; margin: 0; padding: 0; border: 0; }
.quiz__step + .quiz__step { margin-top: 2rem; }
.quiz.is-enhanced .quiz__step { margin-top: 0; }
.quiz__question { display: block; width: 100%; padding: 0 0 1.5rem; }
.quiz__question:focus { outline: none; }
.quiz__counter { display: table; width: fit-content; max-width: calc(100% - min(5.5rem, 22cqw)); min-height: 1.4375rem; padding: .1875rem .8125rem; border-radius: var(--radius-pill); background: rgb(178 152 251 / 77%); color: var(--quiz-caption-ink); font-size: .8671875rem; font-weight: 500; line-height: 1.2; }
.quiz__status-labels { color: var(--quiz-caption-ink); }
.quiz__answer { color: var(--color-white); }
.quiz__question-text { display: block; max-width: 24.5625rem; margin-top: .6875rem; font-size: clamp(1.25rem, 4cqw, 1.5625rem); font-weight: 600; line-height: 1.11; }
.quiz__hint { display: block; margin-top: .5625rem; color: rgb(255 255 255 / 51%); font-size: .875rem; font-weight: 500; line-height: 1.25; }
.quiz__options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .625rem; }
.quiz__option { position: relative; display: flex; min-width: 0; cursor: pointer; }
.quiz__option-surface { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .75rem; width: 100%; min-height: 11.875rem; padding: 1.25rem .375rem .9375rem; border: 2px solid var(--quiz-option-border); border-radius: var(--quiz-radius); color: var(--quiz-option-text); transition: background-color var(--motion-fast), border-color var(--motion-fast), color var(--motion-fast); }
.quiz__option-image { width: 4.375rem; height: 4.375rem; object-fit: contain; flex: none; }
.quiz__option-label { font-size: .8125rem; line-height: 1.25; font-weight: 600; text-align: center; }
.quiz__option-check { display: grid; place-items: center; width: 1.6875rem; height: 1.6875rem; flex: none; margin-top: -.375rem; border-radius: 50%; background: var(--quiz-marker-surface); visibility: hidden; }
.quiz__option-check img { width: .625rem; height: .5rem; object-fit: contain; }
.quiz__option input:checked + .quiz__option-surface { background: var(--quiz-option-surface); border-color: var(--quiz-option-surface); color: var(--quiz-active-text); }
.quiz__option input:checked + .quiz__option-surface .quiz__option-check { visibility: visible; }
.quiz__options--pair .quiz__option input:not(:checked) + .quiz__option-surface { border-color: rgb(255 255 255 / 23%); }
.quiz__options--pair .quiz__option input:not(:checked) + .quiz__option-surface .quiz__option-label { color: rgb(255 255 255 / 82%); font-weight: 500; }
.quiz__option input:focus-visible + .quiz__option-surface { outline: 3px solid var(--focus-color); outline-offset: 4px; }
.quiz__actions { display: flex; align-items: center; gap: .625rem; margin-top: 1.4375rem; }
.quiz__controls { display: flex; align-items: center; justify-content: space-between; gap: .625rem; flex: 1; min-width: 0; }
.quiz__previous { display: inline-flex; align-items: center; justify-content: flex-start; gap: .875rem; min-height: 2.75rem; min-width: 2.75rem; padding: .3125rem 0; background: none; text-align: left; color: rgb(255 255 255 / 93%); font-size: .6875rem; line-height: 1.25; font-weight: 600; }
.quiz__previous img { width: 2.125rem; height: 2.125rem; flex: none; }
.quiz__previous:disabled { cursor: default; }
.quiz__next, .quiz__submit { display: inline-flex; align-items: center; justify-content: center; gap: .75rem; flex-shrink: 0; min-height: var(--quiz-nav-height); max-width: 100%; padding: .9375rem 1.25rem; border-radius: var(--radius-pill); background: var(--gradient-gold); color: #876b2b; font-size: var(--quiz-nav-font-size); font-weight: var(--quiz-nav-font-weight); line-height: 1.2; letter-spacing: var(--quiz-nav-tracking); }
.quiz__next img { width: .875rem; height: .75rem; flex: none; }
.quiz__submit { min-width: 9rem; margin-left: auto; }
.quiz__fields { display: grid; gap: .625rem; width: min(100%, 18.8125rem); }
.quiz__field { display: flex; align-items: center; min-width: 0; min-height: 3.6875rem; padding-inline: 1.25rem; border: 1px solid rgb(163 130 233 / 80%); border-radius: var(--radius-pill); background: rgb(255 255 255 / 80%); }
.quiz__field input { width: 100%; min-width: 0; padding: 1rem 0; border: 0; background: none; color: var(--quiz-active-text); font-size: .875rem; line-height: 1.3; }
.quiz__field input::placeholder { color: rgb(132 116 166 / 40%); opacity: 1; }
.quiz__phone-prefix { display: inline-flex; align-items: center; gap: .625rem; margin-right: .5rem; color: #2c2c2c; font-size: .875rem; white-space: nowrap; }
.quiz__phone-prefix img { flex: none; }
.quiz__phone-prefix [data-phone-flag] { width: 21px; height: 12px; }
.quiz__consents { display: grid; gap: .25rem; margin-top: .625rem; }
.quiz__consent { display: grid; grid-template-columns: .8125rem minmax(0, 1fr); gap: 1rem; align-items: center; min-height: 2.75rem; cursor: pointer; }
.quiz__consent > span { font-size: .6875rem; font-weight: 400; line-height: 1.19; color: rgb(255 255 255 / 32.48%); }
.quiz__consent-underlined { text-decoration: underline; text-underline-offset: .12em; }
.quiz__consent input { appearance: none; width: .8125rem; height: .8125rem; margin: 0; border: 1px solid rgb(255 255 255 / 10%); border-radius: .1875rem; background: rgb(243 243 243 / 43%); accent-color: var(--quiz-accent); }
.quiz__consent input:checked { appearance: auto; }
.quiz__feedback { margin-top: 1rem; }
/* Thanks (Figma ASUbb6hQZf8cAetY2CnRN6 6820:3118): «Готово» in place of the counter,
   the sent step stays in its cell unseen, so the card keeps its height, and
   «Предыдущий вопрос» remains below. */
.quiz__form[data-sent] { display: grid; grid-template-columns: minmax(0, 1fr); }
.quiz__form[data-sent] > * { grid-column: 1; }
.quiz__form[data-sent] > .quiz__status { grid-row: 1; }
.quiz__form[data-sent] > :is(.quiz__step, .form-success) { grid-row: 2; }
.quiz__form[data-sent] > .quiz__actions { grid-row: 3; }
.quiz__form[data-sent] > :is(.quiz__summary, .quiz__feedback) { display: none; }
.quiz__form[data-sent] > .quiz__step, .quiz__form[data-sent] > .quiz__step *, .quiz__form[data-sent] .quiz__submit { visibility: hidden; }
.quiz__form[data-sent] > .form-success { display: flex; flex-direction: column; align-items: flex-start; align-self: stretch; min-width: 0; }
.quiz .form-success__done { margin-bottom: auto; }
.quiz .form-success__icon { width: 2.5rem; height: 2.5rem; }
.quiz .form-success__title { margin-top: 1.1875rem; font-size: clamp(1.75rem, 6cqw, 2.137813rem); line-height: 1; }
.quiz .form-success__text { margin-top: .75rem; margin-bottom: auto; font-size: 1rem; }
.quiz__decoration-frame { position: absolute; z-index: -1; inset: 0; overflow: clip; background: var(--color-page); pointer-events: none; }
/* Reflow controls and choices when enlarged text leaves less usable room. */
@container quiz (width < 18em) {
  .quiz__actions, .quiz__controls { flex-direction: column; align-items: stretch; width: 100%; }
  .quiz__next, .quiz__submit { width: 100%; min-width: 0; }
  .quiz__previous > span { max-width: none; }
  .quiz__options { grid-template-columns: minmax(0, 1fr); }
  .quiz__progress-step > span { min-width: 0; max-width: 100%; }
  .quiz__progress-step + li::before { display: none; }
  .quiz__phone { flex-wrap: wrap; padding-block: .75rem; }
  .quiz__phone input { padding-block: .5rem; }
}
@container quiz (width < 23em) {
  .quiz__previous { gap: .25rem; }
  .quiz__previous > span { max-width: 4.5rem; }
  .quiz__next, .quiz__submit { padding-inline: .75rem; gap: .5rem; }
}
@container quiz (min-width: 34em) {
  .quiz__panel { padding-inline: 2rem; }
  .quiz__options { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .875rem; }
  .quiz__options--pair { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 32.1875rem; }
  .quiz__next, .quiz__submit { width: var(--quiz-nav-width); }
}
@media (width >= 48rem) and (width < 75rem) {
  .quiz__layout { grid-template-columns: minmax(0, 1fr) minmax(0, 20rem); column-gap: 1rem; }
  .quiz__intro { grid-area: 1 / 1; }
  .quiz__art { grid-area: 1 / 2; align-self: center; width: 100%; }
  .quiz__scene { top: 0; }
  .quiz__foreground { left: 8rem; }
  .quiz__progress { grid-area: 2 / 1 / 3 / -1; margin-block: 1.25rem 3.5rem; }
  .quiz__panel { grid-area: 3 / 1 / 4 / -1; }
}
@media (width >= 75rem) {
  .quiz { --page-gutter: var(--desktop-page-gutter); padding-block: 2.75rem 3rem; }
  .quiz__glows img { top: -1.125rem; bottom: auto; }
  @container quiz (min-width: 68em) {
    .quiz__layout { grid-template-columns: minmax(0, 28rem) minmax(0, 42.5rem); grid-template-rows: auto 1fr auto; column-gap: 2rem; min-height: 30.3125rem; }
    .quiz__intro { grid-area: 1 / 1; }
    .quiz h2 { font-size: 2rem; }
    .quiz__description > span { display: block; }
    .quiz__art { grid-area: 2 / 1; width: 28rem; height: 14rem; overflow: visible; }
    .quiz__scene { left: -1rem; top: -.75rem; }
    .quiz__progress { grid-area: 3 / 1; width: 23.25rem; margin: 0 0 0 -1.1875rem; gap: 0; }
    .quiz__panel { grid-area: 1 / 2 / 4 / 3; align-self: start; margin-top: 1.875rem; padding: 2.1875rem 2rem 1.125rem 3.0625rem; min-height: 27.6875rem; }
    .quiz__badge { width: 7.572rem; height: 7.585rem; top: -2.695rem; right: 1.633rem; }
    .quiz__question { min-height: 7.25rem; padding-bottom: 1.625rem; }
    .quiz__counter { max-width: calc(100% - 9rem); }
    .quiz__question-text { font-size: 1.5625rem; }
    .quiz__hint { margin-top: .5625rem; }
    .quiz__step--contact .quiz__question { min-height: 8.875rem; }
    .quiz__options { gap: .875rem; }
    .quiz__option-surface { padding: 2rem .375rem 1rem; gap: .9375rem; justify-content: flex-start; }
    .quiz__options--pair .quiz__option-label { font-size: .875rem; }
    .quiz__actions { padding-right: 1.6875rem; }
    .quiz__consents { gap: .375rem; }
    .quiz__consent { min-height: .8125rem; }
    .quiz__consent > span { font-size: .5625rem; }
    .quiz__form:has(.quiz__step--contact:not([hidden])) .quiz__actions { margin-top: .875rem; }
  }
}
@media (prefers-reduced-motion: reduce) {
  .quiz__option-surface { transition: none; }
}
