WASHINGTON — House Speaker Paul Ryan will leave Congress having achieved one of his career-long goals: rewriting the tax code. On his other defining aim — balancing the budget and cutting back benefit programs like Social Security and Medicaid — Ryan has utterly failed.

The budget geek with a passion for details proved adroit in drawing up plans that balanced on paper but never got beyond the hypothetical.

Under his leadership, Republicans never tried to implement the deep cuts his budget called for, particularly his vision of turning Medicare into a voucher-like program for future retirees. Instead, the House passed steep tax cuts while increasing spending, setting the government on a path to rising deficits.

Now, the return of trillion-dollar deficits looms on the horizon.