"""The Club Pulse report: findings in, one self-contained HTML file out. WHAT THIS IS. `pulse.analyse` turns four API reads into a plain dict of findings; this module turns that dict into a page a winery can open, read, print and forward. It is the last third of the example and the least interesting third on purpose — the subject of Club Pulse is the client code in `sipspos.py`, not the layout here. If you are copying this example, copy `sipspos.py`; this file exists so the example has somewhere to put its answer, and so that "renders a report" is a claim a test can check. It imports `html` and `datetime` and nothing else. No template engine: a templating dependency would put a `pip install` between a reader and the one file they came here to read, and the whole page is about two hundred lines of string building — small enough that the honest version is the readable one. TWO DECISIONS A READER WILL STOP AND QUESTION: 1. THERE IS NO JAVASCRIPT, AND NO SORTABLE TABLES OR COLLAPSIBLE SECTIONS BECAUSE OF IT. This file is not a web page in the usual sense; it is a document that gets emailed. Somebody at a winery opens it from a `file://` path, or in Outlook's preview pane, or forwards it to a partner who opens it on a phone — and every one of those contexts either strips scripts, blocks them, or runs them against a document with no server to talk to. A page whose content is assembled by script is blank in exactly the places this one has to survive. So every number is in the markup, the CSS is inline in a single `", "", "
", "