Dropdown Menu Pattern Build dropdown menus that work correctly in list/card contexts, handling z-index stacking and click-outside dismissal properly. Why This Pattern? Dropdown menus in list items have three common bugs: 1. Clipped by parent's - dropdown gets cut off 2. Covered by sibling cards - z-index doesn't help across stacking contexts 3. Double-toggle on trigger click - menu closes then reopens immediately This pattern solves all three. Core Implementation Key Elements 1. Click-Outside Detection (Use , NOT ) Why? With , the sequence is: 1. mousedown fires → click-outside closes menu 2.…