With a little help from the display: contents; property, we can transform a group of discrete details tags with tab and content area elements as children, into a group of the tab and content area elements from all the details elements mixed together.
Say you had 3 small buckets of red and blue balls. The buckets can interact with each other or bang together, but the balls inside each bucket can't interact with the balls from the other buckets.
You could think of what we are doing like pouring all of the small buckets into a larger bucket. Now all of the balls can interact with each other and we can organize them by color in the bigger bucket. With display: contents; it's as if the details tag isn't there at all—at least visually.
Now that all the tab and content area elements can interact with each other in the flow of the page, we can use display: flex; and order to make the tabs flow nicely but also be separate from the content area.
And that's what you see here! Open up the inspector and have a look.