/*!
 * quiz.css — CamWood Swing Quiz. Mobile-first, dark-on-light; 99%+ of this
 * traffic is a phone off a Meta ad.
 * Rules: colours are variables on .cw-app (one block to re-skin, and .cw-app
 * scopes against storefront theme CSS); the storefront's Barlow is listed
 * first but never waited on (a webfont in front of LCP is a round trip);
 * anything that can shift layout reserves its box; tap targets >=52px.
 */

.cw-app {
  /* --- Brand tokens (CamWood storefront design system) ------------------ */
  --cw-ink:        #0e0e0e;
  --cw-ink-soft:   #4a4a4a;
  --cw-ink-faint:  #7c7c7c;
  --cw-paper:      #ffffff;
  --cw-paper-warm: #f7f5f2;
  --cw-line:       #e2ded8;
  --cw-line-soft:  #efece7;
  --cw-red:        #b21f1f;
  --cw-red-dark:   #8c1818;
  --cw-blue:       #00bef1;
  --cw-gold:       #d9a441;
  --cw-ok:         #1c7c46;

  --cw-radius:     10px;
  --cw-radius-lg:  16px;
  --cw-max:        560px;
  --cw-tap:        52px;

  --cw-font: 'Barlow', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
             'Helvetica Neue', Arial, sans-serif;
  --cw-font-head: 'Barlow Condensed', 'Barlow', -apple-system, BlinkMacSystemFont,
             'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;

  box-sizing: border-box;
  max-width: var(--cw-max);
  margin: 0 auto;
  padding: 0 18px calc(48px + env(safe-area-inset-bottom, 0px));
  font-family: var(--cw-font);
  color: var(--cw-ink);
  background: var(--cw-paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

/* The standalone dev harness has no theme behind it. */
body { margin: 0; background: var(--cw-paper-warm, #f7f5f2); }

/* Progress — starts at Q2 ("1 of 5"). Fixed height so showing/hiding it
   never moves the content beneath it. */
.cw-progress {
  position: sticky;
  top: 0;
  z-index: 5;
  padding: 14px 0 10px;
  background: var(--cw-paper);
}
.cw-progress[hidden] { display: none; }
.cw-progress-track {
  height: 4px;
  border-radius: 99px;
  background: var(--cw-line-soft);
  overflow: hidden;
}
.cw-progress-fill {
  height: 100%;
  width: 0;
  border-radius: 99px;
  background: var(--cw-red);
  transition: width .32s cubic-bezier(.4, 0, .2, 1);
}
.cw-progress-label {
  margin-top: 7px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--cw-ink-faint);
}

/* Stage */
.cw-stage {
  display: block;
  /* Reserve roughly a screen so the first paint doesn't collapse and then
     grow as steps render — the cheapest CLS insurance there is. */
  min-height: 72vh;
  padding-top: 8px;
}
.cw-stage.cw-in { animation: cw-fade .22s ease both; }
@keyframes cw-fade { from { opacity: 0; } to { opacity: 1; } }

.cw-sr {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0; border: 0;
  clip: rect(0 0 0 0); clip-path: inset(50%);
  overflow: hidden; white-space: nowrap;
}

/* Scent strip — still frame from the ad they clicked. Never autoplays. */
.cw-scent { margin: 0 0 18px; }
.cw-scent-img {
  aspect-ratio: 16 / 9;          /* box reserved before the image decodes */
  border-radius: var(--cw-radius);
  overflow: hidden;
  background: var(--cw-line-soft);
}
.cw-scent-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cw-scent-label {
  margin: 10px 0 0;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .02em;
  color: var(--cw-red);
  text-transform: uppercase;
}

/* Type */
.cw-h1 {
  font-family: var(--cw-font-head);
  font-size: clamp(28px, 8vw, 38px);
  font-weight: 800;
  line-height: 1.06;
  letter-spacing: -.01em;
  margin: 0 0 12px;
}
.cw-h2 {
  font-family: var(--cw-font-head);
  font-size: clamp(21px, 5.6vw, 27px);
  font-weight: 700;
  line-height: 1.16;
  margin: 0 0 12px;
}
.cw-h3 {
  font-family: var(--cw-font-head);
  font-size: clamp(19px, 5vw, 24px);
  font-weight: 700;
  line-height: 1.2;
  margin: 26px 0 10px;
}
.cw-prompt {
  font-family: var(--cw-font);
  font-size: 17px;
  font-weight: 700;
  margin: 20px 0 12px;
}
.cw-sub, .cw-p {
  font-size: 16px;
  line-height: 1.55;
  color: var(--cw-ink-soft);
  margin: 0 0 14px;
}
.cw-sub { margin-bottom: 18px; }
.cw-p strong { color: var(--cw-ink); }
.cw-note {
  font-size: 14px;
  line-height: 1.5;
  font-style: italic;
  color: var(--cw-ink-faint);
  margin: 0 0 14px;
}
.cw-eyebrow {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--cw-red);
  margin: 0 0 10px;
}
.cw-hint { font-size: 14px; color: var(--cw-ink-faint); margin: 0 0 12px; }

/* Options — thumb-zone sized, full width, generous hit area. */
.cw-opts { display: flex; flex-direction: column; gap: 10px; margin: 0 0 18px; }

.cw-opt {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: var(--cw-tap);
  padding: 13px 14px;
  text-align: left;
  font: inherit;
  color: inherit;
  background: var(--cw-paper);
  border: 1.5px solid var(--cw-line);
  border-radius: var(--cw-radius);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: border-color .14s ease, background .14s ease, transform .1s ease;
}
.cw-opt:active { transform: scale(.985); }
.cw-opt.is-on { border-color: var(--cw-red); background: #fdf4f4; }
.cw-opt:focus-visible { outline: 3px solid var(--cw-blue); outline-offset: 2px; }

.cw-opt-icon { font-size: 22px; line-height: 1; flex: 0 0 auto; }
.cw-opt-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.cw-opt-label { font-size: 16px; font-weight: 600; line-height: 1.3; }
.cw-opt-note { font-size: 13.5px; line-height: 1.35; color: var(--cw-ink-faint); }

/* Multi-select checkmark */
.cw-check {
  margin-left: auto;
  flex: 0 0 auto;
  width: 22px; height: 22px;
  border: 1.5px solid var(--cw-line);
  border-radius: 6px;
  position: relative;
  background: var(--cw-paper);
}
.cw-opt.is-on .cw-check { border-color: var(--cw-red); background: var(--cw-red); }
.cw-opt.is-on .cw-check::after {
  content: '';
  position: absolute;
  left: 7px; top: 3px;
  width: 5px; height: 10px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

/* Q1 photo tiles — two up, the first tap must look like a choice, not a form */
.cw-opts-tiles { flex-direction: row; gap: 12px; }
.cw-opt-tile {
  flex: 1 1 0;
  flex-direction: column;
  justify-content: center;
  text-align: center;
  min-height: 116px;
  padding: 18px 10px;
}
.cw-opt-tile .cw-opt-icon { font-size: 34px; }
.cw-opt-tile .cw-opt-text { align-items: center; }

/* Age chips */
.cw-opts-chips { flex-direction: row; flex-wrap: wrap; gap: 10px; }
.cw-opts-chips .cw-opt {
  flex: 1 1 auto;
  min-width: 86px;
  justify-content: center;
  text-align: center;
}
.cw-opts-chips .cw-opt-text { align-items: center; }

/* CTA */
.cw-cta {
  display: block;
  width: 100%;
  min-height: 56px;
  margin: 18px 0 12px;
  padding: 16px 18px;
  font-family: var(--cw-font-head);
  font-size: 18px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: #fff;
  background: var(--cw-red);
  border: 0;
  border-radius: var(--cw-radius);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: transform .1s ease, background .14s ease;
}
.cw-cta:active { transform: scale(.97); }   /* press feedback — don't strip */
.cw-cta:focus-visible { outline: 3px solid var(--cw-blue); outline-offset: 2px; }
.cw-cta.is-off, .cw-cta:disabled {
  background: var(--cw-line);
  color: var(--cw-ink-faint);
  cursor: default;
}
.cw-cta.is-off:active, .cw-cta:disabled:active { transform: none; }
.cw-cta-buy { background: var(--cw-red); font-size: 19px; }
.cw-cta-ghost {
  background: transparent;
  color: var(--cw-ink);
  border: 1.5px solid var(--cw-ink);
  min-height: 50px;
  font-size: 16px;
}

/* Skip escape — present on EVERY question, deliberately low contrast.
   Trapped users abandon; skippers finish. */
.cw-skip {
  display: block;
  width: 100%;
  margin: 4px 0 0;
  padding: 12px;
  font: inherit;
  font-size: 14px;
  color: var(--cw-ink-faint);
  background: none;
  border: 0;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
.cw-skip:hover { color: var(--cw-ink-soft); }

.cw-back {
  display: inline-block;
  margin: 0 0 12px -6px;
  padding: 8px 6px;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  color: var(--cw-ink-faint);
  background: none;
  border: 0;
  cursor: pointer;
}

.cw-link {
  display: inline-block;
  padding: 10px 0;
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  color: var(--cw-ink);
  background: none;
  border: 0;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

/* Disclosure ("Why we ask", "Don't know the length?", FAQ) */
.cw-disclosure {
  margin: 0 0 14px;
  border-top: 1px solid var(--cw-line-soft);
  border-bottom: 1px solid var(--cw-line-soft);
}
.cw-disclosure + .cw-disclosure { border-top: 0; }
.cw-disclosure > summary {
  padding: 14px 2px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  color: var(--cw-ink);
}
.cw-disclosure > summary::-webkit-details-marker { display: none; }
.cw-disclosure > summary::after { content: ' +'; color: var(--cw-ink-faint); }
.cw-disclosure[open] > summary::after { content: ' –'; }
.cw-disclosure-body {
  padding: 0 2px 14px;
  font-size: 15px;
  line-height: 1.55;
  color: var(--cw-ink-soft);
}

/* Sizing step */
.cw-picker { margin: 0 0 18px; }
.cw-picker-label {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--cw-ink-faint);
  margin: 0 0 9px;
}
.cw-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.cw-chip {
  min-width: 60px;
  min-height: 48px;
  padding: 12px 14px;
  font: inherit;
  font-size: 16px;
  font-weight: 600;
  color: inherit;
  background: var(--cw-paper);
  border: 1.5px solid var(--cw-line);
  border-radius: var(--cw-radius);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: border-color .14s ease, background .14s ease, transform .1s ease;
}
.cw-chip:active { transform: scale(.97); }
.cw-chip.is-on { border-color: var(--cw-red); background: var(--cw-red); color: #fff; }

.cw-input {
  display: block;
  width: 100%;
  min-height: 50px;
  padding: 13px 14px;
  font: inherit;
  font-size: 16px;             /* 16px min — anything less zooms iOS Safari */
  color: var(--cw-ink);
  background: var(--cw-paper);
  border: 1.5px solid var(--cw-line);
  border-radius: var(--cw-radius);
}
.cw-input:focus { outline: none; border-color: var(--cw-ink); }

/* Honeypot — off-screen rather than display:none, which trivial bots skip. */
.cw-hp {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px; height: 1px;
  overflow: hidden;
}

/* Reviews / quotes */
.cw-review {
  margin: 22px 0 0;
  padding: 16px;
  background: var(--cw-paper-warm);
  border-radius: var(--cw-radius);
}
.cw-stars { color: var(--cw-gold); font-size: 15px; letter-spacing: .12em; margin-bottom: 6px; }
.cw-review-text {
  margin: 0;
  font-size: 15px;
  line-height: 1.5;
  font-style: italic;
  color: var(--cw-ink-soft);
}

.cw-quote {
  margin: 0 0 16px;
  padding: 14px 16px;
  border-left: 3px solid var(--cw-red);
  background: var(--cw-paper-warm);
  border-radius: 0 var(--cw-radius) var(--cw-radius) 0;
}
.cw-quote p { margin: 0 0 6px; font-size: 15.5px; line-height: 1.55; }
.cw-quote cite { font-size: 13px; font-style: normal; font-weight: 600; color: var(--cw-ink-faint); }

/* Mechanism card / analysis */
.cw-analysis { list-style: none; margin: 24px 0; padding: 0; }
.cw-analysis-line {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin: 0 0 14px;
  font-size: 16px;
  line-height: 1.45;
  color: var(--cw-ink-soft);
  opacity: 0;
  animation: cw-rise .45s ease forwards;
}
@keyframes cw-rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.cw-tick { color: var(--cw-ok); font-weight: 700; flex: 0 0 auto; }

/* Analysis wait-block — matched review + trainer glimpse. BELOW the
   computation lines, ruled off so it can't be misread as one of them. */
.cw-wait {
  margin: 26px 0 0;
  padding: 20px 0 0;
  border-top: 1px solid var(--cw-line-soft);
}
.cw-review-matched { margin-top: 0; }
.cw-review-author {
  display: block;
  margin-top: 8px;
  font-size: 13px;
  font-style: normal;
  font-weight: 600;
  color: var(--cw-ink-faint);
}
.cw-trainer { margin: 16px auto 0; text-align: center; }
.cw-trainer img {
  width: 132px;
  height: auto;
  aspect-ratio: 1 / 1;      /* box reserved — the analysis screen must not shift */
  object-fit: contain;
  opacity: .9;
}

.cw-spinner {
  width: 26px; height: 26px;
  margin: 26px auto;
  border: 3px solid var(--cw-line);
  border-top-color: var(--cw-red);
  border-radius: 50%;
  animation: cw-spin .8s linear infinite;
}
@keyframes cw-spin { to { transform: rotate(360deg); } }

/* Result */
.cw-result-title { font-size: clamp(38px, 12vw, 54px); margin-bottom: 4px; }
.cw-result-sub { color: var(--cw-ink-soft); font-weight: 600; margin-bottom: 18px; }
.cw-readback {
  padding: 15px 16px;
  background: var(--cw-paper-warm);
  border-radius: var(--cw-radius);
  color: var(--cw-ink);
}
.cw-converge, .cw-bridge {
  margin: 28px 0;
  padding: 20px 18px;
  background: var(--cw-ink);
  color: #fff;
  border-radius: var(--cw-radius-lg);
}
.cw-converge .cw-h3, .cw-bridge .cw-h3 { color: #fff; margin-top: 0; }
.cw-converge .cw-p, .cw-bridge .cw-p { color: #ddd8d2; }
.cw-converge .cw-p strong, .cw-bridge .cw-p strong { color: #fff; }

.cw-drill { margin: 28px 0; }
.cw-watch { color: var(--cw-ink); }

.cw-video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  margin: 0 0 14px;
  background: var(--cw-ink);
  border-radius: var(--cw-radius);
  overflow: hidden;
}
.cw-video-ph { position: relative; display: flex; align-items: center; justify-content: center; }
.cw-video-ph img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .55; }
.cw-video-ph-label {
  position: relative;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .04em;
  color: #fff;
  text-align: center;
  padding: 0 16px;
}

.cw-projection { margin: 28px 0; }
.cw-proj-row {
  margin: 0 0 10px;
  padding: 0 0 10px;
  font-size: 15.5px;
  line-height: 1.5;
  color: var(--cw-ink-soft);
  border-bottom: 1px solid var(--cw-line-soft);
}
.cw-proj-row strong { color: var(--cw-ink); }

/* Offer */
.cw-priceframe {
  margin: 18px 0;
  padding: 14px 16px;
  font-size: 15px;
  line-height: 1.5;
  color: var(--cw-ink-soft);
  border: 1px dashed var(--cw-line);
  border-radius: var(--cw-radius);
}
.cw-offer {
  margin: 24px 0;
  padding: 22px 18px;
  border: 2px solid var(--cw-ink);
  border-radius: var(--cw-radius-lg);
  background: var(--cw-paper);
}
.cw-price {
  font-family: var(--cw-font-head);
  font-size: 54px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: -.02em;
}
.cw-price-sub { margin: 6px 0 16px; font-size: 15px; color: var(--cw-ink-faint); }
.cw-price-sub s { color: var(--cw-ink-faint); }
.cw-offer-lines { list-style: none; margin: 0 0 18px; padding: 0; }
.cw-offer-lines li {
  padding: 10px 0;
  font-size: 16px;
  line-height: 1.4;
  border-bottom: 1px solid var(--cw-line-soft);
}
.cw-offer-lines li:last-child { border-bottom: 0; }

.cw-badges { list-style: none; margin: 14px 0 0; padding: 0; }
.cw-badges li {
  padding: 5px 0;
  font-size: 14px;
  line-height: 1.4;
  color: var(--cw-ink-soft);
}
.cw-fine { margin: 12px 0 0; font-size: 13px; color: var(--cw-ink-faint); line-height: 1.45; }

.cw-error { margin: 10px 0 0; font-size: 14px; color: var(--cw-red); line-height: 1.45; }
.cw-error[hidden] { display: none; }

/* Secondary email exit — NEVER gates the result or the offer. */
.cw-email {
  margin: 24px 0;
  padding: 16px 0 0;
  border-top: 1px solid var(--cw-line-soft);
  text-align: center;
}
.cw-email-form { margin-top: 10px; text-align: left; }
.cw-email-h { font-size: 15px; font-weight: 600; margin: 0 0 8px; }
.cw-email-done { font-size: 15px; font-weight: 600; color: var(--cw-ok); margin: 0; }

.cw-faq { margin: 30px 0 0; }

.cw-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  margin: 0 0 16px;
  font-size: 14px;
  color: var(--cw-ink-soft);
  background: var(--cw-paper-warm);
  border-radius: var(--cw-radius);
}
.cw-foot[hidden] { display: none; }
.cw-foot .cw-link { padding: 0; font-size: 14px; }

.cw-noscript { max-width: 560px; margin: 40px auto; padding: 0 20px; font-family: sans-serif; }

/* Larger screens — the quiz stays a phone-width column on purpose. */
@media (min-width: 700px) {
  .cw-app { padding-bottom: 64px; }
  .cw-stage { min-height: 60vh; }
}

@media (prefers-reduced-motion: reduce) {
  .cw-stage.cw-in,
  .cw-analysis-line { animation: none; opacity: 1; }
  .cw-progress-fill { transition: none; }
  .cw-spinner { animation-duration: 2s; }
  .cw-opt:active, .cw-cta:active, .cw-chip:active { transform: none; }
}
