I think there is no way to detect page lifecycle events with CSS only.
The closest solution is to put <style>
tag at the very bottom of the page, right above closing </body>
tag. It won’t guarantee that all of the contents (except HTML itself) are already loaded, though.