Thanks for the replies both.
After further testing, I discovered the issue wasn’t Hugo or the Mainroad theme at all.
The problem was caused by the 1Password Password Manager extension in Microsoft Edge, which was injecting CSS and interfering with the inline styles Chroma generates for code blocks.
• In Chrome, everything rendered fine.
• In Edge InPrivate (where extensions are disabled), the page also rendered correctly.
• Disabling extensions one by one identified 1Password as the culprit.