One of the reasons I use Sigil is CSS sorting is NOT needed. It has a Goto link or style that works in most cases, even when there are multiple stylesheets in the book.
Cases where it (Sigil) does not work perfectly
doubly (or more) defined: it goes to first found
Defined in more than one sheet. Goes to the one in the
First Linked sheet
the case Jackie_W shows has even bigger issues, 'Delete unused styles' will REMOVE the second style as unused
NB Sigil also destroys @Amazon type CSS entries
CLEAN and sorting should always be used with care (and a prior save)

The Report tool may help you decide. But there are so many 100% valid (HTML and CSS usage) cases that automation will never get it 100%