:root {
  --ink: #1b1b3a; --text: #2b2f3a; --muted: #5b6270; --line: #e2e1ee; --panel: #f6f4ff;
  --accent: #6d5bd0; --accent-2: #ff7a59; --accent-bg: #efebff; --err: #b42318; --ok: #0f7a5c;
  --radius: 16px;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: linear-gradient(180deg, #f3efff 0, #fff7f2 340px, #ffffff 640px) no-repeat, #fff;
  color: var(--text); font: 16px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  min-height: 100dvh;
}

/* ---------- top bar */
.top { position: sticky; top: 0; z-index: 5; background: rgba(255,255,255,.88); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.brand { max-width: 680px; margin: 0 auto; padding: 10px 16px 8px; font-weight: 700; color: var(--ink); font-size: 15px; display: flex; align-items: center; gap: 8px; }
.steplabel { margin-left: auto; font-weight: 600; font-size: 13px; color: var(--accent); }
.track { height: 6px; background: var(--accent-bg); }
#bar { height: 6px; width: 0; background: linear-gradient(90deg, var(--accent), var(--accent-2)); border-radius: 0 6px 6px 0; transition: width .35s ease; }

main { max-width: 680px; margin: 0 auto; padding: 24px 16px 72px; }
.pane { animation: in .3s ease both; }
@keyframes in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

h1 { color: var(--ink); font-size: 30px; line-height: 1.2; margin: 6px 0 12px; letter-spacing: -.01em; }
h2 { color: var(--ink); font-size: 20px; margin: 0 0 8px; }
h2.q { display: flex; gap: 10px; align-items: flex-start; font-size: 19px; line-height: 1.35; margin: 26px 0 12px; }
.qemo { font-size: 22px; line-height: 1.2; }
.kicker { color: var(--accent); font-weight: 700; font-size: 14px; margin: 0; }
.lead { font-size: 17px; margin: 0 0 12px; }
.small { color: var(--muted); font-size: 13px; }
.center { text-align: center; }

/* ---------- hero */
.hero-emojis { display: flex; gap: 8px; font-size: 30px; margin-bottom: 14px; }
.hero-emojis span { width: 52px; height: 52px; display: grid; place-items: center; background: #fff; border-radius: 14px; box-shadow: 0 4px 14px rgba(60,40,140,.12); animation: bob 3s ease-in-out infinite; }
.hero-emojis span:nth-child(2) { animation-delay: .2s; } .hero-emojis span:nth-child(3) { animation-delay: .4s; }
.hero-emojis span:nth-child(4) { animation-delay: .6s; } .hero-emojis span:nth-child(5) { animation-delay: .8s; }
@keyframes bob { 50% { transform: translateY(-5px); } }
.perks { list-style: none; padding: 0; margin: 16px 0; display: grid; gap: 8px; }
.perks li { display: flex; gap: 12px; align-items: center; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; font-weight: 600; color: var(--ink); }
.perks li span { font-size: 22px; }
.small-perks li { font-weight: 500; font-size: 15px; padding: 8px 12px; }

/* ---------- options */
.opts { display: grid; gap: 10px; }
.opts.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.opts.grid3, .opts.row3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.opt { position: relative; display: flex; gap: 12px; align-items: center; padding: 12px 14px; min-height: 56px; background: #fff; border: 2px solid var(--line); border-radius: 14px; cursor: pointer; transition: transform .12s, border-color .12s, box-shadow .12s; }
.opt:hover { border-color: #c9c1f2; box-shadow: 0 4px 14px rgba(60,40,140,.08); }
.opt:active { transform: scale(.985); }
.opt input { position: absolute; opacity: 0; pointer-events: none; }
.opt .emo { font-size: 24px; width: 40px; height: 40px; flex: none; display: grid; place-items: center; background: var(--panel); border-radius: 10px; }
.opt .lbl { flex: 1; }
.opt .tick { width: 22px; height: 22px; flex: none; border-radius: 50%; border: 2px solid var(--line); }
.opt input[type=checkbox] ~ .tick { border-radius: 6px; }
.opt:has(input:checked) { border-color: var(--accent); background: var(--accent-bg); box-shadow: 0 6px 18px rgba(109,91,208,.18); }
.opt:has(input:checked) .emo { background: #fff; }
.opt:has(input:checked) .tick { border-color: var(--accent); background: var(--accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 12.5l4 4 8-9' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/16px no-repeat; }
.opt:has(input:focus-visible) { outline: 3px solid #b7abf5; outline-offset: 2px; }
.opts.grid3 .opt, .opts.row3 .opt { justify-content: center; text-align: center; flex-direction: column; gap: 4px; padding: 10px 6px; }
.opts.grid3 .tick, .opts.row3 .tick { display: none; }
.opts.row3 .emo { width: auto; height: auto; background: none; font-size: 22px; }
.opts + .opts { margin-top: 10px; }
.hint { color: var(--ok); font-size: 13px; margin-left: 4px; white-space: nowrap; }
.optin { margin-top: 14px; }

/* ---------- quiz dots */
.dots { display: flex; gap: 6px; margin: 10px 0 0; }
.dots span { height: 6px; flex: 1; border-radius: 4px; background: var(--accent-bg); }
.dots .done { background: var(--accent); } .dots .on { background: var(--accent-2); }

/* ---------- cards */
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; margin: 16px 0; }
.card.soft { background: var(--panel); border-color: transparent; }
.card.sub { padding: 14px; }
.sub-q { display: flex; gap: 10px; align-items: center; font-weight: 700; color: var(--ink); margin: 0 0 10px; }
.sub-q .emo { font-size: 22px; }

/* ---------- type reveal */
.reveal, .ready { --tc: var(--accent); --tt: var(--accent-bg); }
.reveal { text-align: center; background: var(--tt); border-radius: 22px; padding: 24px 18px 8px; }
.badge { width: 96px; height: 96px; margin: 10px auto; font-size: 54px; display: grid; place-items: center; background: #fff; border-radius: 28px; box-shadow: 0 10px 30px rgba(0,0,0,.1); animation: pop .5s cubic-bezier(.2,1.6,.4,1) both; }
.badge.sm { width: 64px; height: 64px; font-size: 36px; margin: 0; border-radius: 20px; flex: none; }
@keyframes pop { from { transform: scale(.3) rotate(-12deg); opacity: 0; } }
.reveal h1 { color: var(--tc); }
.card.tip { text-align: left; border: 2px dashed var(--tc); background: #fff; }
.unlock { border: 2px solid var(--accent); background: linear-gradient(180deg, #fff, var(--panel)); }
.ready { display: flex; gap: 14px; align-items: center; background: var(--tt); border-radius: 20px; padding: 14px 16px; margin-bottom: 8px; }
.ready h1 { margin: 2px 0 0; font-size: 24px; color: var(--ink); }

/* ---------- MaxDiff */
.md { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.md-head, .md-row { display: grid; grid-template-columns: 64px 1fr 64px; align-items: center; }
.md-head { background: var(--panel); font-size: 13px; font-weight: 700; color: var(--muted); text-align: center; padding: 8px 0; }
.md-row { border-top: 1px solid var(--line); min-height: 64px; }
.md-text { display: flex; gap: 10px; align-items: center; padding: 10px 4px; }
.md-text .emo { font-size: 22px; flex: none; }
.md-pick { display: grid; place-items: center; height: 100%; cursor: pointer; }
.md-pick input { position: absolute; opacity: 0; }
.md-pick span { width: 30px; height: 30px; border-radius: 50%; border: 2px solid var(--line); background: #fff; display: grid; place-items: center; font-size: 16px; transition: transform .12s; }
.md-pick.best input:checked + span { background: #12a36f; border-color: #12a36f; transform: scale(1.12); }
.md-pick.best input:checked + span::after { content: "👍"; }
.md-pick.worst input:checked + span { background: #ef5a4c; border-color: #ef5a4c; transform: scale(1.12); }
.md-pick.worst input:checked + span::after { content: "👎"; }
.md-pick input:focus-visible + span { outline: 3px solid #b7abf5; outline-offset: 2px; }

/* ---------- buttons */
.nav { display: flex; gap: 10px; margin-top: 26px; }
button { font: inherit; font-weight: 700; padding: 13px 20px; border-radius: 14px; border: 2px solid var(--line); background: #fff; color: var(--ink); cursor: pointer; transition: transform .12s, box-shadow .12s; }
button:active { transform: scale(.97); }
button.primary { flex: 1; background: linear-gradient(90deg, var(--accent), #8a5bd6); border-color: transparent; color: #fff; box-shadow: 0 8px 20px rgba(109,91,208,.3); }
button.primary:hover { box-shadow: 0 10px 26px rgba(109,91,208,.4); }
button.big { width: 100%; font-size: 17px; padding: 16px; margin: 10px 0; }
button:disabled { opacity: .6; cursor: progress; }
.ghost { color: var(--muted); }
.err { color: var(--err); font-size: 14px; font-weight: 600; min-height: 1em; margin: 14px 0 0; }
.shake { animation: shake .35s; }
@keyframes shake { 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } }
input[type=email] { width: 100%; font: inherit; font-size: 17px; padding: 14px 16px; border: 2px solid var(--line); border-radius: 14px; background: #fff; }
input[type=email]:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-bg); }
.dbg { font: 11px monospace; color: #9a2f20; background: #fde8e4; border-radius: 4px; padding: 1px 4px; }

@media (max-width: 560px) {
  h1 { font-size: 26px; }
  .opts.grid3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .opts.two .opt .emo { width: 34px; height: 34px; font-size: 20px; }
  .md-head, .md-row { grid-template-columns: 52px 1fr 52px; }
  .hero-emojis span { width: 46px; height: 46px; font-size: 26px; }
}

/* ======================================================================
   Report pages: fixed A4 size (794 × 1123 CSS px). Scaled on screen, captured 1:1 for the PDF.
   ====================================================================== */
.rp-view { position: relative; overflow: hidden; margin: 14px 0; }
.rp-scale { position: absolute; top: 0; left: 0; width: 794px; transform-origin: 0 0; display: grid; gap: 20px; }
.rp-offscreen { position: fixed; left: -10000px; top: 0; width: 794px; }
.rp-offscreen .rp-page { margin-bottom: 20px; }
.rp-page {
  --tc: #6d5bd0; --tt: #efebff;
  width: 794px; height: 1123px; overflow: hidden; position: relative; background: #fff; color: #2b2f3a;
  padding: 44px 56px 70px; border-radius: 6px; box-shadow: 0 6px 24px rgba(30,20,80,.12);
  font: 15.5px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}
.rp-offscreen .rp-page { box-shadow: none; border-radius: 0; }
.rp-page::before { content: ""; position: absolute; left: 0; top: 0; right: 0; height: 8px; background: var(--tc); }
.rp-page h1 { font-size: 34px; margin: 2px 0 4px; color: #1b1b3a; }
.rp-page h1.rp-h1s { font-size: 30px; margin-bottom: 14px; }
.rp-page h2 { font-size: 18px; margin: 26px 0 10px; color: #1b1b3a; }
.rp-page p { margin: 0 0 9px; }
.rp-head { display: flex; justify-content: space-between; font-size: 12px; color: #7a7f8c; font-weight: 600; margin-bottom: 18px; }
.rp-kicker { color: var(--tc); font-weight: 700; font-size: 13px; text-transform: uppercase; letter-spacing: .06em; margin: 0 !important; }
.rp-hero { display: flex; gap: 22px; align-items: center; background: var(--tt); border-radius: 18px; padding: 22px 24px; margin-bottom: 6px; }
.rp-emoji { width: 96px; height: 96px; flex: none; display: grid; place-items: center; font-size: 56px; background: #fff; border-radius: 24px; }
.rp-tag { font-size: 18px; font-weight: 600; color: var(--tc); margin: 0 !important; }
.rp-bars { display: grid; gap: 7px; }
.rp-bar { display: grid; grid-template-columns: 170px 1fr 44px; gap: 10px; align-items: center; font-size: 13.5px; }
.rp-bar.on { font-weight: 700; color: #1b1b3a; }
.rp-track { height: 12px; background: #f0eff5; border-radius: 6px; overflow: hidden; display: block; }
.rp-track span { display: block; height: 100%; border-radius: 6px; }
.rp-bar b { text-align: right; }
.rp-loop { display: flex; align-items: stretch; gap: 6px; }
.rp-step { flex: 1; background: #fff; border: 2px solid var(--tt); border-radius: 12px; padding: 10px; font-size: 13px; display: flex; flex-direction: column; gap: 4px; }
.rp-sl { font-weight: 700; color: var(--tc); font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }
.rp-arrow { align-self: center; color: var(--tc); font-weight: 700; font-size: 18px; }
.rp-checks { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.rp-checks li { background: #f8f8fb; border-radius: 10px; padding: 9px 12px; font-size: 13.5px; }
.rp-foot { position: absolute; left: 56px; right: 56px; bottom: 26px; font-size: 11px; color: #8a8f9c; border-top: 1px solid #eceaf3; padding-top: 10px; }
.rp-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.rp-chips span { background: var(--tt); color: #1b1b3a; border-radius: 999px; padding: 6px 14px; font-weight: 600; font-size: 13.5px; }
.rp-two { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.rp-card { display: flex; gap: 10px; align-items: center; background: #fff6f4; border-radius: 12px; padding: 10px 12px; margin-bottom: 8px; font-size: 14px; }
.rp-card.good { background: #eefaf4; }
.rp-card span { font-size: 22px; }
.rp-reframe { display: grid; gap: 8px; }
.rp-reframe .old { background: #f6f6f8; color: #7a7f8c; text-decoration: line-through; border-radius: 12px; padding: 10px 14px; }
.rp-reframe .new { background: var(--tt); color: #1b1b3a; font-weight: 700; font-size: 17px; border-radius: 12px; padding: 14px 16px; border-left: 5px solid var(--tc); }
.rp-second { margin-top: 20px; background: #f8f8fb; border-radius: 12px; padding: 12px 14px; font-size: 13.5px; }
.rp-starter { display: flex; gap: 14px; align-items: center; background: var(--tc); color: #fff; border-radius: 16px; padding: 16px 20px; }
.rp-starter > span { font-size: 34px; }
.rp-starter p { margin: 2px 0 0 !important; font-size: 15px; }
.rp-tactics { display: grid; gap: 8px; }
.rp-tactic { display: flex; gap: 12px; align-items: flex-start; border: 1px solid #eceaf3; border-radius: 12px; padding: 9px 12px; }
.rp-tactic > span { font-size: 24px; width: 40px; height: 40px; flex: none; display: grid; place-items: center; background: var(--tt); border-radius: 10px; }
.rp-tactic p { margin: 1px 0 0 !important; font-size: 13.5px; color: #4b5060; }
.rp-note { font-size: 13px; color: #5b6270; }
.rp-week { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.rp-week div { background: var(--tt); border-radius: 12px; padding: 9px 10px; font-size: 12.5px; line-height: 1.4; display: flex; flex-direction: column; gap: 2px; }
.rp-week b { color: var(--tc); font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }
.rp-close { margin-top: 16px; text-align: center; font-weight: 600; color: #1b1b3a; background: #fff8e6; border-radius: 12px; padding: 12px; }
