Sen. Elizabeth Warren not only served as the literally and metaphorically central figure of the opening Democratic debate, but also took a few clear steps toward demonstrating that she’s ready to compete with President Trump on the general election stage.

Warren showed early in the debate what everyone knows — that she has a keen mind and a passion for restraining corporate power and plutocracy. But what Democrats wonder about Warren is whether she’s a winner, especially when she has to play outside her comfort zone of business regulation.

Wednesday night, she did that — addressing a core worry of Sen. Bernie Sanders supporters, elegantly sidestepping an intraparty spat over immigration, and, perhaps most interestingly of all, refusing to go far left on guns even when doing so would have been an easy applause line. Warren skillfully hewed to a moderate course while still sounding like a solid progressive. It’s not easy to pull that off. And it’s what it takes to win a presidential election.

Warren’s artful dodge of a gun control trap

Moderator Chuck Todd launched the second half of the debate with an effort to bait Warren into taking an unpopular position on guns, trying to get her to say it would be a good idea for the government to confiscate firearms that Americans already own.

Warren didn’t deny Todd’s (obviously correct) premise that in some sense, the existing stock of dangerous weapons is at least as big a problem as any future flow of new sales. But she also didn’t bite. She reiterated Democrats’ poll-tested question that we need to “do the things that are sensible and do the universal background checks and ban the weapons of war.”

Then she said “we can double down on the research and find out what really works,” which isn’t really something I’m used to hearing in the gun debate but sounds like the kind of thing a smart professor would say. We need to find out “where it is that we can make the differences at the margins that will keep our children safe. We need to treat this like the virus that’s killing our children.” That sounded tough on guns. She wants to treat them like a virus!

But Todd saw she was trying to dodge him. He wanted to make news by getting her to issue a call for the government to take away Americans’ guns. He pressed again, “Do you think the federal government needs to figure out a way to get the guns out there?”

Warren ducked and weaved, reiterating her call for research and conveying how seriously she takes the issue both intellectually and morally but without falling into Todd’s trap:

What I think we need to do is treat it like a serious research problem, which we have have not done. Guns in the hands of a collector who had them for decades who never fired them and takes safety seriously, that’s very different from guns that are sold and turned over quickly. We can’t treat this as an across-the-board problem. We have to treat it like a public health emergency, and that means bring data to bear and make real change in this country whether it’s politically popular or not. We need to fight for our children.

In short, she finessed the issue.

Warren has standard liberal sentiments on guns, but the gun regulation issue is politically tricky and not closely related to her core economic justice priorities. So she found a smart way to land the discussion in a political safe zone. It’s not a clip that will go viral — and that’s the point. It’s an important moment in the evolution of her political campaign because it showed her addressing the electability concern that’s dogged her since her announcement.

Nobody doubts Warren’s passion or her intelligence. But while there’s a role in the Senate for smart policy thinkers who are fortunate to have a safe Democratic seat, to be elected president, Warren needs to convince Democrats that she’s also a smart political thinker who knows when to hold ’em and knows when to fold ’em.

Wednesday night, she showed she’s ready for primetime.

Warren took a smart risk on health care

At another key moment in the debate, however, Warren chose the bold path, raising her hand (along with New York City Mayor Bill de Blasio and nobody else) to stand for the principle of a single-payer health care system that would essentially eliminate private health insurance. Early in the campaign, it seemed that most Democrats were going to run on this kind of platform and call it Medicare-for-all. But once the media discovered the “abolish private insurance” framing, many candidates got skittish and backed away from the commitment in favor of some form of a public option plan instead.

Warren declined to move to the political safe ground, sticking with the high-risk, high-reward Medicare-for-all plan. That cut off at the pass the main issue differentiator that Sanders’s camp seemed to have been planning to use to halt Warren’s rise.

She also showed in the discussion that even though she doesn’t normally focus on health care that much in her stump speeches, she is adequately fluent in the issue. And, critically, she didn’t get bogged down in the technical details of Medicare-for-all, instead imitating Sanders’s ability to elevate the discussion to a higher plane of ethics and morality.

It’s not a no-brainer political stance, but it’s the right stance for her. And she also knew when it was smart not to take a stance.

Warren ducked a heated exchange on immigration

One of the signature exchanges of the debate came when former HUD Secretary Julián Castro made a smart-for-him decision to give former Rep. Beto O’Rourke a hard time about his reluctance to repeal “Section 1325.”

This refers to a provision of the US code that makes illegal entry into the United States a felony crime. For most of American history, it wasn’t legal to be in the country illegally (obviously), but it was a civil law violation rather than a crime. Castro’s proposal to go back to the way it used to be is the kind of thing that’s intensely interesting to immigration activist groups but probably incomprehensible to the vast majority of voters. O’Rourke wouldn’t go for it, and the close combat made sense tactically for Castro since the two men occupy a very similar political space.

Warren, as it happens, has endorsed Castro’s position on this topic. But immigration policy is not really central to her message, it’s far from clear that voters care about this issue, and at first blush, it at least sounds politically risky.

Meanwhile, Warren has no particular need to attract more attention. So she smartly sat out an extended discussion that eventually wound up roping in Bill de Blasio, Sen. Cory Booker, Sen. Amy Klobuchar, and Rep. Tim Ryan as well as the two Texans who started it. This left Warren on the right side of the activists without her actually lifting a finger or drawing any attention to the topic. She knows what her message is, and while she’s answered questions about other issues if directly forced to (as she was on guns), she wasn’t going to freelance on immigration when she didn’t have to. It was smart, and smart is what Democrats need to see from Warren.

Warren is starting to address her electability weakness

To the best of its ability, the Warren campaign does not directly address concerns about her electability. The reality, however, is that her electoral track record offers some real cause for concern on this score.

In 2012, Barack Obama won Massachusetts with 60 percent of the vote. Warren that same year won her Senate seat with 54 percent of the vote in Massachusetts. A swath of Massachusetts voters, in other words, liked Obama but didn’t like Warren. That may have simply meant that her opponent, Scott Brown, was an unusually effective politician. But six years later, Warren won reelection with 60 percent of the vote — the exact same share as Hillary Clinton received in 2016. Nobody should sneer at 60 percent of the vote, but Massachusetts is a distinctly bluer-than-average state, and most other Democratic senators outperformed Clinton that year.

Jacky Rosen picked up a Senate seat in Nevada by running 2 points stronger than Clinton. Kyrsten Sinema gained one in Arizona by running 5 points stronger than Clinton. And those were challengers. Claire McCaskill and Heidi Heitkamp both lost their Senate races in tough red states, but they ran 8 and 17 points ahead of Clinton. The only Democratic Senate incumbent who ran weaker relative to Clinton than Warren was Bob Menendez, who labored under a cloud of criminal charges.

These worries are, by far, the biggest doubt that rank-and-file Democrats seem to have about her candidacy. Democrats really want to beat Trump, and consequently, they don’t want a nominee who is bad at electioneering. But while Warren’s never going to win an explicit argument about her track record, what she can do is show people she’s improved her skills.

The poised, commanding performance that she opened the debate with — setting the pace for an extended multi-candidate discussion of the economy — accomplished some of that. But her deft footwork around the gun issue, her selective boldness on health care, and her quiet withdrawal on immigration did even more.

Warren is an accomplished professor and a gifted teacher, so it’s never a surprise when she proves herself to be a skilled policy explainer. But electoral politics is often not that hospitable to nerdy wonks. And what she showed Wednesday night was a different kind of smarts — knowledge of how to avoid going too far on cultural liberalism without losing her base, knowledge of when to stay quiet, knowledge of when to take a bold risk — that has more to do with winning elections. Fundamentally, in order to win, Warren needs to look like a winner. And Wednesday night, she did.