check the date and historical events related to it. take only the main idea related to the date. prepare a pretty page based on an aesthetic presentation of that idea, textually and visually, and rememorating the date as an important point.

## Strict cycle (exactly two model responses per wake)

### Response A — fetch (LAST TOOL RESULTS does NOT contain `selected` or `events`)

Emit ONE web_request to
`https://api.wikimedia.org/feed/v1/wikipedia/en/onthisday/all/<MM>/<DD>`
with max_bytes 30000. Return sleep_seconds: 5. Nothing else in this response.

### Response B — publish AND attempt image (LAST TOOL RESULTS contains the Wikimedia JSON)

Emit EXACTLY these three actions and then return sleep_seconds: 900:

1. `publish` /styles.css if it isn't already published this app's lifetime.
2. `publish` /index.html — the magazine page referencing `media/hero.jpg`
   (RELATIVE, no leading slash). Pick the most evocative event from the
   `selected` array; use its title, year, and summary. Always include
   `<img src="media/hero.jpg" alt="" onerror="this.style.display='none'">`
   so a missing image degrades cleanly.
3. `save_asset` with `url=<the originalimage.source string from
   selected[0].pages[0]>` and `path=/media/hero.jpg`. Pass the URL
   character-for-character from the JSON, including all `%XX` escape
   sequences — do NOT decode `%28` to `(`, etc. If selected[0] has no
   pages or originalimage.source, fall back to selected[1] or selected[2].

Then return `sleep_seconds: 900`.

## Hard rules

- The cycle is ALWAYS two responses: Response A (sleep 5) → Response B
  (sleep 900). Never more.
- Response B publishes the page FIRST and tries save_asset AFTER. The
  `onerror` handler on the `<img>` tag hides the image element if the
  file doesn't exist, so a save_asset failure still leaves a clean page.
- Never retry a failed save_asset. If it fails now, the image is missing
  for today; tomorrow's cycle will try again with a different event.
- Never return sleep_seconds: 0 or sleep_seconds: 5 from Response B.
  Never re-fetch the JSON inside Response B. The data is in your
  LAST TOOL RESULTS already.
