/**
 * The questionnaire.
 *
 * This is the page's signature object and the only thing that matters
 * commercially, so it is treated as a solid, tactile card that sits proud of
 * the page rather than a floaty gradient panel. Everything else on the page is
 * deliberately quiet so this is where the eye lands.
 *
 * Sizing is set for thumbs first: options are large hit targets, the card is
 * comfortable one-handed, and nothing depends on hover.
 */

/* The conversion zone. Given the page's darkest ground and a top accent rule so
   it reads as a distinct destination — the thing the whole page was leading to
   — rather than just another tinted band like the FAQ below it. */
.pathway {
    padding-block: var(--s6);
    background: var(--pathway-bg, #eef1f5);
    border-top: 3px solid var(--accent);
    border-bottom: 1px solid var(--line);
    scroll-margin-top: var(--s3);
}

/* No width override: the form shares the page's single left edge like every
   other section.
   At desktop the lead-in sits BESIDE the card rather than above it. A single
   52rem card in a 78rem container leaves a dead right-hand column, and the
   pitch is exactly the thing worth reading while deciding whether to start. */
.pathway__lead {
    max-width: var(--measure);
}

@media (min-width: 62rem) {
    .pathway__inner {
        display: grid;
        grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
        gap: var(--s5);
        align-items: start;
    }
    .pathway__lead {
        margin-bottom: 0;
        /* Hold the pitch level with the card as the form grows taller. */
        position: sticky;
        top: var(--s4);
    }
    /* #pathway-app (progress + card) and the no-JS fallback both belong in the
       right column. Only ever one of them is visible — pathway.js hides the
       other — so they can safely share the same grid cell. */
    #pathway-app,
    .pathway__fallback {
        grid-column: 2;
        grid-row: 1;
    }
}

/* Left-aligned like every other section. The page is one column of argument
   that ends in the form; centring just this block would break the reading
   line the visitor has been following all the way down. */
.pathway__lead {
    margin-bottom: var(--s4);
}

.pathway__heading {
    font-size: clamp(1.5rem, 3.6vw, 2.1rem);
}

.pathway__sub {
    margin-top: var(--s2);
    color: var(--ink-soft);
}

/* The card. A hard 1px edge and a low, tight shadow — it should read as a
   physical object on the surface, not a floating glass pane. */
.pathway__card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: clamp(var(--s3), 4vw, var(--s5));
    box-shadow: 0 1px 2px rgba(20, 24, 31, 0.04), 0 8px 24px rgba(20, 24, 31, 0.06);
}

.pathway__question {
    font-size: clamp(1.2rem, 2.8vw, 1.5rem);
    margin-bottom: var(--s3);
}

.pathway__question:focus {
    outline: none;
}

.pathway__hint {
    margin-top: calc(var(--s3) * -0.6);
    margin-bottom: var(--s3);
    font-size: 0.9rem;
    color: var(--ink-faint);
}

/* ── Progress ─────────────────────────────────────────────────────────── */

.progress {
    margin-bottom: var(--s3);
}

.progress__label {
    font-size: 0.8125rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--ink-faint);
    margin-bottom: var(--s1);
}

.progress__bar {
    height: 4px;
    background: var(--line);
    border-radius: 100px;
    overflow: hidden;
}

.progress__fill {
    height: 100%;
    background: var(--accent);
    border-radius: 100px;
    transition: width 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

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

.options {
    display: grid;
    gap: var(--s2);
}

.options--boxes {
    grid-template-columns: 1fr;
}

/* Yes/no reads better as a pair — it is a fork, not a list. */
.options--yesno {
    grid-template-columns: 1fr 1fr;
}

.options--tiles {
    grid-template-columns: repeat(auto-fit, minmax(9.5rem, 1fr));
}

.option {
    display: flex;
    align-items: center;
    gap: var(--s2);
    width: 100%;
    min-height: 3.25rem;
    padding: 0.9rem 1.1rem;
    background: var(--surface);
    border: 1.5px solid var(--line);
    border-radius: var(--radius);
    font-family: var(--body-font);
    font-size: 1rem;
    color: var(--ink);
    text-align: left;
    cursor: pointer;
    transition: border-color 0.12s ease, background-color 0.12s ease;
}

.option:hover {
    border-color: var(--ink-faint);
}

.option.is-selected {
    border-color: var(--accent);
    background: var(--accent-soft);
    font-weight: 600;
}

.options--tiles .option,
.options--yesno .option {
    flex-direction: column;
    justify-content: center;
    text-align: center;
    gap: var(--s1);
    min-height: 6rem;
}

.options--yesno .option {
    font-size: 1.1rem;
    font-weight: 600;
}

.option__icon {
    width: 2.25rem;
    height: 2.25rem;
    object-fit: contain;
}

.option__label {
    display: block;
}

/* Free-text for a "Something else" choice. Spans the grid so it never squeezes
   into a tile column. */
.option__specify {
    grid-column: 1 / -1;
    width: 100%;
    padding: 0.8rem 1rem;
    font-family: var(--body-font);
    font-size: 1rem;
    color: var(--ink);
    background: var(--surface);
    border: 1.5px solid var(--accent);
    border-radius: var(--radius);
}

/* ── Contact step ─────────────────────────────────────────────────────── */

.contact {
    display: grid;
    gap: var(--s3);
}

.field {
    display: grid;
    gap: 0.4rem;
}

.field__label {
    font-size: 0.9rem;
    font-weight: 600;
}

.field__input {
    width: 100%;
    padding: 0.85rem 1rem;
    font-family: var(--body-font);
    font-size: 1rem;
    color: var(--ink);
    background: var(--surface);
    border: 1.5px solid var(--line);
    border-radius: var(--radius);
    transition: border-color 0.12s ease;
}

.field__input:focus {
    border-color: var(--accent);
}

.field--error .field__input {
    border-color: var(--danger);
}

.field__error {
    margin: 0;
    font-size: 0.85rem;
    color: var(--danger);
}

.contact__consent {
    font-size: 0.85rem;
    color: var(--ink-faint);
    line-height: 1.5;
}

.contact__consent a {
    color: var(--ink-soft);
}

/* Honeypot — off-screen rather than display:none, which some bots skip. */
.honeypot {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.turnstile:not(:empty) {
    margin-block: var(--s1);
}

/* ── Nav / errors / success ───────────────────────────────────────────── */

.pathway__nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--s2);
    margin-top: var(--s3);
}

/* Step 1 of a single-select has neither Back nor Next — the row is empty, and
   without this it leaves a block of dead space under the options. */
.pathway__nav:empty {
    display: none;
}

/* With no Back button, keep Next on the right. */
.pathway__nav > .btn:only-child {
    margin-left: auto;
}

.contact .btn--primary {
    width: 100%;
    padding-block: 1.05rem;
}

.pathway__error {
    margin-top: var(--s2);
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
    color: var(--danger);
    background: #fdf3f2;
    border: 1px solid #f5d5d1;
    border-radius: var(--radius);
}

.pathway__error a {
    color: var(--danger);
}

.pathway__card--success {
    text-align: center;
}

.pathway__success-body {
    color: var(--ink-soft);
    margin-bottom: var(--s2);
}

.pathway__success-prompt {
    margin: var(--s4) 0 var(--s2);
    font-weight: 600;
}

.pathway__fallback {
    text-align: center;
    padding: var(--s4);
    background: var(--surface);
    border: 1px dashed var(--line);
    border-radius: var(--radius-lg);
}

.pathway__fallback p {
    margin-bottom: var(--s3);
    color: var(--ink-soft);
}

@media (max-width: 30rem) {
    .options--tiles {
        grid-template-columns: 1fr 1fr;
    }
    .pathway__nav {
        flex-wrap: wrap;
    }
}
