/* ============================================================
   Reveal layout: verdict first, actions second, detail last.
   ============================================================ */

/* ---- 1. THE VERDICT ---- */
.tb-page #roi .tb-verdict {
  background: linear-gradient(135deg, #160b33 0%, #2c0f5c 45%, #561aa0 100%);
  border-radius: 18px; padding: 30px 30px 26px; color: #fff; margin-bottom: 16px;
}
.tb-page #roi .tb-v-lead { font-size: 15px; line-height: 1.6; color: rgba(255,255,255,.82); max-width: 58ch; }
.tb-page #roi .tb-v-lead b { color: #fff; font-weight: 700; }
.tb-page #roi .tb-v-hero { display: flex; align-items: center; gap: 16px; margin: 14px 0 22px; }
.tb-page #roi .tb-v-num {
  font-family: var(--font-head); font-weight: 800; font-size: clamp(56px, 9vw, 86px);
  line-height: .95; color: #fff; letter-spacing: -.03em;
  text-shadow: 0 6px 30px rgba(239,6,192,.55);
}
.tb-page #roi .tb-v-unit { font-family: var(--font-head); font-weight: 800; font-size: 19px; line-height: 1.25; color: var(--magenta); }
.tb-page #roi .tb-v-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
@media (max-width: 640px) { .tb-page #roi .tb-v-tiles { grid-template-columns: 1fr; } }
.tb-page #roi .tb-v-tile {
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.14);
  border-radius: 12px; padding: 12px 14px;
}
.tb-page #roi .tb-v-tile span { display: block; font-size: 12px; color: rgba(255,255,255,.7); font-weight: 600; }
.tb-page #roi .tb-v-tile b { font-family: var(--font-head); font-weight: 800; font-size: 22px; color: #fff; }
.tb-page #roi .tb-v-tile b i { font-style: normal; font-size: 12px; font-weight: 600; color: rgba(255,255,255,.6); margin-left: 2px; }
.tb-page #roi .tb-v-profit { background: rgba(239,6,192,.22); border-color: rgba(239,6,192,.5); }
.tb-page #roi .tb-v-foot { margin-top: 14px; font-size: 12px; color: rgba(255,255,255,.6); line-height: 1.5; }

/* ---- 2. ACTIONS (immediately after the verdict) ---- */
.tb-page #roi .tb-actions {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 18px 20px; margin-bottom: 18px;
  background: #fff; border: 1.5px solid rgba(239,6,192,.28); border-radius: 16px;
  box-shadow: 0 16px 40px -26px rgba(239,6,192,.5);
}
.tb-page #roi .tb-a-primary {
  font-family: var(--font-head); font-weight: 800; font-size: 16px; color: #fff; text-decoration: none;
  background: var(--magenta); border-radius: 9999px; padding: 15px 30px;
  box-shadow: 0 16px 32px -14px rgba(239,6,192,.75); transition: transform .16s, background .16s;
}
.tb-page #roi .tb-a-primary:hover { background: var(--magenta-hover); transform: translateY(-1px); }
.tb-page #roi .tb-a-secondary {
  font-weight: 700; font-size: 14.5px; color: var(--ink-2); text-decoration: none;
  border-bottom: 2px solid var(--line); padding-bottom: 2px;
}
.tb-page #roi .tb-a-secondary:hover { color: var(--magenta); border-color: var(--magenta); }
.tb-page #roi .tb-a-note { flex-basis: 100%; font-size: 13px; color: var(--muted); line-height: 1.55; }
.tb-page #roi .tb-a-note b { color: var(--ink-2); }

/* ---- what is due today, stated at the button ---- */
.tb-page #roi .tb-a-due {
  flex-basis: 100%; margin-top: 2px; padding: 13px 15px;
  background: var(--bg-soft); border: 1px solid var(--line);
  border-left: 3px solid var(--magenta); border-radius: 11px;
}
.tb-page #roi .tb-a-due-top {
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
}
.tb-page #roi .tb-a-due-top span { font-size: 14px; font-weight: 700; color: var(--ink-2); }
.tb-page #roi .tb-a-due-top b { font-family: var(--font-head); font-weight: 800; font-size: 26px; color: var(--ink); }
.tb-page #roi .tb-a-due-note { margin-top: 5px; font-size: 12.5px; line-height: 1.6; color: var(--muted); }
.tb-page #roi .tb-a-due-note b { color: var(--ink-2); font-weight: 700; }

/* ---- 3. DETAIL, demoted ---- */
.tb-page #roi .tb-breakdown {
  border: 1px solid var(--line); border-radius: 13px; background: var(--bg-soft);
  padding: 0 16px; margin-top: 16px;
}
.tb-page #roi .tb-breakdown > summary {
  cursor: pointer; padding: 13px 0; font-weight: 700; font-size: 14px; color: var(--ink-2);
}
.tb-page #roi .tb-breakdown[open] > summary { border-bottom: 1px solid var(--line); margin-bottom: 6px; }

/* the breakdown itself: every step, label left, figure right */
.tb-page #roi .tb-bd { padding-bottom: 14px; }
.tb-page #roi .tb-bd-h {
  margin: 14px 0 4px; font-size: 11.5px; font-weight: 800; letter-spacing: .08em;
  text-transform: uppercase; color: var(--magenta);
}
.tb-page #roi .tb-bd-row {
  display: flex; align-items: baseline; justify-content: space-between; gap: 16px;
  padding: 8px 0; border-bottom: 1px solid var(--line);
}
.tb-page #roi .tb-bd-row:last-of-type { border-bottom: 0; }
.tb-page #roi .tb-bd-row > span { font-size: 14px; color: var(--ink-2); line-height: 1.4; }
.tb-page #roi .tb-bd-row > span small { display: block; font-size: 12px; color: var(--muted); margin-top: 2px; }
.tb-page #roi .tb-bd-row > b {
  font-family: var(--font-head); font-weight: 800; font-size: 16px; color: var(--ink);
  white-space: nowrap; text-align: right;
}
.tb-page #roi .tb-bd-foot { margin-top: 12px; font-size: 12.5px; color: var(--muted); line-height: 1.6; }

/* the plan card sits between actions and breakdown, quieter than before */
.tb-page #roi .roi-plan-detail { box-shadow: none !important; border-color: var(--line) !important; }

/* collapse the long feature list + faq inside the plan card */
.tb-page #roi .tb-fold { border-top: 1px solid var(--line); margin-top: 14px; padding-top: 4px; }
.tb-page #roi .tb-fold > summary { cursor: pointer; padding: 10px 0; font-weight: 700; font-size: 14px; color: var(--ink-2); }
.tb-page #roi .tb-fold[open] > summary { color: var(--magenta); }

/* ---- sticky bar ---- */
.tb-page .tb-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
  display: flex; align-items: center; justify-content: center; gap: 18px; flex-wrap: wrap;
  padding: 12px 20px; background: rgba(14,18,48,.97); backdrop-filter: blur(8px);
  transform: translateY(110%); transition: transform .3s cubic-bezier(.2,.8,.2,1);
}
.tb-page .tb-bar.tb-bar-on { transform: none; }
.tb-page .tb-bar-txt { color: rgba(255,255,255,.85); font-size: 14.5px; }
.tb-page .tb-bar-txt b { color: #fff; font-family: var(--font-head); font-weight: 800; }
.tb-page .tb-bar-cta {
  font-family: var(--font-head); font-weight: 800; font-size: 14.5px; color: #fff; text-decoration: none;
  background: var(--magenta); border-radius: 9999px; padding: 11px 22px;
}
.tb-page .tb-bar-cta:hover { background: var(--magenta-hover); }
@media (max-width: 560px) { .tb-page .tb-bar-txt { display: none; } }

/* the original CTA row is replaced by .tb-actions; the button inside it is
   moved into the plan card by roi-reveal.js, so only the row is hidden */
.tb-page #roi .roi-ctarow { display: none !important; }

/* the real Stripe button, directly under what is due today */
.tb-page #roi .tb-pay { margin-top: 14px; }
.tb-page #roi .tb-pay .roi-cta { display: block; width: 100%; text-align: center; }
.tb-page #roi .tb-pay-sub {
  margin-top: 8px; text-align: center; font-size: 12.5px; color: var(--muted);
}

/* ---- verdict: calls and clients side by side, never stacked ----
   A 3-column grid rather than flex-wrap: the numbers are large enough
   that wrapping used to drop "new clients" onto its own line. */
/* stretch, not center: a longer equation under one stat must not push
   its big number out of line with the other one */
.tb-page #roi .tb-v-hero {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: stretch;
  gap: 18px; margin: 18px 0 20px;
}
.tb-page #roi .tb-v-stat {
  display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-rows: auto 1fr;
  align-items: center; column-gap: 12px; min-width: 0;
}
/* align-self:start pins both numbers to the top of their stat, so a label
   that wraps to an extra line can't knock the two out of line with each other */
.tb-page #roi .tb-v-num { font-size: clamp(40px, 5.6vw, 64px); align-self: start; }
.tb-page #roi .tb-v-num2 { font-size: clamp(40px, 5.6vw, 64px); color: var(--magenta); text-shadow: 0 6px 30px rgba(239,6,192,.45); }
.tb-page #roi .tb-v-unit { font-size: 17px; }

/* the sum that produced the number, directly under it */
.tb-page #roi .tb-v-eq {
  grid-column: 1 / -1; align-self: end; margin-top: 7px; padding-top: 7px;
  border-top: 1px solid rgba(255,255,255,.14);
  font-size: 12.5px; font-weight: 600; color: rgba(255,255,255,.62); letter-spacing: .01em;
}

/* the operator between the two stats */
.tb-page #roi .tb-v-op { text-align: center; padding: 0 2px; align-self: center; }
.tb-page #roi .tb-v-op b {
  display: block; font-family: var(--font-head); font-weight: 800; font-size: 20px; color: #fff;
}
.tb-page #roi .tb-v-op small {
  display: block; margin-top: 3px; font-size: 11.5px; font-weight: 600;
  color: rgba(255,255,255,.55); text-transform: uppercase; letter-spacing: .06em;
}

/* revenue and return, paired */
.tb-page #roi .tb-v-tiles { grid-template-columns: 1fr 1fr; gap: 12px; }
.tb-page #roi .tb-v-tile { padding: 14px 16px; }
.tb-page #roi .tb-v-tile b { display: block; font-size: clamp(24px, 3.2vw, 32px); line-height: 1.12; margin-top: 3px; }
.tb-page #roi .tb-v-tile i {
  display: block; margin-top: 6px; font-style: normal;
  font-size: 12px; font-weight: 600; color: rgba(255,255,255,.62);
}
.tb-page #roi .tb-v-roi { background: rgba(255,255,255,.09); border-color: rgba(255,255,255,.2); }

@media (max-width: 720px) {
  .tb-page #roi .tb-v-hero { grid-template-columns: 1fr; gap: 12px; }
  .tb-page #roi .tb-v-op { text-align: left; }
  .tb-page #roi .tb-v-op b { display: inline; margin-right: 8px; }
  .tb-page #roi .tb-v-op small { display: inline; }
  .tb-page #roi .tb-v-tiles { grid-template-columns: 1fr; }
}

/* ---- cost card directly under the verdict ---- */
.tb-page #roi .tb-costs {
  background: #fff; border: 1px solid var(--line); border-radius: 16px;
  padding: 20px 22px; margin-bottom: 16px;
}
.tb-page #roi .tb-costs .roi-cost { margin: 0; }

/* The engine still writes into these, so they stay in the DOM -- but they
   count fractional appointments (18.8 calls, 4.7 clients) and would print a
   second, contradictory revenue figure. The `hidden` attribute alone loses
   to their own display rules, so take them out explicitly. */
.tb-page #roi .tb-costs .roi-headline,
.tb-page #roi .tb-costs .roi-stats,
.tb-page #roi .tb-costs .roi-callout,
.tb-page #roi .tb-costs .roi-proof { display: none !important; }

/* revenue, stated once, on the same whole-call basis as the verdict */
.tb-page #roi .tb-roi { margin: 0 0 16px; padding: 0 0 15px; border-bottom: 1px solid var(--line); }
.tb-page #roi .tb-roi-lbl { font-size: 13px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.tb-page #roi .tb-roi-val {
  font-family: var(--font-head); font-weight: 800; color: var(--ink);
  font-size: clamp(34px, 4.6vw, 46px); line-height: 1.06; letter-spacing: -.02em; margin: 4px 0 5px;
}
.tb-page #roi .tb-roi-val i { font-style: normal; font-size: 15px; font-weight: 700; color: var(--muted); margin-left: 4px; }
.tb-page #roi .tb-roi-sub { font-size: 13.5px; color: var(--ink-2); line-height: 1.55; }
.tb-page #roi .tb-net span small { display: block; font-size: 12px; font-weight: 600; color: var(--muted); margin-top: 2px; }
.tb-page #roi .tb-net {
  display: flex; align-items: baseline; justify-content: space-between; gap: 14px;
  margin-top: 12px; padding-top: 12px; border-top: 2px solid rgba(239,6,192,.25);
}
.tb-page #roi .tb-net span { font-size: 14px; font-weight: 600; color: var(--ink-2); }
.tb-page #roi .tb-net b { font-family: var(--font-head); font-weight: 800; font-size: 22px; color: var(--magenta); }

/* the rate detail belongs behind the "?", not on the label
   (kept in the DOM because the engine writes to it) */
.tb-page #roi .tb-costs #roi-usageRateSmall { display: none; }
.tb-page #roi .tb-costs .roi-cost-lbl small {
  display: block; font-size: 12px; font-weight: 500; color: var(--muted); margin-top: 2px;
}

/* ---- "?" trigger + usage panel ---- */
.tb-page #roi .tb-q {
  margin-left: 8px; width: 19px; height: 19px; border-radius: 50%; vertical-align: middle;
  background: rgba(239,6,192,.12); color: var(--magenta); border: 0; cursor: pointer;
  font-family: var(--font-head); font-weight: 800; font-size: 11.5px; line-height: 1; padding: 0;
}
.tb-page #roi .tb-q:hover, .tb-page #roi .tb-q-on { background: var(--magenta); color: #fff; }
.tb-page #roi .tb-usage-panel {
  margin-top: 14px; padding: 14px 16px; background: var(--bg-soft);
  border: 1px solid var(--line); border-radius: 12px;
}
.tb-page #roi .tb-usage-panel .roi-usage { margin: 0; }
.tb-page #roi .tb-usage-panel .roi-usage-help { font-size: 13px; line-height: 1.6; color: var(--ink-2); margin-top: 10px; }

/* ============================================================
   MOBILE — kept last so these win over the base declarations above.
   ============================================================ */
@media (max-width: 780px) {
  /* touch targets: the currency toggle was 30px, Back 35px, the "?" 19px */
  .tb-page #roi .roi-curbtn { min-height: 40px; padding-left: 18px; padding-right: 18px; }
  .tb-page #roi .tbw-back { min-height: 44px; padding-left: 2px; padding-right: 10px; }
  /* 26px circle, but a 44px touch area via an invisible overlay */
  .tb-page #roi .tb-q { width: 26px; height: 26px; font-size: 13px; margin-left: 6px; position: relative; }
  .tb-page #roi .tb-q::after { content: ""; position: absolute; inset: -9px; }
  .tb-page #roi .roi-pd-switch button { min-height: 38px; padding-left: 14px; padding-right: 14px; }

  /* long money strings must be allowed to wrap rather than run off a narrow screen */
  .tb-page #roi .tb-v-tile i,
  .tb-page #roi .tb-roi-sub,
  .tb-page #roi .tb-v-eq { overflow-wrap: anywhere; }
  .tb-page #roi .tb-bd-row > b { white-space: normal; }

  /* the cost rows and net line get tight at 320px */
  .tb-page #roi .tb-costs { padding: 16px 15px; }
  .tb-page #roi .tb-verdict { padding: 24px 18px 22px; }
  .tb-page #roi .tb-actions { padding: 16px 15px; }
  .tb-page #roi .tb-net { flex-wrap: wrap; }
}

/* very narrow phones (320px): the revenue figure plus its /month suffix
   ran past the edge at the desktop type scale */
@media (max-width: 380px) {
  .tb-page #roi .tb-roi-val { font-size: 30px; }
  .tb-page #roi .tb-roi-val i { font-size: 13px; }
  .tb-page #roi .tb-a-due-top b { font-size: 22px; }
}
