SPOILER ALERT: Do not read if you have not yet watched the two-part election special of “Black-ish.”

In August, “Black-ish” showrunner Courtney Lilly’s girlfriend got hit by a falling tree. It was a fluke accident that landed her in the emergency room with an arm that was broken in three places and requiring surgery. As Lilly spent time with her in the hospital in the middle of the COVID-19 pandemic he had the opportunity to watch how a workplace was functioning against unprecedented odds for his generation.

At that point, he and the rest of the “Black-ish” team was already working on a two-part election special for ABC, to air ahead of its seventh season premiere. Although it was already decided that part of the special would be animated, there were still some pieces to shoot live-action with the cast and some special guest stars (Sultan Salahuddin and Michael Eric Dyson). “I was able to go into it having talked to doctors and being like, ‘Here’s how we’re going to make this work. Everyone from doctors to the CDC feel this is what’s working,'” Lilly tells Variety.

“Election Special, Part 1,” the first of the two-episode, hourlong block, focuses on Junior (Marcus Scribner) going down the rabbit hole of history to learn just how problematic the politics around voting rights have been in America since their inception. The production was a mix of actors on the regular soundstage, green screen work, animation, archival and stock footage, an original song and Dyson shooting remotely at his own location. The second episode — split into a completely separate, non-canon story, Lilly admits, is entirely animated, with Dre (Anthony Anderson) deciding to run for Congress and grappling with taking dirty money (from a shady businessman voiced by series creator Kenya Barris) in order to stand a chance at being seen and heard.

“The whole thing is a miracle of our post-production team,” Lilly says.

Splitting the special into two distinct parts, Lilly says, was part practical — because at the time they started working on the episodes, “studios weren’t shoot yet [and] the city hadn’t opened up yet so we didn’t know exactly what we were going to face. We had a buffer with the animated episode by making that our first episode — that gave us an extra week to see what the city was going to do.” Additionally, though, they had never been asked to do an hour of material before, and they had to consider if they are “the type of show that can sustain an hour,” Lilly admits. In order to deliver the same pace and sharp storytelling of the past six seasons, they opted to split the hour up into two distinct episodes.

The timeline to turn around the special was tight: Lilly shares they had their first call with their animation studio, Smiley Guy Studios, on July 14 when they didn’t even have a story or scripts assigned to any particular writer. They pulled together that week, pitched the network the specifics on July 17, and by the end of the following week had the scripts ready. By the first week of August, they were recording the animation.

Then came the live-action part. Actor and producer Tracee Ellis Ross expressed concern about going back to work in-person and actually pitched the idea of animation because of it. But “Election Special, Part 1” still required the core Johnson family to be on-screen in certain moments. Her part — embodying the Voting Rights Act of 1965 and appearing on various talk shows through the years to discuss the progress made — was done with her alone in front of a green screen.

“We needed to write the show to make our actors feel safe. Part of their job is being secure so they can use their talent and their instrument to tell our stories,” Lilly says. “In building the episode the way we did, we made sure she never had to interact with somebody without a mask on. There was camera crew there, but we decided to ‘Forest Gump’ her into stuff to have fun, and we were still able to tell our story that way.”

Other cast members, including Anderson and Scribner, did shoot scenes together. But they were shorter scenes than usual and focusing on two-person scenes, Lilly notes. “When it came to building the episode for the live-action part of it, if the rules and the regulations set up with the studios and the unions and the state were going to be that people couldn’t be within six feet of each other, we wanted to make sure we could make an episode where we could do that. The construction of the episode was really about limits that were placed on us by the moment that we were in,” he explains.

In crafting the story for both episodes, Lilly says his team wanted to focus on “highlighting things that may not be as familiar to people who don’t have the same background as our writers.”

As Junior learns he has been purged from the voter rolls — for the first presidential election in which he’s ever been able to vote — he begins reading up on the historical limitations on voting, from the fact that the founding fathers excluded approximately 94% of adults to begin with, to the racial discrimination the Voting Rights Act was supposed to prevent. Junior’s journey is not only to wade through some conspiracy theories and absorb hard truths, but also to realize how important it is to push through the hurdles to exercise his right to vote.

“There’s all this discouragement of voting,” Lilly says. “But we want to get everybody to vote; both parties should be saying, ‘Let’s get everybody to vote.’ We’re not favoring one side or the other. Certainly from the Black perspective everybody spent their time making sure we don’t have a voice and we can’t participate. So, we’re not trying to say this side or that side or who’s fair or not fair.”

Instead, both episodes looked at elements of politics that were universal — from the obstacles to the influence of money. “We wanted to point out the problems of democracy,” Lilly continues.

Although both episodes root themselves in the moment by way of the guest stars they include (Jhené Aiko’s song in “Part 1”; animated versions of Stacey Abrams, Desus Nice and the Kid Mero in “Part 2”), neither episode mentions the presidential candidates by name. Avoiding such time-specific references may allow the conversations the episodes start to be relevant for years to come, but Lilly says the decision to avoid naming them was also simply because “it just wasn’t the real mission” the episodes to comment on them.

Going forward into the seventh season of “Black-ish,” which premieres Oct. 21, Lilly says the first few episodes will continue to “address the moment we’re in,” which he notes is a “particularly political moment.” But, he adds that the show doesn’t have current plans to address whatever the outcome is of the presidential election in November.

“We’re certainly not trying to anticipate anything, we’re not trying to react to anything,” he says. “I think trying to anticipate it would be putting us in this uncanny valley of trying to replicate something that’s close to being real but not really being real.”

That said, Lilly does admit that if a conversation comes up organically in the writers’ room, they can pivot to include it in a later episode. “That’s the nice thing about network television,” he says. “If you’re in a streaming world you can make something and then all of a sudden everything you’ve done is irrelevant because the world has changed before you air; for us, we can pivot. We can address it in the five episodes you’ll see in January, or we won’t.”

When Season 7 begins, Lilly says, “Black-ish” will be including the COVID-19 pandemic as part of the discussion, though, in that Rainbow (Ross) is a doctor and therefore has unique perspective and experience. Some of the early episodes of the season, he reveals, take place in the spring of 2020 — the earlier days of the pandemic — and there are jokes and references about needing to wash one’s hands. Since the show is a family sitcom and the majority of the action takes place within the family home, Lilly notes, it won’t always be a prevalent part of the story — or production.

“It’s not like, ‘Oh we’re shooting in the mall, are people wearing masks?'” he says. “We’re never going to be irresponsible on how we’re portraying things, but I don’t know that I need to just virtue signal and be like, ‘Now we’re going to talk about masks!’

“This should not be a political issue,” he continues. “Masks help prevent the spread of this. If it didn’t, we wouldn’t be shooting right now. Literally, we’re actually sinking not only our health and our safety but also the studio’s millions of dollars into this, so I think a lot of people feel confident saying masks are preventative.”