/* ============================================================
   TaskBlink ROI wizard — Typeform-style, one question at a time.
   Scoped under .tb-page #roi so it inherits the site's tokens.
   ============================================================ */

/* ---- shell ---- */
.tb-page #roi .tbw {
  position: relative;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  max-width: 860px;
  margin: 0 auto;
}

/* progress */
.tb-page #roi .tbw-prog { height: 4px; background: var(--bg-soft); }
.tb-page #roi .tbw-prog-fill {
  height: 100%; width: 0%;
  background: linear-gradient(90deg, var(--magenta), var(--magenta-2, #E22EFA));
  transition: width .45s cubic-bezier(.2,.8,.2,1);
}

.tb-page #roi .tbw-stage {
  position: relative;
  min-height: 420px;
  padding: 46px 46px 30px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
@media (max-width: 700px) {
  .tb-page #roi .tbw-stage { padding: 34px 22px 24px; min-height: 460px; }
}

/* ---- welcome: one promise and a way in ---- */
.tb-page #roi .tbw-welcome { max-width: 620px; }
.tb-page #roi .tbw-w-eyebrow {
  font-size: 12px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase;
  color: var(--magenta); margin-bottom: 14px;
}
.tb-page #roi .tbw-w-title {
  font-family: var(--font-head); font-weight: 800; color: var(--ink);
  font-size: clamp(30px, 4.4vw, 46px); line-height: 1.14; letter-spacing: -.025em; margin: 0 0 16px;
}
.tb-page #roi .tbw-w-title em { font-style: normal; color: var(--magenta); }
.tb-page #roi .tbw-w-sub {
  font-size: clamp(15px, 1.8vw, 17.5px); line-height: 1.62; color: var(--ink-2); margin: 0 0 30px; max-width: 54ch;
}
.tb-page #roi .tbw-w-cta { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.tb-page #roi .tbw-start {
  font: inherit; font-family: var(--font-head); font-weight: 800; font-size: 19px; color: #fff;
  background: var(--magenta); border: 0; border-radius: 9999px; padding: 17px 42px; cursor: pointer;
  box-shadow: 0 20px 42px -16px rgba(239,6,192,.8);
  transition: background .16s, transform .16s, box-shadow .16s;
}
.tb-page #roi .tbw-start span { display: inline-block; margin-left: 6px; transition: transform .18s; }
.tb-page #roi .tbw-start:hover { background: var(--magenta-hover); transform: translateY(-2px); }
.tb-page #roi .tbw-start:hover span { transform: translateX(4px); }
.tb-page #roi .tbw-w-hint { font-size: 13px; color: var(--muted); }
.tb-page #roi .tbw-w-hint b {
  font-family: var(--font-head); background: var(--bg-soft); border: 1px solid var(--line);
  border-radius: 5px; padding: 2px 7px; font-size: 11.5px; color: var(--ink-2);
}
.tb-page #roi .tbw-w-meta { margin-top: 26px; font-size: 12.5px; color: var(--muted); }
.tb-page #roi .tbw-foot[hidden] { display: none; }

/* ---- a single question screen ---- */
.tb-page #roi .tbw-q { display: none; }
.tb-page #roi .tbw-q.tbw-on { display: block; animation: tbwIn .42s cubic-bezier(.2,.8,.2,1) both; }
@keyframes tbwIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

.tb-page #roi .tbw-step {
  font-size: 12px; font-weight: 800; letter-spacing: .09em; text-transform: uppercase;
  color: var(--magenta); margin-bottom: 12px; display: flex; align-items: center; gap: 8px;
}
.tb-page #roi .tbw-step svg { width: 13px; height: 13px; }

.tb-page #roi .tbw-title {
  font-family: var(--font-head); font-weight: 800; color: var(--ink);
  font-size: clamp(24px, 3.4vw, 34px); line-height: 1.22; letter-spacing: -.02em;
  margin: 0 0 10px; max-width: 22ch;
}
.tb-page #roi .tbw-sub { color: var(--ink-2); font-size: 15.5px; line-height: 1.6; margin: 0 0 26px; max-width: 52ch; }

/* ---- choice grid (industry, billing model) ---- */
.tb-page #roi .tbw-choices { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px; }
.tb-page #roi .tbw-choices.tbw-narrow { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); max-width: 620px; }
.tb-page #roi .tbw-choice {
  display: flex; align-items: center; gap: 11px; text-align: left;
  font: inherit; font-size: 15px; font-weight: 600; color: var(--ink);
  background: #fff; border: 1.5px solid var(--line); border-radius: 13px;
  padding: 14px 15px; cursor: pointer; transition: all .16s ease;
}
.tb-page #roi .tbw-choice:hover { border-color: rgba(239,6,192,.5); background: rgba(239,6,192,.03); transform: translateY(-1px); }
.tb-page #roi .tbw-choice.tbw-sel { border-color: var(--magenta); background: rgba(239,6,192,.06); box-shadow: 0 8px 22px -12px rgba(239,6,192,.5); }
.tb-page #roi .tbw-key {
  flex: 0 0 auto; width: 24px; height: 24px; border-radius: 6px; background: var(--bg-soft);
  border: 1px solid var(--line); display: grid; place-items: center;
  font-size: 11.5px; font-weight: 800; color: var(--muted);
}
.tb-page #roi .tbw-choice.tbw-sel .tbw-key { background: var(--magenta); border-color: var(--magenta); color: #fff; }
.tb-page #roi .tbw-choice-sub { display: block; font-weight: 500; font-size: 12.5px; color: var(--muted); margin-top: 2px; }

/* ---- number inputs ---- */
.tb-page #roi .tbw-fields { display: flex; flex-direction: column; gap: 18px; max-width: 460px; }
.tb-page #roi .tbw-field label { display: block; font-size: 14.5px; font-weight: 600; color: var(--ink-2); margin-bottom: 7px; }
.tb-page #roi .tbw-iwrap { position: relative; display: flex; align-items: center; }
.tb-page #roi .tbw-pre, .tb-page #roi .tbw-suf {
  position: absolute; font-family: var(--font-head); font-weight: 800; color: var(--muted); pointer-events: none;
}
.tb-page #roi .tbw-pre { left: 18px; font-size: 26px; }
.tb-page #roi .tbw-suf { right: 18px; font-size: 16px; }
.tb-page #roi .tbw-input {
  width: 100%; font: inherit; font-family: var(--font-head); font-weight: 800;
  font-size: 30px; color: var(--ink); background: #fff;
  border: 2px solid var(--line); border-radius: 14px; padding: 16px 18px;
  transition: border-color .16s, box-shadow .16s; -moz-appearance: textfield;
}
.tb-page #roi .tbw-input::-webkit-outer-spin-button, .tb-page #roi .tbw-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.tb-page #roi .tbw-input:focus { outline: none; border-color: var(--magenta); box-shadow: 0 0 0 4px rgba(239,6,192,.12); }
.tb-page #roi .tbw-input.tbw-haspre { padding-left: 44px; }
.tb-page #roi .tbw-input.tbw-hassuf { padding-right: 96px; }
.tb-page #roi .tbw-input::placeholder { color: #c8cbdc; font-weight: 700; }
.tb-page #roi .tbw-fhint { font-size: 13px; color: var(--muted); margin-top: 7px; }

/* ---- explainer ---- */
.tb-page #roi .tbw-explain { margin-top: 18px; border-left: 3px solid rgba(239,6,192,.35); padding-left: 13px; max-width: 54ch; }
.tb-page #roi .tbw-explain summary { cursor: pointer; font-size: 13.5px; font-weight: 700; color: var(--magenta); }
.tb-page #roi .tbw-explain p { font-size: 13.5px; color: var(--ink-2); line-height: 1.62; margin: 9px 0 0; }

/* ---- footer nav ---- */
.tb-page #roi .tbw-foot {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  padding: 18px 46px 26px; border-top: 1px solid var(--line); background: #fff;
}
@media (max-width: 700px) { .tb-page #roi .tbw-foot { padding: 16px 22px 22px; } }
.tb-page #roi .tbw-next {
  font: inherit; font-weight: 800; font-size: 15.5px; color: #fff;
  background: var(--magenta); border: 0; border-radius: 9999px; padding: 13px 26px; cursor: pointer;
  box-shadow: 0 14px 30px -14px rgba(239,6,192,.7); transition: background .16s, transform .16s;
}
.tb-page #roi .tbw-next:hover:not(:disabled) { background: var(--magenta-hover); transform: translateY(-1px); }
.tb-page #roi .tbw-next:disabled { opacity: .38; cursor: not-allowed; box-shadow: none; }
.tb-page #roi .tbw-back {
  font: inherit; font-weight: 700; font-size: 14px; color: var(--ink-2);
  background: transparent; border: 0; cursor: pointer; padding: 8px 4px;
}
.tb-page #roi .tbw-back:hover { color: var(--magenta); }
.tb-page #roi .tbw-back[hidden] { display: none; }
.tb-page #roi .tbw-kbd { margin-left: auto; font-size: 12.5px; color: var(--muted); }
.tb-page #roi .tbw-kbd b { font-family: var(--font-head); background: var(--bg-soft); border: 1px solid var(--line); border-radius: 5px; padding: 2px 6px; font-size: 11.5px; color: var(--ink-2); }
@media (max-width: 620px) { .tb-page #roi .tbw-kbd { display: none; } }

/* ---- reveal cards (appointment value, per-contact value) ---- */
.tb-page #roi .tbw-reveal {
  background: linear-gradient(135deg, rgba(239,6,192,.08), rgba(226,46,250,.03));
  border: 1px solid rgba(239,6,192,.26); border-radius: 18px; padding: 30px 28px; max-width: 560px;
}
.tb-page #roi .tbw-rev-lbl { font-size: 13.5px; font-weight: 700; color: var(--ink-2); letter-spacing: .01em; }
.tb-page #roi .tbw-rev-val {
  font-family: var(--font-head); font-weight: 800; color: var(--magenta);
  font-size: clamp(42px, 7vw, 62px); line-height: 1.05; margin: 6px 0 4px; letter-spacing: -.02em;
}
.tb-page #roi .tbw-rev-formula { font-size: 13.5px; color: var(--muted); }
.tb-page #roi .tbw-rev-confirm { margin-top: 22px; font-size: 14.5px; color: var(--ink-2); }

/* ============================================================
   THE TWO REVEALS — the number has to land, then the reasoning
   lands one line at a time so it cannot be skimmed past.
   ============================================================ */
.tb-page #roi .tbw-impact { position: relative; overflow: hidden; padding: 34px 30px 30px; max-width: 620px; }

/* the number itself */
.tb-page #roi .tbw-hit { position: relative; display: block; margin: 8px 0 6px; }
.tb-page #roi .tbw-hit-val {
  position: relative; z-index: 1; display: inline-block;
  font-family: var(--font-head); font-weight: 800; color: var(--magenta);
  font-size: clamp(52px, 9vw, 82px); line-height: 1.02; letter-spacing: -.03em;
  opacity: 0; transform: scale(2.6); filter: blur(9px);
}
.tb-page #roi .tbw-hit-on .tbw-hit-val {
  animation: tbwSlam .46s cubic-bezier(.16,1.02,.3,1) forwards;
}
@keyframes tbwSlam {
  0%   { opacity: 0; transform: scale(2.6); filter: blur(9px); }
  62%  { opacity: 1; transform: scale(.94); filter: blur(0); }
  80%  { transform: scale(1.035); }
  100% { opacity: 1; transform: scale(1); filter: blur(0); }
}

/* shockwave under it */
.tb-page #roi .tbw-hit-ring {
  position: absolute; left: 50%; top: 50%; width: 150px; height: 150px; margin: -75px 0 0 -75px;
  border-radius: 50%; border: 2px solid var(--magenta); opacity: 0; pointer-events: none;
}
.tb-page #roi .tbw-hit-on .tbw-hit-ring { animation: tbwRing .62s ease-out .22s forwards; }
@keyframes tbwRing {
  0%   { opacity: .55; transform: scale(.25); }
  100% { opacity: 0; transform: scale(3.1); }
}

/* the card takes the impact */
.tb-page #roi .tbw-hit-on { animation: tbwJolt .34s cubic-bezier(.36,.07,.19,.97) .2s; }
@keyframes tbwJolt {
  0%, 100% { transform: translateY(0); }
  22% { transform: translateY(5px); }
  55% { transform: translateY(-2px); }
}

/* ---- the reasoning, one line at a time ---- */
.tb-page #roi .tbw-lines {
  margin-top: 20px; padding-top: 16px; border-top: 1px dashed rgba(239,6,192,.3);
  display: flex; flex-direction: column; gap: 10px;
}
.tb-page #roi .tbw-line {
  position: relative; padding: 9px 13px; border-radius: 10px;
  font-size: clamp(15px, 1.7vw, 17px); line-height: 1.5; color: var(--ink-2);
  background: transparent; border: 1px solid transparent;
  opacity: 0; transform: translateY(10px); transition: none;
}
.tb-page #roi .tbw-line b { color: var(--ink); font-family: var(--font-head); font-weight: 800; }
.tb-page #roi .tbw-line-on { animation: tbwLineIn .42s cubic-bezier(.2,.8,.2,1) forwards; }
@keyframes tbwLineIn { to { opacity: 1; transform: none; } }

/* the line currently being read is lit; the ones before it stay readable but quiet */
.tb-page #roi .tbw-line-seen { opacity: 1; }
.tb-page #roi .tbw-line-live {
  background: rgba(239,6,192,.07); border-color: rgba(239,6,192,.28);
  color: var(--ink); box-shadow: 0 10px 26px -18px rgba(239,6,192,.9);
}
.tb-page #roi .tbw-line-seen:not(.tbw-line-live) { opacity: .62; }
.tb-page #roi .tbw-line-sum.tbw-line-live { background: rgba(239,6,192,.11); border-color: rgba(239,6,192,.45); }
.tb-page #roi .tbw-line-sum.tbw-line-live b { color: var(--magenta); }

/* while the sequence plays the button is disabled (see .tbw-next:disabled),
   then pops once it unlocks so the eye is pulled back to it */
.tb-page #roi .tbw-next-pop { animation: tbwNextPop .4s cubic-bezier(.2,.8,.2,1); }
@keyframes tbwNextPop {
  0% { transform: scale(.94); } 60% { transform: scale(1.05); } 100% { transform: scale(1); }
}

/* phones: a 2.6x start throws the number well past a narrow screen, and the
   answer chips were 30px tall -- too small to tap */
@media (max-width: 780px) {
  .tb-page #roi .tbw-impact { padding: 26px 20px 24px; }
  .tb-page #roi .tbw-hit-val { transform: scale(1.85); }
  .tb-page #roi .tbw-hit-on .tbw-hit-val { animation-name: tbwSlamSm; }
  @keyframes tbwSlamSm {
    0%   { opacity: 0; transform: scale(1.85); filter: blur(7px); }
    62%  { opacity: 1; transform: scale(.95); filter: blur(0); }
    80%  { transform: scale(1.03); }
    100% { opacity: 1; transform: scale(1); filter: blur(0); }
  }
  .tb-page #roi .tbw-hit-ring { width: 108px; height: 108px; margin: -54px 0 0 -54px; }
  .tb-page #roi .tbw-chip { min-height: 38px; display: inline-flex; align-items: center; }
  .tb-page #roi .tbw-line { padding: 10px 12px; }
}

@media (prefers-reduced-motion: reduce) {
  .tb-page #roi .tbw-hit-val { opacity: 1; transform: none; filter: none; animation: none; }
  .tb-page #roi .tbw-hit-ring { display: none; }
  .tb-page #roi .tbw-hit-on { animation: none; }
  .tb-page #roi .tbw-line { opacity: 1; transform: none; animation: none; }
  .tb-page #roi .tbw-next-pop { animation: none; }
}

/* ---- summary chips (answers so far) ---- */
.tb-page #roi .tbw-chips { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 22px; }
.tb-page #roi .tbw-chip {
  font-size: 12.5px; font-weight: 600; color: var(--ink-2); background: var(--bg-soft);
  border: 1px solid var(--line); border-radius: 9999px; padding: 5px 12px; cursor: pointer;
}
.tb-page #roi .tbw-chip:hover { border-color: var(--magenta); color: var(--magenta); }
.tb-page #roi .tbw-chip b { color: var(--ink); }

/* ---- live working shown while typing ---- */
.tb-page #roi .tbw-live { margin-top: 18px; min-height: 4px; }
.tb-page #roi .tbw-live-eq {
  display: inline-block; background: var(--bg-soft); border: 1px solid var(--line);
  border-left: 3px solid var(--magenta); border-radius: 10px;
  padding: 11px 15px; font-size: 15px; color: var(--ink-2); line-height: 1.55; max-width: 56ch;
}
.tb-page #roi .tbw-live-eq b { color: var(--ink); font-family: var(--font-head); font-weight: 800; }
.tb-page #roi .tbw-live-on .tbw-live-eq { animation: tbwIn .3s ease both; }

/* plain-English breakdown inside a reveal card */
.tb-page #roi .tbw-plain {
  margin-top: 16px; padding-top: 14px; border-top: 1px dashed rgba(239,6,192,.3);
  font-size: 15px; line-height: 1.85; color: var(--ink-2);
}
.tb-page #roi .tbw-plain b { color: var(--ink); font-family: var(--font-head); font-weight: 800; }

/* field hint under secondary inputs */
.tb-page #roi .tbw-field .tbw-fhint { margin-top: 6px; }
