Details/summary polyfill: Set closed details visibility to hidden to make text nodes invisible (although still take up space)

Fixes #6166
Note that this is needed to address specificity issues (where the nested details is visible when the parent details is closed). Using !important instead of the specific details causes all sorts of issues with summary (so this is the safest solution, even if it seems a bit redundant).