/* Cell Migration Lab – look and feel (#25: editorial, microscopy-led, restrained).
 *
 * - White pages, charcoal text, thin rules, a dark footer.
 * - Research and Software tiles take four surfaces in turn: white, lavender,
 *   light grey, deep purple (config.TILE_SURFACES).
 * - One accent, purple (--cm-accent*): data visualisation, lab-author names,
 *   tile surfaces, active and focus states. No other accent colour (the
 *   preprint and open-access badges and the video play button keep their own).
 * - Inter for everything; Bodoni only for the lab wordmark and the marks
 *   derived from it (member initials, card placeholders).
 * - Tile and card pictures fill their frame (cover) unless the data says
 *   `fit: contain`; featured-paper pictures and the gallery are never cropped.
 * Fonts are self-hosted (docs/assets/fonts, SIL Open Font License), so the
 * site makes no requests to Google.
 */

@font-face { font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("../fonts/inter-latin-wght-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("../fonts/inter-latin-ext-wght-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Bodoni Moda"; font-style: normal; font-weight: 400 900; font-display: swap;
  src: url("../fonts/bodoni-moda-latin-wght-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Bodoni Moda"; font-style: normal; font-weight: 400 900; font-display: swap;
  src: url("../fonts/bodoni-moda-latin-ext-wght-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
  --cm-bg: #ffffff;
  --cm-fg: #444444;          /* body text, as on the WordPress site */
  --cm-strong: #111111;      /* headings, links */
  --cm-muted: #6b6b6b;
  --cm-line: #e6e6e6;
  --cm-soft: #f5f5f4;
  --cm-footer: #140d0d;
  --cm-accent: #7a35c4;        /* the one accent (charts, highlights) */
  --cm-accent-strong: #4f2182; /* text, active and focus states on white (9.9:1) */
  --cm-accent-soft: #efe8f8;   /* pale accent surface */
  --cm-accent-deep: #3b1a63;   /* deep accent surface (white text, 14:1) */
  --cm-on-accent: #ffffff;
  --cm-highlight: var(--cm-accent-soft);
  --cm-text: 41.6rem;          /* the home page's "more" links */
  --cm-button-w: 16rem;      /* the width of every button in a row: fits the longest label */
  --cm-wide: 52rem;          /* page width: tiles, grids, header and footer */
  --cm-gutter: clamp(.8rem, 4vw, 2rem);
  --cm-serif: "Bodoni Moda", "Didot", "Bodoni 72", Georgia, serif;
  --cm-sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --md-text-font: "Inter";
  --md-primary-fg-color: #111111;
  --md-primary-fg-color--light: #444444;
  --md-primary-fg-color--dark: #000000;
  --md-accent-fg-color: #111111;
  --md-typeset-a-color: #111111;
  --md-default-fg-color: #444444;
  --md-default-fg-color--light: #6b6b6b;
}

html { scroll-padding-top: 4rem; }
body { background: var(--cm-bg); color: var(--cm-fg); font-family: var(--cm-sans); -webkit-font-smoothing: antialiased; }
body, input, button { font-feature-settings: "cv11", "ss01"; }
.md-typeset { font-size: .8rem; line-height: 1.7; color: var(--cm-fg); }
.md-main__inner { margin-top: 0; }
.md-container { padding-top: 0; }

/* Text links, the same everywhere in the content: dark, thin underline, the
   accent colour on hover; they never change weight or underline thickness.
   (Buttons, cards and the menu and footer have their own look.) */
.md-typeset a { color: var(--cm-strong); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .18em; transition: color .15s; }
.md-typeset a:hover, .md-typeset a:focus { color: var(--cm-accent-strong); text-decoration-thickness: 1px; }   /* the purple of highlighted lab members */
:focus-visible { outline: 2px solid var(--cm-accent-strong); outline-offset: 3px; }

.md-typeset h1 { font-weight: 400; font-size: clamp(1.36rem, 3vw, 1.68rem); color: var(--cm-fg); letter-spacing: -.01em; margin: 0 0 .8em; }
.md-typeset h2 { font-weight: 400; font-size: 1.16rem; color: var(--cm-fg); letter-spacing: .02em; margin: 2.2em 0 .7em; }
.md-typeset h3 { font-weight: 500; font-size: .88rem; color: var(--cm-strong); }
.md-typeset hr { border-color: var(--cm-line); }
.md-typeset figure { display: block; width: auto; margin: 1.6rem auto; }
.cm-content .md-typeset > figure { margin: 2rem 0; }
.cm-content .md-typeset > figure img { display: block; width: 100%; }   /* a picture in the page text: the page width, like the tiles */
.md-typeset figcaption { font-size: .656rem; color: var(--cm-muted); max-width: 32rem; margin: .48rem auto 0; font-style: normal; }
.md-typeset img, .md-typeset video { max-width: 100%; height: auto; }
.md-typeset video { display: block; width: 100%; background: #000; }

.cm-lead { font-size: .96rem; font-weight: 300; color: var(--cm-fg); letter-spacing: .01em; }
.cm-small { font-size: .68rem; color: var(--cm-muted); }
.cm-visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ------------------------------------------------------------------ header */

.cm-header { position: sticky; top: 0; z-index: 20; background: rgba(255, 255, 255, .94); -webkit-backdrop-filter: saturate(1.4) blur(8px); backdrop-filter: saturate(1.4) blur(8px);   /* Safari before 18 needs the prefix */ border-bottom: 1px solid transparent; transition: border-color .2s; }
.cm-header.is-scrolled { border-bottom-color: var(--cm-line); }
.cm-header__inner { display: flex; align-items: center; gap: 1.2rem; max-width: calc(var(--cm-wide) + 2 * var(--cm-gutter)); margin: 0 auto; padding: .76rem var(--cm-gutter); }
.cm-brand { font-family: var(--cm-serif); font-weight: 700; font-size: .92rem; letter-spacing: .02em; text-transform: uppercase; color: var(--cm-strong); text-decoration: none; white-space: nowrap; }
.cm-brand:hover { color: var(--cm-strong); opacity: .75; }
.cm-menu { display: flex; flex-wrap: nowrap; justify-content: flex-end; gap: .12rem .84rem; list-style: none; margin: 0 0 0 auto; padding: 0; }
.cm-menu a { display: block; white-space: nowrap; padding: .24rem 0; font-size: .62rem; font-weight: 500; letter-spacing: .1em; text-transform: uppercase; color: var(--cm-fg); text-decoration: none; border-bottom: 1px solid transparent; }
.cm-menu a:hover { color: var(--cm-strong); border-bottom-color: currentColor; }
.cm-menu a.is-active { color: var(--cm-accent-strong); border-bottom-color: currentColor; }
.cm-header__tools { display: flex; align-items: center; gap: .4rem; }
.cm-menu-toggle { position: absolute; opacity: 0; pointer-events: none; }
.cm-burger { display: none; width: 1.76rem; height: 1.76rem; cursor: pointer; position: relative; }
.cm-burger span { position: absolute; left: .36rem; right: .36rem; height: 1.5px; background: var(--cm-strong); transition: transform .2s; }
.cm-burger span:first-child { top: .68rem; }
.cm-burger span:last-child { top: 1.04rem; }
.cm-menu-toggle:checked ~ .cm-header__tools .cm-burger span:first-child { transform: translateY(.184rem) rotate(45deg); }
.cm-menu-toggle:checked ~ .cm-header__tools .cm-burger span:last-child { transform: translateY(-.23rem) rotate(-45deg); }

/* Search button (Zensical search opens a dialog) */
.cm-header .md-search { position: static; }
.cm-header .md-search__button { font-size: 0; width: 1.76rem; height: 1.76rem; border-radius: 50%; background: transparent; color: var(--cm-strong); }
.cm-header .md-search__button::before { width: .88rem; height: .88rem; background-color: var(--cm-strong); }
.cm-header .md-search__button:hover { background: var(--cm-soft); }
.cm-header .md-search__button::after { display: none; }

@media (max-width: 72rem) {   /* the 8 menu items need about 1150 px */
  .cm-header__tools { margin-left: auto; }
  .cm-burger { display: block; }
  .cm-menu { display: none; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; gap: 0; margin: 0; padding: .4rem var(--cm-gutter) 1.2rem; background: #fff; border-bottom: 1px solid var(--cm-line); box-shadow: 0 .8rem 1.6rem rgba(0, 0, 0, .06); }
  .cm-menu a { padding: .6rem 0; font-size: .68rem; border-bottom: 1px solid var(--cm-line); }
  .cm-menu a.is-active { border-bottom-color: var(--cm-line); font-weight: 700; }
  .cm-menu-toggle:checked ~ .cm-menu { display: flex; }
}

/* ------------------------------------------------------------------ layout */

.md-main__inner.md-grid { max-width: none; margin: 0; }
/* Every page has the same width: the width of the tiles and grids */
.cm-content { max-width: calc(var(--cm-wide) + 2 * var(--cm-gutter)); margin: 0 auto; padding: 0 var(--cm-gutter); float: none; }
.cm-content .cm-wide, .cm-content .cm-cards, .cm-content .cm-talks, .cm-content .md-typeset ul.cm-gallery { --w: 100%; }   /* already the page width: no breakout (100vw counts a scrollbar) */
.cm-content .md-content__inner { margin: 2rem 0 4rem; padding: 0; }
.cm-content .md-content__inner::before { display: none; }
.cm-content .md-content__button { float: right; margin: .32rem 0 0 .8rem; opacity: .35; }
.cm-content .md-content__button:hover { opacity: 1; }
.cm-wide, .cm-cards, .cm-talks, .md-typeset ul.cm-gallery { --w: min(var(--cm-wide), 100% - 2 * var(--cm-gutter));   /* 100%, not 100vw: a scrollbar would shift it */ width: var(--w); }
/* On the home page: wider than its text and centred on the page. A margin,
   not a transform: Safari can shift or blur transformed content by half a pixel. */
.cm-wide, .cm-cards, .cm-talks { margin: 1.6rem 0 1.6rem calc(50% - var(--w) / 2); }

/* Section titles: small caps with a hairline on both sides ("FEATURED RESEARCH") */
.md-typeset .cm-section-title { display: flex; align-items: center; gap: 1.2rem; margin: 3.6rem auto 1.6rem; max-width: 33.6rem; font-size: .64rem; font-weight: 500; letter-spacing: .35em; text-transform: uppercase; color: var(--cm-fg); text-align: center; }
.md-typeset .cm-section-title::before, .md-typeset .cm-section-title::after { content: ""; flex: 1; height: 1px; background: var(--cm-line); }

.cm-button, .md-typeset .cm-button { display: inline-block; margin: .2rem .32rem .2rem 0; padding: .48rem .88rem; border: 1px solid var(--cm-strong); background: var(--cm-strong); color: #fff; font-size: .624rem; font-weight: 500; letter-spacing: .12em; text-transform: uppercase; text-decoration: none; transition: background .15s, color .15s; }
.md-typeset .cm-button:hover { background: #fff; color: var(--cm-strong); }
.md-typeset .cm-button--ghost { background: transparent; color: var(--cm-strong); }
.md-typeset .cm-button--ghost:hover { background: var(--cm-strong); color: #fff; }
.cm-cta { margin: 2.4rem 0; }
.cm-research-links, .cm-section-nav { margin: 0 0 1.6rem; }
/* Button rows (section links, page-end links, paper links): the row is centred, every button has
   the same width, and on a phone they stack at the full width. */
.md-typeset :is(.cm-section-nav, .cm-research-links, .cm-cta, .cm-story__links) { display: flex; flex-wrap: wrap; justify-content: center; gap: .6rem; }
.md-typeset :is(.cm-section-nav, .cm-research-links, .cm-cta, .cm-story__links) > .cm-button { flex: 0 1 var(--cm-button-w); margin: 0; text-align: center; }
@media (max-width: 40rem) { .md-typeset :is(.cm-section-nav, .cm-research-links, .cm-cta, .cm-story__links) > .cm-button { flex: 1 1 100%; } }
/* Buttons inside a text block (a software tile, the address box): one column, each as wide as the block. */
.md-typeset .cm-buttons { display: grid; grid-template-columns: minmax(0, 1fr); gap: .5rem; margin: 1.12rem 0 0; }
.md-typeset .cm-buttons > .cm-button { margin: 0; text-align: center; }
.md-typeset span.cm-button:hover { background: var(--cm-strong); color: #fff; }   /* the current page's button: not a link */
.cm-more-link { text-align: center; margin: 1.2rem 0 0; font-size: .64rem; letter-spacing: .15em; text-transform: uppercase; }

.cm-badge { display: inline-block; margin-left: .28rem; padding: .04rem .36rem; border-radius: .8rem; background: var(--cm-soft); color: var(--cm-fg); font-size: .6rem; font-style: normal; font-weight: 600; letter-spacing: .04em; vertical-align: .1em; white-space: nowrap; }
.cm-badge--preprint { background: #fff1e6; color: #9a3b00; }
.cm-badge--oa { background: #e8f5ee; color: #1d6b3f; }

/* ------------------------------------------------------------------ home */

.cm-home { max-width: none; margin: 0; float: none; }
.cm-home .md-typeset { margin: 0; }
.cm-hero__text { display: grid; grid-template-columns: minmax(0, 1fr); align-items: end;   /* one column: the title only (#25) */ gap: 1.6rem; max-width: calc(var(--cm-wide) + 2 * var(--cm-gutter)); margin: 0 auto; padding: clamp(1.6rem, 6vw, 3.6rem) var(--cm-gutter) clamp(1.6rem, 5vw, 2.8rem); }
.md-typeset .cm-hero__title { margin: 0; text-align: center;   /* like the intro and the section titles below it */ font-size: clamp(1.52rem, 4.4vw, 2.64rem); font-weight: 200; line-height: 1.22; letter-spacing: .14em; text-transform: uppercase; color: var(--cm-fg); overflow-wrap: normal; hyphens: none; }
.md-typeset .cm-hero__image, .md-typeset .cm-band { display: block; width: 100%; max-width: none; }
.md-typeset .cm-hero__image { margin: 0; height: clamp(14.4rem, 48vw, 33.6rem); background: #000; }
.cm-hero__image img, .cm-hero__image video { width: 100%; height: 100%; object-fit: cover; }
.cm-intro { max-width: 36.8rem; margin: clamp(2.8rem, 8vw, 5.2rem) auto; padding: 0 var(--cm-gutter); text-align: center; font-size: clamp(.92rem, 2vw, 1.16rem); font-weight: 300; line-height: 1.65; color: var(--cm-fg); }
.cm-home .cm-more-link { max-width: var(--cm-text); margin-left: auto; margin-right: auto; padding: 0 var(--cm-gutter); }
.md-typeset .cm-band { position: relative; margin: 4rem 0 0; height: clamp(11.2rem, 34vw, 22.4rem); overflow: hidden; background: #000; }
.cm-band img, .cm-band video { width: 100%; height: 100%; object-fit: cover; }
.md-typeset .cm-band figcaption { position: absolute; left: var(--cm-gutter); bottom: .8rem; margin: 0; padding: .16rem .48rem; background: rgba(0, 0, 0, .55); color: #fff; font-size: .6rem; }

.md-typeset ul.cm-logos, .md-typeset ul.cm-people, .md-typeset ul.cm-covers, .md-typeset ul.cm-gallery, .md-typeset ul.cm-alumni, .md-typeset ul.cm-datasets, .md-typeset ul.cm-resources, .md-typeset ol.cm-pubs { list-style: none; margin-left: 0; }
[dir] .md-typeset .cm-logos > li, [dir] .md-typeset .cm-people > li, [dir] .md-typeset .cm-pubs > li, [dir] .md-typeset .cm-covers > li, [dir] .md-typeset .cm-gallery > li, [dir] .md-typeset .cm-alumni > li, [dir] .md-typeset .cm-datasets > li, [dir] .md-typeset .cm-resources > li { margin-left: 0; list-style: none; }
.md-typeset ul.cm-logos { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 1.6rem 2.8rem; max-width: calc(var(--cm-wide) + 2 * var(--cm-gutter)); margin: 0 auto !important; padding: 0 var(--cm-gutter) !important; list-style: none; }
.md-typeset .cm-logos li { margin: 0; }
/* Logos keep the size set in components.logo_size() (equal visual area, aspect
   ratio kept); on narrow screens they only shrink, proportionally. */
.cm-logos img { display: block; max-width: 100%; height: auto; filter: grayscale(1); opacity: .8; transition: filter .2s, opacity .2s; }
.cm-logos a:hover img { filter: none; opacity: 1; }
@media (max-width: 40rem) { .md-typeset ul.cm-logos { gap: 1.2rem 2rem; } }
.cm-logos__text { display: block; max-width: 9.6rem; font-size: .8rem; font-weight: 600; line-height: 1.3; text-align: center; color: var(--md-default-fg-color--light); }
.cm-logos a:hover .cm-logos__text { color: var(--md-default-fg-color); }

@media (max-width: 40rem) { .cm-hero__text { gap: .8rem; } .md-typeset .cm-hero__title { letter-spacing: .1em; } }

/* ------------------------------------------------------------------ cards */

.cm-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(12.8rem, 100%), 1fr)); gap: 1.6rem 1.4rem; }
.cm-cards--home { grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 0 auto; }
.md-typeset a.cm-card { display: block; color: var(--cm-fg); text-decoration: none; }
.cm-card__media { aspect-ratio: 1; overflow: hidden; background: var(--cm-soft); }
.cm-card__media img, .cm-card__media video { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.cm-card:hover .cm-card__media img, .cm-card:hover .cm-card__media video { transform: scale(1.035); }
.md-typeset a.cm-card:hover .cm-card__title, .md-typeset a.cm-card:focus .cm-card__title { color: var(--cm-accent-strong); }   /* the title reacts like a text link */
.md-typeset .cm-card__title { margin: .64rem 0 0; font-size: .736rem; line-height: 1.45; color: var(--cm-strong); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .18em; text-align: center; }
.md-typeset .cm-card__meta { margin: .64rem 0 0; font-size: .6rem; color: var(--cm-muted); }
.md-typeset .cm-card__meta .cm-badge { margin-left: .16rem; }
@media (max-width: 50rem) { .cm-cards--home { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; } }
@media (max-width: 30rem) { .cm-cards--home { grid-template-columns: 1fr; } }

/* ------------------------------------------------------------------ tiles */

.cm-tile { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);   /* picture 40%, text 60% */ margin: 0 0 1.2rem; color: #111; overflow: hidden; }
.cm-tile--right { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); }
.cm-tile--right .cm-tile__media { order: 2; }
.cm-tile--text { grid-template-columns: 1fr; }
.cm-tile__media { aspect-ratio: 1; align-self: center; background: rgba(0, 0, 0, .06); display: flex; align-items: center; justify-content: center; }   /* square, however long the text: not stretched to its height */
.cm-tile__media img, .cm-tile__media video { width: 100%; height: 100%; object-fit: cover; }
/* fit: contain (data files): a logo or drawing is shown whole, with a margin */
.cm-fit-contain img, .cm-fit-contain video { object-fit: contain !important; padding: 1.2rem; }
.cm-card__media.cm-fit-contain { background: #fff; box-shadow: inset 0 0 0 1px var(--cm-line); }
.cm-tile__body { padding: clamp(1.4rem, 4vw, 2.8rem); font-size: .76rem; align-self: center; }
.md-typeset .cm-tile h2 { margin: 0 0 .88rem; font-size: clamp(1.04rem, 2.2vw, 1.32rem); font-weight: 400; letter-spacing: .08em; line-height: 1.3; color: inherit; }
.md-typeset .cm-tile p { margin: 0 0 .72rem; }
.md-typeset .cm-tile a { color: inherit; }
.md-typeset .cm-tile a:hover, .md-typeset .cm-tile a:focus { color: var(--cm-accent-strong); }   /* the rule above would cancel it */
.md-typeset .cm-tile__lead { font-size: .84rem; font-weight: 500; }
.md-typeset .cm-tile__label { margin-top: 1.12rem !important; font-size: .56rem; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; opacity: .8; }
.md-typeset ul.cm-tile__papers { margin: 0 0 .8rem; padding: 0; list-style: none; font-size: .68rem; }
.md-typeset .cm-tile__papers li { margin: 0 0 .36rem; padding-left: .72rem; border-left: 2px solid currentColor; line-height: 1.45; }
.md-typeset .cm-ref__meta { color: var(--cm-muted); }   /* the journal · year of a short reference */
.md-typeset .cm-tile__credit { margin-top: .96rem !important; font-size: .624rem; opacity: .85; }
.md-typeset .cm-tile__buttons { display: grid; grid-template-columns: minmax(0, 1fr); gap: .5rem; margin-top: 1.12rem !important; }   /* one column: each button as wide as the text */
.md-typeset .cm-tile .cm-tile__buttons .cm-button { margin: 0; display: inline-flex; align-items: center; justify-content: center; text-align: center; gap: .4rem; background: var(--cm-strong); color: #fff; }   /* beats the tile's link colour */
.md-typeset .cm-tile .cm-tile__buttons .cm-button:hover, .md-typeset .cm-tile .cm-tile__buttons .cm-button:focus { background: #fff; color: var(--cm-strong); }
.md-typeset .cm-tile .cm-tile__buttons .cm-button--ghost { background: transparent; color: var(--cm-strong); }
.md-typeset .cm-tile .cm-tile__buttons .cm-button--ghost:hover, .md-typeset .cm-tile .cm-tile__buttons .cm-button--ghost:focus { background: var(--cm-strong); color: #fff; }
.cm-tile__buttons .cm-button svg { width: .8rem; height: .8rem; fill: currentColor; flex: none; }
.cm-tile__buttons .cm-venue { font-style: normal; }
.cm-tile__buttons .cm-badge { margin-left: .1rem; text-transform: none; letter-spacing: .02em; vertical-align: 0; }
/* On purple, the buttons are white (filled) and white-outlined (ghost) */
.md-typeset .cm-tile--purple .cm-tile__buttons .cm-button { background: #fff; border-color: #fff; color: var(--cm-accent-deep); }
.md-typeset .cm-tile--purple .cm-tile__buttons .cm-button:hover, .md-typeset .cm-tile--purple .cm-tile__buttons .cm-button:focus,
.md-typeset .cm-tile--purple .cm-tile__buttons .cm-button--ghost { background: transparent; color: #fff; }
.md-typeset .cm-tile--purple .cm-tile__buttons .cm-button--ghost:hover, .md-typeset .cm-tile--purple .cm-tile__buttons .cm-button--ghost:focus { background: #fff; color: var(--cm-accent-deep); }

.cm-tile--white { background: #fff; box-shadow: inset 0 0 0 1px var(--cm-line); }
.cm-tile--lavender { background: var(--cm-accent-soft); color: #1d1330; }
.cm-tile--light { background: var(--cm-soft); }
.cm-tile--purple { background: var(--cm-accent-deep); color: #f5f0fb; }
.md-typeset .cm-tile--purple a:hover, .md-typeset .cm-tile--purple a:focus { color: #cfa9f7; }   /* a light accent: the accent itself would vanish on purple */
.cm-tile--white .cm-tile__media, .cm-tile--lavender .cm-tile__media, .cm-tile--light .cm-tile__media { background: transparent; }

@media (max-width: 48rem) {
  .cm-tile { grid-template-columns: 1fr; }
  .cm-tile--right .cm-tile__media { order: 0; }
  .cm-tile__media { aspect-ratio: auto; max-height: 20.8rem; }
}

/* ------------------------------------------------------------------ research videos */

.cm-videos { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(12rem, 100%), 1fr)); gap: 1.2rem; margin: 1.2rem 0 2.4rem; }
.md-typeset .cm-videos figure { margin: 0; }
.md-typeset .cm-videos figcaption { text-align: center; font-weight: 500; color: var(--cm-strong); }   /* a title, as on Online talks */
.cm-video { position: relative; aspect-ratio: 16 / 9; background: #000 var(--thumb) center / cover no-repeat; }
.cm-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.md-typeset .cm-video__play { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: linear-gradient(transparent 55%, rgba(0, 0, 0, .35)); }
.cm-video__icon { width: 3.36rem; height: 3.36rem; border-radius: 50%; background: rgba(17, 17, 17, .78); transition: transform .15s, background .15s; position: relative; }
.cm-video__icon::after { content: ""; position: absolute; left: 1.32rem; top: 1rem; border-style: solid; border-width: .68rem 0 .68rem 1.08rem; border-color: transparent transparent transparent #fff; }
.cm-video__play:hover .cm-video__icon { transform: scale(1.08); background: #ff0033; }

.cm-talks { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(16rem, 100%), 1fr)); gap: 2rem 1.6rem; }
.md-typeset .cm-talk { margin: 0; }
.md-typeset .cm-talk figcaption { margin: .64rem 0 0; max-width: none; color: var(--cm-fg); font-size: .76rem; }
.cm-talk figcaption strong { display: block; font-weight: 500; color: var(--cm-strong); }
.cm-talk figcaption span { font-size: .64rem; color: var(--cm-muted); }

/* ------------------------------------------------------------------ people */

.md-typeset ul.cm-people { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(12rem, 100%), 1fr));   /* four across at the page width */ gap: .8rem; margin: 0 !important; padding: 0 !important; list-style: none; }
.md-typeset .cm-person { margin: 0; }
.md-typeset .cm-person figure { position: relative; margin: 0; aspect-ratio: 1; overflow: hidden; background: #222; }
.cm-person img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.cm-person:hover img { transform: scale(1.04); }
.md-typeset .cm-person a { color: inherit; text-decoration: none; }
.md-typeset .cm-person figcaption .cm-person__name a:hover { color: #fff; text-decoration: underline; }
.md-typeset .cm-person--join figure { background: var(--cm-accent-deep); }
.md-typeset .cm-person--join:hover figure { background: var(--cm-accent-strong); }
.md-typeset .cm-person--join .cm-person__initials { color: #fff; font-family: var(--cm-sans); font-weight: 200; font-size: 3.2rem; }
.cm-person__initials { display: flex; align-items: center; justify-content: center; height: 100%; font-family: var(--cm-serif); font-size: 2.4rem; color: #eee; }
.md-typeset .cm-person figcaption { position: absolute; inset: auto 0 0 0; margin: 0; max-width: none; padding: 2rem .64rem .6rem; background: linear-gradient(transparent, rgba(0, 0, 0, .78)); color: #fff; text-align: left; }
.cm-person__name { display: block; font-size: .736rem; font-weight: 600; line-height: 1.3; }
.cm-person__role { display: block; font-size: .608rem; opacity: .9; }
.cm-person__bio { display: block; font-size: .576rem; margin-top: .16rem; }
.cm-person__links { display: flex; gap: .05rem; margin: .1rem 0 -.3rem -.3rem; }
.md-typeset .cm-person__links a { display: inline-flex; padding: .3rem; color: #fff; opacity: .85; }
.md-typeset .cm-person__links a:hover { opacity: 1; }
.cm-person__links svg, .cm-footer__social svg { width: .8rem; height: .8rem; fill: currentColor; display: block; }

.cm-team { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(15rem, 100%), 1fr)); gap: 1.2rem; }   /* photos and videos side by side, one full width when alone */
.cm-team img, .cm-team .cm-video { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }   /* one shape, so the row lines up */
.md-typeset .cm-team figure { margin: 0; }
.md-typeset ul.cm-alumni { columns: 2 12.8rem; column-gap: 2rem; padding: 0 !important; list-style: none; }
.md-typeset .cm-alumni li { margin: 0 0 .44rem; break-inside: avoid; }
.cm-alumni li span { color: var(--cm-muted); font-size: .704rem; }

/* ------------------------------------------------------------------ publications */

.md-typeset ol.cm-pubs { margin: 0; padding: 0; list-style: none; }
.md-typeset .cm-pubs > li { margin: 0; padding: 1.04rem 0; border-bottom: 1px solid var(--cm-line); }
.md-typeset .cm-pub p { margin: .12rem 0; }
.md-typeset .cm-pub__title { margin: 0 0 .24rem; font-size: .816rem; font-weight: 500; line-height: 1.45; }
.md-typeset .cm-pub__authors { font-size: .68rem; line-height: 1.55; color: var(--cm-muted); }
.cm-author--lab { color: var(--cm-accent-strong); font-weight: 600; background: linear-gradient(transparent 62%, var(--cm-highlight) 62%); }
.cm-more { font-style: italic; }
.md-typeset .cm-pub__venue { font-size: .68rem; color: var(--cm-fg); }
.md-typeset .cm-doi { color: var(--cm-muted); }
.md-typeset .cm-pub__links { font-size: .656rem; }
.md-typeset details.cm-pub__abstract { display: block; margin: .4rem 0 0; padding: 0; border: 0; border-radius: 0; box-shadow: none; background: none; color: inherit; font-size: .68rem; }
.md-typeset details.cm-pub__abstract > summary { display: inline-block; margin: 0; padding: 0; border: 0; background: none; font-weight: 400; }
.md-typeset details.cm-pub__abstract > summary::after { display: none; }
.md-typeset details.cm-pub__abstract > summary::before { position: static; display: inline; width: auto; height: auto; background: none; -webkit-mask-image: none; mask-image: none; transform: none; }
.md-typeset .cm-pub__abstract summary { cursor: pointer; color: var(--cm-muted); list-style: none; font-size: .624rem; letter-spacing: .06em; text-transform: uppercase; }
.md-typeset .cm-pub__abstract summary::-webkit-details-marker { display: none; }
.md-typeset .cm-pub__abstract summary::before { content: "+ "; }
.md-typeset .cm-pub__abstract[open] summary::before { content: "– "; }
.md-typeset .cm-pub__abstract p { margin: .4rem 0 0; line-height: 1.6; }
.md-typeset .cm-year h2 { position: sticky; top: 2.88rem; z-index: 1; margin: 2rem 0 0; padding: .32rem 0; background: rgba(255, 255, 255, .95); font-size: .8rem; font-weight: 600; letter-spacing: .2em; border-bottom: 1px solid var(--cm-strong); }

.cm-filter { position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: .6rem .8rem; margin: 1.6rem 0 .8rem; padding: .8rem; background: var(--cm-soft); }
.cm-filter input[type="search"] { flex: 1 1 12.8rem; min-width: 0; padding: .48rem .64rem; border: 1px solid #cfcfcf; background: #fff; font: inherit; font-size: .736rem; color: var(--cm-strong); }
.cm-filter input[type="search"]:focus { outline: 2px solid #111; outline-offset: 0; border-color: #111; }
.cm-filter__chips { display: flex; gap: .32rem; flex-wrap: wrap; }
.cm-filter__chips button { padding: .36rem .64rem; border: 1px solid #cfcfcf; border-radius: 1.6rem; background: #fff; font: inherit; font-size: .64rem; color: var(--cm-fg); cursor: pointer; }
.cm-filter__chips button.is-active { background: var(--cm-accent-strong); border-color: var(--cm-accent-strong); color: var(--cm-on-accent); }
.md-typeset .cm-filter__count { flex-basis: 100%; margin: 0; font-size: .64rem; color: var(--cm-muted); }
.cm-source { margin-top: 2.4rem; }

/* ------------------------------------------------------------------ stories */

/* Featured paper lead (#21): picture beside the citation and summary; stacked,
   with a capped picture height, on narrow screens. object-fit: contain, so
   microscopy images are never cropped. */
.cm-story__lead { display: grid; grid-template-columns: minmax(0, 38fr) minmax(0, 62fr); gap: 1.6rem; align-items: start; margin: 0 0 1.6rem; }
.cm-story__lead--text { grid-template-columns: minmax(0, 1fr); }
.md-typeset .cm-story__media { margin: 0; position: sticky; top: 5rem; }
.cm-story__media img, .cm-story__media video { display: block; width: 100%; height: auto; max-height: 26rem; object-fit: contain; background: transparent; }
.md-typeset .cm-story__text > :first-child { margin-top: 0; }
@media (max-width: 47.5rem) {
  .cm-story__lead { grid-template-columns: minmax(0, 1fr); gap: 1rem; }
  .md-typeset .cm-story__media { position: static; }
  .cm-story__media img, .cm-story__media video { max-height: 15rem; margin: 0 auto; width: auto; max-width: 100%; }
}
.cm-story__media video { background: #000; }
.cm-story__cite { margin: 0 0 1.6rem; padding: .8rem .96rem; border-left: 3px solid var(--cm-strong); background: var(--cm-soft); }
.md-typeset .cm-story__cite .cm-pub__title { font-size: .784rem; }
.cm-story__links { margin: 1.6rem 0; }
.cm-related { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(11.2rem, 100%), 1fr)); gap: .8rem 1.6rem; margin: 2rem 0; padding: 1.2rem; border: 1px solid var(--cm-line); }
.md-typeset .cm-related h2 { margin: 0 0 .4rem; font-size: .56rem; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; color: var(--cm-muted); }   /* as .cm-tile__label */
.md-typeset .cm-related ul { margin: 0; padding-left: .8rem; font-size: .72rem; }
.cm-pager { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; margin: 3.2rem 0 0; padding-top: 1.2rem; border-top: 1px solid var(--cm-line); }
.md-typeset .cm-pager a { display: block; font-size: .72rem; line-height: 1.4; }
.cm-pager a span { display: block; margin-bottom: .16rem; font-size: .56rem; letter-spacing: .2em; text-transform: uppercase; color: var(--cm-muted); }
.cm-pager__next { grid-column: 2; text-align: right; }

/* ------------------------------------------------------------------ datasets */

.md-typeset ul.cm-resources { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(11.2rem, 100%), 1fr)); gap: .8rem; margin: 1.6rem 0 !important; padding: 0 !important; list-style: none; }
.md-typeset .cm-resources li { margin: 0; }
.md-typeset .cm-resources a { display: block; height: 100%; padding: .96rem; border: 1px solid var(--cm-line); text-decoration: none; transition: border-color .15s; }
.md-typeset .cm-resources a:hover { border-color: var(--cm-strong); }
.cm-resources strong { display: block; color: var(--cm-strong); font-weight: 600; }
.cm-resources span { font-size: .68rem; color: var(--cm-muted); }
/* Internal page masthead (#25): H1, then an optional sub-navigation row and an
   optional lead, with the same spacing before the first component everywhere. */
.md-typeset h1 + * { margin-top: 0; }
.md-typeset h1 ~ .cm-lead { margin: 0 0 1.6rem; }
.md-typeset h1 + .cm-section-title { margin-top: 1.6rem; }
.md-typeset ul.cm-datasets { margin: 0 !important; padding: 0 !important; list-style: none; }
.md-typeset .cm-datasets li { margin: 0; padding: .8rem 0; border-bottom: 1px solid var(--cm-line); }
.md-typeset .cm-datasets p { margin: .16rem 0; font-size: .72rem; }
.md-typeset .cm-datasets__title { font-weight: 500; }

/* ------------------------------------------------------------------ gallery */

.md-typeset ul.cm-covers { display: flex; gap: 1rem; margin: 0 !important; padding: .4rem 0 1rem !important; list-style: none; overflow-x: auto; scroll-snap-type: x proximity; scroll-behavior: smooth; scrollbar-width: thin; }
.md-typeset .cm-covers > li { flex: 1 0 9rem; max-width: 14rem; scroll-snap-align: start; }   /* grow to fill the row while they fit, then scroll */
.cm-strip { position: relative; }
.cm-strip__prev, .cm-strip__next { position: absolute; top: 38%; z-index: 1; width: 2.2rem; height: 2.2rem; border: 1px solid var(--cm-line); border-radius: 50%; background: rgba(255, 255, 255, .92); color: var(--cm-strong); font-size: 1.2rem; line-height: 1; cursor: pointer; box-shadow: 0 .2rem .6rem rgba(0, 0, 0, .12); }
.cm-strip__prev { left: -.6rem; }
.cm-strip__next { right: -.6rem; }
.cm-strip__prev:hover, .cm-strip__next:hover { background: var(--cm-strong); color: #fff; }
.cm-strip__prev[hidden], .cm-strip__next[hidden] { display: none; }
.md-typeset .cm-covers li { margin: 0; font-size: .6rem; line-height: 1.4; color: var(--cm-muted); }
.cm-covers img { display: block; width: 100%; aspect-ratio: 3 / 4; object-fit: cover; margin-bottom: .4rem; box-shadow: 0 .32rem .96rem rgba(0, 0, 0, .15); transition: transform .2s; }
.cm-covers a:hover img { transform: translateY(-3px); }
/* Justified rows: each <li> has flex sizes from its aspect ratio (pages_content._justified),
   so a row's pictures share one height; ::after keeps the last row from stretching. */
.md-typeset ul.cm-gallery { --cm-gallery-row: 8.5rem;   /* the height a row aims for before it is stretched to the full width */
  display: flex; flex-wrap: wrap; gap: .4rem; margin: 0 0 0 calc(50% - var(--w) / 2) !important; padding: 0 !important; list-style: none; }
.md-typeset ul.cm-gallery::after { content: ""; flex: 100000 1 0; }
.md-typeset .cm-gallery li { margin: 0; min-width: 0; }
@media (max-width: 30em) { .md-typeset ul.cm-gallery { --cm-gallery-row: 6.5rem; } }   /* two pictures a row on a phone */
.cm-gallery a { display: block; }
.cm-gallery img, .cm-gallery video { display: block; width: 100%; height: auto; transition: opacity .2s; }
.cm-gallery a:hover video { opacity: .85; }
.cm-gallery a:hover img { opacity: .85; }
.cm-lightbox { padding: 0; border: 0; max-width: 100vw; max-height: 100vh; width: 100vw; height: 100vh; background: rgba(8, 8, 8, .96); color: #eee; }
.cm-lightbox::backdrop { background: rgba(0, 0, 0, .8); }
.cm-lightbox figure { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 100%; margin: 0; padding: 2.8rem 3.2rem 1.2rem; }
.cm-lightbox img, .cm-lightbox video { max-width: 100%; max-height: calc(100vh - 7.2rem); object-fit: contain; }
.cm-lightbox [hidden] { display: none; }

/* Note after an email link is clicked (cellmig.js initMailCopy) */
.cm-toast { position: fixed; left: 50%; bottom: 1.2rem; transform: translateX(-50%); z-index: 10; max-width: calc(100vw - 2rem); padding: .5rem .9rem; border-radius: .3rem; background: var(--cm-accent-strong); color: #fff; font-size: .8rem; box-shadow: 0 .2rem .8rem rgba(0,0,0,.25); overflow-wrap: anywhere; }
.cm-toast[hidden] { display: none; }
.cm-lightbox figcaption { max-width: 38.4rem; margin-top: .8rem; font-size: .72rem; text-align: center; color: #ddd; }
.cm-lightbox button { position: absolute; border: 0; background: rgba(255, 255, 255, .08); color: #fff; font-size: 1.28rem; line-height: 1; width: 2.4rem; height: 2.4rem; border-radius: 50%; cursor: pointer; }
.cm-lightbox button:hover { background: rgba(255, 255, 255, .2); }
.cm-lightbox__close { top: .8rem; right: .8rem; }
.cm-lightbox__prev { left: .8rem; top: 50%; }
.cm-lightbox__next { right: .8rem; top: 50%; }

/* ------------------------------------------------------------------ misc pages */

.cm-address { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(12rem, 100%), 1fr)); gap: 1.2rem 2rem; padding: 1.2rem; background: var(--cm-soft); }
.md-typeset .cm-address p:first-child { margin-top: 0; }

/* ------------------------------------------------------------------ footer */

.cm-footer { background: var(--cm-footer); color: #f2eeee; font-size: .68rem; }
.cm-footer__inner { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2rem; max-width: calc(var(--cm-wide) + 2 * var(--cm-gutter));   /* content lines up with the page */ margin: 0 auto; padding: 3.2rem var(--cm-gutter) 2.4rem; }
.cm-footer__title { margin: 0 0 .96rem; font-size: .6rem; font-weight: 600; letter-spacing: .3em; text-transform: uppercase; color: #9d9494; }
.cm-footer__col:first-child .cm-footer__title { font-size: .8rem; letter-spacing: .2em; color: #fff; }
.cm-footer p { margin: 0 0 .8rem; }
.cm-footer__logo { width: 9.6rem; max-width: 100%; height: auto; }   /* width/height attributes reserve the space */
.cm-footer__logos { display: grid; grid-template-columns: repeat(2, minmax(0, max-content)); justify-content: start; align-items: center; gap: 1.2rem 1.6rem; margin: 0; padding: 0; list-style: none; }
.cm-footer__logos img { display: block; max-width: 100%; height: auto; opacity: .9; }   /* sized per logo to equal areas (logo_size) */
.cm-footer__logos a:hover img { opacity: 1; }
.cm-footer__social { display: flex; flex-wrap: wrap; gap: .64rem 1.12rem; margin: 0 0 1.2rem; padding: 0; list-style: none; }
.cm-footer a { color: #f2eeee; text-decoration: none; }
.cm-footer a:hover { color: #fff; text-decoration: underline; }
.cm-footer__social a { display: inline-flex; align-items: center; gap: .36rem; padding: .3rem 0; }
.cm-footer__address { color: #b9b1b1; line-height: 1.6; }
.cm-footer__bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .4rem 1.6rem; width: calc(100% - 2 * var(--cm-gutter)); max-width: var(--cm-wide); margin: 0 auto; padding: .96rem 0 1.6rem;   /* the rule spans the page width */ border-top: 1px solid #2c2323; color: #8d8585; font-size: .6rem; }
.cm-footer__bottom a { color: #b9b1b1; }
@media (max-width: 52rem) { .cm-footer__inner { grid-template-columns: 1fr; gap: 1.6rem; } }

/* Theme elements we restyle or hide */
.md-top { background: #fff; color: var(--cm-strong); box-shadow: 0 .16rem .64rem rgba(0, 0, 0, .12); }
.md-typeset .headerlink { display: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
@media print {
  .cm-header, .cm-footer, .cm-filter, .md-content__button { display: none !important; }
  .cm-tile { break-inside: avoid; }
}

/* Phones: two people per row, smaller captions */
@media (max-width: 30rem) {
  .md-typeset ul.cm-people { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem; }
  .md-typeset .cm-person figcaption { padding: 1.6rem .5rem .5rem; }
  .cm-person__name { font-size: .66rem; }
  .cm-person__role { font-size: .6rem; }
}
.cm-home .md-typeset { padding-bottom: 3.2rem; }

/* ------------------------------------------------------------------ featured research on the home page */
.md-typeset .cm-cards--home .cm-card__meta { margin: .2rem 0 0; text-align: center; }
.md-typeset .cm-cards--home .cm-card__meta .cm-badge { display: table; margin: .3rem auto 0; }   /* its own line on every card, not only where it wraps */
.cm-card__placeholder { display: flex; align-items: center; justify-content: center; height: 100%; padding: 1.2rem; background: linear-gradient(135deg, #f3f0f7, #e9eef3); font-family: var(--cm-serif); font-size: 1rem; font-style: italic; color: #555; text-align: center; }

/* ------------------------------------------------------------------ preprint lag figure */
.cm-lag { margin: 1.6rem 0 2rem; padding: 1.2rem 1.2rem .8rem; border: 1px solid var(--cm-line); }
.cm-lag__head { display: flex; align-items: center; gap: 1.2rem; }
.md-typeset .cm-lag__head p { margin: 0; font-size: .7rem; line-height: 1.5; color: var(--cm-muted); }
.md-typeset .cm-lag__hero { flex: none; font-size: .8rem; color: var(--cm-fg); }
.cm-lag__hero strong { font-size: 2.4rem; font-weight: 300; line-height: 1; color: var(--cm-strong); margin-right: .15rem; }
.cm-lag__title { display: block; font-size: .62rem; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; color: var(--cm-fg); }
.cm-lag__plot { position: relative; margin-top: .6rem; }
.cm-lag__chart { display: block; width: 100%; height: auto; overflow: visible; }
.cm-lag__grid { stroke: #efefef; stroke-width: 1; }
.cm-lag__axis { stroke: #cfcfcf; stroke-width: 1; }
.cm-lag__median { stroke: var(--cm-strong); stroke-width: 1; }
.cm-lag__label { font-size: 11px; fill: var(--cm-strong); font-weight: 600; }
.cm-lag__tick { font-size: 11px; fill: var(--cm-muted); text-anchor: middle; font-variant-numeric: tabular-nums; }
.cm-lag__dot { fill: var(--cm-accent); stroke: #fff; stroke-width: 2; cursor: pointer; transition: r .1s; }
.cm-lag__dot:hover, .cm-lag__dot:focus { r: 7; }
.cm-chart-tip { position: absolute; z-index: 2; max-width: 16rem; padding: .4rem .55rem; background: #111; color: #fff; font-size: .6rem; line-height: 1.4; pointer-events: none; transform: translate(-50%, calc(-100% - 10px)); }
.md-typeset details.cm-lag__table { display: block; margin: .6rem 0 0; padding: 0; border: 0; border-radius: 0; box-shadow: none; background: none; color: inherit; font-size: .66rem; }
.md-typeset details.cm-lag__table > summary { display: inline-block; margin: 0; padding: 0; border: 0; background: none; font-weight: 400; }
.md-typeset details.cm-lag__table > summary::before, .md-typeset details.cm-lag__table > summary::after { display: none; }
.md-typeset .cm-lag__table summary { cursor: pointer; color: var(--cm-muted); font-size: .6rem; letter-spacing: .08em; text-transform: uppercase; }
.md-typeset .cm-lag__table table { display: table; width: 100%; font-size: .66rem; }
.md-typeset .cm-lag__table td:nth-child(n+2), .md-typeset .cm-lag__table th:nth-child(n+2) { white-space: nowrap; font-variant-numeric: tabular-nums; }
@media (max-width: 30rem) { .cm-lag__head { flex-direction: column; align-items: flex-start; gap: .4rem; } }
.md-typeset .cm-lag__table .md-typeset__table, .md-typeset .cm-lag__table table { display: block; max-width: 100%; overflow-x: auto; }
/* Each chart is drawn for the page width and for a phone (charts.py CHART_SIZES) */
.cm-chart--narrow { display: none !important; }
@media (max-width: 40rem) {
  .cm-chart--wide { display: none !important; }
  .cm-chart--narrow { display: block !important; }
  .cm-lag__tick, .cm-lag__label { font-size: 24px; } .cm-lag__dot { r: 8; }
}

@media (max-width: 64rem) { .cm-cards--home { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.md-typeset .cm-card .cm-card__meta .cm-badge { font-size: .5rem; }

/* ------------------------------------------------------------------ lab in numbers */
.md-typeset ul.cm-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(5.3rem, 100%), 1fr)); gap: .5rem; margin: 1.4rem 0 .6rem; padding: 0; list-style: none; }   /* narrow enough for all the numbers in one row at the page width */
[dir] .md-typeset .cm-tiles > li { margin: 0; list-style: none; }
.md-typeset .cm-tiles a { display: flex; flex-direction: column; height: 100%; padding: .9rem .6rem; background: var(--cm-soft); text-decoration: none; transition: background .15s; }
.md-typeset .cm-tiles a:hover { background: #ecebe9; }
.cm-tiles strong { font-size: 1.5rem; font-weight: 300; line-height: 1.1; color: var(--cm-strong); }
.cm-tiles span { margin-top: .3rem; font-size: .56rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--cm-muted); }
.cm-bars, .cm-map { position: relative; }
.cm-bars__bar { fill: var(--cm-accent); cursor: pointer; }
.cm-bars__bar:hover, .cm-bars__bar:focus { fill: var(--cm-accent-strong); outline: none; }
.cm-lag__dot.is-approx { fill: #fff; stroke: var(--cm-accent); stroke-width: 2; }
.md-typeset ol.cm-toplist { margin: 0; padding: 0; list-style: none; }
[dir] .md-typeset .cm-toplist > li { display: grid; grid-template-columns: minmax(8rem, 13rem) minmax(0, 1fr) 4.2rem 5rem; align-items: center; gap: .6rem; margin: 0; padding: .35rem 0; border-bottom: 1px solid var(--cm-line); list-style: none; font-size: .72rem; }
.cm-toplist__name { color: var(--cm-strong); font-weight: 500; }
.cm-toplist__bar { height: .4rem; background: var(--cm-soft); border-radius: .2rem; overflow: hidden; }
.cm-toplist__bar span { display: block; height: 100%; background: var(--cm-accent); border-radius: .2rem; }
.md-typeset .cm-toplist__n { text-align: right; font-variant-numeric: tabular-nums; }
.cm-toplist__years { color: var(--cm-muted); font-size: .62rem; font-variant-numeric: tabular-nums; }
@media (max-width: 36rem) { [dir] .md-typeset .cm-toplist > li { grid-template-columns: minmax(0, 1fr) 4.2rem; } .cm-toplist__bar, .cm-toplist__years { display: none; } }
.cm-map { max-width: 40rem; margin: 0 auto; }   /* compact: the map does not need the full wide column */
.cm-map__svg { display: block; width: 100%; height: auto; }
.cm-map__svg path { fill: #ececeb; stroke: #fff; stroke-width: .6; }
.cm-map__svg path.cm-map__on { cursor: pointer; }
.cm-map__svg path.cm-map__on:hover, .cm-map__svg path.cm-map__on:focus { stroke: #111; stroke-width: 1.2; outline: none; }
.md-typeset ul.cm-map__legend { display: flex; flex-wrap: wrap; justify-content: center; gap: .3rem 1rem; margin: .6rem 0 0; padding: 0; list-style: none; font-size: .62rem; color: var(--cm-muted); }
[dir] .md-typeset .cm-map__legend > li { display: flex; align-items: center; gap: .3rem; margin: 0; list-style: none; }
.cm-map__legend span { width: .8rem; height: .8rem; border-radius: .15rem; }
.md-typeset .cm-cloud { display: flex; flex-wrap: wrap; justify-content: center; align-items: baseline; gap: .1rem .55rem; margin: 1rem auto; line-height: 1.2; text-align: center; }
.cm-cloud span { color: var(--cm-fg); font-weight: 400; white-space: nowrap; max-width: 100%; }
@media (max-width: 30rem) { .cm-cloud span { white-space: normal; } }   /* the largest names are wider than a 320 px screen */
.cm-cloud span.cm-cloud__lab, .cm-cloud__legend .cm-cloud__lab { color: var(--cm-accent-strong); }
.cm-cloud__legend { text-align: center; }
.cm-cloud__more { margin: 0 auto; text-align: center; }
.cm-cloud__more summary { display: inline-block; cursor: pointer; font-size: .72rem; color: var(--cm-accent-strong); text-decoration: underline; }

/* Group leader profile (About us) */
.md-typeset .cm-profile { display: grid; grid-template-columns: 12rem minmax(0, 1fr); gap: 1.2rem 2.4rem; align-items: start; margin: 1.2rem 0 2rem; }   /* photo, name and links beside the bio */
@media (max-width: 40rem) { .md-typeset .cm-profile { grid-template-columns: minmax(0, 1fr); } }
.cm-profile__head { display: flex; flex-direction: column; gap: .8rem; }
@media (max-width: 40rem) { .cm-profile__head { flex-direction: row; align-items: center; gap: 1.2rem; } }
.cm-profile__photo { width: 7.2rem; height: 7.2rem; border-radius: 50%; object-fit: cover; flex: none; }
.md-typeset .cm-profile__name { margin: 0; font-size: 1rem; }
.md-typeset .cm-profile__title { margin: .2rem 0 .4rem; color: var(--cm-muted); }
.md-typeset .cm-profile__bio { margin: 0; line-height: 1.65; }
.md-typeset .cm-profile__bio > p:first-child { margin-top: 0; }
.md-typeset .cm-profile__links { display: flex; gap: .1rem; margin: 0 0 0 -.3rem; }
.md-typeset .cm-profile__links a { display: inline-flex; padding: .3rem; color: var(--cm-fg); opacity: .8; }
.md-typeset .cm-profile__links a:hover { opacity: 1; }
.cm-profile__links svg { width: .8rem; height: .8rem; fill: currentColor; display: block; }
