There’s a quote scribbled on a chalkboard wall in the legal offices of the Menlo Park, Calif., headquarters of Facebook: “If you have a good tool, build a shed over it.” It’s signed “Ron H, circa 2013,” and whoever Ron is, he’s got a point. From the time the world’s most famous social network was launched in CEO Mark Zuckerberg’s Harvard dorm room in February 2004, Facebook—which boasts some 1.2 billion monthly active users—has dominated headlines and mindshare. But it’s easy to forget that the shed that Facebook Inc. has built over its social networking tool—its high-powered in-house legal team—is pretty formidable, too.

The law department has grown over the company’s first decade to approximately 90 in-house professionals in the United States and around 10 abroad, still lean for a company with a user base bigger than the population of all but two countries on earth. Its lawyers have to deal with the huge variety of legal issues that come from operating in the digital sphere, which is often short on law and precedent, and long on gray areas.