/* =========================================================
   Moojo — assessment funnel
   Focus mode: no site nav, no footer. One question per screen.
   Mobile-first; desktop just centres the same column.
   ========================================================= */

:root{
  --green-900:#063D2B;
  --green-800:#0A5A3E;
  --green-700:#0E7C51;
  --green-600:#12A968;
  --green-500:#1CC37D;
  --green-400:#4CD895;
  --green-100:#E3F7EC;
  --green-50:#F3FBF6;

  --ink:#0C1F17;
  --ink-soft:#3E5449;
  --ink-mute:#6B7D74;
  --white:#FFFFFF;
  --line:#E3EEE7;
  --amber-bg:#FFF6E6;
  --amber-line:#F0C67A;
  --amber-ink:#7A5312;

  --ease: cubic-bezier(.22,1,.36,1);
  --font: 'Plus Jakarta Sans', system-ui, sans-serif;
}

*,*::before,*::after{ box-sizing:border-box; }
html{ overflow-x:hidden; -webkit-text-size-adjust:100%; }
body{
  margin:0;
  font-family:var(--font);
  color:var(--ink);
  background:var(--white);
  overflow-x:hidden;
  width:100%;
  -webkit-font-smoothing:antialiased;
  min-height:100vh;
  min-height:100dvh;
}
button{ font-family:inherit; }
img{ max-width:100%; display:block; }

/* ---------- sticky progress header ---------- */
.q-top{
  position:fixed; top:0; left:0; right:0; z-index:60;
  display:flex; align-items:center; gap:12px;
  padding:12px 16px;
  background:rgba(255,255,255,.94);
  backdrop-filter:blur(8px) saturate(150%);
  -webkit-backdrop-filter:blur(8px) saturate(150%);
}
.q-back{
  flex-shrink:0;
  display:inline-flex; align-items:center; justify-content:center;
  width:30px; height:30px; border-radius:50%;
  background:var(--green-50); border:none;
  color:var(--ink-soft); cursor:pointer;
  transition:background .2s var(--ease);
}
.q-back:hover{ background:var(--green-100); }
.q-back svg{ width:16px; height:16px; stroke:currentColor; }

.q-progress-track{
  flex:1; height:9px; border-radius:999px;
  background:var(--green-100);
  overflow:hidden;
  box-shadow:inset 0 1px 2px rgba(10,60,35,.06);
}
#qProgressFill{
  display:block; height:100%; width:20%;
  border-radius:999px;
  background:linear-gradient(90deg, var(--green-500), var(--green-700));
  transition:width .55s var(--ease);
}

/* ---------- stage / steps ---------- */
.q-stage{ position:relative; width:100%; }
.q-step{
  display:none;
  min-height:100vh; min-height:100dvh;
  padding:76px 20px 40px;
}
.q-step.is-active{ display:block; }
.q-step.is-entering{ animation:stepIn .42s var(--ease) both; }
.q-step.is-entering-back{ animation:stepInBack .42s var(--ease) both; }
@keyframes stepIn{
  from{ opacity:0; transform:translateX(38px); }
  to{ opacity:1; transform:none; }
}
@keyframes stepInBack{
  from{ opacity:0; transform:translateX(-38px); }
  to{ opacity:1; transform:none; }
}

.q-inner{ width:100%; max-width:520px; margin:0 auto; }
.q-inner--center{
  display:flex; flex-direction:column;
  align-items:center; justify-content:center;
  text-align:center;
  min-height:70vh;
}

/* per-question banner image (removed by onerror if its file is missing) */
.q-hero{
  width:100%; height:260px;
  border-radius:16px; overflow:hidden;
  margin:0 0 20px;
  background:linear-gradient(150deg, var(--green-50), var(--green-100));
  animation:heroIn .5s var(--ease) both;
}
/* bias the crop toward the top so faces/heads aren't cut off by the wide banner */
.q-hero img{ width:100%; height:100%; object-fit:cover; object-position:center 20%; display:block; }
@keyframes heroIn{ from{ opacity:0; transform:scale(1.03); } to{ opacity:1; transform:none; } }

.q-eyebrow{
  font-size:12px; font-weight:800;
  text-transform:uppercase; letter-spacing:.08em;
  color:var(--green-600);
  margin:0 0 10px;
}
.q-title{
  font-size:clamp(1.5rem, 6vw, 2rem);
  line-height:1.22;
  letter-spacing:-0.02em;
  margin:0 0 10px;
}
.q-help{
  font-size:14.5px; color:var(--ink-mute);
  margin:0 0 26px; line-height:1.55;
}

/* ---------- option cards ---------- */
.q-cards{ display:flex; flex-direction:column; gap:12px; }
.q-cards--tight{ gap:10px; }

.q-card{
  position:relative;
  display:flex; align-items:center; gap:14px;
  width:100%;
  text-align:left;
  background:var(--white);
  border:1.5px solid var(--line);
  border-radius:16px;
  padding:18px 18px;
  cursor:pointer;
  font-size:16px;
  color:var(--ink);
  transition:border-color .2s var(--ease), box-shadow .2s var(--ease), transform .15s var(--ease), background .2s var(--ease);
  -webkit-tap-highlight-color:transparent;
}
.q-card:hover{ border-color:var(--green-400); box-shadow:0 6px 18px rgba(10,60,35,.08); }
.q-card:active{ transform:scale(.985); }
.q-card.is-picked{
  border-color:var(--green-500);
  background:var(--green-50);
  box-shadow:0 0 0 4px rgba(28,195,125,.18), 0 8px 24px rgba(10,60,35,.12);
}
.q-card-ico{
  flex-shrink:0;
  width:42px; height:42px;
  display:flex; align-items:center; justify-content:center;
  background:var(--green-100);
  border-radius:12px;
  color:var(--green-700);
}
.q-card-ico svg{ width:21px; height:21px; }
.q-card.is-picked .q-card-ico{ background:var(--green-500); color:var(--white); }
.q-card-text{ font-weight:700; }
.q-card-body{ display:flex; flex-direction:column; gap:2px; min-width:0; }
.q-card-body strong{ font-size:15.5px; font-weight:700; line-height:1.3; }
.q-card-body small{ font-size:13px; color:var(--ink-mute); line-height:1.45; }

/* multi-select: cards show a checkbox so users know they can pick more than one */
.q-step--multi .q-card{ padding-right:52px; }
.q-step--multi .q-card::after{
  content:'';
  position:absolute; right:16px; top:50%; transform:translateY(-50%);
  width:22px; height:22px;
  border:2px solid var(--line); border-radius:50%;
  transition:background .18s var(--ease), border-color .18s var(--ease);
}
.q-step--multi .q-card.is-picked::after{
  border-color:var(--green-600);
  background:var(--green-600) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center/13px no-repeat;
}
.q-continue--multi{ margin-top:18px; }

/* ---------- metrics step ---------- */
.q-units{
  display:inline-flex; background:var(--green-50);
  border-radius:999px; padding:4px; margin-bottom:22px;
}
.q-unit{
  border:none; background:transparent;
  font-size:13px; font-weight:700; color:var(--ink-mute);
  padding:8px 16px; border-radius:999px; cursor:pointer;
  transition:background .2s var(--ease), color .2s var(--ease);
}
.q-unit.is-active{ background:var(--white); color:var(--green-700); box-shadow:0 2px 8px rgba(10,40,25,.08); }

.q-field{ margin-bottom:20px; }
.q-field label{
  display:flex; align-items:baseline; justify-content:space-between; gap:10px;
  font-size:12px; font-weight:800;
  text-transform:uppercase; letter-spacing:.05em;
  color:var(--ink-soft); margin-bottom:9px;
}
.q-field output{
  font-size:18px; font-weight:800;
  text-transform:none; letter-spacing:normal;
  color:var(--green-700);
}
.q-field input[type=range]{
  width:100%; accent-color:var(--green-600);
  cursor:pointer; height:26px;
}
.q-metric-note{
  min-height:20px; margin:0 0 18px;
  font-size:13px; font-weight:600; color:var(--amber-ink);
}
.q-continue{
  width:100%;
  background:linear-gradient(135deg, var(--green-500), var(--green-700));
  color:var(--white); border:none;
  font-size:16px; font-weight:800;
  padding:17px; border-radius:999px;
  cursor:pointer;
  box-shadow:0 12px 28px rgba(18,169,104,.32);
  transition:transform .2s var(--ease), box-shadow .2s var(--ease), opacity .2s var(--ease);
}
.q-continue:hover{ transform:translateY(-2px); }
.q-continue:disabled{ opacity:.45; cursor:not-allowed; transform:none; box-shadow:none; }

/* ---------- processing ---------- */
.q-scanner{
  position:relative; width:86px; height:86px; margin-bottom:26px;
}
.q-scanner span{
  position:absolute; inset:0;
  border:2.5px solid transparent;
  border-top-color:var(--green-500);
  border-radius:50%;
  animation:spin 1.15s linear infinite;
}
.q-scanner span:nth-child(2){ inset:11px; border-top-color:var(--green-600); animation-duration:1.5s; animation-direction:reverse; }
.q-scanner span:nth-child(3){ inset:22px; border-top-color:var(--green-400); animation-duration:1.9s; }
@keyframes spin{ to{ transform:rotate(360deg); } }

.q-processing-text{
  font-size:17px; font-weight:700; margin:0 0 26px;
  min-height:26px;
}
.q-checks{ list-style:none; margin:0; padding:0; text-align:left; width:100%; max-width:340px; }
.q-checks li{
  position:relative;
  padding:9px 0 9px 30px;
  font-size:14px; color:var(--ink-mute);
  opacity:.3;
  transition:opacity .4s var(--ease), color .4s var(--ease);
}
.q-checks li::before{
  content:'';
  position:absolute; left:0; top:12px;
  width:16px; height:16px; border-radius:50%;
  border:2px solid var(--line);
  transition:background .3s var(--ease), border-color .3s var(--ease);
}
.q-checks li.is-done{ opacity:1; color:var(--ink); }
.q-checks li.is-done::before{
  background:var(--green-600); border-color:var(--green-600);
}
.q-checks li.is-done::after{
  content:'';
  position:absolute; left:5px; top:16px;
  width:5px; height:9px;
  border:solid var(--white); border-width:0 2px 2px 0;
  transform:rotate(45deg) translateY(-1px);
}

/* ---------- result ---------- */
.q-step--result{ padding:56px 20px 60px; background:var(--green-50); }
.q-result{ width:100%; max-width:600px; margin:0 auto; }
.q-result-head{ text-align:center; margin-bottom:26px; }
.q-badge{
  display:inline-block;
  font-size:11.5px; font-weight:800;
  text-transform:uppercase; letter-spacing:.07em;
  color:var(--green-700); background:var(--green-100);
  padding:6px 14px; border-radius:999px; margin-bottom:14px;
}
.q-result-headline{
  font-size:clamp(1.45rem, 5.6vw, 2rem);
  line-height:1.25; letter-spacing:-0.02em; margin:0;
}

.q-bignum{
  background:linear-gradient(160deg, var(--green-700), var(--green-900));
  color:var(--white);
  border-radius:22px;
  padding:30px 22px;
  text-align:center;
  margin-bottom:14px;
  box-shadow:0 20px 46px rgba(10,60,35,.24);
}
.q-bignum-label{
  display:block;
  font-size:11.5px; font-weight:800;
  text-transform:uppercase; letter-spacing:.07em;
  color:rgba(255,255,255,.72); margin-bottom:8px;
}
.q-bignum-row{ display:flex; align-items:baseline; justify-content:center; gap:9px; }
.q-bignum-row strong{
  font-size:clamp(3.6rem, 17vw, 5.4rem);
  font-weight:800; line-height:1; letter-spacing:-0.035em;
  font-variant-numeric:tabular-nums;
}
.q-bignum-row span{ font-size:18px; font-weight:600; color:rgba(255,255,255,.78); }
.q-bignum-sub{ font-size:13.5px; color:rgba(255,255,255,.8); margin:10px 0 0; }

/* ---------- weight-loss trend chart ---------- */
.q-chart-card{
  background:var(--white); border:1px solid var(--line);
  border-radius:18px; padding:18px 16px 14px;
  margin:0 0 14px; /* reset the default <figure> side margin so it matches the days box width */
  box-shadow:0 10px 30px rgba(10,60,35,.08);
}
.q-chart-title{
  font-size:12px; font-weight:800;
  text-transform:uppercase; letter-spacing:.05em;
  color:var(--green-700); margin:0 0 12px; text-align:center;
}
.q-chart-hold{ width:100%; }
#qChart{ width:100%; height:auto; display:block; overflow:visible; }
#qChart .qc-grid{ stroke:var(--line); stroke-width:1; }
#qChart .qc-area{ fill:url(#qcGrad); }
#qChart .qc-line{ fill:none; stroke:var(--green-600); stroke-width:3; stroke-linecap:round; stroke-linejoin:round; }
#qChart .qc-dot{ fill:var(--white); stroke:var(--green-700); stroke-width:3; }
#qChart .qc-goaldot{ fill:var(--green-600); stroke:var(--white); stroke-width:2.5; }
#qChart text{ font-family:var(--font); fill:var(--ink-mute); }
#qChart .qc-badge{ fill:var(--green-700); }
#qChart .qc-badgetext{ fill:#fff; font-weight:800; }
.q-chart-foot{ font-size:12px; color:var(--ink-mute); text-align:center; margin:10px 0 0; }

/* ---------- product reveal ---------- */
.q-reveal{
  display:flex; flex-direction:column; gap:14px;
  background:var(--white); border:1px solid var(--line);
  border-radius:16px; padding:18px; margin-bottom:22px;
}
.q-reveal-item{ display:flex; gap:12px; align-items:flex-start; }
.q-reveal-ico{
  flex-shrink:0; width:40px; height:40px; border-radius:11px;
  background:var(--green-100); color:var(--green-700);
  display:flex; align-items:center; justify-content:center;
}
.q-reveal-ico svg{ width:20px; height:20px; }
.q-reveal-item strong{ display:block; font-size:14.5px; margin-bottom:2px; }
.q-reveal-item small{ font-size:13px; color:var(--ink-mute); line-height:1.5; }

/* now sits inside the chart card, as a table row under the chart */
.q-stats{
  display:grid; grid-template-columns:repeat(3,1fr); gap:10px;
  margin:14px 0 0; padding:14px 0 0;
  border-top:1px solid var(--line);
}
.q-stats div{ display:flex; flex-direction:column; gap:3px; text-align:center; }
.q-stats div + div{ border-left:1px solid var(--line); }
.q-stats span{ font-size:10.5px; font-weight:800; text-transform:uppercase; letter-spacing:.05em; color:var(--ink-mute); }
.q-stats strong{ font-size:16px; }

.q-block{ margin-bottom:22px; }
.q-block h2{
  font-size:12px; font-weight:800;
  text-transform:uppercase; letter-spacing:.06em;
  color:var(--green-700); margin:0 0 7px;
}
.q-block p{ font-size:15.5px; line-height:1.68; color:var(--ink-soft); margin:0; }
.q-block--accent{
  background:var(--white);
  border-left:3px solid var(--green-500);
  border-radius:0 14px 14px 0;
  padding:18px 18px 18px 16px;
}
.q-block--accent p{ color:var(--ink); font-weight:500; }

.q-result-media{ margin:0 0 24px; }
.q-result-media img{ width:100%; border-radius:18px; box-shadow:0 14px 34px rgba(10,60,35,.14); }

.q-disclaimer{
  background:var(--white);
  border:1px solid var(--line);
  border-radius:14px;
  padding:16px 18px;
  font-size:12.5px; line-height:1.7; color:var(--ink-mute);
  margin-bottom:26px;
}
.q-disclaimer strong{ display:block; color:var(--ink-soft); margin-bottom:5px; font-size:13px; }

/* the gate — tone shifts from green to clinical amber on purpose */
.q-gate{
  background:var(--amber-bg);
  border:1.5px solid var(--amber-line);
  border-radius:20px;
  padding:26px 22px;
  text-align:center;
}
.q-gate-tag{
  display:inline-block;
  font-size:11px; font-weight:800;
  text-transform:uppercase; letter-spacing:.07em;
  color:var(--amber-ink);
  background:rgba(255,255,255,.7);
  padding:6px 13px; border-radius:999px; margin-bottom:12px;
}
.q-gate h2{ font-size:1.3rem; line-height:1.3; margin:0 0 12px; color:var(--ink); }
.q-gate p{ font-size:14.5px; line-height:1.65; color:var(--ink-soft); margin:0 0 12px; }
.q-gate p:last-child{ margin-bottom:0; }
.q-cta{
  width:100%;
  background:linear-gradient(135deg, var(--green-500), var(--green-700));
  color:var(--white); border:none;
  font-size:16.5px; font-weight:800;
  padding:18px; border-radius:999px; cursor:pointer;
  box-shadow:0 14px 32px rgba(18,169,104,.35);
  margin-top:8px;
  animation:pulse 2.6s ease-in-out infinite;
}
@keyframes pulse{
  0%,100%{ box-shadow:0 16px 34px rgba(6,61,43,.4); }
  50%{ box-shadow:0 16px 46px rgba(6,61,43,.62); }
}
/* the final CTA now sits BELOW the amber gate box, in a deeper distinct green */
.q-cta--final{
  margin-top:16px;
  background:linear-gradient(135deg, var(--green-700), var(--green-900));
}

/* ---------- modal ---------- */
/* display:flex would override the browser's default [hidden]{display:none},
   leaving an invisible full-screen layer that swallows every tap. */
.q-modal[hidden]{ display:none; }
.q-modal{ position:fixed; inset:0; z-index:200; display:flex; align-items:center; justify-content:center; padding:20px; }
.q-modal-backdrop{ position:absolute; inset:0; background:rgba(6,20,13,.55); backdrop-filter:blur(3px); animation:fadeIn .25s ease both; }
.q-modal-card{
  position:relative;
  background:var(--white);
  border-radius:22px;
  padding:30px 24px 24px;
  max-width:440px; width:100%;
  text-align:center;
  box-shadow:0 30px 70px rgba(0,0,0,.3);
  animation:popIn .32s var(--ease) both;
  max-height:90vh; overflow-y:auto;
}
@keyframes fadeIn{ from{opacity:0} to{opacity:1} }
@keyframes popIn{ from{ opacity:0; transform:translateY(16px) scale(.96); } to{ opacity:1; transform:none; } }
.q-modal-ico{
  display:inline-flex; align-items:center; justify-content:center;
  width:56px; height:56px; border-radius:50%;
  background:var(--green-100); font-size:26px; margin-bottom:14px;
}
.q-modal-card h2{ font-size:1.25rem; line-height:1.3; margin:0 0 12px; }
.q-modal-card p{ font-size:14.5px; line-height:1.65; color:var(--ink-soft); margin:0 0 12px; }
.q-modal-strong{ color:var(--ink) !important; font-weight:600; }
.q-modal-go{
  display:block; width:100%;
  background:linear-gradient(135deg, var(--green-500), var(--green-700));
  color:var(--white); text-decoration:none;
  font-size:16px; font-weight:800;
  padding:17px; border-radius:999px;
  box-shadow:0 12px 30px rgba(18,169,104,.35);
  margin-top:6px;
}
.q-modal-cancel{
  background:none; border:none;
  font-size:13.5px; font-weight:600; color:var(--ink-mute);
  padding:14px 8px 2px; cursor:pointer; width:100%;
}

/* ---------- toast ---------- */
.q-toast[hidden]{ display:none; }
.q-toast{
  position:fixed; left:16px; right:16px; bottom:20px;
  z-index:150;
  pointer-events:none; /* purely informational — must never block a tap */
  background:var(--green-800); color:var(--white);
  border-radius:16px; padding:15px 18px;
  font-size:14px; line-height:1.55; font-weight:500;
  box-shadow:0 18px 44px rgba(10,60,35,.4);
  animation:toastIn .38s var(--ease) both;
  max-width:480px; margin:0 auto;
}
.q-toast.is-out{ animation:toastOut .3s var(--ease) both; }
@keyframes toastIn{ from{ opacity:0; transform:translateY(90%); } to{ opacity:1; transform:none; } }
@keyframes toastOut{ from{ opacity:1; } to{ opacity:0; transform:translateY(40%); } }

/* ---------- desktop ---------- */
@media (min-width:720px){
  .q-step{ padding-top:80px; display:none; }
  .q-step.is-active{ display:flex; align-items:center; justify-content:center; }
  .q-step--result{ display:none; }
  .q-step--result.is-active{ display:block; padding-top:70px; }
  .q-card{ padding:20px; }
}

@media (prefers-reduced-motion: reduce){
  *{ animation-duration:.01ms !important; animation-iteration-count:1 !important; transition-duration:.01ms !important; }
}

.q-modal-ico{ color:var(--green-700); }
.q-modal-ico svg{ width:26px; height:26px; }

/* =========================================================
   RESULT PAGE v2 — personalized analysis layout
   ========================================================= */

/* 01 — answer echoes */
.q-echo{ display:flex; flex-direction:column; gap:10px; margin-bottom:20px; }
.q-echo-item{ background:var(--white); border:1px solid var(--line); border-radius:14px; padding:14px 16px; }
.q-echo-label{ display:block; font-size:11px; font-weight:800; text-transform:uppercase; letter-spacing:.05em; color:var(--green-700); margin-bottom:4px; }
.q-echo-item strong{ font-size:15.5px; color:var(--ink); line-height:1.35; font-weight:700; }

/* standalone "this isn't just about willpower" box */
.q-accent-solo{ margin-bottom:32px; }
.q-accent-solo h2{ font-size:1.1rem; text-transform:none; letter-spacing:normal; color:var(--ink); margin:0 0 6px; }
.q-accent-solo p{ font-size:14.5px; color:var(--ink-soft); margin:0; line-height:1.6; }

/* section headers within the result */
.q-sec-head{ text-align:center; margin:10px 0 16px; }
.q-eyebrow-badge{
  display:inline-block; font-size:11px; font-weight:800;
  text-transform:uppercase; letter-spacing:.06em;
  color:var(--green-700); background:var(--green-100);
  padding:6px 13px; border-radius:999px; margin-bottom:10px;
}
.q-sec-head h2{ font-size:1.35rem; line-height:1.25; margin:0; }

/* 04 — numbered "why tirzepatide" badges */
.q-reveal-num{
  flex-shrink:0; width:40px; height:40px; border-radius:11px;
  background:var(--green-100); color:var(--green-700);
  display:flex; align-items:center; justify-content:center;
  font-weight:800; font-size:14px; font-variant-numeric:tabular-nums;
}

/* 05 — timeline in weeks */
.q-weeks{
  text-align:center; font-size:clamp(2.2rem,9vw,3rem); font-weight:800;
  color:var(--green-600); letter-spacing:-0.02em; margin:6px 0 10px;
}
.q-weeks-note{ text-align:center; font-size:13.5px; color:var(--ink-mute); max-width:440px; margin:0 auto 22px; line-height:1.6; }

/* 07 — gate checklist */
.q-gate-list{ list-style:none; padding:0; display:flex; flex-direction:column; gap:10px; margin:16px auto 0; text-align:left; max-width:280px; }
.q-gate-list li{ position:relative; padding-left:28px; font-size:14.5px; font-weight:600; color:var(--ink); }
.q-gate-list li::before{
  content:'✓'; position:absolute; left:0; top:0;
  width:20px; height:20px; border-radius:50%;
  background:var(--green-600); color:#fff; font-size:11px;
  display:flex; align-items:center; justify-content:center;
}

/* micro under the final CTA */
.q-cta-micro{ text-align:center; font-size:12.5px; color:var(--ink-mute); margin:12px 0 0; }
