/* ============================================================
   Final CTA card — redesign
   Scoped to the landing final-cta card. Loaded last so it wins
   the cascade over landing-conversion / s-polish.
   Brand: accent #0D3CFC, accent-on-dark #6E8BFF, cream #E6E3E0,
   hairline rgba(255,255,255,.12). No teal.
   ============================================================ */

body.qf-wft .final-cta-card.qf-final-cta {
  text-align: center;
  padding: clamp(40px, 5vw, 60px) clamp(24px, 4vw, 52px);
}

/* ── Title: balanced 2-line split, no orphan word ── */
body.qf-wft .qf-final-cta h2 {
  margin: 0;
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
}
body.qf-wft .qf-final-cta .qf-cta-sub {
  max-width: 560px;
  margin: 20px auto 0;
  color: rgba(245,252,255,.68);
  font-size: 17px;
  line-height: 1.6;
}
body.qf-wft .qf-final-cta .final-actions {
  justify-content: center;
  margin-top: 30px;
}

/* ── Secondary CTA: cream, matching the header "View demo" treatment.
   Force crisp dark ink on label + arrow (a runtime-injected sheet can dim it). ── */
body.qf-wft .qf-final-cta .qf-cta-secondary {
  background: #E6E3E0 !important;
  border: 1px solid #E6E3E0 !important;
  color: #1E1E1E !important;
  font-weight: 600 !important;
  opacity: 1 !important;
  border-radius: 10px;
  box-shadow: none;
  transition: background .16s ease, transform .16s ease, box-shadow .16s ease;
}
body.qf-wft .qf-final-cta .qf-cta-secondary .arr {
  color: #1E1E1E !important;
  opacity: 1 !important;
}
body.qf-wft .qf-final-cta .qf-cta-secondary:hover {
  background: #D4CFC9 !important;
  border-color: #D4CFC9 !important;
  color: #1E1E1E !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(0,0,0,.18);
}

/* ============================================================
   Trust badges — 5 compact horizontal tiles, single row on desktop
   ============================================================ */
body.qf-wft .qf-trust-badges {
  list-style: none;
  margin: 38px 0 0;
  padding: 0;
  width: 100%;
  display: flex;
  flex-wrap: nowrap;
  justify-content: center;
  gap: 10px;
}
body.qf-wft .qf-badge {
  position: relative;
  margin: 0;
  padding: 0;
  flex: 1 1 0;
  min-width: 0;
}

body.qf-wft .qf-badge-tile {
  width: 100%;
  height: 100%;
  min-height: 0;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 11px 12px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 12px;
  background: rgba(255,255,255,.035);
  color: #f5fcff;
  font-family: var(--font-sans);
  cursor: pointer;
  text-align: left;
  transition: border-color .18s ease, background .18s ease, transform .18s ease;
}
body.qf-wft .qf-badge-tile:hover,
body.qf-wft .qf-badge-tile:focus-visible {
  border-color: rgba(110,139,255,.5);
  background: rgba(110,139,255,.08);
  transform: translateY(-2px);
  outline: none;
}
body.qf-wft .qf-badge-ico {
  flex: 0 0 auto;
  display: inline-flex;
  width: 30px;
  height: 30px;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: rgba(110,139,255,.1);
  border: 1px solid rgba(110,139,255,.22);
}
body.qf-wft .qf-badge-ico svg {
  width: 18px;
  height: 18px;
  stroke: #ffffff;
  stroke-width: 2;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}
body.qf-wft .qf-badge-label {
  font-size: 12px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -.005em;
  color: #f5fcff;
}

/* ── Popover ── */
body.qf-wft .qf-badge-pop {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 12px);
  width: 240px;
  transform: translateX(-50%) translateY(8px);
  padding: 14px 16px;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 14px;
  background: rgba(24,29,31,.92);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  backdrop-filter: blur(14px) saturate(140%);
  box-shadow: 0 24px 60px -30px rgba(0,0,0,.9), inset 0 1px 0 rgba(255,255,255,.05);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  z-index: 20;
  transition: opacity .2s ease, transform .2s ease, visibility .2s;
}
body.qf-wft .qf-badge-pop p {
  margin: 0;
  color: rgba(245,252,255,.82) !important;
  font-size: 13px;
  line-height: 1.5;
  text-align: left;
  font-weight: 400;
}
body.qf-wft .qf-badge-pop::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 100%;
  width: 12px;
  height: 12px;
  margin-left: -6px;
  margin-top: -6px;
  background: rgba(24,29,31,.92);
  border-right: 1px solid rgba(255,255,255,.14);
  border-bottom: 1px solid rgba(255,255,255,.14);
  transform: rotate(45deg);
}
body.qf-wft .qf-badge:hover .qf-badge-pop,
body.qf-wft .qf-badge-tile:focus-visible + .qf-badge-pop,
body.qf-wft .qf-badge.is-open .qf-badge-pop {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

/* ── Tablet: allow the row to wrap when it gets tight ── */
@media (max-width: 820px) {
  body.qf-wft .qf-trust-badges { flex-wrap: wrap; }
  body.qf-wft .qf-badge { flex: 0 1 calc(33.333% - 7px); }
}

/* ── Mobile: exactly 2 rows (3 + 2), tap reveals inline benefit ── */
@media (max-width: 640px) {
  /* Trim the card's heavy horizontal padding so the badge row has room. */
  body.qf-wft .final-cta-card.qf-final-cta {
    padding-left: 18px !important;
    padding-right: 18px !important;
  }
  /* Break the badge row out to the card edges to reclaim width. */
  body.qf-wft .qf-trust-badges {
    gap: 8px;
    width: auto;
    margin-left: -18px;
    margin-right: -18px;
  }
  body.qf-wft .qf-badge {
    flex: 0 1 calc(33.333% - 6px);
  }
  body.qf-wft .qf-badge-tile {
    padding: 10px 7px;
    gap: 6px;
  }
  body.qf-wft .qf-badge-ico {
    width: 26px;
    height: 26px;
    border-radius: 7px;
  }
  body.qf-wft .qf-badge-ico svg {
    width: 16px;
    height: 16px;
  }
  body.qf-wft .qf-badge-label {
    font-size: 11px;
    line-height: 1.15;
  }

  /* Popover becomes an inline expandable panel below the tile. */
  body.qf-wft .qf-badge-pop {
    position: static;
    width: auto;
    transform: none;
    margin: 8px 0 0;
    display: none;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    box-shadow: none;
  }
  body.qf-wft .qf-badge-pop::after { display: none; }
  body.qf-wft .qf-badge:hover .qf-badge-pop { display: none; }

  /* Tapped badge expands to a full-width accordion row so its benefit reads cleanly. */
  body.qf-wft .qf-badge.is-open { flex-basis: 100%; }
  body.qf-wft .qf-badge.is-open .qf-badge-tile {
    height: auto;
    justify-content: flex-start;
    border-color: rgba(110,139,255,.5);
    background: rgba(110,139,255,.08);
  }
  body.qf-wft .qf-badge.is-open .qf-badge-pop {
    display: block;
    position: static;
    left: auto;
    bottom: auto;
    transform: none;
    width: 100%;
    text-align: left;
  }
  body.qf-wft .qf-badge.is-open .qf-badge-pop p { text-align: left; }
}
