This is the same deterministic CDC-protocol logic that ships in the Precision Analgesia iOS app — ported control-for-control from the production taper screen. Every number is computed locally, in the open. Expand the glass box to verify the math yourself.