Jo Swinson will have little time to celebrate after succeeding Sir Vince Cable to become the Liberal Democrats’ first woman leader.

Swinson, who comfortably beat Sir Ed Davey by 47,997 votes to 28,021, insisted in a strong acceptance speech that “liberalism is alive and kicking”. She promised her party she would “take on nationalism and populism” and do “whatever it takes to stop Brexit”, but acknowledged they faced the fight of their lives. She made a good start at being a thorn in Boris Johnson’s side; one task will be to puncture his claims to be a liberal conservative.

Normally, any new leader has a window of opportunity to make an impression on the public. Although the opinion polls show the Lib Dems keeping up in a four-party race, the media spotlight will inevitably fall tomorrow on the new prime minister.

Swinson will face plenty of challenges. An early strategic decision will be whether the Lib Dems continue to target their most winnable constituencies – in the hope of raising their number from 12 MPs to more than 50 at the next general election – or channel precious resources into a much bigger group, in the hope of winning more than 100 seats. Swinson described herself as “a candidate for prime minister”, suggesting she is in the second camp.

She should receive some welcome pressies. There are hopes for further defections to the Lib Dems by independent and Conservative MPs, though some Tories will probably wait to see how hard Johnson tries to secure a Brexit deal. On 1 August, the Lib Dems are expected to win the Brecon and Radnorshire by-election, where the Greens and Plaid Cymru stood aside in a test run for a “Remain alliance”.

Could such an alliance be repeated at an early general election? A nationwide carve-up of seats would be hard to reach agreement on. The Lib Dems, having seen off the threat from Change UK and performed strongly at the May local and European elections, would demand richer pickings than the Greens. More plausible would be local pacts where one pro-Remain party has a strong candidate or a much better chance of beating the Tories or Labour.

The Lib Dem “Bollocks to Brexit” slogan does give Swinson the useful ingredient of clarity. However, this might not necessarily play well in the southwest, which probably offers the party its best hope of gaining (or regaining) seats. To attract 2016 Leave voters, a more nuanced message about Brexit being missold might prove more effective.

If the UK left the EU, the Lib Dems would probably become the party of Rejoin – a hard sell to some voters. Swinson will need to develop an agenda beyond Brexit. A green revolution, championed by Davey, is the most likely platform, and could broaden the party’s appeal beyond its Remain audience. More work on other policies is required.

Swinson will need to manage the expectations of the enthusiastic recruits among the 107,000-strong membership who believe the Lib Dems are about to sweep the country. Turning the momentum at the European elections, fought under proportional representation, into parliamentary seats will be hard under first past the post. There is a risk the Lib Dems pile up votes in metropolitan Britain where they start so far behind that it will be difficult to gain seats.

Labour’s crab-like move towards backing a referendum and Remain poses a challenge. The Lib Dems will argue that Jeremy Corbyn doesn’t really believe in it, so Labour’s offer lacks credibility. But some pro-EU Labour supporters who voted Lib Dem in May might feel it is safe to return. At a general election, the Lib Dems will face the traditional squeeze and the charge that they are a wasted vote. Although it should be less potent when they are running at 20 per cent in the opinion polls, some voters will hold their nose and vote Labour to try to keep the Tories out.

Support free-thinking journalism and attend Independent events

One product of success is that Swinson will face endless questions about what the Lib Dems would do in another hung parliament – a real possibility.

Neither Johnson nor Corbyn make attractive partners. So a full-scale coalition including Lib Dem ministers, or a “confidence and supply” agreement like the Tory-DUP one, would be highly unlikely. The Lib Dems would probably judge Commons votes under a minority government on a case-by-case basis. They might have a dilemma if a Corbyn-led government included a Brexit referendum in its Queen’s Speech.

The hung parliament question is a sensitive one. After their 2010-15 coalition with the Tories, the Lib Dems were almost wiped out as a Westminster force. Lessons need to be learned, but the coalition was the elephant in the room during the leadership election.