The locomotor ecomorphology of Mesozoic marine reptiles

The aftermath of the end‐Permian mass extinction provided ecological opportunities for many groups of reptiles, marking the beginning of reptile dominance of the Mesozoic oceans. Clades such as ichthyosaurs, thalattosuchians, sauropterygians, mosasaurs and turtles evolved a remarkable diversity of ecological niches and became important components of aquatic ecosystems. Locomotion is a key aspect of ecology, crucial for many biological functions such as foraging and migration. However, the evolution of locomotory adaptations across all Mesozoic marine reptiles remains poorly understood. Here we present multivariate and disparity analyses based on body proportions, body size and post‐cranial proxies for locomotion in 125 species of Mesozoic marine reptiles. Our analysis highlights key anatomical transformations in the evolution of swimming modes, characterizing two divergent evolutionary paths in the transition from drag‐based to lift‐based propulsion in both the axial and appendicular spectrum. Analyses against geological time do not show evidence for an explosive radiation after the end‐Permian extinction, pointing instead to a gradual increase in locomotory disparity during the whole Mesozoic, which reached the highest levels in the Cretaceous. Our analysis also provides insight into the evolution of locomotion in particular clades. Some notable findings are the high aquatic specialization in the earliest ichthyosauromorphs and the morphospace overlap between mosasauroids and ichthyosauromorphs.

B E T W E E N 12 and 15 groups of reptiles colonized marine environments during the Mesozoic (Motani 2009; Gutarra & Rahman 2021). These were not the first, nor were they the last of the multiple independent aquatic invasions undergone by tetrapods (Pyenson et al. 2014;Kelley & Pyenson 2015) but they include some of the longest-lived and most successful clades, such as Ichthyosauromorpha, Sauropterygia, Mosasauroidea, Thalattosuchia and Testudinata, the last surviving to the present day. This paraphyletic ensemble of Mesozoic marine reptiles provides an extraordinary opportunity to explore major evolutionary transitions in deep time and to advance our knowledge of past marine ecosystems. Many studies on the disparity and ecomorphology of Mesozoic marine reptiles have focused on cranial characters (Pierce et al. 2009;Young et al. 2010;Stubbs & Benton 2016;Fischer et al. 2020) revealing the extraordinary diversity of feeding modes displayed by these groups, particularly during the Triassic (Stubbs & Benton 2016). Locomotion remains poorly characterized, however, despite being a crucial aspect of the biology, ecology, and disparity during major evolutionary transitions of these aquatic animals.
Mesozoic marine reptiles displayed a variety of axial and appendicular swimming modes (Gutarra & Rahman 2021). Some are unique among aquatic tetrapods, such as the quadrupedal underwater flight of plesiosaurs, recognized from their very derived morphologies (Muscutt et al. 2017), and others can be compared directly with living taxa, such as the caudal oscillation of parvipelvian ichthyosaurs, as seen also in modern thunniform swimmers such as cetaceans, tuna or sharks (Motani et al. 1996;Motani 2002). The inference of swimming modes in fossil taxa is, however, a challenging endeavour, especially in basal branching, less specialized lineages. Previous research on postcranial disparity used datasets of phylogenetic characters in ichthyosaurs (Thorne et al. 2011;Moon & Stubbs 2020) and shortnecked plesiosaurs (Fischer et al. 2017) but results from these studies cannot be linked directly to locomotion because these character sets go beyond locomotory features. Other authors have used direct osteological proxies for locomotory related functions, such as limb and girdle bone proportions or aspect ratios (O'Keefe 2001;O'Keefe & Carrano 2005;Benson et al. 2012) but these have focused only on specific groups, such as plesiosaurs. This paper aims to fill this gap in knowledge.
In earlier work, Gingerich (2003) presented a morphospace analysis of semiaquatic mammals using a selection of body and limb measurements, distinguishing terrestrial-versus-aquatic adaptation and forelimb-driven versus pelvic-dominated swimming. Using a similar approach, Heighton (2019) considered a wider selection of postcranial characters to assess locomotory trends in living aquatic tetrapods, providing good discrimination between specialized lift-based swimming modes and dragbased, less specialized modes, as well as between axial and appendicular swimming adaptations. This approach is applied here to a wide sample of Mesozoic marine reptiles.
Here, we investigate key skeletal transformations and locomotory evolutionary paths to help answer the following questions: Did all Mesozoic marine reptiles diversify in the same way? What were the main anatomical transformations in the transition from land to water in Mesozoic marine reptiles? Do trends in body plan and locomotory disparity follow similar trends in trophic disparity? To achieve this, we evaluate patterns of locomotory disparity using principal component analysis (PCA) and disparity metrics on a dataset that includes all major clades of Mesozoic marine reptiles, representing all key morphotypes and time intervals. Acknowledging the fact that form and function often have an ambiguous relationship (Wainwright 2007), we include a selection of extant aquatic tetrapods to provide a functional reference from living animals with known swimming modes. The continuous characters used in this study include main body proportions, post-cranial features with inferred functional value in locomotion, such as crural and brachial indexes and aspect ratios, as well as a proxy for body size (Appendix S1). Body size plays a very important role in aquatic locomotion, as it is associated with the degree of aquatic specialization (Fish 2000), manoeuvrability (Fish 2002;Fish & Lauder 2017) and drag balance during swimming (Gutarra et al. 2019;Gutarra et al. 2022a). Moreover, size has important implications for physiology and ecology (Gearty et al. 2018;Goldbogen 2018). For this reason, an additional analysis focusing exclusively on body size of a wider array of taxa is provided, for a more complete insight into the complexity of locomotory ecomorphology of the Mesozoic marine reptiles.

MATERIAL AND METHOD
Measurements A dataset of 16 continuous characters that include a proxy for body size (trunk), main body proportions (skull, neck and tail) and various other appendicular ratios with inferred functional value in locomotion were selected for the present analysis ( Fig. 1; see also Appendix S1 for a detailed description of the functional characters). Measurements were collected from direct observation or from scaled photographs using ImageJ v.1.51d (Schneider et al. 2012) (see Gutarra et al. (2022b) for the full data set including specimen numbers and sources). To minimize uncertainty due to the lack of preservation of soft connecting tissues, we used mainly articulated specimens of great preservation or three-dimensional reconstructions. Additionally, we took duplicate measurements, averaged left and right limb elements if both were present, and averaged ratios when more than one very complete specimen was available for a given species.

Specimen selection
The study sample comprises 125 species of Mesozoic reptiles. An extended dataset of 190 species was also assembled to explore evolutionary trends in trunk length (Gutarra et al. 2022b). The selected taxa belong to nine monophyletic lineages: Sauropterygia, Ichthyosauromorpha, Pantestudines, Mosasauroidea, Thalattosuchia, Thalattosauria, Rhynchocephalia (which include some members of Sphenodontia and the fully aquatic Pleurosauridae), Saurosphargidae and the protorosaurian Tanystropheidae. The last two are relatively minor groups with a small taxic diversity and short evolutionary durations but have unique and enigmatic body morphologies that should be represented in the large-scale analysis. This ensemble is referred to as 'marine' because all clades considered here evolved marine representatives, although some might have included freshwater taxa. To provide a locomotory framework for the Mesozoic marine reptiles, we created a morphospace combining fossil and extant taxa incorporating 58 living aquatic and semiaquatic tetrapods from marine and freshwater habitats including 28 mammals, 21 non-avian reptiles, four birds and five amphibians, collected from museum specimens by direct observation (Gutarra et al. 2022b).
For this analysis, we included only species with at least 70% of the skeletal elements represented when all specimens available are accounted for (see Gutarra et al. (2022b) for a table of completeness per taxon). Completeness was calculated as a percentage based on the relative weighting assigned to each contributing anatomical segment. For example, lower jaw, neck, trunk, tail, humerus, femur, radius, tibia, manus and pes have a value of 10% each. Humerus and femur are subdivided into total length and distal length, scoring 5% respectively, as these aspects of the propodial bones can sometimes be present independently of each other. The hand and pes are also subdivided into length and area, contributing separately with 5%, to account for the instances where the longest digit is present, but the others are missing and thus the total area cannot be directly measured. Manus and pes were positively scored if more than half the phalanges were present, and an asterisk was added if a few distal phalangeal elements (i.e. less than half) were missing. The characters not represented in a particular species as well as the minor portions missing from relatively complete elements, were inferred based on the closest relative. Inferred measurements represent only 11.5% of all data used in this analysis. In a few instances where specimens from the same genus were not available, the closest member of the same family was used. Inferred values are highlighted in bold and italics in the datasets for each relevant specimen (see Appendix S1 for a detailed description of inferences and reconstruction of partially missing elements). A few relatively complete specimens were omitted because of lack of data from closely related species to infer the missing elements (e.g. Glyphoderma kangi, Brancasaurus brancai, Henodus chelyops). This conservative approach of inferring missing data from closely related species enabled us to enlarge the dataset to 125 taxa, from 93 had a 100% completeness criterion been applied.

Locomotory morphospace: principal component analysis
The patterns of covariation among the 16 characters used for this analysis were evaluated with the R package corrplot v.0.84 (Wei & Simko 2021), which allows visualization of correlation coefficients from a matrix of characters and tests for their significance. Functional locomotory morphospaces were created by performing principal component analysis (PCA) using the R package FactoMineR v.2.3 (Lê et al. 2008;Husson et al. 2022). In the PCA, all characters were scaled to unit variance. Three morphospaces were produced: one showing fossil taxa alone, and another two including fossil and extant aquatic tetrapods. In the case of the fossil-extant morphospace, an additional version was added using a reduced set of nine characters that excluded the hindlimb data. This was done so that taxa without hindlimbs, such as extant cetaceans or sirenians, could be included and the caudal oscillation swimming mode would be represented.
The density of specimens across the morphospace area was plotted using the ggplot2 v.3.3.2 (Wickham 2016; Wickham et al. 2022) hexagonal-bin density distribution function geom_hex. Additionally, density histograms for each axis of variation were produced for the main groups of reptiles using the function geom_density_ridges in ggplot2.

Disparity
Mesozoic marine reptile disparity was calculated from the PC scores using the sum of variances metric. Only the first five axes of variation, which summarize 82.2% of variance, were retained for the disparity analyses, while all other axes were discarded as very minor contributors to the total variance (<5% each; Table S1). To assess the changes in disparity through time, the sum of variances was calculated for each period (Triassic, Jurassic and Cretaceous) as well as 11 smaller time intervals (see Table S2 for details of the stratigraphic binning). Broad time bins were adopted for the Late Jurassic and Early Cretaceous to equalize sample size and avoid rarefaction. However, to estimate whether biological signal could have been lost due to the lack of resolution in this interval, an additional analysis is provided using an alternative 13-time bin arrangement (Table S2). The ages for the stratigraphic stages are taken from Ogg et al. Hence disparity was also calculated for the first 10 million years of the Triassic and compared to the rest of the Mesozoic.
Partial disparity (Foote 1993), which estimates the contribution of each clade to total disparity in bins throughout the Mesozoic was calculated using Matlab package MDS (Navarro 2003). A different array of time bins aligned to Mesozoic epochs was used for this analysis to minimize sampling gaps (Table S2). In addition to calculations for all Mesozoic marine reptiles, temporal cladespecific disparity patterns were also estimated for the longest-lived and most diverse clades, Sauropterygia and Ichthyosauromorpha, using various time intervals (see Table S2 for a detailed description of the time bins used in the partial disparity and the within-group calculations). Clade-specific analyses were not possible for other groups because sample sizes were too small.
All disparity calculations other than partial disparity were performed in R (v.3.6.2; R Core Team 2013) using the package dispRity v.1.3.5 (Guillerme 2018, 2022). 95% confidence intervals were generated based on bootstrapping with 100 replications. Non-parametric multivariate analyses of variance (NPMANOVA) and pairwise t-tests were performed to assess the statistical differences in morphospace occupation and disparity respectively between clades and time bins.

Trends in the evolution of body size
To complement the analysis of disparity in locomotory morphology, evolutionary trends in trunk length, a proxy for body size, were examined using an extended dataset of 190 species of Mesozoic marine reptiles. Trunk length was measured as the distance from glenoid to acetabulum following the backbone (Fig. 1). The interquartile ranges, 95% confidence intervals and mean values of trunk length were plotted throughout the 11 sampling intervals used in the locomotory disparity analyses (Table S2). To assess the differences in trunk length disparity, represented by the standard deviation, statistical tests for the inequality of variances were applied. The majority of the grouped data showed a nonnormal distribution, as assessed by the Shapiro-Wilk test (Shapiro & Wilk 1965), hence pairwise comparisons between time bins were performed using the non-parametric Ansari-Bradley test (Ansari & Bradley 1960). The mean trunk length values were also compared between time bins using the nonparametric Mann-Whitney U test. In addition to calculations on all Mesozoic marine reptiles, temporal trends in trunk length were also plotted for the six most diverse groups: Ichthyosauromorpha, Sauropterygia, Mosasauroidea, Pantestudines, Thalattosuchia and Thalattosauria. All calculations and plots were performed in R v.3.6.2. Potential biases due to the different number of taxa sampled for each time interval were examined by plotting the disparity measures alongside the sample size.

Locomotory functional morphospace
The functional morphospace described here summarizes phenotypic variation in general body plan and functional markers associated with locomotion for a wide array of Mesozoic marine reptiles. Sixteen axes of variation were recovered, of which the first two (PC1 and PC2) represent the main functional trends associated with mode of locomotion (Table S1). PC1 and PC2 encompass 54% of the total variation in the morphospace of fossil aquatic reptiles, 47% in the morphospace combining fossil and living animals and 53% in the version of the latter that excludes the hindlimb characters ( Fig. 2A-D). Taxa are F I G . 2 . Locomotory morphospace of Mesozoic marine reptiles and extant aquatic tetrapods. A, bidimensional plot showing the first two axes of variation (PC1, PC2) and their associated functional trends for the main groups of Mesozoic marine reptiles. B, contributions of functional characters to PC axes 1 and 2 and association of the morphospace with locomotory modes for fossil taxa. C-D, locomotory morphospace including fossil and extant taxa: C, using the full list of 16 characters (as in A, B); D, with a reduced list of nine characters that exclude the hindlimb; grey-line hulls delimit the grouping according to the primary swimming mode in living animals; silhouettes are shown for a few significant taxa (see Fig. S1 for labelled versions of A-D plots). E, boxplot of the total disparity calculated as the sum of variances for the main groups of Mesozoic marine reptiles, showing mean values (black lines) and the interquartile range (box). (1) the transition from dragbased to lift-based swimming modes (PC2 in the fossilonly morphospace); and (2) a phenotypic gradient between axial and appendicular swimming (PC1 in the fossil-only morphospace) (Figs 2A-B, S1A, S2A). These patterns are also present in the morphospace of fossil and living animals, although they are not completely orthogonal to PC1-2 (Figs 2C-D, S1C-D). PC1-2 provides the best discrimination associated with locomotory modes. PC2-3, which includes some minor trends, is also shown for the Mesozoic marine reptiles (Fig. S2B).
Living tetrapods with known modes of locomotion display a continuous arrangement in the locomotory morphospace, providing a reference for the distribution of swimming modes (Figs 2C-D, S1B-C). Non-specialist paddlers occupy a relatively central position along PC1 and negative values on PC2. Adjacent to them are the undulatory swimmers, which score more negatively on PC1. Rowers are found beside the paddlers as well, but expanding in the opposite direction, with more positive PC1 and PC2 scores. Rowers are followed by bipedal underwater fliers, with more positive PC1 and PC2 scores. Quadrupedal underwater fliers, represented only by plesiosaurs, occupy the area contiguous to the bipedal underwater fliers, at even higher positive PC1 and PC2 scores. The extant caudal oscillators (i.e. modern cetaceans and sirenians) could only be included in the morphospace that uses a reduced list of characters excluding the hindlimb (Figs 2D, S1C). This plot indicates that the area of caudal oscillation adjoins that of the undulators, with more negative PC1 scores and gradually expanding towards positive PC2 coordinates. In general, some degree of overlap is observed between adjacent swimming mode areas, which is more substantial among the least specialized modes.
Three distinct areas of PC1-2 have a high concentration of taxa: the zones of drag-based swimmers, caudal oscillators and subaquatic fliers (Fig. S2C). On PC2-3, the drag-based swimmers show a wider spread, with the large-headed forms at the most negative extreme of PC3 mainly represented by thalattosuchians, and small-headed forms at the opposite end (Fig. S2D). PC3 re-groups the lift-based swimmers as large-bodied-and-large-headed at one end and large-bodied-and-small-headed at the other.
The main features contributing to PC1 are the limb and autopodial proportions, the aspect ratio of manus and pes, the neck ratio and the brachial/crural indexes, while PC2 is most influenced by trunk length, propodial morphology and the relative proportions of fore and hindlimb (Figs S3A, S4). PC3, contributing about 11% of variance, reflects lower jaw ratio, as well as the crural/brachial indexes and the tail ratio (Fig. S3B). Significant correlation patterns associated with locomotory trends are found among these characters (Fig. S3C). For example, low brachial and crural indexes, characteristic of hydropedal limbs, correlate with high aspect ratio in manus and pes, proportionately large hands, distally expanded propodials and relatively short tails. Body size and limb morphology also show strong correlation. Plesiopedal limbs are associated with smaller trunk sizes, while hydropedal configurations are often found in large-bodied animals. Large brachial and crural indexes also correlate with relatively smaller heads.

Clade-specific trends
The locomotory morphospace reveals notable patterns for the major groups ( Fig. 2A, C). Triassic and post-Triassic sauropterygians occupy clearly distinct areas. A great divergence of body plan and main postcranial proportions exists between the underwater fliers, including all members of Plesiosauria, and less specialized, nonplesiosaurian sauropterygians with other presumed swimming modes. Moreover, Jurassic sauropterygians never reoccupied the morphospace explored by earlier taxa. Placodonts and most early eosauropterygians fall in the high-density zone of drag-based swimmers (Fig. S2C), with many of them plotting together with living undulatory swimmers (Fig. 2C). Yunguisaurus liae, the only nonplesiosaurian pistosaur included in this analysis, is found in an intermediate position, at some distance from other Triassic sauropterygians but excluded from the area occupied by plesiosaurs ( Fig. 2A). In the morphospace of fossil and living taxa, Yunguisaurus is found near the overlap area between rowers and underwater flyers and close to freshwater turtles (Fig. 2C), displaying a morphology consistent with either rowing or bipedal underwater flight.
Ichthyosauromorphs expand along the undulatory-carangiform continuum ( Fig. 2A, B). With the lowest PC2 scores, we find a cluster including the Early Triassic hupehsuchians, the nasorostran Cartorhynchus and early ichthyopterygians such as Chaohusaurus and Utatsusaurus. At a distance, with more positive PC2 scores, are the 'early intermediate' grade ichthyosaurs, such as mixosaurids. At the extreme of the sub-undulatory continuum are the ophthalmosaurids, showing the highest PC2 scores. Various intermediate positions are taken by 'late intermediate' grade ichthyosaurs such as the shonisaurids and Early Jurassic neoichthyosaurians. Notably, the earliest ichthyosauromorphs, do not share morphospace with basal branching forms from other groups of Mesozoic marine reptiles ( Fig. 2A) and do not overlap the morphospace of living aquatic tetrapods (Fig. 2C).
Mosasauroidea also occupy morphospace areas within the undulatory-carangiform continuum ( Fig. 2A, B). In their case, there is a clear distinction between the aigialosaur-grade mosasauroids and later forms. Aigialosaurus plots at relatively negative values of PC1, at the edge of the high-density area occupied by drag-based swimmers, close to pleurosaurs, askeptosauroid thalattosaurs and thalattosuchians (Fig. S2A, C). In the plot of living and fossil forms (Fig. 2C), this area is surrounded by modern undulatory swimmers such as the phocid Mirounga leonina and the varanoid Varanus niloticus. All later mosasaurids plot at more positive PC2 scores. Halisaurus and Clidastes are found near the cluster of early ichthyosauromorphs, while all other mosasaurs expand into areas of morphospace previously occupied by Late Triassic and Early Jurassic ichthyosaurs. There is considerable overlap between Mosasauroidea and Ichthyosauromorpha, and these two clades seem to follow similar evolutionary paths in their locomotory specializations.
Pantestudines show a shift in morphospace consistent with their appendicular swimming specialization ( Fig. 2A, B). The first Triassic turtles occupy a central spot within the dense area of drag-based swimmers, a zone where rowers and undulatory swimmers overlap in the living and fossil morphospace. Throughout the Jurassic and the Early Cretaceous (including a gap in the fossil record in the Early Jurassic), the morphospace of turtles displaces only moderately to more positive values of PC1, moving to a more exclusive rowing morphospace. The first sea turtles (Protostegidae, a basal branching family of the clade Panchelonioidea) which only emerged in the Late Cretaceous, notably expand and shift the turtle morphospace towards more positive values of PC2. They plot close to modern sea turtles and overlap areas of plesiosaur morphospace ( Fig. 2A, C).
The aquatic rhynchocephalians occupy a relatively wide area of morphospace in the zone of drag-based swimming during the Middle and Late Jurassic, showing some clustering ( Fig. 2A, B). The less specialized forms, such as Kallimodon and Sapheosaurus, plot at the edge of the highdensity area of drag-based swimmers, with relatively negative PC2 and slightly positive PC1. Pleurosaurs, despite being contemporaneous with these basal branching forms (Bever & Norell 2017), plot at a significant distance from them, within the exclusive area of body undulation. This suggests that different locomotory modes might have been explored by aquatic rhynchocephalians.
Thalattosuchians, a diverse lineage of aquatic crocodyliforms, show a generally conservative body morphology ( Fig. 2A, B) and they display only a moderate shift in morphospace occupation throughout the Jurassic (Fig. 3B). The teleosauroids occupy an area consistent with swimming by undulation, plotting near the modern crocodylian Crocodylus porosus, the giant river otter Pteronura brasiliensis and the phocid Halichoerus grypus. The more aquatically adapted metriorhynchids from the Middle and Late Jurassic have more negative PC1 scores and more positive values of PC2 compared to earlier forms, plotting at the lowest end of the undulatory continuum, near the aigialosaur-grade mosasauroids and the phocid Mirounga leonina (Fig. 2C).
Thalattosaurs, from the Middle and Late Triassic, occupy a restricted area within the drag-based swimming morphospace zone, with a few species plotting in the exclusive area of undulatory swimming ( Fig. 2A, C). Their morphospace occupation does not show major shifts or expansions, pointing to a conservative body plan in this group. Finally, the enigmatic Triassic tanystropheids plot at the margins of the drag-based zone, falling in the exclusive area of rowers. In the morphospace of fossil and living animals they plot close to fresh-water turtles ( Fig. 2A, C).
Sauropterygia and Ichthyosauromorpha are the groups that reached the highest locomotory disparity during their evolution in contrast to all other Mesozoic marine reptiles. Pantestudines and Rhynchocephalia follow with intermediate levels, and the lowest values are for mosasauroids, thalattosuchians and thalattosaurs (Fig. 2F). Results for Mosasauroidea, however, must be interpreted with caution. The low sampling of plesiopedal aigialosaur-grade taxa (of which only one was suitable for inclusion in this analysis) means that morphospace occupation, particularly in the zone of less specialized swimming, and disparity, might be underestimated for this clade. In general, Mesozoic marine reptiles occupy more of morphospace than the living aquatic forms in our sample (Fig. 2C). Some areas of morphospace that were densely populated in the Mesozoic have not been reoccupied by modern taxa. However, it is not possible to provide a precise estimate of how different modern locomotory morphospace occupation is relative to the Mesozoic because of the low sampling of caudal oscillators in this analysis.  Table S3). The largest morphospace occupation and highest disparity were in the Cretaceous, with values significantly higher than in either the Jurassic or Triassic. The first significant increase occurs in the Middle Triassic, with the addition of several new clades of semiaquatic drag-based swimming forms such as thalattosaurs, saurosphargids, placodonts and other early sauropterygians. This is followed by a further rise in the Carnian. The first 10 myr of the biotic recovery after the Permo-Triassic mass extinction (Chen & Benton 2012) generated about half as much disparity as the rest of the Mesozoic (Fig. 3E). A marked contraction in disparity and morphospace occupation occurred throughout . During the Hettangian-Sinemurian there is a shift in morphospace occupation and significant increase in disparity, which recovers to pre-extinction levels, mainly due to the novel body plan adopted by plesiosaurs. After this, morphospace and disparity expanded at a steady pace and, according to our data, reached their highest points in the Early Cretaceous, followed by a significant contraction during the Cenomanian-Coniacian and a further rise at the end of the Cretaceous. The analysis including extra time intervals in the Late Jurassic and Early Cretaceous shows very similar general patterns of morphospace occupation and disparity, except for an apparent reduction in disparity during the Kimmeridgian-Tithonian which can be explained by the lack of plesiosaurian data ( Fig. S5A-C).

Temporal trends in disparity
In the Early Triassic, marine reptiles were represented mainly by basal ichthyosauromorphs and constrained to a small area on the limit of the drag-based swimming morphospace (Fig. 3B). The Middle Triassic sees the emergence of the first pelagic, lift-based swimming forms in the gradient of axial specialization towards caudal oscillation, the ichthyosauromorphs, which further expanded their morphospace occupation in the Late Triassic. The first potential sub-aqueous flying taxon, a sauropterygian pistosauroid, also dates from the Late Triassic. A high turnover of groups in the morphospace area of dragbased swimmers is observed from the Middle Triassic to Late Jurassic. For example, Jurassic rhynchocephalians, thalattosuchians and pantestudines populate areas that had been occupied previously by sauropterygians and thalattosaurs in the Triassic. In contrast to the Triassic and Jurassic, in the Cretaceous lift-based pelagic swimmers exceed drag-based forms mainly following a reduction of shallow water taxa (Fig. 3A). Additionally, the Cretaceous is characterized by a wider dispersion and reduced clustering of the taxa throughout the functional space.
Mesozoic marine reptiles variously contributed to overall disparity through time (Fig. 3F). Up to their extinction in the early Late Cretaceous, ichthyosauromorphs were major contributors. They were responsible for at least half of the locomotory disparity until the Middle Triassic, followed by sauropterygians and other less diverse groups. During the Early and Middle Jurassic, Sauropterygia matched Ichthyosauromorpha in relative disparity, and together they made up to two thirds of the overall disparity in these time intervals. Thalattosuchians and rhynchocephalians are next in importance in the Jurassic, with partial disparity of Thalattosuchia higher in the Early and Middle Jurassic, and of Rhynchocephalia in the Late Jurassic. The Cretaceous saw the expansion of Pantestudines, a group that had only accounted for a small fraction of overall locomotory disparity during the Jurassic. Finally, sauropterygians increased their relative importance again in the Late Cretaceous, becoming main contributors, followed by Mosasauroidea and Pantestudines. Clade-specific temporal analyses show that Ichthyosauromorpha disparity increased significantly very early in the evolution of the clade and peaked during the Middle Triassic (Fig. 4A). This is followed by a contraction in the Late Triassic, which would soon recover and reach a new high-disparity peak in the Early Jurassic, close in magnitude to that of Middle Triassic. In the Late Jurassic and Early Cretaceous, there is a substantial disparity reduction, although this must be interpreted with caution, because of low sample sizes. No disparity estimates were possible for the Middle Jurassic because of the absence of suitable specimens. Sauropterygia, by contrast, do not peak in disparity during the Triassic (Fig. 4B). Instead, their disparity follows a less steep ascending trend during the Triassic and Early Jurassic, stalls during the Middle and Late Jurassic and finally expands significantly during the Cretaceous to reach a peak in the Late Cretaceous.

Global and clade-specific disparity trends in body size
The analysis of body size shows that trunk length disparity increased significantly between the Early and Middle Triassic (Figs 5, 6; Table S4). This was followed by a reduction, although not statistically significant, in the last part of the Late Triassic. By the Early Jurassic, variability in trunk lengths recovered, increasing steadily thereafter, and leading to a maximum spread of trunk sizes in the Early Cretaceous. A significant but not very substantial reduction occurred in the early Late Cretaceous (i.e. Cenomanian-Coniacian), but trunk length disparity increased markedly in the late Late Cretaceous to higher values than in the Triassic. Mean trunk length followed a rather different trend, with lengths relatively small during the Early and Middle Triassic, and significantly larger in the Carnian. Thereafter, a sustained increase is observed, only interrupted by a non-significant reduction in the Norian-Rhaetian, before a maximum in the Middle Jurassic. It is likely that this peak is unrealistically high because of poor sampling of small-sized taxa such as rhynchocephalians, turtles and thalattosuchians, which are instead quite abundant in the Late Jurassic, a time when trunks were significantly smaller. Finally, a new peak occurs in the last half of the Late Cretaceous (i.e. Santonian-Maastrichtian), when trunk lengths see the highest average values of the whole Mesozoic.
Trends for individual groups diverge from this general pattern (Fig. 5D). For example, in Ichthyosauromorpha the maximum trunk length disparity occurred in the Late Triassic. After this, variation in trunk lengths fell sharply in the Early Jurassic and, although it later recovered, it never reached the levels observed in the Late Triassic. Average trunk lengths show two maxima, one in the Late Triassic and another in the Late Jurassic, with the latter being the highest. Sauropterygians, which co-existed with ichthyosauromorphs for a great part of the Mesozoic, reached their highest trunk disparity in the Early Cretaceous, and values remained high during the Late Cretaceous. The average trunk length also follows a very similar pattern, with average sizes being relatively small during the Triassic, increasing during the Early Jurassic and maintaining an upward trend thereafter to reach a maximum during the Cretaceous. A substantial increase in both disparity and average size is also observed in Mosasauroidea. The mosasaurids from the late Late Cretaceous (i.e. Santonian-Maastrichtian) had significantly longer trunks and displayed a wider range of body sizes compared to the aigialosaur-grade mosasauroids from the early Late Cretaceous (i.e. Cenomanian-Coniacian). Note that the extended dataset used in the trunk length analysis includes three species of 'aigialosaurs'.
Pantestudines, the longest-lived clade of aquatic tetrapods, displayed a consistently small average trunk length as well as low levels of trunk size disparity during most of the Mesozoic. These values only increased moderately but significantly by the Late Cretaceous, when panchelonioideans first appear in the fossil record. Finally, other major groups such as Triassic thalattosaurs and Jurassic thalattosuchians do not show great variation in average trunk size or disparity across their evolution. It is worth mentioning, however, that these two latter groups have small numbers of taxa per sampled time bin, which only allows for a very general pattern to be described.

Swimming modes: evolutionary patterns and convergence
We have presented here the first large-scale study of body plan and locomotory mode evolution in the ensemble of Mesozoic marine reptiles using an anatomy-based, quantitative approach. The locomotory morphospace reveals gradient-like anatomical shifts within clades and across time, as well as a graded distribution of locomotory categories among the living aquatic tetrapods ( Fig. 2A-C). In the past, continuous characters with functional relevance, The morphospace of Mesozoic marine reptiles shows that both axial and appendicular lift-based swimmers occupied relatively large areas of morphospace, suggesting that they had attained a high degree of niche partitioning. Clustering among specialized swimmers can be in part correlated to the balance between manoeuvrability and stability, which results from a complex interplay of multiple anatomical characteristics (Fish 2002;Fish & Lauder 2017). Large bodies, short tails and necks, reduced limbs and high aspect ratios of propulsive and control appendages (e.g. wing-like flippers) are characters promoting stability. On the other hand, manoeuvrability is promoted by small bodies, plesiopedal (hence mobile) limbs, long necks, large limbs and low aspect ratios of propulsive and control appendages (e.g. paddle-shaped autopodia). Specific body plans represent trade-offs between speed and manoeuvrability. In this context, the elasmosaurids Thalassomedon and Morenosaurus are positioned in the most stable extreme of the plesiosaur morphospace, corresponding to fast, highly efficient sustained swimmers. In intermediate positions we find forms that combine swimming efficiency and agility to varying degrees, including derived pliosaurids, polycotylids and cryptoclidids. Elasmosaurine elasmosaurs, a subfamily of elasmosaurs that evolved the longest necks (O'Gorman 2019), are found relatively far from the most stable positions in morphospace. While long necks increased the drag plesiosaurs experienced in forward motion, their large bodies compensated for this (Gutarra et al. 2022a). Whether long necks substantially affected manoeuvrability in these taxa requires further investigation. At the other extreme, with the most manoeuvrable body plans, we find small plesiosauroids and pliosauroids. A similar gradient can be observed in Ichthyosauromorpha  Most basal branching taxa, independent of their clade, are found in a relatively constrained area of the morphospace probably corresponding to a plesiomorphic marine tetrapod anatomy. This is however not true for basal ichthyosauromorphs. Hupehsuchians, nasorostrans and early ichthyosaurians depart notably from this body plan and are excluded from the dense area of drag-based swimmers. Moreover, they do not share morphospace with any other living aquatic tetrapods. The reason for this pattern is their distinctly modified limbs, enlarged autopodia, their compact and often distally expanded propodia and their reduced hindlimbs (Fig. S4), characteristics that have been highlighted in the past (Motani et al. 2015). This early burst of evolution towards a specialized lift-based swimming is consistent with the high early evolutionary rates observed in ichthyosaurs (Moon & Stubbs 2020), and with their evident potential for geographical dispersal from early in their evolution (Bardet et al. 2014). Earlier, more terrestrial forms are missing in the fossil record of ichthyosauromorphs, and these will be crucial to understand their first stages of adaptation to aquatic locomotion.
Another interesting insight of this analysis concerns the swimming mode of mosasaurs. Most mosasauroids were assumed to have been anguilliform swimmers ( Massare 1988;Benson & Butler 2011), but this was challenged by evidence that some derived mosasauroids had morphologies akin to parvipelvian ichthyosaurs (Lindgren et al. 2007(Lindgren et al. , 2008, including the presence of hypocercal tails (Lindgren et al. 2013). We find that in fact mosasaurs converged functionally with ichthyosauromorphs, and that members of Mosasaurinae, Plioplatecarpinae and Tylosaurinae overlap the morphospace of Late Triassic and Early Jurassic ichthyosaurs, which means they were closer to sub-carangiform swimming than to the anguilliform swimming of modern crocodilians ( Fig. 2A-C).
Their location in morphospace also suggests that they were very agile and manoeuvrable. This agrees with other lines of evidence including microanatomy (Houssaye et al. 2013 On the other hand, the data presented here do not support locomotory convergence between metriorhynchids and ichthyosauromorphs. Metriorhynchids are the most derived and aquatically adapted members of Thalattosuchia (Young et al. 2010;Schwab et al. 2020) and they are often regarded as fast, active swimmers functionally akin to ichthyosaurs (Young et al. 2012). Although metriorhynchids occupy a distinct area of morphospace relative to earlier thalattosuchians, they only depart moderately from the teleosauroid body plan ( Fig. 2A-C). A reduction of the hindlimbs is a key feature in living and extinct caudal oscillators but this is not observed in metriorhynchids (Fig. S4). In fact, they retain quite plesiomorphic-looking hindlimbs despite their highly modified forelimbs, which does not support the hypothesis that they were fastcruising sub-carangiform swimmers. Metriorhynchid hindlimbs have been interpreted previously as retaining some terrestrial functions (Hua & Buffrenil 1996; see discussion of possible reproductive constraints in Motani & Vermeij 2021). Additionally, in contrast to other specialized swimmers, for which endothermy has been associated with the evolution of active swimming (Bernard et al. 2010;Houssaye et al. 2013;Fleischle et al. 2019), the evidence for metriorhynchids is not supportive of true endothermy (Hua & Buffrenil 1996;S eon et al. 2020). Although metriorhynchids could warm up their bodies above ambient temperature to a higher degree than teleosaurids, these were generally cooler than those of ichthyosaurs and plesiosaurs (S eon et al. 2020). A certain degree of structural modification to the skeletal microanatomy has been reported for metriorhynchids, such as an increase in spongy bone relative to what is seen in teleosaurids, but this is less pronounced than in ichthyosaurs and cetaceans (Hua & Buffrenil 1996). The fact that metriorhynchids were more adapted to a marine life compared to earlier thalattosuchians is well supported by multiple lines of evidence (Motani & Vermeij 2021), including recent data on inner ear anatomy (Schwab et al. 2020), but further locomotoryspecific biomechanical studies are necessary to fully understand their intriguing mix of plesiomorphic and derived characters and their ecological role in the Mesozoic oceans.

Macroevolutionary patterns
The success of the Mesozoic marine reptile ensemble started with the ecological opportunity that arose after the devastating end-Permian mass extinction (Chen & Benton 2012). Previous work described the biotic recovery in the Early and Middle Triassic as characterized by an extraordinary early burst of phenotypic evolution (Moon & Stubbs 2020), with the Middle Triassic highlighted as the time of maximum trophic disparity (Stubbs & Benton 2016) and highest ecospace expansion (Reeves et al. 2020) in the whole Mesozoic. Here, we have shown that overall locomotory disparity and body size disparity were globally highest in the Cretaceous, in contrast with the pattern of trophic diversification. A high ecological disparity in the Cretaceous has been described previously in a study including body size and locomotory categories (Reeves et al. 2020). Although we note minor peaks in locomotory and body size disparity in the Middle and Late Triassic, the highest levels were not realized until the Early Cretaceous (Figs 3D, 5B, 6, S5B). It must be mentioned that trends in body size are not just associated with locomotion, but also with the feeding function and other aspects of the aquatic adaptation (Fish 2000; Goldbogen 2018), which might explain a relatively larger Triassic peak. Overall, these patterns suggest a 'heads-first' macroevolutionary model for some main clades of Mesozoic marine reptiles, comprising an initial trophic diversification followed by a postcranial diversification, as was described for the radiation of actinopterygian and acanthomorph fishes (Sallan & Friedman 2012). Sauropterygia and Ichthyosauromorpha have been shown to follow evolutionary patterns consistent with early-burst phenotypic evolution (Stubbs & Benton 2016; Moon & Stubbs 2020). Statistical testing for early burst is out of the scope of this research, but the clade-specific analyses for these two groups show contrasting patterns (Fig. 4). In Ichthyosauromorpha, locomotory and body size disparity expand greatly during the early stages of their evolution, coinciding with the early expansion of trophic morphospace (Stubbs & Benton 2016). This is clearly not the case for Sauropterygia: their trophic and locomotory diversification seem to have occurred at a different pace, with trophic disparity being greatest in the Triassic (Stubbs & Benton 2016) and locomotory and body disparity reaching its maximum in the Cretaceous. This analysis then adds to the evidence against the hypothesis of a universal model of phenotypic diversification in adaptive radiations (Collar et al. 2008;Sallan & Friedman 2012;Muschick et al. 2014). Further analyses including model fitting in a phylogenetic background are necessary to understand the mode of locomotory evolution in all major groups of Mesozoic marine reptiles, their relationships to trophic disparity and the drivers behind the group differences.
It is worth mentioning that although locomotory disparity is significantly highest in the Early Cretaceous ( Fig. 3D), the broad patterns indicate it had already reached high levels in the Middle to Late Jurassic and that these values remained high throughout the Cretaceous with minor fluctuations. This is in line with recent findings of a high ecological disparity in marine tetrapods in the Late Jurassic that was maintained, if not exceeded, during the Cretaceous (Reeves et al. 2020), a time characterized by the consolidation of complex marine pelagic food webs (Hull 2017). The global patterns of locomotory disparity described here (Fig. 3C-E) can be associated with abiotic factors such as changes in sea level and ocean productivity, previously suggested as major drivers of Mesozoic vertebrate diversity (Benson & Butler 2011; Kelley et al. 2014;Pyenson et al. 2014). The Cretaceous was not only the time in the Mesozoic with highest sea levels, but it also saw an important shift in the productivity regimes in the oceans, major peaks of seafloor spreading, expansion of continental shelf habitats and emergence of vast epicontinental seaways (Takashima et al. 2006). During this period, planktonic calcifiers such as dinoflagellates became prominent, stabilizing the carbon cycle, increasing the flow of nutrients to higher trophic levels (Hull 2017). Upwelling and the rise in productivity in the Cretaceous are thus likely drivers of the expansion in locomotory morphospace of lift-based specialized swimmers such as derived mosasaurs, sea turtles and plesiosaurs, as suggested before (Benson & Butler 2011;Vincent et al. 2013;Polcyn et al. 2014), although no strong driving relationship has been found for the evolution of limb morphology in mosasaurs (Cross et al. 2022). Moreover, disparity remained high throughout the Cretaceous. The contraction recorded in the Cenomanian-Coniacian (Fig. 3D) can be partly explained by the absence of ichthyosaur specimens. Although platypterygiine ichthyosaurs survived until the end of the Cenomanian, which marked the extinction of ichthyosaurs (Fischer et al. 2016), there are no complete specimens, and we had to omit these final records. The minor peak of disparity in the Carnian (Fig. 3D) also coincides with the highest sea levels during the Triassic transgressive cycle, higher availability of coastal habitats, and nutrient concentration in shallow waters (Kelley et al. 2014).
Two major turnover events during the Mesozoic greatly affected diversity and disparity at various levels in the marine realm (Takashima et al. 2006;Benson & Butler 2011). These catastrophic episodes, characterized by major marine regressions, occurred at the end-Triassic (Kelley et al. 2014;Dunhill et al. 2018) Benton 2016), however, locomotory disparity quickly recovered and surpassed preextinction levels by the end of the Early Jurassic. This point elicits a comment on the inadequacy of using habitat as a proxy for locomotion. The end-Triassic extinction selectively affected coastal dwellers (Kelley et al. 2014), but our analysis shows that non-specialized drag-based swimmers were not the only ones to go extinct; some relatively specialized swimmers disappeared as well, such as shonisaurid and mixosaurid ichthyosaurs. These forms may have retained an intimate link with coastal resources in spite of their more specialized swimming adaptations, as is the case for sirenians (Anderson & Birtles 1978) or some species of modern cetaceans (De Boer et al. 2014), making them especially vulnerable.
The second major environmental disruption, the Jurassic-Cretaceous transition, did not seem to cause dramatic effects in overall locomotor disparity (Fig. 3D,  Fig. S5B). This event has been reported to have caused a great decline in taxic diversity and trophic disparity, affecting to a greater extent low-latitude, shallow marine faunas (Tennant et al. 2017). Consistent with this, a reduction in the area occupied by drag-based swimmers is observed in the time-based analysis, but the overall morphospace configuration and disparity were not greatly affected.

Evolution of large sizes
Body size is a crucial aspect of the biology and ecology of vertebrates. Multiple studies have shown that large sizes confer particular energy-related benefits to aquatic life (Goldbogen 2018). For example, large animals have larger metabolic costs in absolute terms but much lower mass-specific costs than smaller forms (White et al. 2009). Mass-specific costs of locomotion are also lower for large animals (Fish 2000), partly due to the scaling effects on the drag-related costs of swimming (Gutarra et al. 2019(Gutarra et al. , 2022a. Recent research on aquatic mammals has shown that an optimal body size attractor seems to be at play in various aquatic mammal clades (Gearty et al. 2018), providing important insights into the issue of energetic constraints on body size. This analysis suggests that an optimal body size might have existed in ichthyosauromorphs and sauropterygians (Fig. 5D). Both groups show substantial increases in trunk length throughout their evolution, which seems to plateau slightly under 2 m in both groups, but they did so at different paces. The differences reported here between the temporal patterns of body size evolution in these two groups are consistent with previous studies, with sizes increasing fast and early in ichthyosauromorphs (Stubbs & Benton 2016;Moon & Stubbs 2020;Sander et al. 2021), and more gradually in sauropterygians (Stubbs & Benton 2016;Soul & Benson 2017;Gutarra et al. 2022a). Whether either of these clades evolved toward a certain size attractor and how these patterns compare to aquatic mammals remains unexplored. Future comparative phylogenetic analyses are required to test this hypothesis formally and better understand the drivers and constraints behind the evolution of larger sizes in Mesozoic marine reptiles.

Limitations and biases
The requirement of complete fossils for this analysis limits the application of phylogenetic comparative methods across all Mesozoic marine reptiles. Fortunately, we were able to include a good representation of morphotypes within the main groups. Some of the signal observed in the Triassic might be partly influenced by a Lagerst€ atten effect, a shortcoming amply addressed by a number of authors (Flannery Sutherland et al. 2019), but the rest of the peaks of locomotory and body size disparity do not coincide with peaks in sample size, and thus represent actual variations in phenotypic diversity (Fig. 6). Additionally, the sum of variances, used here to measure locomotory disparity, is less susceptible to sample size bias than other metrics such as the sum of ranges (Stubbs & Benton 2016). The lack of very complete specimens in some time intervals caused artefacts in the patterns for a few groups. For example, the apparent contraction in the morphospace of turtles during the Early and Middle Jurassic was caused by a gap in their fossil record. This is also the case for the lack of complete rhynchocephalian fossils in the Middle Jurassic.
This study provides a framework for comparative studies more broadly in extant and extinct secondarily aquatic tetrapods. However, the inability to include hindlimb-less caudal oscillators such as modern cetaceans and sirenians, needs to be addressed. Possible solutions are the combination of categorical and continuous traits to code for missing hindlimbs, or the addition of vertebral characters, shown to be key in the evolution of thunniform swimming (Buchholtz & Schur 2004). Another limitation of this morphospace-based approach is the great overlap observed among drag-based taxa. Although this is mainly because plesiomorphic morphologies are shared by the less specialized forms, the inclusion of additional characters describing backbone flexibility or bone robustness might improve resolution. It is nevertheless worth noting that living taxa, used here as reference points, are classified based on the main mode of locomotion, but many semiaquatic animals are known to switch between modes according to need. For example, otters can undulate when they practice fully submerged swimming and paddle when they swim at the surface (Fish 1994). Fossils that plot in areas of transition between different swimming modes might indicate such behavioural shifts.

CONCLUSION
Here we present the first large-scale analysis of locomotory disparity in Mesozoic marine reptiles. Morphospace analysis of multiple functional characters and body size shows a continuous distribution of the morphology associated with different swimming modes, and identifies two divergent evolutionary paths: (1) from drag-based to liftbased locomotion in the axial spectrum; and (2) from drag-based to lift-based locomotion in the appendicular spectrum. These two evolutionary paths are best represented by Ichthyosauromorpha and Sauropterygia, the two groups that attained the highest locomotory disparity of all Mesozoic marine reptiles.
We did not find evidence of an explosive expansion of body plan and locomotory disparity following the end-Permian extinction, unlike previous findings for the diversification of trophic function (Stubbs & Benton 2016), ecological niche occupation (Dick & Maxwell 2015;Reeves et al. 2020) or general body disparity based on phylogenetic characters (Moon & Stubbs 2020). Instead, time-based analysis shows a gradual increase of locomotory disparity throughout the Mesozoic to a highest point in the Cretaceous. It is likely that this pattern is associated with global changes in sea level and ocean productivity, both of which peaked in the Cretaceous. Individual groups differed from these global patterns. For example, ichthyosauromorphs peaked early, during the Triassic, while in sauropterygians the greatest expansion of locomotory morphospace and disparity occurred in the Cretaceous. This suggests that responses to diversification drivers are influenced by biological factors. Body size disparity follows similar trends to locomotory disparity, with the highest range in the Cretaceous, which confirms a strong connection between the two. Locomotory disparity and ranges of body size in Mesozoic marine reptiles were greatly impacted by the end-Triassic extinction event, coinciding with the extinction of whole clades of shallowwater taxa, but was not significantly affected by the end-Jurassic extinction.
Finally, our analysis also sheds light on locomotory transitions in some of the main clades of Mesozoic marine reptiles: basal ichthyosauromorphs for example, plot separately to basal forms from other clades, showing this group had a high aquatic specialization from very early in their evolution. Additionally, a clear morphospace overlap, strongly suggestive of convergence, is observed between ichthyosauromorphs and mosasauroids, which supports the evolution of a subcarangiform mode of swimming in Mosasauridae. Such overlap is not found for metriorhynchid thalattosuchians, which show a puzzling mix of traits such as plesiomorphic hindlimbs and forelimb modified into flippers, whose functional meaning needs to be further explored. Finally, in sauropterygians, we confirm evidence that a transition from rowing to underwater flight occurred in pistosauroids.

DATA ARCHIVING STATEMENT
Data for this study are available in the GitHub Digital Repository: https://github.com/SusanaGutarra/Mesozoic-Marine- Reptiles_morphospace-disparity Editor. Laura Porro

SUPPORTING INFORMATION
Additional Supporting Information can be found online (https:// doi.org/10.1111/pala.12645): Fig. S1. Labelled morphospace plots for Mesozoic marine reptiles and extant tetrapods. Fig. S2. Morphospace occupation and density distribution. Fig. S3. Character contributions to the locomotory morphospace. Fig. S4. Character contribution to the locomotory morphospace visualized per taxon. Fig. S5. Time-based analyses of disparity using alternative time intervals. Table S1. Eigenvalues and their contribution to total variance for each principal component axis. Table S2. Time intervals used for the disparity analyses. Table S3. Comparative tests for differences in locomotory disparity and morphospace occupation. Table S4. Comparative tests for differences in trunk length dispersion and mean trunk length in Mesozoic marine reptiles.
Appendix S1. Figures S1-S5, Tables S1-S4. Description of functional characters. Inference of missing data. Supplementary references. Energetic tradeoffs control the size distribution of aquatic mammals. Proceedings of the National Academy of Sciences,