/*
|--------------------------------------------------------------------------
| Killer Strength - Assessment Funnel
|--------------------------------------------------------------------------
| Standalone stylesheet for the quiz funnels. Deliberately NOT dependent on
| app.css: the funnel runs in its own distraction-free layout and should not
| pull 90KB of site chrome onto the highest-value page on the site.
|
| Tokens below mirror :root in public/css/app.css (lines ~13-90). If the
| brand palette changes there, mirror it here.
|
| Note on type: app.css sets --font-sans to Bebas Neue site-wide. Bebas is an
| all-caps condensed display face - fine for headlines, unreadable for forty
| questions of body copy. The funnel uses Inter (already loaded by the layout
| font link) for everything except headings and numerals.
*/

/* ==========================================================================
   Reset
   --------------------------------------------------------------------------
   This stylesheet is standalone - layouts/quiz.blade.php deliberately does not
   load app.css, so NONE of that file's global reset applies here. Without the
   two rules below every `width: 100%` element adds its padding on top of the
   full width: .qz-inner overflows by 40px, inputs by 32px and the primary
   button by 48px, which scrolls the whole funnel sideways on a phone.
   ========================================================================== */

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

html,
body {
    margin: 0;
    padding: 0;
}

/* Belt and braces: the funnel has nothing that is meant to scroll sideways,
   so if a future change reintroduces an overflow it should be clipped rather
   than shipped. `clip` rather than `hidden` because `hidden` would make body a
   scroll container and break the sticky progress header and footer. */
html.qz {
    overflow-x: clip;
}
.qz {
    --qz-primary: #66a65d;
    --qz-primary-dark: #558b4e;
    --qz-primary-soft: rgba(102, 166, 93, 0.14);
    --qz-primary-glow: rgba(102, 166, 93, 0.45);

    --qz-bg: #0a0a0a;
    --qz-bg-raised: #141414;
    --qz-surface: #1a1a1a;
    --qz-surface-hover: #212121;
    --qz-border: rgba(255, 255, 255, 0.10);
    --qz-border-strong: rgba(255, 255, 255, 0.18);

    --qz-text: #ffffff;
    --qz-text-muted: #a0a0a0;
    --qz-text-dim: #6e6e6e;
    --qz-danger: #ff5252;

    --qz-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --qz-display: 'Bebas Neue', 'Inter', sans-serif;

    --qz-radius: 14px;
    --qz-radius-lg: 20px;
    --qz-radius-pill: 999px;

    --qz-ease: cubic-bezier(0.22, 1, 0.36, 1);
    --qz-in: 280ms;
    --qz-out: 200ms;

    --qz-gutter: 20px;
    --qz-max: 620px;
    --qz-bar-h: 52px;

    font-family: var(--qz-body);
    color: var(--qz-text);
    background: var(--qz-bg);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

/* ==========================================================================
   Branded bar
   --------------------------------------------------------------------------
   Deliberately NOT the site header. Logo and one way back, nothing else -
   every additional link on a question screen is a way out of the funnel.
   Not sticky: on a 640px-tall phone the progress header needs that space more.
   ========================================================================== */

.qz-bar {
    height: var(--qz-bar-h);
    border-bottom: 1px solid var(--qz-border);
    background: #070707;
}

.qz-bar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    height: 100%;
    max-width: var(--qz-max);
    margin: 0 auto;
    padding: 0 var(--qz-gutter);
}

.qz-bar-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--qz-text);
    text-decoration: none;
    min-width: 0;
}

.qz-bar-brand img { display: block; width: 34px; height: 34px; object-fit: contain; }

.qz-bar-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 9px;
    background: var(--qz-primary);
    color: #07130a;
    font-family: var(--qz-display);
    font-size: 16px;
    letter-spacing: 0.04em;
}

.qz-bar-name {
    font-family: var(--qz-display);
    font-size: 19px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.qz-bar-exit {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex: 0 0 auto;
    padding: 8px 12px;
    border-radius: var(--qz-radius-pill);
    color: var(--qz-text-dim);
    font-size: 13px;
    text-decoration: none;
    transition: color var(--qz-out) var(--qz-ease), background var(--qz-out) var(--qz-ease);
}

.qz-bar-exit:hover { color: var(--qz-text); background: rgba(255, 255, 255, 0.06); }

/* On a phone the label is noise; the icon alone reads as "leave". */
@media (max-width: 480px) {
    .qz-bar-exit span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
    .qz-bar-name { font-size: 17px; }
}
/* ==========================================================================
   Shell
   ========================================================================== */

.qz-shell {
    display: flex;
    flex-direction: column;
    min-height: calc(100vh - var(--qz-bar-h));
    min-height: calc(100dvh - var(--qz-bar-h));
    background:
        radial-gradient(900px 460px at 50% -10%, rgba(102, 166, 93, 0.14), transparent 70%),
        var(--qz-bg);
}

.qz-inner {
    width: 100%;
    max-width: var(--qz-max);
    margin: 0 auto;
    padding: 0 var(--qz-gutter);
}

/* ==========================================================================
   Header: back, progress, exit
   ========================================================================== */

.qz-header {
    position: sticky;
    top: 0;
    z-index: 20;
    padding: 12px 0 10px;
    background: linear-gradient(to bottom, var(--qz-bg) 72%, rgba(10, 10, 10, 0));
    backdrop-filter: blur(6px);
}

.qz-header-row {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 44px;
}

.qz-iconbtn {
    flex: 0 0 auto;
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--qz-border);
    border-radius: var(--qz-radius-pill);
    background: var(--qz-surface);
    color: var(--qz-text);
    font-size: 15px;
    cursor: pointer;
    transition: background var(--qz-out) var(--qz-ease), transform var(--qz-out) var(--qz-ease);
}

.qz-iconbtn:hover { background: var(--qz-surface-hover); }
.qz-iconbtn:active { transform: scale(0.94); }
.qz-iconbtn[hidden] { display: none; }

.qz-header-main { flex: 1 1 auto; min-width: 0; }

/* Section name, never "Question 12 of 40" */
.qz-section-name {
    font-family: var(--qz-display);
    font-size: 15px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--qz-primary);
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.qz-progress-track {
    position: relative;
    height: 4px;
    margin-top: 8px;
    border-radius: var(--qz-radius-pill);
    background: rgba(255, 255, 255, 0.08);
    overflow: hidden;
}

.qz-progress-fill {
    position: absolute;
    inset: 0;
    transform-origin: left center;
    transform: scaleX(0);
    border-radius: inherit;
    background: linear-gradient(90deg, var(--qz-primary-dark), var(--qz-primary));
    transition: transform 420ms var(--qz-ease);
}

/* Section pips - the meaningful progress signal for the long assessment */
.qz-pips {
    display: flex;
    gap: 5px;
    margin-top: 9px;
    list-style: none;
    padding: 0;
}

.qz-pip {
    flex: 1 1 0;
    height: 3px;
    border-radius: var(--qz-radius-pill);
    background: rgba(255, 255, 255, 0.10);
    transition: background var(--qz-in) var(--qz-ease);
}

.qz-pip.is-done { background: var(--qz-primary-dark); }
.qz-pip.is-current { background: var(--qz-primary); }

/* ==========================================================================
   Stage and screens
   ========================================================================== */

.qz-stage {
    position: relative;
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    padding-bottom: 8px;

    /* Screens slide in from translate3d(24px,0,0), so mid-transition the
       incoming screen sticks 24px past the right edge and the page becomes
       horizontally scrollable for ~280ms. Clipping here contains it.
       `clip` rather than `hidden`: hidden would make this a scroll container
       and break the sticky progress header and Continue button. clip pairs
       legally with overflow-y: visible and creates no scroll container. */
    overflow-x: clip;
}

.qz-screen {
    display: flex;
    flex-direction: column;
    padding: 16px 0 8px;
    animation: qz-in var(--qz-in) var(--qz-ease) both;
}

/* The outgoing screen is taken out of flow so the two never stack and
   push the page height around mid-transition. */
.qz-screen.is-leaving {
    position: absolute;
    inset: 0;
    pointer-events: none;
    animation: qz-out var(--qz-out) var(--qz-ease) both;
}

.qz-screen.is-back { animation-name: qz-in-back; }
.qz-screen.is-leaving.is-back { animation-name: qz-out-back; }

@keyframes qz-in {
    from { opacity: 0; transform: translate3d(24px, 0, 0); }
    to   { opacity: 1; transform: none; }
}

@keyframes qz-out {
    from { opacity: 1; transform: none; }
    to   { opacity: 0; transform: translate3d(-20px, 0, 0); }
}

@keyframes qz-in-back {
    from { opacity: 0; transform: translate3d(-24px, 0, 0); }
    to   { opacity: 1; transform: none; }
}

@keyframes qz-out-back {
    from { opacity: 1; transform: none; }
    to   { opacity: 0; transform: translate3d(20px, 0, 0); }
}

/* ==========================================================================
   Question head
   ========================================================================== */

.qz-fieldset {
    border: 0;
    margin: 0;
    padding: 0;
    min-width: 0;
}

.qz-legend {
    display: block;
    width: 100%;
    padding: 0;
}

.qz-eyebrow {
    display: inline-block;
    margin-bottom: 10px;
    padding: 5px 11px;
    border-radius: var(--qz-radius-pill);
    background: var(--qz-primary-soft);
    color: var(--qz-primary);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.qz-question {
    margin: 0 0 8px;
    font-family: var(--qz-display);
    font-size: clamp(28px, 8vw, 40px);
    line-height: 1.04;
    letter-spacing: 0.01em;
    text-transform: uppercase;
    color: var(--qz-text);
}

/* Long conversational prompts read badly in an all-caps condensed face. */
.qz-question.is-long {
    font-family: var(--qz-body);
    font-size: clamp(21px, 5.4vw, 27px);
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: -0.01em;
    text-transform: none;
}

.qz-sub {
    margin: 0 0 4px;
    font-size: 15px;
    line-height: 1.5;
    color: var(--qz-text-muted);
}

.qz-help {
    margin: 8px 0 0;
    font-size: 13px;
    line-height: 1.5;
    color: var(--qz-text-dim);
}

.qz-head { margin-bottom: 20px; }

.qz-media {
    margin: 0 0 18px;
    border-radius: var(--qz-radius-lg);
    overflow: hidden;
    background: var(--qz-surface);
    aspect-ratio: 16 / 9;
}

.qz-media img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ==========================================================================
   Options
   ========================================================================== */

.qz-options {
    display: grid;
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.qz-options.is-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.qz-options.is-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.qz-option {
    position: relative;
    display: flex;
    align-items: center;
    gap: 14px;
    min-height: 60px;
    padding: 14px 52px 14px 16px;
    border: 1.5px solid var(--qz-border);
    border-radius: var(--qz-radius);
    background: var(--qz-surface);
    cursor: pointer;
    transition:
        border-color var(--qz-out) var(--qz-ease),
        background var(--qz-out) var(--qz-ease),
        transform var(--qz-out) var(--qz-ease);
    -webkit-tap-highlight-color: transparent;
}

.qz-option:hover { background: var(--qz-surface-hover); border-color: var(--qz-border-strong); }
.qz-option:active { transform: scale(0.985); }

.qz-option input {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
    pointer-events: none;
}

.qz-option-body { flex: 1 1 auto; min-width: 0; }

.qz-option-label {
    display: block;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.3;
}

.qz-option-desc {
    display: block;
    margin-top: 3px;
    font-size: 13px;
    line-height: 1.4;
    color: var(--qz-text-muted);
}

.qz-option-icon {
    flex: 0 0 auto;
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 11px;
    background: var(--qz-primary-soft);
    color: var(--qz-primary);
    font-size: 17px;
}

.qz-option-icon svg { width: 26px; height: 26px; }

/* Selected state + the check that confirms the tap */
.qz-option-check {
    position: absolute;
    top: 50%;
    right: 15px;
    width: 24px;
    height: 24px;
    margin-top: -12px;
    border: 1.5px solid var(--qz-border-strong);
    border-radius: 50%;
    transition: border-color var(--qz-out) var(--qz-ease), background var(--qz-out) var(--qz-ease);
}

.qz-option-check::after {
    content: '';
    position: absolute;
    top: 5px;
    left: 8px;
    width: 5px;
    height: 10px;
    border: solid #0a0a0a;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg) scale(0);
    transition: transform 180ms var(--qz-ease);
}

.qz-option.is-selected {
    border-color: var(--qz-primary);
    background: var(--qz-primary-soft);
}

.qz-option.is-selected .qz-option-check {
    border-color: var(--qz-primary);
    background: var(--qz-primary);
}

.qz-option.is-selected .qz-option-check::after { transform: rotate(45deg) scale(1); }

.qz-option.is-selected .qz-option-icon {
    background: var(--qz-primary);
    color: #0a0a0a;
}

/* Keyboard focus must be obvious without being permanently visible on tap */
.qz-option input:focus-visible + .qz-option-inner,
.qz-option:has(input:focus-visible) {
    outline: 2px solid var(--qz-primary);
    outline-offset: 2px;
}

/* --- Image / illustration cards ------------------------------------------ */

.qz-options.is-visual { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }

.qz-options.is-visual .qz-option {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0;
    min-height: 0;
    overflow: hidden;
}

.qz-options.is-visual .qz-option-figure {
    position: relative;
    aspect-ratio: 4 / 3;
    background: linear-gradient(160deg, #1f1f1f, #141414);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.qz-options.is-visual .qz-option-figure img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.qz-options.is-visual .qz-option-figure svg {
    width: 62%;
    height: 62%;
    color: var(--qz-primary);
}

.qz-options.is-visual .qz-option-figure i {
    font-size: 34px;
    color: var(--qz-primary);
}

.qz-options.is-visual .qz-option-body { padding: 11px 13px 13px; }
.qz-options.is-visual .qz-option-label { font-size: 14px; }

.qz-options.is-visual .qz-option-check {
    top: 9px;
    right: 9px;
    margin-top: 0;
    background: rgba(10, 10, 10, 0.72);
}

/* --- Compact tiles (equipment) -------------------------------------------- */

.qz-options.is-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }

.qz-options.is-tiles .qz-option {
    flex-direction: column;
    gap: 8px;
    min-height: 96px;
    padding: 14px 8px 12px;
    text-align: center;
}

.qz-options.is-tiles .qz-option-label { font-size: 12px; font-weight: 600; line-height: 1.25; }
.qz-options.is-tiles .qz-option-icon { width: 34px; height: 34px; font-size: 15px; }
.qz-options.is-tiles .qz-option-icon svg { width: 21px; height: 21px; }

.qz-options.is-tiles .qz-option-check {
    top: 7px;
    right: 7px;
    width: 19px;
    height: 19px;
    margin-top: 0;
}

.qz-options.is-tiles .qz-option-check::after { top: 3px; left: 6px; width: 4px; height: 8px; }

/* --- Yes / No ------------------------------------------------------------- */

.qz-options.is-binary { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.qz-options.is-binary .qz-option {
    justify-content: center;
    padding: 20px 12px;
    min-height: 76px;
}

.qz-options.is-binary .qz-option-body { flex: 0 0 auto; text-align: center; }
.qz-options.is-binary .qz-option-label { font-family: var(--qz-display); font-size: 24px; letter-spacing: 0.05em; }
.qz-options.is-binary .qz-option-check { display: none; }

/* ==========================================================================
   Inputs
   ========================================================================== */

.qz-field { display: flex; flex-direction: column; gap: 8px; }

.qz-label {
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: var(--qz-text-muted);
}

.qz-input,
.qz-textarea,
.qz-select {
    width: 100%;
    padding: 15px 16px;
    border: 1.5px solid var(--qz-border);
    border-radius: var(--qz-radius);
    background: var(--qz-surface);
    color: var(--qz-text);
    font-family: var(--qz-body);
    font-size: 16px; /* 16px stops iOS zooming on focus */
    line-height: 1.4;
    transition: border-color var(--qz-out) var(--qz-ease), box-shadow var(--qz-out) var(--qz-ease);
}

.qz-input::placeholder,
.qz-textarea::placeholder { color: var(--qz-text-dim); }

.qz-input:focus,
.qz-textarea:focus,
.qz-select:focus {
    outline: none;
    border-color: var(--qz-primary);
    box-shadow: 0 0 0 3px var(--qz-primary-glow);
}

.qz-textarea { min-height: 132px; resize: vertical; }

.qz-counter { align-self: flex-end; font-size: 12px; color: var(--qz-text-dim); }

/* --- Measurement ---------------------------------------------------------- */

.qz-units {
    display: inline-flex;
    padding: 4px;
    border: 1px solid var(--qz-border);
    border-radius: var(--qz-radius-pill);
    background: var(--qz-surface);
    align-self: flex-start;
}

.qz-unit {
    padding: 8px 18px;
    border: 0;
    border-radius: var(--qz-radius-pill);
    background: transparent;
    color: var(--qz-text-muted);
    font-family: var(--qz-body);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background var(--qz-out) var(--qz-ease), color var(--qz-out) var(--qz-ease);
}

.qz-unit.is-active { background: var(--qz-primary); color: #0a0a0a; }

.qz-measure { display: flex; gap: 10px; }
.qz-measure .qz-field { flex: 1 1 0; }

.qz-suffix { position: relative; }

.qz-suffix .qz-input { padding-right: 54px; }

.qz-suffix::after {
    content: attr(data-suffix);
    position: absolute;
    top: 50%;
    right: 16px;
    transform: translateY(-50%);
    font-size: 14px;
    font-weight: 600;
    color: var(--qz-text-dim);
    pointer-events: none;
}

/* --- Slider / rating ------------------------------------------------------ */

.qz-scale { padding: 6px 0 2px; }

.qz-scale-value {
    display: block;
    text-align: center;
    font-family: var(--qz-display);
    font-size: 62px;
    line-height: 1;
    color: var(--qz-primary);
}

.qz-scale-value small { font-size: 22px; color: var(--qz-text-dim); }

.qz-range {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 40px;
    margin: 10px 0 4px;
    background: transparent;
    cursor: pointer;
}

.qz-range::-webkit-slider-runnable-track {
    height: 6px;
    border-radius: var(--qz-radius-pill);
    background: rgba(255, 255, 255, 0.10);
}

.qz-range::-moz-range-track {
    height: 6px;
    border-radius: var(--qz-radius-pill);
    background: rgba(255, 255, 255, 0.10);
}

.qz-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 30px;
    height: 30px;
    margin-top: -12px;
    border: 3px solid #0a0a0a;
    border-radius: 50%;
    background: var(--qz-primary);
    box-shadow: 0 0 0 1px var(--qz-primary);
}

.qz-range::-moz-range-thumb {
    width: 30px;
    height: 30px;
    border: 3px solid #0a0a0a;
    border-radius: 50%;
    background: var(--qz-primary);
}

.qz-scale-ends {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: var(--qz-text-dim);
}

/* --- Day selector --------------------------------------------------------- */

.qz-days {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 5px;
}

.qz-day {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    min-height: 62px;
    padding: 8px 2px;
    border: 1.5px solid var(--qz-border);
    border-radius: 11px;
    background: var(--qz-surface);
    cursor: pointer;
    transition: border-color var(--qz-out) var(--qz-ease), background var(--qz-out) var(--qz-ease);
    -webkit-tap-highlight-color: transparent;
}

.qz-day input { position: absolute; opacity: 0; width: 1px; height: 1px; }

.qz-day-abbr {
    font-family: var(--qz-display);
    font-size: 16px;
    letter-spacing: 0.04em;
}

.qz-day-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.16);
    transition: background var(--qz-out) var(--qz-ease);
}

.qz-day.is-selected {
    border-color: var(--qz-primary);
    background: var(--qz-primary-soft);
    color: var(--qz-primary);
}

.qz-day.is-selected .qz-day-dot { background: var(--qz-primary); }

/* --- Contact -------------------------------------------------------------- */

.qz-contact { display: flex; flex-direction: column; gap: 14px; }
.qz-contact-row { display: flex; gap: 10px; }
.qz-contact-row .qz-field { flex: 1 1 0; }

.qz-consent {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 13px 14px;
    border: 1px solid var(--qz-border);
    border-radius: var(--qz-radius);
    background: var(--qz-surface);
    cursor: pointer;
}

.qz-consent input {
    flex: 0 0 auto;
    width: 21px;
    height: 21px;
    margin: 1px 0 0;
    accent-color: var(--qz-primary);
    cursor: pointer;
}

.qz-consent span { font-size: 13px; line-height: 1.5; color: var(--qz-text-muted); }
.qz-consent a { color: var(--qz-primary); }

/* Honeypot - never shown, never announced */
.qz-hp {
    position: absolute !important;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

/* ==========================================================================
   Footer / actions
   ========================================================================== */

.qz-footer {
    position: sticky;
    bottom: 0;
    z-index: 15;
    padding: 14px 0 calc(14px + env(safe-area-inset-bottom, 0px));
    background: linear-gradient(to top, var(--qz-bg) 62%, rgba(10, 10, 10, 0));
}

.qz-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    min-height: 56px;
    padding: 16px 24px;
    border: 0;
    border-radius: var(--qz-radius);
    background: var(--qz-primary);
    color: #07130a;
    font-family: var(--qz-display);
    font-size: 21px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    text-decoration: none;
    cursor: pointer;
    transition: background var(--qz-out) var(--qz-ease), transform var(--qz-out) var(--qz-ease), opacity var(--qz-out) var(--qz-ease);
}

.qz-btn:hover { background: #74b96a; }
.qz-btn:active { transform: scale(0.985); }

.qz-btn[disabled] { opacity: 0.4; cursor: not-allowed; }
.qz-btn[disabled]:active { transform: none; }

.qz-btn-ghost {
    background: transparent;
    border: 1.5px solid var(--qz-border-strong);
    color: var(--qz-text);
}

.qz-btn-ghost:hover { background: var(--qz-surface); }

.qz-btn-text {
    display: block;
    width: 100%;
    margin-top: 10px;
    padding: 10px;
    border: 0;
    background: none;
    color: var(--qz-text-dim);
    font-family: var(--qz-body);
    font-size: 14px;
    text-decoration: underline;
    text-underline-offset: 3px;
    cursor: pointer;
}

.qz-error {
    margin: 12px 0 0;
    padding: 11px 14px;
    border: 1px solid rgba(255, 82, 82, 0.4);
    border-radius: var(--qz-radius);
    background: rgba(255, 82, 82, 0.10);
    color: #ffb4b4;
    font-size: 14px;
    line-height: 1.45;
}

.qz-saving {
    position: fixed;
    left: 50%;
    bottom: calc(88px + env(safe-area-inset-bottom, 0px));
    transform: translateX(-50%) translateY(8px);
    z-index: 40;
    padding: 7px 15px;
    border-radius: var(--qz-radius-pill);
    background: rgba(26, 26, 26, 0.96);
    border: 1px solid var(--qz-border);
    color: var(--qz-text-muted);
    font-size: 12.5px;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--qz-in) var(--qz-ease), transform var(--qz-in) var(--qz-ease);
}

.qz-saving.is-visible { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ==========================================================================
   Interstitial + intro
   ========================================================================== */

.qz-interstitial {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1 1 auto;
    min-height: 46vh;
    text-align: center;
    padding: 30px 0;
}

.qz-interstitial-mark {
    width: 68px;
    height: 68px;
    margin-bottom: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--qz-primary-soft);
    color: var(--qz-primary);
    font-size: 27px;
    animation: qz-pop 460ms var(--qz-ease) both;
}

@keyframes qz-pop {
    from { opacity: 0; transform: scale(0.72); }
    to   { opacity: 1; transform: none; }
}

.qz-interstitial h2 {
    margin: 0 0 10px;
    font-family: var(--qz-display);
    font-size: clamp(30px, 8.5vw, 42px);
    line-height: 1.05;
    text-transform: uppercase;
}

.qz-interstitial p {
    margin: 0;
    max-width: 30ch;
    font-size: 16px;
    line-height: 1.55;
    color: var(--qz-text-muted);
}

/* ==========================================================================
   Analysing sequence
   ========================================================================== */

.qz-analysing {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1 1 auto;
    min-height: 60vh;
    text-align: center;
    padding: 30px 0;
}

.qz-ring { position: relative; width: 132px; height: 132px; margin-bottom: 28px; }
.qz-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.qz-ring circle { fill: none; stroke-width: 6; stroke-linecap: round; }
.qz-ring .qz-ring-bg { stroke: rgba(255, 255, 255, 0.09); }

.qz-ring .qz-ring-fg {
    stroke: var(--qz-primary);
    stroke-dasharray: 383;
    stroke-dashoffset: 383;
    transition: stroke-dashoffset 600ms linear;
}

.qz-ring-pct {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--qz-display);
    font-size: 34px;
    color: var(--qz-text);
}

.qz-steps { list-style: none; margin: 0; padding: 0; width: 100%; max-width: 330px; }

.qz-step {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 2px;
    font-size: 15px;
    color: var(--qz-text-dim);
    opacity: 0.45;
    transition: opacity var(--qz-in) var(--qz-ease), color var(--qz-in) var(--qz-ease);
}

.qz-step.is-active { opacity: 1; color: var(--qz-text); }
.qz-step.is-done { opacity: 1; color: var(--qz-text-muted); }

.qz-step-mark {
    flex: 0 0 auto;
    width: 22px;
    height: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1.5px solid var(--qz-border-strong);
    border-radius: 50%;
    font-size: 11px;
    color: transparent;
    transition: background var(--qz-out) var(--qz-ease), border-color var(--qz-out) var(--qz-ease), color var(--qz-out) var(--qz-ease);
}

.qz-step.is-done .qz-step-mark {
    background: var(--qz-primary);
    border-color: var(--qz-primary);
    color: #0a0a0a;
}

.qz-step.is-active .qz-step-mark { border-color: var(--qz-primary); }

/* ==========================================================================
   Intro screen
   ========================================================================== */

.qz-intro { display: flex; flex-direction: column; min-height: calc(100dvh - var(--qz-bar-h)); }
.qz-intro-body { flex: 1 1 auto; display: flex; flex-direction: column; justify-content: center; padding: 34px 0 20px; }

.qz-intro-figure {
    margin: 0 0 24px;
    border-radius: var(--qz-radius-lg);
    overflow: hidden;
    aspect-ratio: 16 / 10;
    background: linear-gradient(150deg, #1c1c1c, #101010);
    display: flex;
    align-items: center;
    justify-content: center;
}

.qz-intro-figure img { width: 100%; height: 100%; object-fit: cover; }
.qz-intro-figure svg { width: 74%; height: 74%; color: var(--qz-primary); }

.qz-intro h1 {
    margin: 0 0 12px;
    font-family: var(--qz-display);
    font-size: clamp(36px, 11vw, 56px);
    line-height: 0.98;
    text-transform: uppercase;
}

.qz-intro-sub {
    margin: 0 0 22px;
    font-size: 16.5px;
    line-height: 1.55;
    color: var(--qz-text-muted);
}

.qz-bullets { list-style: none; margin: 0 0 26px; padding: 0; display: flex; flex-direction: column; gap: 10px; }

.qz-bullet {
    display: flex;
    align-items: center;
    gap: 11px;
    font-size: 14.5px;
    color: var(--qz-text-muted);
}

.qz-bullet i { color: var(--qz-primary); width: 17px; text-align: center; }

.qz-resume {
    margin-bottom: 16px;
    padding: 14px 16px;
    border: 1px solid var(--qz-primary);
    border-radius: var(--qz-radius);
    background: var(--qz-primary-soft);
    font-size: 14px;
    line-height: 1.5;
}

.qz-resume a { color: var(--qz-primary); font-weight: 700; }

.qz-legal { margin: 14px 0 0; font-size: 12px; line-height: 1.5; color: var(--qz-text-dim); text-align: center; }
.qz-legal a { color: var(--qz-text-muted); }

/* ==========================================================================
   Result
   ========================================================================== */

.qz-result { padding: 26px 0 40px; }

.qz-result-eyebrow {
    display: block;
    margin-bottom: 8px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--qz-primary);
}

.qz-result h1 {
    margin: 0 0 20px;
    font-family: var(--qz-display);
    font-size: clamp(32px, 9.5vw, 48px);
    line-height: 1;
    text-transform: uppercase;
}

.qz-card {
    border: 1px solid var(--qz-border);
    border-radius: var(--qz-radius-lg);
    background: var(--qz-bg-raised);
    overflow: hidden;
    animation: qz-rise 460ms var(--qz-ease) both;
}

@keyframes qz-rise {
    from { opacity: 0; transform: translate3d(0, 16px, 0); }
    to   { opacity: 1; transform: none; }
}

.qz-card-figure { position: relative; aspect-ratio: 16 / 9; background: linear-gradient(150deg, #1f1f1f, #121212); }
.qz-card-figure img { width: 100%; height: 100%; object-fit: cover; }

.qz-match {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 7px 13px;
    border-radius: var(--qz-radius-pill);
    background: var(--qz-primary);
    color: #07130a;
    font-family: var(--qz-display);
    font-size: 16px;
    letter-spacing: 0.05em;
}

.qz-card-body { padding: 20px 18px 22px; }

.qz-card-title {
    margin: 0 0 8px;
    font-family: var(--qz-display);
    font-size: clamp(25px, 7vw, 32px);
    line-height: 1.05;
    text-transform: uppercase;
}

.qz-card-blurb { margin: 0 0 18px; font-size: 15px; line-height: 1.55; color: var(--qz-text-muted); }

.qz-reasons { list-style: none; margin: 0 0 20px; padding: 0; display: flex; flex-direction: column; gap: 9px; }

.qz-reason {
    display: flex;
    gap: 11px;
    align-items: flex-start;
    font-size: 14.5px;
    line-height: 1.45;
    animation: qz-rise 420ms var(--qz-ease) both;
}

.qz-reason i { color: var(--qz-primary); margin-top: 2px; }

/* Staggered so the reasons read as they appear */
.qz-reason:nth-child(1) { animation-delay: 80ms; }
.qz-reason:nth-child(2) { animation-delay: 150ms; }
.qz-reason:nth-child(3) { animation-delay: 220ms; }
.qz-reason:nth-child(4) { animation-delay: 290ms; }
.qz-reason:nth-child(5) { animation-delay: 360ms; }
.qz-reason:nth-child(6) { animation-delay: 430ms; }

.qz-specs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1px;
    margin: 0 0 20px;
    border: 1px solid var(--qz-border);
    border-radius: var(--qz-radius);
    background: var(--qz-border);
    overflow: hidden;
}

.qz-spec { padding: 12px 13px; background: var(--qz-surface); }
.qz-spec dt { font-size: 11px; letter-spacing: 0.09em; text-transform: uppercase; color: var(--qz-text-dim); }
.qz-spec dd { margin: 4px 0 0; font-size: 15px; font-weight: 600; }

.qz-price { display: flex; align-items: baseline; gap: 10px; margin-bottom: 16px; }
.qz-price-now { font-family: var(--qz-display); font-size: 38px; line-height: 1; color: var(--qz-primary); }
.qz-price-was { font-size: 17px; color: var(--qz-text-dim); text-decoration: line-through; }

.qz-alts { margin-top: 30px; }

.qz-alts h2 {
    margin: 0 0 14px;
    font-family: var(--qz-display);
    font-size: 22px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--qz-text-muted);
}

.qz-alt {
    display: flex;
    gap: 13px;
    align-items: center;
    padding: 12px;
    margin-bottom: 9px;
    border: 1px solid var(--qz-border);
    border-radius: var(--qz-radius);
    background: var(--qz-surface);
    color: inherit;
    text-decoration: none;
    transition: border-color var(--qz-out) var(--qz-ease), background var(--qz-out) var(--qz-ease);
}

.qz-alt:hover { border-color: var(--qz-border-strong); background: var(--qz-surface-hover); }

.qz-alt-thumb {
    flex: 0 0 auto;
    width: 62px;
    height: 62px;
    border-radius: 10px;
    object-fit: cover;
    background: #1f1f1f;
}

.qz-alt-body { flex: 1 1 auto; min-width: 0; }
.qz-alt-title { font-size: 15px; font-weight: 700; line-height: 1.25; }
.qz-alt-meta { margin-top: 3px; font-size: 12.5px; color: var(--qz-text-dim); }
.qz-alt-match { flex: 0 0 auto; font-family: var(--qz-display); font-size: 19px; color: var(--qz-primary); }

.qz-upsell {
    margin-top: 30px;
    padding: 22px 18px;
    border: 1px solid var(--qz-border);
    border-radius: var(--qz-radius-lg);
    background: linear-gradient(155deg, rgba(102, 166, 93, 0.13), rgba(20, 20, 20, 0.6));
    text-align: center;
}

.qz-upsell h2 {
    margin: 0 0 9px;
    font-family: var(--qz-display);
    font-size: 26px;
    line-height: 1.1;
    text-transform: uppercase;
}

.qz-upsell p { margin: 0 0 16px; font-size: 14.5px; line-height: 1.55; color: var(--qz-text-muted); }


/* ==========================================================================
   Mobile hardening
   --------------------------------------------------------------------------
   Verified by measuring real box widths at 320 / 360 / 390px rather than by
   eyeballing the media queries.
   ========================================================================== */

/* Any single long token - a pasted URL in a textarea, a long email echoed on
   the result page, a German compound noun - would otherwise push the whole
   layout sideways. Nothing else in the funnel scrolls horizontally, so one
   overflowing word is the entire risk. */
.qz-question,
.qz-sub,
.qz-help,
.qz-eyebrow,
.qz-label,
.qz-option-label,
.qz-option-desc,
.qz-interstitial h2,
.qz-interstitial p,
.qz-step,
.qz-card-title,
.qz-card-blurb,
.qz-reason,
.qz-spec dd,
.qz-alt-title,
.qz-alt-meta,
.qz-upsell h2,
.qz-upsell p,
.qz-legal,
.qz-error,
.qz-consent span,
.qz-result h1,
.qz-intro h1,
.qz-intro-sub,
.qz-bullet {
    overflow-wrap: break-word;
}

/* The week strip is the one grid that cannot honour a 44px target at seven
   columns: at 320px each day is 35.7px, and at 360px still only 41.4px.
   Four columns over two rows gives ~66px instead. Availability appears in
   both funnels, so this is worth the extra row. */
@media (max-width: 400px) {
    .qz-days {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

/* Below ~360px the two-up name fields get tight; stacking reads better than
   two cramped boxes. */
@media (max-width: 359px) {
    .qz-contact-row { flex-direction: column; }
    .qz-measure { flex-direction: column; }
}
/* ==========================================================================
   Desktop
   ========================================================================== */

@media (min-width: 720px) {
    .qz { --qz-gutter: 32px; }

    .qz-options.is-visual { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .qz-options.is-tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); }

    .qz-screen { padding-top: 26px; }

    /* The footer stops being sticky once there is room for it in flow. */
    .qz-footer { position: static; background: none; padding-top: 22px; }
    .qz-btn { width: auto; min-width: 280px; }
    .qz-btn-text { width: auto; text-align: left; }

    .qz-specs { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (min-width: 1040px) {
    /* Wider canvas, but the cards themselves stay a comfortable reading width
       rather than stretching across the viewport. */
    .qz { --qz-max: 720px; }
    .qz-question { font-size: 44px; }
}

/* ==========================================================================
   Reduced motion
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
    .qz,
    .qz * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

    .qz-screen,
    .qz-screen.is-leaving {
        animation: none;
    }

    .qz-screen.is-leaving { opacity: 0; }
}

/* ==========================================================================
   Print - a lead may want a copy of their result
   ========================================================================== */

@media print {
    .qz-header,
    .qz-footer,
    .qz-saving { display: none !important; }

    .qz,
    .qz-shell { background: #fff; color: #000; }
}
