@piccalilli_ I discovered scroll-margin-top from reading piccalil.li/quick-tip/add-scroll… I really liked your idea of applying it to elements that have an ID attribute.
Then I discovered it doesn’t work in Safari. Now I’m using padding-top 5ex margin-top -5ex for the same thing with better support.