/* Quiz funnel — hand-rolled, mobile-first, ~4KB. No framework: the 2s-on-4G
   budget and the Facebook in-app browser (reduced viewport height) rule out
   shipping Tailwind for twelve light screens. Design tokens follow the deck's
   rules: one question per screen, everything visible without scrolling. */

:root {
  --ink: #10201b;
  --muted: #5b6b66;
  --bg: #f7faf9;
  --card: #ffffff;
  --line: #e3eae7;
  --accent: #0a7d55;      /* EzVibe green */
  --accent-ink: #ffffff;
  --red: #dc2626;
  --red-bg: #fdecec;
  --green: #16a34a;
  --green-bg: #e9f7ee;
  --radius: 12px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}

#app {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  min-height: 100dvh; /* FB in-app browser: the real, reduced height */
  display: flex;
  flex-direction: column;
  padding: 12px 16px calc(16px + env(safe-area-inset-bottom));
}

/* -- top bar: back arrow + progress, always visible ---------------------- */
.top { display: flex; align-items: center; gap: 10px; min-height: 40px; }
.back {
  border: 0; background: none; font-size: 22px; line-height: 1;
  color: var(--muted); padding: 8px 10px 8px 0; cursor: pointer;
}
.back[hidden] { display: none; }
.progress { flex: 1; height: 5px; background: var(--line); border-radius: 3px; overflow: hidden; }
.progress > i { display: block; height: 100%; background: var(--accent); border-radius: 3px; transition: width .25s ease; }

/* -- screen scaffold ----------------------------------------------------- */
.screen { flex: 1; display: flex; flex-direction: column; padding-top: 8px; }
h1 { font-size: 22px; line-height: 1.25; letter-spacing: -0.01em; margin: 6px 0 4px; }
.sub { color: var(--muted); font-size: 14px; margin-bottom: 10px; }
.spacer { flex: 1; }

/* -- options: sized so 9 rows + headline fit a 560px viewport ------------ */
.opts { display: flex; flex-direction: column; gap: 7px; margin-top: 8px; }
.opt {
  display: flex; align-items: center; gap: 10px; width: 100%; text-align: left;
  background: var(--card); border: 1.5px solid var(--line); border-radius: var(--radius);
  padding: 11px 14px; font-size: 15px; color: var(--ink); cursor: pointer;
  transition: border-color .12s ease, background .12s ease;
}
.opt:active { background: #eef5f2; }
.opt.sel { border-color: var(--accent); background: #edf7f3; }
.opt .tick {
  width: 20px; height: 20px; flex: none; border-radius: 6px;
  border: 1.5px solid var(--line); display: inline-flex; align-items: center;
  justify-content: center; font-size: 13px; color: var(--accent-ink); background: var(--card);
}
.opt.sel .tick { background: var(--accent); border-color: var(--accent); }
.opts.compact .opt { padding: 8px 12px; font-size: 14px; border-radius: 10px; }
.opts.compact { gap: 5px; }

/* -- primary button ------------------------------------------------------ */
.btn {
  border: 0; width: 100%; background: var(--accent); color: var(--accent-ink);
  font-size: 16px; font-weight: 600; padding: 14px; border-radius: var(--radius);
  cursor: pointer; margin-top: 12px;
}
.btn:disabled { opacity: .45; cursor: default; }
.btn.ghost { background: none; color: var(--accent); font-weight: 600; padding: 10px; margin-top: 4px; }

/* -- slider (screen 4) --------------------------------------------------- */
.hours { font-size: 44px; font-weight: 700; text-align: center; margin: 18px 0 2px; }
.hours small { font-size: 15px; font-weight: 500; color: var(--muted); }
.live { text-align: center; color: var(--muted); font-size: 14px; min-height: 20px; margin-bottom: 14px; }
input[type="range"] { width: 100%; accent-color: var(--accent); height: 34px; }

/* -- result: the nine-function chart ------------------------------------- */
.score { font-size: 40px; font-weight: 800; letter-spacing: -0.02em; }
.chart { display: flex; flex-direction: column; gap: 6px; margin: 12px 0; }
.crow { font-size: 12.5px; }
.crow .lbl { color: var(--ink); margin-bottom: 2px; }
.cbar { height: 16px; border-radius: 5px; display: flex; align-items: center; padding: 0 8px; font-size: 10.5px; font-weight: 700; letter-spacing: .02em; }
.cbar.red { background: var(--red-bg); color: var(--red); border-left: 4px solid var(--red); }
.cbar.green { background: var(--green-bg); color: var(--green); border-left: 4px solid var(--green); }
.mirror { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; margin: 10px 0; font-size: 14px; }
.mirror ul { margin: 6px 0 0 18px; }
.mirror li { margin: 3px 0; }
.cost { font-size: 14px; color: var(--ink); margin: 8px 0; }
.cost strong { color: var(--red); }
.note { font-size: 12px; color: var(--muted); }

/* -- email capture ------------------------------------------------------- */
.emailbox { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; margin: 12px 0; }
.emailbox p { font-size: 14px; margin-bottom: 8px; }
.emailbox input {
  width: 100%; font-size: 16px; padding: 12px; border: 1.5px solid var(--line);
  border-radius: 10px; margin-bottom: 8px; background: var(--bg); color: var(--ink);
}
.emailbox .ok { color: var(--green); font-size: 14px; font-weight: 600; }
.err { color: var(--red); font-size: 13px; margin-top: 6px; }

/* -- paywall ------------------------------------------------------------- */
.saidbox { background: #f2efe9; border-radius: var(--radius); padding: 12px 14px; font-size: 14px; margin: 10px 0; }
.anchor { font-size: 14px; color: var(--muted); margin: 10px 0; }
.anchor div { padding: 3px 0; }
.anchor .ez { color: var(--ink); font-weight: 600; }
.plan { background: var(--card); border: 2px solid var(--accent); border-radius: var(--radius); padding: 16px; margin: 10px 0; }
.plan .price { font-size: 32px; font-weight: 800; }
.plan .price small { font-size: 14px; color: var(--muted); font-weight: 500; }
.seats { font-size: 13px; color: var(--muted); margin-top: 8px; }
.risk { font-size: 13.5px; color: var(--ink); background: var(--green-bg); border-radius: 10px; padding: 10px 12px; margin: 10px 0; }
.finept { font-size: 12.5px; color: var(--muted); text-align: center; margin-top: 6px; }

/* very short viewports (FB browser on small phones) */
@media (max-height: 600px) {
  h1 { font-size: 19px; }
  .opt { padding: 8px 12px; font-size: 14px; }
  .opts { gap: 5px; }
  .hours { font-size: 34px; margin: 8px 0 0; }
}

/* -- Screen 9: processing ------------------------------------------------ */
.bigbar {
  height: 10px; background: var(--line); border-radius: 6px;
  overflow: hidden; margin: 18px 0 8px;
}
.bigbar > i {
  display: block; height: 100%; width: 0; background: var(--accent);
  border-radius: 6px; transition: width .12s linear;
}
.proc-pct { font-size: 26px; font-weight: 700; margin: 0 0 4px; font-variant-numeric: tabular-nums; }
.proc-status { min-height: 40px; }
.proof-small { font-size: 13px; color: var(--muted); border-top: 1px solid var(--line); padding-top: 12px; }

/* Micro-commitment popup — covers the card, not the whole page, so the
   progress bar stays visible behind it. */
.overlay {
  position: fixed; inset: 0; z-index: 20; display: flex;
  align-items: center; justify-content: center; padding: 20px;
  background: rgba(16, 32, 27, .55);
}
.modal {
  background: var(--card); border-radius: var(--radius); padding: 20px;
  width: 100%; max-width: 380px; box-shadow: 0 18px 40px rgba(0, 0, 0, .18);
}
.modal-q { font-size: 17px; font-weight: 600; line-height: 1.35; margin: 0 0 16px; }
.modal-btns { display: flex; gap: 10px; }
.mbtn {
  flex: 1; padding: 12px; font-size: 15px; font-weight: 600; cursor: pointer;
  border-radius: 10px; border: 1.5px solid var(--line);
  background: var(--card); color: var(--ink);
}
.mbtn.yes { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.mbtn:active { transform: translateY(1px); }

/* -- Screen 11: projection ----------------------------------------------- */
.proj-row { margin: 14px 0; }
.proj-title { font-size: 15px; margin: 0 0 6px; }
.proj-bar { height: 6px; background: var(--line); border-radius: 4px; overflow: hidden; }
.proj-bar > i {
  display: block; height: 100%; width: 0; background: var(--accent); border-radius: 4px;
  animation: projfill 1.1s ease forwards;
}
.proj-row:nth-child(3) .proj-bar > i { animation-delay: .12s; }
.proj-row:nth-child(4) .proj-bar > i { animation-delay: .24s; }
.proj-does { font-size: 13.5px; color: var(--muted); margin: 8px 0 0; line-height: 1.5; }
@keyframes projfill { from { width: 0 } to { width: 100% } }
@media (prefers-reduced-motion: reduce) {
  .proj-bar > i { animation: none; width: 100%; }
}
.proof {
  background: var(--green-bg); border: 1px solid #cfe9d9; border-radius: var(--radius);
  padding: 14px 16px; margin: 18px 0 14px;
}
.proof p { font-size: 14px; line-height: 1.55; margin: 0 0 8px; }
.proof p:last-child { margin-bottom: 0; }
.proof-sig { font-weight: 600; color: var(--accent); }
