Yes, President Trump is going to send out some stupid tweets and say some stupid things that will make passing the bill more difficult. But the problems congressional Republicans have are of their own making.

Let’s start with what the bill actually does. Here are some highlights:

The number of income tax brackets will be reduced to four, at 12 percent, 25 percent, 35 percent and 39.6 percent.

The top rate will kick in at $1 million, more than double where it kicks in now (this is meant to create the impression that they are not cutting taxes for the very top earners, but Wednesday I explained why this is still exactly what they are doing).

The corporate tax rate will be reduced from 35 percent to 20 percent.

Corporations will be allowed to repatriate overseas cash at a 12 percent tax rate.

Corporations will no longer pay taxes on overseas profits.

“Pass-through” income will be taxed at 25 percent, which could be a boon to wealthy taxpayers and is likely worth millions of dollars to Trump himself, but there are complex “guardrail” provisions to prevent people from exploiting this provision.

The estate tax, currently paid only by estates worth $5.5 million or more, will be phased out.

The alternative minimum tax will be eliminated.

The deduction for state and local income taxes will be eliminated.

The deduction for student loans will be eliminated, as will the deduction for large medical expenses.

The deduction for state and local sales taxes will be eliminated.

The deduction for state and local property taxes will be capped at $10,000.

The standard deduction will be almost doubled, but the personal exemption will be eliminated.

The child tax credit will be increased.

The mortgage interest deduction for new home purchases will be capped, applying only to the first $500,000 of a mortgage. (The current cap is $1 million.)

There will be no change to 401(k) deductibility.

It’s important to remember that this isn’t final; there’s a lot of lobbying, horse-trading and renegotiation to be done before this thing is voted on. But reading over this long list of provisions, it’s hard to avoid the conclusion that Republicans went gangbusters to help corporations and the wealthy — the parts of the plan that were never negotiable — then scrambled to add changes here and there so the could say they’re actually helping the middle class.

“They started with a set of big tax cuts they want to give, and those tax cuts are overwhelmingly weighted toward the wealthy,” Jacob Leibenluft of the Center on Budget and Policy Priorities told me Thursday. “And then I think the rest of the bill is designed to solve a math problem as well as a political problem.”

The math problem is that, according to the budget resolution that passed the Senate, this bill can’t cost more than $1.5 trillion over the next 10 years. The political problems are really twofold: First, Republicans don’t want it to look like just a giveaway to the rich. Second, every loophole or deduction they eliminate has a constituency behind it, often a very powerful one. As a consequence, Leibenluft says, “They are ending up doing some painful things.”

Let’s take, for instance, the pass-through provision. Republicans got criticized a lot for it, because it would be easy for wealthy people to exploit the change and reduce their tax rate from 35 percent or 39.6 percent down to 25 percent. In an apparent attempt to address this problem, Republicans inserted a bunch of complex provisions (the “guardrails”) meant to prevent people from gaming the system. But guess what: The National Federation of Independent Business, an extremely influential small-business lobbying group that is a traditional Republican ally, doesn’t like the guardrails, and so it just came out against the bill.

“There are elements of reform in here,” Mark Mazur, the director of the Tax Policy Center, told me. “There are lots of deductions, credits, tax preferences that look like they’re going away, and rates are going down,” which would constitute “broaden-the-base/lower-the-rate” reform. “But there’s a bunch of new preferences being put in.”

And changes will attract opposition. Which leaves Republicans with a very tricky balancing act. Let’s say they decide that some provision, like the pass-through guardrails or the elimination of the deduction for student loan interest, is generating too much opposition. If they want to drop that, they have to come up with more revenue from somewhere else to make it under their $1.5 trillion limit. Can they do that in ways that won’t lose them support? “Doing tax reform is technically hard,” says Mazur, “but the political part is even harder.”

That’s why in the past tax reform has taken years of careful work and negotiation to accomplish. Republicans want to do it all in a matter of weeks.

You might have expected that if there were any issue on which they would have prepared carefully for the time when they had the power to pass bills and have them signed by the president, it would have been tax cuts. But apparently not.