/* ============================================================
   Influeri — Savings calculator (single source, shared)
   Toggle mirrors faq.css's segmented-pill pattern (.faq-toggle) so pages read
   as one system — these are new classes; faq.css itself is untouched.
   Depends on styles.css for tokens (--primary, --text, --line, --white,
   --font-display, --r-pill, --surface-2).
   ============================================================ */
.savings-calc { max-width: 640px; margin: 0 auto; text-align: left; }
.savings-calc__field { display: flex; flex-direction: column; gap: 8px; margin-bottom: 26px; }
.savings-calc__label { font-size: 13px; font-weight: 700; color: var(--primary); }
.savings-calc__field input[type="range"] { width: 100%; accent-color: #0b0b0b; }
.savings-calc__field output { font-size: 13px; color: var(--text); font-variant-numeric: tabular-nums; }
.savings-calc__toggle { margin-bottom: 30px; }
.savings-calc__buttons {
  position: relative; display: flex; margin-top: 8px;
  background: var(--surface-2, #f4f1f3); border-radius: var(--r-pill, 999px); padding: 4px;
}
.savings-calc__btn {
  position: relative; z-index: 1; flex: 1; border: 0; background: transparent; cursor: pointer;
  font-family: var(--font-display); font-weight: 700; font-size: 14px;
  padding: 11px 0; border-radius: var(--r-pill, 999px); color: var(--text); transition: color 0.25s ease;
}
.savings-calc__btn.is-active { color: var(--white); }
.savings-calc__btn:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.savings-calc__buttons::before {
  content: ""; position: absolute; top: 4px; left: 4px; width: calc(50% - 4px); height: calc(100% - 8px);
  background: #0b0b0b; border-radius: var(--r-pill, 999px); transition: transform 0.3s cubic-bezier(0.65, 0, 0.35, 1);
}
/* JS-toggled class, not :has() — mirrors faq.css's .faq-toggle.is-creators
   pattern. :has() intermittently failed to repaint the thumb here, which left
   the active button's white text sitting on the still-light background
   (illegible) whenever the thumb didn't visually move to match it. */
.savings-calc__buttons.is-agency::before { transform: translateX(100%); }
.savings-calc__outputs { display: flex; gap: 32px; justify-content: center; text-align: center; padding-top: 26px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.savings-calc__stat[hidden], .savings-calc__sub[hidden] { display: none; }
.savings-calc__num {
  display: block; font-family: var(--font-display); font-weight: 800; letter-spacing: -0.02em;
  font-size: clamp(30px, 4vw, 44px); color: var(--primary); font-variant-numeric: tabular-nums;
}
.savings-calc__stat .savings-calc__label { display: block; margin-top: 6px; font-weight: 500; color: var(--text); }
/* the "= people" line: always a small derived annotation on the hours headline,
   never a third equal-weight number — one headline in My-team mode, two in
   Agency mode (money + hours), per the source spec. */
.savings-calc__sub {
  flex-basis: 100%; margin: 0; font-size: 13.5px; color: var(--text); font-variant-numeric: tabular-nums;
}
.savings-calc__sub span { font-weight: 700; color: var(--primary); }
@media (prefers-reduced-motion: reduce) {
  .savings-calc__buttons::before, .savings-calc__btn { transition: none; }
}
