/* quiz v6 — single-column multi-step funnel (layout, states, transitions only; palette from theme) */
.quiz-step__app {
    max-width: 34rem;
    margin-left: auto;
    margin-right: auto;
}

.quiz-step__bar {
    display: grid;
    grid-template-columns: 2.5rem 1fr;
    align-items: center;
    gap: 0.75rem;
    min-height: 3rem;
}

.quiz-step__back {
    width: 2.5rem;
    height: 2.5rem;
    display: grid;
    place-items: center;
    appearance: none;
    -webkit-appearance: none;
    font: inherit;
    cursor: pointer;
}

.quiz-step__back[hidden] {
    display: grid !important;
    visibility: hidden;
}

.quiz-step__track {
    height: 0.375rem;
    overflow: hidden;
}

.quiz-step__fill {
    width: 0;
    height: 100%;
    transition: width 0.35s ease;
}

.quiz-step__panel {
    animation: quizIn 0.3s ease both;
}

@keyframes quizIn {
    from { opacity: 0; transform: translateX(14px); }
    to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
    .quiz-step__panel { animation: none; }
    .quiz-step__fill,
    .quiz-step__ring-val,
    .quiz-step__check-dot { transition: none; }
}

/* answer rows / tiles / starts */
.quiz-step__start,
.quiz-step__yesno,
.quiz-step__option,
.quiz-step__tile {
    appearance: none;
    -webkit-appearance: none;
    font: inherit;
    cursor: pointer;
    transition: border-color 0.15s, box-shadow 0.15s, transform 0.1s;
}

.quiz-step__option:active,
.quiz-step__tile:active { transform: scale(0.99); }

.quiz-step__option.is-chosen,
.quiz-step__tile.is-chosen {
    border-color: currentColor !important;
    box-shadow: inset 0 0 0 1px currentColor;
}

/* selection mark — filled with currentColor when chosen */
.quiz-step__mark {
    flex-shrink: 0;
    width: 1.375rem;
    height: 1.375rem;
    border: 1.5px solid currentColor;
    display: grid;
    place-items: center;
    opacity: 0.55;
    transition: opacity 0.15s, background-color 0.15s;
}

.is-chosen .quiz-step__mark {
    opacity: 1;
    background-color: currentColor;
}

/* white tick inside the filled mark when chosen */
.is-chosen .quiz-step__mark::after {
    content: "";
    width: 0.55rem;
    height: 0.3rem;
    border: 0.14rem solid #fff;
    border-top: 0;
    border-right: 0;
    transform: translateY(-0.06rem) rotate(-45deg);
}

/* visually hidden native inputs — the row carries the state */
.quiz-step__input {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.quiz-step__consent-box {
    flex: none;
    width: 1.15rem;
    height: 1.15rem;
    margin-top: 0.15rem;
    cursor: pointer;
}

/* number input */
.quiz-step__num {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 0.6rem;
    padding: 0 0.25rem 0.4rem;
}

.quiz-step__num-field {
    min-width: 0;
    width: 100%;
    border: 0;
    background: none;
    text-align: center;
    padding: 0;
    font-weight: 700;
    font-size: clamp(2.2rem, 10vw, 2.9rem);
    line-height: 1.1;
}

.quiz-step__num-field:focus { outline: 0; }

/* statement card */
.quiz-step__statement {
    display: grid;
    gap: 1.1rem;
    justify-items: center;
    text-align: center;
}

/* loader ring */
.quiz-step__ring {
    position: relative;
    width: 10.5rem;
    height: 10.5rem;
    margin: 1.25rem auto 1.5rem;
}

.quiz-step__ring svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.quiz-step__ring circle {
    fill: none;
    stroke-width: 10;
}

.quiz-step__ring-val {
    stroke-linecap: round;
    transition: stroke-dashoffset 0.12s linear;
}

.quiz-step__ring span {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    font-weight: 700;
    font-size: 2.2rem;
}

.quiz-step__check {
    opacity: 0.5;
    transition: opacity 0.3s;
}

.quiz-step__check.is-done { opacity: 1; }

.quiz-step__check-dot {
    flex-shrink: 0;
    width: 1.25rem;
    height: 1.25rem;
    border: 1.5px solid currentColor;
    transition: background-color 0.3s;
}

.quiz-step__check.is-done .quiz-step__check-dot { background-color: currentColor; }

/* buttons */
.quiz-step__cta,
.quiz-step__submit,
.quiz-step__age,
.quiz-step__yesno {
    appearance: none;
    -webkit-appearance: none;
    font: inherit;
    cursor: pointer;
}

.quiz-step__cta,
.quiz-step__submit {
    min-height: 3.25rem;
    width: 100%;
    transition: filter 0.15s;
}

.quiz-step__cta:hover:not(:disabled),
.quiz-step__submit:hover:not(:disabled),
.quiz-step__age:hover,
.quiz-step__yesno:hover { filter: brightness(1.08); }

.quiz-step__cta:disabled,
.quiz-step__submit:disabled {
    opacity: 0.45;
    cursor: default;
    filter: none;
}

.quiz-step__age { min-height: 3.25rem; }
.quiz-step__yesno { min-height: 3rem; }

.quiz-step__media { overflow: hidden; }

