Your question is Shipping Rate Calculation With Tiers. Take a moment with it on the right.
Talk me through your thinking if you like. When you're confident, submit your answer and I'll grade it like a real screen (7/10 or better passes).
Write a rate evaluation function that calculates shipping rates based on nested tier matrices, handling discount codes and dynamic weight thresholds across sub-problems.