Ah ok, this just dawned on me… class^= checks the beginning of the class, and the category isn’t always the first class in the list.
If you update to body[class*="category-documentation"] it should work, this checks for the class name wherever it appears in the list.