Looks like the dialog is providing its own padding, but that doesn't play well with the child nodes (H2 and PRE) already having their own margins.
Normally solved by using margin instead of padding so that they auto-collapse, but in this case the dialog is a single element, so there is no where for the margin to be applied to (if applied to the dialog directly, it would apply to the transparent space outside the dialog, not the area inside the background/border box).