/* Cohort styles — moved out of cohort/index.html (v4) so browsers cache them.
   After editing, bump ?v= on the <link> in index.html. */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --orange:      #ff7600;
    --black:       #000000;
    --surface:     #0d0d0d;
    --surface-2:   #1a1a1a;
    --border:      #2a2a2a;
    --text:        #f0f0f0;
    --muted:       #666666;
    --teal:        #2aaa88;
    --geo:         #7c6af7;
    --warn:        #e8a020;
    --pink:        #ff6ec7;
    --blue:        #4a9eff;
    --sage:        #6bbf7a;
    --font:        'Courier New', Courier, monospace;
}

html { scroll-behavior: smooth; }

body {
    background: var(--black);
    color: var(--text);
    font-family: var(--font);
    min-height: 100vh;
    background-image:
        repeating-linear-gradient(0deg,  transparent, transparent 39px, rgba(255,118,0,.03) 39px, rgba(255,118,0,.03) 40px),
        repeating-linear-gradient(90deg, transparent, transparent 39px, rgba(255,118,0,.02) 39px, rgba(255,118,0,.02) 40px);
}

.wrapper { max-width: 960px; margin: 0 auto; padding: 0 24px 80px; }

/* ── Topbar ── */
.topbar {
    background: var(--orange); color: var(--black);
    padding: 0 24px; font-size: 0.68rem; font-weight: bold;
    letter-spacing: 0.18em; text-transform: uppercase;
    display: flex; justify-content: space-between; align-items: center; height: 32px;
}

/* ── Header ── */
header { border-bottom: 2px solid var(--orange); padding: 28px 0 20px; margin-bottom: 40px; }
.brand-row { display: flex; align-items: center; gap: 16px; margin-bottom: 16px; }
.brand-logo-wrap { display: flex; flex-shrink: 0; text-decoration: none; }
.brand-logo {
    width: 48px; height: 48px; object-fit: contain; border-radius: 6px;
    filter: drop-shadow(0 0 10px rgba(255,118,0,.35));
    transition: filter .2s, transform .2s;
}
.brand-logo:hover { filter: drop-shadow(0 0 18px rgba(255,118,0,.6)); transform: scale(1.04); }
.brand-name {
    font-size: 1.8rem; font-weight: bold; letter-spacing: -0.02em;
    color: var(--orange); text-transform: uppercase; line-height: 1;
    text-shadow: 0 0 30px rgba(255,118,0,.25);
}
.brand-name span { color: var(--text); }
.brand-tagline { font-size: 0.6rem; letter-spacing: 0.22em; text-transform: uppercase; color: var(--muted); margin-top: 3px; }

/* ── Site nav ── */
.site-nav { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; margin-top: 12px; }
.site-nav a {
    display: inline-flex; align-items: center; gap: 6px;
    font-size: 0.65rem; font-weight: bold; letter-spacing: 0.12em;
    text-transform: uppercase; color: var(--muted); text-decoration: none;
    padding: 5px 11px; border: 1px solid var(--border); background: transparent;
    transition: color .15s, border-color .15s, background .15s; white-space: nowrap;
}
.site-nav a:hover, .site-nav a.nav-active { color: var(--orange); border-color: var(--orange); background: rgba(255,118,0,.05); }
.site-nav a svg { width: 11px; height: 11px; fill: currentColor; flex-shrink: 0; opacity: .7; }
.site-nav .nav-divider { width: 1px; height: 14px; background: var(--border); margin: 0 4px; flex-shrink: 0; }

/* ── Page hero ── */
.page-hero { margin-bottom: 40px; padding-bottom: 24px; border-bottom: 1px solid var(--border); }
.page-label { font-size: 0.62rem; font-weight: bold; letter-spacing: 0.2em; text-transform: uppercase; color: var(--orange); margin-bottom: 10px; }
.page-title { font-size: clamp(1.8rem, 4vw, 2.6rem); font-weight: bold; color: var(--text); line-height: 1.1; letter-spacing: -0.02em; margin-bottom: 12px; }
.page-subtitle { font-size: 0.88rem; color: var(--muted); line-height: 1.7; max-width: 640px; }

/* ── Section labels (reused for result headers) ── */
.section-label {
    font-size: 0.65rem; font-weight: bold; letter-spacing: 0.2em;
    text-transform: uppercase; color: var(--orange);
    margin: 40px 0 16px; display: flex; align-items: center; gap: 10px;
}
.section-label::after { content: ''; flex: 1; height: 1px; background: var(--border); }
.section-label:first-of-type { margin-top: 0; }

/* ── Quiz card ── */
.quiz-card {
    background: var(--surface); border: 1px solid var(--border);
    border-top: 2px solid var(--orange); padding: 28px;
}

/* Progress */
.quiz-progress { display: flex; align-items: center; gap: 8px; margin-bottom: 24px; }
.quiz-progress-label { font-size: 0.65rem; font-weight: bold; letter-spacing: 0.15em; text-transform: uppercase; color: var(--muted); white-space: nowrap; }
.quiz-progress-bar { flex: 1; height: 4px; background: var(--border); overflow: hidden; }
.quiz-progress-fill { height: 100%; background: var(--orange); transition: width .3s ease; }

/* Steps */
.quiz-step { display: none; }
.quiz-step.active { display: block; animation: fadeIn .25s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }

.quiz-question { font-size: 1.1rem; font-weight: bold; color: var(--text); margin-bottom: 6px; letter-spacing: -0.01em; }
.quiz-question-sub { font-size: 0.8rem; color: var(--muted); margin-bottom: 20px; line-height: 1.6; }

.quiz-options { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; margin-bottom: 8px; }
.quiz-option {
    display: flex; align-items: center; gap: 10px;
    background: var(--black); border: 1px solid var(--border);
    color: var(--text); font-family: var(--font); font-size: 0.84rem;
    padding: 14px 16px; cursor: pointer; text-align: left;
    transition: border-color .15s, background .15s;
}
.quiz-option:hover { border-color: var(--orange); }
.quiz-option.selected { border-color: var(--orange); background: rgba(255,118,0,.08); color: var(--orange); font-weight: bold; }
.quiz-option-icon { font-size: 1.3rem; line-height: 1; flex-shrink: 0; }
.quiz-option-text { display: flex; flex-direction: column; gap: 2px; }
.quiz-option-range { font-size: 0.65rem; color: var(--muted); font-weight: normal; letter-spacing: 0.03em; }
.quiz-option.selected .quiz-option-range { color: var(--orange); opacity: .8; }

/* Age helper */
.age-helper {
    display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
    margin: 18px 0 4px; padding: 12px 16px;
    background: var(--black); border: 1px dashed var(--border);
}
.age-helper label { font-size: 0.72rem; color: var(--muted); letter-spacing: 0.04em; white-space: nowrap; }
.age-helper input {
    background: var(--surface-2); border: 1px solid var(--border);
    color: var(--orange); font-family: var(--font); font-size: 0.84rem;
    padding: 7px 10px; width: 90px; outline: none;
}
.age-helper input:focus { border-color: var(--orange); }
.age-helper-result { font-size: 0.75rem; color: var(--teal); font-weight: bold; }

/* Country select */
.country-select-wrap { margin-top: 18px; }
.country-select-label { font-size: 0.68rem; font-weight: bold; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; display: block; }
.country-select {
    background: var(--black); border: 1px solid var(--border);
    color: var(--text); font-family: var(--font); font-size: 0.84rem;
    padding: 10px 12px; width: 100%; max-width: 320px; outline: none; cursor: pointer;
}
.country-select:focus { border-color: var(--orange); }

/* Nav buttons */
.quiz-nav { display: flex; justify-content: space-between; align-items: center; margin-top: 28px; gap: 10px; flex-wrap: wrap; }
.btn { display: inline-flex; align-items: center; gap: 8px; border: none; cursor: pointer; font-family: var(--font); font-size: 0.8rem; font-weight: bold; letter-spacing: 0.1em; text-transform: uppercase; padding: 11px 24px; transition: all .15s; text-decoration: none; }
.btn-primary { background: var(--orange); color: var(--black); border: 2px solid var(--orange); }
.btn-primary:hover { background: #000; color: var(--orange); box-shadow: 0 0 16px rgba(255,118,0,.4); }
.btn-primary:disabled { opacity: .35; cursor: not-allowed; box-shadow: none; }
.btn-secondary { background: transparent; color: var(--text); border: 1px solid var(--border); }
.btn-secondary:hover { border-color: var(--orange); color: var(--orange); }
.btn-secondary:disabled { opacity: .3; cursor: not-allowed; }

/* ── Results ── */
#resultWrap { display: none; margin-top: 40px; }
#resultWrap.active { display: block; animation: fadeIn .3s ease; }

.result-banner {
    background: var(--surface); border: 1px solid var(--border);
    border-top: 2px solid var(--orange); padding: 24px 28px;
    margin-bottom: 28px; text-align: center;
}
.result-banner-label { font-size: 0.6rem; font-weight: bold; letter-spacing: 0.2em; text-transform: uppercase; color: var(--orange); margin-bottom: 10px; }
.result-banner-combo { font-size: 1.3rem; font-weight: bold; color: var(--text); letter-spacing: 0.01em; }
.result-banner-combo span { color: var(--orange); }

/* ── Report header & executive summary ── */
.report-header {
    display: flex; justify-content: space-between; align-items: flex-start;
    gap: 16px; margin-bottom: 6px; flex-wrap: wrap;
}
.report-title { font-size: 1.5rem; font-weight: bold; color: var(--text); letter-spacing: -0.01em; }
.report-title span { color: var(--orange); }
.report-meta { font-size: 0.68rem; color: var(--muted); letter-spacing: 0.04em; text-align: right; white-space: nowrap; }
.report-divider { height: 2px; background: var(--orange); margin: 14px 0 24px; }
.exec-summary {
    background: var(--surface); border: 1px solid var(--border);
    border-left: 3px solid var(--orange); padding: 18px 22px;
    margin-bottom: 32px; font-size: 0.88rem; line-height: 1.8; color: var(--text);
}
.exec-summary-label { font-size: 0.6rem; font-weight: bold; letter-spacing: 0.2em; text-transform: uppercase; color: var(--orange); margin-bottom: 10px; }
.report-num { color: var(--orange); margin-right: 8px; }

/* ── Research basis / bibliography ── */
.research-basis {
    background: var(--surface); border: 1px solid var(--border);
    border-top: 2px solid var(--teal); padding: 22px 26px; margin: 32px 0;
}
.research-basis h3 { font-size: 0.7rem; font-weight: bold; letter-spacing: 0.16em; text-transform: uppercase; color: var(--teal); margin-bottom: 14px; }
.research-basis ul { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.research-basis li { font-size: 0.78rem; color: var(--muted); line-height: 1.6; padding-left: 16px; position: relative; }
.research-basis li::before { content: '—'; position: absolute; left: 0; color: var(--teal); }
.research-basis li strong { color: var(--text); }
.research-basis .caveat { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--border); font-size: 0.76rem; color: var(--muted); line-height: 1.7; font-style: italic; }

/* ── Print styles ── */
@media print {
    body { background: #fff; color: #000; }
    .topbar, header, .quiz-card, .result-actions, footer, .aff-wrap, .aff-side { display: none !important; }
    #resultWrap { display: block !important; }
    .result-section, .result-banner, .exec-summary, .research-basis { border-color: #ccc !important; background: #fff !important; box-shadow: none !important; }
    .result-field-value, .exec-summary, .research-basis li { color: #000 !important; }
    a { color: #000 !important; text-decoration: underline; }
    /* Keep computed bars readable on paper */
    .meter-track, .rank-bar { background: #e4e4e4 !important; border: 1px solid #bbb; }
    .meter-fill, .rank-bar span { background: #444 !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
    .meter-note, .rank-why, .rank-meta, .journey-text, .meter-legend { color: #000 !important; }
    .journey-step { border-left-color: #ccc !important; }
    .journey-step::before { background: #fff !important; border-color: #666 !important; }
    .chip { color: #000 !important; border-color: #999 !important; background: #fff !important; }
    .rank-item { break-inside: avoid; page-break-inside: avoid; }
    .result-section { break-inside: avoid; page-break-inside: avoid; }
}

.result-section {
    background: var(--surface); border: 1px solid var(--border);
    border-top: 2px solid var(--teal); padding: 22px 26px; margin-bottom: 16px;
}
.result-section.strategy { border-top-color: var(--orange); }
.result-section.localisation { border-top-color: var(--geo); }
.result-section.gender-psych { border-top-color: var(--pink); }
.result-section.buying-habits { border-top-color: var(--warn); }
.result-section.orientation-psych { border-top-color: var(--blue); }
.result-section.religion-psych { border-top-color: var(--sage); }
.result-section.signals { border-top-color: var(--teal); }
.result-section.spend { border-top-color: var(--warn); }
.result-section.lifestage { border-top-color: var(--pink); }
.result-section.urbanicity { border-top-color: var(--geo); }
.result-section.journey { border-top-color: var(--geo); }
.result-section.levers { border-top-color: var(--orange); }
.result-section.channels { border-top-color: var(--orange); }
.result-section.friction { border-top-color: var(--warn); }
.result-section.retention { border-top-color: var(--sage); }
.result-section.timing { border-top-color: var(--blue); }
.result-section.culture { border-top-color: var(--geo); }
.result-section-header { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.result-section-icon { font-size: 1.4rem; line-height: 1; }
.result-section-title { font-size: 0.95rem; font-weight: bold; color: var(--teal); letter-spacing: 0.02em; }
.result-section.strategy .result-section-title { color: var(--orange); }
.result-section.localisation .result-section-title { color: var(--geo); }
.result-section.gender-psych .result-section-title { color: var(--pink); }
.result-section.buying-habits .result-section-title { color: var(--warn); }
.result-section.orientation-psych .result-section-title { color: var(--blue); }
.result-section.religion-psych .result-section-title { color: var(--sage); }
.result-section.signals .result-section-title { color: var(--teal); }
.result-section.spend .result-section-title { color: var(--warn); }
.result-section.lifestage .result-section-title { color: var(--pink); }
.result-section.urbanicity .result-section-title { color: var(--geo); }
.result-section.journey .result-section-title { color: var(--geo); }
.result-section.levers .result-section-title { color: var(--orange); }
.result-section.channels .result-section-title { color: var(--orange); }
.result-section.friction .result-section-title { color: var(--warn); }
.result-section.retention .result-section-title { color: var(--sage); }
.result-section.timing .result-section-title { color: var(--blue); }
.result-section.culture .result-section-title { color: var(--geo); }

.result-field { margin-bottom: 14px; }
.result-field:last-child { margin-bottom: 0; }
.result-field-label { font-size: 0.62rem; font-weight: bold; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
.result-field-value { font-size: 0.86rem; color: var(--text); line-height: 1.65; }
.result-field-value.opener { color: var(--teal); font-style: italic; }
.result-field-value.avoid { color: var(--warn); }

/* ── Behavioural signal meters (computed indices) ── */
.meter-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); gap: 18px 26px; }
.meter-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 6px; }
.meter-name { font-size: 0.62rem; font-weight: bold; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.meter-score { font-size: 0.68rem; font-weight: bold; letter-spacing: 0.06em; white-space: nowrap; color: var(--teal); }
.meter-track { height: 6px; background: var(--border); overflow: hidden; }
.meter-fill { display: block; height: 100%; width: 0; background: var(--teal); transition: width .6s ease; }
.meter-note { font-size: 0.78rem; color: var(--text); line-height: 1.6; margin-top: 7px; }
.meter.lvl-1 .meter-fill { background: var(--muted); } .meter.lvl-1 .meter-score { color: var(--muted); }
.meter.lvl-2 .meter-fill { background: var(--blue); }  .meter.lvl-2 .meter-score { color: var(--blue); }
.meter.lvl-3 .meter-fill { background: var(--teal); }  .meter.lvl-3 .meter-score { color: var(--teal); }
.meter.lvl-4 .meter-fill { background: var(--warn); }  .meter.lvl-4 .meter-score { color: var(--warn); }
.meter.lvl-5 .meter-fill { background: var(--orange); }.meter.lvl-5 .meter-score { color: var(--orange); }
.meter-legend { font-size: 0.74rem; color: var(--muted); line-height: 1.7; margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--border); font-style: italic; }

/* ── Ranked lists (channels, levers, friction) ── */
.rank-list { display: flex; flex-direction: column; gap: 16px; }
.rank-item { border-left: 2px solid var(--border); padding-left: 15px; }
.rank-item.top { border-left-color: var(--orange); }
.rank-item-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.rank-num { font-size: 0.68rem; font-weight: bold; letter-spacing: 0.1em; color: var(--orange); }
.rank-title { font-size: 0.88rem; font-weight: bold; color: var(--text); }
.rank-score { margin-left: auto; font-size: 0.62rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); white-space: nowrap; }
.rank-bar { height: 4px; background: var(--border); margin: 8px 0; overflow: hidden; }
.rank-bar span { display: block; height: 100%; background: var(--orange); width: 0; transition: width .6s ease; }
.rank-why { font-size: 0.82rem; color: var(--text); line-height: 1.65; }
.rank-meta { font-size: 0.72rem; color: var(--muted); line-height: 1.6; margin-top: 5px; }
.rank-meta strong { color: var(--teal); font-weight: bold; }

/* ── Purchase decision journey ── */
.journey-step { position: relative; padding: 0 0 20px 26px; border-left: 1px solid var(--border); }
.journey-step:last-child { border-left-color: transparent; padding-bottom: 0; }
.journey-step::before {
    content: ''; position: absolute; left: -5px; top: 3px;
    width: 9px; height: 9px; background: var(--black); border: 2px solid var(--geo);
}
.journey-stage { font-size: 0.62rem; font-weight: bold; letter-spacing: 0.14em; text-transform: uppercase; color: var(--geo); margin-bottom: 5px; }
.journey-text { font-size: 0.85rem; line-height: 1.65; color: var(--text); }

/* ── Tag chips (timing / moments) ── */
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.chip {
    font-size: 0.66rem; letter-spacing: 0.08em; text-transform: uppercase;
    padding: 5px 10px; border: 1px solid var(--border);
    color: var(--muted); background: var(--black); white-space: nowrap;
}
.chip.on { border-color: var(--orange); color: var(--orange); }

.result-actions { display: flex; gap: 10px; flex-wrap: wrap; margin: 28px 0; }

/* ── Skip-question UI ── */
.btn-skip {
    background: transparent; border: none; color: var(--muted);
    font-family: var(--font); font-size: 0.72rem; letter-spacing: 0.06em;
    text-decoration: underline; text-underline-offset: 3px; cursor: pointer;
    padding: 10px 0 0; display: inline-block;
}
.btn-skip:hover { color: var(--orange); }
.skip-note {
    display: none; font-size: 0.74rem; color: var(--warn);
    margin-top: 12px; padding: 8px 12px;
    background: rgba(232,160,32,.06); border-left: 2px solid var(--warn);
}
.skip-note.active { display: block; }
.omitted-note {
    font-size: 0.78rem; color: var(--muted); font-style: italic;
    padding: 4px 0;
}

/* ── Tip/warn boxes ── */
.tip {
    background: rgba(42,170,136,.06); border: 1px solid rgba(42,170,136,.25);
    border-left: 3px solid var(--teal); padding: 14px 18px;
    margin: 20px 0; font-size: 0.82rem; line-height: 1.7; color: var(--text);
}
.tip strong { color: var(--teal); }
.warn {
    background: rgba(255,118,0,.06); border: 1px solid rgba(255,118,0,.2);
    border-left: 3px solid var(--orange); padding: 14px 18px;
    margin: 20px 0; font-size: 0.82rem; line-height: 1.7; color: var(--text);
}
.warn strong { color: var(--orange); }

/* ── Footer ── */
footer { margin-top: 64px; border-top: 1px solid var(--border); }
.aff-wrap { text-align: center; margin: 32px 0 0; padding: 20px 0; border-top: 1px solid rgba(255,118,0,0.15); }

/* ── Content + affiliate sidebar ─────────────────────────────
   One column everywhere by default. On a wide desktop the
   wrapper grows by exactly the sidebar's width (204px card +
   28px gutter), so the main column keeps its 960px and only the
   header and footer stretch. The card then sticks alongside the
   content as the page scrolls. */
.aff-side { display: none; }
@media (min-width: 1300px) {
    .wrapper { max-width: 1192px; }
    .page-cols {
        display: grid;
        grid-template-columns: minmax(0, 1fr) 204px;
        column-gap: 28px;
    }
    .aff-side { display: block; }
    .aff-card {
        position: sticky; top: 24px;
        padding: 22px; text-align: center; line-height: 0;
        background: var(--surface);
        border: 1px solid rgba(255,118,0,0.18);
        border-radius: 2px;
    }
    .aff-card img { display: block; margin: 0 auto; max-width: 100%; height: auto; }
}
@media print { .aff-side { display: none !important; } }

.footer-bottom {
    padding: 14px 0; display: flex; justify-content: space-between;
    align-items: center; flex-wrap: wrap; gap: 10px;
    font-size: 0.62rem; color: var(--muted); letter-spacing: 0.06em; text-transform: uppercase;
}
.footer-bottom a { color: var(--muted); text-decoration: none; transition: color .15s; }
.footer-bottom a:hover { color: var(--orange); }
.footer-legal { display: flex; gap: 14px; flex-wrap: wrap; }
.footer-tools { display: flex; gap: 10px; flex-wrap: wrap; }

@media (max-width: 640px) {
    .brand-name { font-size: 1.4rem; }
    .quiz-card { padding: 18px; }
    .result-section { padding: 18px; }
    .quiz-nav { flex-direction: column-reverse; align-items: stretch; }
    .quiz-nav .btn { width: 100%; justify-content: center; }
    .result-actions { flex-direction: column; }
    .result-actions .btn { width: 100%; justify-content: center; }
    .footer-bottom { flex-direction: column; align-items: flex-start; }
}

    .footer-toolcols { display:grid; grid-template-columns:repeat(auto-fit,minmax(150px,1fr));
                       gap:18px 22px; margin:0 0 22px; padding-bottom:20px;
                       border-bottom:1px solid rgba(255,255,255,0.07); text-align:left; }
    .ftcol h4 { margin:0 0 6px; font-size:.62rem; font-weight:400; letter-spacing:.1em;
                text-transform:uppercase; color:var(--muted); }
    .ftcol a { display:block; font-size:.78rem; line-height:1.95; color:var(--muted);
               text-decoration:none; }
    .ftcol a:hover { color:var(--orange); }
