Why does nobody warn you that a z-index war will eat a whole Saturday?
I spent about 6 hours last Saturday chasing a dropdown that kept hiding behind a hero image, and the fix was one line. My header had z-index 9999, the hero section had its own stacking context from a transform I slapped on for a hover effect, and the menu inside it could not climb out no matter what number I typed. I tried 99999, I tried !important, I tried moving the dropdown in the HTML three different ways. Around hour four I finally opened dev tools and actually looked at the stacking context list instead of guessing, and there it was. The transform on the parent created a new context, so the dropdown was only competing with its siblings, not the header at all. Killed the transform, moved the hover lift to a pseudo element, and it worked in under a minute. Point is, z-index is not a global ladder, it is a local one, and nobody says that loud enough. What is your go to trick for spotting which parent is trapping your element, because I do not want to lose another Saturday to this?
Man, I feel that pain, losing a whole day to one line is the worst kind of bug. The stacking context thing gets me every time too, and the dev tools context list is honestly the only thing that saves me. My habit now is to just check computed styles on the parents before I touch a number, since nine times out of ten the culprit is some transform or opacity sitting two levels up.