// Self-contained HTML snapshots for `harn browse` trio mode. // // `page.content()` serializes the DOM but not the resources it points at, and // framework pages reference those with root-absolute paths (`/_next/static/…`). // Written to a file and reopened from anywhere else — the files origin, another // host, `file://` — every one of those paths resolves against the wrong root and // 404s, so the snapshot renders as unstyled black-on-white text with broken // images. That is what an operator sees when they preview an artifact's `.html`. // // This rewrite makes the saved document stand on its own: // - stylesheets are fetched and inlined as