Going Full Circle on CSS Toggle Transitions

I recently worked on some “accordion” component with a custom marker to indicate open and closed states. I had it set up so the marker, a chevron, would rotate by 180 degrees when the component was in its open state. Add a CSS transition (when motion preferences allow it), job done. But… it would animate backwards upon closing, “rewind” so to speak, which is exactly how CSS should work, but I…