Despite Republican control of the White House and both houses of Congress, the party’s top priority — sharp, deep, down-to-the-bone tax cuts — is in trouble.

And the chaos over the Obamacare repeal is largely to blame.

Tax cuts (specifically, tax cuts for corporations and the rich) may be the only thing that Republican moderates and more radical Freedom Caucus members uniformly agree on. Axing taxes has somehow acquired near-reverential status in the party of Lincoln, with politicians repeatedly trying to out-Reagan even Saint Ronald.

But despite their partywide appeal, cuts of the magnitude being sought by Trump and congressional Republicans still ain’t easy. To get them to the president’s desk without being blocked by a Democratic filibuster, the plan needs to meet certain arcane criteria.

Actually, one specific criterion: It cannot increase long-term deficits.

Even with stronger economic growth, this is impossible. The kinds of corporate and personal income-tax rate reductions that Trump and congressional Republicans want are just too expensive.

In the decade after next — which is, perhaps counterintuitively, the period that actually matters if you want to prevent a filibuster — the House plan would cost $6.6 trillion, according to the nonpartisan Tax Policy Center. Meanwhile, the price tag for Trump’s most recent plan is a whopping $20.9 trillion.

Either way, that’s a pretty deep hole to fill. More like a canyon, really.

Republicans have a few options for reducing or offsetting the costs of their cuts.

They could reduce deductions, credits and other “loopholes” in the tax code, of which there are many. For example, the state and local tax deduction (sorry, blue states!) and the adoption tax credit (also sorry, big-hearted families!) are on the chopping block.

Unfortunately, however, Republicans have been loath to close some of the loopholes that would bring in the most revenue, such as the exclusion for employer-sponsored health insurance and the mortgage interest deduction.

So the real money must come from elsewhere.

One source would be the “border-adjustment tax,” which is actually already in the House plan.

This is a change to how imports and exports are treated for corporate tax purposes; firms wouldn’t get taxed on proceeds from sales abroad, but they also wouldn’t be allowed to deduct the cost of imports. While some economists argue that this wouldn’t affect trade because foreign exchange rates would adjust lickety-split, importers aren’t buying it. The National Retail Federation is campaigning aggressively against the provision, and lots of Republicans are balking.

Which means that big pot of money may vanish.

The other large offset comes through Trumpcare.

As I explained recently, the Republican “health care” bill was never actually about health care; it was always about tax cuts that would pave the way for more tax cuts. The bill may not make health care more affordable, or offer more “freedom,” but it sure as heck does include hundreds of billions of tax cuts for medical-device manufacturers, drugmakers, insurers and rich people. Families making more than $200,000 would account for 71 percent of the net tax decrease under the law.

Now, why would cutting taxes today, through Trumpcare, also make it easier to cut taxes again later in a bigger bill?

By shifting some of the costs of those revenue losers into Trumpcare, when they can be paid for through reduced insurance subsidies and reductions in Medicaid spending, they’ll no longer be weighing down the much larger tax-overhaul legislation.

As a result, the size of the hole that Republicans have to fill later would get a little shallower. It’s devilishly clever, when you think about it.

With Trumpcare in peril, though, this ingenious tax-cutting strategy is, too.

Republicans have promised too many mutually exclusive changes to health-care policy. The kinds of changes necessary to appease the most conservative members of the House will not fly with enough Republican senators. Already six Republican senators have said they were a firm “no” on an earlier version of the bill, and the party can afford only two.

And if Obamacare repeal fails, the entire scheme for tax cuts may, too.

If that happens, Republicans have a few options. They could scale back the ambitions of their tax-cutting scheme. They could sunset the cuts, so that they increase deficits in the near term but then abruptly end before they do so in the long term. (This is, as you may recall, what happened with the George W. Bush tax cuts, and what led to the “fiscal cliff” fiasco in January 2013.)

Or — here’s a crazy thought — they could consider working with Democrats to produce something more bipartisan, so they don’t need to box themselves into this too-clever-for-its-own-good, anti-filibuster-centric approach in the first place.