/* The home page, from the Figma frame "COMC Viewer — Landing Page (Dark)" (file
   Yso1BrxIiaXJM0Esa3awlL, node 111:614). Dark only, as designed. The privacy and terms
   pages keep legal.css. Fonts are self-hosted (public/home/, OFL licences beside them)
   so a visit sends nothing to a third party; the key labels use the system's monospace
   rather than a third font file. */
@font-face {
  font-family: "Outfit"; src: url("/home/outfit.woff2") format("woff2");
  font-weight: 100 900; font-display: swap;
}
@font-face {
  font-family: "Geist"; src: url("/home/geist.woff2") format("woff2");
  font-weight: 100 900; font-display: swap;
}
:root {
  /* The Dark mode of the Figma variables "COMC Viewer Site". */
  --bg: #0e0f14; --surface: #15171d; --raised: #1b1d25; --border: #272a33;
  --text: #f5f5f7; --muted: #8e939e; --faint: #606470;
  --red: #e51c24; --red-deep: #7f1014;
  --display: "Outfit", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --body: "Geist", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
  --gutter: 24px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; background: var(--bg); color: var(--text);
  font: 16px/1.5 var(--body);
}
p, h1, h2, h3, figure, ul { margin: 0; }
ul { padding: 0; list-style: none; }
a { color: inherit; }
img { display: block; max-width: 100%; height: auto; }
.nowrap { white-space: nowrap; }
.wrap { width: min(1200px, 100% - 2 * var(--gutter)); margin-inline: auto; }
.wrap-narrow { width: min(960px, 100% - 2 * var(--gutter)); margin-inline: auto; }
.label {
  font: 12px/16px var(--mono); letter-spacing: .04em; text-transform: uppercase;
  color: var(--faint); font-weight: 400;
}

/* The brand tile, as in the extension's icon and the store tile. */
.tile {
  width: 100px; height: 100px; flex: none; border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, .1);
  background: linear-gradient(to bottom, var(--red), var(--red-deep));
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  font-family: var(--display); line-height: normal; text-align: center; color: #fff;
}
.tile b { font-weight: 800; font-size: 24px; }
.tile span { font-weight: 500; font-size: 16px; }
.tile-sm { width: 38px; height: 38px; border-radius: 6px; }
.tile-sm b { font-size: 9px; line-height: 1.05; }
.tile-sm span { font-size: 6px; line-height: 1.05; }

/* Buttons: the Figma component "Site/Button", Primary and Secondary. */
.btn {
  display: inline-flex; align-items: center; gap: 10px; height: 46px; padding: 0 22px 0 20px;
  border-radius: 10px; text-decoration: none; white-space: nowrap;
  font: 500 15px/20px var(--body); transition: background-color 120ms, border-color 120ms;
}
.btn img { width: 18px; height: 18px; }
.btn:focus-visible { outline: 2px solid var(--text); outline-offset: 3px; }
.btn-primary { background: var(--text); color: var(--bg); box-shadow: 0 6px 16px -6px rgba(0, 0, 0, .5); }
.btn-primary:hover { background: #fff; }
.btn-secondary { background: var(--raised); color: var(--text); border: 1px solid var(--border); box-shadow: 0 2px 4px rgba(0, 0, 0, .25); }
.btn-secondary:hover { background: #232631; border-color: #343846; }

/* Keys: the Figma component "Site/Keycap". The bottom edge is drawn inside the key, so
   nothing around it can clip it. */
kbd {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 28px; height: 28px; padding: 0 8px 2px; border-radius: 7px;
  font: 500 13px/16px var(--mono); color: var(--text);
  background: var(--raised); border: 1px solid var(--border); box-shadow: inset 0 -2px 0 var(--border);
}

/* ---------------------------------------------------------------- the intro */

/* The intro is the nav, the hero and the demo. Its view timeline drives the demo: it
   starts at "contain 0%", the top of the page, and ends at "contain 100%", when the
   demo's bottom reaches the bottom of the window. */
.intro { position: relative; isolation: isolate; padding-bottom: 56px; view-timeline: --intro block; }
/* The glows spread past the sides of the screen, so they're clipped in a box of their
   own. Never clip .intro itself: with any overflow but visible on an ancestor, Safari
   pins the demo's stage on its main thread, a frame behind the scroll, and the stage
   shakes as a swipe comes to rest. */
.glows { position: absolute; inset: 0; z-index: -1; overflow: clip; pointer-events: none; }
.glow { position: absolute; max-width: none; }
.glow-left { left: -350px; top: 250px; }
.glow-right { left: calc(50% + 160px - 380px); top: -380px; }

.nav { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 20px 0; }
.brand {
  display: inline-flex; align-items: center; gap: 12px; text-decoration: none; white-space: nowrap;
  font: 600 17px/1 var(--body); letter-spacing: -.01em; color: var(--text);
}
.nav .brand, .nav-end { flex: 1 1 0; }
.nav-end { display: flex; justify-content: flex-end; }
.links { display: flex; gap: 36px; }
.links a { color: var(--muted); text-decoration: none; }
.links a:hover { color: var(--text); }

.hero {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  padding: clamp(48px, 10vh, 112px) 0 48px;
}
h1 {
  font: 600 clamp(40px, 6vw, 72px)/1.08 var(--display); letter-spacing: -.025em; text-wrap: balance;
}
h1 em { display: block; font-style: normal; color: var(--red); }
.lede { max-width: 680px; margin-top: 24px; font-size: 20px; line-height: 30px; color: var(--muted); text-wrap: balance; }
.free { margin-top: 12px; font-size: 14px; line-height: 20px; color: var(--muted); }
.stores { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 36px; }
.support { display: flex; align-items: center; gap: 12px; margin-top: 24px; }
.browsers { display: flex; gap: 10px; }
.browsers li { position: relative; }
@media (hover: hover) {
  .browsers li::after {
    content: attr(data-name); position: absolute; bottom: calc(100% + 8px); left: 50%;
    transform: translateX(-50%); padding: 5px 8px; border-radius: 6px; white-space: nowrap;
    background: var(--raised); color: var(--text); font-size: 12px; line-height: 1;
    box-shadow: 0 4px 14px rgba(0, 0, 0, .5); pointer-events: none;
    opacity: 0; transition: opacity 110ms ease 150ms;
  }
  .browsers li:hover::after { opacity: 1; }
}

/* The demo: the browser window from the frame, with the feature bubbles over it.
   Sized so it fits the window when flat, with room either side. */
.demo {
  width: min(1200px, 100% - 192px, (100vh - 140px) * 1.6);
  width: min(1200px, 100% - 192px, (100svh - 140px) * 1.6);
  margin-inline: auto; position: relative; container-type: inline-size;
  perspective: 1600px; perspective-origin: 50% 45%;
}
/* The tilt pivots a little above its middle, so lying back sends the top away and
   brings the bottom forward, as the screen does when it straightens up. */
.tilt { transform-origin: 50% 45%; }
.window { position: relative; }
.window picture { display: contents; }
.screen {
  width: 100%; border-radius: 12px;
  box-shadow: 0 40px 90px -20px rgba(0, 0, 0, .6), 0 4px 14px rgba(0, 0, 0, .35);
}
.window::after {
  content: ""; position: absolute; left: 0; top: 0; width: 100%; aspect-ratio: 16 / 10;
  border-radius: 12px; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .12); pointer-events: none;
}
/* Scroll snap points for the mobile tour, and nothing anywhere else. */
.snap { display: none; }

/* Feature bubbles, one per group of the viewer's controls: what the group is for, not
   its shortcuts (those have their own card below). Each sits in the dark of the stage
   beside the scan, right next to the group it describes. They sit in the demo, not the
   window, so the window can tilt and zoom without them; the demo is the window's box.
   Positions are percentages of the 1200 x 750 window, from the frame; sizes are em off a font size that follows the
   window's width (15px at 1200), so the layout holds when the window is smaller. */
.callout {
  position: absolute; width: 19em;
  padding: .875em 1.0625em; border-radius: 1em;
  font-size: clamp(13px, 1.25cqw, 15px); line-height: 1.5; color: #e4e5ea;
  background: rgba(27, 29, 37, .86); border: 1px solid rgba(255, 255, 255, .14);
  -webkit-backdrop-filter: blur(24px); backdrop-filter: blur(24px);
  box-shadow: 0 16px 36px -8px rgba(0, 0, 0, .55);
}
.c-info { top: 18.4%; left: .9%; }
.c-buttons { top: 18.4%; right: 3.95%; }
.c-sides { bottom: 13.6%; left: .9%; }
.c-zoom { bottom: 9.6%; right: .6%; }

/* ----------------------------------------------------------------- features */

.features {
  display: grid; grid-template-columns: 1fr 1fr; gap: 24px;
  margin-top: 168px; margin-bottom: 176px;
}
.card {
  display: flex; flex-direction: column; padding: 28px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 20px;
}
.card h2 { font: 500 20px/28px var(--body); letter-spacing: -.005em; }
.card p { margin-top: 6px; min-height: 48px; color: var(--muted); }
.shot { margin-top: 20px; width: 100%; border-radius: 14px; border: 1px solid rgba(255, 255, 255, .07); }
.facts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.facts li {
  padding: 5px 11px; border-radius: 999px; font-size: 13px; line-height: 18px; color: var(--muted);
  background: rgba(255, 255, 255, .04); border: 1px solid var(--border);
}

/* Every shortcut, grouped, under the two cards: helpers for the features above. */
.shortcuts { grid-column: 1 / -1; }
.shortcuts > p { min-height: 0; }
.shortcut-groups { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; margin-top: 24px; }
.shortcut-groups h3 { margin-bottom: 12px; }
.shortcut-groups ul { display: flex; flex-direction: column; gap: 10px; }
.shortcut-groups li { display: flex; align-items: center; gap: 10px; font-size: 14px; line-height: 20px; }
.shortcut-groups .k { display: inline-flex; gap: 4px; flex: none; width: 88px; }

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

.footer { border-top: 1px solid var(--border); padding: 56px 0 40px; }
.footer-top { display: flex; justify-content: space-between; gap: 40px; flex-wrap: wrap; }
.footer-brand p { max-width: 340px; margin-top: 16px; font-size: 14px; line-height: 20px; color: var(--muted); }
.footer-links { display: flex; gap: 72px; flex-wrap: wrap; }
.footer-links div { display: flex; flex-direction: column; gap: 12px; }
.footer-links a { font-size: 14px; line-height: 20px; color: var(--text); text-decoration: none; }
.footer-links a:hover { text-decoration: underline; }
.legal { margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--border); font-size: 14px; line-height: 20px; color: var(--faint); }

/* --------------------------------------------------------------- animation */

/* The hero's words rise in on load. */
@media (prefers-reduced-motion: no-preference) {
  .hero > * { animation: rise 700ms cubic-bezier(.2, .7, .2, 1) both; }
  .hero > :nth-child(2) { animation-delay: 80ms; }
  .hero > :nth-child(3) { animation-delay: 160ms; }
  .hero > :nth-child(4) { animation-delay: 240ms; }
  .hero > :nth-child(5) { animation-delay: 320ms; }
}
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }

/* The demo's entrance and the tour that follows it: see "the tour" below. */
@keyframes stand {
  from { rotate: x 34deg; }
  to { rotate: x 0deg; }
}
@keyframes settle {
  from { scale: 1.3; }
  to { scale: 1; }
}

/* ------------------------------------------------------------------ smaller */

/* Below 1024px the bubbles would cover the demo, so they sit under it as a list. */
@media (max-width: 1023px) {
  .demo { width: min(1200px, 100% - 2 * var(--gutter)); }
  .callouts { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 28px; }
  .callout { position: static; width: auto; animation: none; font-size: 16px; }
  .shortcut-groups { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 760px) {
  .links { display: none; }
  .features { grid-template-columns: 1fr; margin-top: 112px; margin-bottom: 120px; }
  .callouts { grid-template-columns: 1fr; }
  .lede { font-size: 18px; line-height: 27px; }
  .footer-links { gap: 40px; }
  .glow-right { left: auto; right: -600px; }
  .callout { font-size: 15px; }
  .shortcut-groups { grid-template-columns: 1fr; }
}
/* The hero's store buttons sit just below, so a phone's nav keeps only the name. */
@media (max-width: 560px) {
  .nav-end { display: none; }
}

/* ---------------------------------------------------------------- the tour */

/* The scroll takes a tour of the demo. First the entrance, on the tilt: the demo sits
   just under the hero, large and leaning back, so it shows before any scrolling; it
   rises with the page, pins once the hero has gone, straightens up and settles into
   frame. Both motions ease in and out, so each is partly done when the stage pins and
   lands softly while pinned. Then the window inside it zooms in on each group of
   controls in turn (top left, top right, bottom left, bottom right) with that group's
   bubble, and back out to the whole demo before the cards. On a phone or tablet the
   bubble is a caption at the bottom of the screen. On a wide screen it's a tooltip
   beside its group, which zooms and pans with the window as if it were part of it.

   On a touch screen the tour snaps; nothing else does. With a mouse or trackpad it
   doesn't: a wheel's notch is far shorter than half the way between two stops, so
   snapping held a wheel at the first stop for good. There the scroll moves freely,
   and the wide screen's tour (tour-wide) holds a while at each stop instead.

   Safari on a phone gives a page with any snap
   point at all its short, heavy coast, so the tour's snap points exist only while
   the scroll is inside the tour: the .snap spans take scroll-snap-align from an
   animation on the intro's timeline over 19.85-80.65%, and the entrance and the cards
   glide with the phone's own momentum. Inside, the scroll comes to rest only at a
   stop, and no fling carries it past one (scroll-snap-stop: always): each swipe
   moves one stop. .snap-entrance and .snap-exit, on at the same time, are snap areas
   taller than the screen, which can rest anywhere inside them. So a swipe out of the
   tour lands wherever it ends, instead of being pulled back to the first or last
   stop by a snap point the scrolling hadn't yet seen switch off. A glide from
   outside that carries into the tour can't be caught on the way: Chrome lands it on
   a stop, and Safari lets it run out, then jumps to the nearest stop. The stops are
   placed by percentage of the intro's height. Everything here runs on the intro's
   exit-crossing range, whose progress is the scroll over that same height, so a span
   at 39% rests the tour at exactly 39% on any screen, with the browser's toolbar
   shown or hidden.

   It should read as a true zoom into the page, not a magnified picture. So the window
   is laid out at its zoomed size, --s times the demo's width, and scaled down for the
   whole view: the browser draws it once at full detail and only shrinks it, rather
   than enlarging a small drawing or redrawing it as the scale changes, which is what
   made the zoom soft and jittery. Each stop frames its corner of the window with
   page background around it: --x in from the screen's side, --y from the top for the
   top two, the window's bottom at --b for the bottom two. From the top right it goes
   straight down to the thumbnails, diagonally. 100cqw is the demo's width (W) and
   62.5cqw its height (H); it sits centred, --t0 from the top and --l0 from the left.

   On a phone or tablet --s is 4, about desktop size, or 2.6 on a taller tablet, so
   each stop frames just its corner; the window's edge, rounding and shadow are the
   desktop's, shrunk with it. A fade at the bottom of the screen keeps the zoomed
   screen out from under the caption, which is opaque rather than blurred: a blur
   redone on every frame of the zoom costs a phone too much.

   On a wide screen --s is 2, or more on a very wide one: each group shows at that
   many times its settled size, from a 4x image of the demo (demo-4x.webp) so it stays
   sharp on a retina screen. The edge, rounding and shadow grow with --s, so the whole
   view looks as it would unzoomed. Each tooltip has the window's own tour, around the
   window's origin, so it zooms and pans with its group; it shows only around its stop,
   and its text grows with --s. --l0 needs the stage's width, which the
   stage gives as a container: --stage is registered so it's worked out on the demo,
   against the stage, and not where it's used.

   Only where scroll-driven animations exist and motion is allowed; anywhere else the
   bubbles sit beside the demo, or in a list under it on a narrow screen, and nothing
   snaps.

     0-19.3%  the entrance (stand 0-17.8%, settle 0-19.3%); the stage pins on the way,
              at 9-20% depending on the screen
     20%      settled
     39%      top left. The zoom creeps through the first and last thirds of the
              way and moves quickly through the middle one, around 29.5%: Safari
              jumps a glide that runs out between two stops to the nearer one, and
              from either creep that lands on a view much like where it stopped
     46.5%    top right
     54%      bottom left, straight from the top right
     61.5%    bottom right
     80.5%    the whole demo, zoomed out the same way, quickly around 71%; the
              stage lets go at 87-89% and the cards follow

   tour-wide has the same stops, each held for 4% (about three notches of a wheel)
   and eased in and out: settled until 23%, top left 37-41%, top right 44.5-48.5%,
   bottom left 52-56%, bottom right 59.5-63.5%, the whole demo from 77%. */
@property --stage { syntax: "<length>"; inherits: true; initial-value: 0px; }
@supports (animation-timeline: view()) {
  /* Snapping, on a touch screen only. */
  @media (prefers-reduced-motion: no-preference) and (pointer: coarse) {
    html { scroll-snap-type: y mandatory; }
    .snap {
      display: block; position: absolute; left: 0; width: 1px; height: 1px;
      scroll-snap-align: none; scroll-snap-stop: always; pointer-events: none;
      animation: snap-on linear; animation-timeline: --intro;
      animation-range: exit-crossing 19.85% exit-crossing 80.65%;
    }
    /* The ways out, either side of the tour: from the top of the page to the settled
       stop, and from the last stop into the cards, each a screen taller than that. */
    .snap-entrance { top: 0; height: calc(20% + 100vh); height: calc(20% + 100svh); scroll-snap-stop: normal; }
    .snap-exit { top: 80.5%; height: calc(19.5% + 100vh + 400px); height: calc(19.5% + 100svh + 400px); scroll-snap-stop: normal; }
    .snap-settled { top: 20%; }
    .snap-info { top: 39%; }
    .snap-buttons { top: 46.5%; }
    .snap-sides { top: 54%; }
    .snap-zoom { top: 61.5%; }
    .snap-out { top: 80.5%; }
  }

  @media (prefers-reduced-motion: no-preference) {
    .intro { padding-bottom: 0; }
    .demo-track { height: 700vh; height: 700svh; view-timeline: --track block; }
    .demo-stage {
      position: sticky; top: 0; height: 100vh; height: 100svh; overflow: clip;
      display: grid; align-items: center;
    }
    /* On an iPhone or iPad the stage is sticky only from just before it pins.
       Safari there draws nothing of a sticky element below the part of the screen
       it lays the page out in, so with the toolbar shrunk, the demo rising from the
       bottom of the screen was cut off a strip above the bottom edge. Until the
       stage is 150px from the top it's relative, drawn under the toolbar like the
       rest of the page; by then the demo is clear of that strip. Turning sticky
       moves nothing but can tick the stage for a frame, so only iOS does it
       (-webkit-touch-callout is iOS WebKit's alone). */
    @supports (-webkit-touch-callout: none) {
      .demo-stage {
        animation: unstick linear; animation-timeline: --track;
        animation-range: cover 0% entry calc(100% - 150px);
      }
    }
    .demo { --t0: calc((100svh - 62.5cqw) / 2); }
    .tilt {
      position: relative; aspect-ratio: 16 / 10;
      animation: stand cubic-bezier(.45, 0, .35, 1) both, settle cubic-bezier(.45, 0, .3, 1) both;
      animation-timeline: --intro;
      animation-range: exit-crossing 0% exit-crossing 17.8%, exit-crossing 0% exit-crossing 19.3%;
    }
    .window {
      position: absolute; left: 0; top: 0; width: calc(var(--s) * 100%);
      transform-origin: 0 0;
      animation: tour cubic-bezier(.45, 0, .3, 1) both; animation-timeline: --intro;
      animation-range: exit-crossing 0% exit-crossing 100%;
    }
  }

  /* A phone or tablet: the bubbles are captions at the bottom of the screen. */
  @media (prefers-reduced-motion: no-preference) and (max-width: 1023px) {
    .demo {
      --l0: 24px; --s: 2.6; --x: 28px; --y: 96px; --b: calc(100svh - 220px);
      /* The desktop's 1600px perspective is 4/3 of its 1200px window; keep that ratio. */
      perspective: calc((100vw - 2 * var(--gutter)) * 4 / 3);
    }
    .demo::after {
      content: ""; position: absolute; z-index: 1; pointer-events: none;
      left: calc(-1 * var(--gutter)); right: calc(-1 * var(--gutter)); height: 170px;
      bottom: calc(-1 * (100svh - 62.5cqw) / 2);
      background: linear-gradient(to top, var(--bg) 40%, rgba(14, 15, 20, 0));
    }
    .callouts { display: block; margin: 0; }
    .callouts .callout {
      position: absolute; top: auto; left: -8px; right: -8px; width: auto;
      max-width: 560px; margin-inline: auto;
      bottom: calc(24px - (100svh - 62.5cqw) / 2);
      font-size: 16px; z-index: 2;
      background: rgba(27, 29, 37, .96); -webkit-backdrop-filter: none; backdrop-filter: none;
      animation: caption linear both; animation-timeline: --intro;
    }
    /* The first and last captions stay up through the creep beside their corner. */
    .callouts .c-info { animation-range: exit-crossing 28% exit-crossing 43.1%; }
    .callouts .c-buttons { animation-range: exit-crossing 43.9% exit-crossing 49.1%; }
    .callouts .c-sides { animation-range: exit-crossing 51.4% exit-crossing 56.6%; }
    .callouts .c-zoom { animation-range: exit-crossing 56.7% exit-crossing 72.7%; }
    .features { margin-top: 96px; }
  }
  @media (prefers-reduced-motion: no-preference) and (max-width: 560px) {
    .demo { --s: 4; }
  }

  /* A wide screen: each bubble is a tooltip beside its group, 24px off it, carried by
     the window's own tour. --k turns a point of the 1200 x 750 frame into the zoomed
     window; the groups are measured from the frame: the listing info from x 17 down to
     y 118, COMC's buttons and the zoom controls ending 13.5px from the right, the
     thumbnails from x 13 and y 664.5, the zoom controls from y 698. */
  @media (prefers-reduced-motion: no-preference) and (min-width: 1024px) {
    .demo-stage { container-type: inline-size; }
    .demo {
      --stage: 100cqw; --l0: calc((var(--stage) - 100cqw) / 2);
      --s: 2; --x: 64px; --y: 72px; --b: calc(100svh - 72px);
      --k: calc(var(--s) * 100cqw / 1200);
    }
    .screen {
      border-radius: calc(12px * var(--s));
      box-shadow: 0 calc(40px * var(--s)) calc(90px * var(--s)) calc(-20px * var(--s)) rgba(0, 0, 0, .6),
        0 calc(4px * var(--s)) calc(14px * var(--s)) rgba(0, 0, 0, .35);
    }
    .window::after {
      border-radius: calc(12px * var(--s));
      box-shadow: inset 0 0 0 calc(1px * var(--s)) rgba(255, 255, 255, .12);
    }
    .window { animation-name: tour-wide; }
    .callout {
      z-index: 2; width: 22em; font-size: calc(9px * var(--s)); text-wrap: pretty;
      background: rgba(27, 29, 37, .96); -webkit-backdrop-filter: none; backdrop-filter: none;
      animation: tour-wide cubic-bezier(.45, 0, .3, 1) both, tip linear both;
      animation-timeline: --intro, --intro;
    }
    .c-info {
      left: calc(var(--k) * 17); top: calc(var(--k) * 118 + 24px);
      transform-origin: calc(var(--k) * -17) calc(var(--k) * -118 - 24px);
      animation-range: exit-crossing 0% exit-crossing 100%, exit-crossing 34% exit-crossing 43.5%;
    }
    .c-buttons {
      right: calc(100cqw - var(--k) * 1186.5); top: calc(var(--k) * 118 + 24px);
      transform-origin: calc(100% - var(--k) * 1186.5) calc(var(--k) * -118 - 24px);
      animation-range: exit-crossing 0% exit-crossing 100%, exit-crossing 42.5% exit-crossing 50.5%;
    }
    .c-sides {
      left: calc(var(--k) * 13); bottom: calc(62.5cqw - var(--k) * 664.5 + 24px);
      transform-origin: calc(var(--k) * -13) calc(100% - var(--k) * 664.5 + 24px);
      animation-range: exit-crossing 0% exit-crossing 100%, exit-crossing 50% exit-crossing 58%;
    }
    .c-zoom {
      right: calc(100cqw - var(--k) * 1186.5); bottom: calc(62.5cqw - var(--k) * 698 + 24px);
      transform-origin: calc(100% - var(--k) * 1186.5) calc(100% - var(--k) * 698 + 24px);
      animation-range: exit-crossing 0% exit-crossing 100%, exit-crossing 57.5% exit-crossing 67%;
    }
    .features { margin-top: 112px; }
  }
  /* The demo stops growing at 1200px, so a wider screen zooms further to keep each
     stop on its corner. Past about 2.4 the 4x image is enlarged on a retina screen. */
  @media (prefers-reduced-motion: no-preference) and (min-width: 1680px) {
    .demo { --s: 2.4; }
  }
  @media (prefers-reduced-motion: no-preference) and (min-width: 1920px) {
    .demo { --s: 2.8; }
  }
}
/* The stops: the window shrunk to fit for the whole view, or at its own size framing
   a corner, held while that corner's caption shows. */
@keyframes tour {
  0%, 20% {
    translate: 0 0; scale: calc(1 / var(--s));
    animation-timing-function: linear(0, 0.013 10.0%, 0.029 20.0%, 0.047 27.1%, 0.083 34.1%, 0.149 40.1%, 0.249 45.1%, 0.365 49.1%, 0.504 53.1%, 0.643 57.1%, 0.759 61.1%, 0.859 66.1%, 0.925 72.1%, 0.961 79.1%, 0.984 89.1%, 1);
  }
  37.9%, 40.1% { translate: calc(var(--x) - var(--l0)) calc(var(--y) - var(--t0)); scale: 1; }
  45.4%, 47.6% { translate: calc(var(--l0) - var(--x) - (var(--s) - 1) * 100cqw) calc(var(--y) - var(--t0)); scale: 1; }
  52.9%, 55.1% { translate: calc(var(--x) - var(--l0)) calc(var(--b) - var(--t0) - var(--s) * 62.5cqw); scale: 1; }
  60.4%, 62.6% {
    translate: calc(var(--l0) - var(--x) - (var(--s) - 1) * 100cqw) calc(var(--b) - var(--t0) - var(--s) * 62.5cqw); scale: 1;
    animation-timing-function: linear(0, 0.013 10.0%, 0.032 20.0%, 0.043 24.0%, 0.079 31.0%, 0.145 37.0%, 0.245 42.0%, 0.361 46.0%, 0.500 50.0%, 0.639 54.0%, 0.755 58.0%, 0.855 63.0%, 0.921 69.0%, 0.957 76.0%, 0.980 86.0%, 1);
  }
  79.4%, 100% { translate: 0 0; scale: calc(1 / var(--s)); }
}
/* The same stops for a wide screen, held longer: see the tour's timeline. */
@keyframes tour-wide {
  0%, 23% { translate: 0 0; scale: calc(1 / var(--s)); }
  37%, 41% { translate: calc(var(--x) - var(--l0)) calc(var(--y) - var(--t0)); scale: 1; }
  44.5%, 48.5% { translate: calc(var(--l0) - var(--x) - (var(--s) - 1) * 100cqw) calc(var(--y) - var(--t0)); scale: 1; }
  52%, 56% { translate: calc(var(--x) - var(--l0)) calc(var(--b) - var(--t0) - var(--s) * 62.5cqw); scale: 1; }
  59.5%, 63.5% { translate: calc(var(--l0) - var(--x) - (var(--s) - 1) * 100cqw) calc(var(--b) - var(--t0) - var(--s) * 62.5cqw); scale: 1; }
  77%, 100% { translate: 0 0; scale: calc(1 / var(--s)); }
}
/* The stage before it pins: see .demo-stage in the tour. */
@keyframes unstick {
  from, to { position: relative; }
}
/* The tour's snap points, on only while the scroll is inside the tour. */
@keyframes snap-on {
  from, to { scroll-snap-align: start; }
}
@keyframes caption {
  0% { opacity: 0; translate: 0 12px; }
  20% { opacity: 1; translate: 0 0; }
  80% { opacity: 1; translate: 0 0; }
  100% { opacity: 0; translate: 0 -8px; }
}
/* A wide screen's tooltip: it moves with the window, so it only fades. */
@keyframes tip {
  0%, 100% { opacity: 0; }
  20%, 80% { opacity: 1; }
}
