which contains unnecessarily nested equations. I understand why it happens (because of the $$ in the definition of o0), but is does not seem right. Is there a more correct way to define o0 than to enclose its body in $$?
However, as far as I know that should not matter at all. Nested equations in particular are expected in idiomatic Typst markup and are eliminated during layout. 0.12 is now doing the same for attachments (or so it seems, I don’t know the details). So I wouldn’t worry about it. $$is the clean way to do this.