Designing Resilience