Social-ecological resilience and law