/* 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);
}

/* square mark variant (multi) */
.quiz-step__mark--sq { border-radius: 0.4rem; }

/* radio dot (single · S2) */
.quiz-step__dot {
    flex-shrink: 0;
    width: 1.2rem;
    height: 1.2rem;
    border: 1.6px solid currentColor;
    border-radius: 50%;
    opacity: 0.55;
    transition: opacity 0.15s, box-shadow 0.15s;
}

.is-chosen .quiz-step__dot {
    opacity: 1;
    box-shadow: inset 0 0 0 0.3rem currentColor;
}

/* pill option (single · S4 / multi · M3): fills with currentColor when chosen */
.quiz-opt--pill {
    transition: background-color 0.15s, border-color 0.15s;
}

.quiz-opt--pill.is-chosen {
    background-color: currentColor;
    box-shadow: none;
}

.quiz-opt--pill.is-chosen .quiz-step__opt-label { color: #fff !important; }

/* filled row (multi · M5): whole row fills, tick without a box */
.quiz-opt--fill .quiz-step__mark { border-color: transparent; }

.quiz-opt--fill.is-chosen {
    background-color: currentColor;
    box-shadow: none;
}

.quiz-opt--fill.is-chosen .quiz-step__opt-label { color: #fff !important; }
.quiz-opt--fill.is-chosen .quiz-step__mark { background-color: transparent; opacity: 1; }

/* photo tile with label overlay (tiles · T5) */
.quiz-step__tover-label {
    background: linear-gradient(to top, rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0));
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.55);
}

/* slider (number · N5) */
.quiz-step__range {
    display: block;
    width: 100%;
    cursor: pointer;
}

.quiz-step__bubble {
    font-family: "EB Garamond", "Playfair Display", Georgia, serif;
    font-size: clamp(2rem, 9vw, 2.6rem);
    line-height: 1.1;
}

/* 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;
}

/* statement with a full-bleed photo on top — no inner gap (quote carries its own padding) */
.quiz-step__statement.is-topphoto {
    gap: 0;
    padding: 0;
}

/* statement quote — serif, wrapped in guillemets */
.quiz-step__quote {
    font-family: "EB Garamond", "Playfair Display", Georgia, serif;
    line-height: 1.3;
}

.quiz-step__quote::before { content: "\00ab\00a0"; }
.quiz-step__quote::after { content: "\00a0\00bb"; }

/* 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;
    display: grid;
    place-items: center;
    transition: background-color 0.3s;
}

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

/* white tick inside the dot once the step is done */
.quiz-step__check.is-done .quiz-step__check-dot::after {
    content: "";
    width: 0.4rem;
    height: 0.22rem;
    border: 0.1rem solid #fff;
    border-top: 0;
    border-right: 0;
    transform: translateY(-0.03rem) rotate(-45deg);
}

/* intro · age-start buttons (first-page variant 2) */
.quiz-step__agebtn {
    appearance: none;
    -webkit-appearance: none;
    font: inherit;
    cursor: pointer;
    min-height: 3.25rem;
    transition: border-color 0.15s, background-color 0.15s;
}

.quiz-step__agebtn:hover { border-color: currentColor; }

/* intro · full-bleed overlay (variant 5): legibility gradient over the photo */
.quiz-step__overlay-inner {
    background: linear-gradient(to top, rgba(0, 0, 0, 0.78), rgba(0, 0, 0, 0.1) 70%, transparent);
}

/* loader · linear progress bar (variants 2, 4) */
.quiz-step__lbar { height: 0.6rem; }

.quiz-step__lbar-fill {
    width: 0;
    height: 100%;
    transition: width 0.12s linear;
}

/* loader · percent readouts (variants 2, 4) */
.quiz-step__bigpct {
    font-family: "EB Garamond", "Playfair Display", Georgia, serif;
    font-size: clamp(2.6rem, 12vw, 3.4rem);
    line-height: 1;
    margin-bottom: 0.25rem;
}

.quiz-step__hugepct {
    font-family: "EB Garamond", "Playfair Display", Georgia, serif;
    font-size: clamp(3.6rem, 20vw, 5.5rem);
    line-height: 1;
}

/* loader · step pills (variant 2) */
.quiz-step__lpill { transition: background-color 0.3s, color 0.3s; }

.quiz-step__lpill.is-done {
    background-color: currentColor;
    color: #fff;
}

/* loader · spinner (variant 3) */
.quiz-step__spinner {
    width: 2.9rem;
    height: 2.9rem;
    border-radius: 50%;
    border: 0.28rem solid rgba(128, 128, 128, 0.2);
    border-top-color: currentColor;
    animation: quizSpin 0.8s linear infinite;
}

@keyframes quizSpin { to { transform: rotate(360deg); } }

/* loader · scan / pulse (variant 5) */
.quiz-step__scan {
    position: relative;
    width: 7.5rem;
    height: 7.5rem;
}

.quiz-step__scan-ring {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 2px solid currentColor;
    opacity: 0.25;
    animation: quizPulse 1.8s ease-out infinite;
}

.quiz-step__scan-ring:nth-child(2) { animation-delay: 0.6s; }
.quiz-step__scan-ring:nth-child(3) { animation-delay: 1.2s; }

@keyframes quizPulse {
    0% { transform: scale(0.5); opacity: 0.5; }
    100% { transform: scale(1.25); opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
    .quiz-step__spinner,
    .quiz-step__scan-ring { animation: none; }
}

/* 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[hidden] { display: none !important; }

.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; }

/* --- Bootstrap parity: image sizing (TW constrains via aspect-[*] utilities; BS has none) --- */
.quiz-step__hero img { aspect-ratio: 16 / 10; width: 100%; object-fit: cover; }
.quiz-step__split img { aspect-ratio: 16 / 9; width: 100%; object-fit: cover; }
.quiz-step__overlay img { aspect-ratio: 3 / 4; max-height: 24rem; width: 100%; object-fit: cover; }
.quiz-step__media img { aspect-ratio: 16 / 9; width: 100%; object-fit: cover; }
.quiz-step__stmt-photo { aspect-ratio: 16 / 9; width: 100%; object-fit: cover; }
.quiz-step__avatar { width: 7rem; height: 7rem; }
.quiz-step__avatar img { width: 100%; height: 100%; object-fit: cover; }
.quiz-step__ifull img { aspect-ratio: 4 / 3; width: 100%; object-fit: cover; }
.quiz-step__iside img { width: 5.25rem; height: 5.25rem; object-fit: cover; }
.quiz-step__tile img:not(.quiz-step__thumb) { aspect-ratio: 3 / 2; width: 100%; object-fit: cover; }
.quiz-step__tover img { aspect-ratio: 5 / 3; width: 100%; object-fit: cover; }
.quiz-step__thumb { width: 4rem; height: 3rem; object-fit: cover; flex: none; }

/* --- Bootstrap parity: option grids (BS row/col gutters are inner padding, so bordered cards touch) --- */
.quiz-step__opts2,
.quiz-step__opts3,
.quiz-step__agegrid { display: grid !important; gap: 0.625rem; margin-left: 0 !important; margin-right: 0 !important; }
.quiz-step__opts2,
.quiz-step__agegrid { grid-template-columns: 1fr 1fr; }
.quiz-step__opts3 { grid-template-columns: repeat(3, 1fr); }
.quiz-step__opts2 > *,
.quiz-step__opts3 > *,
.quiz-step__agegrid > * { width: auto !important; max-width: none !important; margin: 0 !important; }

/* S5 numbered rows — slim primary left accent instead of a heavy grey 4px bar */
.quiz-opt--bar { border-left-width: 3px; border-left-color: currentColor; }

