Revisiting a relatively old manual that covers a basic product plus two variants. (vanilla plus chocolate and mocha, as the BookMaster manual would put it) …
Way back then, we decided to highlight the three classes with colours, a 'simple' matter of duplicating all the required styles. Now I've been looking at the document again, it seems it would have been more elegant to stick with a single set of styles and use conditions … but that approach, as far as I understand, wouldn't deliver the colours in the ToC.
Any ideas for a workaround? it's not something I have to deliver, but I'm curious.
Yes. Conditions are not copied into the TOC. Of course you could write an ExtendScript script which could copy the conditions.
You could also have used a character format with only your colour and everything else set to as is.
However, if you would have used other character formats for this text, then you would have two character formats which might cause problems. And this would also not be copied into the TOC.
Otherwise I do not know of any better solution.