Frontend & browser·Layout, CSS and the cascade
your absolutely positioned element anchored to the whole page instead of the card you meant.
Containing block
The rectangle an element's percentages and offsets are resolved against. For a static element it is the nearest block ancestor's content box; for `position: absolute` it is the nearest positioned ancestor; for `position: fixed` it is normally the viewport — unless an ancestor has a `transform`, `filter` or `will-change`, which makes it the containing block instead. That last exception is why a fixed header stops being fixed inside an animated panel.