/* Dean Javed Portfolio — case study page. Source: Figma "Portfolio – Phenome case study" (416:17).
   Load after home.css (shares nav, footer, links and the pill button). */

:root {
  --text-primary: #171717;
  --text-secondary: #737373;
  --border-subtle: #e7ded0;
  --surface-inverse: #171717;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --peek: 32px;
}

/* ------------------------------------------------------------------
   Sheet: the page slides in from the right over a ghost underlay,
   and pulls right when the left edge is hovered.
   ------------------------------------------------------------------ */
.cs-body { background: var(--ghost); overflow-x: clip; }

.cs-sheet {
  position: relative;
  min-height: 100vh;
  background: var(--bg);
  animation: cs-enter 720ms var(--ease-out) backwards;
  transition: transform 420ms var(--ease-out), box-shadow 420ms var(--ease-out);
}
@keyframes cs-enter {
  from { transform: translateX(100%); box-shadow: -24px 0 60px rgba(26, 18, 11, 0.12); }
  to   { transform: translateX(0);    box-shadow: -24px 0 60px rgba(26, 18, 11, 0); }
}

/* Left-edge back affordance */
.cs-edge {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 10;
  width: clamp(20px, calc((100vw - 1153px) / 2 - 16px), 56px);
  cursor: pointer;
}
.cs-edge:is(:hover, :focus-visible) ~ .cs-sheet {
  transform: translateX(var(--peek));
  box-shadow: -16px 0 40px rgba(26, 18, 11, 0.10);
}
.cs-edge:focus-visible { outline: none; }

/* Leaving: the sheet slides back out to the right */
.cs-body.is-leaving .cs-sheet {
  transform: translateX(100%);
  box-shadow: -24px 0 60px rgba(26, 18, 11, 0.12);
  transition-duration: 480ms;
  transition-timing-function: cubic-bezier(0.7, 0, 0.84, 0);
}

@media (hover: none) { .cs-edge { display: none; } }

/* ------------------------------------------------------------------
   Shared type
   ------------------------------------------------------------------ */
.cs-kicker { margin: 0; font-size: 14px; font-style: italic; line-height: 22.4px; letter-spacing: -0.08px; color: var(--text-secondary); }
.cs-h2 { margin: 12.6px 0 0; font-size: 28px; font-weight: 500; line-height: 35px; letter-spacing: -0.32px; color: var(--text-primary); }
.cs-text { max-width: 700px; margin-top: 20px; font-size: 16px; line-height: 25.6px; letter-spacing: -0.31px; color: var(--text-secondary); }
.cs-caption { margin-top: 16px; font-size: 12px; line-height: 19.2px; letter-spacing: -0.08px; color: var(--text-secondary); }
.cs-panel { margin: 36px 0 0; background: var(--ghost); }
.cs-small { font-size: 12px; line-height: 19.2px; letter-spacing: -0.08px; color: var(--text-secondary); }

/* ------------------------------------------------------------------
   Introduction
   ------------------------------------------------------------------ */
.cs-intro { padding: 40px 0 40.6px; border-bottom: 1px solid var(--border-subtle); }
.cs-back { font-size: 14px; line-height: 22.4px; color: var(--text-secondary); text-decoration: none; transition: color 200ms ease-out; }
.cs-back:hover { color: var(--text-primary); }
.cs-intro .cs-kicker { margin-top: 42.6px; }
.cs-title { margin: 15.6px 0 0; font-size: 52px; font-weight: 500; line-height: 59.8px; color: var(--text-primary); }
.cs-subtitle { max-width: 760px; margin-top: 17.2px; font-size: 24px; line-height: 33.6px; color: var(--text-secondary); }
.cs-facts { display: grid; grid-template-columns: repeat(3, 270px); gap: 16px 30px; margin: 62.4px 0 0; }
.cs-facts dt { font-size: 11px; font-weight: 700; line-height: 17.6px; color: var(--text-secondary); }
.cs-facts dd { margin: 7.4px 0 0; font-size: 14px; line-height: 22.4px; color: var(--text-primary); }

/* ------------------------------------------------------------------
   Body: sticky index + narrative
   ------------------------------------------------------------------ */
.cs-main { display: flex; align-items: flex-start; gap: 56px; padding: 56px 0 80px; }

.cs-index { position: sticky; top: 32px; flex: none; display: flex; flex-direction: column; align-items: flex-start; gap: 24px; width: 233px; }
.cs-index__title { margin: 0; font-size: 14px; font-style: italic; font-weight: 400; line-height: 22.4px; color: var(--text-primary); }
.cs-index ol { display: contents; list-style: none; }
.cs-index li { display: block; }
.cs-index a { font-size: 13px; line-height: 20.8px; color: var(--text-secondary); text-decoration: none; white-space: pre; transition: color 200ms ease-out; }
.cs-index a:hover, .cs-index a[aria-current="true"] { color: var(--text-primary); }
.cs-index__rule { width: 180px; height: 1px; background: var(--border-subtle); }
.cs-index__meta { font-size: 13px; line-height: 20.8px; color: var(--text-secondary); }

.cs-narrative { display: flex; flex-direction: column; gap: 80px; flex: 1 1 auto; min-width: 0; max-width: 864px; }
.cs-narrative section { scroll-margin-top: 32px; }

/* 04 Visual design principles */
.cs-principles { display: grid; grid-template-columns: 248px 280px 1fr; padding: 24px 0 64px 32px; list-style: none; }
.cs-principles li { position: relative; }
.cs-principles li + li { padding-left: 32px; }
.cs-principles li + li::before { content: ""; position: absolute; top: 8px; left: 0; width: 1px; height: 168px; background: var(--border-subtle); }
.cs-principles h3 { margin: 24.8px 0 0; font-size: 26px; font-weight: 500; line-height: 31.2px; letter-spacing: -0.31px; color: var(--text-primary); }
.cs-principles p:last-child { margin-top: 20.8px; font-size: 15px; line-height: 24px; letter-spacing: -0.31px; color: var(--text-secondary); }

/* 05 Pipeline */
.cs-pipeline { display: grid; grid-template-columns: 174px 34px 174px 34px 174px 34px 1fr; padding: 24px 0 58.2px 32px; list-style: none; }
.cs-pipeline__arrow { margin-top: 43px; font-size: 20px; line-height: 32px; letter-spacing: -0.31px; color: var(--text-secondary); }
.cs-pipeline h3 { margin: 22.8px 0 0; font-size: 22px; font-weight: 500; line-height: 27.5px; letter-spacing: -0.31px; color: var(--text-primary); }
.cs-pipeline p:last-child { margin-top: 15.5px; font-size: 13px; line-height: 20.8px; letter-spacing: -0.08px; color: var(--text-secondary); }
.cs-statement { max-width: 750px; margin-top: 26px; font-size: 16px; line-height: 25.6px; letter-spacing: -0.31px; color: var(--text-primary); }

/* 06 Takeaways */
/* ------------------------------------------------------------------
   General-purpose narrative blocks (used by every case study)
   ------------------------------------------------------------------ */
/* Opening paragraph of a narrative */
.cs-lead { max-width: 700px; font-size: 24px; line-height: 33.6px; letter-spacing: -0.31px; color: var(--text-primary); text-wrap: pretty; }
.cs-lead + .cs-text { margin-top: 28px; }
.cs-h2 + .cs-lead { margin-top: 20px; }
.cs-text strong { font-weight: 500; color: var(--text-primary); }

/* Quoted source text */
.cs-quote { max-width: 700px; margin: 28px 0 0; padding-left: 20px; border-left: 2px solid var(--border-subtle); font-size: 18px; font-style: italic; line-height: 28.8px; letter-spacing: -0.31px; color: var(--text-primary); }
.cs-quote + .cs-text { margin-top: 28px; }
.cs-shot + .cs-text { margin-top: 36px; }

/* Bulleted list in the body-text style */
.cs-list { max-width: 700px; margin: 20px 0 0; padding-left: 20px; }
.cs-list li { font-size: 16px; line-height: 25.6px; letter-spacing: -0.31px; color: var(--text-secondary); }
.cs-list li + li { margin-top: 8px; }
.cs-list li::marker { color: var(--text-primary); }
.cs-list strong { font-weight: 500; color: var(--text-primary); }

/* Numbered sub-step inside a long section (e.g. the five Approach steps) */
.cs-step { margin-top: 48px; }
.cs-step + .cs-step { margin-top: 56px; }
.cs-subhead { margin: 0; font-size: 20px; font-weight: 500; line-height: 28px; letter-spacing: -0.31px; color: var(--text-primary); }
.cs-subhead span { margin-right: 10px; font-size: 13px; font-weight: 400; color: var(--text-secondary); }
.cs-step .cs-text, .cs-step .cs-list { margin-top: 12px; }

/* 2x2 grid of issues on a ghost panel */
.cs-issues { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 36px 0 0; padding: 0; list-style: none; background: var(--ghost); }
.cs-issues li { padding: 28px 32px 32px; }
.cs-issues li:nth-child(even) { border-left: 1px solid var(--border-subtle); }
.cs-issues li:nth-child(n + 3) { border-top: 1px solid var(--border-subtle); }
.cs-issues h3 { margin: 16px 0 0; font-size: 22px; font-weight: 500; line-height: 27.5px; letter-spacing: -0.31px; color: var(--text-primary); }
.cs-issues p:last-child { margin-top: 10px; font-size: 15px; line-height: 24px; letter-spacing: -0.31px; color: var(--text-secondary); }

/* One headline number on a ghost panel */
.cs-stat { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 24px; margin-top: 36px; padding: 32px 40px; background: var(--ghost); }
.cs-stat__value { font-size: 56px; font-weight: 500; line-height: 60.48px; letter-spacing: -0.32px; color: var(--text-primary); }
.cs-stat__label { max-width: 360px; font-size: 15px; line-height: 24px; letter-spacing: -0.31px; color: var(--text-secondary); }

/* Screenshot figure (inserted once images exist) */
.cs-shot { margin: 36px 0 0; }
.cs-shot__frame { padding: 24px; background: var(--ghost); }
/* No width here: the width/height attributes reserve the space while the image loads */
.cs-shot img { display: block; max-width: 100%; height: auto; margin: 0 auto; }

/* Click to enlarge: the whole frame is the link's hit area (casestudy.js opens the dialog) */
.cs-shot__frame--zoom { position: relative; display: grid; grid-template-columns: minmax(0, 1fr); }
.cs-shot__frame--zoom > * { grid-area: 1 / 1; }
.cs-zoom-link { place-self: end start; margin: 12px; }
.cs-zoom-link::after { content: ""; position: absolute; inset: 0; }

.cs-zoom { width: 100vw; max-width: none; height: 100vh; height: 100dvh; max-height: none; margin: 0; padding: 0; border: 0; background: var(--bg); color: var(--text-primary); }
.cs-zoom[open] { display: flex; flex-direction: column; animation: cs-zoom-in 220ms ease-out; }
@keyframes cs-zoom-in { from { opacity: 0; } }
html:has(.cs-zoom[open]) { overflow: hidden; }
.cs-zoom__bar { display: flex; flex: none; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 24px; border-bottom: 1px solid var(--border-subtle); }
.cs-zoom__title { font-size: 14px; line-height: 22.4px; }
.cs-zoom__actions { display: flex; flex: none; gap: 8px; }
.cs-zoom__btn { padding: 12px 20px; border: 1px solid var(--card-ink); border-radius: 100px; background: transparent; color: var(--card-ink); font: 600 13px/normal var(--font); cursor: pointer; }
.cs-zoom__btn--solid { background: var(--card-ink); color: #ffffff; }
.cs-zoom__view { display: flex; flex: 1; min-height: 0; padding: 24px; overflow: auto; }
.cs-zoom__view:focus-visible { outline: 2px solid var(--fg); outline-offset: -4px; }
.cs-zoom__view img { display: block; flex: none; max-width: 100%; max-height: 100%; width: auto; height: auto; margin: auto; }
.cs-zoom.is-zoomed img { max-width: none; max-height: none; }

/* Before/after slider: two snapshots of the same size, wiped by a draggable divider.
   --pos is the divider's position; casestudy.js sets it from the pointer or the arrow keys.
   Registered as a percentage so clicks and key presses can ease to the new position. */
@property --pos { syntax: "<percentage>"; inherits: true; initial-value: 50%; }
.cs-compare__stage { position: relative; isolation: isolate; display: grid; border-radius: 12px; box-shadow: 0 0 0 1px var(--line), var(--card-shadow); cursor: ew-resize; touch-action: pan-y; -webkit-user-select: none; user-select: none; transition: --pos 240ms var(--ease-out); }
.cs-compare__stage.is-dragging { transition: none; }
.cs-compare__side { position: relative; grid-area: 1 / 1; border-radius: inherit; overflow: hidden; pointer-events: none; }
/* Both sides are clipped, so neither bleeds through the other's rounded edge */
.cs-compare__side--before { clip-path: inset(0 calc(100% - var(--pos)) 0 0); }
.cs-compare__side--after { clip-path: inset(0 0 0 var(--pos)); }
.cs-compare__side img { width: 100%; }
/* The tags sit inside the sides, so the divider wipes them along with the picture */
.cs-compare__tag { position: absolute; bottom: 16px; padding: 8px 12px; border-radius: 100px; background: #ffffff; box-shadow: 0 2px 10px rgba(26, 18, 11, 0.18); color: var(--card-ink); font-size: 12px; font-weight: 600; line-height: 1; }
.cs-compare__side--before .cs-compare__tag { left: 16px; }
.cs-compare__side--after .cs-compare__tag { right: 16px; }
/* The line is a background so the rounded corners clip it; the knob is free to hang over the edges */
.cs-compare__stage::after { content: ""; position: absolute; z-index: 1; inset: 0; border-radius: inherit; background: linear-gradient(to right, rgba(255, 255, 255, 0.7) 1px, var(--card-ink) 1px 3px, rgba(255, 255, 255, 0.7) 3px) var(--pos) 0 / 4px 100% no-repeat; pointer-events: none; }
.cs-compare__knob { position: absolute; z-index: 2; top: 50%; left: var(--pos); border: 2px solid #ffffff; border-radius: 50%; background: var(--card-ink); fill: none; stroke: #ffffff; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transform: translate(-50%, -50%); pointer-events: none; }
/* The range input carries keyboard and screen reader control; the knob shows its focus */
.cs-compare__range { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; pointer-events: none; }
.cs-compare__range:focus-visible ~ .cs-compare__knob { outline: 2px solid var(--fg); outline-offset: 2px; }
/* Without JS the divider cannot move, so show the two pages one after the other */
@media (scripting: none) {
  .cs-compare__stage { gap: 12px; box-shadow: none; cursor: auto; }
  .cs-compare__side { grid-area: auto; box-shadow: 0 0 0 1px var(--line); clip-path: none; }
  .cs-compare__stage::after, .cs-compare__range, .cs-compare__knob, .cs-compare__hint { display: none; }
}

.cs-shot figcaption { margin-top: 16px; font-size: 12px; line-height: 19.2px; letter-spacing: -0.08px; color: var(--text-secondary); }

/* Photos in justified rows: the photos in a row share one height, each as wide as its shape
   (--r is the crop's width / height). On phones the rows give way to two columns. */
.cs-photos__grid { display: grid; gap: 12px; }
.cs-photos__row { display: flex; gap: 12px; }
.cs-shot .cs-photos__row img { flex: var(--r) 1 0%; min-width: 0; width: 0; height: auto; margin: 0; }

/* The feed, before and after: each tile has an old post on the front and a new one on the back,
   and casestudy.js turns them over. Below, the color palette measured from each set. */
.cs-feed__switch { display: inline-flex; gap: 2px; margin: 0 0 16px; padding: 3px; border-radius: 100px; background: #ffffff; box-shadow: 0 0 0 1px var(--line); }
.cs-feed__switch[hidden] { display: none; }
.cs-feed__switch button { padding: 9px 18px; border: 0; border-radius: 100px; background: none; color: var(--text-secondary); font: 600 13px/1 var(--font); cursor: pointer; transition: background-color 250ms ease-out, color 250ms ease-out; }
.cs-feed__switch button:hover { color: var(--text-primary); }
.cs-feed__switch button[aria-pressed="true"] { background: var(--card-ink); color: #ffffff; }
.cs-feed__switch button:focus-visible { outline: 2px solid var(--fg); outline-offset: 2px; }
.cs-feed__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; margin: 0; padding: 0; list-style: none; }
.cs-feed__grid li { position: relative; aspect-ratio: 1; perspective: 1000px; }
.cs-feed__card { position: absolute; inset: 0; transform-style: preserve-3d; transition: transform 900ms var(--ease-out) var(--delay, 0ms); }
.cs-shot .cs-feed__card img { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; object-fit: cover; -webkit-backface-visibility: hidden; backface-visibility: hidden; }
.cs-feed__card img + img { transform: rotateY(180deg); }
.cs-feed__grid[data-side="after"] .cs-feed__card { transform: rotateY(180deg); }

/* A bar per set, each color as wide as its share of the pixels (--s), darkest first */
.cs-palette { display: grid; gap: 20px; margin-top: 28px; }
.cs-palette__title { font-size: 14px; font-weight: 500; line-height: 22.4px; color: var(--text-primary); }
.cs-palette__row { display: grid; grid-template-columns: 64px minmax(0, 1fr); align-items: center; gap: 10px 16px; }
.cs-palette__label { font-size: 11px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--text-secondary); }
.cs-palette__bar { display: flex; gap: 2px; height: 44px; overflow: hidden; border-radius: 8px; }
.cs-palette__bar span { flex: var(--s) 1 0; min-width: 3px; background: var(--c); }
.cs-palette__chips { grid-column: 2; display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 0; padding: 0; list-style: none; font-size: 12px; line-height: 1.4; color: var(--text-secondary); font-variant-numeric: tabular-nums; }
.cs-palette__chips li { display: inline-flex; align-items: center; gap: 6px; }
.cs-palette__chips i { width: 10px; height: 10px; border-radius: 50%; box-shadow: 0 0 0 1px rgba(10, 10, 10, 0.1); }
.cs-palette__stats { display: flex; flex-wrap: wrap; gap: 16px 40px; margin: 4px 0 0; }
.cs-palette__stats div { display: flex; flex-direction: column; gap: 4px; padding-left: 16px; border-left: 2px solid var(--accent); }
.cs-palette__stats dt { font-size: 11px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--text-secondary); }
.cs-palette__stats dd { margin: 0; font-size: 20px; font-weight: 500; color: var(--text-primary); font-variant-numeric: tabular-nums; }
/* With the switch working, one row shows whichever set is turned up (casestudy.js morphs it) */
.cs-feed.is-live .cs-palette__row[data-row="after"] { display: none; }

/* Videos. casestudy.js plays them only while they're on screen, and not at all with reduced
   motion until the round button is pressed; the button pauses them too. */
.cs-media-toggle { position: absolute; right: 12px; bottom: 12px; z-index: 2; display: grid; place-items: center; width: 36px; height: 36px; padding: 0; border: 0; border-radius: 50%;
                   background: rgba(255, 255, 255, 0.92); color: var(--card-ink); box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18); cursor: pointer; }
.cs-media-toggle[hidden] { display: none; }
.cs-media-toggle:focus-visible { outline: 2px solid var(--fg); outline-offset: 2px; }
/* Pause: two bars. Play: a triangle. */
.cs-media-toggle i { width: 10px; height: 12px; background: currentColor; clip-path: polygon(0 0, 35% 0, 35% 100%, 65% 100%, 65% 0, 100% 0, 100% 100%, 0 100%); }
.cs-media-toggle.is-paused i { margin-left: 2px; clip-path: polygon(0 0, 100% 50%, 0 100%); }

/* The caption contest as Instagram-style stories: one clip after another, on a loop, with a bar
   per clip that fills as it plays. Without JS, the first clip's still shows. */
.cs-stories .cs-shot__frame { display: flex; justify-content: center; }
.cs-stories__phone { position: relative; width: min(100%, 300px); aspect-ratio: 9 / 16; overflow: hidden; border-radius: 18px; background: #ffffff; box-shadow: 0 18px 40px rgba(26, 18, 11, 0.14); }
.cs-stories__phone video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cs-stories__phone video + video { display: none; }
.cs-stories.is-live .cs-stories__phone video { display: block; opacity: 0; }
.cs-stories.is-live .cs-stories__phone video.is-on { opacity: 1; }
.cs-stories__bars { position: absolute; top: 10px; left: 10px; right: 10px; z-index: 1; display: none; gap: 4px; }
.cs-stories.is-live .cs-stories__bars { display: flex; }
.cs-stories__bars span { flex: 1; height: 3px; overflow: hidden; border-radius: 3px; background: rgba(26, 26, 26, 0.16); }
.cs-stories__bars i { display: block; height: 100%; background: var(--card-ink); transform: scaleX(0); transform-origin: left; }
.cs-stories .ac-transcript { margin-top: 12px; }

/* A short loop to close the page. The 3:4 box trims the Instagram story's bands above and below. */
.cs-loop { margin: 36px 0 0; }
.cs-loop__media { position: relative; width: min(100%, 340px); aspect-ratio: 3 / 4; overflow: hidden; border-radius: 16px; background: var(--ghost); }
.cs-loop video { display: block; width: 100%; height: 100%; object-fit: cover; }

/* A square image shown smaller than the column */
.cs-shot img.cs-shot__img--md { width: min(100%, 560px); }

/* Next project */
.cs-next { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px; padding: 40px 0 69.4px; border-top: 1px solid var(--border-subtle); }
.cs-next__title { margin: 16.6px 0 0; font-size: 42px; font-weight: 500; line-height: 48.3px; letter-spacing: -0.32px; color: var(--text-primary); }
.cs-next__sub { margin-top: 17.7px; font-size: 16px; line-height: 25.6px; letter-spacing: -0.31px; color: var(--text-secondary); }

/* Footer: reuses .hm-footer, plus the copyright line */
.cs-footer-wrap { padding-top: 24px; }
.cs-copyright { padding: 21px 0 28.8px; }

/* ------------------------------------------------------------------
   Responsive
   ------------------------------------------------------------------ */
@media (max-width: 1100px) {
  .cs-main { flex-direction: column; gap: 48px; }
  .cs-index { position: static; width: auto; gap: 12px; }
  .cs-narrative { max-width: none; width: 100%; }
}

@media (max-width: 900px) {
  .cs-facts { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
  .cs-issues { grid-template-columns: 1fr; }
  .cs-issues li { padding: 24px; }
  .cs-issues li:nth-child(even) { border-left: 0; }
  .cs-issues li + li { border-top: 1px solid var(--border-subtle); }
  .cs-stat { padding: 24px; }
  .cs-stat__value { font-size: 44px; line-height: 48px; }
  .cs-shot__frame { padding: 12px; }
  .cs-photos__grid, .cs-photos__row { gap: 8px; }
  .cs-principles { grid-template-columns: 1fr; gap: 32px; padding: 24px 24px 32px; }
  .cs-principles li + li { padding: 32px 0 0; }
  .cs-principles li + li::before { top: 0; width: 100%; height: 1px; }
  .cs-pipeline { grid-template-columns: 1fr; padding: 24px; }
  .cs-pipeline__arrow { margin: 4px 0; transform: rotate(90deg); width: 20px; }
}

@media (max-width: 639px) {
  .cs-title { font-size: 40px; line-height: 46px; }
  .cs-subtitle { font-size: 20px; line-height: 28px; }
  .cs-lead { font-size: 20px; line-height: 28px; }
  .cs-photos__grid { display: block; columns: 2; column-gap: 8px; }
  .cs-photos__row { display: contents; }
  .cs-shot .cs-photos__row img { width: 100%; margin: 0 0 8px; break-inside: avoid; }
  .cs-feed__grid { gap: 3px; }
  .cs-palette__row { grid-template-columns: minmax(0, 1fr); }
  .cs-palette__chips { grid-column: 1; }
  .cs-quote { padding-left: 16px; font-size: 17px; line-height: 27px; }
  .cs-next__title { font-size: 32px; line-height: 38px; }
  .cs-shot__frame--zoom .cs-zoom-link { grid-area: 2 / 1; margin: 12px 0 0; }
  .cs-zoom__bar { padding: 12px 16px; }
  /* Smaller, and clear of the photos and the stats band */
  .cs-compare__knob { width: 36px; height: 36px; }
  .cs-compare__tag { bottom: calc(17.5% + 6px); padding: 5px 8px; font-size: 11px; }
  .cs-compare__side--before .cs-compare__tag { left: 6px; }
  .cs-compare__side--after .cs-compare__tag { right: 6px; }
}

@media (prefers-reduced-motion: reduce) {
  .cs-sheet { animation: none; transition: none; }
  .cs-edge:is(:hover, :focus-visible) ~ .cs-sheet { transform: none; box-shadow: none; }
  .cs-back, .cs-index a { transition: none; }
  .cs-zoom[open] { animation: none; }
  .cs-compare__stage { transition: none; }
  /* The posts swap instead of turning over */
  .cs-feed__card { transition: none; transform: none !important; }
  .cs-feed__card img + img { transform: none; opacity: 0; }
  .cs-feed__grid[data-side="after"] .cs-feed__card img + img { opacity: 1; }
  .cs-feed__switch button { transition: none; }
}
