GraphicsStack
Mutable stack façade. Holds the current state plus a save stack for q/Q.
Callers update via the typed mutators (replaceCtm, setFillColor, etc.) or read the current state directly. The stack is bounded by maxDepth, the limit MuPDF uses, to defend against PDFs that q-spam without Q. Past it a save pushes nothing and its matching restore pops nothing, so restores keep pairing with their saves (ISO 32000-1, 8.4.4) instead of each one consuming a real frame (#49).