google sheets – Check for criterion in multiple non-adjacent columns, display results from 1 column to the right

Previously posted but closed as duplicate with link to the question below, which is not the same at all

Original question: Sum values to the right of criteria in multicolumn range
Proposed answer/duplicate: Sum values with same name

Original question
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