/* Benefit Calculator page · css/benefit-calculator.css
   The question header comes from product-page.css, the result card from
   benefit-result.css and the sections from endpoint-page.css.

     Hero      the question header, with item 5010 worked out on the right
     How       the item 5010 result, under the two kinds of fee           */

/* One exact amount from several factors, standing on the question header with
   no sheet of its own, as the other pages' pictures do. Item 5010 heads it;
   the setting, the patients seen, the fee and the share settle in turn, a
   rule draws under them, and Medicare's amount comes into focus. The same
   case as the sample result card under How.
   The factor sheet, its clock --bc and its loop are in endpoint-page.css;
   here the total settles last, at 0.8. */
/* The derived fee: its rule shows first, then the fee it gives. */
.bc-factors .is-derived .bc-val { opacity: 1; transform: none; }
.bc-factors .is-derived .bc-val > span { order: 2; opacity: clamp(0, var(--on) * 2, 1); }
.bc-factors .is-derived .bc-val b {
  opacity: clamp(0, var(--on) * 2 - 1, 1);
  transform: translateY(calc((1 - clamp(0, var(--on) * 2 - 1, 1)) * 0.35em));
}

/* The rule under the factors, then the amount. */
.bc-rule {
  display: block; block-size: 1px; margin-block: var(--space-20) var(--space-16);
  background: color-mix(in srgb, var(--color-navy) 22%, transparent);
  transform: scaleX(var(--sum)); transform-origin: right;
}
.bc-total { display: grid; justify-items: end; text-align: end; gap: 0.125rem; }
.bc-total-label {
  font-size: var(--type-label-s); font-weight: 600; letter-spacing: var(--track-eyebrow); text-transform: uppercase;
  color: var(--color-stone-60); opacity: calc(0.45 + 0.55 * var(--sum));
}
.bc-amount {
  font: 400 clamp(2.5rem, 2rem + 2vw, 3.25rem) / 1.1 var(--font-display); color: var(--color-navy);
  font-variant-numeric: tabular-nums;
  opacity: var(--got); filter: blur(calc((1 - var(--got)) * 6px));
  letter-spacing: calc((1 - var(--got)) * 0.06em);
}
.bc-note { font-size: var(--type-body-s); color: var(--color-stone-60); opacity: clamp(0, (var(--bc) - 0.86) / 0.1, 1); }

/* The clock runs over the first 64% of the loop, the answer holds, and the
   figure dims and returns while the clock resets. The item stays put. */
@media (prefers-reduced-motion: no-preference) {
  .bc-total { animation: bc-dim 11s var(--ease-standard) infinite; }
}


/* How the amount is worked out: the derived-fee example under the two kinds. */
.bc-example { margin-block-start: var(--space-48); }
.bc-example .benefit { margin: 0; }
.bc-example .card-caption { margin-block-start: var(--space-12); }

/* One item priced for each payer, under What is it. The two amounts stay side
   by side at every width, so the comparison reads at a glance. */
.bc-payers { margin: 0; }
.bc-payers .benefit-result-header { margin-block-end: var(--space-16); }
.bc-payers .benefit-figure { flex-basis: 6rem; }
