OAKLAND, Calif. (AP) — Meta agreed Wednesday to pay up to $18 billion and add stronger child-safety measures to its Facebook and Instagram platforms as part of a landmark legal settlement that ended a trial over teen social media addiction and settled claims filed by nearly every state.The settlement resolved a pivotal case years in the making that sought to hold the tech giant accountable for the role its platforms played in undermining children’s mental health. The effort targeted features designed to hook young people’s attention.The agreement “institutes real change, real transparency, real protections for children and teens across the country,” California Attorney General Rob Bonta said.If approved by the court, the deal will stop an avalanche of litigation by states against Meta, although the company still faces lawsuits from individuals and school districts throughout the U.S. For the states, the settlement delivers money for mental-health programs for kids, including after-school or summer activities and digital literacy counselors.

Advocates cheered the new protections, including default time limits and the disabling of features such as “like” counts.But “we cannot truly protect all children and teens until these protections are required on every platform and are permanent — that’s something only Congress can do,” said Sacha Haworth, executive director of The Tech Oversight Project.