/* ============================================================
   Social Distance Cartography
   Aesthetic: clinical white. Lab-report restraint - white ground,
   hairline rules, generous whitespace, one clinical-blue accent.
   Colour carries meaning only on the data (the choropleth).
   ============================================================ */

:root {
  --bg:        #ffffff;
  --bg-2:      #f6f7f9;
  --bg-3:      #eef1f4;
  --line:      #e3e6ea;
  --line-2:    #d3d8df;
  --ink:       #15181d;
  --ink-2:     #3d4654;
  --muted:     #6b7280;
  --faint:     #9aa3b0;
  --accent:    #2457d6;
  --accent-2:  #1d4ed8;
  --accent-wash: #eef3fe;
  --ocean:     #eef2f6;
  --land-blank:#dde2e8;
  --shadow:    0 10px 30px -16px rgba(20,30,55,.28);
  --font-sans: "IBM Plex Sans", system-ui, sans-serif;
  --font-mono: "Roboto Mono", ui-monospace, monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }   /* beat class rules that set display */
html { scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

.wrap { max-width: 1040px; margin: 0 auto; padding: 0 28px; }

/* ---- masthead ---- */
.masthead {
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; background: rgba(255,255,255,.9);
  backdrop-filter: saturate(180%) blur(8px); z-index: 20;
}
.masthead .wrap {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: 10px; padding-bottom: 10px;
}
.brand {
  font-family: var(--font-sans);
  font-size: 14px; letter-spacing: 0; font-weight: 700; color: var(--ink);
  display: inline-flex; align-items: center; gap: 9px;
}
.brand .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--accent); }
a.brand { text-decoration: none; cursor: pointer; transition: opacity .12s ease; }
a.brand:hover { opacity: .62; }
.brand-logo { width: 22px; height: 22px; flex: none; display: block; }
.masthead .meta {
  font-family: var(--font-mono);
  font-size: 11px; letter-spacing: .08em; color: var(--faint);
  margin-left: auto; margin-right: 14px;   /* push the tagline right, up against Sign in */
}

/* ---- screens ---- */
.screen { display: none; padding: 64px 0 96px; }
.screen.active { display: block; animation: fade .45s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---- shared label ---- */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--accent); font-weight: 500; margin-bottom: 20px;
  display: flex; align-items: center; gap: 8px;
}
.eyebrow::before { content: ""; width: 14px; height: 2px; background: var(--accent); }

/* ============ INTRO ============ */
/* referral landing banner - shown only when arriving via an affiliate ?ref= link */
.referral-banner {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 28px; padding: 13px 18px;
  background: var(--accent-wash); border: 1px solid var(--line);
  border-left: 3px solid var(--accent); border-radius: 10px;
}
.referral-banner[hidden] { display: none; }
.referral-mark { color: var(--accent); font-size: 18px; line-height: 1; font-weight: 700; }
.referral-text { font-size: 15px; color: var(--ink-2); margin: 0; }
.referral-text strong { color: var(--accent); font-weight: 600; }

.hero-title {
  font-family: var(--font-sans); font-weight: 600;
  font-size: clamp(34px, 5.6vw, 58px);
  line-height: 1.05; letter-spacing: -.025em; color: var(--ink);
  margin-bottom: 24px; max-width: 18ch;
}
.hero-title em { font-style: normal; color: var(--accent); }

.lede { font-size: clamp(16px, 1.9vw, 19px); max-width: 62ch; color: var(--ink-2); margin-bottom: 16px; }
.lede.sub { color: var(--muted); font-size: 16.5px; max-width: 64ch; }

.method {
  margin: 40px 0;
  display: grid; grid-template-columns: repeat(3, 1fr);
  border: 1px solid var(--line); border-radius: 10px; overflow: hidden;
  background: var(--bg);
}
.method .step { padding: 24px 22px; border-right: 1px solid var(--line);
  transition: background .18s, box-shadow .18s; position: relative; }
.method .step:last-child { border-right: none; }
.method .step:hover { background: var(--accent-wash); }
.method .step:hover::after {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--c-method);
}
.method .num {
  font-family: var(--font-sans); font-size: 11px; letter-spacing: .06em;
  color: var(--c-method); font-weight: 600; margin-bottom: 12px;
}
.method h3 { font-size: 17px; font-weight: 600; margin-bottom: 6px; color: var(--ink); }
.method p { font-size: 14.5px; color: var(--muted); }

/* the closing call-to-action - centred and given room to breathe */
.start-row {
  margin: 16px auto 0; text-align: center; max-width: 680px;
  padding: 24px 26px 26px; border: 1px solid #c3d4f6; border-radius: 16px;
  background: linear-gradient(165deg, #e7efff 0%, #f3f8ff 45%, #ffffff 100%);
  box-shadow: 0 24px 50px -28px rgba(36, 87, 214, .42);
}
.start-kicker {
  display: inline-block; font-family: var(--font-mono); font-size: 11px; letter-spacing: .08em;
  text-transform: uppercase; color: var(--accent); font-weight: 600;
  background: #fff; border: 1px solid var(--accent-wash); border-radius: 99px;
  padding: 5px 12px; margin-bottom: 14px;
}
.start-head {
  font-size: clamp(21px, 2.6vw, 27px); font-weight: 700; letter-spacing: -.02em;
  color: var(--ink); margin-bottom: 6px;
}
.start-label {
  display: block; font-size: 14px; color: var(--muted); margin-bottom: 14px;
}
.lens-toggle {
  display: inline-flex; gap: 5px; margin: 0 auto 16px; padding: 5px;
  background: #fff; border: 1px solid var(--line); border-radius: 12px;
}
.lens-opt {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 8px 18px; border: none; background: transparent; border-radius: 8px;
  cursor: pointer; font-family: var(--font-sans); font-size: 14px; font-weight: 600;
  color: var(--muted); transition: background .15s, color .15s;
}
.lens-opt small { font-family: var(--font-mono); font-size: 10px; letter-spacing: .03em; font-weight: 500; opacity: .85; }
.lens-opt.on { background: var(--accent); color: #fff; }
.lens-opt:not(.on):hover { background: var(--bg-3); color: var(--ink); }
/* three even, inline options - recommended one emphasised */
.start-buttons {
  display: grid; grid-template-columns: 1fr; gap: 12px;
  align-items: stretch; width: 100%; max-width: 560px; margin: 0 auto;   /* match the extended button */
}
.start-buttons .btn { text-align: center; position: relative; padding: 12px 14px; font-size: 15px; }
.start-buttons .btn.primary {
  box-shadow: 0 14px 30px -12px rgba(36, 87, 214, .65); transform: translateY(-2px);
}
.start-buttons .btn.primary:hover { transform: translateY(-4px); }
.rec {
  display: block; font-size: 9px; font-weight: 700; letter-spacing: .1em;
  text-transform: uppercase; margin-bottom: 5px; opacity: .95;
}
.btn {
  font-family: var(--font-sans);
  font-size: 14px; font-weight: 500; letter-spacing: 0;
  padding: 13px 22px; cursor: pointer; border-radius: 8px;
  background: var(--bg); color: var(--ink);
  border: 1px solid var(--line-2);
  transition: border-color .18s, background .18s, transform .18s, box-shadow .18s;
}
.btn:hover { border-color: var(--accent); transform: translateY(-1px); box-shadow: var(--shadow); }
.btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.btn.primary {
  background: var(--accent); color: #fff; border-color: var(--accent); font-weight: 600;
}
.btn.primary:hover { background: var(--accent-2); border-color: var(--accent-2); }
.btn small { display: block; font-size: 11px; font-weight: 400; opacity: .7; margin-top: 2px; }

.ethics {
  margin: 28px 0 0; padding: 22px 30px; border-radius: 12px;
  border: 1px solid var(--line); background: var(--bg-2);
  font-size: 14px; color: var(--muted); max-width: none; text-align: center;
}
.ethics a { display: inline-block; margin-top: 4px; }
.ethics strong { color: var(--ink); font-weight: 600; }

/* ---- hero layout: copy + sample map ---- */
.intro-hero {
  display: grid; grid-template-columns: 1.05fr .95fr; gap: 48px;
  align-items: center; margin-bottom: 8px;
}
.intro-copy .lede:last-child { margin-bottom: 0; }
.intro-figure { margin: 0; }
#hero-map {
  position: relative; width: 100%;
  border: 1px solid var(--line); border-radius: 14px;
  background: var(--ocean); overflow: hidden;
  box-shadow: var(--shadow);
}
#hero-map svg { display: block; }
#hero-map .ocean { fill: var(--ocean); }
#hero-map .graticule { fill: none; stroke: rgba(20,30,55,.06); stroke-width: .5; }
#hero-map .land { stroke: #fff; stroke-width: .5; }
#hero-map .land[data-active="1"] { stroke: rgba(255,255,255,.9); stroke-width: .7; }
/* graceful fallback if the geometry can't load (offline) */
#hero-map.hero-failed { aspect-ratio: 1 / .66; display: grid; place-items: center; }
#hero-map.hero-failed::after {
  content: "🌍"; font-size: 84px; opacity: .5;
}
.hero-legend {
  display: flex; align-items: center; gap: 9px; margin-top: 12px;
  font-family: var(--font-mono); font-size: 11px; letter-spacing: .06em;
  text-transform: uppercase; color: var(--faint);
}
.hero-legend-bar {
  width: 70px; height: 7px; border-radius: 99px;
  background: linear-gradient(90deg,#d73027,#fee08b,#1a9850);
}
.hero-legend em {
  margin-left: auto; font-style: italic; text-transform: none;
  letter-spacing: 0; color: var(--muted);
}

/* ---- hero call-to-action under the map ---- */
.hero-cta { width: 100%; margin-top: 16px; padding: 16px; font-size: 16px; }
.hero-cta-note {
  margin-top: 10px; text-align: center;
  font-family: var(--font-mono); font-size: 12px; letter-spacing: .02em; color: var(--faint);
}
.hero-cta-note a { color: var(--accent); text-decoration: none; font-weight: 500; }
.hero-cta-note a:hover { text-decoration: underline; }

/* ---- closing block: outcomes (left) + start CTA (right) ---- */
.closer {
  display: grid; grid-template-columns: 1.1fr 1fr; gap: 32px;
  align-items: stretch; margin: 6px 0 0;
}
.closer-left { display: flex; }
.closer-right { display: flex; }
.closer-right .start-row {
  margin: 0; max-width: none; width: 100%;
  display: flex; flex-direction: column; justify-content: center;
}

/* ---- outcomes (what you'll walk away with) ---- */
.outcomes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 36px; }
/* stacked column fills the left side so its cards match the height of the right card */
.outcomes--stacked { flex: 1; display: flex; flex-direction: column; gap: 14px; margin-bottom: 0; }
.outcomes--stacked .outcome { flex: 1; display: grid; grid-template-columns: auto 1fr; gap: 12px 16px; align-content: center; padding: 22px 24px; }
.outcomes--stacked .outcome-mark { margin-bottom: 0; grid-row: span 2; }
.outcomes--stacked .outcome h3 { margin-bottom: 4px; }
.outcome {
  border: 1px solid var(--line); border-radius: 12px; padding: 24px 22px; background: var(--bg-2);
  transition: transform .18s, border-color .18s, box-shadow .18s, background .18s;
}
.outcome-mark {
  display: inline-grid; place-items: center; width: 44px; height: 44px; margin-bottom: 14px;
  border-radius: 12px; background: #e7f3ec; color: var(--c-reward);
  transition: transform .18s;
}
.outcome-mark svg { width: 23px; height: 23px; }
.outcome h3 { font-size: 17px; font-weight: 600; margin-bottom: 6px; }
.outcome p { font-size: 14.5px; color: var(--muted); }
.outcome:hover {
  transform: translateY(-4px); border-color: var(--c-reward); background: var(--bg);
  box-shadow: 0 16px 36px -20px rgba(47,143,91,.5);
}
.outcome:hover .outcome-mark { transform: scale(1.08) rotate(-4deg); }

/* ---- flag marquee ---- */
.flag-strip {
  margin: 40px 0 4px; padding: 14px 0;
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.flag-track {
  display: flex; gap: 26px; width: max-content;
  animation: marquee 60s linear infinite;
}
.flag-strip:hover .flag-track { animation-play-state: paused; }
.flag-chip { font-size: 26px; line-height: 1; filter: grayscale(.15); opacity: .9; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ============ CONSENT / PARTICIPATION ============ */
.consent-wrap { padding-top: 40px; }
.turnstile-wrap { margin: 24px 0 4px; }
.turnstile-box { min-height: 0; }
.turnstile-box:empty { display: none; }
.turnstile-wrap .note { margin: 8px 0 0; color: #d8392b; font-size: 13px; }
.consent-choice { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin: 24px 0 0; }
.consent-card {
  position: relative; text-align: left; cursor: pointer;
  border: 1px solid var(--line-2); border-radius: 14px; background: var(--bg);
  padding: 26px 24px; display: flex; flex-direction: column; gap: 8px;
  transition: transform .18s, border-color .18s, box-shadow .18s, background .18s;
  font-family: var(--font-sans);
}
.consent-card:hover { transform: translateY(-3px); border-color: var(--accent); box-shadow: var(--shadow); }
.consent-card:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.consent-card.recommended { border-color: var(--accent); background: linear-gradient(165deg, #eef3fe, var(--bg) 70%); }
.consent-ic { width: 34px; height: 34px; color: var(--accent); }
.consent-ic svg { width: 100%; height: 100%; }
.consent-card strong { font-size: 19px; font-weight: 700; color: var(--ink); }
.consent-card span:not(.consent-ic):not(.consent-tag) { font-size: 14.5px; color: var(--muted); }
.consent-tag {
  position: absolute; top: 14px; right: 14px; font-family: var(--font-mono);
  font-size: 10px; letter-spacing: .08em; text-transform: uppercase; font-weight: 600;
  color: #fff; background: var(--accent); padding: 3px 9px; border-radius: 99px;
}

.study-form {
  margin-top: 22px; border: 1px solid var(--line); border-radius: 14px;
  background: var(--bg-2); padding: 24px 26px; scroll-margin-top: 76px;
}
.study-intro { font-size: 14.5px; color: var(--ink-2); margin-bottom: 18px; max-width: 62ch; }
.study-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.study-grid label { display: block; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.study-grid select, .study-grid input {
  width: 100%; margin-top: 6px; padding: 11px 12px; border: 1px solid var(--line-2);
  border-radius: 8px; font-family: var(--font-sans); font-size: 14.5px; background: #fff; color: var(--ink);
}
.study-grid select:focus-visible, .study-grid input:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.study-grid .study-wide { grid-column: 1 / -1; }
.req-tag {
  font-family: var(--font-mono); font-size: 10px; letter-spacing: .08em; text-transform: uppercase;
  color: var(--accent); background: var(--accent-wash); padding: 2px 7px; border-radius: 99px;
  font-weight: 600; margin-left: 6px;
}
.study-actions { display: flex; gap: 12px; margin-top: 20px; flex-wrap: wrap; }
.study-actions .btn[type=submit] { flex: 1; }

/* how-you-compare table */
.compare { margin: 26px 0; }
#compare-table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
#compare-table th, #compare-table td { padding: 11px 12px; text-align: right; border-bottom: 1px solid var(--line); white-space: nowrap; }
#compare-table th:first-child, #compare-table td:first-child { text-align: left; }
#compare-table th {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: .04em;
  text-transform: uppercase; color: var(--faint); font-weight: 500;
}
#compare-table tr.me td { font-weight: 700; color: var(--ink); background: var(--accent-wash); }
#compare-table tr.me td:first-child { border-left: 3px solid var(--accent); }
.compare-add { margin-top: 18px; }
.compare-add label { font-size: 13px; font-weight: 600; color: var(--ink-2); display: block; }
.compare-add select {
  margin-top: 6px; padding: 9px 12px; border: 1px solid var(--line-2); border-radius: 7px;
  font-family: var(--font-sans); font-size: 14px; background: #fff; color: var(--ink); min-width: 240px;
}

/* ============ TRIAL ============ */
/* one-screen layout: the active quiz fills the viewport, footer sits at the end */
body { display: flex; flex-direction: column; }
main { flex: 1 0 auto; display: flex; flex-direction: column; }
.screen.active { flex: 1 0 auto; }
.screen[data-screen="trial"].active { display: flex; flex-direction: column; align-items: center; }
.trial-wrap { flex: 1; display: flex; flex-direction: column; width: 100%; }
.trial-body { margin: auto 0; width: 100%; padding: 12px 0; }

.trial-head {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  font-family: var(--font-mono); font-size: 12px; letter-spacing: .06em;
  text-transform: uppercase; color: var(--faint); margin-bottom: 14px;
}
.trial-head .count { flex: 1; text-align: center; }
.trial-head .count em { color: var(--accent); font-style: normal; font-weight: 600; }
.trial-back {
  font-family: var(--font-mono); font-size: 12px; letter-spacing: .04em;
  background: none; border: 1px solid var(--line-2); border-radius: 7px;
  padding: 6px 12px; color: var(--ink-2); cursor: pointer; white-space: nowrap;
  transition: border-color .18s, color .18s;
}
.trial-back:hover { border-color: var(--accent); color: var(--accent); }
.timer-num { white-space: nowrap; min-width: 34px; text-align: right; }
.timer-num em { font-style: normal; font-weight: 600; color: var(--accent); }

.progress { height: 3px; background: var(--bg-3); border-radius: 99px; margin-bottom: 7px; overflow: hidden; }
#progress-fill { height: 100%; background: var(--line-2); width: 0;
  transition: width .45s cubic-bezier(.3,.8,.3,1); }

/* countdown bar - the prominent one */
.timer { height: 5px; background: var(--bg-3); border-radius: 99px; margin-bottom: 40px; overflow: hidden; }
#timer-fill { height: 100%; width: 100%; background: var(--accent); border-radius: 99px; }
#timer-fill.urgent { background: #d8392b; }

.prompt {
  text-align: center; margin: 0 auto 44px; max-width: 28ch;
  font-family: var(--font-sans); font-weight: 600;
  font-size: clamp(24px, 3.8vw, 38px); line-height: 1.2; letter-spacing: -.02em;
  color: var(--ink);
}
#prompt-tail { color: var(--accent); }

.choices {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: stretch;
  max-width: 820px; margin: 0 auto; gap: 16px;
}
.versus {
  align-self: center; font-family: var(--font-mono); font-size: 13px;
  letter-spacing: .1em; text-transform: uppercase; color: var(--faint);
}
.choice {
  font-family: var(--font-sans);
  background: var(--bg); border: 1px solid var(--line); border-radius: 12px;
  color: var(--ink);
  padding: 44px 26px; cursor: pointer; text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  transition: transform .18s, border-color .18s, box-shadow .18s;
  animation: cardIn .4s both ease;
}
@keyframes cardIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.choice:hover { border-color: var(--accent); transform: translateY(-3px); box-shadow: var(--shadow); }
.choice:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.choice-flag { font-size: 56px; line-height: 1; }
.choice-name { font-size: 24px; font-weight: 600; letter-spacing: -.01em; }
.choice-region {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: .1em;
  text-transform: uppercase; color: var(--faint);
}
.choice.chosen { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-wash), var(--shadow);
  transform: translateY(-3px); }
.choice.rejected { opacity: .35; transform: scale(.98); }
.choices.timed-out .choice { opacity: .4; border-color: #e7bcbc; pointer-events: none; }

.trial-foot {
  text-align: center; margin-top: 34px; font-family: var(--font-mono);
  font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--faint);
}
.timeout-note { display: block; margin-top: 6px; color: #d8392b; font-weight: 600;
  opacity: 0; transition: opacity .2s; }
.timeout-note.show { opacity: 1; }

/* ============ RESULTS ============ */
.results-head { margin-bottom: 28px; }
.results-title {
  font-family: var(--font-sans); font-weight: 600;
  font-size: clamp(28px, 4.4vw, 44px); line-height: 1.05; letter-spacing: -.025em;
  margin-bottom: 16px; color: var(--ink);
}
#verdict { font-size: 18px; max-width: 62ch; color: var(--ink-2); }

.map-shell {
  position: relative; margin: 28px 0 14px;
  border: 1px solid var(--line); border-radius: 12px;
  background: var(--ocean); overflow: hidden;
}
#map { position: relative; width: 100%; }
.map-loading {
  font-family: var(--font-mono); font-size: 13px; letter-spacing: .04em;
  color: var(--muted); padding: 80px 20px; text-align: center;
}
#map .ocean, #agg-map .ocean { fill: var(--ocean); }
#map .graticule, #agg-map .graticule { fill: none; stroke: rgba(20,30,55,.06); stroke-width: .5; }
#map .land, #agg-map .land { stroke: #fff; stroke-width: .5; transition: opacity .2s; }
#map .land[data-active="1"], #agg-map .land[data-active="1"] { stroke: rgba(255,255,255,.9); stroke-width: .7; cursor: pointer; }
.map-tip {
  position: absolute; pointer-events: none; opacity: 0;
  transform: translate(-50%, -130%);
  background: #fff; border: 1px solid var(--line-2); border-radius: 7px;
  color: var(--ink); padding: 7px 11px; font-size: 13px; box-shadow: var(--shadow);
  white-space: nowrap; transition: opacity .12s; z-index: 5;
}
.map-tip strong { color: var(--accent); }
.legend {
  display: flex; align-items: center; gap: 10px; padding: 12px 16px;
  font-family: var(--font-mono); font-size: 11px; letter-spacing: .06em;
  text-transform: uppercase; color: var(--faint);
}
.legend-bar {
  width: 180px; height: 8px; border-radius: 99px;
  background: linear-gradient(90deg,
    #a50026, #d73027, #f46d43, #fdae61, #fee08b,
    #d9ef8b, #a6d96a, #66bd63, #1a9850, #006837);
}
.legend-note { margin-left: auto; text-transform: none; letter-spacing: 0; color: var(--muted); }

.statstrip { display: flex; border: 1px solid var(--line); border-radius: 10px; margin: 8px 0 26px; overflow: hidden; }
.statstrip .stat { flex: 1; padding: 20px 24px; border-right: 1px solid var(--line); }
.statstrip .stat:last-child { border-right: none; }
.statstrip .v { font-family: var(--font-sans); font-size: 34px; font-weight: 600; color: var(--accent); line-height: 1; letter-spacing: -.02em; }
.statstrip .k { font-family: var(--font-mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); margin-top: 8px; }

.panels { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; margin: 28px 0; }
.panel { border: 1px solid var(--line); border-radius: 10px; background: var(--bg); padding: 22px 24px;
  transition: border-color .18s, box-shadow .18s; }
.panel:hover { border-color: var(--line-2); box-shadow: var(--shadow); }
.panel h3 {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: .1em;
  text-transform: uppercase; color: var(--accent); margin-bottom: 14px; font-weight: 500;
  display: flex; align-items: center; gap: 10px;
}
.panel h3::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.rank-list { list-style: none; }
.rank-list li {
  display: flex; justify-content: space-between; align-items: center;
  padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 16px;
}
.rank-list li:last-child { border-bottom: none; }
.rank-list em { font-family: var(--font-mono); font-style: normal; font-size: 13px; color: var(--muted); }

#regions { list-style: none; }
#regions li { display: grid; grid-template-columns: 110px 1fr 44px; align-items: center; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); }
#regions li:last-child { border-bottom: none; }
.reg-name { font-size: 14.5px; }
.reg-bar { height: 7px; background: var(--bg-3); border-radius: 99px; position: relative; overflow: hidden; }
.reg-bar i { position: absolute; inset: 0 auto 0 0; background: var(--accent); display: block; }
#regions em { font-family: var(--font-mono); font-style: normal; font-size: 12px; color: var(--muted); text-align: right; }

.debrief {
  border: 1px solid var(--line); border-radius: 10px; padding: 20px 26px;
  background: var(--bg-2); font-size: 15px; color: var(--muted); max-width: none; margin-bottom: 28px;
}
.debrief strong { color: var(--ink); }
.elo-note {
  font-size: 12.5px; color: var(--muted); margin: -14px 0 26px; line-height: 1.55;
}
.elo-note a { color: var(--accent); text-decoration: none; }
.elo-note a:hover { text-decoration: underline; }

.result-actions { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.redo-note { font-size: 13px; color: var(--muted); }

footer {
  border-top: 1px solid var(--line); padding: 24px 0; margin-top: 40px;
}
footer .wrap {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px;
  font-family: var(--font-mono); font-size: 11px; letter-spacing: .04em; color: var(--faint);
}
footer a { color: var(--muted); text-decoration: none; }
footer a:hover { color: var(--accent); }

/* ============ SECTIONS / BIAS CARDS (intro) ============ */
/* three section identities, colour-coded: mechanism (blue), bias (amber), reward (green) */
:root { --c-method: #2457d6; --c-bias: #c0822f; --c-reward: #2f8f5b; }

.section-title {
  font-size: clamp(22px, 3vw, 30px); font-weight: 600; letter-spacing: -.02em;
  margin: 56px 0 8px; color: var(--ink);
  display: flex; align-items: center; gap: 14px;
}
.section-title::before {
  content: ""; width: 6px; height: 1.05em; border-radius: 3px; background: var(--accent); flex: none;
}
.st-method::before  { background: var(--c-method); }
.st-bias::before    { background: var(--c-bias); }
.st-reward::before  { background: var(--c-reward); }
.section-sub { color: var(--muted); font-size: 16px; max-width: 64ch; margin-bottom: 24px; }

/* --- biases as an auto-advancing carousel (amber identity) --- */
.carousel { position: relative; margin-bottom: 8px; }
.carousel-viewport { overflow: hidden; }
.carousel-track {
  display: flex; gap: 20px; padding-inline: 9%;
  overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth;
  scrollbar-width: none; -ms-overflow-style: none;
}
.carousel-track::-webkit-scrollbar { display: none; }
.bias-slide {
  flex: 0 0 82%; scroll-snap-align: center; position: relative; overflow: hidden;
  display: flex; gap: 22px; align-items: flex-start;
  border: 1px solid var(--line); border-radius: 16px;
  background: linear-gradient(135deg, #fdf8ef, var(--bg) 60%);
  padding: 34px 38px; min-height: 210px;
  box-shadow: 0 18px 44px -30px rgba(192,130,47,.5);
}
.bias-slide::before {
  content: ""; position: absolute; top: 0; left: 0; width: 4px; height: 100%; background: var(--c-bias);
}
.bias-icon { flex: none; width: 60px; height: 60px; color: var(--c-bias); }
.bias-icon svg { width: 100%; height: 100%; }
.bias-num {
  display: block; font-family: var(--font-mono); font-size: 12px; letter-spacing: .16em;
  text-transform: uppercase; color: var(--c-bias); font-weight: 600; margin-bottom: 8px;
}
.bias-name {
  font-size: clamp(23px, 3.4vw, 33px); font-weight: 700; letter-spacing: -.025em;
  line-height: 1.05; margin-bottom: 10px; color: var(--ink);
}
.bias-headline { font-size: clamp(15px, 1.9vw, 18px); font-weight: 600; color: var(--ink-2); margin-bottom: 10px; }
.bias-desc { font-size: 14.5px; color: var(--muted); line-height: 1.6; max-width: 56ch; }

.carousel-arrow {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 3;
  width: 44px; height: 44px; border-radius: 50%; cursor: pointer;
  border: 1px solid var(--line-2); background: #fff; color: var(--ink);
  font-size: 22px; line-height: 1; display: grid; place-items: center;
  box-shadow: var(--shadow); transition: border-color .18s, color .18s, transform .18s;
}
.carousel-arrow:hover { border-color: var(--c-bias); color: var(--c-bias); transform: translateY(-50%) scale(1.08); }
.carousel-arrow.prev { left: 2%; }
.carousel-arrow.next { right: 2%; }
.carousel-dots { display: flex; justify-content: center; gap: 9px; margin-top: 20px; }
.carousel-dots button {
  width: 9px; height: 9px; border-radius: 50%; border: none; cursor: pointer; padding: 0;
  background: var(--line-2); transition: background .2s, width .2s;
}
.carousel-dots button.on { background: var(--c-bias); width: 26px; border-radius: 99px; }

/* ============ ARCHETYPE CARD ============ */
.type-card {
  --type-accent: var(--accent);
  /* whole card tinted with the type's own accent (the cropped artwork carries
     the same faint wash, so the illustration melts into the card) */
  --type-wash: color-mix(in srgb, var(--type-accent) 7%, var(--bg));
  display: flex; border: 1px solid color-mix(in srgb, var(--type-accent) 30%, var(--line));
  border-radius: 16px; overflow: hidden;
  background: var(--type-wash); box-shadow: var(--shadow); margin: 8px 0 12px;
}
.type-band { width: 12px; flex: none; background: var(--type-accent); }
.type-body { padding: 30px 34px 32px; min-width: 0; }   /* allow shrink below content width on mobile */
.type-head { display: flex; align-items: center; gap: 18px; margin-bottom: 16px; }
.type-figure { flex: none; width: 168px; color: var(--type-accent); }
.type-figure svg { width: 100%; height: auto; display: block; }
.type-art { width: 100%; height: auto; display: block; border-radius: 10px; }
.type-head .type-name { margin-bottom: 6px; }
.type-head .type-tagline { margin-bottom: 0; }
.type-code {
  font-family: var(--font-mono); font-size: 12px; letter-spacing: .14em;
  color: var(--type-accent); font-weight: 600; margin-bottom: 10px;
}
.type-name {
  font-size: clamp(28px, 4.6vw, 46px); font-weight: 700; letter-spacing: -.03em;
  line-height: 1.02; margin-bottom: 10px; color: var(--ink);
}
.type-tagline { font-size: 19px; color: var(--type-accent); font-weight: 600; margin-bottom: 16px; }
.type-blurb { font-size: 17px; color: var(--ink-2); max-width: 64ch; margin-bottom: 20px; line-height: 1.6; }
.type-catch {
  border: 1px solid color-mix(in srgb, var(--type-accent) 22%, var(--line));
  border-left: 3px solid var(--type-accent);
  border-radius: 8px; background: color-mix(in srgb, var(--type-accent) 12%, var(--bg));
  padding: 14px 18px; font-size: 15px; color: var(--muted); max-width: 70ch;
}
.type-catch span {
  display: block; font-family: var(--font-mono); font-size: 11px; letter-spacing: .12em;
  text-transform: uppercase; color: var(--ink); font-weight: 600; margin-bottom: 6px;
}
.type-context {
  margin: 22px 0 0; padding-top: 20px; border-top: 1px solid var(--line);
  font-size: 15.5px; line-height: 1.62; color: var(--ink-2); max-width: 70ch;
}
.type-context:empty { display: none; }
.type-context strong { color: var(--ink); font-weight: 600; }

/* ---- cultural summary (free, specific to the result) ---- */
.cultural-summary {
  font-size: 17px; line-height: 1.6; color: var(--ink-2); max-width: 70ch;
  margin: 18px 0 4px; padding-left: 16px; border-left: 3px solid var(--accent);
}
.cultural-summary strong { color: var(--ink); }

/* ============ PAID GUIDE ============ */
.guide-offer {
  margin: 30px 0; border: 1px solid var(--line); border-radius: 14px;
  background: linear-gradient(180deg, var(--accent-wash), var(--bg) 70%);
  padding: 28px 30px;
}
.price-tag {
  font-family: var(--font-mono); font-size: 14px; font-weight: 600; color: #fff;
  background: var(--accent); padding: 3px 10px; border-radius: 99px; vertical-align: middle; margin-left: 8px;
}
#guide-locked > p { font-size: 16px; color: var(--ink-2); max-width: 66ch; }
.guide-teaser { list-style: none; margin: 16px 0 20px; padding: 0; display: grid; gap: 8px; }
.guide-teaser li { position: relative; padding-left: 26px; font-size: 15px; color: var(--ink-2); }
.guide-teaser li::before { content: "✓"; position: absolute; left: 4px; color: var(--accent); font-weight: 700; }
#buy-guide { font-size: 16px; padding: 15px 28px; }

.guide-unlocked { animation: fade .4s ease; }
.guide-deliver {
  border: 1px solid var(--accent); border-radius: 12px; background: var(--accent-wash);
  padding: 20px 22px; margin-bottom: 26px;
}
.guide-deliver h3 { font-size: 17px; font-weight: 600; margin-bottom: 6px; }
.guide-deliver > p { font-size: 14px; color: var(--ink-2); margin-bottom: 14px; max-width: 60ch; }
.guide-email-form { display: flex; gap: 10px; flex-wrap: wrap; }
.guide-email-form input {
  flex: 1; min-width: 220px; padding: 12px 14px; border: 1px solid var(--line-2);
  border-radius: 8px; font-family: var(--font-sans); font-size: 15px; background: #fff; color: var(--ink);
}
.guide-email-form input:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.guide-section { margin-bottom: 26px; }
.guide-section h3 { font-size: 20px; font-weight: 600; margin-bottom: 10px; color: var(--ink); }
.guide-section > p { font-size: 16px; line-height: 1.65; color: var(--ink-2); max-width: 70ch; }
.guide-sub { color: var(--muted) !important; font-size: 14.5px !important; margin-bottom: 14px; }
.guide-mech {
  border: 1px solid var(--line); border-left: 3px solid var(--accent); border-radius: 9px;
  background: var(--bg); padding: 16px 20px; margin-bottom: 12px;
}
.guide-mech h4 { font-size: 16px; font-weight: 600; margin-bottom: 7px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.guide-mech p { font-size: 14.5px; color: var(--ink-2); line-height: 1.6; }
.guide-cite {
  font-family: var(--font-mono); font-size: 10px; letter-spacing: .04em; color: var(--accent);
  background: var(--accent-wash); padding: 2px 8px; border-radius: 99px; font-weight: 600;
}
.guide-honest { border: 1px solid var(--line); border-radius: 10px; background: var(--bg-2); padding: 18px 22px; }
.guide-actions { margin: 6px 0 0; padding-left: 0; list-style: none; display: grid; gap: 10px; }
.guide-actions li { position: relative; padding-left: 22px; font-size: 15px; color: var(--ink-2); line-height: 1.55; }
.guide-actions li::before { content: "→"; position: absolute; left: 0; color: var(--accent); font-weight: 700; }
.guide-refs { font-size: 12.5px; color: var(--muted); font-family: var(--font-mono); margin-top: 16px; }
.guide-refs a { color: var(--accent); }

/* ============ RESULTS IN-PAGE NAV ============ */
.results-nav {
  position: sticky; top: 43px; z-index: 15; margin-bottom: 14px;
  background: rgba(255, 255, 255, .92); backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid var(--line);
}
.results-nav-inner {
  display: flex; gap: 4px; justify-content: center; flex-wrap: wrap;
  padding-top: 6px; padding-bottom: 6px;
  scrollbar-width: none; -ms-overflow-style: none;
}
.results-nav-inner::-webkit-scrollbar { display: none; }
.results-nav a {
  font-family: var(--font-mono); font-size: 12px; letter-spacing: .03em; color: var(--muted);
  text-decoration: none; padding: 7px 13px; border-radius: 99px; white-space: nowrap;
  transition: background .15s, color .15s;
}
.results-nav a:hover { background: var(--bg-3); color: var(--ink); }
.results-nav a.active { background: var(--accent); color: #fff; }
#r-type, #r-breakdown, #r-map, #r-compare, #r-guide, #r-world { scroll-margin-top: 112px; }

/* ============ PURCHASE MODAL (popout) ============ */
.modal-overlay {
  position: fixed; inset: 0; z-index: 1000; padding: 20px;
  background: rgba(12, 18, 30, .55); backdrop-filter: blur(3px);
  display: flex; align-items: center; justify-content: center; animation: fade .2s ease;
}
.modal {
  position: relative; background: var(--bg); border-radius: 16px; width: 100%; max-width: 560px;
  max-height: 90vh; overflow-y: auto; padding: 34px 36px;
  box-shadow: 0 40px 90px -30px rgba(0, 0, 0, .6); animation: rise .25s cubic-bezier(.2,.7,.2,1);
}
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.modal-close {
  position: absolute; top: 14px; right: 16px; width: 34px; height: 34px; border-radius: 50%;
  border: 1px solid var(--line); background: var(--bg); color: var(--muted);
  font-size: 22px; line-height: 1; cursor: pointer; display: grid; place-items: center; z-index: 2;
}
.modal-close:hover { border-color: var(--accent); color: var(--accent); }
.modal-title { font-size: 26px; font-weight: 700; letter-spacing: -.02em; margin-bottom: 8px; color: var(--ink); }
.modal-lede { font-size: 15px; color: var(--ink-2); margin-bottom: 18px; max-width: 48ch; }
#pay-area { margin: 18px 0; min-height: 6px; }
.pay-sim {
  border: 1px dashed var(--line-2); border-radius: 10px; padding: 16px; background: var(--bg-2);
  font-size: 14px; color: var(--muted);
}
#pay-btn { width: 100%; font-size: 16px; padding: 14px; }
.modal-secure { font-size: 12px; color: var(--faint); text-align: center; margin-top: 12px; }

/* coupon redemption (free unlock) inside the purchase modal */
.coupon-block { margin-top: 22px; padding-top: 20px; border-top: 1px solid var(--line); }
.coupon-divider {
  text-align: center; font-size: 13px; color: var(--muted); margin-bottom: 14px;
  text-transform: lowercase; letter-spacing: .02em;
}
.coupon-block #coupon-turnstile-box { margin-bottom: 12px; }
.coupon-block #coupon-turnstile-box:empty { display: none; }
.coupon-form { display: flex; gap: 10px; }
#coupon-input {
  flex: 1; min-width: 0; padding: 12px 13px; font-size: 15px;
  border: 1px solid var(--line-2); border-radius: 10px; background: var(--bg);
  color: var(--ink); text-transform: uppercase; letter-spacing: .04em;
}
#coupon-input::placeholder { text-transform: none; letter-spacing: normal; color: var(--muted); }
#coupon-input:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }
#coupon-btn { flex: none; padding: 12px 20px; }
#coupon-note { margin: 10px 0 0; font-size: 13.5px; }

#modal-guide .guide-deliver { margin-top: 6px; }
.modal-sm { max-width: 420px; padding: 30px 32px; }
.confirm-actions { display: flex; gap: 12px; margin-top: 22px; }
.confirm-actions .btn { flex: 1; }

/* ============ DIMENSION BARS (16P-style) ============ */
.block-title { font-size: 20px; font-weight: 600; letter-spacing: -.01em; margin: 36px 0 16px; color: var(--ink); }
.dimensions { display: grid; gap: 22px; }
.dim {
  border: 1px solid var(--line); border-radius: 12px; padding: 18px 22px 20px; background: var(--bg);
}
.dim-top {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px; margin-bottom: 12px;
}
.dim-side { font-size: 14px; color: var(--faint); font-weight: 500; }
.dim-side.right { text-align: right; }
.dim-side.on { color: var(--ink); font-weight: 600; }
.dim-pct {
  font-family: var(--font-mono); font-size: 13px; font-weight: 600; color: var(--accent);
  white-space: nowrap;
}
.dim-track {
  position: relative; height: 8px; border-radius: 99px; background: var(--bg-3);
  background-image: linear-gradient(90deg, var(--bg-3), #cdd6e4);
}
.dim-track i {
  position: absolute; top: 50%; width: 18px; height: 18px; border-radius: 50%;
  background: var(--accent); border: 3px solid #fff; box-shadow: var(--shadow);
  transform: translate(-50%, -50%);
}
.dim-blurb { margin-top: 12px; font-size: 14px; color: var(--muted); }

/* ============ ACTIONS / AGGREGATE ============ */
.actions-block {
  display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin: 8px 0 30px;
}
.action-col {
  border: 1px solid var(--line); border-radius: 12px; padding: 22px 24px; background: var(--bg-2);
}
.action-col h4 { font-size: 16px; font-weight: 600; margin-bottom: 6px; }
.action-col > p { font-size: 14px; color: var(--muted); margin-bottom: 16px; }
.action-col .note { margin-top: 12px; margin-bottom: 0; font-size: 13.5px; color: var(--ink-2); }
.optional-tag {
  font-family: var(--font-mono); font-size: 10px; letter-spacing: .08em; text-transform: uppercase;
  color: var(--muted); background: var(--bg-3); padding: 2px 8px; border-radius: 99px;
  font-weight: 500; vertical-align: middle; margin-left: 6px;
}
.demographics { display: grid; gap: 12px; margin-top: 4px; }
.demographics > label { display: block; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.demographics select {
  width: 100%; margin-top: 5px; padding: 9px 11px; border: 1px solid var(--line-2);
  border-radius: 7px; font-family: var(--font-sans); font-size: 14px; background: #fff; color: var(--ink);
}
.demographics select:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.demographics label.consent {
  display: flex; gap: 9px; align-items: flex-start; font-weight: 400; font-size: 13px; color: var(--muted);
}
.demographics label.consent input { margin-top: 3px; flex: none; }
.demographics button { margin-top: 2px; }
/* extended (all-countries) start option */
.extended-btn {
  display: block; width: 100%; max-width: 560px; margin: 10px auto 0; text-align: center;
  padding: 11px; border-style: dashed; border-color: var(--line-2);
}
.extended-btn:hover { border-style: solid; border-color: var(--accent); }
.extended-btn .ext-label { font-weight: 600; font-size: 15px; }
.extended-btn small { display: block; opacity: .7; margin-top: 3px; }

.optin-done-msg { display: none; color: var(--c-reward); font-weight: 600; margin-top: 8px; }
#optin-block.done .demographics,
#optin-block.done > p:not(.optin-done-msg) { display: none; }
#optin-block.done .optin-done-msg { display: block; }
.aggregate { margin-top: 40px; padding-top: 30px; border-top: 1px solid var(--line); }

/* ============ METHODOLOGY PAGE ============ */
.prose .section-title { margin-top: 48px; }
.prose p { font-size: 16.5px; color: var(--ink-2); max-width: 70ch; margin-bottom: 16px; line-height: 1.65; }
.prose p strong { color: var(--ink); }
.bullets { margin: 4px 0 18px; padding-left: 0; list-style: none; max-width: 70ch; }
.bullets li {
  position: relative; padding-left: 22px; margin-bottom: 10px;
  font-size: 15.5px; color: var(--ink-2); line-height: 1.6;
}
.bullets li::before {
  content: ""; position: absolute; left: 4px; top: 10px;
  width: 6px; height: 6px; border-radius: 50%; background: var(--accent);
}
.prose sup a { color: var(--accent); text-decoration: none; font-weight: 600; padding: 0 1px; }
.prose sup a:hover { text-decoration: underline; }
.refs { margin: 8px 0 6px; padding-left: 22px; max-width: 78ch; }
.refs li {
  font-size: 14.5px; color: var(--ink-2); line-height: 1.55; margin-bottom: 12px; padding-left: 6px;
}
.refs li::marker { color: var(--accent); font-family: var(--font-mono); font-weight: 600; }
.refs a { color: var(--accent); text-decoration: none; font-family: var(--font-mono); font-size: 13px; }
.refs a:hover { text-decoration: underline; }
.refs-note { font-size: 13.5px !important; color: var(--muted) !important; font-style: italic; max-width: 78ch; }

/* ---- responsive ---- */
@media (max-width: 860px) {
  .closer { grid-template-columns: 1fr; gap: 26px; }
  .outcomes { grid-template-columns: 1fr; }
  .actions-block { grid-template-columns: 1fr; }
  .consent-choice { grid-template-columns: 1fr; }
  .study-grid { grid-template-columns: 1fr; }
  .carousel-track { padding-inline: 6%; gap: 14px; }
  .bias-slide { flex: 0 0 90%; flex-direction: column; gap: 14px; padding: 26px 26px; }
  .bias-icon { width: 48px; height: 48px; }
  .carousel-arrow { display: none; }   /* swipe + dots on touch */
  .intro-hero { grid-template-columns: 1fr; gap: 28px; }
  /* copy (headline + lede) leads; the map + its CTA follow beneath it */
}
@media (max-width: 720px) {
  .method { grid-template-columns: 1fr; }
  .method .step { border-right: none; border-bottom: 1px solid var(--line); }
  .method .step:last-child { border-bottom: none; }
  .choices { grid-template-columns: 1fr; }
  .panels { grid-template-columns: 1fr; }
  .statstrip { flex-direction: column; }
  .statstrip .stat { border-right: none; border-bottom: 1px solid var(--line); }
  .statstrip .stat:last-child { border-bottom: none; }
}

/* ---- phones ---- */
@media (max-width: 560px) {
  .wrap { padding: 0 18px; }
  .screen { padding: 40px 0 72px; }
  .section-title { margin-top: 44px; }

  /* masthead: keep the brand on one line, drop the tagline */
  .masthead .wrap { padding-top: 13px; padding-bottom: 13px; }
  .masthead .meta { display: none; }
  .brand { font-size: 12.5px; white-space: nowrap; }

  /* hero copy a touch smaller; CTA note wraps cleanly */
  .hero-title { font-size: clamp(30px, 8.5vw, 40px); }
  .hero-legend { flex-wrap: wrap; }
  .hero-legend em { margin-left: 0; width: 100%; margin-top: 4px; }

  /* archetype card: thinner band + tighter padding so text isn't cramped */
  .type-band { width: 7px; }
  .type-body { padding: 24px 22px 26px; }
  .type-head { gap: 12px; }
  .type-figure { width: 110px; }

  /* dimension bars: percentage on its own centred row, labels left/right below */
  .dim { padding: 16px 18px 18px; }
  .dim-top { grid-template-columns: 1fr 1fr; row-gap: 8px; }
  .dim-pct { grid-column: 1 / -1; order: -1; text-align: center; }
  .dim-side { font-size: 13px; }

  /* map legend wraps instead of clipping its note */
  .legend { flex-wrap: wrap; row-gap: 6px; }
  .legend-note { margin-left: 0; width: 100%; }

  /* the two action columns already stack at 860; tighten copy width */
  .result-actions { width: 100%; }
  .result-actions .btn { flex: 1 1 auto; text-align: center; }

  /* region rows: drop the fixed label column so long names don't crush the bar */
  #regions li { grid-template-columns: 92px 1fr 38px; gap: 9px; }
  .reg-name { font-size: 13.5px; }

  /* start options stay 3-up but tighter */
  .start-buttons { gap: 8px; }
  .start-buttons .btn { padding: 13px 8px; font-size: 13px; }
  .start-buttons .btn small { font-size: 10px; }
  .rec { font-size: 8px; }

  /* ---- quiz: one comfortable screen (centred; footer at the end) ---- */
  .screen[data-screen="trial"].active { padding: 20px 0 18px; }
  .trial-head { margin-bottom: 12px; font-size: 11px; }
  .trial-back { padding: 5px 10px; }
  .progress { margin-bottom: 6px; }
  .timer { margin-bottom: 30px; }
  .prompt { font-size: clamp(20px, 5.6vw, 26px); margin-bottom: 30px; max-width: 22ch; }
  .choices { grid-template-columns: 1fr auto 1fr; gap: 10px; }
  .versus { font-size: 12px; padding: 0 2px; }
  .choice { padding: 28px 12px; gap: 9px; border-radius: 12px; }
  .choice-flag { font-size: 44px; }
  .choice-name { font-size: 17px; line-height: 1.15; }
  .choice-region { font-size: 9px; }
  .trial-foot { margin-top: 22px; font-size: 10px; }
}

/* ---- reliability / revalidation panel ---- */
.reliability { margin: 8px 0 30px; }
.rel-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; margin-bottom: 12px; }
.rel-card {
  border: 1px solid var(--line); border-radius: 12px; padding: 16px 16px 15px;
  background: #fff; border-left: 4px solid var(--line-2);
}
.rel-card.good { border-left-color: #1f9d57; }
.rel-card.ok   { border-left-color: #c2820a; }
.rel-card.low  { border-left-color: #c0492f; }
.rel-val { font-family: var(--font-mono); font-size: 30px; font-weight: 600; line-height: 1; color: var(--ink); letter-spacing: -.01em; }
.rel-unit { font-size: 14px; color: var(--muted); margin-left: 3px; font-weight: 500; }
.rel-band {
  display: inline-block; margin: 9px 0 8px; font-family: var(--font-mono);
  font-size: 10px; letter-spacing: .09em; text-transform: uppercase; font-weight: 600;
  padding: 2px 8px; border-radius: 99px; background: var(--bg-3); color: var(--muted);
}
.rel-card.good .rel-band { background: #e6f5ec; color: #157a42; }
.rel-card.ok   .rel-band { background: #faf1de; color: #976607; }
.rel-card.low  .rel-band { background: #f9e7e2; color: #a23a23; }
.rel-title { font-weight: 600; font-size: 14.5px; color: var(--ink); margin-bottom: 5px; }
.rel-meaning { font-size: 13px; color: var(--ink-2); line-height: 1.5; margin: 0; }
.reliability .note { font-size: 13px; color: var(--muted); margin: 0; }

/* ---- results: section rhythm + engagement ---- */
[data-screen="results"] .block-title { margin-top: 52px; }
[data-screen="results"] .eyebrow { margin-top: 56px; }
[data-screen="results"] .eyebrow:first-of-type { margin-top: 0; }
[data-screen="results"] .eyebrow + .block-title { margin-top: 12px; }
[data-screen="results"] .map-shell { margin-top: 6px; }
[data-screen="results"] .debrief { margin-top: 30px; }
.reliability { scroll-margin-top: 90px; }
.compare, .aggregate, .guide-offer { scroll-margin-top: 90px; }

.reveal { opacity: 0; transform: translateY(16px); transition: opacity .55s ease, transform .55s cubic-bezier(.22,.61,.36,1); will-change: opacity, transform; }
.reveal.in { opacity: 1; transform: none; }

/* ---- trial: adaptive-length note ---- */
.extend-note {
  margin: 10px 0 0; font-family: var(--font-mono); font-size: 12px;
  letter-spacing: .01em; color: var(--accent); text-align: center;
  animation: extend-in .35s ease;
}
@keyframes extend-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }

/* ---- consent: accuracy note ---- */
.study-accuracy {
  margin: 16px 0 0; padding: 12px 14px; border-left: 3px solid var(--accent);
  background: var(--accent-wash); border-radius: 0 8px 8px 0;
  font-size: 13.5px; line-height: 1.55; color: var(--ink-2);
}

/* ---- compare: state entry ---- */
.compare-state-row { display: flex; gap: 8px; align-items: stretch; margin-top: 6px; }
.compare-state-row input {
  flex: 1; min-width: 0; padding: 9px 11px; border: 1px solid var(--line-2);
  border-radius: 8px; font: inherit; font-size: 14px; background: #fff; color: var(--ink);
}
.compare-state-row input:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.compare-state-row .btn { flex: none; }
#compare-state-note { margin-top: 8px; }

/* ---- world map cohort filters (combinable) ---- */
.map-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 4px 0 8px; }
.mf-lead { font-size: 13px; color: var(--muted); font-weight: 500; margin-right: 2px; }
.mf-sel {
  padding: 7px 10px; border: 1px solid var(--line-2); border-radius: 8px;
  font: inherit; font-size: 13.5px; background: #fff; color: var(--ink); max-width: 100%;
}
.mf-sel:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.mf-sel.on { border-color: var(--accent); background: var(--accent-wash); color: var(--accent); font-weight: 600; }
.mf-clear {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: .04em; color: var(--accent);
  background: var(--accent-wash); border: 1px solid var(--accent-wash); border-radius: 99px;
  padding: 6px 12px; cursor: pointer;
}
.mf-clear:hover { background: #e0eaff; }
.ref-remove {
  border: 1px solid var(--line-2); background: #fff; color: var(--muted);
  width: 26px; height: 26px; border-radius: 6px; cursor: pointer; font-size: 16px; line-height: 1;
}
.ref-remove:hover { border-color: #c0392b; color: #c0392b; background: #fdecea; }

/* ---- explicit self-report (convergent validity) ---- */
.ex-list { margin: 18px 0 0; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: #fff; }
.ex-row { display: flex; align-items: center; justify-content: space-between; gap: 14px 16px; padding: 12px 16px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.ex-row:first-child { border-top: none; }
.ex-country { font-size: 15px; font-weight: 500; color: var(--ink); min-width: 150px; }
.ex-scale { display: inline-flex; align-items: center; gap: 7px; }
.ex-end { font-family: var(--font-mono); font-size: 10px; letter-spacing: .03em; color: var(--muted); width: 56px; }
.ex-end:last-child { text-align: right; }
.ex-dot {
  width: 22px; height: 22px; border-radius: 50%; border: 1.6px solid var(--line-2);
  background: #fff; cursor: pointer; padding: 0; transition: transform .12s, border-color .12s, background .12s;
}
.ex-dot:hover { border-color: var(--accent); transform: scale(1.12); }
.ex-dot.on { background: var(--accent); border-color: var(--accent); }
#map-cohort-note { font-size: 13px; color: var(--ink-2); margin: 0 0 12px; min-height: 1.2em; }

/* ---- aggregate: podium + ranked types ---- */
.podium { display: flex; justify-content: center; align-items: flex-end; gap: 16px; margin: 6px 0 4px; flex-wrap: wrap; }
.podium-col { display: flex; flex-direction: column; align-items: center; width: 150px; max-width: 31%; }
.podium-fig { width: 60px; color: var(--type-accent); }
.podium-fig svg { width: 100%; height: auto; display: block; }
.podium-name { font-weight: 600; font-size: 14px; text-align: center; margin-top: 6px; color: var(--ink); line-height: 1.2; }
.podium-pct { font-family: var(--font-mono); font-size: 13px; color: var(--muted); margin: 3px 0 8px; }
.podium-base {
  width: 100%; border-radius: 8px 8px 0 0; background: var(--type-accent);
  display: flex; align-items: flex-start; justify-content: center;
  color: #fff; font-family: var(--font-mono); font-weight: 600; padding-top: 7px;
}
.podium-col.p1 .podium-base { height: 60px; }
.podium-col.p2 .podium-base { height: 42px; }
.podium-col.p3 .podium-base { height: 28px; }
.podium-base span { font-size: 15px; }

.type-rank { list-style: none; margin: 0; padding: 0; }
.type-rank li {
  display: grid; grid-template-columns: 22px 28px 1fr minmax(60px, 110px) 40px;
  align-items: center; gap: 10px; padding: 7px 0; border-top: 1px solid var(--line);
}
.type-rank li:first-child { border-top: none; }
.rank-num { font-family: var(--font-mono); font-size: 13px; color: var(--muted); text-align: center; }
.rank-fig { width: 26px; color: var(--type-accent); }
.rank-fig svg { width: 100%; height: auto; display: block; }
.rank-name { font-size: 14.5px; color: var(--ink); font-weight: 500; }
.rank-bar { height: 8px; background: var(--bg-3); border-radius: 99px; overflow: hidden; }
.rank-bar i { display: block; height: 100%; background: var(--type-accent); border-radius: 99px; }
.rank-val { font-family: var(--font-mono); font-size: 13px; color: var(--ink-2); text-align: right; font-style: normal; }

/* ---- accessibility: respect reduced motion ---- */
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .001ms !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}

/* ============ ACCOUNTS (sign-in, history) ============ */
.acct-btn {
  font-family: var(--font-sans); font-size: 13px; font-weight: 500;
  padding: 7px 14px; border-radius: 99px; cursor: pointer;
  background: var(--bg); color: var(--ink); border: 1px solid var(--line-2);
  max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  transition: border-color .18s, color .18s;
}
.acct-btn:hover { border-color: var(--accent); color: var(--accent); }

.account-cta {
  margin-top: 30px; padding: 24px 26px; border-radius: 14px;
  border: 1px solid var(--line); background: var(--accent-wash);
}
.account-cta .block-title { margin-bottom: 6px; }
.account-cta .section-sub { margin-bottom: 16px; max-width: 60ch; }
#acct-cta-state { color: var(--accent); }

.auth-input {
  width: 100%; padding: 13px 14px; font-size: 16px; margin-bottom: 12px;
  border: 1px solid var(--line-2); border-radius: 10px; background: var(--bg); color: var(--ink);
}
.auth-input:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }
#auth-code { letter-spacing: .35em; text-align: center; font-size: 22px; font-variant-numeric: tabular-nums; }
#auth-email-form .btn, #auth-code-form .btn { width: 100%; }
.auth-error {
  margin-top: 12px; font-size: 13.5px; color: #b42318;
  background: #fef3f2; border: 1px solid #fecdca; border-radius: 8px; padding: 9px 12px;
}
.linklike {
  display: inline-block; margin-top: 12px; background: none; border: none; padding: 0;
  color: var(--accent); font: inherit; font-size: 13.5px; cursor: pointer; text-decoration: underline;
}
.linklike:hover { color: var(--accent-2); }

.history-list { margin: 6px 0 8px; }
.history-row {
  display: grid; grid-template-columns: 1fr auto; gap: 2px 12px;
  padding: 14px 2px; border-top: 1px solid var(--line);
}
.history-row:first-child { border-top: none; }
.hr-date { grid-column: 1; font-size: 12.5px; color: var(--faint); font-family: var(--font-mono); }
.hr-spread { grid-column: 2; grid-row: 1 / span 2; align-self: center; font-size: 13px; color: var(--muted); white-space: nowrap; }
.hr-main { grid-column: 1; font-size: 16px; color: var(--ink); }
.hr-main .hr-code { font-family: var(--font-mono); font-size: 12px; color: var(--faint); margin-left: 4px; }
.hr-dims { grid-column: 1; font-size: 13px; color: var(--ink-2); }
.history-foot {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line);
}
.history-foot .linklike { margin-top: 0; }

/* ============ FRIEND COMPARE ============ */
.copy-row { display: flex; gap: 10px; margin: 6px 0 12px; }
.copy-row .auth-input { margin-bottom: 0; font-size: 13px; }
#compare-copy, #compare-refresh { flex: none; }
#compare-refresh { margin-top: 10px; }
.compare-h2h { width: 100%; border-collapse: collapse; font-size: 14px; margin: 6px 0 4px; }
.compare-h2h th, .compare-h2h td { padding: 8px 10px; text-align: right; border-bottom: 1px solid var(--line); }
.compare-h2h th:first-child, .compare-h2h td:first-child { text-align: left; }
.compare-h2h thead th { color: var(--muted); font-weight: 600; font-size: 12px; }
.compare-h2h td:last-child { color: var(--accent); font-weight: 600; }
.ch-sub { font-size: 15px; font-weight: 600; margin: 18px 0 4px; color: var(--ink); }
#acct-cta-compare { margin-left: 8px; }

/* compare option, de-emphasised once signed in */
.compare-tuck { margin: 12px 0 0; }
.compare-tuck .linklike { margin-top: 0; color: var(--muted); font-size: 13px; }
.compare-tuck .linklike:hover { color: var(--accent); }
#footer-login { cursor: pointer; }

/* ---- lens indicator shown during the test ---- */
.lens-badge {
  display: block; width: fit-content; margin: 0 auto 16px; padding: 5px 13px; border-radius: 99px;
  font-family: var(--font-mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--accent); background: var(--accent-wash); border: 1px solid var(--line); text-align: center;
}

/* results jump-nav sits flush under the masthead (no scrollable gap above it) */
.screen[data-screen="results"] { padding-top: 0; }

/* "try the other test" button sits beside "Take it again" */
#try-other-lens { margin-left: 8px; }

@media (max-width: 560px) {
  /* centre the explicit self-report rows when they stack on mobile */
  .ex-row { justify-content: center; text-align: center; }
  .ex-country { min-width: 0; width: 100%; text-align: center; }
  .ex-scale { justify-content: center; width: 100%; }
  .screen[data-screen="results"] { padding-top: 0; }
  #try-other-lens { margin-left: 0; }
}
