It is a strange issue and I do not believe it is caused by a PD4ML bug (bearing in mind it splits HTML and CSS and parses them separately). I tried to convert your sample offline with a command-line PD4ML tool and got predictable results. See attached.

Also as I see your HTML has placeholders ($opportunity). Could it be the issue comes from the runtime, which pre-process the HTML?