Trichoptera are closely related to the Lepidoptera, forming the group Amphiesmenoptera, and the two orders are often cited as being one of the best examples of a sister-group pair at the ordinal level. The first fossils of this group appear in the Permian but it seems likely that divergence of life-styles occurred at an early stage; today Lepidoptera are primarily a terrestrial group whereas virtually all the juvenile stages of Trichoptera live in freshwater environments. The case-building habits of the larvae are well known, though more species build nets to filter feed, or else are free-living predators, than actually build tubular cases. However, all caddis larvae construct shelters in which they pupate, and the case-building habit may have evolved through an extension of this pupal retreat. The diversity of caddis larvae and their relative abundance in a wide range of freshwater habitats has led to many species having rather narrow ecological requirements. This means that subtle differences in species diversity can form a useful indicator of freshwater quality, and can in turn detect even low levels of pollution. Some species are tolerant of semi-saline habitats such as salt-marshes, and in the Australasian region a small group lives entirely in sea-water. As nocturnal or crepuscular insects adult caddisflies have the reputation of being undistinguished in appearance, appearing less diverse and colourful than day-flying Lepidoptera, and therefore difficult to identify. In fact, many of the more common species can be recognised by their wing-patterns and other easily observed characters, and these have been given common names by flyfishermen in many countries. Trichoptera are a cosmopolitan group (though absent from Antarctica), and appear to have evolved in temperate parts of the world, rather than the tropics, with the highest species diversity in the Oriental region. Many caddis larvae require relatively cool, well-oxygenated water, though inevitably there are several exceptions in that some groups can tolerate low oxygen levels; a few species have deserted fresh water completely and live in damp terrestrial habitats. Worldwide there are around 13,000 known species in 46 families; in Britain there are 200 species in 19 families.