```python
def union_coverage(rects: list[list[int]]) -> int:
    if any(len(r) != 4 or r[0] >= r[2] or r[1] >= r[3] for r in rects):
        raise ValueError("Invalid rectangle")
    if any(x < -10000 or x > 10000 or y < -10000 or y > 10000 for rect in rects for x, y in (rect[:2], rect[2:])):
        raise ValueError("Coordinates out of range")

    def intersect(r1, r2):
        return max(0, min(r1[2], r2[2]) - max(r1[0], r2[0])) * max(0, min(r1[3], r2[3]) - max(r1[1], r2[1]))

    total_area = 0
    for i in range(len(rects)):
        area = (rects[i][2] - rects[i][0]) * (rects[i][3] - rects[i][1])
        for j in range(i + 1, len(rects)):
            area -= intersect(rects[i], rects[j])
        total_area += area

    return total_area
```