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

:root {
    --bw-red: #c0001a;

    --msparc-primary: #5c2c90;
    --msparc-dark: #340466;
    --msparc-light: #e1ebf2;

    --bw-red-dark: #a0000f;
    --bw-red-light: #fff0f0;
    --text-primary: #1a1a1a;
    --text-secondary: #555;
    --text-tertiary: #888;
    --bg-primary: #ffffff;
    --bg-secondary: #f6f6f4;
    --border: rgba(0, 0, 0, 0.12);
    --border-med: rgba(0, 0, 0, 0.2);
    --radius-md: 8px;
    --radius-lg: 12px;
    --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

body {
    font-family: var(--font);
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 2rem 1rem 4rem;
}

#qz {
    width: 100%;
    max-width: 640px;
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    border: 0.5px solid var(--border);
    padding: 2.5rem 2rem;
}

@media (max-width: 600px) {
    body {
        padding: 0;
    }

    #qz {
        border-radius: 0;
        border-left: none;
        border-right: none;
        padding: 2rem 1.25rem;
    }
}

.top-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2.5rem;
}

.bw-brand {
    display: flex;
    align-items: center;
    gap: 8px;
}

.bw-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--msparc-primary);
}

.bw-name {
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 500;
}

.lang-toggle {
    display: flex;
    gap: 6px;
}

.lang-btn {
    font-size: 12px;
    padding: 4px 12px;
    border: 0.5px solid var(--border-med);
    border-radius: 20px;
    cursor: pointer;
    background: transparent;
    color: var(--text-secondary);
    font-family: var(--font);
    transition: all 0.15s;
}

.lang-btn.active {
    background: var(--msparc-primary);
    color: #fff;
}

.progress-bar {
    height: 3px;
    background: var(--border);
    border-radius: 2px;
    margin-bottom: 2.5rem;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--msparc-primary);
    border-radius: 2px;
    transition: width 0.4s ease;
}

.intro-title {
    font-size: clamp(1.6rem, 5vw, 2.1rem);
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 1rem;
}

.intro-sub {
    font-size: 16px;
    color: var(--text-secondary);
    line-height: 1.65;
    margin-bottom: 0.5rem;
}

.intro-meta {
    font-size: 13px;
    color: var(--text-tertiary);
    margin-bottom: 2.25rem;
}

.start-btn {
    padding: 13px 32px;
    background: var(--msparc-primary);
    color: #fff;
    border: none;
    border-radius: var(--radius-md);
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    font-family: var(--font);
    transition: background 0.15s;
}

.start-btn:hover {
    background: var(--msparc-dark);
}

.q-label {
    font-size: 12px;
    color: var(--text-tertiary);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 0.75rem;
}

.q-text {
    font-size: 1.3rem;
    font-weight: 500;
    color: var(--text-primary);
    line-height: 1.4;
    margin-bottom: 0.5rem;
}

.q-sub {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 1.75rem;
    line-height: 1.5;
}

.q-nosub {
    margin-bottom: 1.75rem;
}

/* Standard single-select options */
.options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.opt {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 14px 16px;
    border: 0.5px solid var(--border-med);
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
    background: var(--bg-primary);
}

.opt:hover {
    border-color: var(--msparc-primary);
    background: var(--bg-secondary);
}

.opt.selected {
    border-color: var(--msparc-primary);
    background: var(--msparc-light);
}

.opt-letter {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    border: 0.5px solid var(--border-med);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: var(--text-secondary);
    flex-shrink: 0;
    transition: background 0.15s, border-color 0.15s;
}

.opt.selected .opt-letter {
    background: var(--msparc-primary);
    border-color: var(--msparc-primary);
    color: #fff;
}

.opt-text {
    font-size: 15px;
    color: var(--text-primary);
    line-height: 1.45;
    padding-top: 3px;
}

/* Multi-select chip grid */
.chip-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 0.5rem;
}

.chip {
    padding: 9px 16px;
    border: 0.5px solid var(--border-med);
    border-radius: 30px;
    cursor: pointer;
    font-size: 14px;
    font-family: var(--font);
    color: var(--text-primary);
    background: var(--bg-primary);
    transition: all 0.15s;
    user-select: none;
}

.chip:hover {
    border-color: var(--msparc-primary);
    background: var(--bg-secondary);
}

.chip.selected {
    border-color: var(--msparc-primary);
    background: var(--msparc-light);
    color: var(--msparc-primary);
    font-weight: 500;
}

.chip-hint {
    font-size: 12px;
    color: var(--text-tertiary);
    margin-bottom: 1.5rem;
}

/* 1-5 comfort scale */
.scale-wrap {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.scale-row {
    display: flex;
    gap: 8px;
}

.scale-btn {
    flex: 1;
    padding: 14px 8px;
    border: 0.5px solid var(--border-med);
    border-radius: var(--radius-md);
    cursor: pointer;
    font-size: 18px;
    font-weight: 600;
    font-family: var(--font);
    background: var(--bg-primary);
    color: var(--text-secondary);
    transition: all 0.15s;
    text-align: center;
}

.scale-btn:hover {
    border-color: var(--msparc-primary);
    background: var(--bg-secondary);
}

.scale-btn.selected {
    border-color: var(--msparc-primary);
    background: var(--msparc-light);
    color: var(--msparc-primary);
}

.scale-labels {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: var(--text-tertiary);
    padding: 0 2px;
}

/* Branch label pill */
.branch-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 20px;
    background: var(--bg-secondary);
    border: 0.5px solid var(--border);
    font-size: 12px;
    color: var(--text-tertiary);
    margin-bottom: 1rem;
}

.branch-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--msparc-primary);
}

.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 2rem;
}

.btn-back {
    font-size: 14px;
    color: var(--text-secondary);
    cursor: pointer;
    background: none;
    border: none;
    font-family: var(--font);
    display: flex;
    align-items: center;
    gap: 5px;
    transition: color 0.15s;
}

.btn-back:hover:not(:disabled) {
    color: var(--text-primary);
}

.btn-back:disabled {
    opacity: 0.3;
    pointer-events: none;
}

.btn-next {
    padding: 10px 28px;
    background: var(--msparc-primary);
    color: #fff;
    border: none;
    border-radius: var(--radius-md);
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    font-family: var(--font);
    opacity: 0.4;
    pointer-events: none;
    transition: opacity 0.2s, background 0.15s;
}

.btn-next.ready {
    opacity: 1;
    pointer-events: auto;
}

.btn-next.ready:hover {
    background: var(--msparc-dark);
}

.q-slide {
    animation: fadeUp 0.3s ease;
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#results {
    animation: fadeUp 0.4s ease;
}

.tier-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 1.5rem;
}

.tier-1 {
    background: var(--msparc-light);
    color: var(--msparc-primary);
    border: 0.5px solid rgba(192, 0, 26, 0.3);
}

.tier-2 {
    background: #fff7e0;
    color: #854F0B;
    border: 0.5px solid #EF9F27;
}

.tier-3 {
    background: #EAF3DE;
    color: #3B6D11;
    border: 0.5px solid #97C459;
}

@media (prefers-color-scheme: dark) {
    .tier-2 {
        background: #2a1a00;
        color: #FAC775;
    }

    .tier-3 {
        background: #1a2a0a;
        color: #C0DD97;
    }
}

.result-title {
    font-size: clamp(1.3rem, 4vw, 1.65rem);
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.result-sub {
    font-size: 15px;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    line-height: 1.65;
}

.score-bar-wrap {
    margin-bottom: 2rem;
}

.score-bar-label {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.score-bar-track {
    height: 8px;
    background: var(--border);
    border-radius: 4px;
    overflow: hidden;
}

.score-bar-fill {
    height: 100%;
    background: var(--msparc-primary);
    border-radius: 4px;
    transition: width 0.9s ease;
}

.insights {
    margin-bottom: 2rem;
    border: 0.5px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.insight-item {
    display: flex;
    gap: 14px;
    padding: 14px 16px;
    border-bottom: 0.5px solid var(--border);
}

.insight-item:last-child {
    border-bottom: none;
}

.insight-icon {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 13px;
    font-weight: 600;
    margin-top: 1px;
}

.i-good {
    background: #EAF3DE;
    color: #3B6D11;
}

.i-gap {
    background: var(--msparc-light);
    color: var(--msparc-primary);
}

.insight-text {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.55;
}

.insight-text strong {
    color: var(--text-primary);
    font-weight: 500;
}

.cta-heading {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-tertiary);
    margin-bottom: 0.875rem;
}

.ctas {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.cta-card {
    border: 0.5px solid var(--border-med);
    border-radius: var(--radius-lg);
    padding: 14px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    text-decoration: none;
    transition: border-color 0.15s, background 0.15s;
    background: var(--bg-primary);
    cursor: pointer;
}

.cta-card:hover {
    border-color: var(--msparc-primary);
    background: var(--bg-secondary);
}

.cta-card.primary {
    border-color: var(--msparc-primary);
    background: var(--msparc-light);
}

.cta-inner {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.cta-label {
    font-size: 11px;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.07em;
}

.cta-title {
    font-size: 15px;
    font-weight: 500;
    color: var(--text-primary);
}

.cta-desc {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.4;
}

.cta-arrow {
    color: var(--msparc-primary);
    flex-shrink: 0;
    font-size: 20px;
}

.restart-btn {
    margin-top: 1.5rem;
    font-size: 14px;
    color: var(--text-secondary);
    background: none;
    border: none;
    cursor: pointer;
    font-family: var(--font);
    display: flex;
    align-items: center;
    gap: 6px;
    transition: color 0.15s;
}

.restart-btn:hover {
    color: var(--text-primary);
}

.footer-line {
    margin-top: 2rem;
    padding-top: 1.25rem;
    border-top: 0.5px solid var(--border);
    font-size: 12px;
    color: var(--text-tertiary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.footer-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--msparc-primary);
    flex-shrink: 0;
}

.book-btn {
    width: 100%;
    padding: 14px 20px;
    margin-top: 10px;
    background: var(--msparc-primary);
    color: #fff;
    border: none;
    border-radius: var(--radius-lg);
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    font-family: var(--font);
    transition: background 0.15s;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.book-btn:hover {
    background: var(--msparc-dark);
}

#booking-form {
    margin-top: 10px;
    border: 0.5px solid var(--border-med);
    border-radius: var(--radius-lg);
    overflow: hidden;
    animation: fadeUp 0.25s ease;
}

.bf-header {
    background: var(--msparc-light);
    padding: 16px 20px;
    border-bottom: 0.5px solid var(--border);
}

.bf-header-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--msparc-primary);
}

.bf-header-sub {
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 3px;
}

.bf-body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    background: var(--bg-primary);
}

.bf-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

@media (max-width: 500px) {
    .bf-row {
        grid-template-columns: 1fr;
    }
}

.bf-field {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.bf-label {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.bf-input {
    padding: 9px 12px;
    border: 0.5px solid var(--border-med);
    border-radius: var(--radius-md);
    font-size: 14px;
    font-family: var(--font);
    background: var(--bg-primary);
    color: var(--text-primary);
    transition: border-color 0.15s;
    outline: none;
}

.bf-input:focus {
    border-color: var(--msparc-primary);
}

.bf-input::placeholder {
    color: var(--text-tertiary);
}

.slot-heading {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
    padding: 12px 0 8px;
    border-top: 0.5px solid var(--border);
    margin-top: 4px;
}

.slot-heading span {
    color: var(--text-tertiary);
    font-weight: 400;
    font-size: 12px;
}

.slot-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

@media (max-width: 500px) {
    .slot-row {
        grid-template-columns: 1fr;
    }
}

.slot-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.slot-label {
    font-size: 12px;
    color: var(--text-tertiary);
}

.slot-selects {
    display: flex;
    gap: 6px;
}

.slot-selects select {
    flex: 1;
    padding: 8px 6px;
    border: 0.5px solid var(--border-med);
    border-radius: var(--radius-md);
    font-size: 13px;
    font-family: var(--font);
    background: var(--bg-primary);
    color: var(--text-primary);
    cursor: pointer;
    outline: none;
    transition: border-color 0.15s;
}

.slot-selects select:focus {
    border-color: var(--msparc-primary);
}

.bf-submit {
    width: 100%;
    padding: 13px;
    background: var(--msparc-primary);
    color: #fff;
    border: none;
    border-radius: var(--radius-md);
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    font-family: var(--font);
    transition: background 0.15s;
    margin-top: 6px;
}

.bf-submit:hover {
    background: var(--msparc-dark);
}

.bf-note {
    font-size: 12px;
    color: var(--text-tertiary);
    text-align: center;
    line-height: 1.5;
}

/* Name/email gate screen */
.gate-wrap {
    animation: fadeUp 0.3s ease;
}

.gate-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.4rem;
    line-height: 1.3;
}

.gate-sub {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 1.75rem;
    line-height: 1.55;
}

.gate-fields {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 1.25rem;
}

.gate-field {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.gate-label {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.gate-input {
    padding: 10px 13px;
    border: 0.5px solid var(--border-med);
    border-radius: var(--radius-md);
    font-size: 15px;
    font-family: var(--font);
    background: var(--bg-primary);
    color: var(--text-primary);
    transition: border-color 0.15s;
    outline: none;
}

.gate-input:focus {
    border-color: var(--msparc-primary);
}

.gate-input::placeholder {
    color: var(--text-tertiary);
}

.gate-consent {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 1.5rem;
    cursor: pointer;
}

.gate-consent input[type=checkbox] {
    margin-top: 2px;
    accent-color: var(--msparc-primary);
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    cursor: pointer;
}

.gate-consent-text {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.55;
}

.gate-consent-text a {
    color: var(--msparc-primary);
    text-decoration: none;
}

.gate-submit {
    width: 100%;
    padding: 13px;
    background: var(--msparc-primary);
    color: #fff;
    border: none;
    border-radius: var(--radius-md);
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    font-family: var(--font);
    transition: background 0.15s;
    opacity: 0.4;
    pointer-events: none;
}

.gate-submit.ready {
    opacity: 1;
    pointer-events: auto;
}

.gate-submit.ready:hover {
    background: var(--msparc-dark);
}

.gate-skip {
    display: block;
    text-align: center;
    margin-top: 1rem;
    font-size: 13px;
    color: var(--text-tertiary);
    cursor: pointer;
    background: none;
    border: none;
    font-family: var(--font);
    transition: color 0.15s;
}

.gate-skip:hover {
    color: var(--text-secondary);
}

.book-confirm {
    margin-top: 10px;
    padding: 20px;
    border: 0.5px solid #97C459;
    border-radius: var(--radius-lg);
    background: #EAF3DE;
    text-align: center;
    animation: fadeUp 0.3s ease;
}

@media (prefers-color-scheme: dark) {
    .book-confirm {
        background: #1a2a0a;
        border-color: #3B6D11;
    }
}

.book-confirm-icon {
    font-size: 28px;
    margin-bottom: 8px;
}

.book-confirm-title {
    font-size: 16px;
    font-weight: 600;
    color: #3B6D11;
    margin-bottom: 6px;
}

@media (prefers-color-scheme: dark) {
    .book-confirm-title {
        color: #C0DD97;
    }
}

.book-confirm-sub {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.55;
}