Part 1 nests three real documents you can see. Part 2 keeps nesting until your browser refuses, and reports the depth it broke.
Each colored frame is a separate full <!DOCTYPE html> document, built at runtime inside the one around it.
Same trick, run to the limit: every level phones window.top and spawns the next. When new levels stop reporting for a moment, that's decoherence — your browser's nesting ceiling.
Note: the ceiling is browser-dependent — Chromium, Firefox, and Safari each cap nested browsing contexts differently to stop runaway recursion. This measures yours, not a universal constant.