IN “BORGEN”, a Danish television drama, the country’s first female prime minister returns home late each night to domestic bliss. Her stay-at-home husband stacks the dishes and massages her back. The children cheer her televised speeches. But before long her son is seeing a shrink, the neglected hubby is having an affair and our heroine is throwing furniture around her office.

Rarely has there been so much angst about women reaching the top. In the Atlantic magazine last month, Anne-Marie Slaughter, the first female director of policy planning at America’s State Department, declared that women cannot successfully combine a super-demanding job with bringing up young children. (She quit Washington, DC, to return to academia.) This month a British member of Parliament, Louise Mensch, resigned, saying it was too hard to juggle job and family. Yet the news is not all grim. In July Yahoo!, a struggling internet firm, picked a 37-year-old from Google, Marissa Mayer, who is expecting a baby in October, as its new boss.

America’s biggest companies hire women to fill just over half of entry-level professional jobs. But those women fail to advance proportionally: they occupy only 28% of senior managerial posts, 14% of seats on executive committees and just 3% of chief-executive roles, according to McKinsey & Company, a consultancy. The figures are worse still at big European firms, which is perhaps why the governments of Belgium, France, Italy and Norway have set quotas for women on boards. The European Commission is threatening to impose such rules across the EU. It would be better if women could rise naturally to senior executive roles rather than being forced on to boards. But how can this be done when everything tried so far seems to have failed?

Several factors hold women back at work. Too few study science, engineering, computing or maths. Too few push hard for promotion. Some old-fashioned sexism persists, even in hip, liberal industries. But the biggest obstacle (at least in most rich countries) is children. However organised you are, it is hard to combine family responsibilities with the ultra-long working hours and the “anytime, anywhere” culture of senior corporate jobs. A McKinsey study in 2010 found that both women and men agreed: it is tough for women to climb the corporate ladder with teeth clamped around their ankles. Another McKinsey study in 2007 revealed that 54% of the senior women executives surveyed were childless compared with 29% of the men (and a third were single, nearly double the proportion of partnerless men).

Many talented, highly educated women respond by moving into less demanding fields where the hours are more flexible, such as human resources or public relations. Some go part-time or drop out of the workforce entirely. Relatively few stay in the most hard-driving jobs, such as strategy, finance, sales and operations, that provide the best path to the top.

Consider this example. Schumpeter sat down with a mergers-and-acquisitions lawyer who says that, before starting a family, she was prepared to “give blood” to meet deadlines. After the anklebiters appeared, she took a job in corporate strategy at an engineering firm in Paris. She found it infuriating. Her male colleagues wasted time during the day—taking long lunches, gossiping over café au lait—but stayed late every evening. She packed her work into fewer hours, but because she did not put in enough “face time” the firm felt she lacked commitment. She soon quit. Companies that furrow their brows wondering how to stop talented women leaving should pay heed.

Could corporate culture change? In their book “Future Work”, Alison Maitland and Peter Thomson describe how some firms give staff more flexibility. Not just women, but men and generation Y recruits, say the authors, are pushing for a saner working culture. Unilever, a consumer-goods firm, wants 55% of its senior managers to be women by 2015. To that end, it allows employees to work anywhere and for as few hours as they like, so long as they get the job done. Despite being one of the world’s most global firms, it discourages travel. McKinsey lets both female and male consultants work for as little as three days a week for proportionally less pay—and still have a shot at making partner. Sheryl Sandberg, Facebook’s high-profile chief operating officer, says that she has left the office at 5.30pm ever since she started a family in 2005.

Such examples are rare. For most big jobs, there is no avoiding mad hours and lots of travel. Customers do not care about your daughter’s flute recital. Putting women in the C-suite is important for firms, but not as important as making profits; for without profits a company will die. So bosses should try hard to accommodate their employees’ family responsibilities, but only in ways that do not harm the bottom line. Laurence Monnery of Egon Zehnder International, an executive-search firm, reckons that companies should stop penalising people who at some point in their careers have gone part-time.

Better be good

All the flexitime in the world is unlikely to yield equal numbers of men and women in the most demanding jobs. Ms Mayer of Yahoo! is an inspiration to many, but a hard act to follow. She boasts of putting in 90-hour weeks at Google. She believes that “burn-out” is for wimps. She says that she will take two weeks’ maternity leave and work throughout it. If she can turn around the internet’s biggest basket case while dandling a newborn on her knee it will be the greatest triumph for working women since winning the right to wear trousers to the office (which did not happen until 1994 in California). To adapt Malia Obama’s warning to her father on his inauguration, the first pregnant boss of a big, well-known American company had better be good.

Economist.com/blogs/schumpeter