It's tempting to believe the great writers of children's literature are ageless souls forever in playtime mode, the world's harsher realities kept at bay by a boundless imagination. But the opposite is usually true: Author hardships are what actively informed Peter Pan's fight to stay young, Charlie's negotiating the Chocolate Factory, the wizarding trials of Harry Potter, and plenty of other classics.

Sweden's kid-lit queen Astrid Lindgren, who died in 2002, didn't create self-possessed 9-year-old supergirl Pippi Longstocking simply because a child lifting horses and outsmarting adults sounded nifty (although it does). According to "Becoming Astrid," a revealing early-years biopic from Danish filmmaker Pernille Fischer Christensen, one emotionally turbulent time in Lindgren's young life might have given perseverance and strength to her pint-size protagonists.

We meet Astrid (a wonderfully expressive Alba August) at 16 as a distracted, goofball nuisance in her small town's religious farming community, where her churchwarden father and strict mother run a tight household. Church is boring, a school dance is a performance opportunity for carefree flailing about, and elder hypocrisy is worth pushing back against.

When Astrid's writing lands her an intern position at the local newspaper, she believes she's found an ideal outlet for not just her talents, but transforming into a freethinking, modern woman of the 1920s. Her editor and boss, kind-faced family friend Blomberg (Henrik Rafaelson), a soon-to-be-divorced man with several children, believes in her abilities, too, giving Astrid ample opportunity to write. He's also attracted to her, and while Astrid's response, as depicted here, is consensual, their inevitable affair hardly comes off as romantic or wise.

Getting pregnant at 18 wipes the promise right off Astrid's face. The era's conventions and patriarchal Swedish law dictate a limited range of options that tie her to Blomberg — who wants to marry her but needs to hide the out-of-wedlock child from his spouse — and require giving birth inside more liberal-minded Denmark. Astrid wants nothing more than to raise Lars, whom she places with a Danish caretaker (Trine Dyrholm) specializing in the left-behind children of teenage Swedish mothers. Yet being stuck in Stockholm making a meager living as a secretary, saving for trips to Copenhagen to see her son, and dealing with her family's shame test every ounce of resolve she has.

Christensen saves Astrid's talent for storytelling for when it counts, in a crucial scene at the end that suggests this special power as a precious, bonding, life-affirming thing.

Up till then, under the claustrophobic framing of Erik Molberg Hansen's cinematography and the mostly melodrama-free direction, Astrid's hardship of thwarted ambition and disrupted motherhood is presented as both what makes a writer, and what could easily unmake one, too. The film's occasional flatness of tone isn't always well used — sometimes you want to see filmmaking, not a camera pointed in the general direction of who's talking.

Yet as "Becoming Astrid" wends its way, it's also sometimes a sly biopic dare — not just, can you see the looming legend in a single unwed mother scraping by? But also, would you have thought to look?