Closing the gender gap could boost the global economy by at least $1tn annually by 2040.