Learning from social–ecological crisis for legal resilience building: multi-scale dynamics in the coffee rust epidemic

A recent coffee leaf rust epidemic has generated a severe fall in Coffea arabica production throughout Mexico and Central America. This paper analyzes the social–ecological crisis presented by the Hemileia vastatrix outbreak, with a focus on how global, regional and national dynamics interact with local processes in the Chiapas Sierra Madre of south-eastern Mexico, a biodiversity hotspot with a tradition of smallholder, shade-grown coffee production. We explore the hypothesis that the current coffee rust epidemic is an expression of global environmental change, with implications for legal frameworks and international efforts towards risk management and climate change adaptation. Addressing debates on legal resilience building, we illustrate how mismatches of scale between social–ecological phenomena and legal and institutional arrangements may generate pathological solutions for small-scale coffee producers and shade-grown coffee ecosystems. Thereafter, using the analytical lens of modularity, the paper sheds light on landscape stewardship to reduce the risks of non-resilient characteristics such as isolation, on the one hand, and on the other, over-connectedness of habitat patches in the landscape of importance for ecosystem functions at larger scales. The interdisciplinary framework leads to recognizing the role of institutions and legal arrangements which are not limited to national boundaries in proposing solutions to this social–ecological crisis. We find that matching scales of law with agroforestry systems can be done through a variety of legal and policy instruments to contribute to resilience building. This matching of scales is vital to safeguarding biodiversity’s global benefits and the right of small-scale coffee farmers to a healthy and sustainable environment.


Introduction
Smallholder agrobiodiversity plays a crucial role in addressing the challenges presented by global environmental change (FAO 2019; Altieri and Nicholls 2017;Lowder et al. 2016). Understood as the contributions of agriculture to the variety and variability of living organisms, along with the biodiversity that sustains agricultural activity (Montenegro de Wit 2016), agrobiodiversity can contribute to risk reduction and climate change mitigation and adaptation (Sistla et al. 2016;Bioversity International 2017). An emphasis on agrobiodiversity and suitable associated financing mechanisms has recently come to the forefront of international debates on sustainability and resilience, recognized by international environmental agreements such as the Convention for Biological Diversity (CBD) (Hodgkin et al. 2015).
One of the most emblematic agroforestry systems is shade-grown coffee, sustaining livelihoods of millions of smallholders in Latin America by producing a quality beverage for which global demand continues to increase (Haggar et al. 2015;Valencia et al. 2016). Coffee production has recently come under risk due to a fungal epidemic which has generated severe losses in Coffea arabica L. bean production (Avelino et al. 2015). The unrelenting coffee leaf rust epidemic (caused by Hemileia vastatrix Berkeley & Broome) is linked to a regional social-ecological crisis, with Arabica production losses between 2012 and 2015 ranging from 10 to 55% with regards to pre-rust levels in Central America (Cerda et al. 2017). This epidemic is thought to have begun with outbreaks in Colombia in 2008, then spreading through Central America and the Caribbean since 2010, with severe infections in southern Mexico as of 2012, and a surge in Andean coffee plantations as of 2014 (McCook and Vandermeer 2015). Results from the 2016/2017 cycle illustrate the ongoing impacts of this crisis: "coffee rust continues to hamper output" in Central America and Mexico, which account for over 15% of the world's Arabica production (USDA 2016). Despite an increase in coffee production in the region as of 2015/2016, the coffee crisis has deepened since 2017/2018 in light of historically low prices on the international market: in September 2018 coffee prices were the lowest in 12 years (ICO 2018).
The first Mexican coffee region to report the impacts of this rust epidemic is the Chiapas Sierra Madre, a mountainous area reputed for its biodiversity, where shade-grown coffee contributes to ecological conservation in the buffer zones of Biosphere Reserves and protected areas (Cortina-Villar et al. 2012;Valencia et al. 2018). In stark contrast to the consequences of the epidemic, limited research has sought to address this issue, challenging the coffee sector to focus on research and development (McCook and Vandermeer 2015). Increased vulnerability to pests and diseases has been identified by the IPCC Fifth Assessment Report on climate change as the main future risk for agriculture (IPCC 2014).
The coffee rust has historically transformed landscapes and economies. Attempts to find responses to this epidemic led to drastic changes in coffee production systems. At the turn of the twentieth century, the rust epidemic contributed to the decline of Arabica coffee cultivation in Africa, Asia and the Pacific (McCook 2006;Waller 1982). The demise of C. arabica coffee plantations initiated an ongoing quest for coffee plants which express resistance to the rust, eventually leading to the use of Coffea canephora P., a coffee species which is cultivated under limited shade (McCook 2013). Promoted as a solution to coffee rust, C. canephora's most widely known variety, Robusta, has transformed the structure of global coffee production and consumption (McCook 2013), representing in 2018 a share of 38.2% of global coffee production (ICO 2018).
The agroforestry system of Arabica grown under tree-cover for shade is considered under threat, having lost 20% of its global surface area since 1996 (Jha et al. 2014). In a quest to increase productivity, public and private actors have promoted production intensification and shade management, with recommendations for coffee fields to have lower tree-cover density (Perfecto et al. 1996). Although the effects of shade on coffee rust are complicated and antagonistic-for example, more shade limits wind circulation, thus restricting spore dissemination (Boudrot et al. 2016;López-Bravo et al. 2012), yet shade can also function as a temperature buffer, maintaining ideal conditions for fungal reproduction by limiting high and low temperature peaks (López-Bravo et al. 2012)-producers in the Chiapas Sierra Madre mention that government institutes, coffee companies, and technicians recommended they reduce shade cover to address this fungal epidemic. This has led to the transformation of coffee systems from dense shade towards less shade (i.e. forest degradation) as well as land-use change of forests to agricultural fields in light of losses from the main income-generating crop (i.e. deforestation due to the expansion of the agricultural frontier) (Valencia et al. 2018;Covaleda et al. 2014;Libert-Amico et al. 2016).
Through a case study on multilevel dynamics involved in the social-ecological crisis caused by the coffee rust disease in the Chiapas Sierra Madre, we seek to contribute to ongoing debates on legal resilience building, sustainability and transformations (see Ebbesson and Hey 2013;Tidball et al. 2017). We build on discussions on the law and resilience nexus to analyse the coffee rust epidemic and its impact on local livelihoods and diverse agroforestry systems (Humby 2014;Hill Clarvis et al. 2014). The recent coffee rust epidemic stands to illustrate how social-ecological crisis links the local to the global in dynamic legal processes. Significant challenges remain to establish cross-scale (local, national and international) institutional arrangements to support sustainable forms of agricultural production which safeguard biodiversity while maintaining livelihoods (De Beenhouwer et al. 2013). The epidemic represents a setback to the fulfillment of international commitments in light of global environmental change. These include the CBD Aichi Biodiversity Targets, which discuss enhancing biodiversity and ecosystems services through sustainable management of agricultural areas while recognising the role of agricultural biodiversity in addressing pests and diseases (c.f. Targets 7, 13 and 14). We present interdisciplinary research on a social-ecological crisis focusing on (1) analyzing the effects of the coffee rust disease in a bioculturally rich but economically marginalized area of south-eastern Mexico, and (2) discussing the nexus between law, resilience and landscape management.

Methodology
The data collected for our research includes a combination of primary and secondary written sources, interviews, field trips, and participant observation in national and subnational coffee agroforestry related meetings in Mexico.
Most of the field data for this study were collected through 2013 to 2016. Fieldwork included 102 semi-structured interviews with farmers, technicians and coffee cooperative managers, government authorities from the municipal, state, and federal levels, and NGO representatives which sought to construct landscape ethnographies focused on land-use decision-making (Saito-Jensen 2015; Trench et al. 2018). The interviewees were identified through snowball sampling. The interviews were conducted in Spanish (quotes included in this paper have been translated to English by the authors) and then coded using qualitative data analysis software NVivo 11. Interviews were carried out in the context of a research-action campaign which has included capacity development, planning meetings, participant observation, and sampling sites in the field, which began in 2013 and continues in 2018.
Secondary sources of information are used to identify matches and mismatches in legal frameworks and institutional arrangements. Whilst an exhaustive review of this transnational epidemic and the applicable legal and policy instruments is beyond the scope of this paper, the case study methodology allows insight into issues of power and equity in the sustainability and resilience interface (Temper et al. 2018). Our case study methodology and composite of methods serves to examine moments of crisis to understand processes that transgress scales of geographical space and time pre-defined in laws and formal institutional arrangements. The study region-biodiversity-rich yet economically poor, with weak institutions and governance structures-proves a different context than most case studies on law and resilience building. Contextual equity dimensions that arise in developing economies also have their own specificities such as the recognition and implementation of forest-dependent people's rights concerning land and forest resources (McDermott et al. 2013;Ituarte-Lima et al. 2014).
The geographic focus of the study is the Chiapas Sierra Madre, a mountain chain in south-eastern Mexico. We chose to focus our study in this area because of its social-ecological characteristics and the national and global dynamics affecting this region. In this biodiversity hotspot, remnants of cloud forests and tropical wet forests are connected by agroecosystems within and around protected areas (Fig. 1). 1 With a history of almost two centuries of coffee production, the Sierra Madre provides more than half of the total coffee production of Chiapas, a state known as the national leader in organic and shade-grown coffee production (SAGARPA 2017).

Legal resilience building for agroforestry diverse systems
The theoretical framework used in this paper is twofold. First, in exploring the interconnections between local, regional and global dynamics in coffee production, literature on law and resilience serves to frame the discussion on scales and concomitant insights on matches and mismatches of law and formal institutions with social-ecological resilience. Second, we discuss the concept of modularity, understood as the spatial configuration of habitat patches in the landscape which may range from low modularity, where there is high connectivity throughout the system, to high modularity, where there are many small isolated patches and low connectivity throughout the system. The degree of connectivity in the landscape may be associated with the general resilience of the system (sensu Carpenter et al. 2001), in that high connectivity results in high vulnerability to disturbances caused by disease or forest fire, while low connectivity reduces the risk of these disturbances but may increase the risk of local extinction and influencing other functions in the system (see Webb and Bodin 2008). This has led to the hypothesis that intermediate levels of modularity may represent configurations that reduce vulnerabilities to disturbances, while at the same time reducing risks of local extinction, thus representing a system with more general resilience. We argue that the concept is useful as a background to elucidate the type and range of institutions needed to consolidate resilient agroforestry systems that support local livelihoods.

Law and resilience in the Anthropocene
The literature on the nexus between law and resilience building in the context of the Anthropocene provides a suitable analytical framework for exploring the interconnections between local, regional and global dynamics in coffee production. As an agricultural commodity, most often produced by small-scale farming families who depend on this cash-crop to insure their food security, the volatility of coffee prices has direct impacts on local livelihoods. Falls in international prices impact not only family well-being and food security (Babin 2015;Bathfield et al. 2013), but also regional social-political dynamics such as migration or conflict (see Bacon et al. 2017). New forms of speculation around commodity markets (such as futures contracts) have 1 3 been pointed out as a source of instability in the volatile international coffee market (Galaz et al. 2015).
The concept of the Anthropocene argues that humans have become a main driving force in the Earth system, to the degree that the changes we are provoking will remain in the geological record (Steffen et al. 2011). Beyond geology, the Anthropocene is a conceptual framework which illustrates how the planetary system is inter-connected and at risk considering uncertain consequences of global environmental change Raworth 2012). Authors have called for the need for legal and institutional transformations for addressing humanity's pressing challenges in an adaptive and fair manner (Kim and Bosselmann 2013;Ruhl 2011;Friedrich 2011). Some consider that current environmental law lacks flexibility for managing resilience (Garmestani et al. 2014). Largely static legal systems that are based on a worldview of predictability and linearity may prove poorly suited for non-linear social-ecological dynamics, particularly in the context of abrupt changes and unforeseen consequences.
Social-ecological crisis tend to challenge current thinking on the scales of law by demonstrating cross-scale interactions with "complex connections and cascades" which undermine initiatives towards sustainability (Ebbesson and Folke 2014: 266). Scales of space and time serve to analyze matches and mismatches of law, institutions, and policy in relation to scales of ecological processes. Legal concepts and political jurisdictions are not always in line with the unclear boundaries of social-ecological systems, in a mismatch which can undermine system resilience (Ebbesson and Folke 2014) and the enjoyment of the human right to a healthy and sustainable environment (Knox and Boyd 2018). Arguing that law can stimulate multilevel adaptive governance and promote sustainability, Ebbesson and Folke (2014) introduce the concept of "legal resilience building", which calls for rethinking scales of law to better match those of social-ecological contexts.
Like many social processes, nature does not recognize borders drawn up on paper, as illustrated in cases of international watersheds, epidemics, droughts or flooding. Nation-states most often do not correspond to the scale of social-ecological contexts, thus the need for new forms of collaboration beyond state-centred structures of regulation (Schultz et al. 2015;Perez and Snir 2008).
Similarly, a moment of crisis implies consequences in the short, mid, and long term. Considering the uncertainty of dynamic risks, the temporal dimension implies unforeseen consequences . The sense of urgency may lead actors to seek immediate responses, often favouring short-term interventions in response to public pressure. Such a focus on immediate ecosystem stabilization can produce less resilient ecosystems which are more vulnerable to shocks (Gunderson and Holling 2002). Carpenter et al. (2015) call this the "pathology of short-term thinking", proposing in contrast adaptive approaches that allow for natural variability in social-ecological systems.
Beyond the elements of space and time that science tends to focus on (Cumming 2013), an additional scale of analysis that we refer to in this article is the scale of power dynamics. Power and conflict are at the core of social-environmental change, but existing research and knowledge structures are ill-equipped to address them (see Temper et al. 2018). Olsson et al. (2014) recognize that power issues have been understudied by resilience studies, and propose a focus on scale, particularly the interplay between biophysical and social scales (see Veervoort et al. 2012).

Modularity, resilience and sustainability
Human activities have transformed between a third and a half of the planet's land surface (Crutzen 2002;Zalasiewicz et al. 2015), while at the same time generating a drastic loss of ecosystem services and biodiversity (MA 2005). Haddad et al. (2015) estimate that 70% of remaining forest in the world is within one kilometre of the forest's edge, subject to the degrading effects of fragmentation. To maintain habitats for biodiversity despite ecosystem fragmentation, the biological connectivity between patches of ecosystems has become a crucial topic in ecologist thinking (Watson et al. 2014). The degree of fragmentation of habitats in the landscape has become an important area of research: since almost all terrestrial ecosystems are fragmented nowadays, the areas between fragments determine the degree to which organisms may migrate from one fragment to the other, and thus reduce risks of local extinction ). Areas between fragments include agroecosystems, which need to be integrated into large-scale landscape and biodiversity management efforts. With ecosystem fragmentation as a new challenge in the Anthropocene, an innovative focus lies in the spatial representation of social-ecological systems based on the degree of modularity both in the ecological system and in the social system, and how they match or mismatch with spatial and temporal scales.
At one end of an analytical spectrum, landscapes with low modularity may be represented by monocultures with a reduced number of species which are over-connected amongst themselves. These social-ecological systems have low general resilience since, due to over-connectedness and low biodiversity, there is a high vulnerability to potential disturbance such as disease and forest fires. For example, biodiversity loss can lead to limited biological pest control (see Ratnadass et al. 2012;Macfadyen et al. 2011;Vandermeer and Perfecto 2012). Low modularity social-ecological systems are still promoted through institutes implementing the ideas of the Green Revolution and agricultural intensification which focus on enhancing yields in monocultures such as grazing pastures or agro-industrial inputs such as oil palm plantations (see DeLonge et al. 2016;Rockström et al. 2016) (see Fig. 2).
On the other extreme of this spectrum, landscapes with high modularity consist of small and often very isolated habitat patches of biodiversity. This landscape is characterized by low connectivity amongst species (isolation) in which high risks of local extinction may translate in low general resilience to important large-scale ecosystem functions. Examples of such a landscape may be represented by areas with many small protected areas and reserves, representing isolated islands of conservation in an ocean of intensive land use (Fig. 2).
In the middle of these two extremes in Fig. 2 lies a landscape with intermediate modularity, where connectivity and diversity provide sources of resilience (e.g. a poly-structured agroforestry system). Whereas institutions exist to foment high modularity (e.g. national protected areas commission) and low modularity (e.g. agricultural departments and agroindustry) landscapes, agroforestry systems-an important example of intermediate modularity based on smallholders' agrobiodiversity-have failed to receive support from institutional and legal arrangements (see Philpott and Dietsch 2003). However, it has been argued that customary law and practice can imply an implicit recognition of the value of flexible management systems (see Lauer 2016; Unruh and Abdul-Jalil 2012).

Results and discussion
The coffee rust epidemic: intertwined local, regional and global social-ecological dynamics In the Chiapas Sierra Madre, financial investments in coffee plantations tend to be minimal, fluctuating with the international price of this commodity. Falls in coffee prices lead to reduced profitability and thus limited investment in coffee ecosystem health (Taugourdeau et al. 2014), which in turn may increase plantation vulnerability to pests and diseases.
Coffee production also serves to reveal concrete risks of global processes (specifically climate change) to farmers and their environment, as expressed in the change in suitability for certain production systems due to a change in environmental conditions and an increased vulnerability to pests and diseases (IPCC 2014; The Climate Institute 2016). Increasing temperatures and changing rainfall patterns are foreseen to considerably reduce suitable areas for coffee production (see Ovalle-Rivera et al. 2015). Bunn et al. (2015) estimate that zones with climates better suited for C. arabica will migrate upwards by approximately 500 m in elevation by the 2050 s. This up-slope migration poses threats to forest ecosystems, as in the case of our study region, where higher altitudes lie within biosphere reserves where agricultural activities are restricted (Schroth et al. 2009).
Known to Western science since 1869, when an epidemic wiped out the coffee plantations of the island of Ceylon Although further research is needed to verify this hypothesis, recent discussions with farmers and scientists put forth the idea that the current rust epidemic may be linked to climate change. The association between the current epidemic and global environmental change is an ongoing debate. Whilst Bebber et al. (2016)  support the climate change hypothesis in the same epidemic by concluding that climatic conditions were at the source of the outbreak, and not the genetic evolution of the pathogen. At the same time, other authors argue that local epidemics throughout the region are connected to meteorological conditions which correspond to future climate change scenarios (see Avelino et al. 2015).
It is expected that this hypothesis, if proved, would have deep implications for international debates on climate change, spreading the responsibility of the current crisis beyond producers, and hypothetically mobilizing additional institutions and funds in favour of sustainable solutions. There are four main indicators which support the hypothesis on climate change's role in the current rust epidemic: (1) continuity, (2) coverage, (3) behaviour, and (4) (Avelino et al. 2015). In association with the Central American and Colombian epidemics, climate data reported a reduced diurnal temperature range, which can lead to a shortened latency period for the disease (Avelino et al. 2015). Furthermore, early rainfall may have induced the offset of an early coffee rust epidemic, whilst a decrease in rainfall during the rainy season can promote the conservation of uredospores (ibid.). These conditions are in line with the future climate change scenarios for the region.
However, it is yet too early to confirm the hypothesis of a correlation between climate change and the recent coffee rust epidemic. Further research is needed to identify this and other emergent challenges presented by climate change to farmers.
As in the case of any epidemic, several factors intervene, in what has been termed the disease tetrahedron: from the pathogen to the host's attributes, from the context to the interventions (Zadoks and Schein 1979). Beyond the hypothesis of the coffee rust as an expression of the risks that climate change holds for family agriculture, the current rust epidemic in Latin America represents a case of social-ecological crisis in the interconnected world of the Anthropocene. A conjunction of meteorological (reduced diurnal temperature range and erratic precipitation) and economic factors seem to be the main drivers of the epidemic. However, recent studies have pointed to additional factors such as the role of ecological determinants, including the lack of biological control by natural enemies Avelino et al. 2011) or landscape changes in vegetation structure derived from coffee production intensification (Vandermeer and Rohani 2014;Vandermeer and Perfecto 2012). Structural problems, such as susceptible C. arabica cultivars, elderly plantations, and limited access to credit and inputs, have certainly contributed to the vulnerability at hand. This crisis has prevailed in a context in which public institutions set up in the Cold War era to support coffee production have been dismantled, whilst the private sector has been slow to dedicate resources to research and development-mainly responding to decreases in supply of Arabica coffee by increasing purchases of Robusta beans (McCook and Vandermeer 2015).

Scale mismatches: scales of geographical space, time and power
In this section, we analyse how existing laws and institutional arrangements affect social-ecological resilience, as expressed in the capacity of producers to respond to the social-ecological crisis derived from the current coffee rust epidemic. We focus on the matches and mismatches between social-ecological systems affected by the rust epidemic and legal frameworks, emphasizing the effects of these dynamics on smallholder families which depend on agroforestry. We categorise the scale mismatches in terms of geographical space, time and power.
Although there are many coffee management systems (Toledo and Moguel 2012), smallholder coffee producers in the Chiapas Sierra Madre have been managing biodiverse social-ecological systems for decades. Their shadegrown organic Arabica coffee within or near protected areas employs diverse endemic species as tree-cover and often contemplates voluntary sustainability standards (certifications such as fair trade, organic, bird-friendly, and smallscale producer). Coffee cooperatives in the region have a strong environmental identity, while at the same time offering indirect benefits to their members such as access to credit, health and education services, and alternative sources of employment (Jaffee 2014).
The rust epidemic places these agro-biodiverse social-ecological systems at risk, as the president of the Triunfo Verde coffee cooperative puts it: "We face a serious problem, since the survival of our organization and of ourselves as coffee producers has been put at risk by the coffee rust epidemic. Now we need to find ways to cohabit with this new disease, which is here to stay." 2 In discussing geographical scales, the recent coffee rust epidemic has transgressed the boundaries of legal and political-administrative units, jumping from Colombia to Central America to the Caribbean to Mexico (Table 1). At the same time, certain coffee producing regions have been affected more than others, in what has been associated with changes in the behavior of the rust: in some regions higher altitudes have been severely affected, whereas coffee plantations at lower altitudes have behaved inconsistently throughout the epidemic (see Avelino et al. 2015). The differences on the subnational level in Mexico have led to tensions between different levels of government with co-existing federal, state and municipal regulations.
With regards to time scales, the rust epidemic in southern Mexico defied accumulated scientific and empirical knowledge on what is considered the normal behaviour of this fungus (McCook and Vandermeer 2015). The fungus appeared earlier on in the year, potentially due to early rainfall patterns and caused more primary damage (damage in the same cycle) than previously documented (Cerda et al. 2017); and it has expressed a constant affectation in the Chiapas Sierra Madre over four harvesting cycles, from 2012/2013 to 2015/2016 (see Vandermeer et al. 2015;Avelino et al. 2015).
As for the power scale, the Mexican state of Chiapas, home to an indigenous armed uprising in 1994, continues to be a strident example of resource-rich regions stricken by poverty (Aguilar Ortega 2016). Global leader in organic coffee production, Chiapas produces high-quality Arabica beans sold to Europe, the USA and Japan through fair-trade and speciality market niches, yet the local population continues to face low levels of human development and difficulties Table 1 Results on mismatches in the coffee-rust social-ecological crisis Source: own elaboration

Scale
Results on mismatches Space Case study shows misfit of current law and policy to effectively address the geographical coverage of the "Big Rust" and associated global dynamics such as climate change that go beyond national borders Regional differences in the impact of the coffee rust epidemic have led to tensions among subnational jurisdictions and in between subnational and national governments Time Policies on coffee monoculture emphasizing productivity over livelihoods risk to generate future costs, while contradicting longerterm nature-based solutions of organic coffee standards Power Transnational public institutions supportive of small-scale coffee producers dismantled in the 1980s contrast with current publicprivate partnerships favoring less or no-shade coffee production Modularity Policies supporting islands of conservation (high modularity) and coffee monocultures without shade (low modularity) misfit smallscale farmers production of coffee production under shade in biodiversity rich areas (middle modularity) affected by rust in the Chiapas Sierra Madre in accessing quality basic services, with 77.1% of the state's population living in poverty in 2016 (CONEVAL 2016).

Implications of mismatches of scale in the coffee rust social-ecological crisis
The increasing literature in the field argues that mismatches between the scales of ecological processes and the institutions that are responsible for managing them lead to a decrease in social-ecological resilience, an increased likelihood of natural resources mismanagement and an attendant decrease in human well-being (Cumming et al. 2006). To analyze these mismatches in the case of the coffee rust social-ecological crisis, we build on Garmestani et al. (2014: 5) who argue that the maladaptive nature of law can "allow, facilitate or even mandate pathological choices and behaviors with respect to ecosystems". With regards to allowing this epidemic to develop, it is important to put this coffee rust outbreak in a historical perspective (see Table 2). McCook and Vandermeer (2015) illustrate how during the "developmentalist phase" from 1960 to 1990, national governments and international organizations developed a network of national, regional and international coffee research institutes which played a vital role in managing the coffee rust. From 1962 to 1989, the global coffee trade was governed by the International Coffee Agreement (ICA), which assured high prices and contributed to market stability (Johnson 2010). During this period, coffee farmers in Mexico relied on the support the Mexican Coffee Institute (INMECAFE), which took charge of every aspect of the coffee production chain, with vast technical assistance packages. However, INMECAFE was dismantled in 1988 as part of the structural adjustment program approved with a World Bank loan to Mexico (Renard 2010). In this sense, McCook & Vandermeer call the present rust outbreak "a neoliberal epidemic", shaped by changes in the structural conditions of coffee cultivation "which in turn shape how well individual farmers and research institutions have been able to manage the rust" (2015: 1167; see Renard and Larroa 2017).
In line with the dismantling of government institutes which attended to the coffee sector, previous calls warning of the vulnerability of Chiapas coffee landscapes fell on deaf ears in the government and the industry. Producers' organizations, NGOs and even the Chiapas state government published reports on climate change and adaptation plans in 2011, just months before the first rust outbreak, warning that coffee plantations were too old, and investment in crop management too poor, to withstand an extreme event (Conservation International-Mexico 2011; Chiapas State Government 2011). These reports-which fail to mention the coffee rust-called for public investment in an adaptation plan considering future climate scenarios in the region (see Libert and Paz 2018;Schroth et al. 2009).
Institutional arrangements have indirectly facilitated the spread of the rust disease by denying its existence from the offset (see Table 2). Coffee smallholders argue there has been a political manipulation of this crisis: "The Chiapas government did not want to recognize the crisis in 2012 because it was an election year. If they had seen the problem as it is since the beginning, we would not be where we are now". 3 The Chiapas state government which entered office at the end of 2012 has since recognized the severity of the issue; however, the federal agriculture ministry (SAGARPA) continues to deny the existence of an epidemic. Interviewed in mid-2015 in Mexico City, SAGARPA officials argued that there is no such epidemic and that it is only 10% of producers which have been affected. In the opinion of one SAGARPA representative: "When it comes to coffee rust, honestly, I believe that there's been a lot of manipulation of the issue. Coffee rust has always existed, and there were practices to control its dispersion. Producers have told me directly that they recognize that those practices have been abandoned over the years. Coffee rust is due to the lack of attention paid to plantations Table 2 Implications of mismatches in the coffee rust social-ecological crisis Source: own elaboration Types of mismatches Implications of mismatches in the coffee-rust crisis

Allow
Despite official recognition of the need for climate adaptation measures for coffee production, lack of timely governmental measures to address smallholder vulnerability Facilitate Federal agriculture ministry denial of the rust epidemic and of associated increase in the fungus aggression prevents from declaring a phytosanitary emergency Mandate Federal government, private institutes and companies actively promote (e.g. through credit schemes) coffee varieties with the recommendation of felling tree cover in coffee fields, leading to deforestation and forest degradation Small-scale producers of shade-grown coffee lose costly organic certification due to lack of transparency on products distributed by the Chiapas State in response to the rust 1 3 and elderly trees. Now producers are taking advantage of an outbreak to request more money". 4 Contrary to the position of most Central American governments, who declared phytosanitary emergencies in light of the epidemic, Mexico's stance has been strongly criticized by producers. According to one representative of a national coffee producers' organization (Coordinadora Nacional de Organizaciones Cafetaleras-CNOC), the government's arguments for refusing to declare a state of emergency are "bureaucratic and almost absurd, since they assert that rust has been present in the country for decades; they refuse to recognize that the fungus is more aggressive" (Pérez 2015;personal translation). State congresses in coffee producing regions have reiteratively requested that the phytosanitary alert be declared, however, with no results beyond an apparent political backlash upon proponents. 5 This misfit between social reality and political discourse has proved yet another barrier in responding to this crisis.
With regards to mandating pathological choices, the Chiapas state government was quick to promote the chemical control of coffee rust, distributing in 2013 the fungicide "DR-43" and the foliar fertilizer "Aitia". Although these products were promoted as being organic, and their label claimed to be "100% natural", these liquids are not recognized by organic certification entities (La Jornada 2013). This led to some producers losing their organic certification, a costly standard to which producers will not be able to return until after repeating the three-year certification process. Producers' organizations later denounced these products as a fraud, ineffective and lacking transparency with regards to its actual ingredients 6 (see Table 2).
In response to ongoing losses in coffee productivity in Mexico, government and private institutes have promoted, on the one hand, transferring to C. canephora Robusta coffee plantations, and, on the other, renewing coffee plantations with rust-resistant C. arabica cultivars. These strategies imply changes to forest structure and ecosystems since many of these coffee varieties are grown with less or no tree-cover for shade (see Valencia et al. 2018). Local stakeholders and environmentalist organizations have identified this strategy as a driver of deforestation and forest degradation (Covaleda et al. 2014;Libert Amico 2017).
The conversion from Arabica to Robusta, albeit less publicized, has been widely promoted by public-private partnerships between the federal agricultural ministry, universities and private companies. Although most promotion has been under the 800 masl level, communities of the Pacific slope of the Sierra Madre have recently transferred to Robusta, facilitated by credit schemes offered by coffee companies which include plant distribution and agricultural inputs.
Coffee rust has proven an important motor for breeding new rust-resistant coffee varieties (van der Vossen et al. 2015). Coffee research institutes sought to produce a variety which would combine the quality of Arabica coffee with the rust-resistance of Robusta, based on breeding a spontaneous hybrid of between these two from the island of Timor-Leste (McCook and Vandermeer 2015). A mix between the "Caturra" variety of Arabica coffee and a Timor hybrid led to the creation of the "Catimor" family in the 1970s, which continues to be bred to this day, generating smaller trees which are more productive and promoted as rust-resistant (despite recent proof of rust genetic evolution). Aside from Catimor varieties such as Colombia, Castillo, Lempira, Oro Azteca or Costa Rica-95, other rust-resistant varieties developed include the Sarchimor family (Marsellesa, IAPAR 59, Obata Rojo). These varieties have been shunned upon by producers and consumers for reputedly having low cup quality (Escamilla Prado et al. 2015;World Coffee Research 2018), although there have been cases of high-quality coffee beans from these varieties produced in particular conditions which are not necessarily representative of the working conditions of most coffee producers in the region. Other issues which emerge with coffee varieties from the Catimor and Sarchimor groups include susceptibility to other diseases (such as the fungus Mycena citricolor), high requirements in nutrients, and limited coffee bean storage times (see Huang et al. 2014;Avelino et al. 2015;World Coffee Research 2018).
Although there is a considerable diversity of coffee varieties, and breeding programs have seen significant progress in identifying high-quality varieties compatible with limited inputs and with agroforestry systems, the variety most favoured by public and private coffee renovation programs in the Chiapas Sierra Madre in the first years after the epidemic was Costa Rica-95. This C. arabica variety is a dwarf Catimor with low-quality potential at high altitude which is susceptible to diseases such as the American Leaf Spot Disease (caused by Mycena citricolor) when planted in high altitude and under dense shade cover (World Coffee Research 2018). Technical assistance accompanying the distribution of these plants recommends producers fell shade trees: "the agronomists [that gave us the rust-resistant plants] have recommended that we monitor the plantation, because these plants are free from rust, but susceptible to [Mycena citricolor]; that is why you have to leave it exposed to the sun". 7 At the same time, portions of the secondary forest are reportedly being opened to establish new agricultural fields due to coffee losses (Covaleda et al. 2014). This land-use change, which has occurred only in the past years and is yet poorly documented and underrepresented in models of regional environmental change, implies a negative impact on biodiversity. Agricultural biodiversity is crucial in addressing pests and diseases. Abundance of insects and natural predators is low in sun coffee plantations, and the lack of shade trees and food limits the abundance of migratory birds and bats (Perfecto et al. 1996;Lindgren et al. 2018). In this sense, the current coffee rust epidemic presents itself as a setback to the fulfillment of the Aichi Biodiversity Targets, which discuss enhancing biodiversity and ecosystem services through sustainable management of agricultural areas (c. f. Targets 7, 13 and 14). The impacts to biodiversity, soil conservation, and disaster risk reduction are expected to be foreseen in the near future, in this potential policy trap in the long term which exemplifies of "the pathology of short-term thinking" (Carpenter et al. 2015;Nair and Howlett 2016).
Since the change in complex systems often results in time delays between stress and impact , the current promotion of certain rust-resistant varieties proves an example of mandating pathological choices based on mismatches in scales of time. As put by a representative of the coffee cooperative CESMACH: "Towards the future, we expect this will mark many changes. Many of the new varieties which are promoted as rust-resistant are sun varieties which require less shade. They also produce lower quality beans. Diminishing shade implies diminishing biodiversity.
[…] Those varieties which produce higher quality beans are better adapted to our production of organic, quality coffee. We need to find solutions because producers are desperate". 8 These mismatches (Table 2) have magnified the consequences of the crisis. Fragmented institutions have led to fragmented responses, in a social context marked by tension and mistrust between society and government. Institutions are promoting contradictory goals, mandating partial responses with preoccupying impacts in the mid-term and long term.

Legal resilience building and modularity
Coffee agroecosystems follow a bimodal distribution of shade versus sun coffee, the latter being favoured by recent economic and environmental trends (Vandermeer and Perfecto 2012;Toledo and Moguel 2012). Bimodality is also expressed in describing coffee producers. On the one hand, family small-scale agriculture is argued to be more productive, energy efficient, and ecologically sustainable (Altieri et al. 2015). On the other hand, industrial agriculture, though less ecologically sustainable, is considered more efficient and profitable (see Rockström et al. 2016). The case of the coffee rust in the Chiapas Sierra Madre potentially illustrates a tipping point that can generate rapid changes in the syndromes of production in the affected region, with impacts on ecosystem sustainability and agrobiodiversity.
The lens of modularity can bring new light for matching scales of law with agroforestry systems affected by the rust disease. Disease resistance lies more in building a resilient landscape rather than breeding resistant crop genes, which is an incomplete response considering disease evolution in the context of climate change (see Barzman et al. 2015;León Gómez 2017). In a region marked by high modularity, with protected areas and biosphere reserves along the Chiapas Sierra Madre mountain ridge, shade-grown coffee stands as an example of intermediate modularity by creating connectivity between biodiversity hotspots. However, the proposed transition to rust-resistant varieties which require more inputs and less shade expresses a tendency towards low modularity landscapes, with biodiversity-friendly agroforestry systems being replaced by monocultures.
This intermediate modularity landscape based on agrobiodiversity is at risk due to the lack of matching legal and institutional arrangements to address the coffee rust, a social-ecological crisis which defies conventional boundaries of time, space and politics. Our case study reveals that institutions limited to national borders have proved to mismatch with this social-ecological crisis.
As such, international environmental law, such as the CBD, and multi-stakeholder instruments not tied to state attributions may prove well-positioned to rise to the call in building legal resilience.
CBD instruments can provide inputs in efforts to respond to this social-ecological crisis. A recent CBD decision on the nexus between biodiversity, climate change and disaster risk reduction (CBD 2014a) highlights how biodiversity can support disaster risk management (see Lasco et al. 2014).
Another relevant topic of debate under the CBD has been biodiversity financing mechanisms (BFM). Markets for green products, which include organic coffee, and climate financing with benefits to biodiversity are two of the six BFMs or Innovative Financing Mechanisms categorised under Goal 4 of the CBD Strategy for Resource Mobilisation (see CBD 2018b). To account for BFM's social and biodiversity risks and opportunities, the CBD Secretariat developed in 2014 voluntary guidelines for safeguards in BFMs based on a process of multi-stakeholder dialogue 1 3 (Ituarte-Lima et al. 2018). CBD-COP12 Decision XII/3 urges Parties, other governments, business organizations and other stakeholders to take into account the voluntary guidelines on safeguards (CBD 2014b). It also urges Parties to consider undertaking, as appropriate, a review and assessment of existing legislation and policies governing biodiversity financing mechanisms. Guideline (a) refers explicitly to the need to consider the resilience values of biodiversity and Guideline (c) to international human rights treaties. In 2016, the CBD COP 13 adopted voluntary guidelines on safeguards in BFMs, along with the request that Parties to the Convention report on lessons learnt in their application. Lessons learnt examining the matches and mismatches of law with agroforestry systems can serve to inform the development of the post-2020 global biodiversity framework 9 as well as decision making at national levels particularly relevant to other countries which also face increased vulnerability to pests and diseases in light of climate change.
In terms of multi-stakeholder initiatives that create legally relevant relationships, voluntary sustainability standards such as those associated with fair trade and bird-friendly agroforestry can create incentives towards protecting the unique ecosystems of shade-grown coffee (Potts et al. 2014) and support legal resilience building. The coffee rust epidemic has challenged fair-trade networks to support innovative solutions for both producers and consumers. These international networks are beginning to promote innovative solutions in favor of sustainable livelihoods based on agrobiodiversity which provide high-quality products to the growing demand for a healthy living in consumer countries (Tscharntke et al. 2015). A concrete example of this lies in the funding through fair trade networks of coffee plant nurseries which focus on coffee varieties already in situ, selected by coffee cooperatives, which are resistant to the coffee rust while at the same time being compatible with shade-grown, organic and high-quality coffee production. Based on the synergies between knowledge systems and innovations, this strategy seeks to cultivate local agrobiodiversity, in contrast with the promotion of hybrid varieties which do not maintain their genetic characteristics if reproduced by seed, thus leaving producers dependent on a third party for renewing their plantations. In this context, supra-national institutional arrangements can play a crucial role in addressing the crisis generated by coffee rust in Latin America.
Unexpected social-ecological crisis may create fertile ground for the uptake of scientific knowledge into policy, in what Rose et al. (2017) identify as "policy windows" (Table 3). For example, the rust epidemic has led to the creation and improvement of early warning systems such as the Sistema de Alerta Temprana para Mesoamerica (http:// www.siatm a.org) developed through inter-institution collaboration in Central America (see De Virginio and Astorga 2015) or Mexico's new coffee phytosanitary epidemiological monitoring program (http://www.royac afe.lanre f.org. mx), which has developed a monitoring system which covers 14 pests and diseases of economic relevance for coffee production (Mora-Aguilera et al. 2014). Furthermore, new research-action initiatives include an alliance between the national research network Programa Mexicano del Carbono (Mexican Carbon Program) and coffee producers to seek to develop financing mechanisms to add value to the carbon stocks and biodiversity provided by shade-grown coffee plantations (Libert-Amico et al. 2016). This scheme was developed under a multi-actor framework, bringing together coffee cooperatives, research networks, government institutes and NGOs promoting REDD + (reducing emissions from deforestation and forest degradation) early action programs, in response to the tendency of deforestation and forest degradation due to coffee losses to the rust epidemic (see Appendix). This research-action campaign is pushing forward legal and institutional arrangements to promote biodiversity financing mechanisms in favour of local economies and ecosystems (see Wuesler and Pohl 2016).
Coffee cooperatives in the Chiapas Sierra Madre can provide lessons for place-based and bottom-up fulfillment of CBD objectives of conserving biodiversity, assuring its Institutional collaboration in the Chiapas Sierra Madre for financing systems valuing the ecosystem services provided by shade-grown coffee Timely declarations of phytosanitary emergencies Power Institutional arrangements empowering small-scale shade grown coffee producers who "conserve by producing and produce by conserving" can foster a place-based and bottom-up fulfilment of CBD objectives correct use, as well as the fair and equitable distribution of its benefits. Coffee cooperatives are regional actors, bringing together smallholders from diverse communities throughout the Sierra Madre, who are directly linked with conscientious consumers in the global North. Their practice of shade-grown coffee not only insures family revenue but also assures the provision of ecosystem services (from hydrological services to pollination to soil conservation). Despite facing challenges in terms of democratic decision-making and equitable benefit-sharing, Sierra Madre coffee cooperatives can provide spaces for learning on how to operationalize equitable forms of access and benefit-sharing in practice (see Trench et al. 2018). In stark contrast with philosophies of "no touch", "no take", smallholder shade-grown coffee expresses a distinctive vision of conservation, which is to conserve by producing and produce by conserving (Toledo and Moguel 2012).

Conclusions
The proposed framework builds on law and resilience literature and insights from analyses of modularity to illustrate how mismatches of scale between social-ecological phenomena and legal and institutional arrangements at different levels may generate significant impacts in the case of smallscale coffee producers and shade-grown coffee ecosystems with rich biodiversity. Using different scales of analysis allows us to shed light on the coffee rust social-ecological crisis and potential impacts beyond the here and now. The time scale illustrates the risks of seeking to respond to an emergency with partial solutions: new coffee varieties promoted as a solution to coffee rust may convey new problems if compatibility with local ecosystems and syndromes of production is not considered. The scale of space leads to reflections on unexpected challenges in line with climate change, which go beyond national boundaries and across sectors of society. Through the scale of power, this framework allows insights into the neoliberal context, where transnational institutes in favour of rural development have been replaced by companies with incentives to assure sales rather than invest in solutions for both the economy and the environment. Land-use change from the present polyculture agroforestry systems to coffee varieties which require less shade cover, as promoted by government institutes and private companies, is identified as a driver of ecosystem degradation. Placed at risk by the mismatches in the response to this social-ecological crisis, shade-grown, organic coffee fields continue to be defended by local coffee cooperatives and allies at multiple scales. New multi-stakeholder initiatives are pushing the frontiers of common emergency response by seeking to transform the present crisis into a secure future for producers and consumers. However, solutions such as multi-stakeholder processes and improved coordination will be largely ineffective unless there is fundamental challenge to dominant development models that favour ecosystem degradation.
We have found that matching scales of law with agroforestry systems can be done through a variety of legal and policy instruments. This matching of scales-which can contribute to build resilience-is vital to appropriate responses to the rust disease. Instruments that generate legally relevant relations include multilateral environmental agreements with a global scope such as the Convention on Biological Diversity and its associated institutional arrangements, from the Aichi Targets and the CBD voluntary guidelines for safeguards to CBD-COP Decisions on distinct topics such as agrobiodiversity, forests and climate. Transnational biodiversity and social standards in coffee production can be used to link responsible consumers and producers throughout the world. These standards are also relevant for matching scales of law with shade-grown coffee agroforestry systems. National governments hold special responsibilities for addressing social-ecological crises such as through declarations of sanitary emergencies of national and sub-national scope.
Further research is needed to analyse these responses to unforeseen social-ecological crisis. An interdisciplinary focus and cross-scale analysis can also shed light on negative collateral effects of inadequate responses to the coffee rust, illustrating how perverse incentives have mandated pathological solutions which risk creating more problems than solutions. However, applying the same analytical framework, it is worth asking if strict environmental regulations, which emphasize the environmental impacts of the present coffee crisis yet fail to recognize the importance of resilience, flexibility and ecosystem-based adaptation, could also prove to mandate pathological solutions by failing to consider ecosystem diversity and producer management systems. Learning from social-ecological crises is vital for safeguarding diverse agroforestry systems and for fostering an enabling environment for small-scale coffee farmers to enjoy their right to a healthy and sustainable environment. and landscape carbon management", a part of CIFOR's Global Comparative Study on REDD + . This research contributes to the CGIAR Research Program on Policies, Institutions and Markets (PIM), led by the International Food Policy Research Institute (IFPRI). We thank the editors and express our gratitude for the comments we received from two anonymous reviewers.

Compliance with ethical standards
Conflict of interest None.
Open Access This article is distributed under the terms of the Creative Commons Attribution 4.0 International License (http://creat iveco mmons .org/licen ses/by/4.0/), which permits unrestricted use, distribution, and reproduction in any medium, provided you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons license, and indicate if changes were made.