How to style mautics generated forms?

After a lot of reading I found that it is possible to manipulate the rendering of form elements. I distilled my finding into two blog posts: