/* ============================================================
   Quiz result: the personal roadmap.
   Why its own file: the quiz now ends on one masterclass, the
   all-access line and an email signup, and none of that is
   shared with any other page. main.css still styles the card,
   the header, the progress bar and the option buttons; this
   file adds what the rebuilt result needs. Loaded by
   inc/auto/quiz.php wherever the quiz is shown.
   Motion is opacity and transform only; main.css already
   switches every animation off under prefers-reduced-motion.
   The screen transitions are at the end of this file.
   ============================================================ */

/* Questions are headings now (for screen readers), so they keep
   the old paragraph's size rather than a heading's. */
.quiz .quiz-q { font-size: 1.12rem; font-weight: 700; line-height: 1.5; margin: 0; }
.quiz .quiz-q:focus, .quiz .qz-title:focus { outline: none; }
.quiz .quiz-q:focus-visible, .quiz .qz-title:focus-visible { outline: 2px solid var(--gada); outline-offset: 4px; }

/* Tap targets: never under 48px tall on a phone. */
.quiz .quiz-opt { min-height: 52px; align-items: center; }
.quiz .quiz-opt .k { margin-top: 0; }
.quiz .quiz-opt:focus-visible { outline: 2px solid var(--gada); outline-offset: 2px; }
.quiz .quiz-back { min-height: 44px; }

.qz-eyebrow {
  margin: 0 0 6px;
  font-size: .8rem;
  font-weight: 700;
  color: var(--shobuj);
}
.qz-title { margin: 0; font-size: 1.45rem; font-weight: 800; line-height: 1.4; }
.qz-unsure { margin: 10px 0 0; font-size: .95rem; color: var(--dhoa-dark); line-height: 1.6; }
/* Copy 13: the fixed line under the result heading. */
.qz-why { margin: 8px 0 0; font-size: .95rem; color: var(--dhoa-dark); line-height: 1.6; max-width: 70ch; }
.qz-pick .qz-direct { display: block; font-weight: 600; font-size: .92rem; padding-top: 10px; }

.qz-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: 22px;
  margin-top: 20px;
  align-items: start;
}

/* ---- the one recommendation ---- */
.qz-pick {
  background: var(--nil);
  color: #fff;
  border-radius: 12px;
  padding: 22px 22px 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  animation: qzRise .35s cubic-bezier(.2, .7, .2, 1) both;
}
@keyframes qzRise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.qz-label { font-size: .78rem; font-weight: 600; color: var(--gada-bright); }
.qz-name { margin: 0; font-size: 1.25rem; font-weight: 800; line-height: 1.35; color: #fff; }
.qz-meta { margin: 0; font-size: .85rem; color: var(--dhoa); }
.qz-can-h { margin: 10px 0 0; font-size: .8rem; font-weight: 700; color: var(--dhoa); }
.qz-can { margin: 2px 0 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 6px; }
.qz-can li {
  position: relative;
  padding-left: 22px;
  font-size: .93rem;
  line-height: 1.55;
}
.qz-can li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: .55em;
  width: 10px;
  height: 6px;
  border-left: 2px solid var(--gada-bright);
  border-bottom: 2px solid var(--gada-bright);
  transform: rotate(-45deg);
}

.qz-price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; margin-top: 12px; }
.qz-p {
  font-family: var(--f-display);
  font-size: 2rem;
  font-weight: 800;
  line-height: 1.25;
  font-variant-numeric: tabular-nums;
}
.qz-payback { font-size: .92rem; font-weight: 600; color: var(--gada-bright); line-height: 1.5; }
.qz-fine { margin: 0; font-size: .78rem; color: var(--dhoa); line-height: 1.55; }

.qz-pick .qz-buy { justify-content: center; text-align: center; margin-top: 10px; min-height: 48px; }
.qz-refund { margin: 4px 0 0; font-size: .82rem; color: var(--dhoa); line-height: 1.55; text-align: center; }
.qz-refund a, .qz-more { color: var(--gada-bright); text-decoration: underline; text-underline-offset: 2px; }
.qz-more { font-size: .85rem; text-align: center; padding: 6px 0 0; }

/* ---- the plan ---- */
.qz-plan {
  background: var(--kagoj);
  border-radius: 12px;
  padding: 18px 20px;
}
.qz-plan-h { margin: 0 0 10px; font-size: .8rem; font-weight: 700; color: var(--gada); }
.qz-steps { margin: 0; padding: 0; list-style: none; counter-reset: qz; display: flex; flex-direction: column; gap: 14px; }
.qz-steps li { counter-increment: qz; position: relative; padding-left: 36px; font-size: .93rem; line-height: 1.6; }
.qz-steps li::before {
  content: counter(qz, bengali);
  position: absolute;
  left: 0;
  top: 1px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--gada);
  color: #fff;
  font-size: .8rem;
  font-weight: 700;
  line-height: 24px;
  text-align: center;
}
.qz-steps b { display: block; font-size: .85rem; color: var(--ink); }
.qz-steps span { color: var(--dhoa-dark); }
.qz-laptop {
  margin: 14px 0 0;
  padding: 10px 12px;
  border-left: 3px solid var(--gada);
  background: var(--kagoj-card);
  font-size: .88rem;
  line-height: 1.6;
}
.qz-laptop a { color: var(--gada); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }

/* ---- the all-access line ---- */
.qz-all {
  margin-top: 20px;
  padding: 14px 16px;
  border: 1px solid var(--line-light);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px 18px;
  flex-wrap: wrap;
}
.qz-all p { margin: 0; font-size: .95rem; line-height: 1.6; flex: 1 1 260px; }
.qz-all .btn { flex: none; justify-content: center; color: var(--ink); border-color: var(--ink); min-height: 44px; }

/* ---- the free next step ---- */
.qz-free {
  margin-top: 16px;
  padding: 16px;
  background: var(--gada-soft);
  border-radius: 10px;
}
.qz-free-h { margin: 0; font-weight: 700; font-size: 1rem; line-height: 1.5; }
.qz-free-sub { margin: 4px 0 0; font-size: .88rem; color: var(--dhoa-dark); line-height: 1.6; }
.qz-field { margin-top: 12px; }
.qz-field label { display: block; font-size: .85rem; font-weight: 600; margin-bottom: 4px; }
.qz-row { display: flex; gap: 8px; flex-wrap: wrap; }
.qz-row input {
  flex: 1 1 200px;
  min-width: 0;
  min-height: 48px;
  padding: 10px 14px;
  border: 1px solid var(--line-light);
  border-radius: 6px;
  background: #fff;
  font: inherit;
  font-size: 1rem; /* 16px or more, so phones do not zoom on focus */
  line-height: 1.4;
  color: var(--ink);
}
.qz-row input:focus { outline: 2px solid var(--gada); outline-offset: 1px; border-color: var(--gada); }
.qz-row .btn { flex: 0 1 auto; min-height: 48px; justify-content: center; }
.qz-msg { margin: 8px 0 0; font-size: .88rem; line-height: 1.6; color: var(--shobuj); min-height: 0; }
.qz-msg:empty { display: none; }
.qz-msg.is-bad { color: #B42318; }
.qz-free.is-done .qz-row { display: none; }

@media (max-width: 760px) {
  .quiz-body { padding: 22px 18px 24px; }
  .quiz-head { padding-left: 18px; padding-right: 18px; }
  .qz-grid { grid-template-columns: minmax(0, 1fr); }
  .qz-title { font-size: 1.25rem; }
  .qz-all .btn, .qz-row .btn { width: 100%; }
}

/* The soft alternative for undecided visitors: one free lesson. */
.qz-trial { margin: 14px 0 0; font-size: .92rem; line-height: 1.6; color: var(--dhoa-dark); }
.qz-trial a { color: var(--gada); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }

/* ---- screen transitions ----
   Forward slides in from the right, back (quiz.js sets .qz-back) from the
   left. The options arrive a beat apart, the progress bar grows by
   transform (quiz.js sets scaleX; the width is pinned so the inline width
   in the markup no longer moves it), and the roadmap builds in order: the
   pick, the plan and its steps, the all-access line, the free series.
   Every animation fills backwards only, so hovers keep their transforms. */
.quiz-bar > span {
  width: 100% !important;
  transform: scaleX(.08);
  transform-origin: 0 50%;
  transition: transform .5s cubic-bezier(.2, .7, .2, 1);
}
@keyframes qzNext { from { opacity: 0; transform: translateX(32px); } }
@keyframes qzBack { from { opacity: 0; transform: translateX(-32px); } }
@keyframes qzUp { from { opacity: 0; transform: translateY(10px); } }
.quiz .quiz-screen { animation: qzNext .42s cubic-bezier(.2, .7, .2, 1) backwards; }
.quiz.qz-back .quiz-screen { animation-name: qzBack; }
.quiz .quiz-opt { animation: qzUp .4s cubic-bezier(.2, .7, .2, 1) backwards; }
.quiz .quiz-opt:nth-child(2) { animation-delay: .05s; }
.quiz .quiz-opt:nth-child(3) { animation-delay: .1s; }
.quiz .quiz-opt:nth-child(4) { animation-delay: .15s; }
.quiz .quiz-opt:nth-child(5) { animation-delay: .2s; }
.quiz .quiz-opt:nth-child(n+6) { animation-delay: .25s; }
.quiz .quiz-opt:active { transform: scale(.98); }
.quiz .qz-plan, .quiz .qz-steps li, .quiz .qz-all, .quiz .qz-free { animation: qzUp .45s cubic-bezier(.2, .7, .2, 1) backwards; }
.quiz .qz-plan { animation-delay: .1s; }
.quiz .qz-steps li:nth-child(1) { animation-delay: .18s; }
.quiz .qz-steps li:nth-child(2) { animation-delay: .26s; }
.quiz .qz-steps li:nth-child(3) { animation-delay: .34s; }
.quiz .qz-all { animation-delay: .4s; }
.quiz .qz-free { animation-delay: .48s; }
