Is it that we don't have the actual refining capacity or is it that we don't have the refining capacity to make 30+ different gasoline formulas to comply with silly rules?
There is enough refining capacity, for now, as a general rule to meet the demands of the US market. The problem is that there is not a lot, and there are the 30 or so different formulations, so one refinery going down can have a big regional impact. That is why people in certain states often complain that their prices are higher than other states. One area where the Feds ought to step in is to basically say that there are two formulas. One normal one, and one for smoggy cities. That would not eliminate the overall problem, but it would eliminate some of the regional price spikes.
The problem with building more refineries is that nobody really wants to do it because it is a huge capital expense for a low margin business, the best approach is to make it easier for existing refineries to be able to expand production.