Convert <details> and <summary> to use shadow-DOM based implementation. Immediate benefit is that user will be able to give CSS style to hidden component like marker and default summary text.
*** This bug has been marked as a duplicate of bug 56967 ***