Um, actually, Kittybox is a dynamic web server, but the HTML it serves as the post content (i.e. the text you are reading right now) is a string stored in the database as part of the MF2-JSON object.
This means that to inject a style in a post, I need to somehow hash the style block and then communicate the CSP hash to the web-server (maybe as a technical property on the HTML blob inside the MF2-JSON I store in the database?).
Parsing the HTML is the hard part, but I guess as I already have a parser for Webmention processing, I could reuse the same parser for that. Storing the hashes somewhere and injecting them into the post is also not easy, as I'd have to combine two CSP headers into one (subsequent CSP headers can only restrict the policy). This should probably be done on middleware layer, I guess.
In other words, I'm lazy! β¨ (For now. Until it hurts too much and I'll bite the bullet)