Not sure if this applies
Ref:
https://manual.calibre-ebook.com/cus...ates-et-cetera
There is a file with the CSS that gets incorporated into an inline TOC
I copied
C:\Program Files\Calibre2\app\resources\templates\inline_toc_ styles.css
to
C:\Users\userid\AppData\Roaming\calibre\resources\ templates\inline_toc_styles.css
and customized it.