PHILADELPHIA — In a few short months, Donald Trump has shifted from a candidate who considered Speaker Paul D. Ryan a “very weak and ineffective leader” to a president who seems to be leaning on him to beef up his policy agenda.

A sign of that evolution came Thursday when Trump, speaking before congressional Republicans at their issues retreat here, embraced Ryan’s “border adjustment” proposal to tax U.S. imports instead of exports as a way to pay for his border wall.

“Paul Ryan and other leaders in Congress and I and Mike Pence … we’re working on a tax reform bill that will reduce our trade deficits, increase American exports and will generate revenue from Mexico that will pay for the wall if decide to go that route,” Trump said.

The president doubled down in a tweet Friday morning. “Mexico has taken advantage of the U.S. for long enough. Massive trade deficits & little help on the very weak border must change, NOW!” Trump wrote.

Trump’s nod to a central piece of the House GOP tax overhaul came after he noted Thursday that Ryan is “writing his heart out,” drafting legislation.

Letting go

Trump, known to hold grudges, seemed to to let go of his Ryan grievances.

“He’s like a fine wine,” the teetotaling Trump said at the Wisconsin rally in December. “Every day [that] goes by I get to appreciate his genius more and more.”

In the month and a half since, Trump has continued to compliment Ryan and move toward him on issues where they once diverged.

For example, Trump has softened his tone on immigration. Instead of talking about a deportation force targeting millions of undocumented immigrants — something Ryan has called unrealistic — the president has focused on border security and deporting “criminal aliens,” policies Ryan and GOP leaders have long supported — and which are indistinguishable from the policies of President Barack Obama.

Trump has also embraced the House GOP on health care. Witness his pick of Georgia Rep. Tom Price, a Ryan ally, to lead the Health and Human Services Department.

In his speech to congressional Republicans Thursday, Trump also touted his interest in overhauling welfare, another key plank of Ryan’s “A Better Way” agenda. “We want to get our people off welfare and back to work,” the president said.

And on taxes, Trump has started referring to lowering the current 35 percent corporate rate to somewhere in the range of 15 percent to 20 percent. Trump campaigned on a 15 percent rate but Ryan and the House GOP’s plan calls for 20 percent, about as low as they expect they can go and still keep the plan revenue neutral.

Ryan and Trump have had regular conversations, mostly on policy, since the election. Trump’s adoption of some of Ryan’s talking points suggests he’s listening to the speaker.

So on Thursday when Trump’s plan to have Mexico pay the United States for construction of the border wall fell apart, he used a Ryan idea to recalibrate.

Ryan floated the border adjustment tax as one method under which Mexico could, from his perspective, pay for the cost of the wall during an interview with Charlie Rose on PBS Jan. 18.

After Trump’s speech at the GOP retreat, White House Press Secretary Sean Spicer confirmed the president was talking about “using comprehensive tax reform as a means to tax imports from countries that we have a trade deficit from, like Mexico.”

Spicer referenced taxing imports at 20 percent, which a Republican source said is consistent with the House GOP’s border adjustment proposal. The 20 percent import tax Spicer talked about is the corporate tax rate that would apply to goods and services consumed in the U.S. but not applied to goods and services exported, the source said.

House Ways and Means Chairman Kevin Brady also told reporters Spicer’s comments “clearly” identified the border adjustment principles in the House GOP plan.

“Clearly the president is taking bold steps on tax reform, and we’re excited to work with him,” Brady said. The Texas Republican was scheduled to meet with Trump at the White House Thursday afternoon but the meeting was postponed.

California Rep. Devin Nunes, a Ways and Means member who served on Trump’s transition team, told reporters he and other House Republican taxwriters have been discussing their tax plan and the border adjustment proposal with the Trump team since the campaign.

“There’s been a lot of private conversations going on behind the scenes, so we’re pretty sure he’s getting closer,” Nunes said of Trump’s position.

Getting it

“What I think you saw today is he’s gradually understanding how this works and what our solutions are for that,” he added.

House Republican Whip Steve Scalise told reporters Friday the administration is “having a lot of negotiations” with House and Senate leaders. “They’re real engaged in tax reform and border adjustment is one of those discussions,” he said.

Republican senators are less enthusiastic about the border adjustment proposals.

Democrats, including Senate Minority Leader Charles E. Schumer of New York, argue the brunt of the proposal will still be borne by U.S. taxpayers.

"The costs for everything from groceries, to cars, to office supplies would go up by 20 percent, making it harder for middle-class families to pay for things they need every day,” Schumer said in a statement on Friday.

None of this seems to have dampened House Republican leaders' enthusiasm, though.

Asked if Ryan is having a real policy impact on the present, Scalise said, “The fact that you’ve got a speaker in Paul Ryan who chaired the Ways and Means Committee, knows tax reform, Kevin Brady, who’s the chairman has been very engaged with the White House, even during the transition period. And you’ve got a vice president, Mike Pence, who served in the House, is a detailed policy wonk, former RSC chairman — I think all of that has been very positive in ensuring that we’re going to be having a really good relationship at the White House.”