A framework for analyzing, comparing, and diagnosing social-ecological systems