/* Case study pages — layout from the Figma "Tenable" redesign (1340:9565) */
:root {
  --bg: #fff;
  --ink: #122039;
  --muted: #6e737b;
  --font: "Unbounded", system-ui, sans-serif;
  --gutter: clamp(16px, 3.01vw, 52px);     /* 52px @ 1728 */
  /* Proportions measured from the Figma reference (1429:5707, a 1357px-wide page) */
  --flow: 69.4vw;                          /* imagery column: 942px of 1357 */
  --flow-now: min(var(--flow), 100vw - 2 * var(--gutter));
  --gap: 16px;                             /* between image tiles */
  --section: clamp(64px, 13.85vw, 240px);  /* text ↔ image: 188px of 1357 */
  --radius: 4px;                           /* image corners: the hero radius, used for every image and card */
  --body-size: clamp(14px, 1.03vw, 16px);  /* 14px at 1357 */
  --body-lh: 1.57;                         /* 22px lines */
  --body-color: var(--ink);               /* all copy: navy on light pages, white on dark ones */
}
.theme-dark { --bg: #181818; --ink: #fff; --muted: #6e737b; }
/* resolve the copy colour on the page itself, so dark pages get white copy */
body { --body-color: var(--ink); }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--font); font-weight: 300;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
img { display: block; max-width: 100%; }
a { color: inherit; }
p, h1, ul, ol { margin: 0; }

.eyebrow { font-size: 12px; line-height: normal; text-transform: uppercase; color: var(--muted); }

/* ---------- Top ---------- */
.cs-top { padding: 57px var(--gutter) 0; padding-right: calc(var(--gutter) + 96px); }
.cs-top .eyebrow { margin-bottom: 6px; }
.cs-title {
  max-width: 915px; font-weight: 300; line-height: normal;
  font-size: clamp(28px, 2.894vw, 50px); text-transform: capitalize;
}
/* Close: a frosted circle in the page's own colours (soft on light pages, dark on dark ones),
   so it stays quiet on white but still reads when it floats over images */
.cs-close {
  position: fixed; z-index: 20; top: 36px; right: calc(var(--gutter) + 4px);
  display: grid; place-items: center;
  width: 48px; height: 48px; border-radius: 50%;
  color: var(--ink);
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ink) 10%, transparent);
  backdrop-filter: blur(10px) saturate(1.3); -webkit-backdrop-filter: blur(10px) saturate(1.3);
  transition: transform .25s;
}
.cs-close:hover { transform: rotate(90deg); }
.cs-close:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }

/* ---------- Hero + intro ---------- */
.cs-hero {
  margin: 37px var(--gutter) 0;
  aspect-ratio: 1624 / 749; border-radius: var(--radius); overflow: hidden; background: #0002;
}
.cs-hero img { width: 100%; height: 100%; object-fit: cover; }

.cs-intro {
  display: flex; justify-content: space-between; gap: 48px;
  margin: 74px var(--gutter) 0;
}
.cs-brief { max-width: 780px; }
.cs-brief .eyebrow, .cs-details dt { margin: 0 0 12px; }   /* same label spacing on both sides */
/* The ask: much larger than the body copy, so the brief reads as the page's opening statement */
.cs-brief p:not(.eyebrow) { font-size: clamp(20px, 1.85vw, 32px); line-height: 1.4; color: var(--body-color); }
.cs-brief p:not(.eyebrow) + p { margin-top: .8em; }

/* Project details: Client across the top, then a 2x2 grid whose top lines up with "The ask" (a <dl> has a default top margin) */
.cs-details {
  flex: none; width: clamp(360px, 34vw, 560px); margin: 0;
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: clamp(24px, 2.6vw, 48px); row-gap: 32px; align-content: start;
}
.cs-details > div:first-child { grid-column: 1 / -1; }   /* Client: its own row above Project type */
.cs-details dt { font-size: 12px; line-height: normal; text-transform: uppercase; color: var(--muted); }
.cs-details dd { margin: 0; font-size: var(--body-size); line-height: var(--body-lh); color: var(--body-color); }

/* ---------- Flow ---------- */
.cs-flow { max-width: calc(var(--flow) + 2 * var(--gutter)); margin: 0 auto; padding: clamp(64px, 15.7vw, 271px) var(--gutter) 0; }
.cs-flow > * + * { margin-top: var(--gap); }
/* Project stages: each narrative paragraph opens a stage, with a big gap before it to separate it
   from the previous stage's images, and only a small one after it, so it sits just above its own images. */
.cs-flow > .cs-text { margin-top: clamp(120px, 20vw, 360px); }
.cs-flow > .cs-text + * { margin-top: clamp(28px, 2.8vw, 48px); }
.cs-flow > .cs-text + .cs-text { margin-top: clamp(120px, 20vw, 360px); }
.cs-flow > .cs-text:first-child { margin-top: 0; }
.cs-text > :first-child { margin-top: 0; }
.cs-text > :last-child { margin-bottom: 0; }

/* Narrative copy: a 484px column, left-aligned with the images it introduces */
/* lines run from the image edge to where "The ask" copy above stops (its max width, or less when the details squeeze it) */
.cs-text { --t-size: clamp(17px, 1.2vw, 20px); position: relative; margin-left: 0;
  width: calc(var(--gutter) + min(780px, 100vw - 2 * var(--gutter) - clamp(360px, 34vw, 560px) - 48px) - (100vw - var(--flow-now)) / 2); font-size: var(--body-size); line-height: var(--body-lh); color: var(--body-color); }
.cs-text p + p { margin-top: calc(var(--body-lh) * 1em); }
.cs-text strong { font-weight: 500; color: var(--ink); }
.cs-text ol { padding-left: 1.3em; margin-top: .6em; }
.cs-text__title { margin: 0 0 .55em; font-size: var(--t-size); line-height: 1.25; font-weight: 400; color: var(--ink); }
/* Section label: out in the left margin, on the page's gutter (in line with "The ask" and the title),
   level with the paragraph's title */
.cs-text__label {
  color: color-mix(in srgb, var(--muted) 62%, var(--bg));
  position: absolute; top: calc(var(--t-size) * 1.25 / 2 - 7px);
  left: calc((var(--flow-now) - 100vw) / 2 + var(--gutter));
  width: calc((100vw - var(--flow-now)) / 2 - var(--gutter) - 20px);
  margin: 0;
}

.tile { position: relative; border-radius: var(--radius); overflow: hidden; overflow: clip; background: #0001; }   /* clip: overlays taller than the tile can never scroll it */
.tile > img { width: 100%; height: 100%; object-fit: cover; }

.cs-row { display: flex; gap: var(--gap); }
.cs-row > .tile { flex: var(--w) 1 0; min-width: 0; }

/* Horizontal scrolling strip: starts on the column edge, bleeds off the right of the page */
.cs-scroll {
  --h: 735;
  /* edge to edge across the page: the first image starts on the column's left edge, and
     scrolled images slide off the left of the page instead of being cut at the column */
  --out: calc((100vw - min(100vw, var(--flow) + 2 * var(--gutter))) / 2 + var(--gutter));
  margin-left: calc(-1 * var(--out)); margin-right: calc(-1 * var(--out));
  padding-left: var(--out); padding-right: var(--out);
  scroll-padding-inline: var(--out);
  display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x proximity;
  scrollbar-width: none;            /* Firefox */
  -ms-overflow-style: none;         /* old Edge */
  cursor: grab;
}
.cs-scroll > .tile { flex: none; height: min(calc(var(--h) * 1px), calc(var(--h) / 1299 * var(--flow-now))); aspect-ratio: var(--ar); scroll-snap-align: start; }

/* Full-bleed band (e.g. Tenable media panel) */
.cs-bleed { margin-left: calc(-1 * (100vw - min(100vw, var(--flow) + 2 * var(--gutter))) / 2); margin-right: calc(-1 * (100vw - min(100vw, var(--flow) + 2 * var(--gutter))) / 2); padding: 0 var(--gutter); }

/* Rebuilt composite panels (positions in % of the Figma panel) */
.panel { container-type: inline-size; }
.panel > * { position: absolute; }
.panel .bg { inset: 0; overflow: hidden; }
.panel .bg img { position: absolute; max-width: none; }
.panel .phone { border: 2px solid var(--line, #024f41); border-radius: 30px; overflow: hidden; }
.panel .phone img { width: 100%; height: 100%; object-fit: cover; }
.panel .label { display: flex; align-items: center; justify-content: center; }
.panel .label span { writing-mode: vertical-rl; transform: rotate(180deg); white-space: nowrap; line-height: normal; }

.cs-end { height: clamp(80px, 12vw, 200px); }

/* ---------- Next project ---------- */
.cs-next { display: block; margin: 0 var(--gutter); padding: 40px 0 56px; text-align: right; border-top: 1px solid color-mix(in srgb, var(--ink) 14%, transparent); text-decoration: none; }
.cs-next .eyebrow { margin-bottom: 8px; }
.cs-next span:last-child { font-size: clamp(18px, 1.4vw, 24px); }
.cs-next:hover span:last-child { text-decoration: underline; text-underline-offset: 6px; text-decoration-thickness: 1px; }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  :root { --flow: calc(100vw - 2 * var(--gutter)); }
  .cs-text { width: auto; max-width: 560px; margin-left: 0; }
  .cs-text__label { position: static; width: auto; margin: 0 0 10px; }   /* no side margin left: label sits above the title */
}
@media (max-width: 900px) {
  .cs-intro { flex-direction: column; }
  .cs-details { width: auto; }
}
@media (max-width: 600px) {
  :root { --gap: 8px; }
  .cs-top { padding-top: 28px; padding-right: calc(var(--gutter) + 56px); }
  .cs-close { top: 20px; right: 12px; }
  .cs-close { width: 40px; height: 40px; }
  .cs-hero { margin-top: 24px; aspect-ratio: 4 / 3; }
  .cs-intro { margin-top: 40px; gap: 32px; }
  .cs-row { flex-wrap: wrap; }
  .cs-row > .tile { flex-basis: 100%; }
  .cs-row.keep > .tile { flex-basis: 0; }
  .cs-scroll > .tile { height: calc(var(--h) / 1299 * 160vw); }
  .panel .phone { border-radius: 12px; border-width: 1px; }
}

/* Two columns of stacked tiles (e.g. one tall image beside two short ones) */
.cs-cols { display: flex; gap: var(--gap); }
.cs-col { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; gap: var(--gap); }
.cs-col > .tile { flex: 1 1 auto; }

/* ---------- Carousel cursor (Figma 1429:5706) ---------- */
.cs-scroll.has-cursor, .cs-scroll.has-cursor * { cursor: none; }
.cs-cursor {
  position: fixed; left: 0; top: 0; z-index: 30; pointer-events: none;
  padding: 7px 10px 6px; border-radius: 3px;
  background: rgba(56, 56, 56, .72); color: #fff;
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  font: 400 12px/1 var(--font); letter-spacing: .04em; text-transform: uppercase; white-space: nowrap;
  opacity: 0; transition: opacity .15s;
}
.cs-cursor.is-on { opacity: 1; }

/* Hide carousel scrollbars in Chrome/Safari (they still scroll by trackpad, swipe, keys and the NEXT/PREV cursor) */
.cs-scroll::-webkit-scrollbar { display: none; }

/* ---------- Videos over images (tools/videos.rb, played by assets/video.js) ---------- */
.cs-hero { position: relative; }
.tile-video {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; display: block; pointer-events: none;
  opacity: 0; transition: opacity .4s ease;            /* the still image shows until it's playing */
}
.tile-video[style] { inset: auto; }                     /* positioned inside a device frame */
.tile-video.is-ready { opacity: 1; }
.tile-mask { position: absolute; z-index: 2; background: #fff; pointer-events: none; }
.tile-video[style*="clip-path"] { z-index: 1; }
.tile-backing { position: absolute; z-index: 0; display: none; background: #fff; pointer-events: none; }
.tile-video.is-ready + .tile-backing { display: block; }   /* white blocks from Figma hiding bits of a video */
.tile-gif {                                             /* animated GIFs from Figma (tools/videos.rb) */
  position: absolute; display: block; object-fit: cover; pointer-events: none; max-width: none;
}
.tile > img.tile-gif { width: auto; height: auto; }     /* sized by its inline left/top/width/height */
@media (prefers-reduced-motion: reduce) { .tile-gif { display: none; } }   /* keep the still image */

/* Click-to-play film (assets/video.js): the still shows until it's played */
.tile.has-film { cursor: none; }
.tile.has-film.is-playing { cursor: auto; background: #000; }
.tile-film {
  position: absolute; inset: 0; width: 100%; height: 100%; display: block;
  object-fit: contain; background: #000;
  opacity: 0; pointer-events: none; transition: opacity .35s ease;
}
.is-playing > .tile-film { opacity: 1; pointer-events: auto; }
.tile.has-film:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.film-cursor { top: 0; left: 0; }
.film-badge {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  padding: 7px 10px 6px; border-radius: 3px; pointer-events: none;
  background: rgba(56, 56, 56, .72); color: #fff;
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  font: 400 12px/1 var(--font); letter-spacing: .04em; text-transform: uppercase; white-space: nowrap;
}
.is-playing > .film-badge { display: none; }

/* Film control bar (assets/video.js): play/pause, time, timeline, sound. No fullscreen, no menu. */
.film-bar {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 2;
  display: flex; align-items: center; gap: 14px;
  padding: 28px 18px 14px;
  background: linear-gradient(transparent, rgba(0, 0, 0, .55));
  color: #fff; font: 400 12px/1 var(--font); letter-spacing: .02em;
  opacity: 0; transition: opacity .35s ease;
}
.is-playing.is-awake > .film-bar, .is-playing.is-paused > .film-bar, .film-bar:focus-within { opacity: 1; }
.film-btn {
  flex: none; display: grid; place-items: center; width: 28px; height: 28px; padding: 0;
  border: 0; border-radius: 50%; background: none; color: inherit; cursor: pointer;
  transition: background-color .2s;
}
.film-btn:hover { background: rgba(255, 255, 255, .15); }
.film-btn:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.film-time { flex: none; font-variant-numeric: tabular-nums; opacity: .9; }
.film-seek {
  --p: 0%;
  flex: 1; min-width: 60px; height: 16px; margin: 0; cursor: pointer;
  -webkit-appearance: none; appearance: none; background: none;
}
.film-seek::-webkit-slider-runnable-track { height: 3px; border-radius: 2px; background: linear-gradient(90deg, #fff var(--p), rgba(255,255,255,.3) var(--p)); }
.film-seek::-moz-range-track { height: 3px; border-radius: 2px; background: rgba(255,255,255,.3); }
.film-seek::-moz-range-progress { height: 3px; border-radius: 2px; background: #fff; }
.film-seek::-webkit-slider-thumb { -webkit-appearance: none; width: 11px; height: 11px; margin-top: -4px; border-radius: 50%; background: #fff; border: 0; }
.film-seek::-moz-range-thumb { width: 11px; height: 11px; border-radius: 50%; background: #fff; border: 0; }
.film-seek:focus-visible { outline: 2px solid #fff; outline-offset: 4px; border-radius: 4px; }
.is-playing > .tile-film { cursor: pointer; }
.film-again {
  position: absolute; z-index: 3; left: 50%; bottom: 22%; transform: translateX(-50%);   /* below the end card's logo */
  display: none; align-items: center; gap: 10px; padding: 14px 24px; border: 0; border-radius: 999px;
  font: 400 14px/1 var(--font); color: #fff; cursor: pointer;
  background: rgba(20, 20, 20, .45); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .25);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  transition: background-color .25s;
}
.film-again:hover { background: rgba(20, 20, 20, .65); }
.film-again:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
.is-ended > .film-again { display: inline-flex; }
@media (max-width: 600px) { .film-bar { gap: 8px; padding: 20px 10px 8px; } .film-time { display: none; } }

/* Pages with no narrative between the images: the imagery runs the full width of the screen,
   lined up with the hero (same side margins) instead of the narrower centred column */
.cs-wide { --flow: calc(100vw - 2 * var(--gutter)); }
.cs-wide .cs-flow { max-width: none; }

/* Carousels whose first image is landscape: that image fills the column width exactly
   (--fr = its height / width, set by tools/build.rb); the rest share its height */
.cs-scroll[style*="--fr"] > .tile { height: calc(var(--flow-now) * var(--fr)); }

/* Principles list inside a narrative column (L’Oréal): 2 x 2, each a line icon over heading and copy */
.cs-text:has(> .cs-points) { width: auto; max-width: none; margin-left: 0; }   /* spans the full image width */
.cs-points { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: 1fr 1fr; column-gap: clamp(32px, 6vw, 96px); row-gap: calc(var(--body-lh) * 2em); }
.cs-points svg { display: block; width: 28px; height: 28px; margin-bottom: 16px; color: var(--ink); }
@media (max-width: 560px) { .cs-points { grid-template-columns: 1fr; } }
.cs-points h3 { margin: 0 0 .4em; font-size: var(--body-size); line-height: var(--body-lh); font-weight: 500; color: var(--ink); }
.cs-points p { margin: 0; }
.cs-points p + p { margin-top: calc(var(--body-lh) * .6em); }

/* Key phrases (<strong> in the narrative): the usual ink, with a band of the footer's two yellows
   (deep gold edging into its bright yellow) sweeping through the words every few seconds. Each sweep
   goes back the way it came, and every other paragraph starts from the opposite side. */
.cs-text strong {
  background: linear-gradient(100deg, var(--ink) 0 41%, color-mix(in srgb, #d9a300 30%, var(--ink)) 46%, color-mix(in srgb, #e8be1c 48%, var(--ink)) 50%, color-mix(in srgb, #d9a300 30%, var(--ink)) 54%, var(--ink) 59% 100%) 100% 0 / 260% 100%;
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  -webkit-box-decoration-break: clone; box-decoration-break: clone;
  animation: kp-sheen 10s cubic-bezier(.45, 0, .55, 1) .6s infinite alternate;
}
.cs-text:nth-child(even of .cs-text) strong,
.cs-text strong:nth-of-type(even) { animation-direction: alternate-reverse; }
@keyframes kp-sheen { 0% { background-position: 100% 0; } 55%, 100% { background-position: 0 0; } }
@media (prefers-reduced-motion: reduce) { .cs-text strong { animation: none; } }

/* Big results figures (Sprout AI): three across the image width, each with a hairline above */
.cs-stats ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(20px, 2.4vw, 40px); }
.cs-stats li { display: flex; flex-direction: column; gap: 14px; padding-top: 20px; border-top: 1px solid color-mix(in srgb, var(--ink) 16%, transparent); }
.cs-stat__n { font-size: clamp(56px, 7vw, 120px); line-height: .95; font-weight: 300; letter-spacing: -.03em; color: var(--ink); }
.cs-stat__t { max-width: 22em; font-size: var(--body-size); line-height: var(--body-lh); color: var(--body-color); }
.cs-stats__note { margin-top: 28px; font-size: 12px; color: var(--muted); }
@media (max-width: 720px) { .cs-stats ul { grid-template-columns: 1fr; gap: 36px; } }

/* ---------- "See the old version": a pill under the ask, opening a full-screen screenshot carousel ---------- */
.cs-before-btn {
  display: inline-flex; align-items: center; gap: 16px; margin-top: clamp(28px, 2.6vw, 44px);
  padding: 15px 28px; border: 1px solid var(--ink); border-radius: 999px;
  font: 400 14px/1 var(--font); color: var(--ink); background: transparent; cursor: pointer;
  transition: background-color .25s, color .25s;
}
.cs-before-btn svg { transition: transform .3s var(--ease, ease); }
.cs-before-btn:hover { background: var(--ink); color: var(--bg); }
.cs-before-btn:hover svg { transform: scale(1.2); }
.cs-before-btn:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }

.cs-before {
  position: fixed; inset: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 58%, transparent);
  backdrop-filter: blur(28px) saturate(1.1); -webkit-backdrop-filter: blur(28px) saturate(1.1);
  opacity: 0; transition: opacity .35s ease;
}
.cs-before[hidden] { display: none; }
.cs-before.is-open { opacity: 1; }
.cs-before__label { position: absolute; top: 44px; left: var(--gutter); margin: 0; }
.cs-before__count { margin-left: 10px; color: var(--ink); }
.cs-before__track {
  list-style: none; margin: 0; padding: 0; height: 100%;
  display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior: contain;
}
.cs-before__track::-webkit-scrollbar { display: none; }
.cs-before__track li {
  flex: 0 0 100%; scroll-snap-align: center; display: grid; place-items: center;
  padding: 112px calc(var(--gutter) + 72px) 64px;
}
.cs-before__track img {
  display: block; max-width: min(100%, 1040px); max-height: min(60vh, 640px); width: auto; height: auto; object-fit: contain;
  border-radius: var(--radius); box-shadow: 0 20px 60px rgba(0, 0, 0, .18);
  transform: scale(.97); transition: transform .5s cubic-bezier(.22, .8, .2, 1);
}
.cs-before.is-open .cs-before__track img { transform: none; }
.cs-before__nav {
  position: absolute; display: grid; place-items: center; width: 48px; height: 48px; padding: 0;
  border: 0; border-radius: 50%; cursor: pointer; color: var(--ink);
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ink) 10%, transparent);
  transition: transform .25s, opacity .25s;
}
.cs-before__nav { top: calc(50% + 24px); transform: translateY(-50%); }
.cs-before__nav--prev { left: var(--gutter); }
.cs-before__nav--next { right: var(--gutter); }
.cs-before__nav:hover { transform: translateY(-50%) scale(1.08); }
.cs-before__nav:disabled { opacity: 0; pointer-events: none; }
/* its own close: a filled pill at the bottom, unlike the drawer's round × in the top corner */
.cs-before__close {
  position: absolute; left: 50%; bottom: clamp(24px, 4vh, 44px); transform: translateX(-50%);
  display: inline-flex; align-items: center; gap: 10px; padding: 14px 22px 14px 24px;
  border: 0; border-radius: 999px; cursor: pointer;
  font: 400 14px/1 var(--font); color: var(--bg); background: var(--ink);
  transition: transform .25s, opacity .25s;
}
.cs-before__close svg { transition: transform .25s; }
.cs-before__close:hover svg { transform: rotate(90deg); }
.cs-before button:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.cs-before--single .cs-before__nav, .cs-before--single .cs-before__count { display: none; }
html.cs-before-lock { overflow: hidden; }
/* phone screenshots: a row of screens, scrolled a page at a time */
.cs-before--phones { --side: calc(var(--gutter) + 72px); }
.cs-before--phones .cs-before__track { padding: 0 var(--side); scroll-padding: 0 var(--side); gap: clamp(16px, 1.6vw, 28px);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 var(--side), #000 calc(100% - var(--side)), transparent);
          mask-image: linear-gradient(90deg, transparent, #000 var(--side), #000 calc(100% - var(--side)), transparent); }
.cs-before--phones .cs-before__track li { flex: 0 0 auto; padding: 112px 0 64px; scroll-snap-align: start; }
.cs-before--phones .cs-before__track li:last-child { margin-right: var(--side); }
.cs-before--phones .cs-before__track img { height: min(58vh, 540px); max-height: none; max-width: none; }
@media (max-width: 720px) {
  .cs-before__track li { padding: 104px var(--gutter) 40px; }
  .cs-before__track img { max-height: 56vh; }
  .cs-before--phones { --side: var(--gutter); }
  .cs-before--phones .cs-before__track li { padding: 88px 0 96px; scroll-snap-align: center; }
  .cs-before--phones .cs-before__track img { height: auto; width: 56vw; max-height: none; }
  .cs-before__nav { top: auto; bottom: clamp(24px, 4vh, 44px); transform: none; }
  .cs-before__nav:hover { transform: scale(1.08); }
}
@media (prefers-reduced-motion: reduce) {
  .cs-before, .cs-before__track img { transition: none; }
}
