CogniPrep's long entry pages are long. A provider hub or an employer guide runs thousands of pixels, and the primary action sits near the top. On a phone, somebody who reads to the end has nothing to tap without scrolling back.
The fix is the oldest pattern on mobile web: a bar pinned to the bottom with the action in it. The interesting part is that almost every decision in the 133 lines is a decision not to do the obvious thing.
It shows between two points, not from a threshold
The bar is not "appears after 400px". It shows after the page's own early call to action has scrolled up under the header, and hides again once the page's closing call to action or the footer comes into view. So it never doubles up with a button already on screen, and it is gone before the footer, which is what stops it covering anything.
Both ends are elements, not offsets. The start is an id passed in as a prop. The end is any element carrying a data attribute, or the footer :
const ends = Array . from ( document .…