google sheets – Sum values to the right of criteria in multicolumn range

I apologize in advance because I don’t even know how to describe this best.

But, I have 3 2-column ranges in which the left column is a unique identifier (ID) and the right column is quantity I’d like to sum up.

There is some overlap between ID’s in left columns.

I created a column of sorted unique ID’s but could not come up with a formula that would check each ID column for a criterion and then sum the values directly to the right of the match.

Ideally, the formula would also work with “arrayformula” as the columns may get very lengthy.

Here’s an example spreadsheet
https://docs.google.com/spreadsheets/d/1z6qx4JGl-RGm3GExhEcxoTby7DTRSaRfLo-3VGwucvk/edit?usp=sharing

THANK YOU all