"You look happy," Alba Villanueva tells her granddaughter Jane as she twirls in a new blue sundress one morning.

The comment seems to catch Jane by surprise — and just five short episodes after a deadly serious revelation, it catches viewers by surprise, too. Is Jane happy?

About halfway through its third season, The CW's high-energy telenovela Jane the Virgin — known for its flashy, delightfully farfetched melodrama (pseudo-incestuous lesbian crime lords, accidental artificial inseminations, and the like) — took an unusually sharp, unusually dark turn.

This is a show that capitalizes on outlandish plot arcs specifically designed to make you roll your eyes back into their sockets (the story centers on a young Catholic woman, Jane Gloriana Villanueva, who's spent 23 years saving sex for marriage but then gets pregnant due to a medical error during a routine gynecological visit), so you'd think no twist could really catch the audience by genuine surprise. After all, when the entire point is to shock and dazzle you in a way where you immediately burst into laughter afterward, you quickly wise up to the game. The surprise is always brief, and then show and audience together get to giggle giddily over their mutual willingness to indulge in such a ridiculous mode of entertainment. That's the beauty of Jane the Virgin's blend of satire and cheerful self-awareness, as best epitomized by the series' unseen narrator, who proclaims "O-M-G, right?" after every eye-popping turn — like when we learn the series antihero Petra Solano had her identity stolen by her evil Czechian twin, or when it turns out baby daddy Rafael Solano's loopy sister is secretly sleeping with their stepmother. "I know!"

Well, Jane the Virgin finally broke this pattern. And it was devastating.

Jane's husband, Michael Cordera, died very suddenly from heart complications. The heart-stomping twist made every other saga of sex and drugs and face-changing, baby-kidnapping supervillains seem utterly vanilla — because, frankly, they are when compared to real pain. The loss of the center of your universe? It hurts, and it doesn't stop hurting. There is no laughing afterwards. It's a clean, hard hit.

So how does a show all about fantastically outrageous events deal with such a down-to-earth tragedy? Well, if Jane the Virgin accomplished its most powerful emotional blow by deviating sharply from its tried-and-true plot device — stunning the audience, then laughing about it — it recovers by returning to that very trope, albeit with a critical adjustment.

You see, Jane the Virgin knows a thing or two about happiness — and not just the glitzy, sweepingly one-note type we usually see in these lighthearted TV comedies. Importantly, this show understands not only what real happiness is, but also its very close sister, a thing called joy.

In her bestselling book The Gifts of Imperfection, social researcher Brené Brown talks about the differences between happiness and joy, two words that are so often used interchangeably. Happiness is an emotion that manifests in response to something good happening, she writes, whereas joy is an attitude or way of approaching the world. Consider the Greek origins of each word: The Greek word for happiness, makarios, relates to a "person who received some form of good fortune, such as money or health." Their word for joy, chairo, was once described by the ancient Greeks as the "culmination of being" and the "good mood of the soul."

Happiness is attached to external situations and events and seems to ebb and flow as those circumstances come and go. Joy seems to be constantly tethered to our hearts by spirit and gratitude. [The Gifts of Imperfection]

The idea is that you can be unhappy but still come at life from a place of joyfulness. From the very start, Jane the Virgin has always been about navigating the relationship between these two concepts. Put in the simplest of terms, Jane the Virgin is a show about how to enjoy having a bad day.

At the start of the first season, Rafael's best friend Roman Zazo dies suddenly: The lights flicker off midway through a party, and when they come back on, Zazo's dead body is seen hanging off an expensive ice sculpture, pierced straight through the chest. It's horrifying. But how does the show handle it? With a flourish of dramatic Latin music and some hilariously flippant on-screen text: "Zaz, impaled!" ("I know!" The narrator exclaims later.) This is dark, the shows says, but can't we also appreciate how ridiculous it is?

When Jane first finds out about her pregnancy, we see her favorite telenovela actor (who later turns out to be her estranged father, because of course he is) jump out of magazine covers and bus advertisements to coach her through breathing exercises. "Inhala, exhala," the imaginary star tells her with an encouraging wink. The playful ludicrousness of it all defuses what could've been a destructive moment for our heroine. This is an awful turn of events, the show says, but can't we work through these tough emotions joyfully?

Joy is not merely searching for the happy note in a sad moment. It's the continued practice of always being on that search. That's exactly how Jane the Virgin deals with darkness — by committing to its trusted lens of charm, laughter, and a lot of light.

After Michael's death, the writers immediately scooted the story forward three years, a smart way to ensure the show doesn't drown trying to portray Jane's immense grief. But that's not to say they don't tackle that pain thoroughly in the episodes that follow. Despite all the time that's passed, Jane still seems to see and seek Michael's ghost everywhere: A drawing of a giraffe in one of her son's books pummels her with memories of the time Michael sculpted her a giraffe out of wood while camping. Her friendship with one of Michael's co-workers stems from her desire to hear new stories about her late husband in an attempt to "keep him alive." At night, she replays a goofy old phone message Michael left on her answering machine years ago, just so she can hear his voice again.

These private moments reveal a lot about Jane's mental state. Despite a life that's clearly moving forward in terms of career and family, to call Jane happy feels like a stretch. When Rafael is pushing her not to give up on her longtime dream of being a writer, Jane appears somber and defeated. "I had a dream," she corrects. Memories of her life with her husband flash before her eyes.

Three years later, Michael is still the center of her universe, and his absence is loud.

Nonetheless, Alba isn't wrong to observe that Jane looks happy. Seeing Jane smiling and discussing the prospect of dating again is a warm signal that hope is far from lost for our young heroine. Her life is active and full — and, if not quite happy, then at least definitively joyful.

Joy is inextricably connected to gratitude, Brown writes in her book, and the show's writers spend the episodes following Michael's death making it abundantly clear that Jane still has much to be grateful for: The sweetest moments of each episode are often Jane's long phone calls and sometimes evening wine with Rafael, her ex-lover-turned-confidante; since her sudden transition to widowhood, he's become a steady rock upon which Jane constantly leans. We also learn that Jane and her once-nemesis of sorts, Petra, have been meeting for brunch every week without fail for the last three years, bonding over being improbable single moms. Even though they often find themselves competing in the day-to-day parenting tasks, a new sense of mutual respect and friendship has clearly blossomed between them. Watching two strong mothers — with big career accomplishments and ambitions — helping each other and pushing each other to be better version of themselves is uniquely satisfying (Jane the Virgin passes the Bechdel test in its sleep), and as a young woman myself, wildly empowering.

And of course, Jane's greatest source of happiness and strength is her beautiful son Mateo. He's quite the challenge, but in a weird way, his behavioral problems feel like a sort of blessing. Trying to raise him right clearly keeps Jane's mind busy. He is something for her to pour herself into, a receptacle for her love and toil.

And Jane is abundantly aware of all the love she has in her life. When her mentor, Professor Donaldson, shows up at her first big reading at a prestigious literature event, Jane drops what she's doing to seek her out and thank her for encouraging her to write the novel that's now taking her career forward. "How long are you going to keep tucking me in?" Jane asks her grandmother with a smile, acknowledging this daily act of tender care. And to Rafael, frequently, in more words or less: "You're kind of my best friend."

That's the meaning of joy: It is the ability, even in gray times, to always register the bright and the beautiful.

For its part, the show brims with its trademark merriness, even when handling something as crushing as Jane's loss: Photos of Michael come to life and talk Jane through her problems in a way that makes her (and us) both laugh and cry. Her novel about her love story with Michael is what finally scores her a deal with a publisher after years of trying and failing. When we see her brainstorming new ideas for the book, it's not a process wrought with tears and painful reminiscing — the cast acts out her artistic explorations in ridiculous early 20th century garb and accents, and it's fun and silly and creative and alive. When seeing Michael's best friend triggers a panic attack for Jane, it's her 3-year-old who fishes her out of the emotional quicksand by telling her to "use your words," adorably mirroring the catchphrase she often tells him when he's acting up.

These warming moments show it's always possible to laugh, even through death. That seems to be the show's overarching lesson: Jane the Virgin takes unquestionably dark themes — murder, abandonment, unwanted pregnancies, and now death — and still somehow manages to be a show that smiles.

"We need to let some light in," Jane's grandmother says while soothing her sobbing granddaughter just two weeks after her husband's passing as she moves toward the window shades. "Just a little." And so they did, the narrator tells us. No line better encapsulates the joy Jane the Virgin has in spades.

We will find the happiness in all this sadness, the show says. And they do.