/* ===== Quiz ===== */
body.quiz {
  background: var(--bg);
}
/* Full-height app shell. svh/dvh avoid the jump when FB/IG in-app toolbars show/hide. */
.app {
  min-height: 100vh; min-height: 100svh;
  display: flex; flex-direction: column;
  max-width: var(--max); margin: 0 auto;
  padding: var(--safe-t) var(--gutter) var(--safe-b);
}

.qhead { display: grid; grid-template-columns: 44px 1fr 44px; align-items: center; height: 58px; }
.back {
  width: 40px; height: 40px; border-radius: 12px; border: 1px solid var(--line); background: rgba(255,255,255,.03);
  display: grid; place-items: center; cursor: pointer; transition: opacity .2s;
}
.back[hidden] { display: grid !important; visibility: hidden; }
.qlogo { width: 110px; height: 28px; justify-self: center; background: transparent; }
.qlogo.slot::before { background: none; border: 1px dashed var(--line); border-radius: 6px; font-size: 9px; }
.qlogo img { object-fit: contain; }
.qstep { justify-self: end; font-size: 12px; font-weight: 600; color: var(--ink-3); white-space: nowrap; }

.progress { height: 4px; border-radius: 4px; background: rgba(255,255,255,.08); overflow: hidden; }
.progress span { display: block; height: 100%; width: 0; background: var(--accent); border-radius: 4px; transition: width .45s cubic-bezier(.2,.8,.2,1); }

.stage { flex: 1; position: relative; padding: 36px 0 24px; }
.screen { animation: slideIn .38s cubic-bezier(.2,.8,.2,1) both; }
.screen.back-anim { animation-name: slideBack; }
.screen.center { text-align: center; display: flex; flex-direction: column; align-items: center; }
@keyframes slideIn { from { opacity: 0; transform: translateX(24px); } }
@keyframes slideBack { from { opacity: 0; transform: translateX(-24px); } }

.qtitle { font-size: clamp(32px, 9vw, 42px); margin: 10px 0 10px; }
.qtitle.sm { font-size: 24px; margin-top: 22px; }
.qsub { margin: 0 0 28px; font-size: 16px; }

/* Unit toggle */
.unit { display: flex; width: fit-content; margin-left: auto; margin-right: auto; padding: 4px; border-radius: 12px; background: rgba(255,255,255,.05); border: 1px solid var(--line); margin-top: 0; margin-bottom: 18px; }
.unit button { border: 0; background: transparent; padding: 8px 20px; border-radius: 9px; font-weight: 600; font-size: 14px; cursor: pointer; color: var(--ink-2); }
.unit button[aria-checked="true"] { background: #fff; color: #000; }

/* Big number input */
.bignum {
  display: flex; align-items: baseline; justify-content: center; gap: 10px;
  padding: 22px 16px; border-radius: 20px; background: var(--card); border: 1.5px solid var(--line);
  transition: border-color .2s, box-shadow .2s; cursor: text;
}
.bignum:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(227,59,54,.18); }
.bignum input {
  -webkit-appearance: none; appearance: none; border: 0; outline: 0; background: transparent; color: var(--ink);
  font-family: var(--font-display); font-weight: 800; font-size: 64px; line-height: 1; letter-spacing: -0.03em;
  width: 3.2ch; text-align: right; padding: 0; caret-color: var(--accent);
}
.bignum input::placeholder { color: rgba(255,255,255,.16); }
.suffix { font-family: var(--font-display); font-weight: 700; font-size: 22px; color: var(--ink-3); }
.hint { min-height: 22px; margin: 10px 0 18px; font-size: 13px; text-align: center; color: var(--ink-3); }
.hint.err { color: var(--accent); }

/* Options */
.options { display: grid; gap: 12px; }
.opt {
  display: flex; align-items: center; justify-content: space-between; width: 100%;
  min-height: 66px; padding: 0 20px; border-radius: 16px; cursor: pointer; text-align: left;
  background: var(--card); border: 1.5px solid var(--line);
  transition: border-color .15s, background .15s, transform .1s;
  touch-action: manipulation;
}
.opt:active { transform: scale(.985); }
.opt-k { font-family: var(--font-display); font-weight: 800; font-size: 22px; }
.opt-sm { min-height: 54px; background: transparent; }
.opt-sm .opt-k { font-size: 16px; font-weight: 700; color: var(--ink-2); }
.opt-check { width: 24px; height: 24px; border-radius: 50%; border: 2px solid rgba(255,255,255,.2); display: grid; place-items: center; transition: all .15s; }
.opt[aria-checked="true"] { border-color: var(--accent); background: rgba(227,59,54,.1); }
.opt[aria-checked="true"] .opt-check { border-color: var(--accent); background: var(--accent); box-shadow: inset 0 0 0 4px var(--card); }
@media (hover: hover) { .opt:hover { border-color: rgba(255,255,255,.25); } }

/* Loader */
.loader { position: relative; width: 120px; height: 120px; margin-top: 30px; }
.loader svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.loader circle { fill: none; stroke: rgba(255,255,255,.08); stroke-width: 6; }
.loader .arc { stroke: var(--accent); stroke-linecap: round; stroke-dasharray: 213.6; stroke-dashoffset: 213.6; }
.loader span { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--font-display); font-weight: 800; font-size: 26px; }
.checks { list-style: none; padding: 0; margin: 18px 0 0; display: grid; gap: 12px; text-align: left; width: 100%; max-width: 340px; }
.checks li { display: flex; gap: 12px; align-items: center; color: var(--ink-3); font-size: 15px; transition: color .3s; }
.checks li::before { content: ""; flex: none; width: 22px; height: 22px; border-radius: 50%; border: 2px solid rgba(255,255,255,.15); transition: all .3s; }
.checks li.done { color: var(--ink); }
.checks li.done::before { border-color: var(--good); background: var(--good) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='%23050505' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round' d='M6 12.5l4 4L18 8'/%3E%3C/svg%3E") center/14px no-repeat; }

/* Result */
.result-badge { width: 68px; height: 68px; border-radius: 50%; display: grid; place-items: center; background: var(--good); color: #050505; margin-top: 18px; box-shadow: 0 0 0 10px rgba(62,207,142,.14); animation: pop .5s cubic-bezier(.2,1.6,.4,1) both; }
@keyframes pop { from { transform: scale(.4); opacity: 0; } }
.screen.center .eyebrow { margin-top: 22px; }
.summary { width: 100%; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 4px 0 22px; }
.summary div { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 14px; text-align: left; }
.summary span { display: block; font-size: 12px; color: var(--ink-3); text-transform: uppercase; letter-spacing: .08em; }
.summary b { font-family: var(--font-display); font-size: 20px; }
.cta-note { font-size: 13px; color: var(--ink-3); margin: 12px 0 0; }

.qfoot { display: flex; align-items: center; justify-content: center; gap: 6px; font-size: 12px; color: var(--ink-3); padding: 14px 0 18px; }

/* ---------- Goal body picker ---------- */
.bodies { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.body {
  position: relative; display: flex; flex-direction: column; padding: 0; cursor: pointer; text-align: left;
  border-radius: 18px; overflow: hidden;
  background: var(--card); border: 2px solid var(--line);
  transition: border-color .15s, transform .12s, box-shadow .2s;
  touch-action: manipulation; -webkit-user-select: none; user-select: none;
}
.body:active { transform: scale(.975); }
/* odd one out (5th card) sits centred on its own row */
.body:last-child:nth-child(odd) { grid-column: 1 / -1; width: calc(50% - 5px); justify-self: center; }
.body-img { position: relative; display: block; aspect-ratio: 1 / 1; }
.body-img img { object-position: center 25%; filter: grayscale(.15) contrast(1.05); transition: transform .4s ease, filter .3s; }
.body-key {
  position: absolute; top: 10px; left: 10px; z-index: 2;
  width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center;
  font-family: var(--font-display); font-weight: 800; font-size: 13px;
  background: rgba(0,0,0,.55); border: 1px solid rgba(255,255,255,.25);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.body-check {
  position: absolute; top: 10px; right: 10px; z-index: 2; width: 26px; height: 26px; border-radius: 50%;
  border: 2px solid rgba(255,255,255,.55); background: rgba(0,0,0,.3); transition: all .15s;
}
.body-txt { display: flex; flex-direction: column; gap: 1px; padding: 8px 10px 10px; background: var(--card); border-top: 1px solid var(--line); }
.body-name { font-family: var(--font-display); font-weight: 800; font-size: 16px; line-height: 1.15; }
.body-like { font-size: 13px; color: var(--ink-2); }

.body[aria-checked="true"] { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(227,59,54,.22); }
.body[aria-checked="true"] .body-txt { background: var(--accent); border-color: var(--accent); }
.body[aria-checked="true"] .body-like { color: rgba(255,255,255,.85); }
.body[aria-checked="true"] .body-img img { transform: scale(1.04); filter: none; }
.body[aria-checked="true"] .body-key { background: var(--accent); border-color: var(--accent); }
.body[aria-checked="true"] .body-check {
  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 fill='none' stroke='white' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round' d='M6 12.5l4 4L18 8'/%3E%3C/svg%3E") center/14px no-repeat;
}
@media (hover: hover) { .body:hover { border-color: rgba(255,255,255,.28); } }
.screen[data-step="1"] .qsub { margin-bottom: 14px; }
.screen[data-step="1"] .qtitle { font-size: clamp(28px, 8vw, 36px); margin-top: 4px; }
.screen[data-step="1"] .bodies { gap: 10px; }
.stage { padding-top: 18px; }

/* result summary: goal body spans full width */
.summary .wide { grid-column: 1 / -1; }

/* ======================================================================
   Full application flow (rebuilt from Typeform)
   ====================================================================== */
.qtitle { font-size: clamp(26px, 7.4vw, 34px); line-height: 1.12; }
.qsub b { color: var(--ink); }
.screen.compact .qtitle, .screen[data-step="1"] .qtitle { font-size: clamp(28px, 8vw, 36px); }

/* Media block above a question (or inside a statement) */
.qmedia { position: relative; margin: 0 0 18px; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); background: var(--card); width: 100%; }
.qmedia > .slot { position: absolute; inset: 0; display: block; }
.t-statement .qmedia { margin: 0 0 16px; }
.t-statement .qnext { margin-top: 4px; }

/* Answer rows: letter key · label · radio/checkbox */
.options { gap: 10px; }
.opt { gap: 14px; min-height: 60px; padding: 14px 16px; justify-content: flex-start; }
.opt-key {
  flex: none; width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center;
  font-family: var(--font-display); font-weight: 800; font-size: 13px; color: var(--ink-2);
  border: 1px solid rgba(255,255,255,.18); background: rgba(255,255,255,.04); transition: all .15s;
}
.opt-label { flex: 1; font-size: 16px; line-height: 1.35; color: var(--ink-2); }
.opt-label b { color: var(--ink); font-weight: 700; }
.opt-note { color: var(--ink-3); font-style: italic; font-size: 14px; }
.options.big .opt-label { font-family: var(--font-display); font-weight: 800; font-size: 20px; color: var(--ink); }
.opt-check { flex: none; }
.opt[aria-checked="true"] .opt-key { background: var(--accent); border-color: var(--accent); color: #fff; }
.opt[aria-checked="true"] .opt-label { color: var(--ink); }
/* checkboxes for multi-select */
.opt.multi .opt-check { border-radius: 7px; }
.opt.multi[aria-checked="true"] .opt-check {
  box-shadow: none;
  background: var(--accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='white' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round' d='M6 12.5l4 4L18 8'/%3E%3C/svg%3E") center/14px no-repeat;
}
.qnext { margin-top: 20px; }

/* Statement screens */
.t-statement.center { text-align: left; align-items: stretch; }
.compare { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 6px 0 24px; }
.cmp { position: relative; margin: 0; border-radius: var(--radius); overflow: hidden; border: 2px solid var(--line); background: var(--card); }
.cmp.good { border-color: var(--good); }
.cmp.bad { border-color: var(--accent); }
.cmp-img { position: relative; display: block; aspect-ratio: 1 / 1; }
.cmp-img img { object-position: center 20%; }
/* bad example shown in full colour, like the Typeform */
.cmp-badge {
  position: absolute; top: 8px; right: 8px; z-index: 2;
  width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; color: #fff;
  box-shadow: 0 6px 16px rgba(0,0,0,.5);
}
.cmp.good .cmp-badge { background: var(--good); color: #050505; }
.cmp.bad .cmp-badge { background: var(--accent); }
.cmp figcaption { padding: 9px 10px; text-align: center; font-family: var(--font-display); font-weight: 800; font-size: 14px; border-top: 1px solid var(--line); }
.cmp.good figcaption { color: var(--good); }
.cmp.bad figcaption { color: var(--accent); }

.points { list-style: none; padding: 0; margin: 4px 0 20px; display: grid; gap: 14px; }
/* statement lines — plain text with an icon, deliberately NOT boxed so they don't read as buttons */
.points li { display: flex; gap: 12px; align-items: flex-start; padding: 0; font-size: 18px; line-height: 1.45; color: var(--ink-2); }
.points li b { color: var(--ink); }
.pt-ico { flex: none; width: 26px; height: 26px; margin-top: 1px; display: grid; place-items: center; color: var(--accent); background: none; }

/* Analyzing */
.t-analyzing .qtitle.sm { font-size: 24px; }

/* Contact form */
.t-contact .result-badge { margin: 6px 0 0; width: 54px; height: 54px; }
.t-contact .eyebrow { margin-top: 18px; }
.contact { display: grid; gap: 14px; margin-top: 4px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field { display: block; }
.flabel { display: block; font-size: 13px; font-weight: 600; color: var(--ink-2); margin: 0 0 6px 2px; }
.flabel em { color: var(--accent); font-style: normal; }
.field input, .phone select {
  -webkit-appearance: none; appearance: none; width: 100%; height: 54px; padding: 0 16px;
  border-radius: 14px; border: 1.5px solid var(--line); background: var(--card); color: var(--ink);
  font: 500 16px/1 var(--font-body); outline: none; transition: border-color .15s, box-shadow .15s;
}
.field input::placeholder { color: rgba(255,255,255,.28); }
.field input:focus, .phone select:focus { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(227,59,54,.18); }
.phone { display: grid; grid-template-columns: 104px 1fr; gap: 8px; }
.phone select {
  padding: 0 28px 0 12px; cursor: pointer;
  background: var(--card) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='%23999' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round' d='M6 9l6 6 6-6'/%3E%3C/svg%3E") right 10px center/14px no-repeat;
}
.ferr { display: block; min-height: 0; font-size: 12px; color: var(--accent); margin: 5px 0 0 2px; }
.ferr:empty { display: none; }
.field.bad input { border-color: var(--accent); }
.qsubmit { margin-top: 6px; }
.fine-print { font-size: 12px; color: var(--ink-3); text-align: center; margin: 2px 0 0; }
.spin { width: 18px; height: 18px; border-radius: 50%; border: 2.5px solid rgba(255,255,255,.35); border-top-color: #fff; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.qend { margin-top: 20px; animation: fadeIn .25s ease both; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } }
.qmedia.bare { background: none; border: 0; border-radius: 0; margin-left: auto; margin-right: auto; }
.qmedia.bare .slot { background: none; }
.qmedia.bare img { object-fit: contain; }

/* ---------- Action bar: under the answers, pinned to the bottom when content is taller than the screen ---------- */
.qbar {
  position: -webkit-sticky; position: sticky; bottom: -1px; z-index: 6;
  margin: 18px calc(var(--gutter) * -1) 0; padding: 12px var(--gutter) calc(12px + var(--safe-b));
  transition: background .2s, box-shadow .2s;
}
.qbar .qnext { margin: 0; }
.qbar.stuck {
  background: rgba(5,5,5,.94);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  box-shadow: 0 -1px 0 var(--line);
}
.t-statement .qbar { margin-top: 4px; }
.contact .qbar { margin-top: 0; }

/* ---------- Readability: answers are full-strength before they're picked ---------- */
.opt-label { color: var(--ink); font-size: 17.5px; line-height: 1.4; }
.opt-label b { font-weight: 800; }
.opt-note { color: var(--ink-2); font-size: 15px; }
.opt-key { color: var(--ink); border-color: rgba(255,255,255,.3); }
.opt-check { border-color: rgba(255,255,255,.4); }
.options.big .opt-label { font-size: 22px; }
.opt { background: #1a1a1d; border-color: rgba(255,255,255,.14); }
.body { border-color: rgba(255,255,255,.14); }
.body-img img { filter: none; }
.body-name { font-size: 17px; }
.body-like { color: rgba(255,255,255,.85); font-size: 14px; }
.body-check { border-color: rgba(255,255,255,.8); }

/* Selected tile: the red label bar spans the full width of the card */
.body-txt { width: 100%; box-sizing: border-box; align-self: stretch; text-align: left; }
