/*
Theme Name: Reta Quiz
Author: The Health Aura
Description: A single-purpose WordPress theme: the whole site is one full-screen recommendation quiz. Five questions, one per screen, ending on a personalised recommendation with a call to action. No shop, no blog, no build step.
Version: 2.0.0
Requires at least: 6.0
Tested up to: 6.6
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: reta
Tags: one-column, full-width-template, theme-options, translation-ready
*/

/* ════════════════════════════════════════════════
   1. TOKENS
   The quiz's whole palette. Retune the brand here
   and every screen follows.
   ════════════════════════════════════════════════ */

:root {
    /* Primary scale — Apex Blue (#0E61B5). */
    --color-primary-50:  #eef6ff;
    --color-primary-200: #b9d5f6;
    --color-primary-400: #5c9ce8;
    --color-primary-500: #0E61B5;
    --color-primary-600: #0E61B5;
    --color-primary-700: #0E61B5;
    --color-primary-800: #052c55;

    --color-text-main:  #161518;
    --color-text-muted: #A09B9B;

    --color-bg-body:    #FFFFFF;
    --color-bg-surface: #FFFFFF;
    --color-border:     #E5E5E5;

    --font-body:    'Inter', system-ui, sans-serif;
    --font-heading: 'Outfit', system-ui, sans-serif;
}


/* ════════════════════════════════════════════════
   2. RESET & BASE
   Only what the quiz markup actually needs — there
   are no other templates to style.
   ════════════════════════════════════════════════ */

*,
*::before,
*::after { box-sizing: border-box; }

* {
    margin: 0;
    padding: 0;
}

html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    /* The quiz shell owns the viewport and scrolls internally, so the document
       itself never should — this is what keeps the top and bottom bars pinned. */
    height: 100%;
    overflow: hidden;
}

body {
    height: 100%;
    overflow: hidden;
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.625;
    color: var(--color-text-main);
    background-color: var(--color-bg-body);
    text-rendering: optimizeLegibility;
}

img, svg { display: block; max-width: 100%; }

button { font: inherit; color: inherit; }

/* The one utility the markup uses. It was a Tailwind class; Tailwind is gone. */
.font-display { font-family: var(--font-heading); }

/* WordPress admin bar — without this it overlaps the quiz's own top bar. */
body.admin-bar .tha-quiz { padding-top: 32px; }
@media screen and (max-width: 782px) {
    body.admin-bar .tha-quiz { padding-top: 46px; }
}


/* ════════════════════════════════════════════════
   3. THE QUIZ  (inc/quiz.php)

   A full-viewport, three-row layout: a fixed brand
   bar, a scrolling question area, and a fixed
   footer carrying Back and the step counter.
   ════════════════════════════════════════════════ */

.tha-quiz {
    /* Local aliases — one place to retune the quiz without touching the brand
       scale, and they keep these rules readable. */
    --q-accent: var(--color-primary-500);
    --q-accent-deep: var(--color-primary-700);
    --q-accent-dark: var(--color-primary-800);
    --q-accent-soft: var(--color-primary-50);
    --q-accent-line: var(--color-primary-200);
    --q-ink: var(--color-text-main);
    --q-muted: var(--color-text-muted);
    --q-body: #4b5563;          /* long-form copy — --color-text-muted is too pale to read at length */
    --q-line: var(--color-border);
    --q-surface: var(--color-bg-surface);
    --q-page: #fafbfc;

    display: block;
    /* dvh keeps the footer bar visible under mobile browser chrome. */
    height: 100dvh;
    font-family: var(--font-body);
    background: var(--q-page);
}

/* Fills .tha-quiz exactly — the height (and any admin-bar offset) is set there,
   so the shell just divides it into bar / scroller / footer. */
.tha-quiz__shell {
    display: flex;
    flex-direction: column;
    height: 100%;
    animation: thaQuizIn .32s cubic-bezier(.22,.61,.36,1);
}
@keyframes thaQuizIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* ── Top bar ─────────────────────────────────── */

/* Branding left, "Skip Quiz" centred. Three columns rather than
   space-between: the empty end column mirrors the branding one, so the button
   lands on the bar's true centre no matter how wide the logo is. */
.tha-quiz__bar {
    flex: none;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 0.75rem;
    min-height: 4rem;
    padding: 0.85rem clamp(1rem, 4vw, 2.5rem);
    background: var(--q-surface);
    border-bottom: 1px solid var(--q-line);
}

.tha-quiz__bar-side {
    display: flex;
    align-items: center;
    min-width: 0;
}
.tha-quiz__bar-side--end { justify-content: flex-end; }
.tha-quiz__bar-mid { display: flex; justify-content: center; }

.tha-quiz__brand {
    font-size: clamp(1.05rem, 2.5vw, 1.3rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    color: var(--q-ink);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Constrain whatever the site logo happens to be, so an oversized upload can't
   push the bar taller than the rest of the layout expects. */
.tha-quiz__logo { display: flex; }
.tha-quiz__logo img {
    max-height: 2.5rem;
    width: auto;
}
/* the_custom_logo() wraps the image in its own home link. */
.tha-quiz__logo a { display: flex; line-height: 0; }

/* ── Skip Quiz ───────────────────────────────── */

/* Outlined, not filled: it is the way past the quiz, so it must be findable
   without competing with the answer buttons for the primary action. */
.tha-quiz__skip {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.5rem 1.05rem;
    border: 1px solid var(--q-accent-line);
    border-radius: 999px;
    background: var(--q-accent-soft);
    color: var(--q-accent-deep);
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.2;
    white-space: nowrap;
    text-decoration: none;
    transition: background .18s ease, border-color .18s ease, color .18s ease, transform .18s ease;
}
.tha-quiz__skip svg {
    width: 0.95em;
    height: 0.95em;
    transition: transform .18s ease;
}
.tha-quiz__skip:hover,
.tha-quiz__skip:focus-visible {
    background: var(--q-accent);
    border-color: var(--q-accent);
    color: #fff;
}
.tha-quiz__skip:hover svg,
.tha-quiz__skip:focus-visible svg { transform: translateX(2px); }
.tha-quiz__skip:active { transform: translateY(1px); }

@media (max-width: 30rem) {
    .tha-quiz__skip { padding: 0.42rem 0.8rem; font-size: 0.82rem; }
    .tha-quiz__logo img { max-height: 2rem; }
}

/* ── Scroll area ─────────────────────────────── */

.tha-quiz__scroll {
    flex: 1 1 auto;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}
.tha-quiz__inner {
    width: 100%;
    max-width: 48rem;
    margin: 0 auto;
    padding: clamp(1.75rem, 5vw, 3.25rem) clamp(1rem, 4vw, 2rem) 3rem;
}
.tha-quiz__panel[hidden] { display: none !important; }
.tha-quiz__panel { animation: thaQuizPanel .3s ease both; }
@keyframes thaQuizPanel { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ── Question ────────────────────────────────── */

.tha-quiz__step { position: relative; }

/* Oversized ghost step number sitting behind the heading, tinted with the
   brand blue rather than a flat grey so it belongs to the palette. */
.tha-quiz__ghost {
    position: absolute;
    top: clamp(-2.4rem, -5vw, -1.4rem);
    left: -0.35rem;
    font-family: var(--font-heading);
    font-size: clamp(3.75rem, 11vw, 6rem);
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.05em;
    color: color-mix(in srgb, var(--color-primary-500) 11%, transparent);
    user-select: none;
    pointer-events: none;
}

.tha-quiz__head { position: relative; z-index: 1; }

.tha-quiz__title {
    margin: 0;
    font-size: clamp(1.5rem, 4vw, 2.1rem);
    font-weight: 700;
    line-height: 1.18;
    letter-spacing: -0.04em;   /* the theme's `tracking-tighter` heading treatment */
    color: var(--q-ink);
}
/* --color-text-muted is too pale for instructional copy at this size, so the
   sub-line uses the darker body grey; --q-muted stays for incidental meta. */
.tha-quiz__sub {
    margin: 0.6rem 0 0;
    font-size: clamp(0.9rem, 2vw, 1rem);
    line-height: 1.55;
    color: var(--q-body);
}

.tha-quiz__track {
    position: relative;
    height: 3px;
    margin: 1.35rem 0 1.75rem;
    border-radius: 9999px;
    background: var(--q-line);
    overflow: hidden;
}
.tha-quiz__fill {
    display: block;
    height: 100%;
    border-radius: 9999px;
    background: linear-gradient(90deg, var(--color-primary-600), var(--color-primary-400));
    transition: width .35s cubic-bezier(.22,.61,.36,1);
}

/* ── Options ─────────────────────────────────── */

/*
   Two treatments, picked per question in reta_quiz_questions():

     --cards  two-up photo tiles with a dark caption bar over the image
     --rows   full-width rows: flush-left thumbnail, label + note, radio

   Both degrade to the option's outline icon on a tinted panel when no photo
   has been dropped into assets/images/quiz/, so the layout never collapses.
*/

.tha-quiz__options { display: grid; gap: 0.75rem; }
.tha-quiz__options--cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.9rem; }

.tha-quiz__option {
    position: relative;
    display: flex;
    width: 100%;
    padding: 0;
    border: 1px solid var(--q-line);
    border-radius: 1rem;
    background: var(--q-surface);
    text-align: left;
    cursor: pointer;
    overflow: hidden;
    /* `translate` (not `transform`) carries the entrance so the hover lift below
       can own `transform` without the finished animation holding it hostage. */
    animation: thaQuizOpt .4s cubic-bezier(.22,.61,.36,1) both;
    animation-delay: calc(var(--i, 0) * 60ms);
    transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease, background-color .25s ease;
}
@keyframes thaQuizOpt {
    from { opacity: 0; translate: 0 12px; }
    to   { opacity: 1; translate: 0 0; }
}

.tha-quiz__option:hover,
.tha-quiz__option:focus-visible {
    transform: translateY(-2px);
    border-color: var(--q-accent);
    box-shadow: 0 12px 26px -12px color-mix(in srgb, var(--color-primary-700) 55%, transparent);
    outline: none;
}
.tha-quiz__option:active { transform: translateY(0) scale(.995); }

/* Selected reads as a ring rather than a heavier border, so the tile doesn't
   shift by a pixel when it locks in. */
.tha-quiz__option.is-selected {
    border-color: var(--q-accent);
    box-shadow: 0 0 0 2px var(--q-accent), 0 12px 26px -12px color-mix(in srgb, var(--color-primary-700) 55%, transparent);
}

/* ── Thumbnail ── */

.tha-quiz__thumb {
    position: relative;
    flex: none;
    display: block;
    overflow: hidden;
    background: var(--q-accent-soft);
}
.tha-quiz__thumb img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .5s cubic-bezier(.22,.61,.36,1);
}
.tha-quiz__option:hover .tha-quiz__thumb img { transform: scale(1.04); }

/* Icon fallback — centred glyph on the brand tint. */
.tha-quiz__thumb--icon {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-primary-600);
}
.tha-quiz__thumb--icon svg { width: 40%; height: 40%; max-width: 2rem; max-height: 2rem; }

/* ── Caption ── */

.tha-quiz__label {
    display: block;
    font-size: clamp(0.92rem, 2vw, 1rem);
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: -0.01em;
}
.tha-quiz__note {
    display: block;
    margin-top: 0.15rem;
    font-size: 0.8125rem;
    font-weight: 400;
    line-height: 1.4;
}

/* ── Cards ── */

.tha-quiz__option--cards { display: block; aspect-ratio: 4 / 5; }
.tha-quiz__option--cards .tha-quiz__thumb {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}
/* The caption sits on the photo, so it carries its own scrim for contrast
   rather than trusting whatever the image happens to be. */
.tha-quiz__option--cards .tha-quiz__caption {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
    padding: 2.25rem 0.95rem 0.9rem;
    background: linear-gradient(to top, rgba(12, 16, 22, .95) 42%, rgba(12, 16, 22, .72) 68%, rgba(12, 16, 22, 0) 100%);
}
.tha-quiz__option--cards .tha-quiz__label { color: #fff; }
.tha-quiz__option--cards .tha-quiz__note { color: rgba(255, 255, 255, .72); }

/* Cards use a corner tick instead of an inline radio. */
.tha-quiz__option--cards .tha-quiz__radio {
    position: absolute;
    top: 0.7rem;
    right: 0.7rem;
    z-index: 2;
    width: 1.65rem;
    height: 1.65rem;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, .85);
    background: rgba(12, 16, 22, .35);
    backdrop-filter: blur(2px);
}

/* ── Rows ── */

.tha-quiz__option--rows { align-items: stretch; }
.tha-quiz__option--rows .tha-quiz__thumb {
    width: 5.25rem;
    align-self: stretch;
}
/* Square thumb only matters for the icon fallback; a photo simply fills the
   row's height. */
.tha-quiz__option--rows .tha-quiz__thumb--icon { aspect-ratio: 1 / 1; }

.tha-quiz__option--rows .tha-quiz__caption {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
    padding: 0.9rem 1rem;
}
.tha-quiz__option--rows .tha-quiz__label { color: var(--q-ink); }
.tha-quiz__option--rows .tha-quiz__note { color: var(--q-muted); }

.tha-quiz__option--rows .tha-quiz__radio {
    flex: none;
    align-self: center;
    width: 1.4rem;
    height: 1.4rem;
    margin-right: 1rem;
    border-radius: 50%;
    border: 1.5px solid var(--q-line);
    background: var(--q-surface);
}
.tha-quiz__option--rows:hover .tha-quiz__radio,
.tha-quiz__option--rows:focus-visible .tha-quiz__radio { border-color: var(--q-accent); }

/* ── Radio / tick shared ── */

.tha-quiz__radio {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    transition: background-color .25s ease, border-color .25s ease;
}
.tha-quiz__radio svg {
    width: 65%;
    height: 65%;
    opacity: 0;
    transform: scale(.4);
    transition: opacity .2s ease, transform .25s cubic-bezier(.22,.61,.36,1);
}
.tha-quiz__option.is-selected .tha-quiz__radio {
    background: var(--q-accent);
    border-color: var(--q-accent);
}
.tha-quiz__option.is-selected .tha-quiz__radio svg { opacity: 1; transform: scale(1); }

/* ── Footer bar ──────────────────────────────── */

.tha-quiz__foot {
    flex: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.75rem clamp(1rem, 4vw, 2.5rem);
    background: var(--q-surface);
    border-top: 1px solid var(--q-line);
}
.tha-quiz__foot[hidden] { display: none; }

.tha-quiz__back {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    border-radius: 9999px;
    padding: 0.55rem 1.15rem 0.55rem 0.9rem;
    border: 1px solid var(--q-line);
    background: transparent;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--q-ink);
    cursor: pointer;
    transition: all 0.3s ease;
}
.tha-quiz__back:hover,
.tha-quiz__back:focus-visible { border-color: var(--q-muted); background: var(--color-bg-body); }
.tha-quiz__back[hidden] { display: none; }
.tha-quiz__back svg { width: 1rem; height: 1rem; color: var(--q-accent); }

.tha-quiz__count {
    margin-left: auto;
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--q-muted);
}

/* ── Matching state ──────────────────────────── */

.tha-quiz__loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    min-height: 45vh;
    text-align: center;
}
.tha-quiz__spinner {
    width: 2.5rem;
    height: 2.5rem;
    border: 3px solid var(--q-line);
    border-top-color: var(--q-accent);
    border-radius: 50%;
    animation: thaQuizSpin .8s linear infinite;
}
@keyframes thaQuizSpin { to { transform: rotate(360deg); } }
.tha-quiz__loading-text { margin: 0; font-size: 0.95rem; font-weight: 600; color: var(--q-muted); }

/* ── Result ──────────────────────────────────── */

/*
   Split screen: the image runs the full height down the left, the copy scrolls
   independently on the right. `is-result` is set on the root by the JS when the
   recommendation appears — it hands scrolling from the shared shell scroller to
   the copy column, and lets the panel go full-bleed out of the centred,
   max-width column the question steps use.
*/
.tha-quiz.is-result .tha-quiz__scroll {
    overflow: hidden;
    display: flex;
}
.tha-quiz.is-result .tha-quiz__inner {
    max-width: none;
    margin: 0;
    padding: 0;
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
}

.tha-quiz__result {
    position: relative;
    flex: 1 1 auto;
    min-height: 0;
    display: grid;
    grid-template-columns: minmax(0, 42%) minmax(0, 1fr);
    background: var(--q-surface);
    outline: none;
}
/* No image set → the copy simply takes the full width. */
.tha-quiz__result--noimage { grid-template-columns: minmax(0, 1fr); }

.tha-quiz__result-media {
    position: relative;
    overflow: hidden;
    background: var(--q-accent-soft);
}
.tha-quiz__result-media img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.tha-quiz__result-copy {
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: clamp(1.5rem, 3.5vw, 3rem);
    outline: none;
}
/* Keeps the long-form copy readable on very wide screens. */
.tha-quiz__result-copy > * { max-width: 42rem; }

/* The theme's section eyebrow: small, uppercase, wide-tracked, brand blue. */
.tha-quiz__eyebrow {
    margin: 0;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--color-primary-600);
}
.tha-quiz__result-title {
    margin: 0.6rem 0 0;
    font-size: clamp(1.9rem, 5.5vw, 2.75rem);
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.05em;
    color: var(--q-ink);
}
/* Styled as the .reta-card__cat pill so the strapline reads as a product tag. */
.tha-quiz__result-tag {
    display: inline-flex;
    align-items: center;
    margin: 0.75rem 0 0;
    border-radius: 0.5rem;
    padding: 0.4rem 0.65rem;
    font-size: 0.625rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    background: var(--q-accent-soft);
    color: var(--color-primary-700);
}
/* The visitor's own selections, echoed back above the write-up. */
.tha-quiz__answers { margin-top: 1.5rem; }
.tha-quiz__answers[hidden] { display: none; }
.tha-quiz__answers-label {
    margin: 0 0 0.6rem;
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--q-muted);
}
.tha-quiz__chips { display: flex; flex-wrap: wrap; gap: 0.45rem; }
.tha-quiz__chip {
    display: inline-flex;
    align-items: center;
    border-radius: 9999px;
    padding: 0.4rem 0.85rem;
    border: 1px solid var(--q-accent-line);
    background: var(--q-accent-soft);
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--color-primary-700);
    animation: thaQuizChip .35s cubic-bezier(.22,.61,.36,1) both;
    animation-delay: calc(var(--i, 0) * 70ms);
}
@keyframes thaQuizChip {
    from { opacity: 0; translate: 0 6px; scale: .96; }
    to   { opacity: 1; translate: 0 0; scale: 1; }
}

.tha-quiz__result-intro {
    margin: 1.5rem 0 0;
    font-size: 1rem;
    line-height: 1.7;
    color: var(--q-body);
}
.tha-quiz__result-h3 {
    margin: 2rem 0 0.9rem;
    font-family: var(--font-heading);
    font-size: clamp(1.1rem, 2.8vw, 1.35rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    color: var(--q-ink);
}

.tha-quiz__benefits { margin: 0; padding: 0; list-style: none; display: grid; gap: 0.7rem; }
.tha-quiz__benefits li {
    display: flex;
    align-items: flex-start;
    gap: 0.7rem;
    font-size: 0.98rem;
    line-height: 1.55;
    color: var(--q-body);
}
.tha-quiz__benefits svg {
    flex: none;
    width: 1.3rem;
    height: 1.3rem;
    margin-top: 0.12rem;
    color: var(--color-primary-600);
}

.tha-quiz__why {
    margin-top: 2rem;
    padding: 1.25rem clamp(1rem, 3vw, 1.6rem) 1.4rem;
    border-left: 3px solid var(--q-accent);
    border-radius: 0 1rem 1rem 0;
    background: var(--q-accent-soft);
}
.tha-quiz__why .tha-quiz__result-h3 { margin-top: 0; }
.tha-quiz__why p {
    margin: 0 0 0.85rem;
    font-size: 0.96rem;
    line-height: 1.7;
    color: var(--q-body);
}
.tha-quiz__why p:last-child { margin-bottom: 0; }

.tha-quiz__next {
    margin-top: 2.25rem;
    padding-top: 1.75rem;
    border-top: 1px solid var(--q-line);
}
.tha-quiz__next-title {
    margin: 0;
    font-size: clamp(1.2rem, 3vw, 1.5rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    color: var(--q-ink);
}
.tha-quiz__next p {
    margin: 0.5rem 0 0;
    font-size: 0.98rem;
    line-height: 1.65;
    color: var(--q-muted);
}

.tha-quiz__cta-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.85rem;
    margin-top: 1.35rem;
}
/* Matches .btn-forest, the theme's primary CTA. */
.tha-quiz__cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    border-radius: 9999px;
    padding: 0.875rem 1.75rem;
    font-size: 0.875rem;
    line-height: 1.25rem;
    font-weight: 600;
    background: var(--q-accent-deep);
    color: var(--color-primary-50);
    border: none;
    text-decoration: none;
    transition: all 0.3s ease;
}
.tha-quiz__cta:hover,
.tha-quiz__cta:focus-visible {
    background: var(--q-accent-dark);
    color: var(--color-primary-50);
    box-shadow: 0 8px 24px rgba(14, 97, 181, 0.32);
    transform: translateY(-1px);
}
.tha-quiz__cta-arrow { width: 1rem; height: 1rem; transition: transform .3s ease; }
.tha-quiz__cta:hover .tha-quiz__cta-arrow { transform: translateX(3px); }

.tha-quiz__later {
    padding: 0.875rem 1rem;
    border: 0;
    background: transparent;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--q-muted);
    text-decoration: underline;
    text-underline-offset: 3px;
    cursor: pointer;
    transition: color .3s ease;
}
.tha-quiz__later:hover,
.tha-quiz__later:focus-visible { color: var(--q-ink); }

/* ── Small screens ───────────────────────────── */

/* Below the split breakpoint the two columns stack, and scrolling goes back to
   the shell scroller so the image and copy move together as one page. */
@media (max-width: 900px) {
    .tha-quiz.is-result .tha-quiz__scroll { overflow-y: auto; display: block; }
    .tha-quiz.is-result .tha-quiz__inner { display: block; }
    .tha-quiz__result {
        display: block;
        min-height: 100%;
    }
    .tha-quiz__result-media { height: 38vh; min-height: 200px; }
    .tha-quiz__result-copy { overflow: visible; max-height: none; }
    .tha-quiz__result-copy > * { max-width: none; }
}

@media (max-width: 640px) {
    /* Cards stay two-up — they're photo tiles, and one per row would push the
       later answers off screen. Rows just tighten. */
    .tha-quiz__options--cards { gap: 0.7rem; }
    .tha-quiz__option--cards .tha-quiz__caption { padding: 1.75rem 0.7rem 0.7rem; }
    .tha-quiz__option--rows .tha-quiz__thumb { width: 4.25rem; }
    .tha-quiz__option--rows .tha-quiz__caption { padding: 0.75rem 0.85rem; }
    .tha-quiz__option--rows .tha-quiz__radio { margin-right: 0.75rem; }
    .tha-quiz__cta,
    .tha-quiz__later { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
    .tha-quiz__shell,
    .tha-quiz__panel,
    .tha-quiz__option,
    .tha-quiz__chip { animation: none; }
    .tha-quiz__option,
    .tha-quiz__thumb img,
    .tha-quiz__radio,
    .tha-quiz__cta,
    .tha-quiz__cta-arrow,
    .tha-quiz__fill { transition: none; }
    .tha-quiz__option:hover,
    .tha-quiz__option:active,
    .tha-quiz__cta:hover { transform: none; }
    .tha-quiz__option:hover .tha-quiz__thumb img { transform: none; }
    /* The tick still needs to appear — just without the pop. */
    .tha-quiz__radio svg { transition: opacity .2s ease; transform: none; }
    .tha-quiz__spinner { animation-duration: 2s; }
}
