Law firm revenues increase but surging costs drag profits