/* ── Eric Huang Portfolio — Shared Styles ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ─── FOCUS ─── */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}
a:focus-visible { border-radius: 4px; }
.cs-expand-btn:focus-visible,
.cs-jump-btn:focus-visible,
.nav-links a.nav-resume:focus-visible,
.hero-nav a.hero-nav-resume:focus-visible,
.pw-btn:focus-visible,
footer a.footer-cta:focus-visible,
.hero-cta__primary:focus-visible,
.hero-cta__secondary:focus-visible,
.presentation-auth-submit:focus-visible,
.agentic-cta-btn:focus-visible { outline-color: var(--ink); outline-offset: 4px; }

:root {
  --bg: #ffffff;
  --bg-card: #FFFFFF;
  --ink: #18181B;
  --ink-secondary: #52525B;
  --ink-muted: #A1A1AA;
  --accent: #1A56DB;
  --accent-light: #EFF4FF;
  --accent-green: #059669;
  --accent-green-light: #ECFDF5;
  --border: #E4E4E7;
  --tag-bg: #F4F4F5;
  --tag-text: #3F3F46;
  --shadow-sm: 0 1px 3px rgba(0,0,0,.07), 0 1px 2px rgba(0,0,0,.06);
  --shadow-md: 0 4px 16px rgba(0,0,0,.08), 0 2px 6px rgba(0,0,0,.05);
  --shadow-lg: 0 20px 40px rgba(0,0,0,.10), 0 8px 16px rgba(0,0,0,.06);
  --radius: 16px;
  --radius-sm: 8px;
  --max-w: 880px;
  --transition: .22s cubic-bezier(.4,0,.2,1);
  /* Fluid horizontal inset: comfortable on phones, full padding on large screens */
  --page-pad: clamp(16px, 4vw, 40px);
  /* Readable line length for body copy (never wider than container) */
  --prose-max: min(660px, 100%);
}

/* ─── BUTTON SYSTEM ─── */
/* Primary: footer-cta (ink pill) */
.btn-primary,
.pw-btn,
footer a.footer-cta:not(.footer-cta--secondary),
.hero-cta__primary,
.cs-expand-btn:not(.cs-expand-btn--secondary),
.presentation-auth-submit,
.agentic-cta-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 20px;
  border: none;
  border-radius: 980px;
  background: var(--ink);
  color: #fff;
  font-size: 15px;
  line-height: 1;
  font-weight: 500;
  font-family: inherit;
  letter-spacing: 0.01em;
  text-decoration: none;
  cursor: pointer;
  box-sizing: border-box;
  transition:
    background 0.2s cubic-bezier(0.25, 0.1, 0.25, 1),
    transform 0.15s cubic-bezier(0.25, 0.1, 0.25, 1),
    box-shadow 0.2s cubic-bezier(0.25, 0.1, 0.25, 1);
}

.btn-primary:hover,
.pw-btn:hover,
footer a.footer-cta:not(.footer-cta--secondary):hover,
.hero-cta__primary:hover,
.cs-expand-btn:not(.cs-expand-btn--secondary):hover,
.presentation-auth-submit:hover,
.agentic-cta-btn:hover {
  background: #27272a;
  color: #fff;
}

.btn-primary:active,
.pw-btn:active,
footer a.footer-cta:not(.footer-cta--secondary):active,
.hero-cta__primary:active,
.cs-expand-btn:not(.cs-expand-btn--secondary):active,
.presentation-auth-submit:active,
.agentic-cta-btn:active {
  background: #09090b;
  color: #fff;
  transform: scale(0.985);
}

.pw-btn {
  width: 100%;
}

footer a.footer-cta:not(.footer-cta--secondary) {
  width: 100%;
}

footer a.footer-cta:not(.footer-cta--secondary):hover,
.hero-cta__primary:hover,
.cs-expand-btn:not(.cs-expand-btn--secondary):hover,
.agentic-cta-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(24, 24, 27, 0.18);
  color: #fff;
}

footer a.footer-cta:not(.footer-cta--secondary):active,
.hero-cta__primary:active,
.cs-expand-btn:not(.cs-expand-btn--secondary):active,
.agentic-cta-btn:active {
  transform: scale(0.985);
  box-shadow: none;
  color: #fff;
}

.agentic-cta-btn {
  margin-top: 20px;
}

.presentation-auth-submit {
  padding: 10px 20px;
  font-size: 14px;
}

/* Secondary: hero-cta__secondary (soft gray pill) */
.hero-cta__secondary,
footer a.footer-cta--secondary,
.cs-expand-btn--secondary,
.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 16px;
  border: none;
  border-radius: 999px;
  background: rgba(55, 53, 47, 0.06);
  color: #37352f;
  font-size: 15px;
  line-height: 1;
  font-weight: 600;
  font-family: inherit;
  text-decoration: none;
  cursor: pointer;
  box-sizing: border-box;
  transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.hero-cta__secondary:hover,
footer a.footer-cta--secondary:hover,
.cs-expand-btn--secondary:hover,
.btn-secondary:hover {
  background: rgba(55, 53, 47, 0.1);
  color: #37352f;
}

.hero-cta__secondary:active,
footer a.footer-cta--secondary:active,
.cs-expand-btn--secondary:active,
.btn-secondary:active {
  transform: scale(0.985);
}

html {
  scroll-behavior: smooth;
  overflow-x: clip; /* clip vs hidden: doesn't create a scroll container, keeps position:sticky working */
}

body {
  font-family: 'Roboto', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--ink);
  font-size: clamp(15px, 0.35vw + 14px, 16px);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
  overflow-wrap: break-word;
}

img, video, svg {
  max-width: 100%;
  height: auto;
}

/* ─── SITE HEADER (static — scrolls with page) ─── */
body > nav.site-header,
body > nav {
  position: static;
  z-index: auto;
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border-bottom: none;
  box-shadow: none;
}

body > nav .nav-inner {
  max-width: calc(var(--max-w) + 80px);
  margin: 0 auto;
  padding: clamp(24px, 5vw, 40px) var(--page-pad) clamp(8px, 2vw, 12px);
  height: auto;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.nav-logo-wrap {
  display: contents;
}

.nav-logo,
.nav-back {
  font-weight: 700;
  font-size: 15px;
  line-height: 1;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: -.01em;
  white-space: nowrap;
}

.nav-back {
  display: none;
}

.nav-links {
  display: flex;
  gap: clamp(16px, 3vw, 28px);
  list-style: none;
  align-items: center;
  margin: 0;
  padding: 0;
}
.nav-links a {
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-secondary);
  text-decoration: none;
  transition: color var(--transition);
}
.nav-links a:hover { color: var(--accent); }
.nav-links a.nav-resume,
.nav-links a.nav-resume:visited {
  background: var(--ink);
  color: #fff;
  padding: 6px 14px;
  border-radius: 100px;
  font-weight: 600;
  font-size: 13px;
}
.nav-links a.nav-resume:hover,
.nav-links a.nav-resume:focus-visible {
  background: #27272a;
  color: #fff;
}

/* ─── SCROLL PROGRESS ─── */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 2px;
  background: var(--accent);
  z-index: 99;
  transition: width 0.1s linear;
  pointer-events: none;
}

/* ─── BREADCRUMB ─── */
.breadcrumb {
  max-width: calc(var(--max-w) + 80px);
  margin: 28px auto 0;
  padding: 0 var(--page-pad);
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
}
.breadcrumb a {
  color: var(--ink-secondary);
  text-decoration: none;
  font-weight: 500;
  line-height: 1;
  transition: color var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb .back-arrow {
  display: inline-flex;
  align-items: center;
  line-height: 1;
  transition: transform 0.22s cubic-bezier(0.22, 1, 0.36, 1);
}
.breadcrumb a:hover .back-arrow { transform: translateX(-4px); }
.breadcrumb .sep { color: var(--ink-muted); }
.breadcrumb .current { color: var(--ink-muted); }

/* ─── HERO (home) ─── */
.hero {
  max-width: calc(var(--max-w) + 80px);
  margin: 0 auto;
  padding: clamp(24px, 4vw, 40px) var(--page-pad) clamp(48px, 8vw, 72px);
  width: 100%;
}

.hero--home {
  padding-top: clamp(32px, 6vw, 56px);
  padding-bottom: clamp(40px, 7vw, 68px);
}

/* Home: one shared content column with Selected work + cards */
.page-home .hero--home,
.page-home .index-section {
  max-width: calc(var(--max-w) + 80px);
  margin-inline: auto;
  padding-inline: var(--page-pad);
  width: 100%;
}

.page-home .hero.hero--home {
  padding: 16px var(--page-pad) 4px;
}

.page-home .index-section {
  padding: 6px var(--page-pad) 40px;
}
.page-home .section-label {
  margin: 0 0 8px;
  font-size: 11px;
}
/* Selected work: short horizontal rows, same copy and previews */
.page-home .index-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  align-items: stretch;
}
.page-home .index-grid__col {
  display: contents;
  gap: 8px;
}
.page-home .index-bento__inner {
  flex-direction: row;
  align-items: stretch;
}
.page-home .index-bento__header {
  flex: 1 1 auto;
  min-width: 0;
  justify-content: center;
  gap: 2px;
  padding: 10px 8px 10px 12px;
}
.page-home .index-bento__eyebrow {
  font-size: 11px;
  line-height: 1.3;
}
.page-home .index-bento__title {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.02em;
}
.page-home .index-bento__meta {
  margin: 2px 0 0;
  font-size: 11px;
  line-height: 1.3;
  font-weight: 500;
  color: rgba(55, 53, 47, 0.55);
}
.page-home .index-bento__arrow {
  width: 22px;
  height: 22px;
  font-size: 13px;
  margin-top: 1px;
}
.page-home .index-bento__stage {
  flex: 0 0 156px;
  width: 156px;
  padding: 8px 8px 8px 0;
  display: flex;
  align-items: stretch;
}
.page-home .index-bento__panel,
.page-home .index-bento__panel.index-bento__panel--intake,
.page-home .index-bento__panel.index-bento__panel--purchase,
.page-home .index-bento__panel.index-bento__panel--inventory {
  aspect-ratio: auto;
  width: 100%;
  height: 92px;
  min-height: 92px;
}
.page-home .index-bento__panel--intake .index-bento__image,
.page-home .index-bento__panel--purchase .index-bento__image {
  inset: 5px;
  border-radius: 6px;
}
.page-home .index-card--visual.index-card--inventory.index-bento {
  overflow: hidden;
}
.page-home .index-bento__panel.index-bento__panel--inventory {
  overflow: hidden;
  padding: 0;
}
.page-home .index-bento__panel--inventory .index-inventory-scene {
  width: 100%;
  height: 100%;
  padding: 0;
}
.page-home .index-bento__panel--inventory .index-scene-decor {
  display: none;
}
.page-home .index-bento__panel--inventory .index-inventory-zebra-tilt {
  transform: scale(0.78);
}
.page-home .index-bento__panel--inventory .index-inventory-scene__stack .cs-zebra-device--hero {
  max-width: 52px;
  padding: 8px 4px 12px;
}
.page-home .index-card.index-card--thinking {
  padding: 10px 12px;
  gap: 3px;
  justify-content: center;
}
.page-home .index-card.index-card--thinking h3 {
  font-size: 14px;
}
.page-home .index-card.index-card--thinking p {
  font-size: 13px;
  line-height: 1.35;
}
.page-home .index-card.index-card--thinking .index-card-arrow {
  top: 10px;
  right: 10px;
  width: 22px;
  height: 22px;
  font-size: 13px;
}
@media (max-width: 720px) {
  .page-home .hero.hero--home {
    padding: 12px var(--page-pad) 2px;
  }
  .page-home .hero-name {
    font-size: 24px;
  }
  .page-home .hero-title {
    font-size: 15px;
    margin-bottom: 10px;
  }
  .page-home .home-facts {
    font-size: 13px;
  }
  .page-home .home-facts > div {
    grid-template-columns: 4.6rem minmax(0, 1fr);
  }
  .page-home .index-section {
    padding-top: 4px;
    padding-bottom: 32px;
  }
  .page-home .index-grid {
    grid-template-columns: 1fr;
    gap: 6px;
  }
  .page-home .index-bento__header {
    padding: 8px 6px 8px 10px;
  }
  .page-home .index-bento__title {
    font-size: 13px;
  }
  .page-home .index-bento__stage {
    flex-basis: 132px;
    width: 132px;
    padding: 6px 6px 6px 0;
  }
  .page-home .index-bento__panel,
  .page-home .index-bento__panel.index-bento__panel--intake,
  .page-home .index-bento__panel.index-bento__panel--purchase,
  .page-home .index-bento__panel.index-bento__panel--inventory {
    height: 78px;
    min-height: 78px;
  }
}

.page-home .hero-name,
.page-home .hero--home .hero-eyebrow,
.page-home .hero--home .hero-subtitle {
  max-width: none;
  text-align: left;
}

.page-home .hero-name {
  font-family: 'Roboto', sans-serif;
  margin-inline-start: -0.03em;
  letter-spacing: -0.04em;
  font-weight: 700;
  padding-inline-start: 0;
}

.page-home {
  font-family: 'Roboto', sans-serif;
  color: #37352f;
}

.page-home .hero-eyebrow,
.page-home .hero-title,
.page-home .hero-subtitle,
.page-home .hero-cta,
.page-home .hero-nav,
.page-home .section-label,
.page-home footer,
.page-home footer h2,
.page-home footer p,
.page-home footer .footer-inline-links,
.page-home footer .footer-inline-links a,
.page-home footer .footer-cta,
.page-home footer .footer-note,
.page-home .index-bento__eyebrow,
.page-home .index-bento__title {
  font-family: 'Roboto', sans-serif;
}

/* Site footer: full-bleed band, content shares hero / work column */
.page-home footer,
body.cs-m3-docs-page footer {
  text-align: left;
  max-width: none;
  width: 100%;
  margin: 0;
  padding: clamp(48px, 7vw, 72px) 0;
  box-sizing: border-box;
}

.page-home footer .footer-inner,
body.cs-m3-docs-page footer .footer-inner {
  max-width: calc(var(--max-w) + 80px);
  margin-inline: auto;
  padding-inline: var(--page-pad);
  width: 100%;
  box-sizing: border-box;
}

.page-home footer .footer-main,
body.cs-m3-docs-page footer .footer-main {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 28px 40px;
}

.page-home footer .footer-copy,
body.cs-m3-docs-page footer .footer-copy {
  flex: 1 1 16rem;
  min-width: 0;
  max-width: 36rem;
}

.page-home footer h2,
body.cs-m3-docs-page footer h2 {
  font-size: clamp(26px, 3.2vw, 34px);
  font-weight: 700;
  font-style: normal;
  letter-spacing: -0.04em;
  color: #37352f;
  margin-bottom: 10px;
}

.page-home footer p,
body.cs-m3-docs-page footer p {
  margin-bottom: 16px;
  max-width: 34rem;
}

.page-home footer .footer-inline-links,
body.cs-m3-docs-page footer .footer-inline-links {
  margin: 0;
  max-width: none;
}

.page-home footer .footer-note,
body.cs-m3-docs-page footer .footer-note {
  margin: 28px 0 0;
  max-width: none;
}

.page-home footer .footer-cta-row,
body.cs-m3-docs-page footer .footer-cta-row {
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  max-width: none;
  width: auto;
  margin: 0;
  flex: 0 0 auto;
}

.page-home footer .footer-cta-row > a.footer-cta,
.page-home footer .footer-cta-row > a.footer-cta.footer-cta--secondary,
.page-home footer a.footer-cta:not(.footer-cta--secondary),
body.cs-m3-docs-page footer .footer-cta-row > a.footer-cta,
body.cs-m3-docs-page footer .footer-cta-row > a.footer-cta.footer-cta--secondary,
body.cs-m3-docs-page footer a.footer-cta:not(.footer-cta--secondary) {
  width: auto;
  align-self: auto;
}

@media (max-width: 720px) {
  .page-home footer .footer-main,
  body.cs-m3-docs-page footer .footer-main {
    flex-direction: column;
    align-items: flex-start;
  }

  .page-home footer .footer-cta-row,
  body.cs-m3-docs-page footer .footer-cta-row {
    justify-content: flex-start;
  }
}

.page-home .hero-nav {
  width: 100%;
  margin-inline: 0;
}

.page-home .hero-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0;
  max-width: 40rem;
}

.hero-intro {
  max-width: min(720px, 100%);
}

.hero-nav {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
  margin: 0 0 clamp(36px, 6vw, 56px);
}

.hero-nav a {
  font-size: 14px;
  font-weight: 500;
  color: rgba(55, 53, 47, 0.65);
  text-decoration: none;
  transition: color 0.15s ease, background 0.15s ease;
  padding: 6px 10px;
  border-radius: 6px;
}

.hero-nav a:hover {
  color: #37352f;
  background: rgba(55, 53, 47, 0.06);
}

.hero-nav a.hero-nav-resume,
.hero-nav a.hero-nav-resume:visited {
  background: #2383e2;
  color: #fff;
  padding: 7px 14px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 14px;
}

.hero-nav a.hero-nav-resume:hover,
.hero-nav a.hero-nav-resume:focus-visible {
  background: #0075de;
  color: #fff;
}

.hero h1,
.hero-name {
  font-family: 'Roboto', sans-serif;
}

.page-home .hero h1,
.page-home .hero-name {
  font-family: 'Roboto', sans-serif;
  font-size: 28px;
  font-optical-sizing: auto;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.03em;
  color: #37352f;
  margin: 0 0 4px;
  max-width: min(720px, 100%);
}

.hero h1 em { font-style: italic; color: var(--accent); }

.hero-eyebrow {
  margin: 0 0 10px;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
  color: rgba(55, 53, 47, 0.65);
  letter-spacing: 0.01em;
}

.hero-role {
  font-size: clamp(17px, 1.2vw + 15px, 20px);
  font-weight: 500;
  line-height: 1.45;
  color: var(--ink);
  margin: 0 0 10px;
  max-width: min(38rem, 100%);
}

.hero-title {
  margin: 0 0 14px;
  max-width: none;
  font-size: clamp(18px, 1.6vw + 14px, 28px);
  font-weight: 700;
  line-height: 1.35;
  min-height: 1.35em;
  letter-spacing: -0.03em;
  color: #37352f;
  white-space: nowrap;
}

/* One line: prefix · pill · suffix. Pill width eases; the sentence grammar stays fixed. */
.page-home .hero-title {
  width: auto;
  max-width: 34em;
  margin-bottom: 12px;
  white-space: normal;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.4;
  letter-spacing: -0.011em;
  min-height: 0;
}

.page-home .home-facts {
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin: 0;
  font-size: 14px;
  line-height: 1.35;
  color: #37352f;
}
.page-home .home-facts > div {
  display: grid;
  grid-template-columns: 5.25rem minmax(0, 1fr);
  column-gap: 10px;
  align-items: baseline;
}
.page-home .home-facts dt {
  margin: 0;
  font-weight: 400;
  color: rgba(55, 53, 47, 0.55);
}
.page-home .home-facts dd {
  margin: 0;
}
.page-home .home-facts a {
  color: #37352f;
  font-weight: 500;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-decoration-color: rgba(55, 53, 47, 0.35);
  text-underline-offset: 2px;
}
.page-home .home-facts a:hover {
  color: #1a56db;
  text-decoration-color: currentColor;
}

@media (max-width: 720px) {
  .page-home .hero-name {
    font-size: 24px;
  }
  .page-home .hero-title {
    font-size: 15px;
  }
}

.hero-subtitle {
  font-size: clamp(16px, 0.6vw + 14px, 18px);
  color: rgba(55, 53, 47, 0.65);
  max-width: 34rem;
  line-height: 1.5;
  margin: 0 0 24px;
  font-weight: 400;
}
.page-home .hero-subtitle a {
  color: inherit;
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.page-home .hero-subtitle a:hover {
  color: #37352f;
}

.hero--home .hero-subtitle {
  max-width: 34rem;
}

.hero-company {
  color: var(--accent);
  font-weight: 600;
  font-style: normal;
}

/* Notion product pill — fade + width ease; sentence shifts with label */
.hero-product-pill {
  --color-background: #e8def8;
  --pill-label-inline-size: max-content;
  display: inline-flex;
  align-items: center;
  box-sizing: border-box;
  margin: 0 0.02em;
  padding: 0 0.34em;
  border-radius: 999px;
  background: var(--color-background);
  color: #37352f;
  font-size: inherit;
  font-weight: 700;
  line-height: inherit;
  letter-spacing: inherit;
  white-space: nowrap;
  vertical-align: baseline;
  transition: background-color 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

.hero-product-pill__label {
  display: inline-block;
  overflow: hidden;
  width: var(--pill-label-inline-size);
  vertical-align: baseline;
  transition: width 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

.hero-product-pill__measure {
  display: inline-block;
  white-space: nowrap;
  will-change: opacity, transform;
  transition:
    opacity 0.22s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.22s cubic-bezier(0.22, 1, 0.36, 1);
}

.hero-product-pill.is-swapping .hero-product-pill__measure {
  opacity: 0;
  transform: translateY(0.18em);
}

.hero-product-pill.is-entering .hero-product-pill__measure {
  animation: hero-pill-label-in 0.32s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes hero-pill-label-in {
  from {
    opacity: 0;
    transform: translateY(-0.16em);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-product-pill,
  .hero-product-pill__label,
  .hero-product-pill__measure {
    transition: none;
  }

  .hero-product-pill.is-entering .hero-product-pill__measure {
    animation: none;
  }
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.hero-stats li {
  font-size: 13px;
  font-weight: 500;
  line-height: 1.35;
  color: var(--ink-secondary);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 7px 13px;
}

.hero-meta {
  font-size: clamp(13px, 0.5vw + 12px, 14px);
  font-weight: 500;
  color: var(--ink-muted);
  letter-spacing: 0.01em;
  line-height: 1.6;
  padding-top: clamp(18px, 2.5vw, 24px);
  border-top: 1px solid rgba(228, 228, 231, 0.95);
  max-width: min(52rem, 100%);
}

/* Home: subtle “Apple-adjacent” load choreography (no scroll-jank) */
@media (prefers-reduced-motion: no-preference) {
  @keyframes hero-rise {
    from {
      opacity: 0;
      transform: translate3d(0, 20px, 0);
    }
    to {
      opacity: 1;
      transform: translate3d(0, 0, 0);
    }
  }
  .hero-nav {
    animation: hero-rise 0.82s cubic-bezier(0.22, 1, 0.36, 1) 0.04s both;
  }
  .hero-name,
  .hero h1 {
    animation: hero-rise 0.88s cubic-bezier(0.22, 1, 0.36, 1) 0.1s both;
  }
  .hero-eyebrow {
    animation: hero-rise 0.88s cubic-bezier(0.22, 1, 0.36, 1) 0.12s both;
  }
  .hero-title {
    animation: hero-rise 0.9s cubic-bezier(0.22, 1, 0.36, 1) 0.18s both;
  }
  .hero-role {
    animation: hero-rise 0.9s cubic-bezier(0.22, 1, 0.36, 1) 0.16s both;
  }
  .hero-subtitle {
    animation: hero-rise 0.9s cubic-bezier(0.22, 1, 0.36, 1) 0.24s both;
  }
  .hero-cta,
  .hero-pills,
  .hero-stats,
  .hero-meta,
  .home-facts {
    animation: hero-rise 0.92s cubic-bezier(0.22, 1, 0.36, 1) 0.3s both;
  }
  /* Case study header entrance — same choreography as homepage hero */
  .cs-header .cs-year-badge {
    animation: hero-rise 0.78s cubic-bezier(0.22, 1, 0.36, 1) 0.06s both;
  }
  .cs-header h2 {
    animation: hero-rise 0.88s cubic-bezier(0.22, 1, 0.36, 1) 0.14s both;
  }
  .cs-header .cs-hero-facts {
    animation: hero-rise 0.9s cubic-bezier(0.22, 1, 0.36, 1) 0.22s both;
  }
  .cs-header .cs-overview,
  .cs-header > p {
    animation: hero-rise 0.92s cubic-bezier(0.22, 1, 0.36, 1) 0.34s both;
  }
  .cs-snapshot {
    animation: hero-rise 0.94s cubic-bezier(0.22, 1, 0.36, 1) 0.40s both;
  }
  .cs-hero-image {
    animation: hero-rise 0.94s cubic-bezier(0.22, 1, 0.36, 1) 0.50s both;
  }
}
/* After first play, freeze — prevents blank flash when scrolling back
   (some browsers restart fill-mode:both animations on re-entry). */
.hero-settled .hero-nav,
.hero-settled .hero-name,
.hero-settled .hero h1,
.hero-settled .hero-eyebrow,
.hero-settled .hero-title,
.hero-settled .hero-role,
.hero-settled .hero-subtitle,
.hero-settled .hero-cta,
.hero-settled .hero-pills,
.hero-settled .hero-stats,
.hero-settled .hero-meta,
.hero-settled .home-facts,
.hero-settled .cs-header .cs-year-badge,
.hero-settled .cs-header h2,
.hero-settled .cs-header .cs-hero-facts,
.hero-settled .cs-header .cs-overview,
.hero-settled .cs-header > p,
.hero-settled .cs-snapshot,
.hero-settled .cs-hero-image {
  animation: none !important;
  opacity: 1 !important;
  transform: none !important;
}

@media (prefers-reduced-motion: reduce) {
  .hero-nav,
  .hero-name,
  .hero h1,
  .hero-eyebrow,
  .hero-title,
  .hero-role,
  .hero-subtitle,
  .hero-cta,
  .hero-pills,
  .hero-stats,
  .hero-meta,
  .cs-header h2,
  .cs-header .cs-hero-facts,
  .cs-header .cs-overview,
  .cs-header > p,
  .cs-snapshot,
  .cs-hero-image {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
}

/* ─── SECTION LABEL ─── */
.section-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .10em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin: 0 0 32px;
}

/* ─── CASE STUDY INDEX ─── */
.index-section {
  max-width: calc(var(--max-w) + 80px);
  margin: 0 auto;
  padding: clamp(20px, 4vw, 32px) var(--page-pad) clamp(72px, 12vw, 100px);
  width: 100%;
}
.index-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(18px, 2.5vw, 24px);
  align-items: start;
}
.index-grid__col {
  display: flex;
  flex-direction: column;
  gap: clamp(18px, 2.5vw, 24px);
  min-width: 0;
}

.index-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  text-decoration: none;
  color: inherit;
  transition: box-shadow var(--transition), transform var(--transition), border-color var(--transition);
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: relative;
  overflow: hidden;
}
.index-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
  border-color: #d4d4d8;
}
.index-card.coming-soon {
  opacity: .55;
  cursor: default;
  pointer-events: none;
}
/* Visual coming-soon tiles: full-opacity preview image; still non-clickable */
.index-card.coming-soon.index-card--visual {
  opacity: 1;
}
.index-card-badge {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--ink-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}
/* Coming soon: readable vs live tiles, still quiet and on-brand */
.index-card.coming-soon .index-card-badge,
.index-card--thinking .index-card-badge {
  color: var(--accent);
  font-weight: 600;
  letter-spacing: 0.11em;
  background: var(--accent-light);
  border: 1px solid rgba(26, 86, 219, 0.14);
  border-radius: 100px;
  padding: 5px 12px 5px 9px;
  width: fit-content;
  max-width: 100%;
  text-transform: uppercase;
}
.index-card.coming-soon .badge-dot,
.index-card--thinking .badge-dot {
  width: 6px;
  height: 6px;
  background: var(--accent);
  opacity: 0.42;
}
/* Thinking note — same quiet card as the text index, not a product cover */
.index-card--thinking {
  gap: 10px;
  box-shadow: none;
}
.index-card--thinking:hover {
  transform: none;
  box-shadow: var(--shadow-sm);
  border-color: var(--border);
}
.index-card.index-card--thinking h3 {
  font-weight: 600;
  font-size: clamp(18px, 2vw, 22px);
  letter-spacing: -0.02em;
  padding-right: 28px;
}
.index-card--thinking p {
  margin: 0;
  max-width: 46em;
}
.index-card.index-card--thinking .index-card-arrow {
  top: 28px;
  right: 28px;
}
.m3-docs-hero-inner--text {
  grid-template-columns: minmax(0, 40rem);
}
.badge-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--ink-muted); }
.badge-dot.live { background: var(--accent-green); }

/* ─── DELIGHT ─── */
/* 1. Live badge: gentle pulse — "this work is in production" */
@keyframes live-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.55; transform: scale(0.8); }
}
@media (prefers-reduced-motion: no-preference) {
  .badge-dot.live { animation: live-pulse 2.4s ease-in-out infinite; }
}

/* 2. AI sparkle: micro-spin on tag hover */
@keyframes sparkle-pop {
  0%   { transform: scale(1) rotate(0deg); }
  40%  { transform: scale(1.4) rotate(22deg); }
  100% { transform: scale(1) rotate(0deg); }
}
@media (prefers-reduced-motion: no-preference) {
  .tag--ai:hover .tag-sparkle { animation: sparkle-pop 0.45s cubic-bezier(0.22, 1, 0.36, 1) forwards; }
}

/* 3. Card press: physical compress on click */
@media (prefers-reduced-motion: no-preference) {
  .index-card--visual:active {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04), 0 8px 24px rgba(0, 0, 0, 0.07);
    transition-duration: 0.1s;
  }
}
.index-card h3 { font-size: clamp(19px, 2.5vw, 24px); font-weight: 700; letter-spacing: -.025em; line-height: 1.2; }
.index-card p { font-size: clamp(13px, 1.2vw + 12px, 14px); color: var(--ink-secondary); line-height: 1.6; }
.index-card-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 4px; }
.tag {
  font-size: 12px;
  font-weight: 500;
  background: var(--tag-bg);
  color: var(--tag-text);
  padding: 4px 10px;
  border-radius: 100px;
}
.tag.accent { background: var(--accent-light); color: var(--accent); }
.index-card-arrow {
  position: absolute;
  top: 32px;
  right: 32px;
  font-size: 18px;
  color: var(--ink-muted);
  transition: transform var(--transition), color var(--transition);
}
.index-card:hover .index-card-arrow { transform: translate(3px, -3px); color: var(--accent); }
.index-card.wide { grid-column: span 2; }

/* Featured tile: product frame + copy — Apple “store card” inspired */
.index-card--visual {
  padding: 0;
  gap: 0;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: clamp(22px, 3vw, 30px);
  box-shadow:
    0 2px 8px rgba(0, 0, 0, 0.04),
    0 12px 40px rgba(0, 0, 0, 0.06);
  transition: box-shadow 0.45s cubic-bezier(0.22, 1, 0.36, 1), transform 0.45s cubic-bezier(0.22, 1, 0.36, 1), border-color 0.35s ease;
}
.index-card--visual:hover {
  box-shadow:
    0 4px 12px rgba(0, 0, 0, 0.05),
    0 20px 48px rgba(0, 0, 0, 0.09);
  transform: translateY(-4px);
  border-color: rgba(0, 0, 0, 0.08);
}
@media (prefers-reduced-motion: reduce) {
  .index-card--visual:hover {
    transform: none;
  }
  .index-card--visual:hover .index-card-arrow {
    transform: none;
  }
}
.index-card-visual {
  position: relative;
  overflow: hidden;
  border-radius: 0;
  background: #f4f3f1;
}

/* Web tiles: Apple “Explore the lineup”-style soft scenes + window chrome */
.index-card-visual--scene {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(20px, 4vw, 28px) clamp(14px, 3vw, 20px);
  height: clamp(240px, 34vw, 306px);
}
/* Per-card scene tints — cool family, each card at a distinct hue position */
.index-card-visual--intake {
  background: transparent;
}

.index-card--visual.index-card--intake {
  background: transparent;
  border: 0;
  border-radius: 12px;
  box-shadow: none;
  overflow: hidden;
  padding: 0;
  gap: 0;
  cursor: pointer;
}

.index-card--visual.index-card--intake:hover {
  box-shadow:
    0 4px 18px rgba(0, 0, 0, 0.04),
    0 2px 7.8px rgba(0, 0, 0, 0.027);
  transform: translateY(-2px);
  border-color: transparent;
}

/* Intake — Notion bento layout */
.index-bento__inner {
  position: relative;
  display: flex;
  flex-direction: column;
  height: auto;
  background: #f9f9f8;
  border-radius: 12px;
  overflow: hidden;
}

.index-bento__anchor {
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: inherit;
  text-decoration: none;
  color: transparent;
}

.index-bento__anchor:focus-visible {
  outline: 2px solid #0075de;
  outline-offset: 2px;
}

.index-bento__header,
.index-bento__stage {
  position: relative;
  z-index: 0;
}

.index-bento__header {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 24px 24px 16px;
  background: transparent;
}

.index-bento__eyebrow {
  font-size: 14px;
  font-weight: 400;
  line-height: 1.4;
  color: rgba(55, 53, 47, 0.65);
  letter-spacing: 0.01em;
}

.index-bento__title-wrap {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 8px;
}

.index-bento__title {
  margin: 0;
  flex: 1;
  min-width: 0;
  font-size: 22px;
  font-weight: 700;
  line-height: 28px;
  letter-spacing: -0.25px;
  color: #000;
}

.index-bento__arrow {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #000;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 600;
  line-height: 1;
  transition: transform 0.2s ease;
}

.index-card--intake:hover .index-bento__arrow,
.index-card--inventory:hover .index-bento__arrow,
.index-card--purchase:hover .index-bento__arrow,
.index-card--orchestration:not(.coming-soon):hover .index-bento__arrow {
  transform: translate(1px, -1px);
}

.index-card--visual.index-card--inventory.index-bento,
.index-card--visual.index-card--purchase.index-bento,
.index-card--visual.index-card--orchestration.index-bento {
  background: transparent;
  border: 0;
  border-radius: 12px;
  box-shadow: none;
  overflow: hidden;
  padding: 0;
  gap: 0;
  cursor: pointer;
}

.index-card--visual.index-card--orchestration.index-bento.coming-soon {
  cursor: default;
}

.index-card--visual.index-card--inventory.index-bento:hover,
.index-card--visual.index-card--purchase.index-bento:hover,
.index-card--visual.index-card--orchestration.index-bento:not(.coming-soon):hover {
  box-shadow:
    0 4px 18px rgba(0, 0, 0, 0.04),
    0 2px 7.8px rgba(0, 0, 0, 0.027);
  transform: translateY(-2px);
  border-color: transparent;
}

.index-card--visual.index-card--orchestration.index-bento.coming-soon:hover {
  transform: none;
  box-shadow: none;
}

.index-bento__stage {
  position: relative;
  padding: 0 24px 24px;
}

.index-bento__panel {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  background: #fff;
  box-shadow:
    0 1px 2px rgba(15, 15, 15, 0.04),
    0 8px 24px rgba(15, 15, 15, 0.06);
  aspect-ratio: 10 / 7;
}

.index-bento__panel.index-bento__panel--intake {
  aspect-ratio: 16 / 10;
  background:
    radial-gradient(ellipse 75% 65% at 15% 25%, rgba(216, 180, 254, 0.75) 0%, transparent 58%),
    radial-gradient(ellipse 70% 55% at 85% 75%, rgba(196, 181, 253, 0.7) 0%, transparent 55%),
    linear-gradient(145deg, #eee4f8 0%, #d9ccec 100%);
}

.index-bento__panel.index-bento__panel--intake::after {
  display: none;
}

.index-bento__panel--intake .index-bento__image {
  position: absolute;
  inset: clamp(18px, 3.4vw, 32px);
  width: auto;
  height: auto;
  object-fit: cover;
  object-position: center top;
  border-radius: 10px;
  box-shadow:
    0 2px 6px rgba(0, 0, 0, 0.06),
    0 10px 28px rgba(0, 0, 0, 0.1);
}

.index-bento__panel::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 42%;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0) 0%, #fff 88%);
  pointer-events: none;
  z-index: 1;
}

/* Inventory panel keeps existing gradient colors */
.index-bento__panel.index-bento__panel--inventory {
  --bounceEase: linear(
    0,
    0.041 1.2%,
    0.161 2.5%,
    0.819 7.1%,
    1.055 9.1%,
    1.203 11.1%,
    1.244 12.1%,
    1.263 13.1%,
    1.262 14.4%,
    1.231 15.9%,
    1.043 20.9%,
    0.98 23%,
    0.945 24.8%,
    0.93 26.7%,
    0.936 29.2%,
    1.001 36.1%,
    1.019 40.3%,
    0.995 53.8%,
    1
  );
  background:
    radial-gradient(ellipse 75% 65% at 15% 25%, color-mix(in srgb, var(--md-sys-color-tertiary-container) 85%, transparent) 0%, transparent 58%),
    radial-gradient(ellipse 70% 55% at 85% 75%, color-mix(in srgb, var(--md-sys-color-primary-container) 90%, transparent) 0%, transparent 55%),
    linear-gradient(145deg, var(--md-sys-color-surface-container) 0%, var(--md-sys-color-secondary-container) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 10 / 7;
  padding: clamp(14px, 2.5vw, 22px) clamp(10px, 2vw, 16px);
  overflow: visible;
}

.index-card--visual.index-card--inventory.index-bento {
  overflow: visible;
}

.index-bento__panel.index-bento__panel--inventory::after {
  display: none;
}

.index-bento__panel--inventory .index-inventory-scene {
  width: min(100%, 260px);
  height: 100%;
  margin: 0 auto;
  padding: 0;
  overflow: visible;
}

.index-bento__panel--inventory .index-inventory-zebra-tilt {
  transform: scale(0.6);
  transform-origin: center center;
  transition: transform 1s var(--bounceEase);
}

.index-bento__panel--inventory .index-scene-tool,
.index-bento__panel--inventory .index-scene-sticker {
  transform-origin: center center;
  transition: transform 1s var(--bounceEase);
}

/* Sana summer-banner scatter on inventory card hover */
.index-card--inventory:hover .index-bento__panel--inventory .index-inventory-zebra-tilt {
  transform: scale(0.62) translate(2%, -8%) rotate(3deg);
}

.index-card--inventory:hover .index-bento__panel--inventory .index-scene-tool--cursor {
  transform: translate(-12%, -28%) rotate(-17deg);
}

.index-card--inventory:hover .index-bento__panel--inventory .index-scene-tool--figma {
  transform: translate(18%, -40%) rotate(15deg);
}

.index-card--inventory:hover .index-bento__panel--inventory .index-scene-sticker--accent {
  transform: translate(-18%, 8%) rotate(-11deg);
}

.index-card--inventory:hover .index-bento__panel--inventory .index-scene-sticker--spark {
  transform: translate(18%, 10%) rotate(22deg);
}

.index-bento__panel--inventory .index-inventory-scene__stack .cs-zebra-device--hero {
  max-width: 120px;
}

/* Purchase / Orchestration — same gradient language as inventory, different hues */
.index-bento__panel.index-bento__panel--purchase {
  background:
    radial-gradient(ellipse 75% 65% at 15% 25%, rgba(147, 197, 253, 0.72) 0%, transparent 58%),
    radial-gradient(ellipse 70% 55% at 85% 75%, rgba(186, 230, 253, 0.85) 0%, transparent 55%),
    linear-gradient(145deg, #e8f2fa 0%, #d4e8f6 100%);
}

.index-bento__panel.index-bento__panel--orchestration {
  background:
    radial-gradient(ellipse 75% 65% at 15% 25%, rgba(153, 246, 228, 0.7) 0%, transparent 58%),
    radial-gradient(ellipse 70% 55% at 85% 75%, rgba(165, 243, 252, 0.75) 0%, transparent 55%),
    linear-gradient(145deg, #eef7f6 0%, #d2e8e4 100%);
}

.index-bento__panel.index-bento__panel--purchase::after,
.index-bento__panel.index-bento__panel--orchestration::after {
  display: none;
}

.index-bento__panel--purchase .index-bento__image,
.index-bento__panel--orchestration .index-bento__image {
  position: absolute;
  inset: clamp(16px, 2.8vw, 24px);
  width: auto;
  height: auto;
  object-fit: cover;
  object-position: top center;
  border-radius: 10px;
  box-shadow:
    0 2px 6px rgba(0, 0, 0, 0.06),
    0 10px 28px rgba(0, 0, 0, 0.1);
}

.index-bento__image {
  position: relative;
  z-index: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  border-radius: 0;
  box-shadow: none;
  transform: none;
}

.index-bento__search-form {
  position: absolute;
  left: 50%;
  bottom: 36px;
  z-index: 3;
  width: 248px;
  max-width: calc(100% - 96px);
  transform: translateX(-50%);
  pointer-events: none;
}

/* SearchForm — Notion floating bar */
.search-form {
  display: block;
  width: 100%;
  max-width: 248px;
  margin: 0 auto;
}

.search-form__field {
  display: flex;
  align-items: center;
  gap: 8px;
  box-sizing: border-box;
  width: 100%;
  max-width: 248px;
  height: 36px;
  padding: 0 10px 0 12px;
  background: #fff;
  border: 1px solid rgba(15, 15, 15, 0.1);
  border-radius: 999px;
  box-shadow:
    0 8px 24px rgba(15, 15, 15, 0.1),
    0 2px 6px rgba(15, 15, 15, 0.06);
}

.search-form__icon {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  color: rgba(55, 53, 47, 0.62);
}

.search-form__value {
  flex: 1;
  min-width: 0;
  font-size: 13px;
  line-height: 1.2;
  color: rgba(55, 53, 47, 0.88);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.search-form__caret {
  display: inline-block;
  width: 1px;
  height: 0.95em;
  margin-left: 1px;
  background: rgba(55, 53, 47, 0.55);
  vertical-align: -0.08em;
  animation: search-form-caret-blink 1.1s step-end infinite;
}

@keyframes search-form-caret-blink {
  50% { opacity: 0; }
}

.search-form__clear {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  color: rgba(55, 53, 47, 0.38);
}

.search-form__clear svg {
  width: 14px;
  height: 14px;
}

@media (prefers-reduced-motion: reduce) {
  .search-form__caret {
    animation: none;
  }
}
.index-card-visual--purchase  { background: #d4e8f6; }
.index-card-visual--orchestration { background: #d8e6f0; }

/* Inventory card — legacy body styles (unused when bento) */
.index-card--inventory:not(.index-bento) .index-card-visual--scene {
  height: clamp(272px, 38vw, 336px);
  padding: clamp(28px, 4.5vw, 36px) clamp(12px, 2.5vw, 16px);
}


/* Scene screenshot — fills the fixed-height scene zone */
.index-scene-shot {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  max-width: min(100%, 480px);
  height: 100%;
  object-fit: cover;
  object-position: top center;
  border-radius: 10px;
  box-shadow:
    0 2px 6px rgba(0, 0, 0, 0.08),
    0 10px 28px rgba(0, 0, 0, 0.1);
  transform: scale(1);
  transition: transform 0.55s cubic-bezier(0.25, 0.1, 0.25, 1);
}
.index-card--visual:hover .index-scene-shot {
  transform: scale(1.025);
}
/* Home card scenes — shared wrapper + playful stickers */
.index-card-scene,
.index-inventory-scene {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: min(100%, 480px);
  height: 100%;
  margin: 0 auto;
}

.index-inventory-scene {
  width: min(100%, 320px);
  height: 100%;
  padding: clamp(10px, 2vw, 16px) 0;
  box-sizing: border-box;
}

/* Inventory — hero Zebra device in the index card */
.index-inventory-scene__stack {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  max-height: 100%;
  transform: none;
  transition: transform 0.55s cubic-bezier(0.25, 0.1, 0.25, 1);
  overflow: visible;
}

.index-inventory-zebra-tilt {
  transform: scale(0.88);
  transform-origin: center center;
  transition: transform 0.55s cubic-bezier(0.25, 0.1, 0.25, 1);
}

.index-inventory-scene__stack .cs-zebra-device--hero {
  margin: 0;
  max-width: 152px;
  padding: 20px 8px 30px;
  border-radius: 20px 20px 15px 15px;
}

.index-inventory-scene__stack .cs-zebra-device--hero::before,
.index-inventory-scene__stack .cs-zebra-device--hero::after {
  top: 82px;
  height: 42px;
}

.index-inventory-scene__stack .cs-zebra-device--hero .cs-zebra-window {
  width: 32px;
  height: 6px;
}

.index-inventory-scene__stack .cs-zebra-device--hero .cs-zebra-keys {
  bottom: 11px;
}

.index-inventory-scene__stack .cs-zebra-device--hero .cs-zebra-keys span {
  width: 20px;
  height: 7px;
}

.index-inventory-scene__stack .cs-zebra-device--hero .cs-zebra-keys span:nth-child(2) {
  width: 32px;
}

.index-scene-decor {
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
}

.index-scene-tool {
  position: absolute;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 7px 11px 7px 9px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid rgba(255, 255, 255, 0.95);
  box-shadow:
    0 2px 6px rgba(0, 0, 0, 0.06),
    0 8px 20px rgba(0, 0, 0, 0.1);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--ink-secondary);
  line-height: 1;
  transition: transform 0.55s cubic-bezier(0.25, 0.1, 0.25, 1);
}

.index-scene-tool svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.index-scene-tool--cursor {
  top: 8%;
  left: 4%;
  transform: rotate(-12deg);
  color: #18181b;
}

.index-scene-tool--cursor svg {
  color: #18181b;
}

.index-scene-tool--figma {
  top: 18%;
  right: 2%;
  transform: rotate(10deg);
  color: #a259ff;
}

.index-scene-tool--figma svg {
  color: #a259ff;
}

.index-scene-sticker {
  position: absolute;
  border-radius: 999px;
  font-weight: 700;
  line-height: 1;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
  transition: transform 0.55s cubic-bezier(0.25, 0.1, 0.25, 1);
}

.index-scene-sticker--accent {
  bottom: auto;
  top: 10%;
  left: 4%;
  padding: 6px 11px;
  font-size: 10px;
  letter-spacing: 0.03em;
  transform: rotate(-6deg);
}

.index-card-visual--inventory .index-scene-sticker--accent,
.index-bento__panel--inventory .index-scene-sticker--accent {
  bottom: 12%;
  top: auto;
  left: 6%;
}

.index-scene-sticker--intake {
  background: #ede9fe;
  border: 1px solid #c4b5fd;
  color: #6d28d9;
}

/* Intake — Miro multiplayer cursors */
.index-scene-decor--intake .index-scene-cursor {
  --cursor-color: #4262ff;
  --cursor-angle: 0deg;
  position: absolute;
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.index-card--intake .index-scene-cursor__pill {
  background: rgba(255, 255, 255, 0.94);
  color: var(--cursor-color);
  border: 1px solid color-mix(in srgb, var(--cursor-color) 24%, #fff);
  box-shadow:
    0 2px 6px rgba(79, 70, 229, 0.08),
    0 6px 16px rgba(0, 0, 0, 0.06);
  font-weight: 600;
}

.index-card--intake .index-scene-cursor--lisa {
  --cursor-color: #c026d3;
}

.index-card--intake .index-scene-cursor--ralf {
  --cursor-color: #4f46e5;
}

.index-card--intake .index-scene-cursor--felipe {
  --cursor-color: #7c3aed;
}

.index-scene-cursor__pointer {
  display: block;
  transform: rotate(var(--cursor-angle));
  transform-origin: 1px 1px;
}

.index-scene-cursor__arrow {
  display: block;
  width: clamp(13px, 2vw, 16px);
  height: clamp(15px, 2.3vw, 18px);
}

.index-scene-cursor__arrow path {
  fill: var(--cursor-color);
}

.index-scene-cursor__pill {
  position: absolute;
  left: 13px;
  top: 9px;
  padding: 4px 7px 5px;
  border-radius: 4px;
  background: var(--cursor-color);
  color: #fff;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.01em;
  line-height: 1;
  white-space: nowrap;
}

/* Tip aims at screenshot center */
.index-scene-cursor--lisa {
  --cursor-color: #e9457a;
  --cursor-angle: 172deg;
  top: 16%;
  left: 2%;
}

.index-scene-cursor--lisa .index-scene-cursor__pill {
  left: 14px;
  top: 10px;
}

.index-scene-cursor--ralf {
  --cursor-color: #2b56a9;
  --cursor-angle: 94deg;
  top: 7%;
  right: 2%;
  left: auto;
}

.index-scene-cursor--ralf .index-scene-cursor__pointer {
  transform: scaleX(-1) rotate(var(--cursor-angle));
  transform-origin: calc(100% - 1px) 1px;
}

.index-scene-cursor--ralf .index-scene-cursor__pill {
  right: 14px;
  left: auto;
  top: 10px;
}

.index-scene-cursor--felipe {
  --cursor-color: #43b75f;
  --cursor-angle: -6deg;
  bottom: 10%;
  right: 6%;
  left: auto;
}

.index-scene-cursor--felipe .index-scene-cursor__pill {
  right: 13px;
  left: auto;
  top: 9px;
}

.index-card--visual:hover .index-scene-cursor--lisa {
  transform: translate(2px, 2px);
}

.index-card--visual:hover .index-scene-cursor--ralf {
  transform: translate(-2px, 2px);
}

.index-card--visual:hover .index-scene-cursor--felipe {
  transform: translate(-2px, -2px);
}

.index-scene-sticker--purchase {
  background: #e0f2fe;
  border: 1px solid #7dd3fc;
  color: #0369a1;
}

.index-scene-sticker--inventory {
  background: #fff7ed;
  border: 1px solid #fed7aa;
  color: #c2410c;
}

.index-scene-sticker--spark {
  top: 16%;
  bottom: auto;
  right: 4%;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  background: #fff;
  border: 1px solid rgba(255, 255, 255, 0.95);
  color: #0d9488;
  font-size: 14px;
  transform: rotate(14deg);
}

.index-card-visual--inventory .index-scene-sticker--spark,
.index-bento__panel--inventory .index-scene-sticker--spark {
  top: auto;
  bottom: 22%;
  right: 8%;
}

.index-card--visual:not(.index-card--inventory):hover .index-scene-tool--cursor {
  transform: rotate(-8deg) translateY(-3px);
}

.index-card--visual:not(.index-card--inventory):hover .index-scene-tool--figma {
  transform: rotate(14deg) translateY(-2px);
}

.index-card--visual:not(.index-card--inventory):hover .index-scene-sticker--accent {
  transform: rotate(-3deg) translateY(-2px);
}

.index-card--visual:not(.index-card--inventory):hover .index-scene-sticker--spark {
  transform: rotate(18deg) scale(1.08);
}

.index-card-visual--intake.index-card-visual--scene::after,
.index-card-visual--inventory.index-card-visual--scene::after {
  background: none;
}

@media (prefers-reduced-motion: reduce) {
  .index-inventory-scene__stack,
  .index-inventory-zebra-tilt,
  .index-scene-tool,
  .index-scene-sticker,
  .index-scene-cursor,
  .index-scene-cursor__pointer,
  .index-bento__panel--inventory .index-inventory-zebra-tilt,
  .index-bento__panel--inventory .index-scene-tool,
  .index-bento__panel--inventory .index-scene-sticker,
  .index-card--visual:hover .index-inventory-scene__stack,
  .index-card--visual:hover .index-inventory-scene .index-inventory-zebra-tilt,
  .index-card--visual:hover .index-scene-tool,
  .index-card--visual:hover .index-scene-sticker,
  .index-card--visual:hover .index-scene-cursor,
  .index-card--inventory:hover .index-bento__panel--inventory .index-inventory-zebra-tilt,
  .index-card--inventory:hover .index-bento__panel--inventory .index-scene-tool--cursor,
  .index-card--inventory:hover .index-bento__panel--inventory .index-scene-tool--figma,
  .index-card--inventory:hover .index-bento__panel--inventory .index-scene-sticker--accent,
  .index-card--inventory:hover .index-bento__panel--inventory .index-scene-sticker--spark {
    transition: none;
  }

  .index-inventory-zebra-tilt {
    transform: scale(0.88);
  }

  .index-bento__panel--inventory .index-inventory-zebra-tilt,
  .index-card--inventory:hover .index-bento__panel--inventory .index-inventory-zebra-tilt,
  .index-card--inventory:hover .index-bento__panel--inventory .index-inventory-scene .index-inventory-zebra-tilt {
    transform: scale(0.6);
  }

  .index-scene-tool--cursor,
  .index-card--inventory:hover .index-bento__panel--inventory .index-scene-tool--cursor {
    transform: rotate(-12deg);
  }

  .index-scene-tool--figma,
  .index-card--inventory:hover .index-bento__panel--inventory .index-scene-tool--figma {
    transform: rotate(10deg);
  }

  .index-scene-sticker--accent,
  .index-card--inventory:hover .index-bento__panel--inventory .index-scene-sticker--accent {
    transform: rotate(-6deg);
  }

  .index-scene-sticker--spark,
  .index-card--inventory:hover .index-bento__panel--inventory .index-scene-sticker--spark {
    transform: rotate(14deg);
  }

  .index-card--visual:hover .index-scene-cursor--lisa,
  .index-card--visual:hover .index-scene-cursor--ralf,
  .index-card--visual:hover .index-scene-cursor--felipe {
    transform: none;
  }
}
/* Shared rugged phone frame (Zebra-style) — home cards + case study heroes */
.device-frame--phone,
.index-device-frame--phone {
  flex: 0 0 auto;
  width: clamp(84px, 12.5vw, 108px);
  aspect-ratio: 503 / 1024;
  padding: 7px 6px 10px;
  border-radius: 16px 16px 20px 20px;
  background: linear-gradient(160deg, #888892 0%, #6e6e72 45%, #5a5a5c 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    inset 0 -2px 5px rgba(0, 0, 0, 0.28),
    0 12px 28px rgba(0, 0, 0, 0.15),
    0 3px 8px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  box-sizing: border-box;
}

.device-frame--phone img,
.index-device-frame--phone img {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 10px;
  object-fit: cover;
  object-position: top center;
  transform: scale(1);
  transition: transform 0.55s cubic-bezier(0.25, 0.1, 0.25, 1);
}

.index-inventory-scene__phone.device-frame--phone,
.index-inventory-scene__phone.index-device-frame--phone {
  flex: none;
  overflow: hidden;
  width: auto !important;
  height: clamp(208px, 27vw, 256px);
  aspect-ratio: 445 / 987;
  padding: 0;
  background: transparent;
  border-radius: 14px;
  box-shadow:
    0 0 0 2px rgba(90, 90, 92, 0.85),
    0 12px 28px rgba(0, 0, 0, 0.14),
    0 3px 8px rgba(0, 0, 0, 0.08);
}

.index-inventory-scene__phone.device-frame--phone img {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 12px;
  object-fit: cover;
  object-position: center top;
}

/* Inventory: optional multi-phone row (legacy) */
.index-warehouse-phone-row {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  justify-content: center;
  align-items: flex-end;
  gap: clamp(12px, 3vw, 22px);
  width: 100%;
  position: relative;
  z-index: 1;
}

.index-card--visual:hover .device-frame--phone img,
.index-card--visual:hover .index-device-frame--phone img {
  transform: scale(1.02);
}
.index-card-visual > img {
  display: block;
  width: 100%;
  height: clamp(158px, 28vw, 236px);
  object-fit: cover;
  object-position: top center;
  transform: scale(1);
  transition: transform 0.55s cubic-bezier(0.25, 0.1, 0.25, 1);
}
.index-card--visual:hover .index-card-visual > img {
  transform: scale(1.03);
}
@media (prefers-reduced-motion: reduce) {
  .index-card-visual > img,
  .index-card--visual:hover .index-card-visual > img,
  .index-device-frame--phone img,
  .index-card--visual:hover .index-device-frame--phone img,
  .index-scene-shot,
  .index-card--visual:hover .index-scene-shot {
    transition: none;
    transform: none;
  }
}
.index-card-visual::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, transparent 45%, rgba(255, 255, 255, 0.65) 100%);
}
.index-card-body {
  position: relative;
  padding: 24px 32px 32px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.index-card--visual .index-card-body {
  padding: clamp(26px, 3.5vw, 34px) clamp(28px, 4vw, 40px) clamp(28px, 3.5vw, 36px);
  padding-right: clamp(56px, 9vw, 76px);
  gap: clamp(10px, 1.2vw, 14px);
}
.index-card--visual.coming-soon .index-card-body {
  padding-right: clamp(28px, 4vw, 40px);
}
.index-card--visual:not(.coming-soon) .index-card-badge {
  text-transform: none;
  letter-spacing: 0.03em;
  font-weight: 600;
  font-size: 12px;
  color: #6e6e73;
}
.index-card--visual h3 {
  font-size: clamp(20px, 2.3vw, 26px);
  font-weight: 600;
  letter-spacing: -0.034em;
  line-height: 1.16;
  color: var(--ink);
}
.index-card--visual .index-card-body p {
  font-size: clamp(14px, 1vw + 13px, 16px);
  line-height: 1.5;
  color: #6e6e73;
}
.index-card--visual .index-card-tags {
  margin-top: 4px;
  gap: 8px;
}
.index-card--visual .tag {
  background: rgba(0, 0, 0, 0.04);
  color: #52525c;
  border: 1px solid rgba(0, 0, 0, 0.06);
}
.index-card--visual .tag.accent {
  background: var(--accent-light);
  color: var(--accent);
  border-color: rgba(26, 86, 219, 0.14);
}

.index-card--intake .tag.accent {
  background: rgba(255, 255, 255, 0.9);
  color: #4f46e5;
  border-color: rgba(79, 70, 229, 0.22);
}
.tag--ai {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.tag-sparkle {
  width: 11px;
  height: 11px;
  flex-shrink: 0;
  opacity: 0.9;
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}
.index-card--visual .index-card-arrow {
  top: auto;
  bottom: clamp(22px, 3.5vw, 30px);
  right: clamp(22px, 4vw, 32px);
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #1d1d1f;
  color: #fff;
  font-size: 17px;
  font-weight: 300;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.18);
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.35s ease, background 0.25s ease;
}
.index-card--visual:hover .index-card-arrow {
  transform: scale(1.07);
  color: #fff;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.24);
}

/* ─── DIVIDER ─── */
.section-divider {
  max-width: calc(var(--max-w) + 80px);
  margin: 0 auto 80px;
  padding: 0 var(--page-pad);
}
.section-divider hr { border: none; border-top: 1px solid var(--border); }

/* ─── CASE STUDY SECTIONS ─── */
.case-study {
  max-width: calc(var(--max-w) + 80px);
  margin: 0 auto;
  padding: 0 var(--page-pad) clamp(80px, 14vw, 120px);
  width: 100%;
}
.case-study.standalone { padding-top: 56px; }

/* Prose — natural line breaks, no mid-phrase tearing */
.case-study p,
.case-study li,
.case-study .callout-body,
.case-study .callout p,
.case-study .callout-lead,
.case-study .insight-list span,
.case-study .reflection-block p,
.case-study .next-steps,
.case-study .kh-card p,
.case-study figcaption,
.case-study .cs-chapter-sub,
.case-study .cs-appendix-sub {
  overflow-wrap: break-word;
  word-wrap: break-word;
  hyphens: none;
  text-wrap: pretty;
}
.case-study h3,
.case-study h4 {
  overflow-wrap: break-word;
  hyphens: none;
  text-wrap: balance;
}

.cs-header { margin-bottom: 64px; }
.cs-header-brand {
  margin-bottom: 20px;
}
.cs-brand-logo {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  display: block;
  object-fit: contain;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}
.cs-year-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-light);
  padding: 4px 12px;
  border-radius: 100px;
  margin-bottom: 20px;
  text-transform: uppercase;
  letter-spacing: .06em;
}
.cs-header h2 {
  font-family: 'Roboto', sans-serif;
  font-size: clamp(36px, 5.5vw + 16px, 68px);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.05;
  margin-bottom: 18px;
}
.cs-header h2 em { font-style: italic; color: var(--accent); }
.cs-header-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.cs-header p {
  font-size: clamp(15px, 1.1vw + 14px, 17px);
  color: var(--ink-secondary);
  max-width: min(620px, 100%);
  line-height: 1.65;
}

/* Case study: problem / outcome / role overview (above-the-fold scan) */
.cs-overview {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(16px, 2vw, 24px);
  margin-bottom: 24px;
  padding: clamp(18px, 2.5vw, 26px);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.cs-overview-item .block-label { margin-bottom: 8px; }
.cs-overview-item p {
  font-size: clamp(14px, 0.85vw + 13px, 15px);
  color: var(--ink-secondary);
  line-height: 1.62;
  margin: 0;
}
@media (max-width: 820px) {
  .cs-overview { grid-template-columns: 1fr; }
}

/* ─── CS HERO FACTS — one card: project facts + theme tags ─── */
.cs-hero-facts {
  margin-bottom: 32px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.cs-hero-facts .cs-meta-strip {
  margin-bottom: 0;
  background: transparent;
  border: none;
  border-radius: 0;
}
.cs-hero-facts-tags {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 14px 20px;
  border-top: 1px solid var(--border);
  background: var(--bg);
}
.cs-hero-facts-tags .tag {
  font-size: 12px;
  padding: 5px 11px;
}

/* ─── CS META STRIP ─── */
.cs-meta-strip {
  display: flex;
  flex-wrap: wrap;
  margin-bottom: 36px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.cs-meta-item {
  padding: 14px 22px;
  border-right: 1px solid var(--border);
  flex: 1;
  min-width: 120px;
}
.cs-meta-item:last-child { border-right: none; }
.cs-meta-key {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: 5px;
}
.cs-meta-val { font-size: 14px; font-weight: 600; color: var(--ink); line-height: 1.3; }

/* ─── MY ROLE BLOCK ─── */
.my-role-block {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: clamp(22px, 3.5vw, 28px) clamp(20px, 3vw, 32px);
  margin-bottom: 56px;
  max-width: 100%;
  display: flex;
  gap: 24px;
  align-items: flex-start;
}
.my-role-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--accent-light);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}
.my-role-content { flex: 1; }
.my-role-content .block-label { margin-bottom: 8px; }
.my-role-content p {
  font-size: clamp(14px, 1vw + 13px, 15px);
  color: var(--ink-secondary);
  line-height: 1.72;
  max-width: var(--prose-max);
  overflow-wrap: break-word;
  word-wrap: break-word;
}
.my-role-chips { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 14px; }
.chip {
  font-size: 12px;
  font-weight: 500;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--ink-secondary);
  padding: 4px 10px;
  border-radius: 100px;
}

/* ─── BLOCKS ─── */
.block { margin-bottom: 64px; }
.block > .cs-figure { margin-top: 20px; }
.block > .cs-figure + .cs-figure { margin-top: 28px; }
.cs-figure--open .cs-figure__well {
  aspect-ratio: 16 / 10;
  background: var(--tag-bg);
}
/* Checklists that live inside a .block don't need inline margin/max-width */
.block .checklist {
  margin-top: 16px;
  max-width: var(--prose-max);
}
.block-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .10em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: 20px;
}
.block h3 {
  font-size: clamp(17px, 2.2vw, 20px);
  font-weight: 700;
  letter-spacing: -.01em;
  margin-bottom: 12px;
  line-height: 1.3;
  max-width: min(42rem, 100%);
}
.block p {
  font-size: clamp(15px, 1vw + 14px, 16px);
  color: var(--ink-secondary);
  line-height: 1.72;
  max-width: var(--prose-max);
  overflow-wrap: break-word;
  word-wrap: break-word;
  hyphens: none;
  text-wrap: pretty;
}
.block p + p { margin-top: 12px; }
.block h4.aspect-title {
  font-size: clamp(14px, 1.1vw + 13px, 15px);
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -.015em;
  line-height: 1.3;
  max-width: var(--prose-max);
  margin-top: 28px;
  margin-bottom: 10px;
}
.block h3 + p + h4.aspect-title { margin-top: 22px; }
.block h4.aspect-title + p { margin-top: 0; }

/* ─── CALLOUT CARD ─── */
/* Lead line inside a callout (strong claim, larger) */
.callout-lead {
  font-size: 17px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.5;
  margin-bottom: 10px;
}
/* Supporting body line inside a callout (quieter) */
.callout-body {
  font-size: 15px;
  color: var(--ink-secondary);
  line-height: 1.7;
  overflow-wrap: break-word;
  word-wrap: break-word;
}
.callout {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: clamp(22px, 4vw, 32px) clamp(20px, 3.5vw, 36px);
  margin-bottom: 64px;
  max-width: 100%;
}
.callout p { max-width: var(--prose-max); }
.callout.accent-left {
  background: var(--accent-light);
  border-color: rgba(26, 86, 219, 0.2);
}
.callout.green-left {
  background: var(--accent-green-light);
  border-color: rgba(5, 150, 105, 0.2);
}

/* ─── QUOTE ─── */
.quote-block {
  background: var(--ink);
  color: #fff;
  border-radius: var(--radius);
  padding: clamp(28px, 5vw, 40px) clamp(22px, 4vw, 44px);
  margin-bottom: 64px;
  position: relative;
  max-width: 100%;
}
.quote-mark {
  font-family: 'Roboto', sans-serif;
  font-size: 72px;
  line-height: .7;
  color: rgba(255,255,255,.15);
  position: absolute;
  top: 28px;
  left: 36px;
}
.quote-block blockquote {
  font-family: 'Roboto', sans-serif;
  font-size: clamp(18px, 2.8vw, 26px);
  font-weight: 300;
  font-style: italic;
  line-height: 1.45;
  margin-bottom: 20px;
  padding-left: 8px;
  max-width: 100%;
}
.quote-source { font-size: 13px; color: rgba(255,255,255,.55); font-weight: 500; }

/* ─── METRICS ─── */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 16px;
  margin-bottom: 56px;
}
.metric-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
  text-align: center;
}
.metric-number {
  font-size: clamp(32px, 7vw, 42px);
  font-weight: 800;
  color: var(--accent-green);
  letter-spacing: -.03em;
  line-height: 1;
  margin-bottom: 8px;
}
.metric-label { font-size: clamp(12px, 1.2vw + 11px, 13px); color: var(--ink-secondary); line-height: 1.45; hyphens: none; }

/* ─── COMPARISON ─── */
.comparison-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 56px;
}
.comparison-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: clamp(20px, 3vw, 28px);
  min-width: 0;
}
.comparison-card .comp-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: 14px;
}
.comparison-card.after .comp-label { color: var(--accent-green); }
.comparison-card h4 { font-size: 16px; font-weight: 700; margin-bottom: 10px; }
.comparison-card ul { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.comparison-card ul li {
  font-size: clamp(13px, 1.1vw + 12px, 14px);
  color: var(--ink-secondary);
  display: flex;
  gap: 8px;
  align-items: flex-start;
}
.comparison-card ul li::before {
  content: '×';
  color: #EF4444;
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 1px;
}
.comparison-card.after ul li::before { content: '✓'; color: var(--accent-green); }

/* ─── SCROLL COMPARE: 3D flip (visual) + translateY stack (copy, Corgi-style) ─── */
.sc-outer {
  height: 280vh;
  position: relative;
  margin-bottom: 64px;
}
.sc-sticky {
  position: sticky;
  top: 72px;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 32px 0 24px;
  background: var(--bg);
  height: calc(100vh - 72px);
}
.sc-header { display: flex; flex-direction: column; gap: 6px; }
.sc-title {
  font-size: clamp(18px, 1.4vw + 14px, 22px);
  font-weight: 700;
  margin: 0 0 4px;
  color: var(--ink);
  line-height: 1.35;
}
.sc-tabs { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.sc-tab {
  font-size: 13px;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 100px;
  border: 1px solid transparent;
  transition: color 750ms cubic-bezier(0.4, 0, 0.2, 1),
              background 750ms cubic-bezier(0.4, 0, 0.2, 1),
              border-color 750ms cubic-bezier(0.4, 0, 0.2, 1);
  letter-spacing: 0.01em;
}
.sc-tab--before {
  color: var(--ink);
  background: var(--bg-card);
  border-color: var(--border);
}
.sc-tab--after {
  color: var(--ink-muted);
  background: transparent;
}
.sc-tab-arrow { color: var(--ink-muted); font-size: 13px; }

.sc-outer.is-after .sc-tab--before {
  color: var(--ink-muted);
  background: transparent;
  border-color: transparent;
}
.sc-outer.is-after .sc-tab--after {
  color: var(--accent-green);
  background: var(--accent-green-light);
  border-color: rgba(5, 150, 105, 0.2);
}

/* sc-body: holds one compare row (flip visual + scrolling copy) */
.sc-body {
  position: relative;
  flex: 1;
  min-height: 0;
}

/* One card: left = 3D flip stage only; right = stacked copy (translateY like Corgi) */
.sc-compare-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  height: 100%;
  min-height: 0;
}
.block .sc-compare-card {
  height: auto;
}

/* ── Left: 3D flip (image / mock area only) ── */
.sc-visual-stage {
  position: relative;
  min-width: 0;
  min-height: 0;
  height: 100%;
  border-right: 1px solid var(--border);
  perspective: 1200px;
  overflow: hidden;
  background: #1C1C1F;
}
.sc-visual-flip {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transform: rotateY(0deg);
  transition: transform 750ms cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform;
}
.sc-outer.is-after .sc-visual-flip {
  transform: rotateY(180deg);
}
.sc-vis-face {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}
.sc-vis-face--after {
  transform: rotateY(180deg);
}

.sc-col-visual {
  padding: clamp(20px, 3vw, 28px);
  min-width: 0;
  overflow: hidden; /* clip ticker */
  height: 100%;
  box-sizing: border-box;
}
.sc-col-visual--before {
  background: #1C1C1F;
  display: flex;
  flex-direction: column;
}
.sc-col-visual--before .comp-label { color: #71717a; }
.sc-col-visual--before h4 { color: #f4f4f5; margin: 6px 0 0; }
/* Scroll-compare before face: stress lane — tinted graphite + soft rose wash (OKLCH), mirrors hybrid face */
#sc-compare .sc-col-visual--before {
  --sc-stress-surface: oklch(23% 0.011 285);
  --sc-stress-wash: oklch(40% 0.06 25 / 0.13);
  background:
    radial-gradient(115% 85% at 8% 4%, var(--sc-stress-wash) 0%, transparent 52%),
    radial-gradient(88% 68% at 95% 90%, oklch(26% 0.032 340 / 0.34) 0%, transparent 50%),
    var(--sc-stress-surface);
}
#sc-compare .sc-col-visual--before .comp-label {
  color: oklch(62% 0.035 285);
}
#sc-compare .sc-col-visual--before h4 {
  color: oklch(96% 0.008 95);
  margin: 6px 0 0;
}
/* Scroll-compare flip faces: scattered pills (layout via JS) — before stress + after hybrid */
#sc-compare .pill-scatter-field {
  position: relative;
  flex: 1 1 auto;
  min-height: min(300px, 46vh);
  width: 100%;
  margin-top: auto;
  padding-top: 8px;
  overflow: hidden;
}
#sc-compare .pill-scatter-field .before-drift-wrap {
  position: absolute;
  left: 50%;
  top: 50%;
  pointer-events: none;
  transform: translate(-50%, -50%);
}
#sc-compare .pill-scatter-field .before-drift-pill {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 11px 20px;
  font-size: 14px;
  border-radius: 100px;
  font-weight: 600;
  white-space: nowrap;
  letter-spacing: 0.01em;
  line-height: 1.15;
  /* Faces override with hue-matched shadows */
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.4);
}
#sc-compare .before-pill-field .before-drift-pill {
  background: oklch(29% 0.022 18);
  border: 1px solid oklch(56% 0.14 22 / 0.58);
  color: oklch(91% 0.038 22);
  box-shadow:
    0 6px 22px oklch(12% 0.04 350 / 0.44),
    inset 0 1px 0 oklch(99% 0.018 22 / 0.09);
}
#sc-compare .after-pill-field .before-drift-pill {
  /* OKLCH: low chroma on dark fills, slightly more chroma on border; ties to --accent-green hue */
  background: oklch(30% 0.024 168);
  border: 1px solid oklch(58% 0.09 162 / 0.62);
  color: oklch(94% 0.028 158);
  box-shadow:
    0 6px 22px oklch(14% 0.03 175 / 0.42),
    inset 0 1px 0 oklch(99% 0.012 158 / 0.09);
}
#sc-compare .pill-scatter-field .before-drift-pill.before-drift-pill--sz-sm {
  gap: 6px;
  padding: 7px 13px;
  font-size: 11.5px;
}
#sc-compare .pill-scatter-field .before-drift-pill.before-drift-pill--sz-sm svg {
  width: 13px;
  height: 13px;
}
#sc-compare .pill-scatter-field .before-drift-pill.before-drift-pill--sz-lg {
  gap: 11px;
  padding: 13px 24px;
  font-size: 15.5px;
}
#sc-compare .pill-scatter-field .before-drift-pill.before-drift-pill--sz-lg svg {
  width: 18px;
  height: 18px;
}
#sc-compare .pill-scatter-field .before-drift-pill.before-drift-pill--sz-xl {
  gap: 12px;
  padding: 15px 28px;
  font-size: 17px;
}
#sc-compare .pill-scatter-field .before-drift-pill.before-drift-pill--sz-xl svg {
  width: 20px;
  height: 20px;
}
#sc-compare .pill-scatter-field .before-drift-pill svg {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  opacity: 0.92;
}
.before-drift-pill.before-drift-pill--L {
  animation: before-drift-L 22s ease-in-out infinite alternate;
}
.before-drift-pill.before-drift-pill--R {
  animation: before-drift-R 22s ease-in-out infinite alternate;
}
@keyframes before-drift-L {
  from { transform: translateX(6px); }
  to { transform: translateX(-34px); }
}
@keyframes before-drift-R {
  from { transform: translateX(-6px); }
  to { transform: translateX(34px); }
}
@media (prefers-reduced-motion: reduce) {
  .before-drift-pill.before-drift-pill--L,
  .before-drift-pill.before-drift-pill--R {
    animation: none;
  }
}
@media (max-width: 480px) {
  #sc-compare .pill-scatter-field {
    min-height: min(200px, 38vh);
    padding-top: 6px;
  }
  #sc-compare .pill-scatter-field .before-drift-pill {
    padding: 8px 14px;
    font-size: 12px;
  }
  #sc-compare .pill-scatter-field .before-drift-pill.before-drift-pill--sz-sm {
    padding: 5px 10px;
    font-size: 10px;
  }
  #sc-compare .pill-scatter-field .before-drift-pill.before-drift-pill--sz-lg {
    padding: 10px 17px;
    font-size: 13.5px;
  }
  #sc-compare .pill-scatter-field .before-drift-pill.before-drift-pill--sz-xl {
    padding: 11px 18px;
    font-size: 14.5px;
  }
}
.sc-col-visual--after .comp-label { color: var(--accent-green); }
.sc-col-visual--after h4 { margin: 6px 0 20px; }
.sc-col-visual--after {
  padding: 20px;
  background: #dddbd8;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.sc-after-img {
  display: block;
  flex: 1;
  min-height: 0;
  width: 100%;
  object-fit: cover;
  object-position: top center;
  border-radius: 6px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.18);
}
/* Scroll-compare after face: hybrid lane — tinted graphite + soft emerald wash (OKLCH) */
#sc-compare .sc-col-visual--after {
  --sc-hybrid-surface: oklch(23% 0.011 168);
  --sc-hybrid-wash: oklch(36% 0.045 158 / 0.14);
  position: relative;
  padding: clamp(20px, 3vw, 28px);
  background:
    radial-gradient(115% 85% at 10% 0%, var(--sc-hybrid-wash) 0%, transparent 52%),
    radial-gradient(90% 70% at 92% 88%, oklch(28% 0.03 175 / 0.35) 0%, transparent 50%),
    var(--sc-hybrid-surface);
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
  box-sizing: border-box;
  height: 100%;
}
#sc-compare .sc-col-visual--after h4 {
  color: oklch(96% 0.008 95);
  margin: 6px 0 0;
}

/* Right column: two slabs, track moves up as scroll progresses (Corgi pattern) */
.sc-col-copy-wrap {
  position: relative;
  min-width: 0;
  min-height: 0;
  height: 100%;
  overflow: hidden;
  background: var(--bg-card);
}
.sc-copy-track {
  display: flex;
  flex-direction: column;
  height: 200%;
  transform: translateY(0);
  transition: transform 750ms cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform;
}
.sc-outer.is-after .sc-copy-track {
  transform: translateY(-50%);
}
.sc-copy-slab {
  box-sizing: border-box;
  height: 50%;
  min-height: 0;
  padding: clamp(20px, 3vw, 28px);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.sc-col-bullets {
  padding: clamp(20px, 3vw, 28px);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* Desc text + bullets */
.sc-desc-p {
  font-size: 14px;
  color: var(--ink-secondary);
  line-height: 1.7;
  margin: 0 0 16px;
}
.sc-bullets {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 0;
}
.sc-bullets li {
  font-size: 13px;
  color: var(--ink-secondary);
  display: flex;
  gap: 8px;
  align-items: flex-start;
  line-height: 1.5;
}
.sc-bullets--x li::before {
  content: '×';
  color: #EF4444;
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 1px;
}
.sc-bullets--check li::before {
  content: '✓';
  color: var(--accent-green);
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 1px;
}


@media (max-width: 480px) {
  .sc-outer { height: auto; }
  .sc-sticky { position: static; height: auto; }
  .sc-body { flex: none; }
  .sc-compare-card { grid-template-columns: 1fr; height: auto; }
  .sc-visual-stage {
    height: 280px;
    border-right: none;
    border-bottom: 1px solid var(--border);
    perspective: none;
  }
  .sc-visual-flip,
  .sc-copy-track {
    transition: none !important;
  }
  .sc-visual-flip { transform: none !important; }
  .sc-outer.is-after .sc-visual-flip { transform: none !important; }
  .sc-vis-face { position: relative; inset: auto; backface-visibility: visible; -webkit-backface-visibility: visible; }
  .sc-vis-face--after {
    display: none;
    transform: none;
  }
  .sc-outer.is-after .sc-vis-face--before { display: none; }
  .sc-outer.is-after .sc-vis-face--after { display: flex; }
  .sc-col-copy-wrap { height: auto; min-height: 0; }
  .sc-copy-track { height: auto !important; transform: none !important; }
  .sc-copy-slab { height: auto; }
  .sc-copy-slab--after { display: none; }
  .sc-outer.is-after .sc-copy-slab--before { display: none; }
  .sc-outer.is-after .sc-copy-slab--after { display: flex; }
}

@media (prefers-reduced-motion: reduce) {
  #sc-compare .sc-visual-stage { perspective: none; }
  #sc-compare .sc-visual-flip,
  #sc-compare .sc-copy-track {
    transition: none !important;
  }
  #sc-compare .sc-visual-flip { transform: none !important; }
  #sc-compare .sc-vis-face {
    position: relative;
    inset: auto;
    backface-visibility: visible;
    -webkit-backface-visibility: visible;
  }
  #sc-compare .sc-vis-face--after { display: none; transform: none; }
  #sc-compare.sc-outer.is-after .sc-vis-face--before { display: none; }
  #sc-compare.sc-outer.is-after .sc-vis-face--after { display: flex; }
  #sc-compare .sc-copy-track { height: auto !important; transform: none !important; }
  #sc-compare .sc-copy-slab { height: auto; }
  #sc-compare .sc-copy-slab--after { display: none; }
  #sc-compare.sc-outer.is-after .sc-copy-slab--before { display: none; }
  #sc-compare.sc-outer.is-after .sc-copy-slab--after { display: flex; }
}

/* ─── BEFORE-CARD TICKER (Corgi-style horizontal queue) ─── */
.comparison-card.before-card {
  background: #1C1C1F;
  border-color: #3a3a3f;
  color: #f4f4f5;
}
.comparison-card.before-card .comp-label {
  color: #71717a;
}
.comparison-card.before-card h4 {
  color: #f4f4f5;
}

.ticker-viewport {
  position: relative;
  overflow: hidden;
  margin-top: 24px;
  /* fade left + right edges */
  -webkit-mask-image: linear-gradient(to right, transparent 0%, #000 10%, #000 90%, transparent 100%);
  mask-image: linear-gradient(to right, transparent 0%, #000 10%, #000 90%, transparent 100%);
}
.ticker-track {
  display: flex;
  flex-direction: row;
  align-items: center;
  width: max-content;
  gap: 0;
  animation: ticker-left 22s linear infinite;
}
@keyframes ticker-left {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) {
  .ticker-track { animation: none; }
}
.ticker-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 14px;
  background: #242428;
  border: 1.5px solid rgba(248, 113, 113, 0.55);
  border-radius: 100px;
  font-size: 13px;
  font-weight: 500;
  color: #fca5a5;
  white-space: nowrap;
  letter-spacing: 0.01em;
  line-height: 1;
  flex-shrink: 0;
}
.ticker-pill svg {
  flex-shrink: 0;
  opacity: 0.85;
}
.ticker-connector {
  color: #52525b;
  font-size: 14px;
  padding: 0 10px;
  flex-shrink: 0;
  user-select: none;
}

/* ─── SOLUTION TABLE ─── */
.solution-table-wrap {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin-bottom: 56px;
}
.solution-table-wrap .solution-table {
  margin-bottom: 0;
}
.solution-table--pr {
  min-width: min(100%, 560px);
}
.solution-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 56px;
  font-size: 14px;
  background: var(--bg-card);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
}
.solution-table th {
  background: var(--bg);
  font-weight: 600;
  color: var(--ink-secondary);
  padding: 14px 18px;
  text-align: left;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .06em;
  border-bottom: 1px solid var(--border);
}
.solution-table td {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  color: var(--ink-secondary);
  vertical-align: top;
  overflow-wrap: break-word;
  word-wrap: break-word;
  hyphens: none;
}
.solution-table tr:last-child td { border-bottom: none; }
.governance-analogy-table td:first-child {
  font-weight: 600;
  color: var(--ink);
}
.solution-table tr.selected td { background: var(--accent-light); color: var(--ink); }
.solution-table tr.selected td:first-child { font-weight: 700; color: var(--accent); }
.selected-badge {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 100px;
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-left: 8px;
}
.pill-good {
  display: inline-block;
  background: var(--accent-green-light);
  color: var(--accent-green);
  font-size: 12px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 100px;
}
.pill-bad {
  display: inline-block;
  background: #FEF2F2;
  color: #DC2626;
  font-size: 12px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 100px;
}
.cs-analogy-footnote {
  font-size: 13px;
  color: var(--ink-muted);
  margin-top: 12px;
  line-height: 1.55;
}
.governance-flow {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 20px;
}
.governance-flow-step {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 18px 16px;
  position: relative;
}
.governance-flow-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--accent-light);
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 10px;
}
.governance-flow-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  margin: 0 0 8px;
}
.governance-flow-step p {
  margin: 0;
  font-size: 14px;
  line-height: 1.55;
  color: var(--ink-secondary);
}
@media (max-width: 720px) {
  .governance-flow {
    grid-template-columns: 1fr;
  }
}
.pill-mid {
  display: inline-block;
  background: #FFFBEB;
  color: #D97706;
  font-size: 12px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 100px;
}

/* ─── INSIGHT LIST ─── */
.insight-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 56px;
}
.insight-list li {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: clamp(14px, 2.5vw, 18px) clamp(16px, 2.5vw, 20px);
  font-size: clamp(14px, 1vw + 13px, 15px);
  color: var(--ink-secondary);
  line-height: 1.55;
  display: flex;
  gap: 14px;
  align-items: flex-start;
  min-width: 0;
}
.insight-list li span { min-width: 0; }
.insight-icon {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--accent-light);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
  margin-top: 1px;
}

/* Tighter research → list rhythm (e.g. intake “What research showed”) */
.block.block--tight-after {
  margin-bottom: 20px;
}
.block.block--tight-after .block-label {
  margin-bottom: 10px;
}
.block.block--tight-after h3 {
  margin-bottom: 4px;
}
.insight-list.insight-list--dense {
  gap: 10px;
  margin-bottom: 48px;
}
.insight-list.insight-list--dense li {
  padding: 12px 16px;
  font-size: clamp(14px, 1vw + 13px, 15px);
  line-height: 1.55;
  gap: 12px;
  align-items: flex-start;
}
.insight-list.insight-list--dense .insight-icon {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  font-size: 12px;
  margin-top: 0;
}

/* ─── KEY HIGHLIGHTS ─── */
.kh-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr));
  gap: 14px;
  margin-bottom: 56px;
}
.block .kh-grid {
  margin-top: 20px;
  margin-bottom: 0;
}
.kh-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 24px 20px;
}
.kh-number {
  font-size: 12px;
  font-weight: 800;
  color: var(--accent);
  letter-spacing: .09em;
  text-transform: uppercase;
  margin-bottom: 10px;
}
.kh-card h4 {
  font-size: clamp(14px, 1.4vw + 13px, 15px);
  font-weight: 700;
  color: var(--ink);
  line-height: 1.4;
  margin-bottom: 8px;
  letter-spacing: -.01em;
}
.kh-card p { font-size: clamp(12px, 1vw + 12px, 13px); color: var(--ink-secondary); line-height: 1.55; }

/* Key highlights — horizontal carousel */
.kh-carousel-block { margin-bottom: 56px; }
.kh-carousel-top {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 20px;
}
.kh-carousel-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.kh-carousel-btn {
  min-width: 40px;
  height: 40px;
  padding: 0 12px;
  border-radius: 980px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--ink);
  font-size: 13px;
  font-weight: 500;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: border-color .15s ease, background .15s ease, color .15s ease, opacity .15s ease;
  font-family: inherit;
}
.kh-carousel-btn:hover:not(:disabled) {
  border-color: var(--ink-muted);
  background: var(--tag-bg);
  color: var(--ink);
}
.kh-carousel-btn:disabled {
  opacity: .35;
  cursor: not-allowed;
}
.kh-carousel-track {
  display: flex;
  flex-wrap: nowrap;
  gap: 14px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding: 2px 2px 12px;
  margin: 0 -2px;
}
.kh-carousel-track::-webkit-scrollbar { display: none; }
.kh-carousel-track .kh-card {
  flex: 0 0 auto;
  width: clamp(260px, 38vw, 320px);
  scroll-snap-align: start;
  margin-bottom: 0;
}
.kh-carousel-dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 16px;
}
.kh-carousel-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: none;
  padding: 0;
  background: var(--border);
  cursor: pointer;
  transition: background .15s ease, transform .15s ease;
}
.kh-carousel-dot.on {
  background: var(--ink);
  transform: scale(1.15);
}
@media (max-width: 640px) {
  .kh-carousel-top { align-items: flex-start; flex-direction: column; }
  .kh-carousel-track .kh-card { width: min(300px, 88vw); }
}

/* Card surfaces: description copy stays regular weight (no bold <strong>) */
.index-card-body p strong,
.insight-list li strong,
.kh-card p strong,
.callout p strong,
.my-role-content p strong,
.comparison-card li strong,
.reflection-block .next-steps strong {
  font-weight: 400;
  color: inherit;
}

/* ─── REFLECTION ─── */
.reflection-block {
  background: linear-gradient(135deg, #F0F4FF 0%, #ffffff 100%);
  border: 1px solid #C7D7FA;
  border-radius: var(--radius);
  padding: clamp(24px, 4vw, 36px) clamp(20px, 3.5vw, 40px);
  margin-bottom: 64px;
  max-width: 100%;
}
.reflection-block .ref-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .10em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 16px;
}
.reflection-block p {
  font-family: 'Roboto', sans-serif;
  font-size: clamp(17px, 2.5vw, 20px);
  font-weight: 300;
  font-style: italic;
  color: var(--ink);
  line-height: 1.55;
  margin-bottom: 20px;
  max-width: var(--prose-max);
}
/* Secondary "what I'd do differently" paragraph below the italic quote */
.reflection-block p + p {
  font-family: 'Roboto', sans-serif;
  font-size: 14px;
  font-style: normal;
  font-weight: 400;
  color: var(--ink-secondary);
  line-height: 1.6;
  margin-top: 12px;
  margin-bottom: 0;
}
.reflection-block .next-steps {
  font-family: 'Roboto', sans-serif;
  font-size: 14px;
  font-style: normal;
  color: var(--ink-secondary);
  line-height: 1.7;
}

/* ─── MORE TO THE STORY ─── */
.more-story {
  background: var(--ink);
  color: rgba(255,255,255,.7);
  border-radius: var(--radius);
  padding: clamp(22px, 3vw, 28px) clamp(20px, 3vw, 32px);
  margin-bottom: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.more-story-text { display: flex; flex-direction: column; gap: 6px; }
.more-story-text strong,
.more-story-text .more-story-lead { font-size: 15px; font-weight: 700; color: #fff; }
.more-story-text span { font-size: 13px; line-height: 1.55; max-width: 520px; }
.more-story-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}
.more-story-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.15);
  color: rgba(255,255,255,.8);
  font-size: 13px;
  font-weight: 600;
  padding: 10px 18px;
  border-radius: 100px;
  white-space: nowrap;
  transition: background var(--transition);
  text-decoration: none;
  font-family: inherit;
  cursor: pointer;
}
.more-story-badge:not(.more-story-badge--ghost) {
  background: #fff;
  border: 1px solid #fff;
  color: var(--ink);
}
.more-story-badge:not(.more-story-badge--ghost):hover {
  background: rgba(255, 255, 255, 0.92);
}
.more-story-badge--ghost {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.42);
  color: #fff;
}
.more-story-badge--ghost:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.55);
  color: #fff;
}
.more-story-badge:focus-visible,
.presentation-auth-cancel:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
}
.more-story-badge:focus-visible,
.presentation-auth-cancel:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
}

/* Presentation mode password dialog (Intake Agent) */
.presentation-auth-dialog {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 24px 20px;
  max-width: 380px;
  width: calc(100vw - 32px);
  box-shadow: var(--shadow-lg);
}
.presentation-auth-dialog::backdrop {
  background: rgba(15, 15, 20, 0.45);
  backdrop-filter: blur(4px);
}
.presentation-auth-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--ink);
  margin: 0 0 8px;
  letter-spacing: -0.02em;
}
.presentation-auth-desc {
  font-size: 13px;
  color: var(--ink-secondary);
  line-height: 1.5;
  margin: 0 0 18px;
}
.presentation-auth-label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: 8px;
}
.presentation-auth-input {
  width: 100%;
  padding: 12px 14px;
  font-size: 15px;
  font-family: inherit;
  border: 1px solid var(--border);
  border-radius: 10px;
  outline: none;
  transition: border-color 0.2s;
}
.presentation-auth-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(26, 86, 219, 0.12);
}
.presentation-auth-err {
  font-size: 13px;
  color: #B91C1C;
  margin: 10px 0 0;
}
.presentation-auth-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 20px;
}
.presentation-auth-cancel {
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
}
.presentation-auth-cancel:hover {
  background: var(--tag-bg);
  color: var(--ink);
}

/* ─── CHECKLIST ─── */
.checklist { list-style: none; display: flex; flex-direction: column; gap: 10px; margin: 0; padding: 0; }
.checklist li {
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-size: 15px;
  color: var(--ink-secondary);
}
.checklist li::before { content: '✅'; font-size: 14px; }

/* ─── SHIPPED OUTCOMES (card grid) ─── */
.shipped-grid {
  list-style: none;
  margin: 4px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  max-width: 100%;
}
.shipped-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: clamp(18px, 2.5vw, 22px) clamp(18px, 2.5vw, 24px);
  display: flex;
  gap: 14px;
  align-items: flex-start;
  box-shadow: var(--shadow-sm);
  min-width: 0;
}
.shipped-card--wide {
  grid-column: 1 / -1;
}
.shipped-num {
  flex-shrink: 0;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .08em;
  color: var(--accent);
  padding-top: 4px;
  min-width: 18px;
}
.shipped-card p {
  font-size: clamp(14px, 1vw + 13px, 15px);
  color: var(--ink-secondary);
  line-height: 1.58;
  margin: 0;
  overflow-wrap: break-word;
  hyphens: none;
  text-wrap: pretty;
}
.shipped-copy {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.shipped-title {
  font-weight: 600;
  color: var(--ink);
}
.shipped-desc {
  font-size: clamp(13px, 1vw + 12px, 14px);
  line-height: 1.55;
}
.shipped-card strong {
  color: var(--ink);
  font-weight: 600;
}
@media (max-width: 720px) {
  .shipped-grid { grid-template-columns: 1fr; }
  .shipped-card--wide { grid-column: auto; }
}

/* ─── DEMO / RISING CASE ─── */
.cs-demo-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin: 0 0 56px;
}
.cs-demo-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  min-width: 0;
  text-decoration: none;
  color: inherit;
  transition: box-shadow var(--transition), transform var(--transition), border-color var(--transition);
}
.cs-demo-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
  border-color: #d4d4d8;
}
.cs-demo-card img {
  width: 100%;
  height: auto;
  border-radius: 10px;
  border: 1px solid var(--border);
  display: block;
}
.cs-demo-card__meta {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-muted);
}
.cs-demo-card h4 {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.cs-demo-card p {
  font-size: 14px;
  line-height: 1.55;
  color: var(--ink-secondary);
  max-width: none;
}
.cs-demo-card__cta {
  margin-top: auto;
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
}
.cs-trust-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin: 0 0 56px;
}
.cs-trust-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  min-width: 0;
}
.cs-trust-card img {
  width: 100%;
  height: auto;
  display: block;
  border-bottom: 1px solid var(--border);
}
.cs-trust-card__copy {
  padding: 16px 18px 18px;
}
.cs-trust-card h4 {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--ink);
}
.cs-trust-card p {
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--ink-secondary);
  max-width: none;
}
.cs-flow-steps {
  list-style: none;
  margin: 0 0 56px;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.cs-flow-step {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 16px 20px;
  min-width: 0;
}
.cs-flow-step__num {
  display: block;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--accent);
  margin-bottom: 8px;
}
.cs-flow-step h4 {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--ink);
}
.cs-flow-step p {
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--ink-secondary);
  max-width: none;
}
@media (max-width: 900px) {
  .cs-demo-grid,
  .cs-trust-grid,
  .cs-flow-steps {
    grid-template-columns: 1fr;
  }
}

/* ─── FOCUS GRID ─── */
.focus-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 56px;
}
.focus-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: clamp(14px, 2.5vw, 18px) clamp(16px, 2vw, 20px);
  font-size: clamp(13px, 1.1vw + 12px, 14px);
  color: var(--ink-secondary);
  line-height: 1.55;
  min-width: 0;
}
.focus-item strong,
.focus-item .focus-item-title {
  display: block;
  font-size: clamp(12px, 1vw + 11px, 13px);
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 4px;
}

/* ─── DESIGN PHILOSOPHY ─── */
.philosophy-section {
  max-width: calc(var(--max-w) + 80px);
  margin: 0 auto;
  padding: 0 var(--page-pad) clamp(80px, 14vw, 120px);
  width: 100%;
}
.philosophy-intro { max-width: 560px; margin-bottom: 48px; }
.philosophy-intro h2 {
  font-family: 'Roboto', sans-serif;
  font-size: clamp(28px, 3.5vw, 40px);
  font-weight: 300;
  letter-spacing: -.03em;
  line-height: 1.15;
  margin-bottom: 14px;
}
.philosophy-intro h2 em { font-style: italic; color: var(--accent); }
.philosophy-intro p { font-size: 16px; color: var(--ink-secondary); line-height: 1.7; }
.philosophy-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 16px;
}
.philosophy-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.philosophy-number {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .10em;
  text-transform: uppercase;
  color: var(--ink-muted);
}
.philosophy-card h3 {
  font-family: 'Roboto', sans-serif;
  font-size: 22px;
  font-weight: 300;
  font-style: italic;
  line-height: 1.3;
  color: var(--ink);
  letter-spacing: -.01em;
}
.philosophy-card p { font-size: 14px; color: var(--ink-secondary); line-height: 1.7; }

/* ─── CASE STUDY FIGURES (screenshots) ─── */
/* Source assets are 1024×711; scale down with layout, never distort */
.cs-gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  margin-top: 24px;
  width: 100%;
}
.cs-figure {
  margin: 0;
  min-width: 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.cs-figure img {
  display: block;
  width: 100%;
  height: auto;
}
.cs-figure video,
.cs-demo-video {
  display: block;
  width: 100%;
  height: auto;
  background: var(--bg-card);
}
.cs-figure figcaption {
  padding: 12px 14px 14px;
  font-size: clamp(12px, 1.1vw + 11px, 13px);
  color: var(--ink-secondary);
  line-height: 1.45;
  border-top: 1px solid var(--border);
  background: var(--bg-card);
}
.cs-figure[data-mock-slot] .cs-figure__well {
  aspect-ratio: 3 / 2;
}
.cs-figure[data-mock-slot]:has(img) .cs-figure__well {
  display: none;
}
.cs-gallery-full {
  grid-column: 1 / -1;
}
/* Portrait mobile screenshots — horizontal carousel so tall phone shots sit
   side-by-side on desktop and swipe on mobile */
.cs-gallery-phone {
  display: flex;
  flex-wrap: nowrap;
  overflow-x: auto;
  gap: 16px;
  padding-bottom: 8px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}
.cs-gallery-phone .cs-figure {
  flex: 0 0 auto;
  width: clamp(200px, 22vw, 260px);
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
}
.cs-gallery-phone .cs-figure img {
  width: 100%;
  max-width: 100%;
  height: auto;
  display: block;
}
.cs-gallery-phone .cs-figure figcaption {
  flex: 1;
}

/* Single legacy / tall mockup — cap width so it doesn’t dominate the page */
.cs-figure-legacy {
  margin-top: 24px;
  margin-left: auto;
  margin-right: auto;
  max-width: min(420px, 94vw);
}

/* ─── CONVERSATIONAL FLOW (dialogue examples) ─── */
.convo-flow {
  margin-top: 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-card);
  max-width: var(--prose-max);
}
.convo-turn {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
  line-height: 1.55;
  color: var(--ink-secondary);
}
.convo-turn:last-child { border-bottom: none; }
.convo-turn .convo-role {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: 8px;
}
.convo-turn.user { background: rgba(0,0,0,.02); }
.convo-turn.agent {
  background: var(--accent-light);
}
.convo-turn.convo-mockup {
  padding: 0;
  background: var(--accent-light);
}
.convo-turn.convo-mockup .convo-role {
  padding: 14px 18px 10px;
  margin-bottom: 0;
}

/* Wireframe mock — generic, not product UI */
.reply-pattern-mock {
  padding: 0 18px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.rpm-block {
  border: 1px dashed var(--border);
  border-radius: var(--radius-sm);
  background: rgba(0, 0, 0, 0.02);
  padding: 10px 12px;
}
.rpm-block-label {
  display: block;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: 8px;
}
.rpm-skeleton-lines {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.rpm-bar {
  display: block;
  height: 8px;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--border) 0%, rgba(0, 0, 0, 0.06) 100%);
  width: 100%;
}
.rpm-bar--mid { width: 92%; }
.rpm-bar--short { width: 55%; }
.rpm-source-rows {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.rpm-link {
  display: block;
  height: 6px;
  border-radius: 3px;
  background: var(--accent-light);
  width: 100%;
  max-width: 220px;
  border-bottom: 2px solid var(--accent);
  opacity: 0.45;
}
.rpm-source-rows li:nth-child(2) .rpm-link { max-width: 180px; }
.rpm-feedback {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}
.rpm-feedback .rpm-block-label {
  margin-bottom: 0;
}
.rpm-thumbs {
  display: flex;
  gap: 8px;
}
.rpm-thumb-btn {
  width: 32px;
  height: 28px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  box-shadow: var(--shadow-sm);
  position: relative;
}
.rpm-thumb-btn::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -55%);
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
}
.rpm-thumb-btn:first-child::after {
  border-bottom: 7px solid var(--ink-muted);
}
.rpm-thumb-btn:last-child::after {
  border-top: 7px solid var(--ink-muted);
}

/* Reply-pattern extensions (wireframe blocks) */
.rpm-cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}
.rpm-cta-pill {
  height: 32px;
  min-width: 148px;
  border-radius: 8px;
  background: var(--accent);
  opacity: 0.28;
}
.rpm-field-rows {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.rpm-field-row {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 8px 10px;
  align-items: center;
}
.rpm-field-label {
  height: 6px;
  width: 52px;
  border-radius: 3px;
  background: var(--border);
}
.rpm-field-input {
  height: 28px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.03);
}
.rpm-dropdown-row {
  height: 32px;
  border-radius: 6px;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 0 10px;
  background: rgba(0, 0, 0, 0.02);
}
.rpm-dropdown-row::before {
  content: '';
  flex: 1;
  max-width: 55%;
  height: 6px;
  border-radius: 3px;
  background: var(--border);
  margin-right: auto;
}
.rpm-dropdown-row::after {
  content: '';
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid var(--ink-muted);
  flex-shrink: 0;
}
.rpm-catalog-rows {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.rpm-cat-row {
  display: grid;
  grid-template-columns: 1fr 40px 40px;
  gap: 8px;
  align-items: center;
}
.rpm-cat-line {
  height: 7px;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--border) 0%, rgba(0, 0, 0, 0.06) 100%);
}
.rpm-cat-line--short { max-width: 72%; }
.rpm-cat-box {
  height: 22px;
  border-radius: 4px;
  border: 1px dashed var(--border);
  background: rgba(0, 0, 0, 0.02);
}
.rpm-source-cards {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.rpm-source-card {
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 8px 10px;
  background: rgba(0, 0, 0, 0.02);
}
.rpm-source-title {
  height: 7px;
  width: min(72%, 200px);
  border-radius: 3px;
  background: var(--ink-muted);
  opacity: 0.35;
  margin-bottom: 8px;
}
.rpm-source-snippet {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.rpm-snip-line {
  height: 5px;
  border-radius: 2px;
  background: var(--border);
}
.rpm-snip-line:nth-child(2) { width: 92%; }
.rpm-snip-line:nth-child(3) { width: 68%; }
.rpm-source-more {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-top: 10px;
}
.rpm-admin-hint {
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-muted);
  line-height: 1.45;
  margin: 6px 0 0;
  max-width: min(100%, 300px);
}

/* Shell compare: side panel vs full-page chat */
.shell-compare {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  max-width: var(--prose-max);
  margin-top: 16px;
}
@media (max-width: 640px) {
  .shell-compare { grid-template-columns: 1fr; }
}
.shell-mock {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  overflow: hidden;
  font-size: 12px;
  color: var(--ink-muted);
}
.shell-mock-cap {
  padding: 8px 10px;
  background: rgba(0, 0, 0, 0.04);
  border-bottom: 1px solid var(--border);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 11px;
}
.shell-mock-body { padding: 10px; min-height: 112px; }
.shell-side-inner {
  display: grid;
  grid-template-columns: 1fr minmax(96px, 34%);
  gap: 8px;
  align-items: stretch;
  min-height: 92px;
}
.shell-main-col {
  border: 1px dashed var(--border);
  border-radius: 4px;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.shell-panel-col {
  border: 1px dashed var(--accent);
  border-radius: 4px;
  padding: 6px;
  background: rgba(0, 0, 0, 0.02);
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.shell-full-inner {
  border: 1px dashed var(--accent);
  border-radius: 4px;
  min-height: 92px;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.shell-mini-bar {
  height: 5px;
  border-radius: 2px;
  background: var(--border);
}
.shell-mini-bar:nth-child(2) { width: 88%; }
.shell-mini-bar:nth-child(3) { width: 62%; }
.shell-chat-chrome {
  height: 22px;
  border-radius: 4px;
  background: var(--accent-light);
  opacity: 0.45;
  margin-top: 2px;
}
.shell-col-label {
  display: block;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: 6px;
}
.shell-full-inner .shell-chat-chrome {
  flex: 1;
  min-height: 36px;
  margin-top: 4px;
}

.philosophy-grid.four-up {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
@media (max-width: 720px) {
  .philosophy-grid.four-up { grid-template-columns: 1fr; }
}
@media (max-width: 899px) {
  .cs-gallery:not(.cs-gallery-phone) {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .cs-gallery-full {
    grid-column: auto;
  }
  .cs-gallery-phone .cs-figure {
    width: clamp(180px, 62vw, 240px);
  }
}

/* Purchase + Inventory case studies: no faux-bold in body copy (class on <body>) */
/* Inventory case study — highlighted closing chapter (design system + Cursor) */
.cs-cursor-chapter {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: clamp(22px, 3vw, 32px) clamp(20px, 3vw, 28px) clamp(8px, 2vw, 12px);
  margin-bottom: 28px;
  background: linear-gradient(165deg, var(--accent-light) 0%, var(--bg-card) 42%);
  box-shadow: var(--shadow-sm);
}
.cs-cursor-chapter .block-label {
  color: var(--accent);
  margin-bottom: 10px;
}
.cs-cursor-chapter > h3 {
  margin-top: 0;
  margin-bottom: 14px;
  font-size: clamp(20px, 2.2vw, 24px);
}

/* Inventory — tool / collaboration strip (Cursor, Figma MCP, hub, design+eng) */
.cs-collab-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 0 0 20px;
  align-items: stretch;
}
.cs-collab-tile {
  display: grid;
  grid-template-rows: 64px auto;
  justify-items: center;
  align-content: start;
  gap: 10px;
  padding: 14px 10px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid var(--border);
  min-height: 0;
  text-align: center;
}
.cs-collab-tile > .cs-collab-tile-top:first-child,
.cs-collab-tile > .cs-collab-ds-visual:first-child {
  width: 100%;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  justify-self: stretch;
}
.cs-collab-tile > img.cs-collab-brand:first-child,
.cs-collab-tile > svg.cs-collab-brand:first-child {
  display: block;
  width: 40px;
  height: 40px;
  max-width: 40px;
  max-height: 40px;
  object-fit: contain;
  place-self: center;
  box-sizing: border-box;
}
.cs-collab-brand {
  width: 40px;
  height: 40px;
  object-fit: contain;
  flex-shrink: 0;
  color: var(--ink);
}
svg.cs-collab-brand {
  display: block;
  flex-shrink: 0;
}
.cs-collab-tile-top {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 64px;
}
.cs-collab-badge {
  position: absolute;
  top: -2px;
  left: calc(50% + 14px);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.06em;
  padding: 3px 5px;
  border-radius: 4px;
  background: var(--accent);
  color: #fff;
  line-height: 1;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}
.cs-collab-text {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  min-width: 0;
  width: 100%;
}
.cs-collab-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.25;
}
.cs-collab-sub {
  font-size: 11px;
  font-weight: 500;
  color: var(--ink-secondary);
  line-height: 1.35;
}
.cs-collab-tile--ds .cs-collab-ds-visual {
  position: relative;
  width: 102px;
  max-width: 100%;
  height: 64px;
  flex-shrink: 0;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg-card);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}
.cs-collab-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  display: block;
}
.cs-collab-ds-icon {
  position: absolute;
  bottom: 4px;
  right: 4px;
  width: 26px;
  height: 26px;
  padding: 3px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
  box-sizing: border-box;
  display: block;
}
svg.cs-collab-ds-icon {
  overflow: visible;
}
@media (max-width: 640px) {
  .cs-collab-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* ─── LIVE DEMO — interactive practice-app embed ─── */
.cs-live-demo {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: clamp(24px, 3vw, 32px);
  margin: 8px 0 32px;
  background: var(--bg-card);
  box-shadow: var(--shadow-sm);
}
.cs-live-demo-intro {
  text-align: center;
  max-width: 36rem;
  margin: 0 auto 24px;
}
.cs-live-demo-intro .block-label {
  margin-bottom: 8px;
}
.cs-live-demo-intro h4 {
  margin: 0 0 8px;
  font-size: clamp(20px, 2.2vw, 24px);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.cs-live-demo-hint {
  margin: 0;
  font-size: clamp(14px, 1vw + 13px, 15px);
  color: var(--ink-secondary);
  line-height: 1.55;
  text-wrap: pretty;
}
.cs-live-demo-playground {
  max-width: 380px;
  margin: 0 auto;
}
.cs-live-demo-jump {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 16px;
}
.cs-jump-btn {
  appearance: none;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--ink-secondary);
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  padding: 11px 14px;
  border-radius: 10px;
  cursor: pointer;
  transition: background var(--transition), color var(--transition), border-color var(--transition), box-shadow var(--transition);
  text-align: center;
}
.cs-jump-btn:hover {
  color: var(--ink);
  border-color: var(--ink-muted);
  background: var(--bg-card);
}
.cs-jump-btn.is-active {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
  box-shadow: 0 2px 10px rgba(24, 24, 27, 0.18);
}
.cs-phone-frame {
  margin: 0 auto;
  width: 100%;
  aspect-ratio: 9 / 19.5;
  background: #1a1a1a;
  border-radius: 36px;
  padding: 14px 10px 10px;
  box-shadow:
    0 24px 48px -16px rgba(0, 0, 0, 0.35),
    inset 0 0 0 1px rgba(255, 255, 255, 0.06);
  position: relative;
}
.cs-phone-frame::before {
  content: "";
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: 72px;
  height: 18px;
  background: #1a1a1a;
  border-radius: 100px;
  z-index: 2;
}
.cs-phone-frame iframe {
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 26px;
  background: #fff;
  display: block;
}
.cs-live-demo-foot {
  margin: 18px 0 0;
  text-align: center;
  font-size: 13px;
  color: var(--ink-secondary);
  line-height: 1.5;
}
.cs-live-demo-foot a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
}
.cs-live-demo-foot a:hover { text-decoration: underline; }

@media (max-width: 720px) {
  .cs-live-demo-playground {
    max-width: min(100%, 320px);
  }
  .cs-phone-frame {
    border-radius: 30px;
    padding: 12px 8px 8px;
  }
  .cs-phone-frame iframe { border-radius: 22px; }
  .cs-phone-frame::before { width: 60px; height: 14px; }
  .cs-jump-btn { font-size: 12px; padding: 10px 10px; }
}

/* Evidence slot — demoted live demo (staff portfolio) */
.cs-live-demo--evidence {
  padding: clamp(20px, 2.5vw, 28px);
  margin-top: 8px;
  background: var(--bg);
  box-shadow: none;
}
.cs-live-demo--evidence .cs-live-demo-intro {
  margin-bottom: 18px;
}
.cs-live-demo--evidence .cs-live-demo-hint {
  font-size: 14px;
}
.cs-live-demo--evidence .cs-live-demo-playground {
  max-width: 300px;
}
.cs-live-demo--evidence .cs-phone-frame {
  border-radius: 32px;
  padding: 12px 8px 8px;
  box-shadow: 0 16px 36px -14px rgba(0, 0, 0, 0.28);
}
.cs-live-demo--evidence .cs-live-demo-foot {
  margin-top: 14px;
  font-size: 12px;
}

/* Platform bet diagram (single-lane) */
.cs-system-flow {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: clamp(20px, 3vw, 32px);
  margin: 8px 0 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.cs-system-flow .cs-loop-track {
  min-width: min(100%, 720px);
}
.cs-system-flow .cs-loop-node {
  min-width: 108px;
  padding: 10px 12px;
}
.cs-system-flow .cs-loop-node-text {
  font-size: 12px;
}

/* Staff proof — highlight panels */
.cs-highlights .block-label {
  text-align: center;
  margin-bottom: 10px;
}
.cs-highlights .cs-highlights-title {
  font-size: clamp(22px, 3vw, 32px);
  margin-bottom: 12px;
}

.cs-highlights-lede {
  text-align: center;
  max-width: min(52ch, 100%);
  margin: 0 auto 28px;
  font-size: clamp(14px, 0.4vw + 13px, 16px);
  line-height: 1.58;
  color: var(--ink-secondary);
}

.cs-highlight-visual--strip {
  display: flex;
  flex-direction: column;
  gap: clamp(14px, 2vw, 20px);
  border: none;
  background: transparent;
  overflow: visible;
}

.cs-highlight-visual--strip-row {
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: flex-start;
  gap: clamp(12px, 2vw, 20px);
}

.cs-highlight-visual--strip-row .cs-highlight-strip {
  flex: 1 1 0;
  min-width: 0;
}

.cs-highlight-visual--strip-stack .cs-highlight-strip {
  width: 100%;
}

.cs-highlight-visual--strip-stack .cs-highlight-strip img {
  width: 100%;
  max-width: 100%;
}

.cs-highlight-strip-label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin: 0 0 6px;
}

.cs-highlight-strip img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  aspect-ratio: auto;
  object-fit: contain;
  object-position: top center;
}

@media (max-width: 640px) {
  .cs-highlight-visual--strip-row {
    flex-direction: column;
  }
}

.cs-highlight-visual--pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  border: none;
  background: transparent;
  overflow: visible;
}

.cs-highlight-visual--pair figure {
  margin: 0;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg);
}
.cs-highlight-visual--pair figcaption {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-muted);
  padding: 6px 8px;
  text-align: center;
  border-top: 1px solid var(--border);
  background: var(--bg-card);
}
.cs-highlight-visual--pair img {
  width: 100%;
  height: auto;
  aspect-ratio: auto;
  object-fit: contain;
  object-position: center;
  display: block;
}
@media (max-width: 720px) {
  .cs-highlight-visual--pair {
    grid-template-columns: 1fr 1fr;
    gap: 6px;
  }
}

body.cs-plain-prose strong {
  font-weight: 400 !important;
  color: inherit;
}
body.cs-plain-prose .case-study .callout p {
  font-weight: 400 !important;
}

/* ─── FOOTER — Sana Learn band (#efefed), site token colors ─── */
footer {
  background: #efefed;
  color: var(--ink-secondary);
  padding: clamp(56px, 9vw, 80px) 0;
  text-align: center;
  width: 100%;
}
footer .footer-inner {
  max-width: calc(var(--max-w) + 80px);
  margin-inline: auto;
  padding-inline: var(--page-pad);
  width: 100%;
  box-sizing: border-box;
}
footer h2 {
  font-family: 'Roboto', sans-serif;
  font-size: clamp(30px, 5.5vw, 44px);
  font-weight: 700;
  font-style: normal;
  color: var(--ink);
  margin-bottom: 12px;
  max-width: 100%;
  letter-spacing: -0.04em;
}
footer p {
  font-size: clamp(14px, 1.2vw + 13px, 15px);
  margin-bottom: 32px;
  max-width: min(36rem, 100%);
  margin-left: auto;
  margin-right: auto;
  color: var(--ink-secondary);
}
footer .footer-inline-links {
  margin: -8px auto 28px;
  font-size: 14px;
  color: var(--ink-muted);
  max-width: min(36rem, 100%);
}
footer .footer-inline-links a {
  display: inline;
  background: transparent;
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 3px;
  padding: 0 8px;
  border-radius: 0;
  font-weight: 500;
  font-size: 14px;
  transition: color var(--transition);
}
footer .footer-inline-links a:hover {
  color: var(--accent);
  transform: none;
}
.footer-cta-row {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  max-width: min(22rem, 100%);
  margin: 0 auto;
}
footer a.footer-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
}
/* Standalone CTA in footer (case studies): centered, same max width as home row */
footer > a.footer-cta,
footer .footer-inner > a.footer-cta {
  display: flex;
  justify-content: center;
  margin: 0 auto;
  max-width: min(22rem, 100%);
  width: 100%;
  box-sizing: border-box;
}
footer a.footer-cta:hover { transform: translateY(-1px); }
.footer-cta-row > a.footer-cta,
.footer-cta-row > a.footer-cta.footer-cta--secondary {
  align-self: stretch;
  justify-content: center;
}
footer a.footer-cta--secondary img {
  filter: none;
  opacity: 0.9;
  width: 16px;
  height: 16px;
  transform-origin: bottom center;
  transition: opacity var(--transition);
}
footer a.footer-cta--secondary:hover img { opacity: 1; }
@keyframes tutu-wag {
  0%   { transform: rotate(0deg); }
  20%  { transform: rotate(-14deg); }
  50%  { transform: rotate(12deg); }
  75%  { transform: rotate(-8deg); }
  100% { transform: rotate(0deg); }
}
@media (prefers-reduced-motion: no-preference) {
  footer a.footer-cta--secondary:hover img { animation: tutu-wag 0.55s cubic-bezier(0.22, 1, 0.36, 1) forwards; }
}
.footer-note {
  font-size: 12px;
  margin-top: 36px;
  line-height: 1.5;
  color: var(--ink-muted);
}

/* ─── HERO IMAGE ─── */
.cs-hero-image {
  margin: 0 0 36px;
}
.cs-hero-composed {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  border-radius: var(--radius);
  overflow: hidden;
}
.cs-hero-panel {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}
.cs-hero-panel img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}
.cs-hero-panel figcaption {
  font-size: 12.5px;
  color: var(--ink-secondary);
  line-height: 1.5;
  padding: 0 2px;
}
@media (max-width: 640px) {
  .cs-hero-composed {
    grid-template-columns: 1fr;
  }
}

/* ─── PLACEHOLDER ELEMENTS (annotated) ─── */
.cs-placeholder-annotated {
  width: 100%;
  min-height: 160px;
  background: var(--bg-card);
  border: 2px dashed var(--border);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px 24px;
  margin: 12px 0 20px;
}
.cs-placeholder-label,
.cs-hero-placeholder-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-muted);
  text-align: center;
  line-height: 1.6;
  font-style: italic;
}
.cs-figure--annotated {
  border: 1px dashed var(--border);
  border-radius: var(--radius-sm);
  padding: 12px;
  background: var(--bg-card);
}

/* ─── SYSTEM LOOP DIAGRAM ─── */
.cs-loop-diagram {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: clamp(24px, 4vw, 32px);
  margin: 12px 0 32px;
}
.cs-loop-kicker {
  margin: 0 0 20px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--accent);
}
.cs-loop-phases {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 12px;
  align-items: stretch;
}
.cs-loop-phase {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px 16px;
}
.cs-loop-phase--admin {
  border-top: 3px solid var(--accent);
}
.cs-loop-phase--user {
  border-top: 3px solid var(--accent-green);
}
.cs-loop-phase--feedback {
  border-top: 3px dashed var(--accent-green);
  background: linear-gradient(180deg, rgba(22, 163, 74, 0.04) 0%, var(--bg) 42%);
}
.cs-loop-phase-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.cs-loop-phase-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--accent-light);
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
  flex-shrink: 0;
}
.cs-loop-phase--user .cs-loop-phase-num {
  background: rgba(22, 163, 74, 0.12);
  color: var(--accent-green);
}
.cs-loop-phase--feedback .cs-loop-phase-num {
  background: rgba(22, 163, 74, 0.12);
  color: var(--accent-green);
}
.cs-loop-phase-title {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.3;
}
.cs-loop-phase-sub {
  margin: 4px 0 0;
  font-size: 13px;
  line-height: 1.45;
  color: var(--ink-muted);
}
.cs-loop-phase-steps {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.cs-loop-phase-steps li {
  position: relative;
  padding-left: 18px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--ink-secondary);
}
.cs-loop-phase-steps li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.35;
  transform: translateY(-50%);
}
.cs-loop-phase--admin .cs-loop-phase-steps li::before { color: var(--accent); opacity: 1; }
.cs-loop-phase--user .cs-loop-phase-steps li::before { color: var(--accent-green); opacity: 1; }
.cs-loop-phase-note {
  margin: 0;
  font-size: 14px;
  line-height: 1.55;
  color: var(--ink-secondary);
}
.cs-loop-phase-return {
  margin: auto 0 0;
  font-size: 12px;
  font-weight: 600;
  color: var(--accent-green);
  letter-spacing: .02em;
}
.cs-loop-phase-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  align-self: center;
  width: 24px;
  flex-shrink: 0;
}
.cs-loop-phase-arrow-icon {
  display: block;
  width: 20px;
  height: 1px;
  background: var(--border);
  position: relative;
}
.cs-loop-phase-arrow-icon::after {
  content: "";
  position: absolute;
  right: -1px;
  top: 50%;
  transform: translateY(-50%);
  border-left: 5px solid var(--border);
  border-top: 4px solid transparent;
  border-bottom: 4px solid transparent;
}
.cs-loop-recap {
  margin: 20px 0 0;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  font-size: 14px;
  line-height: 1.55;
  color: var(--ink-secondary);
}
.cs-loop-recap-label {
  font-weight: 700;
  color: var(--ink);
}

/* Outcomes — two-column loop panel */
.cs-loop-phases--duo {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.cs-loop-phase--shipped {
  border-top: 3px solid var(--accent-green);
}

.cs-loop-phase--shipped .cs-loop-phase-num {
  background: rgba(22, 163, 74, 0.12);
  color: var(--accent-green);
}

.cs-loop-phase--shipped .cs-loop-phase-steps li::before {
  color: var(--accent-green);
  opacity: 1;
}

.cs-loop-phase--reflection {
  border-top: 3px dashed var(--accent);
  background: linear-gradient(180deg, rgba(0, 82, 204, 0.04) 0%, var(--bg) 42%);
}

.cs-loop-phase--reflection .cs-loop-phase-num {
  background: var(--accent-light);
  color: var(--accent);
}

.cs-loop-pullquote {
  margin: 0;
  font-size: clamp(15px, 1.2vw, 16px);
  font-weight: 500;
  line-height: 1.5;
  color: var(--ink);
  letter-spacing: -0.01em;
}

@media (max-width: 820px) {
  .cs-loop-phases--duo {
    grid-template-columns: 1fr;
  }
}

/* Legacy loop track (cs-system-flow) */
.cs-loop-track {
  display: flex;
  align-items: center;
  gap: 0;
}
.cs-loop-lane-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--ink-muted);
  min-width: 44px;
  flex-shrink: 0;
  padding-right: 12px;
}
.cs-loop-nodes {
  display: flex;
  align-items: center;
  gap: 0;
  flex: 1;
}
.cs-loop-node {
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 16px;
  min-width: 120px;
  flex-shrink: 0;
}
.cs-loop-node-text {
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-secondary);
  line-height: 1.35;
}

@media (max-width: 900px) {
  .cs-loop-phases {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .cs-loop-phase-arrow {
    width: auto;
    height: 28px;
    padding: 4px 0;
  }
  .cs-loop-phase-arrow-icon {
    width: 1px;
    height: 20px;
  }
  .cs-loop-phase-arrow-icon::after {
    right: auto;
    left: 50%;
    top: auto;
    bottom: -1px;
    transform: translateX(-50%);
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 5px solid var(--border);
    border-bottom: 0;
  }
}

/* ─── SNAPSHOT CTA ─── */
.cs-snapshot-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}

/* ─── CHAPTER HEADINGS ─── */
.cs-chapter-heading {
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 16px;
  row-gap: 4px;
  align-items: baseline;
  margin: 88px 0 32px;
  padding-bottom: 16px;
  border-bottom: 2px solid var(--ink);
}
.cs-chapter-num {
  grid-column: 1;
  grid-row: 1;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .10em;
  text-transform: uppercase;
  color: var(--ink-muted);
}
.cs-chapter-heading h3 {
  grid-column: 2;
  grid-row: 1;
  font-size: clamp(17px, 1.6vw + 14px, 22px);
  font-weight: 700;
  color: var(--ink);
  margin: 0;
  line-height: 1.2;
}
.cs-chapter-sub {
  grid-column: 2;
  grid-row: 2;
  font-size: 13px;
  color: var(--ink-secondary);
  margin: 0;
  font-weight: 400;
  line-height: 1.5;
}

/* Tighter rhythm: header → snapshot → first chapter */
.cs-header:has(+ .cs-snapshot) {
  margin-bottom: 48px;
}
.cs-snapshot + .cs-chapter-heading {
  margin-top: 56px;
}

/* Blocks followed by galleries, tables, or comparison grids */
.block:has(+ .cs-gallery) {
  margin-bottom: 24px;
}
.block + .cs-gallery {
  margin-top: 0;
  margin-bottom: 56px;
}
.block:has(+ .solution-table),
.block:has(+ .solution-table-wrap),
.block:has(+ .comparison-grid) {
  margin-bottom: 16px;
}
.block:has(+ .insight-list) {
  margin-bottom: 20px;
}

/* Closing CTAs after reflection */
.reflection-block:has(+ .cs-ending) {
  margin-bottom: 48px;
}
.cs-ending {
  margin-top: 0;
}

/* ─── 30-SECOND SNAPSHOT ─── */
.cs-snapshot {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: clamp(24px, 4vw, 40px);
  margin: 0 0 40px;
  background: var(--bg-card);
  box-shadow: var(--shadow-sm);
}
.cs-snapshot > .block-label {
  margin-bottom: 20px;
  color: var(--accent);
}

.cs-snapshot-beats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px 32px;
  margin-bottom: 28px;
}
.cs-snapshot-beat {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  min-width: 0;
}
.cs-snapshot-beat > div {
  min-width: 0;
  flex: 1;
}
.cs-snapshot-num {
  flex-shrink: 0;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .07em;
  color: var(--ink-muted);
  padding-top: 3px;
  min-width: 20px;
}
.cs-snapshot-beat strong {
  display: block;
  font-size: clamp(13px, 1vw + 12px, 14px);
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 5px;
  line-height: 1.3;
}
.cs-snapshot-beat p {
  font-size: clamp(13px, 0.8vw + 12px, 14px);
  color: var(--ink-secondary);
  line-height: 1.6;
  margin: 0;
  overflow-wrap: break-word;
  word-wrap: break-word;
  hyphens: none;
  text-wrap: pretty;
}
.cs-snapshot-gallery {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 28px;
}
.cs-snapshot-gallery--single {
  grid-template-columns: 1fr;
}

.cs-thread-stack {
  display: flex;
  flex-direction: column;
  gap: clamp(16px, 2.2vw, 24px);
  margin-top: 24px;
}

.cs-progress {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(16px, 2.2vw, 24px);
  margin: 24px 0 0;
  padding: 0;
  align-items: stretch;
}

.cs-progress > li {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.cs-progress__meta {
  display: block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin: 0 0 8px;
}

@media (max-width: 640px) {
  .cs-progress,
  .cs-progress--fit {
    grid-template-columns: 1fr;
  }
}

.cs-thread-stack .cs-figure {
  width: 100%;
  max-width: 100%;
  margin: 0;
  aspect-ratio: 16 / 10;
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  background: var(--bg-card, #fff);
  border: 1px solid var(--border);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08), 0 1px 3px rgba(0, 0, 0, 0.05);
}

.cs-progress .cs-figure {
  width: 100%;
  max-width: 100%;
  margin: 0;
  aspect-ratio: 16 / 10;
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  background: var(--bg, #f4f4f5);
  border: 1px solid var(--border);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08), 0 1px 3px rgba(0, 0, 0, 0.05);
}

.cs-thread-stack .cs-figure img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}

.cs-progress .cs-figure img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center center;
}

/* Size columns by each still's native aspect so both show full, at matching
   height, without cover. Set --prev-ar / --now-ar (width ÷ height) per row. */
.cs-progress--fit {
  --prev-ar: 1fr;
  --now-ar: 1fr;
  grid-template-columns: minmax(0, var(--prev-ar)) minmax(0, var(--now-ar));
  align-items: start;
}

.cs-progress--fit .cs-figure {
  aspect-ratio: auto;
  position: static;
  background: var(--bg-card, #fff);
}

.cs-progress--fit .cs-figure img {
  position: static;
  inset: auto;
  width: 100%;
  height: auto;
  object-fit: unset;
}
.cs-snapshot-gallery .cs-figure {
  overflow: hidden;
  border-radius: 6px;
}
.cs-snapshot-gallery .cs-figure img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  object-position: center top;
}

/* Lift stills off the gray card with shadow — no mat or hairline. */
body.cs-m3-docs-page .cs-snapshot-gallery .cs-figure,
body.cs-m3-docs-page .cs-system-path .cs-figure {
  background: transparent;
  padding: 0;
  border: none;
  box-shadow: 0 1px 2px rgba(15, 15, 15, 0.04), 0 8px 24px rgba(15, 15, 15, 0.08);
}
body.cs-m3-docs-page .cs-snapshot-gallery .cs-figure img,
body.cs-m3-docs-page .cs-system-path .cs-figure img {
  border-radius: 12px;
}
.cs-snapshot-proof {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 28px;
  max-width: 536px;
  margin-left: auto;
  margin-right: auto;
}
.cs-snapshot-proof .cs-figure {
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.cs-snapshot-proof .cs-figure img {
  width: 100%;
  max-width: 100%;
  height: auto;
  display: block;
}
.cs-snapshot-proof__item {
  margin: 0;
  overflow: hidden;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg, #fafafa);
}
.cs-snapshot-proof__item img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  object-position: center top;
}
.cs-snapshot-proof__item--phone img {
  aspect-ratio: 9 / 16;
}
.cs-snapshot-proof__item figcaption {
  padding: 10px 12px;
  font-size: 12px;
  line-height: 1.45;
  color: var(--ink-secondary);
  border-top: 1px solid var(--border);
}
.cs-snapshot-proof {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 28px;
  max-width: 536px;
  margin-left: auto;
  margin-right: auto;
}
.cs-snapshot-proof .cs-figure {
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.cs-snapshot-proof .cs-figure img {
  width: 100%;
  max-width: 100%;
  height: auto;
  display: block;
}
.cs-snapshot-proof__item {
  margin: 0;
  overflow: hidden;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg, #fafafa);
}
.cs-snapshot-proof__item img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  object-position: center top;
}
.cs-snapshot-proof__item--phone img {
  aspect-ratio: 9 / 16;
}
.cs-snapshot-proof__item figcaption {
  padding: 10px 12px;
  font-size: 12px;
  line-height: 1.45;
  color: var(--ink-secondary);
  border-top: 1px solid var(--border);
}
.cs-snapshot-cta {
  display: flex;
  justify-content: center;
}
.cs-expand-btn {
  letter-spacing: .01em;
  box-shadow: none;
}
.cs-expand-btn:active {
  box-shadow: none;
}
@media (max-width: 840px) {
  .cs-snapshot-beats {
    grid-template-columns: 1fr;
    gap: 18px;
  }
}
@media (max-width: 640px) {
  .cs-snapshot-beats {
    gap: 16px;
  }
  .cs-snapshot-gallery {
    grid-template-columns: 1fr;
  }
  .cs-snapshot-proof {
    grid-template-columns: 1fr;
  }
}

/* ─── RESPONSIVE ─── */
@media (max-width: 900px) {
  .index-grid { grid-template-columns: 1fr; }
  .index-grid__col { display: contents; }
  .index-card.wide { grid-column: span 1; }
  .index-card--intake { order: 1; }
  .index-card--purchase { order: 2; }
  .index-card--inventory { order: 3; }
  .index-card--orchestration { order: 4; }
}

@media (max-width: 720px) {
  .nav-links { gap: 12px; }
  .nav-links a { font-size: 13px; }
  .nav-links a.nav-resume { padding: 6px 10px; font-size: 12px; }
  .hero { padding-top: clamp(32px, 10vw, 48px); padding-bottom: clamp(28px, 8vw, 44px); }
  .comparison-grid { grid-template-columns: 1fr; }
  .focus-grid { grid-template-columns: 1fr; }
  .solution-table { font-size: 13px; }
  .solution-table th, .solution-table td { padding: 10px 12px; }
  .solution-table--pr { min-width: 480px; }
  .kh-card p { overflow-wrap: break-word; word-wrap: break-word; }
  .philosophy-grid { grid-template-columns: 1fr; }
  .cs-meta-strip { flex-direction: column; }
  .cs-meta-item { border-right: none; border-bottom: 1px solid var(--border); }
  .cs-meta-item:last-child { border-bottom: none; }
  .my-role-block { flex-direction: column; }
  .more-story { flex-direction: column; align-items: stretch; }
  .more-story-actions { justify-content: flex-start; width: 100%; }
  .case-study.standalone { padding-top: 36px; }
  .quote-mark { font-size: clamp(48px, 14vw, 72px); left: clamp(20px, 4vw, 36px); }
}

/* ─── APPLE-INSPIRED CASE STUDY LAYOUT ─── */
.cs-apple-layout .cs-header {
  margin-bottom: 0;
  text-align: center;
}
.cs-apple-layout .cs-header-brand {
  justify-content: center;
  margin-bottom: 20px;
}
.cs-apple-layout .cs-header h2 {
  font-size: clamp(36px, 6vw, 56px);
  letter-spacing: -0.03em;
  margin-bottom: 12px;
}
.cs-hero-tagline {
  font-family: 'Roboto', sans-serif;
  font-size: clamp(20px, 2.5vw, 28px);
  font-weight: 400;
  font-style: italic;
  color: var(--ink-secondary);
  max-width: min(42ch, 92%);
  margin: 0 auto 32px;
  line-height: 1.4;
  overflow-wrap: break-word;
  hyphens: none;
  text-wrap: pretty;
}
.cs-hero-gallery {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(12px, 2vw, 20px);
  max-width: 920px;
  margin: 0 auto 28px;
}
.cs-hero-gallery .cs-figure {
  margin: 0;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
}
.cs-hero-gallery .cs-figure img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  object-position: center top;
}
.cs-hero-gallery figcaption {
  padding: 10px 14px;
  font-size: 12px;
  color: var(--ink-secondary);
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  overflow-wrap: break-word;
}
.cs-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin-bottom: 36px;
}
.cs-apple-layout .cs-hero-facts {
  max-width: 920px;
  margin: 0 auto 28px;
}
.cs-apple-layout .cs-header-meta,
.cs-apple-layout .cs-hero-facts-tags {
  justify-content: center;
}
.cs-apple-layout .cs-meta-strip {
  max-width: none;
  margin: 0;
}

/* Sticky subnav */
.cs-subnav-wrap {
  position: sticky;
  top: 60px;
  z-index: 90;
  padding: 8px var(--page-pad) 20px;
  margin: 0 calc(-1 * var(--page-pad)) 4px;
}
.cs-subnav-inner {
  max-width: 960px;
  margin: 0 auto;
}
.cs-subnav {
  display: flex;
  justify-content: safe center;
  gap: 2px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding: 4px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(24, 24, 27, 0.06);
}
.cs-subnav::-webkit-scrollbar { display: none; }
.cs-subnav a {
  flex-shrink: 0;
  padding: 9px 14px;
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-secondary);
  text-decoration: none;
  border-radius: 8px;
  white-space: nowrap;
  letter-spacing: 0.01em;
  transition: color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}
.cs-subnav a:hover {
  color: var(--ink);
  background: rgba(24, 24, 27, 0.05);
}
.cs-subnav a.is-active {
  color: var(--ink);
  font-weight: 600;
  background: rgba(26, 86, 219, 0.07);
  box-shadow: inset 0 0 0 1px rgba(26, 86, 219, 0.14);
}
.cs-subnav a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.cs-apple-layout .cs-snapshot,
.cs-apple-layout .cs-chapter-section,
.cs-apple-layout .cs-appendix {
  scroll-margin-top: 128px;
}

/* Highlights — Apple "Get the highlights" */
.cs-highlights {
  padding: 56px 0 48px;
  max-width: 960px;
  margin: 0 auto;
}
.cs-highlights-title {
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 700;
  letter-spacing: -0.025em;
  text-align: center;
  margin: 0 0 28px;
  color: var(--ink);
}
.cs-highlight-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-bottom: 32px;
}
.cs-highlight-pill {
  appearance: none;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--ink-secondary);
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  padding: 9px 16px;
  border-radius: 100px;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}
.cs-highlight-pill:hover {
  border-color: var(--ink-muted);
  color: var(--ink);
}
.cs-highlight-pill.is-active {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
  box-shadow: 0 4px 14px rgba(24, 24, 27, 0.15);
}
.cs-highlight-stage {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(20px, 3vw, 36px);
  align-items: center;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: clamp(20px, 3vw, 32px);
  box-shadow: var(--shadow-sm);
  min-height: 280px;
}
.cs-highlight-panel {
  display: none;
  grid-column: 1 / -1;
  grid-template-columns: subgrid;
  align-items: center;
  gap: inherit;
}
.cs-highlight-panel.is-active {
  display: grid;
  align-items: start;
}
.cs-highlight-copy h4 {
  font-size: clamp(20px, 2.2vw, 26px);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 12px;
  color: var(--ink);
  line-height: 1.25;
}
.cs-highlight-copy p {
  font-size: clamp(15px, 1vw + 14px, 17px);
  color: var(--ink-secondary);
  line-height: 1.65;
  margin: 0 0 16px;
  overflow-wrap: break-word;
}
.cs-highlight-link {
  font-size: 14px;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
}
.cs-highlight-link:hover { text-decoration: underline; }
.cs-highlight-visual {
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg);
}
.cs-highlight-visual img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  object-position: center top;
}

/* Chapter sections — Apple section rhythm */
.cs-apple-layout .cs-chapter-heading {
  display: block;
  text-align: center;
  margin: clamp(80px, 10vw, 108px) 0 52px;
  padding-bottom: 0;
  border-bottom: none;
}
.cs-apple-layout .cs-chapter-num {
  display: block;
  margin-bottom: 10px;
}
.cs-apple-layout .cs-chapter-heading h3 {
  font-size: clamp(32px, 4.5vw, 48px);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.08;
}
.cs-apple-layout .cs-chapter-sub {
  font-size: clamp(15px, 1.4vw, 18px);
  color: var(--ink-secondary);
  margin-top: 14px;
  max-width: min(44ch, 92%);
  margin-left: auto;
  margin-right: auto;
  line-height: 1.55;
}

/* Appendix band */
.cs-appendix {
  margin-top: clamp(72px, 10vw, 100px);
  padding-top: 48px;
  border-top: 1px solid var(--border);
}
.cs-appendix-title {
  font-size: clamp(22px, 3vw, 28px);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 8px;
  color: var(--ink);
}
.cs-appendix-sub {
  font-size: 15px;
  color: var(--ink-secondary);
  margin: 0 0 40px;
  max-width: var(--prose-max);
}

/* ─── CASE STUDY READABILITY (apple layout rhythm) ─── */
.cs-apple-layout .cs-subnav-wrap + .cs-snapshot {
  margin-top: 12px;
}
.cs-apple-layout .cs-snapshot {
  margin-bottom: 0;
}
.cs-apple-layout .cs-snapshot + .cs-chapter-heading {
  margin-top: clamp(80px, 10vw, 108px);
}
.cs-apple-layout .block {
  margin-bottom: clamp(44px, 5.5vw, 56px);
}
.cs-apple-layout .block-label {
  margin-bottom: 14px;
}
.cs-apple-layout .block h3 {
  margin-bottom: 14px;
  line-height: 1.35;
}
.cs-apple-layout .block p + p {
  margin-top: 14px;
}
.cs-apple-layout .insight-list,
.cs-apple-layout .cs-gallery:not(.cs-gallery-phone),
.cs-apple-layout .comparison-grid,
.cs-apple-layout .callout,
.cs-apple-layout .quote-block,
.cs-apple-layout .my-role-block,
.cs-apple-layout .cs-cursor-chapter,
.cs-apple-layout .cs-design-code,
.cs-apple-layout .cs-design-code,
.cs-apple-layout .cs-system-flow,
.cs-apple-layout .cs-highlights,
.cs-apple-layout .cs-live-demo,
.cs-apple-layout .kh-grid,
.cs-apple-layout .kh-carousel-block,
.cs-apple-layout .sc-outer,
.cs-apple-layout .cs-loop-diagram,
.cs-apple-layout .cs-outcomes-diagram,
.case-study .solution-table-wrap {
  margin-bottom: clamp(48px, 6vw, 64px);
}
.cs-apple-layout .cs-gallery-phone {
  margin-top: 8px;
  margin-bottom: clamp(48px, 6vw, 64px);
}
.cs-apple-layout .reflection-block {
  margin-top: 8px;
  margin-bottom: clamp(48px, 6vw, 64px);
}
.cs-apple-layout .cs-ending {
  margin-top: clamp(48px, 6vw, 64px);
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.cs-apple-layout .cs-appendix .block:first-of-type {
  margin-top: 12px;
}
.cs-apple-layout .kh-carousel-block {
  margin-top: 12px;
}

@media (max-width: 768px) {
  .cs-hero-gallery { grid-template-columns: 1fr; }
  .cs-highlight-stage,
  .cs-highlight-panel.is-active { grid-template-columns: 1fr; }
  .cs-highlight-visual,
  .cs-highlight-visual--strip { order: -1; }
  .cs-subnav-wrap { top: 60px; padding-top: 10px; padding-bottom: 12px; }
  .cs-subnav a { padding: 8px 12px; font-size: 11px; }
  .cs-apple-layout .cs-snapshot,
  .cs-apple-layout .cs-chapter-section,
  .cs-apple-layout .cs-appendix,
  .cs-apple-layout #staff-proof { scroll-margin-top: 120px; }
}

/* Reserve scrollbar space so open/close doesn't shift the page */
html {
  scrollbar-gutter: stable;
}

/* ─── PASSWORD GATE (auth.js) — soft glass + pill-matched motion ─── */
html.portfolio-locked,
html.portfolio-locked body {
  overflow: hidden !important;
  overscroll-behavior: none;
  touch-action: none;
  height: 100%;
}

/* Keep fixed overlay/chrome aligned when the scrollbar gutter collapses */
html.portfolio-locked .pw-overlay {
  right: var(--pw-scrollbar-gap, 0px);
}

html.portfolio-locked .pw-close {
  right: calc(max(16px, env(safe-area-inset-right, 0px)) + var(--pw-scrollbar-gap, 0px));
}

/* Keep gated pages hidden until the modal is open — prevents content blink */
html.portfolio-gated,
html.portfolio-gated body {
  background: #f9f9f8;
}

html.portfolio-gated body > :not(#pw-overlay) {
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
  user-select: none !important;
  -webkit-user-select: none !important;
}

.pw-overlay {
  /* Match homepage hero pill: 0.32s enter / 0.22s exit */
  --pw-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --pw-in: 0.32s;
  --pw-out: 0.22s;
  position: fixed;
  inset: 0;
  z-index: 99998;
  background: transparent;
  pointer-events: auto;
  touch-action: none;
  overscroll-behavior: none;
  font-family: 'Roboto', var(--md-ref-typeface-plain, -apple-system, BlinkMacSystemFont, sans-serif);
  -webkit-font-smoothing: antialiased;
}

.pw-close {
  position: fixed;
  top: max(16px, env(safe-area-inset-top, 0px));
  right: max(16px, env(safe-area-inset-right, 0px));
  z-index: 100002;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.72);
  color: #37352f;
  font-family: inherit;
  font-size: 24px;
  font-weight: 400;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  opacity: 0;
  box-shadow:
    0 2px 8px rgba(55, 53, 47, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
  -webkit-backdrop-filter: blur(12px) saturate(140%);
  backdrop-filter: blur(12px) saturate(140%);
  transition:
    opacity var(--pw-in) var(--pw-ease),
    background 0.2s ease,
    transform 0.15s ease,
    border-color 0.2s ease;
}

.pw-overlay.is-open .pw-close {
  opacity: 1;
}

.pw-overlay.is-closing .pw-close {
  opacity: 0;
  transition-duration: var(--pw-out);
}

.pw-close:hover {
  background: rgba(255, 255, 255, 0.92);
  border-color: rgba(255, 255, 255, 0.75);
}

.pw-close:active {
  transform: scale(0.96);
}

.pw-close:focus-visible {
  outline: 2px solid #37352f;
  outline-offset: 3px;
}

.pw-backdrop {
  position: absolute;
  inset: 0;
  pointer-events: auto;
  cursor: pointer;
  opacity: 0;
  background:
    radial-gradient(ellipse 90% 70% at 50% 18%, rgba(255, 255, 255, 0.42), transparent 68%),
    radial-gradient(ellipse 55% 45% at 88% 82%, rgba(26, 86, 219, 0.06), transparent 62%),
    radial-gradient(ellipse 48% 40% at 8% 78%, rgba(55, 53, 47, 0.04), transparent 58%),
    rgba(249, 249, 248, 0.32);
  -webkit-backdrop-filter: blur(24px) saturate(140%);
  backdrop-filter: blur(24px) saturate(140%);
  /* Backdrop leads slightly so the card settle reads crisply */
  transition: opacity 0.28s var(--pw-ease);
}

.pw-overlay.is-open .pw-backdrop {
  opacity: 1;
}

.pw-overlay.is-closing .pw-backdrop {
  opacity: 0;
  transition-duration: var(--pw-out);
}

.pw-backdrop-glass-shell {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: auto;
}

.liquid-glass-react-pw-backdrop {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  display: block !important;
}

.liquid-glass-react-pw-backdrop .glass {
  width: 100% !important;
  height: 100% !important;
  min-height: 100% !important;
  padding: 0 !important;
  border-radius: 0 !important;
  overflow: hidden !important;
  box-shadow: none !important;
}

.liquid-glass-react-pw-backdrop .glass__warp {
  border-radius: 0 !important;
}

.pw-backdrop-glass-fill {
  width: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  pointer-events: none;
}

.pw-overlay .pw-input,
.pw-overlay .pw-btn {
  touch-action: manipulation;
}

.pw-panel {
  position: fixed;
  inset: 0;
  margin: auto;
  z-index: 100001;
  width: min(calc(100% - 2 * var(--page-pad)), 440px);
  height: fit-content;
  display: flex;
  justify-content: center;
  padding:
    max(24px, env(safe-area-inset-top, 0px))
    max(20px, env(safe-area-inset-right, 0px))
    max(24px, env(safe-area-inset-bottom, 0px))
    max(20px, env(safe-area-inset-left, 0px));
}

.pw-panel-inner {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  overflow: visible;
  opacity: 0;
  transform: translate3d(0, 0.16em, 0);
  transition:
    opacity var(--pw-in) var(--pw-ease),
    transform var(--pw-in) var(--pw-ease);
  will-change: opacity, transform;
}

/* Same language as .hero-product-pill.is-entering */
.pw-overlay.is-open .pw-panel-inner {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}

.pw-overlay.is-closing .pw-panel-inner {
  opacity: 0;
  transform: translate3d(0, 0.18em, 0);
  transition-duration: var(--pw-out);
}

/* Die-cut stickers — thick white border, scattered like phone case */
.pw-floaters {
  position: absolute;
  inset: -36px -44px -28px;
  pointer-events: none;
  z-index: 3;
}

.pw-sticker {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  --pw-scale: 1;
  transform: rotate(var(--pw-rot, 0deg)) scale(var(--pw-scale));
  filter:
    drop-shadow(0 10px 18px rgba(0, 0, 0, 0.14))
    drop-shadow(0 3px 6px rgba(0, 0, 0, 0.08));
  animation: pw-sticker-float 5s ease-in-out infinite;
  animation-play-state: paused;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}

.pw-overlay.is-open:not(.is-closing) .pw-sticker {
  animation-play-state: running;
}

.pw-sticker img {
  display: block;
  object-fit: contain;
  padding: 11px 12px;
  background: #f9f9f8;
  border-radius: 12px;
  box-shadow: 0 0 0 6px #fff;
}

.pw-sticker--music img {
  width: 64px;
  height: 64px;
  background: linear-gradient(145deg, #fed7aa 0%, #fdba74 48%, #fb923c 100%);
}

.pw-sticker--globe img {
  width: 64px;
  height: 64px;
  background: linear-gradient(145deg, #e0f2fe 0%, #bae6fd 100%);
}

.pw-sticker--shades img {
  width: 76px;
  height: auto;
  padding: 12px 14px;
  background: #f9f9f8;
}

.pw-sticker--corgi img {
  width: 72px;
  height: auto;
  padding: 0;
  background: transparent;
  border-radius: 0;
  box-shadow: none;
  filter: none;
}

.pw-sticker--music {
  top: 4px;
  left: -22px;
  --pw-rot: -14deg;
  animation-delay: 0s;
}

.pw-sticker--globe {
  top: 44%;
  right: -34px;
  --pw-rot: 12deg;
  animation-delay: -1.6s;
}

.pw-sticker--shades {
  bottom: 16%;
  left: -28px;
  --pw-rot: -8deg;
  animation-delay: -3.1s;
}

.pw-sticker--corgi {
  bottom: 6%;
  right: -30px;
  --pw-rot: 11deg;
  animation-delay: -2.3s;
  filter:
    drop-shadow(-4px 0 0 #fff)
    drop-shadow(4px 0 0 #fff)
    drop-shadow(0 -4px 0 #fff)
    drop-shadow(0 4px 0 #fff)
    drop-shadow(-3px -3px 0 #fff)
    drop-shadow(3px -3px 0 #fff)
    drop-shadow(-3px 3px 0 #fff)
    drop-shadow(3px 3px 0 #fff)
    drop-shadow(0 10px 18px rgba(0, 0, 0, 0.14))
    drop-shadow(0 3px 6px rgba(0, 0, 0, 0.08));
}

.pw-sticker--hint {
  position: relative;
  --pw-rot: -4deg;
  padding: 14px 16px 16px;
  background: #fff;
  border-radius: 12px;
  box-shadow:
    0 0 0 6px #fff,
    0 8px 20px rgba(55, 53, 47, 0.08),
    0 2px 6px rgba(55, 53, 47, 0.05);
  transform: rotate(var(--pw-rot));
  animation: pw-sticker-float 6s ease-in-out -0.8s infinite;
  animation-play-state: paused;
}

.pw-sticker--hint::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background:
    radial-gradient(circle at 20% 18%, rgba(0, 0, 0, 0.04), transparent 42%),
    repeating-conic-gradient(rgba(0, 0, 0, 0.018) 0% 25%, transparent 0% 50%);
  background-size: auto, 3px 3px;
  opacity: 0.55;
  pointer-events: none;
  mix-blend-mode: multiply;
}

@keyframes pw-sticker-float {
  0%, 100% {
    transform: rotate(var(--pw-rot, 0deg)) scale(var(--pw-scale, 1)) translate3d(0, 0, 0);
  }
  50% {
    transform: rotate(var(--pw-rot, 0deg)) scale(var(--pw-scale, 1)) translate3d(0, -5px, 0);
  }
}

.pw-glass-card {
  position: relative;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  padding: 32px 32px 32px;
  border-radius: 12px;
  text-align: center;
  overflow: visible;
  background: rgba(249, 249, 248, 0.92);
  border: 1px solid rgba(55, 53, 47, 0.1);
  box-shadow:
    0 1px 2px rgba(55, 53, 47, 0.04),
    0 8px 20px rgba(55, 53, 47, 0.06),
    0 20px 40px rgba(55, 53, 47, 0.07),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
  -webkit-backdrop-filter: blur(40px) saturate(160%);
  backdrop-filter: blur(40px) saturate(160%);
  isolation: isolate;
}

#pw-glass-mount {
  width: 100%;
}

.pw-glass-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(
    165deg,
    rgba(255, 255, 255, 0.55) 0%,
    rgba(255, 255, 255, 0.08) 38%,
    rgba(255, 255, 255, 0) 62%
  );
}

.pw-intro {
  position: relative;
  z-index: 1;
  margin-bottom: 14px;
}

.pw-brand {
  margin: 0;
  font-family: 'Roboto', sans-serif;
  font-size: clamp(28px, 4.5vw + 12px, 40px);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.03em;
  color: #37352f;
}

.pw-lead {
  position: relative;
  z-index: 1;
  margin: 0;
  max-width: 28ch;
  margin-inline: auto;
  font-family: inherit;
  font-size: clamp(15px, 1.1vw + 14px, 17px);
  font-weight: 400;
  line-height: 1.65;
  letter-spacing: -0.01em;
  color: rgba(55, 53, 47, 0.65);
}

.pw-hint {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: center;
  padding: 4px 0;
  margin: 24px 0 4px;
}

.pw-hint-stage {
  position: relative;
  width: 124px;
  height: 126px;
  overflow: visible;
}

/* Miro-style collaborator cursor — matches intake index card */
.pw-cursor {
  --cursor-color: #4262ff;
  --cursor-angle: 0deg;
  --cursor-scale: 1;
  position: absolute;
  z-index: 4;
  pointer-events: none;
  transform: scale(var(--cursor-scale));
  animation: pw-cursor-float 4.8s ease-in-out -0.5s infinite;
}

.pw-cursor__pointer {
  display: block;
  transform: rotate(var(--cursor-angle));
  transform-origin: 1px 1px;
}

.pw-cursor__arrow {
  display: block;
  width: 16px;
  height: 18px;
}

.pw-cursor__arrow path {
  fill: var(--cursor-color);
}

.pw-cursor__pill {
  position: absolute;
  left: 13px;
  top: 9px;
  padding: 4px 7px 5px;
  border-radius: 4px;
  background: var(--cursor-color);
  color: #fff;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.01em;
  line-height: 1;
  white-space: nowrap;
  font-family: 'Roboto', var(--md-ref-typeface-plain, sans-serif);
}

.pw-cursor--eric {
  --cursor-color: #e9457a;
  --cursor-angle: 0deg;
  bottom: 10px;
  right: -48px;
  top: auto;
  left: auto;
}

.pw-cursor--eric .pw-cursor__pill {
  left: 14px;
  top: 10px;
}

@keyframes pw-cursor-float {
  0%, 100% {
    transform: scale(var(--cursor-scale)) translate3d(0, 0, 0);
  }
  50% {
    transform: scale(var(--cursor-scale)) translate3d(2px, -4px, 0);
  }
}

.pw-hint-icon {
  display: block;
  width: 108px;
  height: auto;
  overflow: visible;
  margin: 0 auto;
}

.pw-hint-doc {
  fill: url(#pwDocFill);
  stroke: rgba(55, 53, 47, 0.18);
  stroke-width: 1.4;
}

.pw-hint-fold {
  fill: none;
  stroke: rgba(55, 53, 47, 0.18);
  stroke-width: 1.4;
  stroke-linejoin: round;
}

.pw-hint-fold-fill {
  fill: rgba(232, 231, 227, 0.85);
  stroke: none;
}

.pw-hint-bar {
  fill: rgba(55, 53, 47, 0.16);
}

.pw-hint-line {
  stroke: rgba(55, 53, 47, 0.16);
  stroke-width: 3.5;
  stroke-linecap: round;
}

.pw-hint-mark {
  fill: rgba(55, 53, 47, 0.08);
  stroke: rgba(55, 53, 47, 0.4);
  stroke-width: 1.25;
  stroke-dasharray: 3 2;
}

/* Real CSS glass lens — frosted disc + hollow chrome rim */
.pw-mag {
  position: absolute;
  top: 14px;
  right: 6px;
  width: 48px;
  height: 68px;
  pointer-events: none;
}

.pw-mag-lens {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  z-index: 1;
  background:
    radial-gradient(
      95% 75% at 32% 26%,
      rgba(255, 255, 255, 0.62) 0%,
      rgba(255, 255, 255, 0.14) 26%,
      rgba(255, 255, 255, 0) 52%,
      rgba(148, 163, 184, 0.12) 100%
    );
  box-shadow:
    0 8px 16px rgba(15, 23, 42, 0.14),
    inset 0 1.5px 2px rgba(255, 255, 255, 1),
    inset 0 -5px 12px rgba(71, 85, 105, 0.2),
    inset 0 0 0 1.75px rgba(255, 255, 255, 0.55);
  -webkit-backdrop-filter: blur(4.5px) saturate(1.6) brightness(1.1);
  backdrop-filter: blur(4.5px) saturate(1.6) brightness(1.1);
}

.pw-mag-rim {
  position: absolute;
  top: 0;
  left: 0;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  z-index: 2;
  padding: 3.75px;
  background: linear-gradient(
    140deg,
    #ffffff 0%,
    #f4f4f5 12%,
    #a1a1aa 28%,
    #3f3f46 46%,
    #fafafa 58%,
    #71717a 76%,
    #09090b 100%
  );
  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  mask-composite: exclude;
}

.pw-mag-dots {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 26px;
  height: 8px;
  transform: translate(-50%, -40%);
  background:
    radial-gradient(circle, rgba(24, 24, 27, 0.55) 0 2.4px, transparent 2.6px) 1px 50% / 8px 8px no-repeat,
    radial-gradient(circle, rgba(24, 24, 27, 0.55) 0 2.4px, transparent 2.6px) 10px 50% / 8px 8px no-repeat,
    radial-gradient(circle, rgba(24, 24, 27, 0.55) 0 2.4px, transparent 2.6px) 19px 50% / 8px 8px no-repeat;
  filter: blur(0.45px);
  opacity: 0.85;
  pointer-events: none;
}

.pw-mag-shine {
  position: absolute;
  top: 4px;
  left: 6px;
  width: 16px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 0 6px rgba(255, 255, 255, 0.7);
  transform: rotate(-28deg);
  pointer-events: none;
}

.pw-mag-shine-arc {
  position: absolute;
  top: 2px;
  left: 4px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2.25px solid transparent;
  border-top-color: rgba(255, 255, 255, 1);
  border-right-color: rgba(255, 255, 255, 0.28);
  transform: rotate(-16deg);
  pointer-events: none;
}

.pw-mag-handle {
  position: absolute;
  top: 34px;
  left: 32px;
  z-index: 3;
  width: 24px;
  height: 6px;
  border-radius: 999px;
  background: linear-gradient(180deg, #a1a1aa 0%, #52525b 42%, #18181b 100%);
  transform: rotate(44deg);
  transform-origin: left center;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.35),
    0 2px 4px rgba(15, 23, 42, 0.2);
}

.pw-mag-cap {
  position: absolute;
  top: 52px;
  left: 44px;
  z-index: 3;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #71717a, #18181b 70%);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.35);
}

.pw-form {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 12px;
  width: 100%;
  margin-top: 24px;
}

.pw-input {
  width: 100%;
  min-height: 48px;
  padding: 0 16px;
  border: 1px solid #e8e7e3;
  border-radius: 12px;
  background: #fff;
  color: #37352f;
  font-size: 16px;
  line-height: 1;
  font-family: inherit;
  font-weight: 400;
  outline: none;
  text-align: center;
  caret-color: var(--accent, #1a56db);
  box-sizing: border-box;
  box-shadow: inset 0 1px 2px rgba(55, 53, 47, 0.04);
  transition:
    border-color 0.2s cubic-bezier(0.25, 0.1, 0.25, 1),
    background 0.2s cubic-bezier(0.25, 0.1, 0.25, 1),
    box-shadow 0.2s cubic-bezier(0.25, 0.1, 0.25, 1);
}

.pw-input::placeholder {
  color: rgba(55, 53, 47, 0.45);
}

.pw-input:focus {
  border-color: var(--accent, #1a56db);
  background: #fff;
  box-shadow:
    0 0 0 3px rgba(26, 86, 219, 0.12),
    inset 0 1px 2px rgba(55, 53, 47, 0.02);
}

.pw-btn {
  width: 100%;
  background: #37352f;
}

.pw-overlay .pw-btn:hover {
  background: #2c2a26;
}

.pw-overlay .pw-btn:active {
  background: #1f1e1a;
}

.pw-err {
  position: relative;
  z-index: 1;
  margin: 12px 0 0;
  font-size: 13px;
  font-weight: 400;
  letter-spacing: -0.01em;
  color: #ff3b30;
  text-align: center;
}

.pw-err[hidden] {
  display: none;
}

@media (prefers-reduced-motion: reduce) {
  .pw-backdrop,
  .pw-close,
  .pw-panel-inner {
    transition: none !important;
  }

  .pw-overlay.is-open .pw-backdrop,
  .pw-overlay.is-open .pw-close,
  .pw-overlay.is-open .pw-panel-inner {
    opacity: 1;
    transform: none;
  }

  .pw-sticker,
  .pw-cursor {
    animation: none;
  }

  .pw-sticker {
    transform: rotate(var(--pw-rot, 0deg)) scale(var(--pw-scale, 1));
  }

  .pw-cursor {
    transform: scale(var(--cursor-scale));
  }

  .pw-btn:active {
    transform: none;
  }
}

/* Phones incl. iPhone 15 Pro Max (430px) — keep stickers inside viewport */
@media (max-width: 480px) {
  .pw-floaters {
    inset: -4px 0 -4px 0;
  }

  .pw-sticker--music {
    top: 2px;
    left: 4px;
    right: auto;
    bottom: auto;
    --pw-rot: -12deg;
    --pw-scale: 0.78;
  }

  .pw-sticker--music img {
    width: 52px;
    height: 52px;
    padding: 9px 10px;
  }

  .pw-sticker--globe {
    top: 40%;
    right: 2px;
    left: auto;
    bottom: auto;
    --pw-rot: 10deg;
    --pw-scale: 0.76;
  }

  .pw-sticker--globe img {
    width: 52px;
    height: 52px;
  }

  .pw-sticker--shades {
    bottom: 26%;
    left: 2px;
    right: auto;
    top: auto;
    --pw-rot: -6deg;
    --pw-scale: 0.74;
  }

  .pw-sticker--shades img {
    width: 64px;
    padding: 10px 12px;
  }

  .pw-sticker--corgi {
    top: 6px;
    right: 4px;
    bottom: auto;
    left: auto;
    --pw-rot: 9deg;
    --pw-scale: 0.7;
    filter:
      drop-shadow(-3px 0 0 #fff)
      drop-shadow(3px 0 0 #fff)
      drop-shadow(0 -3px 0 #fff)
      drop-shadow(0 3px 0 #fff)
      drop-shadow(-2px -2px 0 #fff)
      drop-shadow(2px -2px 0 #fff)
      drop-shadow(-2px 2px 0 #fff)
      drop-shadow(2px 2px 0 #fff)
      drop-shadow(0 8px 14px rgba(0, 0, 0, 0.12));
  }

  .pw-sticker--corgi img {
    width: 56px;
  }

  .pw-cursor--eric {
    bottom: 8px;
    right: -14px;
    top: auto;
    --cursor-scale: 0.92;
  }

  .pw-cursor__arrow {
    width: 14px;
    height: 16px;
  }
}

@media (min-width: 768px) {
  .pw-panel {
    width: min(calc(100% - 2 * var(--page-pad)), 460px);
  }

  .pw-floaters {
    inset: -40px -52px -32px;
  }
}

/* ─────────────────────────────────────────────────────────
   INVENTORY CASE STUDY — component-led narrative
   Zebra device context, component ship flow, app-level compare
   ───────────────────────────────────────────────────────── */

/* Zebra handheld — sets the hardware context for the whole case study */
.cs-zebra-stage {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: clamp(24px, 4vw, 40px);
  align-items: stretch;
  margin-top: 24px;
  padding: clamp(22px, 3vw, 34px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-card);
  box-shadow: var(--shadow-sm);
}

.cs-zebra-scene {
  position: relative;
  min-height: clamp(260px, 34vw, 360px);
  border-radius: calc(var(--radius) - 4px);
  overflow: hidden;
  background: #e8eaed;
}

.cs-zebra-scene__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 58% 50%;
}

.cs-zebra-scene__shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.22) 0%, rgba(255, 255, 255, 0.04) 38%, transparent 68%),
    linear-gradient(180deg, transparent 0%, rgba(18, 20, 24, 0.12) 100%);
  pointer-events: none;
}

.cs-zebra-scene__device {
  position: absolute;
  left: clamp(14px, 3.5%, 24px);
  top: 50%;
  bottom: auto;
  transform: translateY(-50%);
  z-index: 2;
}

/* Same device as header — uniform scale to fit the scene */
.cs-zebra-scene__device-inner {
  transform: scale(0.82);
  transform-origin: center center;
}

.cs-zebra-scene__device .cs-zebra-device--hero {
  margin: 0;
}

.cs-zebra-device {
  position: relative;
  width: 100%;
  max-width: 232px;
  margin: 0 auto;
  padding: 30px 12px 46px;
  border-radius: 26px 26px 20px 20px;
  background: linear-gradient(158deg, #3f4147 0%, #303237 46%, #232529 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.16),
    inset 0 -3px 8px rgba(0, 0, 0, 0.4),
    0 18px 38px rgba(0, 0, 0, 0.2),
    0 4px 10px rgba(0, 0, 0, 0.1);
  box-sizing: border-box;
}

/* Rubberised scan triggers on both flanks */
.cs-zebra-device::before,
.cs-zebra-device::after {
  content: "";
  position: absolute;
  top: 128px;
  width: 5px;
  height: 62px;
  border-radius: 4px;
  background: linear-gradient(180deg, #f6c445 0%, #d9a227 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4);
}
.cs-zebra-device::before { left: -3px; }
.cs-zebra-device::after { right: -3px; }

.cs-zebra-head {
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 8px;
}

.cs-zebra-window {
  width: 46px;
  height: 9px;
  border-radius: 3px;
  background: linear-gradient(180deg, #14161a 0%, #0a0b0d 100%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.cs-zebra-led {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #4ade80;
  box-shadow: 0 0 7px rgba(74, 222, 128, 0.85);
}

.cs-zebra-screen {
  border-radius: 6px;
  overflow: hidden;
  background: #fff;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.5);
}

.cs-zebra-screen img {
  display: block;
  width: 100%;
  height: auto;
}

.cs-zebra-keys {
  position: absolute;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
}

.cs-zebra-keys span {
  width: 26px;
  height: 8px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.15);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14);
}
.cs-zebra-keys span:nth-child(2) {
  width: 40px;
  background: rgba(246, 196, 69, 0.5);
}

/* Hero-sized Zebra — shared by header and context scene */
.cs-zebra-device--hero {
  max-width: 178px;
  padding: 22px 9px 34px;
  border-radius: 22px 22px 17px 17px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.16),
    inset 0 -3px 8px rgba(0, 0, 0, 0.4),
    0 14px 30px rgba(0, 0, 0, 0.18),
    0 3px 8px rgba(0, 0, 0, 0.08);
}

.cs-zebra-device--hero::before,
.cs-zebra-device--hero::after {
  top: 98px;
  height: 48px;
}

.cs-zebra-device--hero .cs-zebra-window {
  width: 36px;
  height: 7px;
}

.cs-zebra-device--hero .cs-zebra-led {
  width: 6px;
  height: 6px;
}

.cs-zebra-device--hero .cs-zebra-keys {
  bottom: 12px;
}

.cs-zebra-device--hero .cs-zebra-keys span {
  width: 22px;
  height: 7px;
}

.cs-zebra-device--hero .cs-zebra-keys span:nth-child(2) {
  width: 34px;
}

.cs-zebra-device--hero .cs-zebra-screen img {
  width: 100%;
  height: auto;
  object-fit: cover;
  object-position: top center;
}

/* Hero — Zebra device in the page header visual */
.m3-docs-hero-visual {
  display: grid;
  place-items: center;
}

.m3-docs-hero-visual > .m3-docs-visual-bg,
.m3-docs-hero-visual > .m3-docs-visual-card--zebra {
  grid-area: 1 / 1;
}

/* Intake Agent — hero visual (lavender-forward; also in material-theme.css) */
.m3-docs-visual-bg.m3-docs-visual-bg--intake {
  background:
    radial-gradient(ellipse 78% 68% at 18% 22%, color-mix(in srgb, var(--md-sys-color-primary-container) 82%, transparent) 0%, transparent 58%),
    radial-gradient(ellipse 72% 58% at 82% 78%, color-mix(in srgb, var(--md-sys-color-secondary-container) 88%, transparent) 0%, transparent 56%),
    linear-gradient(148deg, #e4eaf6 0%, color-mix(in srgb, var(--md-sys-color-primary-container) 38%, var(--md-sys-color-surface-container)) 100%);
}

.m3-docs-hero-visual > .m3-docs-visual-card--zebra {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  max-width: none;
  margin: 0;
  padding: clamp(20px, 5.5%, 32px);
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  box-shadow: none;
  overflow: visible;
  perspective: 900px;
  perspective-origin: 50% 50%;
}

.index-inventory-scene .index-inventory-zebra-tilt {
  transform: scale(0.88);
}

.index-card--inventory:hover .index-inventory-scene .index-inventory-zebra-tilt {
  transform: scale(0.92);
}

.index-bento__panel--inventory .index-inventory-scene .index-inventory-zebra-tilt {
  transform: scale(0.6);
}

.index-card--inventory:hover .index-bento__panel--inventory .index-inventory-scene .index-inventory-zebra-tilt {
  transform: scale(0.62) translate(2%, -8%) rotate(3deg);
}

.cs-zebra-device-tilt {
  transform: rotateY(-22deg) rotateX(5deg) scale(0.76);
  transform-origin: center center;
  transform-style: preserve-3d;
}

.m3-docs-visual-card--zebra .cs-zebra-device--hero {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.16),
    inset 0 -3px 8px rgba(0, 0, 0, 0.4),
    4px 0 0 #25272c,
    6px 1px 0 #1c1d21,
    0 10px 22px rgba(0, 0, 0, 0.16);
}

.cs-zebra-copy h4 {
  font-size: clamp(17px, 1.6vw, 21px);
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 10px;
}

.cs-zebra-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
}

.cs-zebra-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
}

.cs-zebra-specs {
  list-style: none;
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.cs-zebra-specs li {
  display: flex;
  gap: 10px;
  align-items: baseline;
  font-size: clamp(13px, 1.1vw, 15px);
  line-height: 1.5;
  color: var(--ink-secondary);
}

.cs-zebra-specs li strong {
  flex: 0 0 auto;
  min-width: 92px;
  color: var(--ink);
  font-weight: 600;
}

@media (max-width: 720px) {
  .cs-zebra-stage {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .cs-zebra-scene {
    min-height: 220px;
  }
  .cs-zebra-scene__device-inner {
    transform: scale(0.72);
  }
}

/* Component ship flow — audit → adapt → ship */
.cs-ship-flow {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  justify-content: center;
  gap: 0;
  margin-top: 22px;
  padding: clamp(18px, 2.4vw, 24px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-card);
  box-shadow: var(--shadow-sm);
}

.cs-ship-step {
  flex: 1 1 140px;
  min-width: 0;
  padding: 8px clamp(12px, 2vw, 20px);
  text-align: center;
}

.cs-ship-step__label {
  display: block;
  font-size: clamp(15px, 1.3vw, 18px);
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin-bottom: 4px;
}

.cs-ship-step p {
  font-size: clamp(13px, 1.1vw, 14px);
  line-height: 1.45;
  color: var(--ink-secondary);
  margin: 0;
}

.cs-ship-arrow {
  flex: 0 0 auto;
  align-self: center;
  padding: 0 4px;
  font-size: 18px;
  font-weight: 300;
  color: var(--ink-muted);
  line-height: 1;
}

.cs-ship-step code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.92em;
  padding: 1px 5px;
  border-radius: 4px;
  background: var(--accent-light, rgba(26, 86, 219, 0.08));
  color: var(--accent);
}

/* Design in code — Cursor workflow (inventory case study) */
.cs-design-code {
  margin: clamp(24px, 3vw, 32px) 0 clamp(32px, 4vw, 48px);
  padding: clamp(20px, 2.5vw, 28px) clamp(20px, 2.8vw, 28px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: linear-gradient(165deg, color-mix(in srgb, var(--accent) 7%, var(--bg-card)) 0%, var(--bg-card) 52%);
  box-shadow: var(--shadow-sm);
}

.cs-design-code .block-label {
  margin-bottom: 8px;
}

.cs-design-code h4 {
  margin: 0 0 10px;
  font-size: clamp(18px, 1.8vw, 22px);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.cs-design-code-lede {
  margin: 0;
  max-width: 52rem;
  font-size: clamp(14px, 1.1vw, 16px);
  line-height: 1.55;
  color: var(--ink-secondary);
}

.cs-design-code-steps {
  list-style: none;
  margin: clamp(18px, 2.4vw, 24px) 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(14px, 2vw, 20px);
  counter-reset: design-code-step;
}

.cs-design-code-step {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: clamp(14px, 2vw, 18px);
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.55);
  min-width: 0;
}

.cs-design-code-icon {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  display: block;
}

.cs-design-code-step__copy strong {
  display: block;
  font-size: clamp(14px, 1.1vw, 15px);
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 4px;
  letter-spacing: -0.01em;
}

.cs-design-code-step__copy p {
  margin: 0;
  font-size: clamp(13px, 1vw, 14px);
  line-height: 1.5;
  color: var(--ink-secondary);
}

@media (max-width: 720px) {
  .cs-design-code-steps {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .cs-ship-flow {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }
  .cs-ship-arrow {
    align-self: center;
    transform: rotate(90deg);
    padding: 0;
  }
  .cs-ship-step { text-align: left; }
}

/* Whole-app compare — legacy flow row vs shipped flow row */
.cs-flowcompare {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(18px, 2.4vw, 26px);
  margin-top: 26px;
}

.cs-flowcompare-row {
  min-width: 0;
  padding: clamp(16px, 2vw, 22px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-card);
  box-shadow: var(--shadow-sm);
}

.cs-flowcompare-row.is-after {
  border-color: rgba(5, 150, 105, 0.32);
  background: linear-gradient(180deg, rgba(5, 150, 105, 0.04) 0%, var(--bg-card) 42%);
}

.cs-flowcompare-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 14px;
}

.cs-flowcompare-tag {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 3px 9px;
  border-radius: 100px;
  background: var(--ink-muted, #a1a1aa);
  color: #fff;
}

.cs-flowcompare-row.is-after .cs-flowcompare-tag {
  background: var(--accent-green, #059669);
}

.cs-flowcompare-head p {
  font-size: clamp(13px, 1.1vw, 15px);
  color: var(--ink-secondary);
  line-height: 1.5;
  margin: 0;
}

.cs-flowcompare .cs-gallery-phone {
  margin-top: 0;
  min-width: 0;
  max-width: 100%;
}

/* Scroll-linked horizontal showcase — vertical page scroll drives horizontal reveal */
.cs-flowcompare .cs-scroll-showcase {
  margin-top: 0;
  min-width: 0;
  max-width: 100%;
}

.cs-scroll-showcase {
  margin-top: 24px;
  min-width: 0;
  max-width: 100%;
}

.cs-scroll-showcase__viewport {
  overflow: hidden;
}

.cs-scroll-showcase__track {
  overflow-x: visible;
  scroll-snap-type: none;
  will-change: transform;
}

.cs-scroll-showcase__track.cs-gallery {
  display: flex;
  flex-wrap: nowrap;
  gap: clamp(16px, 2vw, 20px);
  margin-top: 0;
  width: max-content;
  grid-template-columns: unset;
}

.cs-scroll-showcase__track.cs-gallery .cs-figure {
  flex: 0 0 auto;
  width: clamp(280px, 42vw, 520px);
}

/* Scroll showcase frames — light shadow so each screenshot reads as a card */
.cs-scroll-showcase__track .cs-figure {
  border-radius: 12px;
  overflow: hidden;
  background: var(--bg-card, #fff);
  border: 1px solid var(--border);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08), 0 1px 3px rgba(0, 0, 0, 0.05);
}

.cs-scroll-showcase__track.cs-gallery.cs-gallery-phone .cs-figure {
  width: clamp(200px, 22vw, 260px);
}

.cs-scroll-showcase__track.cs-gallery:not(.cs-gallery-phone) .cs-figure {
  flex: 0 0 auto;
  width: clamp(280px, 42vw, 520px);
  aspect-ratio: 16 / 10;
  position: relative;
}

.cs-scroll-showcase__track.cs-gallery:not(.cs-gallery-phone) .cs-figure img,
.cs-scroll-showcase__track.cs-gallery:not(.cs-gallery-phone) .cs-figure video {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  background: var(--bg-card, #fff);
}

.cs-scroll-showcase__track figcaption {
  display: none;
}

@media (prefers-reduced-motion: reduce) {
  .cs-scroll-showcase__viewport {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
  }

  .cs-scroll-showcase__track {
    will-change: auto;
    transform: none !important;
  }
}

/* Scroll-linked horizontal showcase — vertical page scroll drives horizontal reveal */
.cs-flowcompare .cs-scroll-showcase {
  margin-top: 0;
  min-width: 0;
  max-width: 100%;
}

.cs-scroll-showcase {
  margin-top: 24px;
  min-width: 0;
  max-width: 100%;
}

.cs-scroll-showcase__viewport {
  overflow: hidden;
}

.cs-scroll-showcase__track {
  overflow-x: visible;
  scroll-snap-type: none;
  will-change: transform;
}

.cs-scroll-showcase__track.cs-gallery {
  display: flex;
  flex-wrap: nowrap;
  gap: clamp(16px, 2vw, 20px);
  margin-top: 0;
  width: max-content;
  grid-template-columns: unset;
}

.cs-scroll-showcase__track.cs-gallery .cs-figure {
  flex: 0 0 auto;
  width: clamp(280px, 42vw, 520px);
}

/* Scroll showcase frames — light shadow so each screenshot reads as a card */
.cs-scroll-showcase__track .cs-figure {
  border-radius: 12px;
  overflow: hidden;
  background: var(--bg-card, #fff);
  border: 1px solid var(--border);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08), 0 1px 3px rgba(0, 0, 0, 0.05);
}

.cs-scroll-showcase__track.cs-gallery.cs-gallery-phone .cs-figure {
  width: clamp(200px, 22vw, 260px);
}

.cs-scroll-showcase__track.cs-gallery:not(.cs-gallery-phone) .cs-figure {
  flex: 0 0 auto;
  width: clamp(280px, 42vw, 520px);
  aspect-ratio: 16 / 10;
  position: relative;
}

.cs-scroll-showcase__track.cs-gallery:not(.cs-gallery-phone) .cs-figure img,
.cs-scroll-showcase__track.cs-gallery:not(.cs-gallery-phone) .cs-figure video {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  background: var(--bg-card, #fff);
}

.cs-scroll-showcase__track figcaption {
  display: none;
}

@media (prefers-reduced-motion: reduce) {
  .cs-scroll-showcase__viewport {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
  }

  .cs-scroll-showcase__track {
    will-change: auto;
    transform: none !important;
  }
}

/* Learnings — simple takeaway list */
.cs-learnings {
  list-style: none;
  margin: 28px 0 clamp(36px, 5vw, 56px);
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: clamp(18px, 2.2vw, 24px);
  max-width: 640px;
}

.cs-learnings li {
  position: relative;
  padding-left: 1.1em;
  font-size: clamp(14px, 1.1vw, 16px);
  line-height: 1.6;
  color: var(--ink-secondary);
}

.cs-learnings li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
}

.cs-learnings li strong {
  display: block;
  color: var(--ink);
  font-weight: 600;
  margin-bottom: 4px;
  font-size: clamp(15px, 1.2vw, 17px);
  letter-spacing: -0.01em;
}

/* Context cards — native HTML replacing slide screenshots */
.cs-context-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(16px, 2vw, 24px);
  margin-top: clamp(20px, 3vw, 32px);
}

.cs-context-card {
  min-width: 0;
  padding: clamp(20px, 2.4vw, 28px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-card);
  box-shadow: var(--shadow-sm);
}

.cs-context-card--legacy {
  border-color: rgba(24, 24, 27, 0.12);
  background: linear-gradient(180deg, rgba(24, 24, 27, 0.02) 0%, var(--bg-card) 38%);
}

.cs-context-eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 8px;
}

.cs-context-card h4 {
  font-size: clamp(17px, 1.6vw, 21px);
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 0 0 8px;
}

.cs-context-lede {
  font-size: clamp(13px, 1.1vw, 15px);
  line-height: 1.55;
  color: var(--ink-secondary);
  margin: 0 0 18px;
}

.cs-lifecycle {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.cs-lifecycle-phase {
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg, #fafafa);
}

.cs-lifecycle-phase__name {
  display: block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink);
  margin-bottom: 8px;
}

.cs-lifecycle-phase ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 4px;
}

.cs-lifecycle-phase li {
  font-size: 12.5px;
  line-height: 1.4;
  color: var(--ink-secondary);
}

.cs-context-facts {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
}

.cs-context-facts li {
  font-size: clamp(13px, 1.1vw, 14px);
  line-height: 1.5;
  color: var(--ink-secondary);
  padding-left: 14px;
  border-left: 2px solid var(--border);
}

.cs-context-facts strong {
  color: var(--ink);
  font-weight: 600;
}

.cs-context-close {
  margin: 18px 0 0;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  font-size: clamp(13px, 1.1vw, 14px);
  line-height: 1.55;
  color: var(--ink-secondary);
}

.cs-context-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px 20px;
}

.cs-context-split__label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin: 0 0 6px;
}

.cs-context-split p {
  margin: 0;
  font-size: clamp(13px, 1.1vw, 14px);
  line-height: 1.55;
  color: var(--ink-secondary);
}

/* Problem chapter — one thesis, cards stay subordinate */
.cs-apple-layout #ch-problem.cs-chapter-heading {
  margin-bottom: clamp(32px, 4.5vw, 44px);
}

/* Intake Agent — problem stage (one card, zebra-style) */
.cs-problem-stage {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 0;
  align-items: stretch;
  margin-top: 24px;
  padding: clamp(22px, 3vw, 34px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-card);
  box-shadow: var(--shadow-sm);
}

.cs-problem-path {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  padding-right: clamp(20px, 3vw, 32px);
  border-right: 1px solid var(--border);
}

.cs-problem-path__label {
  margin: 0 0 14px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--ink-muted);
}

/* Floating decor — inventory tool pills + miro cursors */
.cs-problem-floaters {
  position: relative;
  min-height: clamp(250px, 34vw, 310px);
  margin: 0;
  padding: clamp(14px, 2vw, 20px);
  border-radius: calc(var(--radius) - 4px);
  background:
    radial-gradient(circle at 20% 24%, rgba(0, 82, 204, 0.05) 0%, transparent 44%),
    radial-gradient(circle at 78% 36%, rgba(97, 31, 105, 0.04) 0%, transparent 40%),
    radial-gradient(circle at 42% 82%, rgba(220, 38, 38, 0.03) 0%, transparent 36%),
    var(--bg, #fafafa);
  overflow: hidden;
}

.cs-problem-tool,
.cs-problem-sticker,
.cs-problem-cursor,
.cs-problem-spark {
  --float-rotate: 0deg;
  --float-delay: 0s;
  position: absolute;
  pointer-events: none;
  animation: cs-problem-float 5s ease-in-out var(--float-delay) infinite;
}

/* White tool pills — matches index inventory card */
.cs-problem-tool {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 11px 7px 9px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid rgba(255, 255, 255, 0.95);
  box-shadow:
    0 2px 6px rgba(0, 0, 0, 0.06),
    0 8px 20px rgba(0, 0, 0, 0.1);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--ink-secondary);
  line-height: 1;
  transform: rotate(var(--float-rotate));
}

.cs-problem-tool img {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  display: block;
}

.cs-problem-tool--confluence {
  --float-rotate: -11deg;
  --float-delay: 0s;
  top: 5%;
  left: 3%;
}

.cs-problem-tool--slack {
  --float-rotate: 10deg;
  --float-delay: 0.6s;
  top: 18%;
  left: 46%;
}

.cs-problem-tool--form {
  --float-rotate: -5deg;
  --float-delay: 1.2s;
  top: 34%;
  left: 5%;
}

.cs-problem-tool--manager {
  --float-rotate: 6deg;
  --float-delay: 3s;
  top: 78%;
  left: 38%;
}

/* Accent stickers — matches index inventory card */
.cs-problem-sticker {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 11px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.03em;
  line-height: 1;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
  transform: rotate(var(--float-rotate));
}

.cs-problem-sticker img {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  display: block;
}

.cs-problem-sticker--risk {
  --float-rotate: -8deg;
  --float-delay: 2.4s;
  top: 64%;
  left: 6%;
  background: #fff7ed;
  border: 1px solid #fed7aa;
  color: #c2410c;
}

.cs-problem-sticker--good {
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  color: #047857;
}

/* Exploration — after floaters */
.cs-problem-floaters--after .cs-float-af-1 { --float-rotate: -11deg; --float-delay: 0s; top: 6%; left: 4%; }
.cs-problem-floaters--after .cs-float-af-2 { --float-rotate: 9deg; --float-delay: 0.6s; top: 22%; left: 46%; }
.cs-problem-floaters--after .cs-float-af-3 { --float-rotate: -4deg; --float-delay: 1.2s; top: 38%; left: 6%; }
.cs-problem-floaters--after .cs-float-af-4 { --float-rotate: 6deg; --float-delay: 1.8s; top: 54%; left: 42%; }
.cs-problem-floaters--after .cs-float-af-5 { --float-rotate: -7deg; --float-delay: 2.4s; top: 72%; left: 10%; }
.cs-problem-floaters--after .cs-float-af-6 { --float-rotate: 5deg; --float-delay: 3s; top: 86%; left: 40%; }

.cs-problem-spark--after {
  top: 8%;
  right: 5%;
}

.cs-problem-spark {
  --float-rotate: 14deg;
  --float-delay: 1.8s;
  top: 10%;
  right: 6%;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: #fff;
  border: 1px solid rgba(255, 255, 255, 0.95);
  color: #0d9488;
  font-size: 14px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
  transform: rotate(var(--float-rotate));
}

/* Miro cursors — consequence callouts */
.cs-problem-cursor {
  --cursor-scale: 1;
  animation: cs-problem-cursor-float 4.6s ease-in-out var(--float-delay) infinite;
}

.cs-problem-cursor .pw-cursor__pill {
  font-size: 10px;
  padding: 5px 8px 6px;
  border-radius: 5px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

.cs-problem-cursor--error {
  --cursor-color: #dc2626;
  --cursor-angle: 8deg;
  --float-delay: 1.8s;
  top: 46%;
  left: 36%;
}

.cs-problem-cursor--accent {
  --cursor-color: #7c3aed;
  --cursor-angle: -14deg;
  --float-delay: 3.6s;
  --cursor-scale: 0.92;
  top: 26%;
  right: 4%;
  left: auto;
}

@keyframes cs-problem-float {
  0%, 100% {
    transform: rotate(var(--float-rotate)) translate3d(0, 0, 0);
  }
  50% {
    transform: rotate(var(--float-rotate)) translate3d(2px, -4px, 0);
  }
}

@keyframes cs-problem-cursor-float {
  0%, 100% {
    transform: scale(var(--cursor-scale)) translate3d(0, 0, 0);
  }
  50% {
    transform: scale(var(--cursor-scale)) translate3d(3px, -5px, 0);
  }
}

@media (max-width: 820px) {
  .cs-problem-floaters {
    min-height: 270px;
  }

  .cs-problem-tool--slack {
    left: 36%;
  }

  .cs-problem-cursor--error {
    left: 34%;
  }

  .cs-problem-tool--manager {
    left: 30%;
  }
}

@media (max-width: 560px) {
  .cs-problem-floaters {
    min-height: 310px;
  }

  .cs-problem-tool--confluence { top: 4%; left: 2%; }
  .cs-problem-tool--slack { top: 17%; left: 26%; }
  .cs-problem-tool--form { top: 31%; left: 3%; }
  .cs-problem-cursor--error { top: 46%; left: 24%; }
  .cs-problem-sticker--risk { top: 60%; left: 5%; }
  .cs-problem-tool--manager { top: 76%; left: 22%; }
  .cs-problem-spark { top: 8%; right: 4%; }
  .cs-problem-cursor--accent { top: 22%; right: 2%; }
}

@media (prefers-reduced-motion: reduce) {
  .cs-problem-tool,
  .cs-problem-sticker,
  .cs-problem-spark {
    animation: none;
    transform: rotate(var(--float-rotate));
  }

  .cs-problem-cursor {
    animation: none;
    transform: scale(var(--cursor-scale));
  }
}

.cs-problem-sources {
  list-style: none;
  margin: 0;
  padding: clamp(16px, 2vw, 20px);
  display: grid;
  gap: 0;
  border-radius: calc(var(--radius) - 4px);
  background: var(--bg, #fafafa);
}

.cs-problem-source {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 8px 0;
}

.cs-problem-source + .cs-problem-source {
  border-top: 1px solid var(--border);
}

.cs-problem-source__icon {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  display: block;
}

.cs-problem-source__label {
  font-size: 13px;
  font-weight: 400;
  line-height: 1.4;
  color: var(--ink);
}

.cs-problem-source__type {
  display: block;
  margin-bottom: 2px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.cs-problem-source--warn .cs-problem-source__label {
  color: var(--ink);
  font-weight: 600;
}

.cs-problem-source--good .cs-problem-source__label {
  color: var(--accent-green, #059669);
  font-weight: 600;
}

.cs-problem-persona {
  padding: 10px 0 4px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--ink-muted);
  list-style: none;
}

.cs-problem-persona:not(:first-child) {
  margin-top: 10px;
  padding-top: 14px;
  border-top: 1px dashed var(--border);
}

.cs-problem-persona + .cs-problem-source {
  border-top: 0;
  padding-top: 6px;
}

.cs-problem-source--break {
  margin-top: 6px;
  padding-top: 16px;
  border-top: 1px dashed var(--border);
}

.cs-problem-follow {
  display: flex;
  flex-direction: column;
  gap: clamp(16px, 2vw, 20px);
  margin-top: clamp(16px, 2vw, 20px);
}

.cs-problem-follow .cs-problem-stage {
  margin-top: 0;
}

.cs-problem-proof {
  grid-column: 1 / -1;
  margin: clamp(16px, 2vw, 24px) 0 0;
}

.cs-problem-proof img {
  width: 100%;
  height: auto;
  border-radius: calc(var(--radius) - 4px);
  border: 1px solid var(--border);
}

/* Exploration — form-first floaters */
.cs-problem-wireframe {
  position: absolute;
  inset: 0;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(32px, 7%, 44px) clamp(16px, 5%, 28px);
  z-index: 0;
  pointer-events: none;
}

.cs-problem-wireframe img {
  display: block;
  width: min(54%, 210px);
  max-height: 74%;
  height: auto;
  object-fit: contain;
  border-radius: 8px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow:
    0 2px 8px rgba(0, 0, 0, 0.06),
    0 10px 24px rgba(0, 0, 0, 0.1);
  transform: rotate(-2deg);
}

/* Exploration — rejected wireframe cards (form-first, pure chat) */
.cs-problem-stage--rejected .cs-problem-path__label {
  color: #b45309;
}

.cs-problem-floaters--form,
.cs-problem-floaters--before {
  min-height: clamp(300px, 38vw, 360px);
  padding: clamp(16px, 2.2vw, 22px);
  background: var(--bg, #fafafa);
}

.cs-problem-floaters--form .cs-problem-cursor--fail,
.cs-problem-floaters--before .cs-problem-cursor--fail {
  --cursor-color: #dc2626;
  --cursor-scale: 1;
  --cursor-angle: 0deg;
  --float-delay: 0s;
  left: 18%;
  bottom: 22%;
  top: auto;
  z-index: 3;
  animation: cs-problem-cursor-float 4.8s ease-in-out var(--float-delay) infinite;
}

.cs-problem-floaters--before .cs-problem-cursor--fail {
  left: 16%;
  bottom: 26%;
}

.cs-problem-floaters--form .cs-problem-cursor--fail .pw-cursor__pill,
.cs-problem-floaters--before .cs-problem-cursor--fail .pw-cursor__pill {
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.01em;
  white-space: nowrap;
  line-height: 1;
}

.cs-problem-floaters--form .cs-problem-wireframe,
.cs-problem-floaters--before .cs-problem-wireframe {
  inset: clamp(14px, 3.5vw, 18px);
  padding: 0;
}

.cs-problem-floaters--form .cs-problem-wireframe img,
.cs-problem-floaters--before .cs-problem-wireframe img {
  width: 100%;
  max-width: 320px;
  max-height: 100%;
  transform: none;
  border-radius: 10px;
  box-shadow:
    0 1px 3px rgba(0, 0, 0, 0.05),
    0 8px 24px rgba(0, 0, 0, 0.08);
}

.cs-problem-floaters--form > :not(.cs-problem-wireframe),
.cs-problem-floaters--before > :not(.cs-problem-wireframe) {
  z-index: 2;
}

/* Exploration — shipped hybrid (clean screenshot, not wireframe/floaters) */
.cs-problem-stage--shipped {
  background:
    linear-gradient(180deg, rgba(16, 185, 129, 0.04) 0%, var(--bg-card) 32%);
}

.cs-problem-stage--shipped .cs-problem-path {
  justify-content: flex-start;
  gap: 14px;
}

.cs-problem-stage--shipped .cs-problem-path__label {
  color: #047857;
}

.cs-problem-shot {
  margin: 0;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
  padding: 8px;
  border-radius: calc(var(--radius) - 4px);
  background: #fff;
  border: 1px solid rgba(16, 185, 129, 0.18);
  box-shadow:
    0 1px 2px rgba(0, 0, 0, 0.04),
    0 10px 28px rgba(0, 0, 0, 0.06);
}

.cs-problem-shot img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: calc(var(--radius) - 6px);
}

/* Exploration — form-first floaters (default positions for non-wireframe use) */

.cs-problem-close {
  margin: 16px 0 0;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  font-size: clamp(13px, 1.1vw, 14px);
  line-height: 1.55;
  color: var(--ink-secondary);
}

.cs-problem-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  padding-left: clamp(20px, 3vw, 32px);
}

.cs-problem-lede {
  margin: 0;
  font-size: clamp(14px, 1.1vw, 15px);
  font-weight: 400;
  line-height: 1.6;
  color: var(--ink-secondary);
}

.cs-problem-specs {
  list-style: none;
  display: grid;
  grid-template-columns: max-content 1fr;
  column-gap: 8px;
  row-gap: 12px;
  margin: 18px 0 0;
  padding: 0;
}

.cs-problem-specs li {
  display: contents;
}

.cs-problem-spec__term {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: var(--ink-muted);
  text-align: left;
  white-space: nowrap;
}

.cs-problem-spec__desc {
  font-size: clamp(13px, 1.05vw, 14px);
  font-weight: 400;
  line-height: 1.55;
  color: var(--ink-secondary);
  min-width: 0;
}

@media (max-width: 820px) {
  .cs-context-grid { grid-template-columns: 1fr; }
  .cs-context-split { grid-template-columns: 1fr; }
  .cs-problem-stage {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .cs-problem-path {
    padding-right: 0;
    padding-bottom: 24px;
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }
  .cs-problem-copy {
    padding-left: 0;
    padding-top: 24px;
  }
}

@media (max-width: 560px) {
  .cs-snapshot-proof {
    grid-template-columns: 1fr;
    max-width: 240px;
  }
}

/* ─── Intake Agent (m3-docs) — page type scale ─── */
.case-study.cs-m3-docs .block-label,
.case-study.cs-m3-docs .cs-problem-path__label,
.case-study.cs-m3-docs .cs-problem-spec__term,
.case-study.cs-m3-docs .cs-problem-persona,
.case-study.cs-m3-docs .cs-loop-kicker,
.case-study.cs-m3-docs .comparison-card .comp-label,
.case-study.cs-m3-docs .reflection-block .ref-label,
.case-study.cs-m3-docs .cs-loop-recap-label,
.case-study.cs-m3-docs .cs-snapshot > .block-label {
  text-transform: none;
  letter-spacing: 0.01em;
  font-weight: 500;
  font-size: 12px;
}

.case-study.cs-m3-docs .cs-chapter-num {
  text-transform: none;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.case-study.cs-m3-docs.cs-apple-layout .cs-chapter-heading {
  display: grid;
  grid-template-columns: 2.25rem 1fr;
  column-gap: 12px;
  row-gap: 8px;
  align-items: baseline;
  text-align: left;
  margin-bottom: clamp(32px, 4.5vw, 44px);
}

.case-study.cs-m3-docs.cs-apple-layout .cs-chapter-num {
  grid-column: 1;
  grid-row: 1 / span 2;
  margin-bottom: 0;
  align-self: start;
  padding-top: 0.55em;
  line-height: 1;
}

.case-study.cs-m3-docs.cs-apple-layout .cs-chapter-heading h3,
.case-study.cs-m3-docs.cs-apple-layout .cs-chapter-sub {
  grid-column: 2;
}

.case-study.cs-m3-docs.cs-apple-layout .cs-chapter-sub {
  margin-top: 0;
  margin-left: 0;
  margin-right: 0;
  max-width: 52ch;
}

.case-study.cs-m3-docs .cs-appendix__summary {
  display: grid;
  padding: 0;
  padding-inline: 0;
}

.case-study.cs-m3-docs .cs-apple-layout .cs-chapter-heading h3 {
  font-weight: 600;
  letter-spacing: -0.025em;
}

.case-study.cs-m3-docs .cs-apple-layout .cs-chapter-sub {
  font-weight: 400;
  color: var(--ink-muted);
  margin-top: 0;
}

.case-study.cs-m3-docs .block h3 {
  font-size: clamp(16px, 1.4vw, 18px);
  font-weight: 600;
  letter-spacing: -0.015em;
}

.case-study.cs-m3-docs .block-inline-title {
  display: block;
  margin-bottom: 6px;
  font-size: clamp(16px, 1.4vw, 18px);
  font-weight: 600;
  letter-spacing: -0.015em;
  color: var(--ink);
  line-height: 1.35;
}

.case-study.cs-m3-docs .cs-system-path__title {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0 0.75em;
  margin: 0 0 8px;
}

.case-study.cs-m3-docs .cs-system-path__title .block-label {
  margin: 0;
  flex: 0 0 auto;
}

.case-study.cs-m3-docs .cs-system-path__title .block-inline-title {
  display: inline;
  margin: 0;
}

.case-study.cs-m3-docs .block p {
  font-size: clamp(14px, 1vw + 13px, 15px);
  line-height: 1.65;
}

.case-study.cs-m3-docs .comparison-card h4 {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.case-study.cs-m3-docs .cs-snapshot-beat strong {
  font-weight: 600;
  font-size: 13px;
}

.case-study.cs-m3-docs .cs-snapshot-num {
  font-weight: 600;
  letter-spacing: 0.02em;
}

.case-study.cs-m3-docs .cs-loop-phase-title {
  font-size: 14px;
  font-weight: 600;
}

.case-study.cs-m3-docs .cs-loop-phase-sub,
.case-study.cs-m3-docs .cs-loop-phase-note,
.case-study.cs-m3-docs .cs-loop-recap {
  font-weight: 400;
}

.case-study.cs-m3-docs .cs-loop-phase-num {
  font-weight: 600;
}

.case-study.cs-m3-docs .cs-problem-lede {
  font-size: clamp(14px, 1.05vw, 15px);
  font-weight: 400;
}

.case-study.cs-m3-docs .cs-problem-spec__term {
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-muted);
  text-align: left;
}

.case-study.cs-m3-docs .cs-problem-persona {
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 0.02em;
}

.case-study.cs-m3-docs .cs-problem-path__label {
  font-weight: 500;
  font-size: 11px;
}

.case-study.cs-m3-docs .reflection-block p {
  font-weight: 400;
}

.case-study.cs-m3-docs .checklist li {
  font-weight: 400;
}

/* Intake — loop panels match cs-problem-stage cards */
.case-study.cs-m3-docs .cs-loop-diagram {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: clamp(22px, 3vw, 34px);
  margin: 12px 0 32px;
}

.case-study.cs-m3-docs .cs-loop-kicker {
  margin: 0 0 14px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-transform: none;
  color: var(--ink-muted);
}

.case-study.cs-m3-docs .cs-loop-phase {
  gap: 14px;
  background: var(--bg, #fafafa);
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) - 4px);
  padding: clamp(14px, 2vw, 20px);
  box-shadow: none;
}

.case-study.cs-m3-docs .cs-loop-phase--admin,
.case-study.cs-m3-docs .cs-loop-phase--user,
.case-study.cs-m3-docs .cs-loop-phase--shipped,
.case-study.cs-m3-docs .cs-loop-phase--feedback,
.case-study.cs-m3-docs .cs-loop-phase--reflection {
  border-top: 1px solid var(--border);
  background: var(--bg, #fafafa);
}

.case-study.cs-m3-docs .cs-loop-phase-num {
  width: 26px;
  height: 26px;
  font-size: 12px;
  font-weight: 600;
  background: #fff;
  border: 1px solid var(--border);
  color: var(--ink-muted);
}

.case-study.cs-m3-docs .cs-loop-phase-steps li {
  font-size: clamp(13px, 1.05vw, 14px);
  line-height: 1.55;
}

.case-study.cs-m3-docs .cs-loop-phase-steps li::before {
  color: var(--ink-muted);
  opacity: 0.35;
}

.case-study.cs-m3-docs .cs-loop-phase-arrow-icon {
  background: var(--border);
}

.case-study.cs-m3-docs .cs-loop-phase-arrow-icon::after {
  border-left-color: var(--border);
}

.case-study.cs-m3-docs .cs-loop-recap {
  border-top-color: var(--border);
  margin-top: 20px;
  padding-top: 16px;
  font-size: clamp(13px, 1.05vw, 14px);
}

.case-study.cs-m3-docs .cs-loop-pullquote,
.case-study.cs-m3-docs .cs-loop-phase-note {
  font-size: clamp(13px, 1.05vw, 14px);
  font-weight: 400;
  line-height: 1.55;
  color: var(--ink-secondary);
}

@media (max-width: 900px) {
  .case-study.cs-m3-docs .cs-loop-phase-arrow-icon::after {
    border-top-color: var(--border);
    border-left-color: transparent;
  }
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
@media (max-width: 480px) {
  .cs-lifecycle { grid-template-columns: 1fr; }
}

/* Exploration — same chapter heading as 01 / 03, collapsible */
.case-study.cs-m3-docs.cs-apple-layout details.cs-appendix {
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
}

.case-study.cs-m3-docs .cs-appendix__summary {
  cursor: pointer;
  list-style: none;
}

.case-study.cs-m3-docs .cs-appendix__summary::-webkit-details-marker,
.case-study.cs-m3-docs .cs-appendix__summary::marker {
  display: none;
  content: none;
}

.case-study.cs-m3-docs .cs-appendix__heading-text {
  position: relative;
}

.case-study.cs-m3-docs .cs-appendix__heading-text::after {
  content: "";
  position: absolute;
  left: calc(100% + 10px);
  top: 50%;
  width: 8px;
  height: 8px;
  border-right: 1.5px solid var(--ink-muted);
  border-bottom: 1.5px solid var(--ink-muted);
  transform: translateY(-70%) rotate(45deg);
  transition: transform 0.2s ease;
}

.case-study.cs-m3-docs details.cs-appendix[open] .cs-appendix__heading-text::after {
  transform: translateY(-20%) rotate(225deg);
}

.case-study.cs-m3-docs .cs-appendix__body {
  padding: 0;
  border: 0;
}

.case-study.cs-m3-docs .cs-appendix__body .cs-problem-follow {
  margin-top: 0;
}

/* ─── DEMO / RISING CASE + TRUST GRID ─── */
.cs-demo-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin: 0 0 56px;
}
.cs-demo-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  min-width: 0;
  text-decoration: none;
  color: inherit;
  transition: box-shadow var(--transition), transform var(--transition), border-color var(--transition);
}
a.cs-demo-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
  border-color: #d4d4d8;
}
.cs-demo-card img {
  width: 100%;
  height: auto;
  border-radius: 10px;
  border: 1px solid var(--border);
  display: block;
}
.cs-demo-card__meta {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-muted);
}
.cs-demo-card h4 {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.cs-demo-card p {
  font-size: 14px;
  line-height: 1.55;
  color: var(--ink-secondary);
  max-width: none;
}
.cs-demo-card__cta {
  margin-top: auto;
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
}
.cs-trust-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin: 0 0 56px;
}
.cs-trust-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  min-width: 0;
}
.cs-trust-card img {
  width: 100%;
  height: auto;
  display: block;
  border-bottom: 1px solid var(--border);
}
.cs-trust-card__copy {
  padding: 16px 18px 18px;
}
.cs-trust-card h4 {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--ink);
}
.cs-trust-card p {
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--ink-secondary);
  max-width: none;
}
.cs-flow-steps {
  list-style: none;
  margin: 0 0 56px;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.cs-flow-step {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 16px 20px;
  min-width: 0;
}
.cs-flow-step__num {
  display: block;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--accent);
  margin-bottom: 8px;
}
.cs-flow-step h4 {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--ink);
}
.cs-flow-step p {
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--ink-secondary);
  max-width: none;
}
.demo-exit {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 50;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border-radius: 8px;
  background: rgba(14, 17, 22, 0.88);
  color: #fff;
  font: 600 13px/1.2 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  text-decoration: none;
  backdrop-filter: blur(8px);
}
.demo-exit:hover {
  background: #0e1116;
}
@media (max-width: 900px) {
  .cs-demo-grid,
  .cs-trust-grid,
  .cs-flow-steps {
    grid-template-columns: 1fr;
  }
}
