/* ============================================================
   Case Study layout — editorial, calm, spacious.
   Builds on tokens.css + style.css (header, footer, buttons,
   glass, aurora, contour all inherited).
   ============================================================ */

/* ---------- Reading measure + rhythm ---------- */
.cs {
  --measure: 68ch;
  --wide: 1080px;
  --bleed: 1340px;
}

.cs-wrap { width: 100%; max-width: var(--wide); margin-inline: auto; padding-inline: var(--gutter); }
.cs-prose { width: 100%; max-width: var(--measure); margin-inline: auto; }

/* Section rhythm — generous whitespace */
.cs-section { padding-block: clamp(56px, 8vw, 132px); position: relative; }
.cs-section + .cs-section { padding-top: 0; }

.cs-eyebrow {
  display: inline-flex; align-items: center; gap: var(--scale-200);
  font-family: var(--font-body); font-size: var(--fs-overline); font-weight: 500;
  letter-spacing: var(--tracking-overline); text-transform: uppercase; color: var(--text-muted);
  margin-bottom: var(--scale-500);
}
.cs-eyebrow::before { content: ""; width: 22px; height: 1px; background: var(--primary-default); }

.cs-h2 { font-size: clamp(1.75rem, 1.2rem + 2vw, 2.75rem); line-height: var(--lh-snug); max-width: 22ch; }
.cs-h3 { font-size: var(--fs-h5); line-height: var(--lh-snug); margin-bottom: var(--scale-400); }

/* ---------- Prose ---------- */
.prose { color: var(--text-body); }
.prose > * + * { margin-top: 1.4em; }
.prose p { font-size: 1.1875rem; line-height: 1.78; color: var(--text-body); }
.prose p.lead-in { font-size: clamp(1.1875rem, 1.12rem + 0.35vw, 1.375rem); line-height: 1.6; color: var(--text-headings); font-weight: 500; }
.prose strong { color: var(--text-headings); font-weight: 500; }
.prose a { color: var(--text-action); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; text-decoration-color: var(--clay-300); }
.prose ul { margin-top: 1.2em; display: grid; gap: 0.7em; }
.prose ul li { position: relative; padding-left: 1.5em; font-size: 1.0625rem; line-height: 1.7; color: var(--text-body); }
.prose ul li::before { content: ""; position: absolute; left: 0; top: 0.72em; width: 7px; height: 7px; border-radius: 50%; background: var(--primary-default); }
.cs-section-head { margin-bottom: clamp(28px, 4vw, 56px); }

/* ---------- HERO ---------- */
.cs-hero { padding-top: clamp(120px, 16vh, 180px); padding-bottom: clamp(40px, 6vw, 80px); }
.cs-hero__eyebrow { margin-bottom: var(--scale-500); }
.cs-hero__title {
  font-size: clamp(2.5rem, 1.2rem + 4.6vw, 4.25rem);
  line-height: 1.04; letter-spacing: -0.025em; max-width: 18ch; margin-bottom: var(--scale-600);
}
.cs-hero__dek { font-size: var(--fs-lead); line-height: var(--lh-relaxed); color: var(--text-muted); max-width: 52ch; }

.cs-meta {
  display: flex; flex-wrap: wrap; gap: clamp(28px, 5vw, 72px);
  margin-top: clamp(36px, 5vw, 60px); padding-top: var(--scale-700);
  border-top: 1px solid var(--border-default);
}
.cs-meta__item { display: grid; gap: 4px; }
.cs-meta__k { font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: var(--tracking-overline); color: var(--text-muted); }
.cs-meta__v { font-size: var(--fs-sm); color: var(--text-body); line-height: 1.5; }

/* ---------- FIGURES ---------- */
.cs-figure { margin-block: clamp(36px, 6vw, 88px); }
.cs-figure--wide { max-width: var(--wide); }
.cs-figure--bleed { max-width: var(--bleed); }
.cs-figure__frame {
  position: relative; border-radius: var(--radius-2xl); overflow: hidden;
  border: 1px solid var(--border-default); background: var(--surface-default);
  box-shadow: var(--shadow-md);
}
.cs-figure__placeholder {
  aspect-ratio: 16 / 9; display: grid; place-content: center; gap: 12px; text-align: center; padding: 32px;
}
.cs-figure__placeholder[data-ratio="4-3"] { aspect-ratio: 4 / 3; }
.cs-figure__placeholder[data-ratio="3-2"] { aspect-ratio: 3 / 2; }
.cs-figure__placeholder[data-ratio="device"] { aspect-ratio: 9 / 12; max-width: 420px; margin-inline: auto; }
.art-clay { background: radial-gradient(120% 120% at 20% 12%, var(--clay-100), transparent 55%), linear-gradient(150deg, var(--clay-200), var(--sand-200)); }
.art-river { background: radial-gradient(120% 120% at 80% 10%, var(--river-100), transparent 55%), linear-gradient(150deg, var(--river-200), var(--sand-200)); }
.art-moss { background: radial-gradient(120% 120% at 25% 85%, var(--moss-100), transparent 55%), linear-gradient(150deg, var(--moss-200), var(--sand-200)); }
.art-slate { background: radial-gradient(120% 120% at 70% 20%, var(--slate-100), transparent 55%), linear-gradient(150deg, var(--sand-100), var(--sand-300)); }
.cs-figure__tag {
  font-family: var(--font-body); font-size: var(--fs-xs); letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--text-muted); display: inline-flex; align-items: center; gap: 8px; justify-self: center;
  background: var(--glass-bg-strong); border: 1px solid var(--glass-border); border-radius: var(--radius-full); padding: 7px 14px;
}
.cs-figure__hint { font-size: var(--fs-sm); color: var(--text-placeholder); max-width: 40ch; }
.cs-figure figcaption {
  margin-top: var(--scale-400); font-size: var(--fs-sm); color: var(--text-muted); line-height: 1.6;
  max-width: var(--measure); display: flex; gap: 12px;
}
.cs-figure figcaption .num { color: var(--text-action); font-variant-numeric: tabular-nums; flex: none; }

/* two-up figure (current vs redesign) */
.cs-figrow { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(16px, 2vw, 28px); margin-block: clamp(36px, 6vw, 80px); }
.cs-figrow .cs-figure { margin-block: 0; }

/* ---------- STATS ---------- */
.cs-stats {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: clamp(20px, 3vw, 40px); margin-block: clamp(40px, 6vw, 72px);
}
.cs-stat { border-top: 2px solid var(--border-default); padding-top: var(--scale-500); }
.cs-stat__num { font-family: var(--font-heading); font-size: clamp(2.4rem, 1.6rem + 2.6vw, 3.5rem); line-height: 1; color: var(--text-headings); letter-spacing: var(--tracking-tight); }
.cs-stat__num .suffix { color: var(--text-action); }
.cs-stat__label { margin-top: var(--scale-300); font-size: var(--fs-sm); color: var(--text-body); line-height: 1.5; max-width: 26ch; }
.cs-stat__delta { display: inline-block; margin-top: 3px; font-size: var(--fs-xs, 0.8125rem); color: var(--text-muted); }

/* ---------- Reseller skew exhibit (Fig 6) ---------- */
.cs-skew { border: 1px solid var(--border-default); border-radius: var(--radius-xl); background: var(--surface-raised); box-shadow: var(--shadow-sm); overflow: hidden; }
.cs-skew__head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; padding: clamp(15px, 2vw, 21px) clamp(18px, 2.6vw, 30px); border-bottom: 1px solid var(--border-default); background: var(--surface-sunken); }
.cs-skew__sku { font-family: var(--font-heading); font-size: var(--fs-base); color: var(--text-headings); letter-spacing: var(--tracking-tight); }
.cs-skew__flag { font-size: var(--fs-overline); text-transform: uppercase; letter-spacing: var(--tracking-overline); color: var(--text-action); background: var(--surface-action-light); border: 1px solid var(--border-action); padding: 4px 11px; border-radius: 999px; white-space: nowrap; }
.cs-skew__grid { display: grid; grid-template-columns: minmax(96px, auto) 1fr 1fr; }
.cs-skew__cell { padding: clamp(12px, 1.6vw, 18px) clamp(14px, 2.2vw, 26px); border-top: 1px solid var(--border-default); }
.cs-skew__grid > .cs-skew__cell:nth-child(-n+3) { border-top: 0; }
.cs-skew__col { font-size: var(--fs-sm); color: var(--text-muted); }
.cs-skew__metric { font-size: var(--fs-sm); color: var(--text-body); display: flex; align-items: center; }
.cs-skew__big { font-family: var(--font-heading); font-size: clamp(1.55rem, 1.1rem + 1.5vw, 2.15rem); line-height: 1; color: var(--text-headings); letter-spacing: var(--tracking-tight); }
.cs-skew__bartrack { display: block; height: 8px; border-radius: 999px; background: var(--surface-sunken); border: 1px solid var(--border-default); overflow: hidden; margin-bottom: 8px; }
.cs-skew__barfill { display: block; height: 100%; width: var(--w); background: var(--border-strong); border-radius: 999px; }
.cs-skew__barfill--flag { background: var(--surface-action); }
.cs-skew__val { font-size: var(--fs-sm); color: var(--text-body); }
.cs-skew__val b { font-weight: 600; color: var(--text-headings); }
@media (max-width: 560px) { .cs-skew__sku { font-size: var(--fs-sm); } }

/* ---------- PULL QUOTE ---------- */
.cs-quote { margin-block: clamp(48px, 8vw, 112px); max-width: min(100%, 40rem); margin-inline: auto; text-align: center; }
.cs-quote blockquote { font-family: var(--font-heading); font-size: clamp(1.6rem, 1.1rem + 1.8vw, 2.5rem); line-height: 1.28; letter-spacing: -0.015em; color: var(--text-headings); }
.cs-quote cite { display: block; margin-top: var(--scale-500); font-style: normal; font-size: var(--fs-sm); color: var(--text-muted); }

/* ---------- CALLOUT (key insight, glass) ---------- */
.cs-callout {
  margin-block: clamp(36px, 5vw, 64px); padding: clamp(24px, 3vw, 40px);
  border-radius: var(--radius-2xl); border: 1px solid var(--glass-border); background: var(--glass-bg-strong);
}
.cs-callout .k { font-size: var(--fs-overline); text-transform: uppercase; letter-spacing: var(--tracking-overline); color: var(--text-action); display: block; margin-bottom: var(--scale-300); }
.cs-callout p { font-family: var(--font-heading); font-size: clamp(1.25rem, 1rem + 1vw, 1.75rem); line-height: 1.4; color: var(--text-headings); }

/* findings / numbered list as cards */
.cs-findings { display: grid; gap: 1px; background: var(--border-default); border: 1px solid var(--border-default); border-radius: var(--radius-xl); overflow: hidden; margin-block: clamp(32px,5vw,56px); }
.cs-finding { background: var(--surface-raised); padding: clamp(22px, 3vw, 32px); display: grid; grid-template-columns: auto 1fr; gap: clamp(16px, 2vw, 28px); align-items: start; }
.cs-finding__n { font-family: var(--font-heading); font-size: var(--fs-h4); color: var(--text-action); line-height: 1; }
.cs-finding__b h4 { font-size: var(--fs-h4); margin-bottom: 6px; }
.cs-finding__b p { font-size: 1.0625rem; line-height: 1.7; color: var(--text-muted); }

/* ---------- NEXT CASE ---------- */
.cs-next { border-top: 1px solid var(--border-default); padding-block: clamp(56px, 8vw, 120px); }
.cs-next__eyebrow { color: var(--text-muted); font-size: var(--fs-overline); text-transform: uppercase; letter-spacing: var(--tracking-overline); margin-bottom: var(--scale-500); display: block; }
.cs-next__link { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: var(--scale-500); text-decoration: none; }
.cs-next__title { font-size: clamp(2rem, 1.4rem + 2.4vw, 3.25rem); color: var(--text-headings); letter-spacing: -0.02em; transition: color var(--dur-base) var(--ease-out); }
.cs-next__link:hover .cs-next__title { color: var(--text-action); }
.cs-next__cue { display: inline-flex; align-items: center; gap: 8px; color: var(--text-action); font-weight: 500; font-size: var(--fs-sm); }
.cs-next__cue svg { transition: transform var(--dur-base) var(--ease-spring); }

/* back link */
.cs-back { display: flex; width: fit-content; align-items: center; gap: 8px; font-size: var(--fs-sm); color: var(--text-muted); margin-bottom: var(--scale-500); transition: color var(--dur-base) var(--ease-out); }
.cs-back:hover { color: var(--text-action); }
.cs-back svg { transition: transform var(--dur-base) var(--ease-out); }

/* ---------- CONTENT SHEET ----------
   The reading content sits on a clean, opaque surface so body text never
   competes with the topographic background. The contour stays visible
   behind the hero (a textured masthead) and the footer. */
.cs-sheet {
  position: relative;
  z-index: 1;
  max-width: 1120px;                 /* ≈ the nav bar width — contour shows on the sides */
  margin: clamp(20px, 3vw, 44px) auto clamp(36px, 5vw, 80px);
  padding-inline: clamp(22px, 4vw, 56px);
  background: var(--surface-page);
  border: 1px solid var(--border-default);
  border-radius: clamp(20px, 2.4vw, 30px);
  box-shadow: 0 30px 80px -46px rgba(73, 68, 61, 0.24);
  /* inner content fills the sheet's padded box (no double gutter, no overflow) */
  --wide: 100%;
  --bleed: 100%;
}
.cs-sheet .cs-wrap { padding-inline: 0; }
:root[data-theme="dark"] .cs-sheet { box-shadow: 0 30px 80px -46px rgba(0, 0, 0, 0.6); }
@media (max-width: 680px) { .cs-sheet { border-radius: 18px; margin-inline: 12px; } }

/* extra figure ratios */
.cs-figure__placeholder[data-ratio="phone"] { aspect-ratio: 9 / 16; max-width: 300px; margin-inline: auto; }
.cs-figure__placeholder[data-ratio="wide"] { aspect-ratio: 21 / 9; }
.cs-figure__placeholder[data-ratio="square"] { aspect-ratio: 1 / 1; }

/* ---------- FILMSTRIP (a flow, screen by screen) ---------- */
.cs-strip {
  display: flex; gap: clamp(12px, 1.4vw, 18px); overflow-x: auto; scroll-snap-type: x mandatory;
  margin-block: clamp(32px, 5vw, 72px); padding-bottom: 12px; scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
}
.cs-strip__item { flex: 0 0 auto; width: min(56vw, 216px); scroll-snap-align: start; }
.cs-strip__item .cs-figure__frame { border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); }
.cs-strip__item .cs-figure__placeholder { aspect-ratio: 9 / 16; padding: 16px; }
.cs-strip__cap { margin-top: var(--scale-300); font-size: var(--fs-xs); color: var(--text-muted); text-align: center; }

/* ---------- GALLERY (n-up) ---------- */
.cs-gallery { display: grid; gap: clamp(12px, 1.6vw, 20px); margin-block: clamp(32px, 5vw, 72px); }
.cs-gallery--2 { grid-template-columns: repeat(2, 1fr); }
.cs-gallery--3 { grid-template-columns: repeat(3, 1fr); }
.cs-gallery--4 { grid-template-columns: repeat(4, 1fr); }
.cs-gallery .cs-figure { margin-block: 0; }
@media (max-width: 760px) { .cs-gallery--3, .cs-gallery--4 { grid-template-columns: repeat(2, 1fr); } }

/* ---------- FULL-BLEED BAND ---------- */
.cs-band { max-width: var(--bleed); margin-inline: auto; margin-block: clamp(48px, 7vw, 112px); }
.cs-band .cs-figure { margin-block: 0; }

/* ---------- SPLIT (prose + supporting media) ---------- */
.cs-split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 5vw, 72px); align-items: center; margin-block: clamp(40px, 6vw, 96px); }
.cs-split__media .cs-figure { margin-block: 0; }
.cs-split--flip .cs-split__media { order: -1; }
@media (max-width: 860px) { .cs-split { grid-template-columns: 1fr; } .cs-split--flip .cs-split__media { order: 0; } }

/* ---------- CARD ROW (e.g. the pillars, competitors) ---------- */
.cs-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: clamp(12px, 1.6vw, 18px); margin-block: clamp(32px, 5vw, 64px); }
/* fixed 2x2 (avoids a 3+1 hang) — used for the four outcome cards */
.cs-cards--grid2 { grid-template-columns: 1fr; }
@media (min-width: 640px) { .cs-cards--grid2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.cs-card { border: 1px solid var(--border-default); border-radius: var(--radius-xl); padding: clamp(20px, 2.2vw, 28px); background: var(--surface-raised); }
.cs-card__n { font-family: var(--font-heading); font-size: var(--fs-sm); color: var(--text-action); display: block; margin-bottom: var(--scale-300); }
.cs-card h4 { font-size: var(--fs-h5); margin-bottom: 6px; }
.cs-card p { font-size: var(--fs-sm); color: var(--text-muted); line-height: 1.6; }

/* ---------- Decision framework (strategic comparison) ---------- */
.cs-decision { border: 1px solid var(--border-default); border-radius: var(--radius-xl); overflow: hidden; background: var(--surface-default); margin-block: clamp(32px, 5vw, 64px); }
.cs-decision__scroll { overflow-x: auto; }
.cs-decision__row { display: grid; grid-template-columns: 1fr 1.35fr 1.35fr; min-width: 560px; }
.cs-decision__row + .cs-decision__row { border-top: 1px solid var(--border-default); }
.cs-decision__row > * { padding: clamp(15px, 1.9vw, 24px); }
.cs-decision__row > * + * { border-left: 1px solid var(--border-default); }
.cs-decision__eyebrow { display: block; font-size: var(--fs-overline); text-transform: uppercase; letter-spacing: var(--tracking-overline); color: var(--text-muted); margin-bottom: 6px; }
.cs-decision__eyebrow--win { color: var(--text-action); }
.cs-decision__model { font-family: var(--font-heading); font-size: var(--fs-h5); color: var(--text-headings); }
.cs-decision__dim { background: var(--surface-raised); font-weight: 500; color: var(--text-headings); display: flex; align-items: center; }
.cs-decision__win { background: var(--surface-action-light); }
.cs-decision__hint { font-size: var(--fs-sm); color: var(--text-placeholder); line-height: 1.55; }
.cs-decision__val { font-size: var(--fs-sm); color: var(--text-body); line-height: 1.55; }
.cs-decision__rec { display: flex; flex-direction: column; gap: 6px; padding: clamp(18px, 2.2vw, 28px); border-top: 1px solid var(--border-default); background: var(--surface-action-light); }
.cs-decision__rec .k { font-size: var(--fs-overline); text-transform: uppercase; letter-spacing: var(--tracking-overline); color: var(--text-action); }
.cs-decision__rec p { font-size: var(--fs-base); color: var(--text-headings); line-height: 1.55; }

/* ---------- Artifact gallery (edge cases, QA board) ---------- */
.cs-gallery { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: clamp(14px, 1.8vw, 22px); margin-block: clamp(32px, 5vw, 64px); }
.cs-gallery--board { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.cs-gallery__item { margin: 0; }
.cs-gallery__ph { position: relative; aspect-ratio: 4 / 5; border-radius: var(--radius-lg); border: 1px solid var(--border-default); overflow: hidden; display: grid; place-items: center; }
.cs-gallery--board .cs-gallery__ph { aspect-ratio: 3 / 2; }
.cs-gallery__tag { display: inline-flex; align-items: center; gap: 6px; padding: 7px 13px; border-radius: var(--radius-full); background: var(--glass-bg-strong); border: 1px solid var(--glass-border); color: var(--text-headings); font-size: var(--fs-xs); box-shadow: var(--shadow-sm); }
.cs-gallery figcaption { margin-top: 12px; }
.cs-gallery figcaption b { display: block; font-size: var(--fs-base); color: var(--text-headings); margin-bottom: 2px; }
.cs-gallery figcaption span { font-size: var(--fs-sm); color: var(--text-muted); line-height: 1.5; }

/* ---------- Hi-fi design showcase (upright device screens) ---------- */
.cs-showcase { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: clamp(16px, 2vw, 28px); margin-block: clamp(32px, 5vw, 64px); }
.cs-showcase__item { margin: 0; display: flex; flex-direction: column; }
.cs-showcase__frame { flex: 1; display: flex; align-items: flex-end; justify-content: center; border-radius: var(--radius-xl); background: linear-gradient(160deg, var(--sand-100), var(--sand-200)); padding: 28px 18px 0; overflow: hidden; }
.cs-showcase__frame img { width: 100%; max-width: 210px; height: auto; display: block; filter: drop-shadow(0 20px 34px rgba(0,0,0,0.16)); }
.cs-showcase__frame--empty { align-items: center; padding: 24px; min-height: 300px; border: 1px dashed var(--border-strong); background: var(--surface-raised); }
.cs-showcase__frame--ph { align-items: center; padding: 24px; min-height: 460px; border: 1px solid var(--border-default); background: linear-gradient(160deg, var(--sand-100), var(--sand-200)); }

/* ---------- Before / after comparison (two labeled placeholders) ---------- */
.cs-ba { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(18px, 2.6vw, 36px); align-items: start; }
.cs-ba__ph { position: relative; aspect-ratio: 4 / 3; border-radius: var(--radius-lg); border: 1px solid var(--border-default); overflow: hidden; display: grid; place-items: center; }
.cs-ba__shot { position: relative; aspect-ratio: 1080 / 2400; border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--border-default); background: #fff; box-shadow: var(--shadow-sm); }
.cs-ba__shot img { width: 100%; height: 100%; object-fit: contain; display: block; }
.cs-ba__note {
  position: absolute; top: 6%; left: 50%; transform: translateX(-50%);
  background: var(--surface-action); color: #fff; font-size: var(--fs-xs); font-weight: 500;
  padding: 7px 13px; border-radius: var(--radius-full); box-shadow: 0 8px 20px -6px rgba(0,0,0,0.45); white-space: nowrap;
}
.cs-ba__label { margin-top: 16px; font-size: var(--fs-sm); color: var(--text-body); line-height: 1.5; }
.cs-ba__label b { display: block; margin-bottom: 4px; font-size: var(--fs-overline); text-transform: uppercase; letter-spacing: var(--tracking-overline); color: var(--text-action); font-weight: 500; }
@media (max-width: 640px) { .cs-ba { grid-template-columns: 1fr; } }

/* ---------- Scenario gallery (uniform aligned grid) ---------- */
.cs-scenarios { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(18px, 2vw, 30px); margin-block: clamp(28px, 4vw, 56px); }
.cs-scenario { margin: 0; }
.cs-scenario__shot { aspect-ratio: 3 / 4; border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--border-default); box-shadow: var(--shadow-sm); background: #fff; }
.cs-scenario__shot img { width: 100%; height: 100%; object-fit: cover; object-position: center top; display: block; }
.cs-scenario__label { margin-top: 14px; }
.cs-scenario__label b { display: block; font-size: var(--fs-base); color: var(--text-headings); margin-bottom: 3px; }
.cs-scenario__label span { font-size: var(--fs-sm); color: var(--text-muted); line-height: 1.5; }
@media (max-width: 760px) { .cs-scenarios { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 440px) { .cs-scenarios { grid-template-columns: 1fr; } }

/* ---------- Generic framed screenshot ---------- */
.cs-shot { border-radius: var(--radius-xl); overflow: hidden; border: 1px solid var(--border-default); box-shadow: var(--shadow-sm); background: #fff; }
.cs-shot img { width: 100%; height: auto; display: block; }

/* ---------- QA callout excerpts ---------- */
.cs-qa-callouts { display: grid; gap: clamp(22px, 3vw, 34px); margin-top: clamp(28px, 3.5vw, 44px); }
.cs-qa-callout__eyebrow { display: block; font-size: var(--fs-overline); text-transform: uppercase; letter-spacing: var(--tracking-overline); color: var(--text-action); margin-bottom: 10px; }
.cs-qa-callout .cs-shot { border-radius: var(--radius-lg); }
.cs-showcase figcaption { margin-top: 12px; font-size: var(--fs-sm); color: var(--text-muted); text-align: center; }

/* iterations: full-length checkout screens, shown top to bottom */
.cs-showcase--iterations { grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: start; gap: clamp(12px, 1.6vw, 24px); }
.cs-iter__shot { border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--border-default); box-shadow: var(--shadow-md); background: #fff; }
.cs-iter__shot img { width: 100%; height: auto; display: block; }
/* iteration triptych: crop each long screen to an iPhone-like aspect ratio, top-aligned */
.cs-showcase--iterations .cs-iter__shot { position: relative; aspect-ratio: 9 / 19.5; }
.cs-showcase--iterations .cs-iter__shot img { height: 100%; object-fit: cover; object-position: top; }
.cs-showcase--iterations .cs-iter__shot::after { content: ""; position: absolute; inset: auto 0 0 0; height: 56px; background: linear-gradient(to bottom, rgba(255,255,255,0), #fff); pointer-events: none; }

/* outcome hero: the shipped final page, centered */
.cs-outcome-hero { max-width: 360px; margin-inline: auto; }

/* ---------- Diagrams (inline SVG, theme-aware) ---------- */
.cs-figure__frame--diagram { padding: clamp(20px, 3.5vw, 48px); background: var(--surface-default); }
.cs-diagram { display: block; width: 100%; height: auto; }
.cs-diagram text { font-family: var(--font-body); }
.cs-diagram .dg-serif { font-family: var(--font-heading); }
.cs-diagram .dg-t { fill: var(--text-headings); }
.cs-diagram .dg-b { fill: var(--text-body); }
.cs-diagram .dg-m { fill: var(--text-muted); }
.cs-diagram .dg-a { fill: var(--text-action); }
.cs-diagram .dg-box { fill: var(--surface-raised); stroke: var(--border-default); }
.cs-diagram .dg-box--soft { fill: var(--surface-sunken); stroke: var(--border-default); }
.cs-diagram .dg-box--accent { fill: var(--surface-action-light); stroke: var(--border-action); }
.cs-diagram .dg-skel { fill: var(--border-default); }
.cs-diagram .dg-line { stroke: var(--border-strong); fill: none; }
.cs-diagram .dg-line--soft { stroke: var(--border-default); fill: none; }
.cs-diagram .dg-line--accent { stroke: var(--surface-action); fill: none; }
.cs-diagram .dg-fill-accent { fill: var(--surface-action); }
.cs-diagram .dg-fill-soft { fill: var(--surface-action-light); }
.cs-diagram .dg-dash { stroke-dasharray: 5 6; }

/* ---------- Side-by-side flow comparison (real captures) ---------- */
.cs-compare { display: grid; grid-template-columns: 2fr 1px 3fr; gap: clamp(18px, 2.4vw, 32px); align-items: start; }
.cs-compare__label {
  font-size: var(--fs-overline); font-weight: 500; letter-spacing: var(--tracking-overline);
  text-transform: uppercase; color: var(--text-muted); margin-bottom: 14px;
}
.cs-compare__label b { color: var(--text-headings); font-weight: 500; }
.cs-compare__screens { display: grid; gap: clamp(10px, 1.2vw, 16px); align-items: start; }
.cs-compare__screens--2 { grid-template-columns: repeat(2, 1fr); }
.cs-compare__screens--3 { grid-template-columns: repeat(3, 1fr); }
.cs-compare__screens img {
  width: 100%; height: auto; display: block; background: #fff;
  border-radius: 12px; border: 1px solid var(--border-default); box-shadow: var(--shadow-sm);
}
.cs-compare__sub { margin-top: 12px; font-size: var(--fs-xs); color: var(--text-muted); }
.cs-compare__divider { width: 1px; height: 100%; background: var(--border-default); }
@media (max-width: 760px) {
  .cs-compare { grid-template-columns: 1fr; }
  .cs-compare__divider { width: 100%; height: 1px; }
}

/* ---------- Discovery collage (anchor + evidence strip) ---------- */
.cs-collage { display: grid; gap: clamp(12px, 1.6vw, 20px); }
.cs-collage img {
  width: 100%; display: block; background: #fff;
  border-radius: 12px; border: 1px solid var(--border-default); box-shadow: var(--shadow-sm);
}
.cs-collage__anchor img { height: auto; }
.cs-collage__strip { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(12px, 1.6vw, 20px); align-items: start; }
.cs-collage__strip img { height: clamp(180px, 24vw, 300px); object-fit: cover; object-position: left top; }
.cs-collage__cell p { margin-top: 10px; font-size: var(--fs-xs); color: var(--text-muted); }
@media (max-width: 760px) { .cs-collage__strip { grid-template-columns: 1fr; } .cs-collage__strip img { height: 220px; } }

/* ---------- Accordion progression (three moments, tops aligned) ---------- */
.cs-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(16px, 2.4vw, 32px); align-items: start; }
.cs-steps__cell { display: flex; flex-direction: column; }
.cs-steps__label {
  display: flex; align-items: baseline; gap: 8px; margin-bottom: 12px;
  font-size: var(--fs-overline); letter-spacing: var(--tracking-overline);
  text-transform: uppercase; color: var(--text-muted); font-weight: 500;
}
.cs-steps__label b { color: var(--text-headings); font-weight: 500; letter-spacing: 0; text-transform: none; font-size: var(--fs-sm); }
.cs-steps__num {
  flex: none; width: 22px; height: 22px; display: grid; place-items: center;
  border-radius: 50%; background: var(--surface-action); color: var(--text-on-action);
  font-size: 11px; font-weight: 600; letter-spacing: 0;
}
.cs-steps__frame {
  position: relative; overflow: hidden; background: #fff;
  border-radius: 14px; border: 1px solid var(--border-default); box-shadow: var(--shadow-sm);
}
.cs-steps__frame img { width: 100%; height: auto; display: block; }
@media (max-width: 760px) {
  .cs-steps { grid-template-columns: 1fr; max-width: 340px; margin-inline: auto; }
}

/* ---------- Focused crop with a single highlight (component call-out) ---------- */
.cs-crop {
  position: relative; width: min(430px, 100%); margin-inline: auto;
  aspect-ratio: 985 / 1950; overflow: hidden; background: #fff;
  border-radius: 16px; border: 1px solid var(--border-default); box-shadow: var(--shadow-sm);
}
.cs-crop img { width: 100%; display: block; transform: translateY(-22%); }
.cs-crop::after { content: ""; position: absolute; inset: auto 0 0 0; height: 64px;
  background: linear-gradient(transparent, rgba(255,255,255,0.92)); pointer-events: none; }
.cs-crop__ring {
  position: absolute; border: 2px solid var(--surface-action); border-radius: 12px;
  box-shadow: 0 0 0 4px var(--surface-action-light); pointer-events: none;
}
.cs-crop__tag {
  position: absolute; z-index: 2; background: var(--surface-action); color: var(--text-on-action);
  font-size: var(--fs-xs); font-weight: 500; padding: 6px 12px; border-radius: var(--radius-full);
  white-space: nowrap; box-shadow: var(--shadow-sm);
}

/* ---------- Editable placeholder token (fill in real facts later) ---------- */
.ph {
  color: var(--text-action);
  background: var(--surface-action-light);
  border-radius: 4px;
  padding: 0 5px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* ---------- Decision matrix ---------- */
.cs-matrix { margin-block: clamp(28px, 4vw, 56px); }
.cs-matrix table { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); }
.cs-matrix th, .cs-matrix td { text-align: center; padding: 14px 10px; border-bottom: 1px solid var(--border-default); }
.cs-matrix thead th { font-weight: 500; color: var(--text-muted); font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: 0.04em; }
.cs-matrix tbody th { text-align: left; font-family: var(--font-heading); font-weight: 400; font-size: 1.0625rem; color: var(--text-headings); white-space: nowrap; }
.cs-matrix tbody tr.is-winner { background: var(--surface-action-light); }
.cs-matrix tbody tr.is-winner th { color: var(--text-action); }
.cs-matrix .dot { font-size: 1.05rem; line-height: 1; }
.cs-matrix .dot.full { color: var(--text-action); }
.cs-matrix .dot.half { color: var(--clay-300); }
.cs-matrix .dot.none { color: var(--border-strong); }
.cs-matrix__legend { display: flex; flex-wrap: wrap; gap: 18px; margin-top: var(--scale-400); font-size: var(--fs-xs); color: var(--text-muted); }
.cs-matrix__legend span { display: inline-flex; align-items: center; gap: 6px; }
@media (max-width: 680px) { .cs-matrix { overflow-x: auto; } .cs-matrix table { min-width: 560px; } }

/* ---------- Status strip ---------- */
.cs-status { display: flex; flex-wrap: wrap; gap: 10px; margin-block: clamp(24px, 3vw, 40px); }
.cs-status__pill { display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px; border-radius: var(--radius-full); border: 1px solid var(--border-default); background: var(--surface-raised); font-size: var(--fs-sm); color: var(--text-body); }
.cs-status__pill .d { width: 8px; height: 8px; border-radius: 50%; background: var(--text-muted); }
.cs-status__pill.is-locked .d { background: var(--success-500); }
.cs-status__pill.is-live .d { background: var(--text-action); }
.cs-status__pill.is-pending .d { background: var(--border-strong); }

/* gentle parallax hook (JS-driven, transform only) */
[data-parallax] { will-change: transform; }

/* ---------- Responsive ---------- */
@media (max-width: 760px) {
  .cs-figrow { grid-template-columns: 1fr; }
  .cs-finding { grid-template-columns: 1fr; gap: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  [data-parallax] { transform: none !important; }
}
