/* assets/css/questionnaire-v2.css
   Questionnaire redesign (v2) — shared visual system for all five tools.
   Layers on top of style.css + wizard.css. Everything is namespaced .qn-*.
   Loaded by layout/questionnaire-shell.php. */

/* ---------- Page ---------- */

body.qn-page {
    background: #EEF2F8;
    color: var(--color-text-main, #0F172A);
    font-family: var(--font-sans, "DM Sans", ui-sans-serif, system-ui, sans-serif);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ---------- Co-brand header bar ---------- */

.qn-header {
    background: #fff;
    border-bottom: 1px solid #E9EEF5;
    position: sticky;
    top: 0;
    z-index: 40;
}

.qn-header-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 12px 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.qn-header-left,
.qn-header-right {
    display: flex;
    align-items: center;
    gap: 16px;
    min-width: 0;
}

.qn-header-right {
    flex: 0 0 auto;
}

.qn-header-brand {
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
}

.qn-header-logo {
    height: 34px;
    width: auto;
    display: block;
}

.qn-header-divider {
    width: 1px;
    height: 34px;
    background: #E2E8F0;
    flex: 0 0 auto;
}

.qn-header-divider--sm {
    height: 30px;
    background: #E9EEF5;
}

.qn-cobrand {
    display: flex;
    align-items: center;
    gap: 11px;
    min-width: 0;
}

.qn-cobrand-badge {
    width: 38px;
    height: 38px;
    border-radius: 11px;
    background: linear-gradient(135deg, #0F172A, #1D4ED8);
    color: #fff;
    font-weight: 900;
    font-size: .82rem;
    letter-spacing: .02em;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    box-shadow: 0 6px 14px -6px rgba(29, 78, 216, .6);
}

.qn-cobrand-text {
    min-width: 0;
    line-height: 1.2;
    display: block;
}

.qn-cobrand-eyebrow {
    display: block;
    font-size: .6rem;
    font-weight: 800;
    letter-spacing: .09em;
    text-transform: uppercase;
    color: #94A3B8;
}

.qn-cobrand-name {
    display: block;
    font-size: .96rem;
    font-weight: 800;
    color: #0F172A;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.qn-save-exit {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #fff;
    color: #334155;
    font-weight: 700;
    font-size: .9rem;
    font-family: inherit;
    padding: 9px 16px;
    border-radius: 10px;
    border: 1.5px solid #E2E8F0;
    cursor: pointer;
    text-decoration: none;
    transition: background .15s, border-color .15s;
}

.qn-save-exit:hover {
    background: #F8FAFF;
    border-color: #CBD5E1;
    color: #334155;
}

.qn-header-guest-note {
    font-size: .84rem;
    color: #64748B;
    font-weight: 600;
    max-width: 340px;
    text-align: right;
    line-height: 1.35;
}

.qn-header-guest-note strong {
    color: #0F172A;
    font-weight: 800;
}

.qn-header-account {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.qn-header-account-text {
    text-align: right;
    line-height: 1.25;
    display: block;
    min-width: 0;
}

.qn-header-account-name {
    display: block;
    font-size: .88rem;
    font-weight: 800;
    color: #0F172A;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.qn-header-account-email {
    display: block;
    font-size: .72rem;
    font-weight: 600;
    color: #94A3B8;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.qn-header-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #0EA5A4, #2563EB);
    color: #fff;
    font-weight: 800;
    font-size: .84rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
}

/* ---------- Page layout: main + sidebar ---------- */

.qn-main {
    flex: 1;
    max-width: 1280px;
    width: 100%;
    margin: 0 auto;
    padding: 40px 32px 64px;
}

.qn-page-heading {
    margin-bottom: 26px;
}

.qn-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(37, 99, 235, .1);
    color: var(--color-primary, #2563EB);
    font-size: .68rem;
    font-weight: 800;
    letter-spacing: .1em;
    text-transform: uppercase;
    margin-bottom: 14px;
}

.qn-title {
    font-size: 2.05rem;
    font-weight: 800;
    letter-spacing: -.02em;
    margin: 0 0 6px;
    color: #0F172A;
}

.qn-subtitle {
    color: #64748B;
    font-size: 1.02rem;
    margin: 0;
    max-width: 640px;
}

.qn-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 372px;
    gap: 28px;
    align-items: start;
}

.qn-sidebar {
    position: sticky;
    top: 96px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* ---------- Form card ---------- */

.qn-card {
    background: #fff;
    border: 1px solid #E9EEF5;
    border-radius: 22px;
    box-shadow: 0 24px 50px -26px rgba(15, 23, 42, .22), 0 2px 6px -2px rgba(15, 23, 42, .06);
    overflow: hidden;
}

.qn-card .wizard-card {
    border: none;
    border-radius: 0;
    box-shadow: none;
}

/* Step heading block inside the card (tool pages render one per screen). */
.qn-step-eyebrow {
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--color-primary, #2563EB);
    margin-bottom: 6px;
}

.qn-step-title {
    font-size: 1.55rem;
    font-weight: 800;
    letter-spacing: -.02em;
    margin: 0 0 6px;
    color: #0F172A;
}

.qn-step-desc {
    color: #64748B;
    font-size: .96rem;
    margin: 0 0 26px;
    max-width: 620px;
}

/* ---------- Stepper (restyles the wizard.js-generated stepper) ---------- */

.qn-card .wizard-stepper-container {
    padding: 26px 34px 24px;
    background: linear-gradient(180deg, #F8FAFF, #fff);
    border-bottom: 1px solid #EEF2F8;
}

.qn-card .wizard-stepper {
    max-width: none;
}

.qn-card .wizard-stepper::before {
    display: none;
}

.qn-card .wizard-step-indicator {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    cursor: pointer;
}

/* Connector line to the next node. */
.qn-card .wizard-step-indicator::before {
    content: "";
    position: absolute;
    top: 15px;
    left: 50%;
    width: 100%;
    height: 2.5px;
    border-radius: 2px;
    background: #E2E8F0;
    z-index: 0;
}

.qn-card .wizard-step-indicator:last-child::before {
    display: none;
}

.qn-card .wizard-step-indicator.completed::before {
    background: var(--color-primary, #2563EB);
}

.qn-card .wizard-step-dot {
    position: relative;
    z-index: 1;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: .92rem;
    transition: all .2s;
    background: #fff;
    color: #94A3B8;
    border: 2px solid #E2E8F0;
    box-shadow: none;
}

.qn-card .wizard-step-indicator.active .wizard-step-dot {
    background: var(--color-primary, #2563EB);
    color: #fff;
    border-color: var(--color-primary, #2563EB);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, .15);
}

.qn-card .wizard-step-indicator.completed .wizard-step-dot {
    background: var(--color-primary, #2563EB);
    border-color: var(--color-primary, #2563EB);
    color: transparent;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'><path d='M5 12l4 4 10-10'/></svg>");
    background-repeat: no-repeat;
    background-position: center;
}

/* Hide any inline SVG/number when the checkmark background shows. */
.qn-card .wizard-step-indicator.completed .wizard-step-dot svg {
    visibility: hidden;
}

.qn-card .wizard-step-label {
    margin-top: 9px;
    font-size: .82rem;
    font-weight: 700;
    text-align: center;
    line-height: 1.2;
    color: #94A3B8;
}

.qn-card .wizard-step-indicator.active .wizard-step-label {
    color: var(--color-primary, #2563EB);
}

.qn-card .wizard-step-indicator.completed .wizard-step-label {
    color: #334155;
}

/* "Your section" badge for collaborators (soft guidance). */
.qn-your-section {
    display: inline-block;
    margin-top: 5px;
    padding: 2px 8px;
    border-radius: 999px;
    background: rgba(20, 184, 166, .12);
    border: 1px solid rgba(20, 184, 166, .35);
    color: #0F766E;
    font-size: .6rem;
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase;
}

/* Compact "Step X of Y" + bar — shown only on mobile (see media query). */
.qn-step-compact {
    display: none;
    padding: 16px 20px 14px;
    background: linear-gradient(180deg, #F8FAFF, #fff);
    border-bottom: 1px solid #EEF2F8;
}

.qn-step-compact-label {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    font-size: .78rem;
    font-weight: 800;
    color: var(--color-primary, #2563EB);
    letter-spacing: .06em;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.qn-step-compact-title {
    color: #0F172A;
    text-transform: none;
    letter-spacing: 0;
    font-size: .92rem;
}

.qn-step-compact-bar {
    height: 6px;
    border-radius: 999px;
    background: #E9EEF5;
    overflow: hidden;
}

.qn-step-compact-fill {
    height: 100%;
    border-radius: 999px;
    background: var(--color-primary, #2563EB);
    width: 0;
    transition: width .3s ease;
}

/* ---------- Collaborator "your sections" banner ---------- */

.qn-collab-banner {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 0 0 18px;
    padding: 13px 16px;
    border-radius: 13px;
    background: rgba(20, 184, 166, .08);
    border: 1px solid rgba(20, 184, 166, .3);
    color: #0F766E;
    font-size: .88rem;
    font-weight: 600;
    line-height: 1.45;
}

.qn-collab-banner strong {
    font-weight: 800;
}

/* ---------- Autosave chip ---------- */

.qn-autosave {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #fff;
    border: 1px solid #E9EEF5;
    border-radius: 13px;
    padding: 11px 15px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
}

.qn-autosave[hidden] {
    display: none;
}

.qn-autosave-state {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: .82rem;
    font-weight: 700;
    color: #64748B;
}

.qn-autosave-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #CBD5E1;
    flex: 0 0 auto;
}

.qn-autosave-time {
    font-size: .75rem;
    color: #94A3B8;
    font-weight: 600;
    white-space: nowrap;
}

@keyframes qn-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: .4; transform: scale(.7); }
}

.qn-autosave.is-saving .qn-autosave-state { color: var(--color-primary, #2563EB); }
.qn-autosave.is-saving .qn-autosave-dot {
    background: var(--color-primary, #2563EB);
    animation: qn-pulse 1.4s ease infinite;
}

.qn-autosave.is-saved .qn-autosave-state { color: #047857; }
.qn-autosave.is-saved .qn-autosave-dot { background: #10B981; }

.qn-autosave.is-error .qn-autosave-state { color: #DC2626; }
.qn-autosave.is-error .qn-autosave-dot { background: #DC2626; }

.qn-autosave.is-offline .qn-autosave-state { color: #B45309; }
.qn-autosave.is-offline .qn-autosave-dot { background: #F59E0B; }

.qn-autosave-retry {
    background: none;
    border: none;
    color: var(--color-primary, #2563EB);
    font-weight: 700;
    font-size: .78rem;
    font-family: inherit;
    cursor: pointer;
    padding: 0;
    margin-left: 8px;
    text-decoration: underline;
}

/* ---------- Live preview card + progress ring ---------- */

.qn-preview-card {
    background: #fff;
    border: 1px solid #E9EEF5;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 20px 40px -24px rgba(15, 23, 42, .2), 0 2px 6px -2px rgba(15, 23, 42, .05);
}

.qn-preview-hero {
    background: linear-gradient(118deg, #0F172A 0%, #17408f 60%, #1D4ED8 100%);
    padding: 20px 22px;
    position: relative;
    overflow: hidden;
}

.qn-preview-hero::after {
    content: "";
    position: absolute;
    top: -60px;
    right: -40px;
    width: 180px;
    height: 180px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(20, 184, 166, .25), transparent 68%);
    pointer-events: none;
}

.qn-preview-live {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
}

.qn-preview-live-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #5eead4;
    animation: qn-pulse 1.8s ease infinite;
}

.qn-preview-live-label {
    color: #5eead4;
    font-size: .64rem;
    font-weight: 800;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.qn-preview-hero-row {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 16px;
}

.qn-ring {
    position: relative;
    width: 88px;
    height: 88px;
    flex: 0 0 auto;
}

.qn-ring svg {
    transform: rotate(-90deg);
    display: block;
}

.qn-ring-track {
    fill: none;
    stroke: rgba(255, 255, 255, .12);
    stroke-width: 8;
}

.qn-ring-fill {
    fill: none;
    stroke: #5eead4;
    stroke-width: 8;
    stroke-linecap: round;
    transition: stroke-dasharray .5s ease;
}

.qn-ring-center {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.qn-ring-value {
    font-size: 1.5rem;
    font-weight: 900;
    color: #fff;
}

.qn-ring-caption {
    font-size: .5rem;
    font-weight: 800;
    color: #7c93b0;
    letter-spacing: .05em;
    margin-top: 2px;
}

.qn-preview-heading {
    min-width: 0;
}

.qn-preview-heading-title {
    color: #fff;
    font-weight: 800;
    font-size: 1rem;
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
}

.qn-preview-heading-sub {
    color: #9db4cc;
    font-size: .8rem;
    font-weight: 600;
    margin-top: 3px;
}

.qn-preview-readiness {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 9px;
    border-radius: 999px;
    padding: 5px 11px;
    font-size: .68rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .04em;
    background: rgba(255, 255, 255, .1);
    border: 1px solid rgba(255, 255, 255, .2);
    color: #cbd5e1;
}

.qn-preview-readiness.is-ready {
    background: rgba(94, 234, 212, .14);
    border-color: rgba(94, 234, 212, .4);
    color: #5eead4;
}

/* Body of the preview — the TOOL's own JS fills .qn-preview. */
.qn-preview {
    padding: 18px 22px;
}

.qn-preview-section-label {
    font-size: .66rem;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: #94A3B8;
    margin-bottom: 12px;
}

.qn-preview-headline {
    display: flex;
    align-items: baseline;
    gap: 6px;
    margin-bottom: 16px;
}

.qn-preview-headline-value {
    font-size: 2.1rem;
    font-weight: 900;
    letter-spacing: -.02em;
    color: #0F172A;
}

.qn-preview-headline-caption {
    color: #94A3B8;
    font-weight: 600;
    font-size: .9rem;
}

.qn-preview-rows {
    display: grid;
    gap: 9px;
}

.qn-preview-row {
    display: flex;
    justify-content: space-between;
    font-size: .86rem;
}

.qn-preview-row span { color: #64748B; }
.qn-preview-row strong { color: #0F172A; }

.qn-preview-row--divided {
    border-top: 1px solid #F1F5F9;
    padding-top: 10px;
    margin-top: 2px;
}

/* ---------- Collaborator panel ---------- */

.qn-collab {
    padding: 16px 22px;
    background: #F8FAFF;
    border-top: 1px solid #EEF2F8;
}

.qn-collab[hidden] {
    display: none;
}

.qn-collab-head {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
    font-size: .85rem;
    font-weight: 800;
    color: #0F172A;
}

.qn-collab-head svg {
    color: var(--color-primary, #2563EB);
    flex: 0 0 auto;
}

.qn-collab-sub {
    margin: 0 0 12px;
    font-size: .76rem;
    color: #64748B;
    line-height: 1.5;
}

.qn-collab-form {
    display: flex;
    gap: 8px;
    margin-bottom: 10px;
}

.qn-collab-form input[type="email"] {
    flex: 1;
    min-width: 0;
    padding: 11px 13px;
    border: 1.5px solid #E2E8F0;
    border-radius: 11px;
    font-size: .85rem;
    font-family: inherit;
    outline: none;
    background: #fff;
    color: #0F172A;
}

.qn-collab-form input[type="email"]:focus {
    border-color: var(--color-primary, #2563EB);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, .12);
}

.qn-collab-form.has-error input[type="email"] {
    border-color: #DC2626;
}

.qn-collab-invite-btn {
    flex: 0 0 auto;
    background: var(--color-primary, #2563EB);
    color: #fff;
    border: none;
    border-radius: 11px;
    padding: 0 16px;
    font-weight: 800;
    font-size: .82rem;
    font-family: inherit;
    cursor: pointer;
    transition: background .15s;
}

.qn-collab-invite-btn:hover { background: var(--color-primary-hover, #1D4ED8); }
.qn-collab-invite-btn[disabled] { opacity: .6; cursor: default; }

.qn-collab-error {
    font-size: .76rem;
    color: #DC2626;
    font-weight: 700;
    margin: -4px 0 10px;
}

.qn-collab-link {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #fff;
    border: 1px dashed #CBD5E1;
    border-radius: 11px;
    padding: 9px 11px;
    margin-bottom: 10px;
}

.qn-collab-link code {
    flex: 1;
    min-width: 0;
    font-size: .72rem;
    color: #475569;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    background: none;
}

.qn-copy-btn {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: rgba(37, 99, 235, .08);
    border: 1px solid rgba(37, 99, 235, .2);
    color: var(--color-primary, #2563EB);
    padding: 6px 11px;
    border-radius: 9px;
    font-weight: 700;
    font-size: .74rem;
    font-family: inherit;
    cursor: pointer;
}

.qn-copy-btn:hover { background: rgba(37, 99, 235, .14); }
.qn-copy-btn.is-copied { color: #047857; border-color: rgba(4, 120, 87, .3); background: rgba(16, 185, 129, .1); }

.qn-collab-item {
    background: #fff;
    border: 1px solid #E9EEF5;
    border-radius: 13px;
    padding: 11px 12px;
    margin-bottom: 9px;
}

.qn-collab-item-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.qn-collab-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: linear-gradient(135deg, #8B5CF6, #2563EB);
    color: #fff;
    font-weight: 800;
    font-size: .7rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
}

.qn-collab-meta {
    min-width: 0;
    flex: 1;
}

.qn-collab-email {
    font-size: .82rem;
    font-weight: 700;
    color: #0F172A;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.qn-collab-status {
    font-size: .68rem;
    font-weight: 700;
    color: #94A3B8;
}

.qn-collab-status.is-active { color: #047857; }
.qn-collab-status.is-invited { color: #B45309; }

.qn-collab-remove {
    flex: 0 0 auto;
    background: none;
    border: none;
    color: #CBD5E1;
    cursor: pointer;
    padding: 4px;
    line-height: 0;
}

.qn-collab-remove:hover { color: #DC2626; }

/* Section-assignment chips */
.qn-collab-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 10px;
}

.qn-chip {
    border: 1.5px solid #E2E8F0;
    background: #fff;
    color: #64748B;
    border-radius: 999px;
    padding: 5px 11px;
    font-size: .7rem;
    font-weight: 800;
    font-family: inherit;
    cursor: pointer;
    transition: all .15s;
}

.qn-chip:hover { border-color: #CBD5E1; }

.qn-chip.is-selected {
    border-color: var(--color-primary, #2563EB);
    background: rgba(37, 99, 235, .08);
    color: var(--color-primary, #2563EB);
}

.qn-chip[disabled] { cursor: default; opacity: .8; }

/* ---------- Privacy footnote under sidebar ---------- */

.qn-privacy-note {
    display: flex;
    gap: 9px;
    align-items: flex-start;
    padding: 0 4px;
    color: #94A3B8;
}

.qn-privacy-note svg { flex: 0 0 auto; margin-top: 1px; }

.qn-privacy-note p {
    margin: 0;
    font-size: .74rem;
    line-height: 1.5;
}

.qn-privacy-note a { font-weight: 700; }

/* ---------- Tooltips (data-qn-tip) ---------- */

.qn-tip {
    position: relative;
    display: inline-flex;
    cursor: help;
    color: #94A3B8;
}

.qn-tip::after {
    content: attr(data-qn-tip);
    position: absolute;
    bottom: calc(100% + 9px);
    left: 50%;
    transform: translateX(-50%);
    background: #0F172A;
    color: #fff;
    font-size: .78rem;
    font-weight: 500;
    line-height: 1.45;
    padding: 9px 12px;
    border-radius: 9px;
    width: max-content;
    max-width: 240px;
    z-index: 100;
    box-shadow: 0 10px 24px -6px rgba(15, 23, 42, .5);
    pointer-events: none;
    opacity: 0;
    transition: opacity .15s;
    text-transform: none;
    letter-spacing: 0;
}

.qn-tip::before {
    content: "";
    position: absolute;
    bottom: calc(100% + 5px);
    left: 50%;
    transform: translateX(-50%) rotate(45deg);
    width: 10px;
    height: 10px;
    background: #0F172A;
    z-index: 101;
    opacity: 0;
    transition: opacity .15s;
    pointer-events: none;
}

.qn-tip:hover::after,
.qn-tip:hover::before,
.qn-tip:focus-visible::after,
.qn-tip:focus-visible::before,
.qn-tip.tip-open::after,
.qn-tip.tip-open::before {
    opacity: 1;
}

/* ---------- Toast ---------- */

.qn-toast {
    position: fixed;
    left: 50%;
    bottom: 28px;
    transform: translate(-50%, 16px);
    background: #0F172A;
    color: #fff;
    font-size: .88rem;
    font-weight: 700;
    padding: 12px 20px;
    border-radius: 12px;
    box-shadow: 0 16px 34px -12px rgba(15, 23, 42, .55);
    z-index: 200;
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s, transform .2s;
}

.qn-toast.is-visible {
    opacity: 1;
    transform: translate(-50%, 0);
}

/* ---------- Footer ---------- */

.qn-footer {
    border-top: 1px solid #E9EEF5;
    background: #fff;
    margin-top: auto;
}

.qn-footer-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 16px 32px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #94A3B8;
}

.qn-footer-inner p {
    margin: 0;
    font-size: .78rem;
    flex: 1;
}

.qn-footer-copy {
    font-size: .74rem;
    white-space: nowrap;
}

/* ---------- Animations ---------- */

@keyframes qn-fade {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: none; }
}

.qn-card .wizard-screen.active {
    animation: qn-fade .25s ease;
}

[data-hdl-prefill-status-text] {
    min-height: 1.4em;
}

[data-hdl-prefill-status-text][data-hdl-prefill-tone="loading"] {
    color: #1D4ED8;
}

[data-hdl-prefill-status-text][data-hdl-prefill-tone="success"] {
    color: #047857;
}

[data-hdl-prefill-status-text][data-hdl-prefill-tone="warning"] {
    color: #92400E;
}

/* ---------- Mobile (≤900px): sidebar below, compact stepper ---------- */

@media (max-width: 900px) {
    .qn-main {
        padding: 24px 16px 48px;
    }

    .qn-layout {
        grid-template-columns: minmax(0, 1fr);
        gap: 20px;
    }

    .qn-sidebar {
        position: static;
        order: 2;
    }

    .qn-title { font-size: 1.6rem; }

    /* Compress the full stepper into "Step X of Y" + bar. */
    .qn-card .wizard-stepper-container { display: none; }
    .qn-step-compact { display: block; }

    .qn-header-inner {
        padding: 10px 16px;
        gap: 12px;
    }

    .qn-header-logo { height: 28px; }
    .qn-header-account-text { display: none; }
    .qn-header-guest-note { display: none; }
    .qn-cobrand-name { max-width: 150px; }
}

@media (max-width: 560px) {
    .qn-cobrand { display: none; }
    .qn-header-divider { display: none; }
}
