Those classes are in the final document (the conversion output) not the initial one. You need to use classes for what is in the initial document. See
https://manual.calibre-ebook.com/con...n.html#styling use the debug pipeline option to inspect the classes in the input document.