"""Unit: phase 165 task 02 — the word-wrap fix is PROVABLY SCOPED. TODO.md L3 asks for word wrap on "image explanations and other long text". Phase 116's LOCKED A1 keeps horizontal scroll (NO line-wrap) for the code content — "wrapping breaks code readability" — so the fix must wrap exactly the prose set and nothing else. These pins make a future "we fixed wrapping" mean "we wrapped prose", never "we wrapped code" or "we wrapped wide tables": * **the prose set is pinned as data** — ``PROSE_FORMATS`` holds exactly ``"txt"`` and ``"text"`` (a set-membership assertion over the source line: adding a format is a deliberate, test-editing act), and ``isProseDoc`` tests ``doc.is_image`` BEFORE the format arm (phase 122 A3 — an image doc's ``content`` IS the vision description, prose by construction whatever its extension); * **the code scrollers are unchanged** — ``.doc-raw`` keeps ``white-space: pre`` + ``overflow-x: auto``, ``.bubble pre`` keeps ``overflow-x: auto`` with NO ``white-space`` added (the chat code block), and ``.md-table-wrap`` / ``.md-table`` still carry the phase-44 declaration (``overflow-x: auto`` on the wrapper, ``min-width: max-content`` on the table) so wide tables still scroll sideways inside the reading column; * **phase 116's scrollbar theme still applies** — the four ``.doc-modal .doc-raw`` rules (``scrollbar-width``, ``scrollbar-color`` and the three ``::-webkit-scrollbar`` pseudos) are all present and still SCOPED to the modal (no global scrollbar restyle — the TODO's scope); * **``.doc-prose`` never reaches for the raw scroller** — the block has no ``overflow-x`` and no ``white-space: pre;``, only ``pre-wrap`` + ``overflow-wrap: anywhere`` (the wrapping contract); * **the AA/contrast pin for the new block** — ``color: var(--ink)`` on ``background: var(--surface)`` (the documented 14.5:1 pair, PLAN §7.2) and ZERO color literals in the block (the phase-92 zero-literal / monochrome invariant — the ``:root``-drift test parses built-ins out of styles.css). Repo-hygiene finding (task 02 step 3, ``grep -rn "doc-raw" frontend/``) — recorded here so the check is repeatable and its result on record: ``doc-raw`` appears in exactly TWO writers, both expected. (1) The raw arm of ``app.renderDocument`` in ``frontend/assets/document.js`` (the ONE viewer core, ``pre.className = "doc-raw"``) plus its doc comments; (2) ``frontend/assets/styles.css`` (the base rule, the mobile squeeze, the phase-116 modal scrollbar rules and the ``[data-view="pages"]`` hide list). Every other hit in ``frontend/`` is a comment. ``frontend/doc-edit.html`` + ``assets/doc-edit.js`` do NOT render document content at all — they fill a ``