Appendix S1: Description of the study area, field sampling, measurements of environmental variables, and a list of identification literature. Study area and sites The study was performed in the Western Carpathian Mts. (Fig. 1 in the main text), which consist of two major regions: the Outer Western Carpathians (the Czech Republic-Slovakia borderland and the Orava region in the north-western Slovakia) and the north-western part of the Inner Western Carpathians. The former is characterized by flysh bedrock, made up of rhythmically alternating geological beds that are formed by sandstone and claystone layers, which differ in their chemistry. The later region has a more complex geological structure, which primarily includes cores of Paleozoic and crystalline schists overlaid by Mesozoic shale-sandstone and carbonate lithofacies (Poprawa & Nemčok, 1988; Hájek & Hekera, 2005). Spring fens in the Western Carpathians cover usually a small area and are usually highly isolated from each other. Altogether 59 fens were selected for this study encompassing the whole length of the main ecological gradient of spring fens – the gradient of mineral richness. This gradient represents the variance in spring-fen upwelling water chemistry (determined by bedrock) and is delimited by calcareous tufa-forming fens and acidic Sphagnum-fens at the opposite ends. Previous studies documented the effect of this gradient on many taxonomical groups of organisms, such as vascular plants and mosses, Testacea, Mollusca, Clitellata, and Diptera (Hájek et al., 2002; Horsák & Hájek, 2003; Opravilová & Hájek, 2006; Bojková et al., 2011; Omelková et al., 2013). Within-site heterogeneity of the studied sites is represented mainly by flow conditions, while hydrochemistry varies only negligibly. Two considerably contrasting aquatic mesohabitats can be easily distinguished at each site – the flowing-water mesohabitat and the standing-water mesohabitat. The first one represents the uppermost part of a spring brook flowing from the spring source, while the latter represents the waterlogged substratum with a thin layer of virtually standing water. Compared to the flowing water, the standing-water is more susceptible to water level and temperature fluctuations during the season. Field sampling and environmental variables Samples were collected in spring (April-May) and autumn (September-October) in 2006– 2012. Altogether 236 samples were taken, one from each mesohabitat in each season, resulting in four samples per site. A square plot of 25 x 25 cm was defined by a metal frame and the upper layer of substratum and vegetation (approx. 5 cm thick) was gathered using a hand net with the mesh size of 500 µm. Our previous studies have proved that the selected sample size provided a reasonable estimate of the assemblage taxonomic structure, without causing any substantial damages of these valuable and highly endangered habitats. The collected material was elutriated through a net with the mesh size of 500 µm and fixed with 4% formaldehyde. The larvae of aquatic macroinvertebrates were hand-sorted and identified in the laboratory using a dissecting stereomicroscope and light microscope. Environmental variables (pH, water conductivity, water temperature, and dissolved oxygen) were measured (HACH HQ40d) in situ before the sampling. The amount of Total Organic Carbon (TOC; Shimandzu TOC-VCPH) was assessed from substratum samples of 100 ml volume, taken next to each sampling plot. The concentrations of Ca2+, Mg2+, Na+, K+, Fe3-, NO3-, SO42-, and PO43- ions in water were measured in an accredited laboratory (T.G. Masaryk Water Research Institute, Brno) from water samples taken in the autumn because of relatively stable water chemistry (Hájek et al., 2006). In autumn, substratum samples were also collected and the amount of organic matter (ORG) and the amount and the size structure of the inorganic particles were determined. The ORG was elutriated, dried (at 80 °C), and weighed. The remaining inorganic substratum was dried and sieved through a series of sieves. The median grain size (D50) and the total weight of all the fractions of the inorganic substratum (INORG) were determined. Water discharge was measured at the spring-fen outflow using a bucket. Vegetation composition was recorded in a square plot of 4 x 4 m located in the central part of each site. At sites with heterogeneous vegetation, which notably differed between the two mesohabitats, an additional vegetation plot (1 x 1 m) was sampled. The covers of all plant species were estimated using the Braun-Blanquet nine-grade scale (van der Maarel, 1979) and were used to infer three environmental variables (moisture, nutrients, and soil reaction) as the weighted means of the Ellenberg indicator values (EIV) (for details see Horsák et al., 2007). References Bojková J., Schenková J., Horsák M. & Hájek M. (2011) Species richness and composition pattern of clitellate (Annelida) assemblages in the treeless spring fens: the effect of water chemistry and substrate. Hydrobiologia, 667, 159–171. Hájek M. & Hekera P. (2005) The study area and its geochemical characteristic. In: Poulíčková A., Hájek M. & Rybníček K. (Eds.), Ecology and palaeoecology of spring fens of the West Carpathians. Palacký University, Olomouc, 209 pp. Hájek M., Hekera P. & Hájková P. (2002) Spring fen vegetation and water chemistry in the Western Carpathian flysch zone. Folia Geobotanica, 37, 205–224. Hájek M., Horsák M., Hájková P. & Dítě D. (2006) Habitat diversity of central European fens in relation to environmental gradients and an effort to standardise fen terminology in ecological studies. Perspectives in Plant Ecology, Evolution and Systematics, 8, 97–114. Horsák M. & Hájek M. (2003) Composition and species richness of molluscan communities in relation to vegetation and water chemistry in the Western Carpathian spring fens: The poor-rich gradient. Journal of Molluscan Studies, 69, 349–35. Horsák M., Hájek M., Dítě D. & Tichý L. (2007) Modern distribution patterns of snails and plants in the Western Carpathian spring fens: is it a result of historical development? Journal of Molluscan Studies, 73, 53–60. Omelková M., Syrovátka V., Křoupalová V., Rádková V., Bojková J., Horsák M. et al. (2013) Dipteran assemblages of spring fens closely follow the gradient of groundwater mineral richness. Canadian Journal of Fisheries and Aquatic Sciences, 70, 689–700. Opravilová V. & Hájek M. (2006) The variation of testacean assemblages (Rhizopoda) along the complete base-richness gradient in fens: A case study from the Western Carpathians, Acta Protozoologica, 45, 191–204. Poprawa D. & Nemčok J. (Eds) (1988) Geological atlas of the western outer Carpathians. Państwowy Instytut Geologiczny, Warszava. van der Maarel E. (1979) Transformation of cover-abundance values in phytosociology and its effects on community similarity. Vegetatio, 39, 97–114. Literature used for taxa identification and nomenclature Bauernfeind E. & Humpesch U.H. (2001) Die Eintagsfliegen Zentraleuropas (Insecta: Ephemeroptera). Bestimmung und Ökologie. Verlag des Naturhistorischen Museums Wien, 239 pp. Bitušík P. (2000) Príručka na určovanie lariev pakomárov (Diptera: Chironomidae) Slovenska. Čast’ I. Buchonomyinae, Diamesinae, Prodiamesinae a Orthocladiinae. Vydavateľstvo Technickej univerzity, Zvolen. Ekrem T. (2007) A taxonomic revision of the genus Stempellinella (Diptera: Chironomidae). Journal of Natural History 41: 1367-1465. Epler J.H. (2001). Identification Manual for the larval Chironomidae (Diptera) of North and South Carolina. A guide to the taxonomy of the midges of the southeastern United States, including Florida. Special Publication SJ2001-SP13. North Carolina Department of Environment and Natural Resources, Raleigh, NC, and St. Johns River Water Management District, Palatka, FL. 1–526. Electronic version available at http://home.comcast.net/~johnepler3/SEMidges.pdf. Grosser C. & Nesemann H. (2004) Ergänzungen zur Süßwasserfauna von Mitteleuropa 6/2: Annelida, Clitellata: Branchiobdellida, Acanthobdellea, Hirudinea. Lauterbornia, 52, 27– 32. Hrabě S. (1981) Vodní máloštětinatci (Oligochaeta) Československa. Acta Universitatis Carolinae-Biologia, 1979, 1–168. Klink, A.G. (1983) Key to the dutch larvae of Paratanytarsus Thienemann & Bause with a note on the ecology and the phylogenetic relations. Orgaan van Hydrobiologisch Adviesburo ir. A.G. Klink, Medeklinker Nr.3, June 1983. 1-36. Krno I. (2004) Nemouridae (Plecoptera) of Slovakia: autecology and distribution, morphology of nymphs. Entomological Problems, 34, 125–138. Lechthaler W. & Stockinger W. (2005) Trichoptera – Key to Larvae from Central Europe. DVD Edition, Vienna. http://www.eutaxa.com ISBN: 3-9501839-1-4 Moller Pillot H.K.M. (2009) Chironomidae Larvae of the Netherlands and Adjacent Lowlands II: Biology and Ecology of the Chironomini. KNNV Publishong, Zeist, The Netherlands, 1–270. Moller Pillot H.K.M. (2013) Chironomidae Larvae of the Netherlands and Adjacent Lowlands III: Biology and Ecology of the aquatic Orthocladiinae. KNNV Publishong, Zeist, The Netherlands, 1–312. Neubert E. & Nesemann H. (1999) Annelida, Clitellata; Branchiobdellida, Acanthobdellea, Hirudinea. Spektrum Academischer Verlag, Berlin, pp. 1–179. Pinder L.C.V. & Reiss F. (1983) The larvae of Chironominae (Diptera, Chironomidae) of the Holarctic region-keys and diagnoses. Entomologica Scandinavica, Supplement, 19, 293– 435. Raušer J. (1980) Řád pošvatky – Plecoptera. [Order stoneflies – Plecoptera]. Pp. 86–132. In: Rozkošný R. (ed.): Klíč k určování vodních larev hmyzu. [Key to the larvae of aquatic insects]. Academia, Praha, 521 pp (in Czech). Sæther O.A. & Wang, X. (1995) Revision of the genus Paraphaenocladius Thienemann, 1924 (Diptera: Chironomidae). Entomologica Scandinavica, Supplement 45, 1–69. Schmid P. (1992) A key to the larval Chironomidae and their instars from Austrian Danube region, streams and rivers. Wasser und Abwasser, Suppl. 3. Federal Institute for Water Quality, Wien – Kaisermühlen. Tempelman D. (2010) Key to Identification of 4th instar larvae of Polypedilum Species of the Netherlands (Diptera: Chironomidae). Publication of Grontmij, team Ecology. Draft version. Amsterdam, 1–22. Timm T. (2009) A guide to the freshwater Oligochaeta and Polychaeta of Northern and Central Europe. Lauterbornia, 66, 1–235. Vallenduuk H.J. & Moller Pillot H.K.M. (2007) Chironomidae I: Larvae of the Netherlands and Adjacent Lowlands. General ecology and Tanypodinae, KNNV Publishing, Netherlands. Waringer J. & Graf W. (2011) Atlas der mitteleuropäischen Köcherfliegenlarven. Atlas of Central European Trichoptera Larvae. Erik Mauch Verlag, Dinkelscherben, 468 pp. Wiederholm T. (1983) Chironomidae of the Holarctic region. Keys and diagnoses. Part 1: Larvae. Entomologica Scandinavica, Supplement, 19, 1–457. Zwick P. (2004) Key to the West Palaearctic genera of stoneflies (Plecoptera) in the larval stage. Limnologica, 34, 315–348. Figure S1: Rank abundance plots for six datasets (see upper headings). Arrows indicate dividing points between common and rare species. Black circles represent common species, open (or grey) circles rare species. Grey circles indicate rare species included in the matrix adjusted to the same information value as for the matrix of common species. Figure S2: Variance partitioning run for habitat specialists (special) vs. matrix-derived generalists (general) and rare vs. common species separately for three insect taxa. For details see Fig. 2. Figure S3: Variance partitioning run for the whole rare species matrix and the rare species matrix adjusted to the same information values as for the common species matrix (mod suffix). For details see Fig. 2.