All work

The Document System

From the player's perspective a document is one object: the physical piece of paper on the desk, its interactive behaviour, and the structured data it contains. Under the hood it's two independent layers that don't know about each other, a DraggableInteractable handling the physical side and a DocumentContents holding the data. The same shape of Interactable-plus-Contents repeats at every level of the tree, from the document at the top to the smallest field at the bottom.

The pen system

How the player marks up a page. The pen reads the mouse, works out which field it's pointing at, draws a circle that fits, and commits it on click. It's also where every highlighted issue on a document begins.

The element tree

Beneath every document is a composite tree of containers and leaves. It's the structure that decides what's pointable, where each error lives, and how a job-history block scopes its data down to the individual fields.

The physical layer

Handled entirely by DraggableInteractable. The document has no knowledge of its own data; it can be picked up, moved, layered, and dragged around the tabletop, Papers-Please style. The last-interacted document sorts to the top, z-ordering is controlled by the controller with no physics involved, and it responds to mode broadcasts like the pen-mode lock without ever knowing what triggered them.