The fourth season of the CW’s “Supergirl” has leaned heavily into parallels with the real world, as some humans in its fictional story are viciously — occasionally violently — opposed to the aliens whom have been living amongst them…including Supergirl (Melissa Benoist) herself.

However, their latest quasi-ripped from the headlines story was a coincidence, at least timing-wise. Just a few days after the Supreme Court allowed the Trump administration to bar transgender people from serving in the military, the drama is diving into the backstory of Nia (Nicole Maines), the first transgender superhero.

“There’s an aspect to the storyline that really means so much to us,” executive producer Jessica Queller tells Variety. “The lore about the character of Dreamer is that it is passed down to one woman of every generation. The fact that Nia is the one who has inherited the powers resonates that she is a woman in every sense of the word. It only goes to one woman in each generation. It validates — on a symbolic and on a real level — what it means to be a woman, the depth of being a woman, whether you are a trans woman or not. We feel like that has a lot of power and it represents how we feel. That will mean a lot out in the world.”

Here, Queller and executive producer Robert Rovner speak with Variety about Nia’s backstory (and Dreamer’s rise), bringing Jon Cryer on as Lex Luthor and the decision to wipe Alex’s (Chyler Leigh) memory.

What new sides of Nia will the show explore as it also reveals her superpowers? 

Queller: We have seen so far she’s a little bit hesitant to own her Dreamer mantle. This is going to be her backstory. [We’re] going home to meet her family and really uncover the interpersonal relationship between her mom and sister, especially, that explains why she hasn’t been able to own herself as a superhero and work through that.

Rovner: She goes home with Kara, so it’s a chance for them to deepen that relationship, as well. The stuff they’re dealing with will parallel in an interesting way.

Why was it important to show Nia’s family, and how integral has actress Kate Burton been in fleshing out who Nia’s mother is?

Queller: Casting Kate Burton was one of the highlights of my career as a writer; I am such a huge Kate Burton fan. She has such gravitas and soul. The chemistry between Kate and Nicole, and also the actress who plays [Nia’s sister], is so beautiful. We are going to learn that Nia’s mother is the original Dreamer, and she’s passing down the mantle. She just elevates everything she touches. She’s just extraordinary.

What was it like the first time you saw Nicole in the Dreamer costume?

Rovner: It was epic and thrilling. We’ve seen different photography during the development of the suit. But then we did a camera test where she stepped on the screen in her Dreamer costume and we all had goosebumps. She empowered this strong, heroic figure — the embodiment of Nicole, Nia, and Dreamer that we wanted to put out there. We’re excited that people who have seen the poster thought it was one of the coolest suits.

Queller: And Nicole was so excited when she put that suit on. It was so joyful to see that. She just embodied that hero role. It’s tough to play a superhero, and have that strength and nobility and posture, and she just owns it.

What leads to Nia taking the step and finally putting it on?

Rovner: She sees people are in trouble [and] realizes that regardless of what is happening in her personal life, what she’s struggling with, it’s important to help.

Queller: We’re so excited for you to really learn about Nia’s upbringing and her background. It’s extraordinary. When we excavate her backstory, we’ll see that it’s about her parents and others. Putting others above herself and her duties as a hero. When she resolves stuff with her family, she can own the mantle with a full heart and kill it.

Elsewhere, Alex decided to wipe her memory of Kara being Supergirl in order to stay at the DEO — and protect her sister. What went into that decision in the writers’ room?

Rovner: We thought it was important, as we’ve shaken things up, with the dimension and division in the country, [that] all of our characters need to be strong in their pursuit of justice. As all of our characters have been struggling with what’s going on in our world, we wanted the same challenges to be happening inside the DEO. And to really see the stakes of what the Children of Liberty are doing — have the stakes be real. We wanted to investigate them. And we wanted to investigate, which you’ll see in upcoming stories, what Kara has meant to Alex. You’ll see the absence of the Supergirl and Alex relationship will have certain ramifications, and how it’s evolved.

Queller: We’ve always seen Alex’s fierce love, devotion, and protection of her sister. This is the ultimate sacrifice: she would sacrifice knowing who her own sister is to protect Supergirl’s identity, which both protects Kara and protects the world, because she knows how critical Supergirl is out in the world. That could be jeopardized if she was coerced into giving away her sister’s identity. It’s a really noble and heartbreaking sacrifice she makes that illuminates her love and depth and commitment.

Rovner: Although Supergirl and Alex don’t have the same relationship anymore, Alex is still Kara’s sister. That familial bond is always there. Part of the journey of the rest of the season is her changing relationship with Supergirl.

Queller: She’ll know Kara is her sister, but she just won’t remember Kara is Supergirl.

Rovner: People should not be afraid our couch scenes are going anywhere.

Kara did beg her sister to not erase her memories — to leave the DEO rather than wipe their history from her mind. How will she be handling Alex’s choice?

Queller: Kara understands that Alex’s decision was the right decision for the greater good. It’s very painful for her on a personal level, but it was the correct thing for her as a hero. She can’t risk having it lorded over her that Kara Danvers is Supergirl. It would completely curtail her function as Supergirl. She understands it, respects it, and knows it was the right decision even if she knows it was personally painful for her.
Rovner: I think she made the argument first, that Alex then used against her, that it’s important at this time for Alex to remain in the DEO.

Queller: If they didn’t have an ally in the DEO, there would be no one there on their side to help modulate things.

Rovner: And as the season progresses, it becomes more and more important Alex is there. She made the right choice.

Jon Cryer has been cast as Lex Luthor, which is an iconic character. Who is his version of the character?

Rovner: Epic. He’s so incredibly talented. His dramatization of Lex is grounded and emotional.

Queller: Hilarious. In our estimation, he’s the best Lex Luthor ever. We might be biased, but he’s the most masterful actor. He’s just exhilarating as Lex. I can’t overstate how thrilled we are with him.

Rovner: It’s a side of him I don’t think the audience has seen; I think they know him in much more different roles. He has fully embraced being Lex Luthor, and it’s transformative.

Queller: He’s powerful, he’s devious, he’s funny, he turns on a dime. His dynamic with Katie [McGrath, who plays his on-screen sister,] Lena, is just so great. We think the audience is going to go crazy when they see his performance.

Agent of Liberty and the Children of Liberty had been the most obvious parallel to the real world’s turmoil, but they haven’t been as much of the focus recently. How much will they be playing into the second half of the season?

Queller: The constant state of the real world was our inspiration for this season. There is tremendous history, for Superman in particular, taking on allegorical stories that reflect what’s going on in the real world. Given the state of the world, Robert and I were really passionate about telling stories that impacted what we’re all grappling with every single day. We’re so lucky to have this platform, and a younger audience watching. It’s really meaningful for us to tell stories about basic human values, such as kindness and respect for others, that right now, sadly, seem controversial.

How has the evolution of some of these real world issues impacted the stories you originally broke or had planned to tell?

Rovner: The nation is in a very divided state right now, which continues to exacerbate. Where we began the season, all of it is imbued into what we’re doing. I don’t think there’s one particular thing that happens that has changed our storytelling.

Queller: But as [we discussed at the start of the interview], the world continues to reflect [it] or the news continues, through happenstances, to be resonating with the stories as they air. This week, there’s a lot of news about what’s going on in the trans community. It’s really poignant that Episode 11, which rally focuses on Nia and those issues, happens to be airing this week. It’s more that the world keeps reaffirming we’re telling the right story.

Though the writers’ room is no stranger to arcing out seasons, the team also has the already-announced annual crossover that will air next season, Crisis on Infinite Earths. What impact has that had on your process of finishing the writing of Season 4?

Rovner: “Supergirl” had its own story to tell this season. By the season finale, we’ll have teased some elements of what’s to come next season as it relates to the crossover. Some stuff will be embedded in, but it doesn’t impact the main story we always planned on telling this season.

“Supergirl” airs Sundays at 8 p.m. on the CW.