Mireille Enos is smiling.

It’s a sly, sexy smile, but it’s a definite, tooth-baring grin — one viewers rarely got to see through her four seasons as the grim homicide detective Sarah Linden on “The Killing.”

On the sleek set of ABC’s new cat-and-mouse thriller “The Catch,” she’s shed that dour demeanor, along with those wool sweaters and down parkas, in favor of the far more provocative persona of private investigator Alice Vaughan. “I never get asked to play the beautiful heroine,” says Enos with a laugh.

Clad in figure-flattering clothes and tapered heels, she’s in pursuit of an elusive con man, Ben (Peter Krause) — who just happens to be her ex-fiance.

But it’s been a bit of a uphill climb to get to this stylish caper to the small screen. After the pilot was picked up in January 2015, the show went through a change of showrunners, a recasting of the lead actor (he was initially played by Damon Dayoub), and ultimately a reshoot of the entire pilot.

But given that this drama hails from Shondaland, the odds may be stacked in its favor. Confidence abounds in the halls of ABC and Sunset-Gower studios, where Shonda Rhimes and her producing partner, Betsy Beers, are based. “I don’t think there’s ever been a pilot that we haven’t reshot,” says Rhimes.

ABC Studios head Patrick Moran dismisses the development problems as “growing pains.” “It’s a creative endeavor, not a science equation,” he says. “A hundred different factors go into (making a show), and they’re all subjective. But in this case, all of the changes were the right things to do.”

Ultimately, what matters, of course, is whether viewers tune in — despite the behind-the-scenes turmoil.

ABC is banking on “The Catch.”

The thriller, which will run for 10 episodes, got heavy promotion during the recent Oscars with a come-hither teaser showing the two leads tangoing. It’s commanding top prices from advertisers — among the most expensive this season. And it has the best timeslot in primetime, Thursdays at 10 p.m., in the heart of ABC’s powerhouse TGIT lineup, behind “Scandal.” (Not to mention it was developed by Channing Dungey, now president of ABC, in her previous role as head of the network’s drama department.)

“Ben never takes anything from anybody who can’t afford to lose it,” says Peter Krause. “He’s quite a nice thief.” Terence Patrick for Variety

Lisa Herdman, director of national broadcast and branded entertainment at ad agency RPA, says the show’s auspices are what matters to her. While she’s vaguely aware of the recasting, Rhimes’ imprimatur translates to one thing: ratings. “If there was a problem, they fixed it,” she says. And the scheduling, she adds, is perfect — away from the January fray, where it can now get plenty of attention from viewers, who flock to Rhimes for “good storytelling.”

Moran says the show fits comfortably in the Shondaland universe. “Aesthetically, it lives in its own space: It has a different look, a different sound, a different location, he says. “But it has a strong female character at the center and this great sense of a forbidden romance.”

“The Catch” began as an idea from British novelist Kate Atkinson (“Behind the Scenes at the Museum,” “Case Histories”) and her producing partner, Helen Gregory, about a fraud investigator who gets conned. Producer Julie Anne Robinson brought it to Shondaland, which gave it to Jennifer Schuur (“Hannibal”) to develop into a pilot.

Enos, long a favorite of Rhimes and Beers, was quickly cast. “She immediately got the essence of a character who’s hiding in plain sight, what happens when someone close to you betrays you,” says Beers. As a bonus, the producers later discovered the actress knows martial arts and has impressive skills as a stuntwoman. “She can run in heels like nobody’s business,” Beers adds.

But once the pilot was filmed, things started to unravel. Dayoub’s role was recast in May, along with that of another actress, Bethany Joy Lenz. Krause landed the male lead in July. By August, Schuur would be gone, too, with reports citing “creative differences.” But Rhimes doesn’t see it that way. “Making a pilot and making a series are two very different things,” she says. “I learned that the hard way the first year of making ‘Grey’s.’ [Schuur] was asked to change direction fairly quickly, and it’s just not that easy. I have a lot of compassion for it.”

The show was stuck; the network wouldn’t approve an episode-two script, and production was shut down. It was the casting of Krause — whom Rhimes says she’s “a little bit obsessed with” — that set the reboot in motion.

“It did require reshaping not just the pilot but the series itself,” says Rhimes. “Because once you have Peter Krause, you’ve got to write for him. It allowed for Mireille to have a more formidable foil. And it allowed for richer storytelling.”

In need of a trusted hand for the redraft, Rhimes turned to a veteran of Team Shondaland: Allan Heinberg, who’d been working on “Grey’s Anatomy” and “Scandal.”

It helped, too, that he’d had his own experience with fraud — he’d been in a 10-year relationship with someone who’d betrayed him, a story he’d shared in the writers’ room. “This was a perfect opportunity to get him to stand up,” Rhimes says.

Rhimes presented Heinberg with the opportunity to reinvent the show, but there were limitations. Says the writer: “She was essentially saying, ‘Can you come up with an entirely new show with the same premise, the same actors, the same set and the same costumes, but everything else is entirely new?’ ”

So he said no. Politely.

But he was about to take a long flight back to Los Angeles from London, so his friend Pete Nowalk, creator/showrunner of “How to Get Away With Murder,” advised him to spend those hours thinking about it.

By the time he’d landed, he’d come up with a plan.

His idea was such a revolution, though, that he didn’t believe she’d buy it. “I thought, this is going to be too expensive and too drastic,” he says. “They’re never going to let me do this in a million years.” Think again.

“Mireille Enos admits she wasn’t prepared for the extent of Heinberg’s rewrite: “It took me a couple of reads of the new version to understand the gift I had been handed.” Terence Patrick for Variety

Heinberg shifted the tone of the series, from a dark, Hitchcockian thriller to a far more playful romp — “The Thomas Crown Affair” meets “Ocean’s Eleven” — and reinvented roles for the entire cast. Rose Rollins, for example, went from playing a stay-at-home mom to Alice’s no-nonsense business partner.

“I was excited because Allan was excited,” says Rhimes. “That’s what matters to us. We’re not just making shows for making shows’ sake. There was a moment when [Betsy and I] looked at each other and thought we don’t actually have to do this. We don’t have to reinvent. [But] we did have to reinvent, because we’re passionate.”

Both the studio and network got on board quickly. “Allan having the shorthand with Shonda was great,” says Moran. “That was reassuring for us. Our notes [were]: We are in.”

“Scandal’s” Fitz and Olivia. “Grey’s” Meredith and Derek. … And now “The Catch’s” Alice and Ben? The hope is that the flame that sparks between Enos and Krause will secure the new show a place among that pantheon of “TGIT” romances.

“One of the things we liked right away was the idea that two people who so desperately want to be together but have these obstacles between them felt like the hallmark of a great Shondaland show,” says Moran.

When Heinberg set out to rebuild the series, he wasn’t that interested in forensic accountants. So he turned Alice into a high-end private investigator, and Ben from a petty criminal into a James Bond-like con man with ties to criminal syndicates all over the world.

The lighter tone sets it apart from the rest of the “TGIT” lineup. “It’s not a dark, brooding thriller about corrupt people,” he says. “It’s this oddly fun confection with a really different energy. I think (ABC) responded to that.”

Heinberg kept the writers’ room intact, a move he admits was terrifying given that someone else had assembled it, but he had sympathy for the plight of the writers. “The network and the studio had put them through draft after draft after draft,” he says, “and then their bosses are no longer there.”

Enos admits the reboot gave her pause. “It took me a couple of reads of the new version to understand the gift I had been handed,” she says. “Even when I went to take the meeting with Allan when he was pitching me the new pilot, we were almost halfway through reading it when I said: ‘Wait. How much of the pilot are we reshooting?’”

Krause says he understood that the show needed to be revamped. “Coming into it, I felt like, this can’t be an exploration of a psychopath and a woman who falls for him,” he says. “I think he built a more compelling storytelling machine.”

The pressure is on for “The Catch” to deliver. ABC’s midseason offerings “The Family” and “Of Kings and Prophets” have disappointed in their debuts, and the “TGIT” lineup has taken a ratings hit since returning in February (while “Grey’s” is flat, “Scandal” and “Murder” are both down 40% since last year). But Shondaland is an important part of the Alphabet’s business — all of its series have been developed under Dungey, and several pilots are now in the works. “I have now officially only created shows that have gone six seasons,” Rhimes tweeted after the recent renewals of “Grey’s” and “Scandal.”

That track record will endure no matter what happens with “The Catch,” since Rhimes didn’t create it, but what does matter is the legacy that comes with her brand.

Krause recalls his conversation with Rhimes when he was cast. “When she decided to reorganize things creatively, we had a very nice conversation about how important it was for her to ensure that this was going to be the highest quality product it could be,” he says. “I had some issues in the past with ABC in creative situations, and she assured me she would handle all that.”

Heinberg knows he has a high standard to live up to. “Shonda gets bored very easily, which is both a blessing and a curse,” he says. “She treats her viewers with a lot of respect. I feel like we have very intelligent viewers, but they also watch a lot of TV — a lot of Shondaland TV — and those shows move very quickly. They don’t spoon-feed you. We’re just going to keep throwing twists and turns and revelations at you.”

“The Catch” had plenty of twists and turns on its way to its March 24 premiere. Clearly, ABC is hoping the action from here on out stays onscreen, not off.