/* Mason lead site: shared template styles (mobile first)
   Shape rules: buttons and chips are pills; tiles, cards and photos 20px; inputs and quiz options 12px. */

:root {
  --bg: #fbfaf7;
  --tile: #f2f0eb;
  --tint: #f2f0eb;
  --surface: #ffffff;
  --ink: #121826;
  --ink-2: #4a5160;
  --ink-3: #737987;
  --line: #e6e2da;
  --line-2: #d8d3c9;
  --accent: #1f4bb8;
  --accent-2: #183d99;
  --accent-soft: #e8eefb;
  --navy: #0f1e3c;
  --navy-2: #172a52;
  --band-ink: #d9dfeb;
  --wa: #157a48;
  --wa-2: #0f6239;
  --focus: #2f66c8;
  --error: #a33030;

  --sans: 'Figtree', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --serif: 'Newsreader', Georgia, 'Times New Roman', serif;

  --radius: 12px;
  --radius-lg: 20px;
  --wrap: 1180px;
  --gutter: 20px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  --shadow-chip: 0 1px 2px rgba(15, 30, 60, .06), 0 12px 32px -12px rgba(15, 30, 60, .28);
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 96px; }
html.quiz-lock { overflow: hidden; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 1.0625rem/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3 {
  margin: 0;
  font-family: var(--sans);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -.025em;
  text-wrap: balance;
}
p { margin: 0; text-wrap: pretty; }
a { color: var(--accent); text-underline-offset: 3px; text-decoration-thickness: 1px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 6px; }
img { max-width: 100%; height: auto; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
@media (min-width: 900px) { :root { --gutter: 32px; } }

.skip {
  position: absolute; left: -9999px; top: 8px; z-index: 100;
  background: var(--ink); color: #fff; padding: 10px 14px; border-radius: 999px;
}
.skip:focus { left: 12px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Placeholders Mason needs to fill in */
.ph {
  background: #fbefc7; color: #6a4f0c;
  border-radius: 3px; padding: 0 .25em;
  box-decoration-break: clone; -webkit-box-decoration-break: clone;
  font-style: normal;
}
.ph-block {
  display: block;
  background: #fbf3d9; border: 1px dashed #d9bf72; color: #6a4f0c;
  border-radius: var(--radius); padding: 14px 16px; font-size: .9688rem;
}

/* ---------- Buttons & links ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  min-height: 48px; padding: .75em 1.4em;
  border: 1px solid transparent; border-radius: 999px;
  font: 600 1rem/1.2 var(--sans);
  white-space: nowrap; text-decoration: none; cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background-color .2s var(--ease), transform .2s var(--ease), box-shadow .2s var(--ease);
}
.btn:active { transform: scale(.98); }
.btn--primary { background: var(--accent); color: #fff; }
.btn--primary:hover { background: var(--accent-2); }
.btn--white { background: #fff; color: var(--navy); }
.btn--white:hover { background: #eef1f7; }
.btn--small { min-height: 42px; padding: .5em 1.1em; font-size: .9375rem; }
.btn--lg { min-height: 56px; padding: .9em 1.8em; font-size: 1.0625rem; }
.btn--wa { background: var(--wa); color: #fff; }
.btn--wa:hover { background: var(--wa-2); }
.btn__meta { font-weight: 400; opacity: .8; }
.btn svg { width: 20px; height: 20px; flex: none; }

.textlink { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; font-weight: 600; font-size: .9688rem; text-decoration: none; color: var(--accent); }
.textlink span { transition: transform .2s var(--ease); }
.textlink:hover span { transform: translateX(3px); }

.linkbtn {
  background: none; border: 0; padding: 10px 4px; min-height: 44px;
  font: 500 .9688rem var(--sans); color: var(--accent);
  text-decoration: underline; text-underline-offset: 3px; cursor: pointer;
}

.micro { margin-top: 12px; font-size: .875rem; color: var(--ink-3); }
.eyebrow { font: 600 .9375rem/1.3 var(--sans); color: var(--accent); }
.eyebrow--light { color: #9fb6e8; }

/* ---------- Floating nav ---------- */
.nav-wrap { position: sticky; top: 0; z-index: 20; padding-top: 10px; }
.nav {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  min-height: 60px; padding: 8px 8px 8px 20px;
  background: rgba(255, 255, 255, .86);
  -webkit-backdrop-filter: saturate(1.5) blur(14px);
  backdrop-filter: saturate(1.5) blur(14px);
  border: 1px solid rgba(18, 24, 38, .06);
  border-radius: 999px;
  box-shadow: 0 6px 24px -14px rgba(15, 30, 60, .35);
}
.brand { display: flex; align-items: baseline; gap: 8px; color: var(--ink); text-decoration: none; min-width: 0; }
.brand__name { font: 800 1.25rem/1 var(--sans); letter-spacing: -.03em; }
.brand__role { font-size: .8125rem; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 380px) { .brand__role { display: none; } }

/* ---------- Hero ---------- */
.hero { padding: 48px 0 72px; }
.hero__copy { max-width: 46rem; margin: 0 auto; text-align: center; }
.hero h1 { margin-top: 14px; font-size: clamp(2.25rem, 8.6vw, 4rem); line-height: 1.05; letter-spacing: -.035em; }
.hero .lede { margin: 18px auto 0; font-size: 1.125rem; color: var(--ink-2); max-width: 34em; }
.hero__actions { margin-top: 28px; }

/* Variant visibility: A = story-led CTA, B = quiz-first */
.variant-b { display: none; }
[data-variant="b"] .variant-a { display: none; }
[data-variant="b"] .variant-b { display: block; }

.hero-quiz {
  margin: 28px auto 0; max-width: 540px; text-align: left;
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 20px 16px 16px;
  box-shadow: var(--shadow-chip);
}
.hero-quiz__meta { display: flex; justify-content: space-between; gap: 8px; font-size: .8438rem; color: var(--ink-3); }
.hero-quiz__bar { height: 4px; border-radius: 4px; background: var(--tile); margin: 10px 0 16px; overflow: hidden; }
.hero-quiz__bar span { display: block; height: 100%; width: 12%; background: var(--accent); border-radius: inherit; }
.hero-quiz__q { font: 700 1.3rem/1.25 var(--sans); letter-spacing: -.02em; margin-bottom: 14px; }
.hero-quiz .micro { text-align: center; }

.hero__media { position: relative; margin: 48px 0 0; }
.hero__media > img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius-lg); }

/* Floating white card over imagery */
.chip {
  background: #fff; color: var(--ink);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-chip);
}
.chip--trust {
  position: relative; margin: -48px 12px 0;
  display: flex; gap: 14px; align-items: flex-start;
  padding: 16px 18px;
}
.chip__avatar { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; flex: none; }
.chip--trust q { display: block; quotes: '\201C' '\201D'; font: italic 400 1.0938rem/1.45 var(--serif); }
.chip--trust cite { display: block; margin-top: 6px; font-style: normal; font-size: .8125rem; color: var(--ink-3); }

@media (min-width: 900px) {
  .hero { padding: 72px 0 112px; }
  .hero .lede { font-size: 1.1875rem; }
  .hero__media { margin-top: 64px; }
  .hero__media > img { aspect-ratio: 21 / 9; object-position: 50% 68%; }
  .chip--trust { position: absolute; margin: 0; left: 28px; bottom: 28px; max-width: 440px; padding: 20px 22px; }
}

/* ---------- Sections ---------- */
.section { padding: 72px 0; }
.section--tint { background: var(--tint); }
.section__title { font-size: clamp(1.9rem, 6vw, 3rem); letter-spacing: -.03em; }
.section__title--center { text-align: center; }
.body-lg { margin-top: 16px; font-size: 1.125rem; color: var(--ink-2); max-width: 34em; }
@media (min-width: 900px) { .section { padding: 120px 0; } }

.split { display: grid; gap: 28px; }
@media (min-width: 900px) { .split { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 64px; align-items: center; } .split--top { align-items: start; } }

/* Tiles: soft grey, text on top, a small visual underneath */
.tiles { list-style: none; margin: 36px 0 0; padding: 0; display: grid; gap: 14px; }
.tile {
  display: flex; flex-direction: column; justify-content: space-between; gap: 28px;
  background: var(--tile); border-radius: var(--radius-lg);
  padding: 26px 22px 22px;
}
.tile h3 { font-size: 1.3125rem; line-height: 1.2; letter-spacing: -.02em; }
.tile p { margin-top: 8px; color: var(--ink-2); font-size: 1rem; }
@media (min-width: 900px) { .tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin-top: 56px; } .tile { padding: 30px 28px 28px; min-height: 360px; } }

.viz { background: #fff; border-radius: 14px; padding: 18px 16px 14px; }
.viz__row { display: grid; grid-template-columns: repeat(12, 1fr); gap: 6px; }
.viz__dot { aspect-ratio: 1; border-radius: 50%; border: 1.5px solid var(--line-2); }
.viz__dot.is-on { background: var(--accent); border-color: var(--accent); }
.viz__dot.is-miss { border-color: var(--accent); border-style: dashed; }
.viz__months { display: grid; grid-template-columns: repeat(12, 1fr); gap: 6px; margin-top: 8px; font-size: .6875rem; color: var(--ink-3); text-align: center; }
.viz__bars { display: grid; gap: 12px; }
.viz__bar { display: grid; gap: 6px; font-size: .75rem; color: var(--ink-3); }
.viz__bar i { display: block; height: 10px; border-radius: 999px; background: var(--tile); overflow: hidden; }
.viz__bar i b { display: block; height: 100%; border-radius: inherit; background: var(--accent); }
.viz__timeline { position: relative; height: 44px; }
.viz__timeline::before { content: ''; position: absolute; left: 6px; right: 6px; top: 8px; height: 2px; background: var(--line-2); }
.viz__timeline .gap { position: absolute; left: 14%; right: 14%; top: 5px; height: 8px; border-radius: 999px; background: repeating-linear-gradient(90deg, var(--accent) 0 10px, transparent 10px 16px); }
.viz__timeline .pt { position: absolute; top: 2px; width: 14px; height: 14px; border-radius: 50%; background: var(--accent); }
.viz__timeline .pt--a { left: 0; } .viz__timeline .pt--b { right: 0; }
.viz__timeline .lbl { position: absolute; top: 24px; font-size: .75rem; color: var(--ink-3); }
.viz__timeline .lbl--a { left: 0; } .viz__timeline .lbl--b { right: 0; }
.viz__cols { display: flex; align-items: flex-end; gap: 8px; height: 64px; }
.viz__cols i { flex: 1; border-radius: 6px 6px 2px 2px; background: var(--accent-soft); }
.viz__cols i.is-on { background: var(--accent); }


/* ---------- Tile visuals: play on scroll into view, replay on tap / hover ----------
   Only active when JS adds .viz-anim (never under reduced motion), so the static end state is the fallback. */
.viz__dot { position: relative; }
.viz__row--scan { position: relative; overflow: hidden; }
@media (hover: hover) and (pointer: fine) {
  .tile { transition: transform .3s var(--ease-out); }
  .tile:hover { transform: translateY(-3px); }
}
.viz-anim .tile { cursor: pointer; -webkit-tap-highlight-color: transparent; }
.viz-anim .tile.viz-reset *, .viz-anim .tile.viz-reset *::after { transition: none !important; animation: none !important; }

.viz-anim .viz__dot {
  opacity: 0; transform: scale(.8);
  transition-property: opacity, transform, background-color, border-color;
  transition-duration: .35s, .45s, .3s, .3s;
  transition-timing-function: var(--ease-out), var(--ease-out), ease, ease;
  transition-delay: calc(var(--i, 0) * 55ms), calc(var(--i, 0) * 55ms), calc(var(--i, 0) * 70ms + 150ms), calc(var(--i, 0) * 70ms + 150ms);
}
.viz-anim .viz__dot.is-on { background-color: transparent; border-color: var(--line-2); }
.viz-anim .tile.is-played .viz__dot { opacity: 1; transform: none; }
.viz-anim .tile.is-played .viz__dot.is-on { background-color: var(--accent); border-color: var(--accent); }

.viz__dot.is-miss::after {
  content: ''; position: absolute; inset: -2px; border-radius: 50%;
  border: 1.5px solid var(--accent); opacity: 0; pointer-events: none;
}
.viz-anim .tile.is-played .viz__dot.is-miss::after { animation: viz-miss .9s var(--ease-out) calc(var(--i, 0) * 70ms + 180ms) both; }
@keyframes viz-miss { from { opacity: .7; transform: scale(1); } to { opacity: 0; transform: scale(2.2); } }

.viz__row--scan::after {
  content: ''; position: absolute; top: -4px; bottom: -4px; left: 0; width: 30%;
  background: linear-gradient(90deg, transparent, rgba(31, 75, 184, .14), transparent);
  transform: translateX(-120%); pointer-events: none;
}
.viz-anim .tile.is-played .viz__row--scan::after { animation: viz-scan 1.3s var(--ease-in-out) .8s both; }
@keyframes viz-scan { from { transform: translateX(-120%); } to { transform: translateX(460%); } }

.viz-anim .viz__months span { opacity: 0; transition: opacity .3s var(--ease-out); transition-delay: calc(var(--i, 0) * 55ms); }
.viz-anim .tile.is-played .viz__months span { opacity: 1; }

.viz__bar i b { transform-origin: left center; }
.viz-anim .viz__bar i b { transform: scaleX(0); transition: transform .9s var(--ease-out); transition-delay: calc(var(--i, 0) * 350ms + 100ms); }
.viz-anim .tile.is-played .viz__bar i b { transform: none; }

.viz__timeline .gap { transform-origin: left center; }
.viz-anim .viz__timeline .gap { transform: scaleX(0); transition: transform 1s var(--ease-out) .35s; }
.viz-anim .viz__timeline .pt, .viz-anim .viz__timeline .lbl { opacity: 0; transition: opacity .3s var(--ease-out); }
.viz-anim .viz__timeline .pt--b, .viz-anim .viz__timeline .lbl--b { transition-delay: 1.2s; }
.viz-anim .tile.is-played .viz__timeline .gap { transform: none; }
.viz-anim .tile.is-played .viz__timeline .pt, .viz-anim .tile.is-played .viz__timeline .lbl { opacity: 1; }

.viz__cols i { transform-origin: bottom center; }
.viz-anim .viz__cols i { transform: scaleY(0); transition: transform .6s var(--ease-out); transition-delay: calc(var(--i, 0) * 60ms); }
.viz-anim .tile.is-played .viz__cols i { transform: none; }

/* Note card (CBS) */
.note-card { background: #fff; border-radius: var(--radius-lg); padding: 26px 22px 18px; }
.note-card h3 { font-size: 1.25rem; letter-spacing: -.02em; }
.note-card p { margin-top: 8px; color: var(--ink-2); }
.note-card .textlink { margin-top: 10px; }
@media (min-width: 900px) { .note-card { padding: 36px 36px 26px; } }

/* Steps */
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.step { display: grid; grid-template-columns: 44px 1fr; gap: 16px; padding: 22px 0; border-top: 1px solid var(--line-2); }
.step:last-child { border-bottom: 1px solid var(--line-2); }
.step__n { font: 800 1.5rem/1.2 var(--sans); color: var(--accent); letter-spacing: -.02em; }
.step h3 { font-size: 1.25rem; line-height: 1.3; letter-spacing: -.02em; }
.step p { margin-top: 6px; color: var(--ink-2); }

/* Navy band with photo resting on its bottom edge */
.band { background: var(--navy); color: var(--band-ink); padding: 72px 0; }
.band__copy { max-width: 52rem; }
.band__statement { margin-top: 16px; font: 700 clamp(1.6rem, 5.6vw, 2.6rem)/1.2 var(--sans); letter-spacing: -.025em; color: #fff; text-wrap: balance; }
@media (min-width: 900px) {
  .band { padding: 112px 0; }
}

/* About */
.quote-card { margin: 0; background: var(--tile); border-radius: var(--radius-lg); padding: 28px 24px; }
.quote-card blockquote { margin: 0; font: italic 400 1.25rem/1.5 var(--serif); }
.quote-card figcaption { margin-top: 14px; font-size: .875rem; color: var(--ink-3); }
.about__bio { margin-top: 18px; font-size: 1.125rem; color: var(--ink-2); max-width: 32em; }
.about__bio + .about__bio { margin-top: 12px; }
.about__card { background: var(--tile); border-radius: var(--radius-lg); padding: 26px 24px 18px; }
.about__card h3 { font-size: 1.25rem; letter-spacing: -.02em; }
.about__card ul { list-style: none; margin: 14px 0 0; padding: 0; }
.about__card li { display: flex; gap: 12px; align-items: baseline; padding: 12px 0; border-top: 1px solid var(--line-2); color: var(--ink); }
.about__card li::before { content: ''; flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); transform: translateY(-2px); }
@media (min-width: 900px) { .about__card { padding: 34px 34px 24px; } }
.about__head { display: flex; align-items: center; gap: 16px; }
.about__avatar { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; flex: none; }

/* Media blocks inside sections */
.media { margin: 0; }
.media img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius-lg); }

/* FAQ */
.faq { max-width: 760px; margin: 36px auto 0; display: grid; gap: 10px; }
.faq details { background: #fff; border-radius: 16px; padding: 0 20px; }
.faq summary {
  list-style: none; cursor: pointer;
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  min-height: 64px; padding: 16px 0;
  font-weight: 600; font-size: 1.0625rem; letter-spacing: -.01em;
  -webkit-tap-highlight-color: transparent;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ''; flex: none; width: 12px; height: 12px;
  border-right: 2px solid var(--ink-3); border-bottom: 2px solid var(--ink-3);
  transform: translateY(-3px) rotate(45deg);
  transition: transform .25s var(--ease);
}
.faq details[open] summary::after { transform: translateY(2px) rotate(225deg); }
.faq details > div { padding: 0 28px 20px 0; color: var(--ink-2); }
@media (min-width: 900px) { .faq { margin-top: 48px; } }

/* Final CTA */
.final { text-align: center; }
.final h2 { max-width: 15em; margin: 0 auto; }
.final .btn { margin-top: 28px; }

/* Footer */
.footer { background: var(--navy); color: #aeb8cc; padding: 48px 0 120px; font-size: .875rem; }
.footer__top { display: grid; gap: 24px; }
.footer__brand { color: #fff; }
.footer__brand strong { display: block; font: 800 1.375rem/1 var(--sans); letter-spacing: -.03em; }
.footer__brand span { display: block; margin-top: 6px; color: #aeb8cc; }
.footer__text p + p { margin-top: 10px; }
.footer a { color: #fff; }
.footer .ph { background: rgba(251, 239, 199, .16); color: #f3dc98; }
.footer__credit { margin-top: 36px; padding-top: 20px; border-top: 1px solid rgba(255, 255, 255, .12); font-size: .8125rem; color: #7f8aa3; }
@media (min-width: 900px) { .footer { padding: 64px 0 48px; } .footer__top { grid-template-columns: 1fr 2fr; gap: 64px; } }

/* Sticky mobile CTA */
.sticky-cta {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 15;
  padding: 10px var(--gutter) calc(10px + env(safe-area-inset-bottom));
  background: rgba(251, 250, 247, .92);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  border-top: 1px solid var(--line);
  transform: translateY(110%);
  transition: transform .35s var(--ease);
}
.sticky-cta.is-visible { transform: none; }
.sticky-cta .btn { width: 100%; }
@media (min-width: 900px) { .sticky-cta { display: none; } }

/* Mobile: full-width primary CTAs */
@media (max-width: 639px) { .hero__actions .btn, .final .btn { width: 100%; } }

/* ---------- Options (shared by hero + quiz) ---------- */
.options { display: grid; gap: 10px; }
.option {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  width: 100%; min-height: 56px;
  padding: 14px 16px;
  background: var(--surface);
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  font: 500 1.0625rem/1.35 var(--sans);
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: border-color .15s, background-color .15s, transform .15s var(--ease);
}
.option::after {
  content: ''; flex: none; width: 22px; height: 22px; border-radius: 50%;
  border: 1.5px solid var(--line-2); background: #fff;
  transition: border-color .15s, box-shadow .15s, background-color .15s;
}
@media (hover: hover) { .option:hover { border-color: #aab8d0; background: #fff; } }
.option:active { transform: scale(.99); }
.option.is-selected { border-color: var(--accent); background: var(--accent-soft); }
.option.is-selected::after { border-color: var(--accent); background: var(--accent); box-shadow: inset 0 0 0 4px #fff; }

/* ---------- Quiz dialog ---------- */
.quiz {
  position: fixed; inset: 0; z-index: 50;
  display: flex; align-items: stretch; justify-content: center;
  background: rgba(19, 34, 56, 0);
  transition: background-color .25s;
}
.quiz[hidden] { display: none; }
.quiz.is-open { background: rgba(19, 34, 56, .5); }
.quiz__panel {
  display: flex; flex-direction: column;
  width: 100%; height: 100%;
  height: 100dvh;
  background: var(--bg);
  opacity: 0; transform: translateY(24px);
  transition: opacity .25s var(--ease), transform .3s var(--ease);
}
.quiz.is-open .quiz__panel { opacity: 1; transform: none; }
.quiz__head {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 8px;
  padding: calc(8px + env(safe-area-inset-top)) 12px 0;
}
.quiz__iconbtn {
  display: inline-flex; align-items: center; gap: 6px;
  min-width: 44px; min-height: 44px; padding: 0 10px;
  background: none; border: 0; border-radius: 999px;
  font: 500 .9688rem var(--sans); color: var(--ink-2); cursor: pointer;
}
.quiz__iconbtn:hover { background: var(--bg-2); }
.quiz__iconbtn svg { width: 20px; height: 20px; }
.quiz__close { justify-content: center; }
.quiz__count { text-align: center; font-size: .875rem; font-weight: 600; color: var(--ink-3); letter-spacing: .02em; }
.quiz__bar { grid-column: 1 / -1; height: 3px; margin: 8px 8px 0; background: var(--bg-2); overflow: hidden; }
.quiz__bar span { display: block; height: 100%; width: 0; background: var(--accent); border-radius: inherit; transition: width .35s var(--ease); }
.quiz__body { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 28px 20px calc(28px + env(safe-area-inset-bottom)); }
.quiz__step { animation: stepIn .3s var(--ease); }
@keyframes stepIn { from { opacity: 0; transform: translateX(12px); } to { opacity: 1; transform: none; } }
.quiz__q { font-size: clamp(1.65rem, 6.4vw, 2.1rem); outline: none; }
.quiz__hint { margin-top: 10px; color: var(--ink-3); font-size: .9688rem; }
.quiz__step .options { margin-top: 24px; }
.quiz__note { margin-top: 20px; font-size: .875rem; color: var(--ink-3); display: flex; gap: 8px; align-items: flex-start; }
.quiz__note svg { flex: none; width: 16px; height: 16px; margin-top: 3px; }

@media (min-width: 640px) {
  .quiz { align-items: center; padding: 24px; }
  .quiz__panel { max-width: 580px; height: auto; max-height: min(760px, calc(100dvh - 48px)); border-radius: 14px; box-shadow: 0 30px 80px -30px rgba(10, 20, 40, .6); }
  .quiz__head { padding: 14px 16px 0; }
  .quiz__body { padding: 32px 36px 36px; }
}
@media (prefers-reduced-motion: reduce) {
  .quiz, .quiz__panel, .quiz__bar span, .sticky-cta { transition: none; }
  .quiz__step { animation: none; }
}

/* Form step */
.field { margin-top: 20px; }
.field label, .field__label { display: block; font-weight: 600; font-size: .9688rem; margin-bottom: 8px; }
.field__opt { font-weight: 400; color: var(--ink-3); }
.field input[type="text"] {
  width: 100%; min-height: 54px;
  padding: 0 16px;
  font: 400 1.0625rem var(--sans); color: var(--ink);
  background: var(--surface);
  border: 1.5px solid var(--line-2);
  border-radius: var(--radius);
  transition: border-color .15s, box-shadow .15s;
}
.field input[type="text"]:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px rgba(29, 63, 120, .14); }
.field input[aria-invalid="true"] { border-color: var(--error); }
.consent {
  display: flex; gap: 14px; align-items: flex-start;
  margin-top: 22px; padding: 16px;
  background: var(--surface); border: 1.5px solid var(--line); border-radius: var(--radius);
  cursor: pointer; font-size: .9688rem; line-height: 1.5;
}
.consent input { flex: none; width: 24px; height: 24px; margin: 0; accent-color: var(--accent); cursor: pointer; }
.consent.is-invalid { border-color: var(--error); }
.error { margin-top: 8px; color: var(--error); font-size: .9063rem; font-weight: 500; }
.error:empty { display: none; }
.form-actions { margin-top: 24px; }
.form-actions .btn { width: 100%; }

/* Result step */
.summary { margin: 22px 0 0; padding: 4px 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.summary div { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: 16px; align-items: baseline; padding: 10px 0; border-bottom: 1px solid var(--line); }
.summary div:last-child { border-bottom: 0; }
.summary dt { font-size: .8125rem; color: var(--ink-3); font-weight: 500; }
.summary dd { margin: 0; font-weight: 600; text-align: right; line-height: 1.35; }
.summary dt { line-height: 1.35; }
.result-cta { margin-top: 24px; }
.result-cta .btn { width: 100%; min-height: 58px; font-size: 1.0625rem; }
.result-cta .micro { text-align: center; }
.result-ref { margin-top: 16px; font-size: .8438rem; color: var(--ink-3); }
.result-ref code { white-space: nowrap; font: 600 .8125rem ui-monospace, SFMono-Regular, Menlo, monospace; background: var(--bg-2); padding: 2px 6px; border-radius: 6px; color: var(--ink-2); }
.result-edit { margin-top: 8px; text-align: center; }

/* Demo switcher (only with ?demo=1): a thin strip above the nav */
html.has-demo body { padding-top: 44px; }
html.has-demo .nav-wrap { top: 44px; }
.demo-switch {
  position: fixed; top: 0; left: 0; right: 0; z-index: 40; height: 44px;
  display: flex; align-items: center; justify-content: center; gap: 14px;
  padding: 0 12px;
  background: var(--navy); color: #aeb8cc;
  font: 600 .8125rem var(--sans);
}
.demo-switch__label { text-transform: uppercase; letter-spacing: .08em; font-size: .6875rem; color: #7f8aa3; }
.demo-switch__group { display: flex; align-items: center; gap: 2px; padding: 3px; border-radius: 999px; background: rgba(255, 255, 255, .08); }
.demo-switch__sub { padding: 0 6px 0 8px; color: #7f8aa3; font-weight: 500; }
.demo-switch a, .demo-switch button {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 36px; min-height: 30px; padding: 0 12px;
  border: 0; border-radius: 999px; background: transparent;
  color: #cbd2dc; font: 600 .8125rem var(--sans); text-decoration: none; cursor: pointer; white-space: nowrap;
}
.demo-switch a[aria-current="page"], .demo-switch button[aria-pressed="true"] { background: #fff; color: var(--navy); }
@media (max-width: 440px) { .demo-switch__label, .demo-switch__sub { display: none; } .demo-switch { gap: 6px; } .demo-switch a, .demo-switch button { padding: 0 10px; } }

