/* Space reserved for the regions each page's script fills in, so nothing below them moves when it runs
   (layout shift). The values are the filled-in heights measured at phone, tablet and desktop widths. */
.lp #main-content { min-height: 100svh; }
.ms-main { min-height: 100svh; overflow-x: clip; }   /* the shelves' next-arrows poke 4px past the page edge */
#xrail { min-height: 678px; }
#xfilters { min-height: 44px; }
@media (max-width: 760px) { #xrail { min-height: 532px; } }

/* the slide dots are built by the script (one per slide): hold their box so the row does not appear and shift */
#sdots { min-height: 32px; min-width: 232px; box-sizing: border-box; }
/* decorative pieces that poke past the right edge on phones must not widen the page. Clip them where they live, never on
   <html>: html{overflow-x:clip} stops body's overflow from reaching the viewport, so body becomes a scroll container and
   every position:sticky inside it (the experiments sidebar) stops sticking. */
.lp-f2, .lp-h2 { overflow-x: clip; }

/* tablet hero: the copy and the peeking screen sit in the vertical middle of the hero, with equal room above and below
   (it used to hug the top: 100px above, 144px of room reserved below for the dots) */
@media (min-width: 761px) and (max-width: 960px) {
  html[data-layout] body #stage .fs__copy { align-self: center; padding-top: 96px; padding-bottom: 96px; }   /* body: out-ranks index-3.css, which loads after this file */
  html[data-layout] body #stage .fcopy { align-self: center; }   /* a slide shorter than the tallest is centred in the cell too */
  html body #stage .fslide .win { top: calc(50% - 122px) !important; }   /* half the window: 320 px wide, 2560:1720 screen + 28 px title bar */
}

/* the wordmark was drawn too small for its bar: bigger in the nav (the bar grows to 66 px, 60 on phones) and in the experiments sidebar */
.brand .cl-logo--nav, .nav .cl-logo--nav { height: 54px; }   /* the specificity beats logo.css, which can load after this file */
html .nav .nav__bar { height: 66px; }
@media (max-width: 760px) { .brand .cl-logo--nav, .nav .cl-logo--nav { height: 46px; } html .nav .nav__bar { height: 60px; } }
/* the experiments wordmark is the same size as the nav's on every other page (54 px, 46 px on phones) */
.ms-brand { height: 58px; padding-top: 0; }
.ms .ms-brand .cl-logo { height: 54px; }
@media (max-width: 760px) { .ms-brand { height: 50px; } .ms .ms-brand .cl-logo { height: 46px; } }

/* the nav link of the section you are in (nav-spy.js sets aria-current): a clear underline, not only a slightly brighter word */
.nav__links a { position: relative; }
.nav__links a::after { content: ""; position: absolute; left: 0; right: 0; bottom: -7px; height: 2px; border-radius: 2px; background: var(--grad, #00b0c2); transform: scaleX(0); transform-origin: left; transition: transform .25s ease; }
.nav__links a[aria-current="true"] { color: var(--fg); }
.nav__links a[aria-current="true"]::after { transform: scaleX(1); }
.nav__btns a[aria-current="true"] { outline: 2px solid var(--cyan, #55e7f6); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { .nav__links a::after { transition: none; } }

/* experiments sidebar on tablets and phones: the search field shares the first row with the logo; the kinds sit below */
@media (max-width: 900px) {
  .ms .ms-side { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; column-gap: 14px; row-gap: 10px; }
  .ms .ms-side .ms-nav { grid-column: 1 / -1; }
}

/* experiments filter bar on tablets: the same one-row pill as desktop (692 x 44). The page margin left it 0.4 px too narrow
   for the six chips, so the last one dropped to a second row (78 px tall); let the bar use the margin. */
@media (min-width: 761px) and (max-width: 960px) {
  html body #experiments .xfilt { margin-inline: -16px; }
  html body #experiments .xfilt__in { display: flex; justify-content: center; }
}

/* GPU: a block scrolled out of view (anim-gate.js marks it) holds all of its looping animations, CSS and SVG alike. */
.is-offscreen, .is-offscreen *, .is-offscreen *::before, .is-offscreen *::after { animation-play-state: paused !important; }
