Gabe Kapler might disconnect when he touts effort in a loss, or when he spouts stats to defend a struggling player, or when he preaches spin rate and launch angle and all sorts of “velo.” But after the Phillies lost two of three to the Padres and wasted momentum gained by sweeping the Cubs, Kap hit the right chord when he acknowledged the urgency that accompanies the Phillies’ next two series:

“It’s immeasurably important," Kapler said Sunday.

That is not an overstatement.

They play Tuesday and Wednesday at Fenway Park, and while the Red Sox are 6½ games out of the AL wild-card race and are already looking toward next season, they’re also eight games over .500 and they’ve won five in a row.

The Phillies are, somehow, 6-7 against the Marlins, who are by far the National League’s worst team. That goes a long way toward explaining why the Phillies are two games out of the second wild-card slot, tied with the Brewers and Mets.

Kapler might not totally get Philly, but he gets this: If the Phillies don’t win in Boston and Miami then the season’s over.

The season won’t be over. The team has, lately, shown signs of competence. It fired by-the-numbers hitting instructor John Mallee last Tuesday then scored 30 runs in the next four games. Won them all.

The new hitting coach, 75-year-old Charlie Manuel, recycled from the advisory role he’d occupied since his managing days, couldn’t keep the bats hot through the weekend, but the team played crisply nonetheless.

Both Bryce Harper and Jean Segura turned singles into doubles by running hard and exploiting lazy outfielders. Catcher J.T. Realmuto picked off a runner at second base when a pitcher struck out bunting. Harper recorded his ninth outfield assist, his third-highest total and four short of his career high.

“We’re playing really good baseball right now. Taking the extra bag when we can, playing real hard, playing good defense,” said Harper, whose game-winning grand slam Thursday night was the high point of the season. Harper, hitting .308 with seven home runs and a 1.259 OPS in his last 11 games, is hot. So is Realmuto, hitting .329 with eight home runs and an OPS of 1.094 in his last 23 games.

Rhys Hoskins, hitting .098 with one home run and a .443 OPS in his last 18 games, is not. Hoskins had been the team’s best hitter to that point, with a .922 OPS and 24 homers.

“Rhys is just one click away,” Harper insisted after Hoskins’ 408-foot fly ball to the 409-foot wall in center field Sunday. Kapler called it a “loud out.”

Loud outs make for quiet Octobers.

Still, said Hoskins, the Phillies are playing with swagger. They have reason to be confident as they begin this trip.

Aaron Nola, the No. 1 starter, pitches Tuesday. Drew Smyly, who pitched his entire career in the American League before the Phillies signed him July 21, is 3-1 with a 2.18 earned-run average in 10 appearances against the Red Sox (half of which came at Fenway); those are his best numbers against any team he’s faced at least 10 times.

As for the weekend, two of Vince Velasquez’s best starts came against Miami; Zach Eflin threw a complete game in a win over the Marlins on April 28; and Jason Vargas has averaged almost six innings per start since the Phillies traded for him July 29.

Now, said Kapler, to make something of those encouraging numbers.

“We have to go on the road and play good baseball. We have to swing the bats the way we did in the Cubs series, we have to continue to make pitches and give our team a chance to win baseball games,” Kapler said. "We have to go on the road and perform.”