Unlike string-set/string() (previous showcase), which captures plain text only, position: running() removes this whole heading from the flow and content: element() shows it in the margin box complete with its own formatting - the blue "Ch. 1" badge and italic title are real, laid-out elements, not captured strings.
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris.
Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt.
The running header updates to the new chapter's badge and title as soon as this heading is encountered - the same first/start/last/first-except selection rules string() already offers, applied to a whole element instead of a string.
At vero eos et accusamus et iusto odio dignissimos ducimus qui blanditiis praesentium voluptatum deleniti atque corrupti quos dolores et quas molestias excepturi sint occaecati.
Temporibus autem quibusdam et aut officiis debitis aut rerum necessitatibus saepe eveniet ut et voluptates repudiandae sint et molestiae non recusandae itaque earum rerum hic tenetur.