I checked the document sources.

Well, as I suspected the document layout is built as a single table. The table cells also include multi-nested tables (up to 4 nesting levels).

It should help a lot if by the HTML document generation (hopefully you have a control over the process) you can omit the “main table” – just output its nested content.