Domestic supply alone would clear the market at E. Add imports and the supply available to American buyers shifts right, so the market clears lower and further out, at A. Buyers get the quantity Qd at the price P with trade, of which domestic growers make Qs and the rest, the gap from C to A, comes in from abroad.
A tariff big enough to stop the imports pushes the market back to E. Growers gain the strip between the two prices out to their new output, which is why they lobby for it. Buyers lose that same strip and more besides, because they also lose the part of the market that simply disappears. The slider sets how much sugar the border lets in, and the shading toggle draws the two surpluses so the sizes can be compared directly.